code: public static Cpe parse(String cpeString, boolean lenient) throws CpeParsingException {
          if (cpeString == null) {
              throw new CpeParsingException("CPE String is null and cannot be parsed");
          } else if (cpeString.regionMatches(0, "cpe:/", 0, 5)) {
              return parse22(cpeString, lenient);
          } else if (cpeString.regionMatches(0, "cpe:2.3:", 0, 8)) {
              return parse23(cpeString, lenient);
          }
          throw new CpeParsingException("The CPE string specified does not conform to the CPE 2.2 or 2.3 specification");
      }
docs: Parses a CPE String into an object with the option of parsing CPE 2.2 URI
  strings in lenient mode - allowing for CPE values that do not adhere to
  the specification.
  
  @param cpeString the CPE string to parse
  @param lenient when <code>true</code> the CPE 2.2 parser will put in
  lenient mode attempting to parse invalid CPE URI values.
  @return the CPE object represented by the given cpeString
  @throws CpeParsingException thrown if the cpeString is invalid