code: private static File astFile(final String uriOrFileName) {
          try {
              final String astFileName = uriOrFileName + ".xml";
              return uriOrFileName.startsWith("file:") ? new File(URI.create(astFileName)) : new File(astFileName);
          } catch (IllegalArgumentException e) {
              return null;
          }
      }
docs: Takes the incoming file-name and checks whether this is a URI using the <tt>file:</tt> protocol or a non-URI and treats
  it accordingly.
  
  @return a file-name {@link java.io.File} representation or <tt>null</tt> if the file-name was in an invalid URI format