code: static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException {
          LOGGER.fine("CommPortIdentifier:getPortIdentifier(" + s + ")");
          CommPortIdentifier index;
  
          synchronized (Sync) {
              index = CommPortIndex;
              while (index != null && !index.portName.equals(s)) {
                  index = index.next;
              }
              if (index == null) {
                  /* This may slow things down but if you pass the string for the port after
                   a device is plugged in, you can find it now.
  
                   http://bugzilla.qbang.org/show_bug.cgi?id=48
                   */
                  getPortIdentifiers();
                  index = CommPortIndex;
                  while (index != null && !index.portName.equals(s)) {
                      index = index.next;
                  }
              }
          }
          if (index != null) {
              return index;
          } else {
              LOGGER.fine("not found!" + s);
              throw new NoSuchPortException();
          }
      }
docs: Returns the associated port identifier of a port with the given name. If
  no port with the given name can be found a
  <code>NoSuchPortException</code> is thrown.
  
  @param s the name of the port whose identifier is looked up
  @return the identifier of the port
  @throws NoSuchPortException when no port with the given name was found