code: Reference<T> lookupReference(String name, boolean isLongName) {
      if (isLongName) {
        for (Reference<T> r : referenceMap.values()) {
          if (r.longName.equals(name)) {
            return r;
          }
        }
        return null;
      }
      return referenceMap.get(name);
    }
docs: Find reference with given name of option or argument
  
  @param name Name of option or argument
  @param isLongName True if name is a long name
  @return Reference that matches name or NULL