code: public static Model readPom(File file) throws AnalysisException {
          //noinspection CaughtExceptionImmediatelyRethrown
          try {
              final PomParser parser = new PomParser();
              final Model model = parser.parse(file);
              if (model == null) {
                  throw new AnalysisException(String.format("Unable to parse pom '%s'", file.getPath()));
              }
              return model;
          } catch (AnalysisException ex) {
              throw ex;
          } catch (PomParseException ex) {
              LOGGER.warn("Unable to parse pom '{}'", file.getPath());
              //todo remove test code for intermittent error.
              try {
                  final File target = new File("~/Projects/DependencyCheck/core/target/");
                  if (target.isDirectory()) {
                      FileUtils.copyFile(file, target);
                      LOGGER.info("Unparsable pom was copied to {}", target.toString());
                  }
              } catch (IOException ex1) {
                  throw new UnexpectedAnalysisException(ex1);
              }
              LOGGER.debug("", ex);
              throw new AnalysisException(ex);
          } catch (Throwable ex) {
              LOGGER.warn("Unexpected error during parsing of the pom '{}'", file.getPath());
              LOGGER.debug("", ex);
              throw new AnalysisException(ex);
          }
      }
docs: Reads in the specified POM and converts it to a Model.
  
  @param file the pom.xml file
  @return returns an object representation of the POM
  @throws AnalysisException is thrown if there is an exception extracting
  or parsing the POM {@link Model} object