public boolean parse()

in agent/src/jetbrains/buildServer/xmlReportPlugin/parsers/pmdCpd/PmdCpdReportParser.java [32:60]


  public boolean parse(@NotNull File file, @Nullable ParsingResult prevResult) throws ParsingException {
    if (!ParserUtils.isReportComplete(file, "pmd-cpd")) {
      return false;
    }

    try {
      new PmdCpdXmlReportParser(new PmdCpdXmlReportParser.Callback() {
        public void startDuplicates() {
          myDuplicationReporter.startDuplicates();
        }

        public void finishDuplicates() {
          myDuplicationReporter.finishDuplicates();
        }

        public void reportDuplicate(@NotNull DuplicationResult duplicate) {
          myDuplicationReporter.reportDuplicate(duplicate);
        }

        @Override
        public void error(@NotNull final String message) {
          myDuplicationReporter.error(message);
        }
      }, myCheckoutDirectory.getAbsolutePath()).parse(file);
    } catch (IOException e) {
      throw new ParsingException(e);
    }
    return true;
  }