docs: public static ReturnCode validateProductMatches(File outputDir, List productMatches) {
          boolean dirExists;
          dirExists = outputDir.exists();
          if (dirExists) {
              File f = new File(outputDir, "lib/versions");
              File[] files = f.listFiles();
              if (files == null || files.length == 0) {
                  // output error
                  return new ReturnCode(ReturnCode.BAD_OUTPUT, "invalidInstall", outputDir.getAbsolutePath());
              } else {
                  propFiles: for (int i = 0; i < files.length; i++) {
                      if (!files[i].getAbsolutePath().endsWith(".properties"))
                          continue;
                      Properties props = new Properties();
                      InputStream is = null;
                      try {
                          is = new FileInputStream(files[i]);
                          props.load(is);
                      } catch (IOException e) {
                          continue;
                      } finally {
                          if (is != null) {
                              try {
                                  is.close();
                              } catch (IOException e) {
                              }
                          }
                      }
  
                      Iterator matches = productMatches.iterator();
                      while (matches.hasNext()) {
                          ProductMatch match = (ProductMatch) matches.next();
                          int result = match.matches(props);
                          if (result == ProductMatch.NOT_APPLICABLE) {
                              continue;
                          } else if (result == ProductMatch.INVALID_VERSION || result == ProductMatch.INVALID_EDITION) {
                              List longIDs = new ArrayList();
                              Iterator matchesItr = match.getEditions().iterator();
  
                              while (matchesItr.hasNext()) {
                                  String shortID = (String) matchesItr.next();
                                  String editionName = InstallUtils.getEditionName(shortID);
                                  longIDs.add(editionName);
                              }
                              String edition = InstallUtils.getEditionName(props.getProperty("com.ibm.websphere.productEdition"));
  
                              if (result == ProductMatch.INVALID_VERSION) {
                                  return new ReturnCode(ReturnCode.BAD_OUTPUT, "invalidVersion", new Object[] { props.getProperty("com.ibm.websphere.productVersion"),
                                                                                                                match.getVersion(),
                                                                                                                edition,
                                                                                                                longIDs,
                                                                                                                props.getProperty("com.ibm.websphere.productLicenseType") });
                              } else if (result == ProductMatch.INVALID_EDITION) {
                                  return new ReturnCode(ReturnCode.BAD_OUTPUT, "invalidEdition", new Object[] { edition,
                                                                                                                longIDs,
                                                                                                                props.getProperty("com.ibm.websphere.productVersion"),
                                                                                                                match.getVersion(),
                                                                                                                props.getProperty("com.ibm.websphere.productLicenseType") });
                              }
                          } else if (result == ProductMatch.INVALID_INSTALL_TYPE) {
                              return new ReturnCode(ReturnCode.BAD_OUTPUT, "invalidInstallType", new Object[] { props.getProperty("com.ibm.websphere.productInstallType"),
                                                                                                                match.getInstallType() });
                          } else if (result == ProductMatch.INVALID_LICENSE) {
                              return new ReturnCode(ReturnCode.BAD_OUTPUT, "invalidLicense", new Object[] { props.getProperty("com.ibm.websphere.productLicenseType"),
                                                                                                            match.getLicenseType() });
                          }
                          break propFiles;
                      }
                  }
              }
          } else {
              // output error
              return new ReturnCode(ReturnCode.BAD_OUTPUT, "invalidInstall", outputDir.getAbsolutePath());
          }
          return ReturnCode.OK;
      }