code: public void scan(String originalXml) {
          Matcher matcher = INSTRUCTION_PATTERN.matcher(originalXml);
          while (matcher.find()) {
              scanOneInstruction(matcher.group(1));
              containsIgnoredSections = true;
          }
          if (expectedNextInstruction != IGNORE) {
              addError(String.format("Xml processing instructions for sortpom was not properly terminated. Every <?sortpom %s?> must be followed with <?sortpom %s?>",
                      IGNORE, RESUME));
          }
      }
docs: Scan and verifies the pom file for processing instructions