@Override
  public Result applyFilter(@NotNull String line, int textEndOffset) {
    ExceptionLineParser worker = myFactory.create(myCache);
    Result result = worker.execute(line, textEndOffset, myNextLineRefiner);
    if (result == null) {
      ExceptionLineRefiner refiner = myNextLineRefiner;
      if (refiner != null) {
        myNextLineRefiner = refiner.consumeNextLine(line);
        if (myNextLineRefiner != null) return null;
      }
      ExceptionInfo exceptionInfo = ExceptionInfo.parseMessage(line, textEndOffset);
      myNextLineRefiner = exceptionInfo == null ? null : exceptionInfo.getPositionRefiner();
      return null;
    }
    ExceptionInfo prevLineException = myNextLineRefiner == null ? null : myNextLineRefiner.getExceptionInfo();
    ExceptionLineRefiner nextRefiner = null;
    ExceptionLineRefiner refiner = myNextLineRefiner;
    if (refiner != null) {
      nextRefiner = refiner.consumeNextLine(line);
    }
    if (nextRefiner == null) {
      myNextLineRefiner = worker.getLocationRefiner();
    }
    else {
      myNextLineRefiner = nextRefiner;
    }
    if (prevLineException != null) {
      List<ResultItem> exceptionResults = getExceptionClassNameItems(prevLineException);
      if (!exceptionResults.isEmpty()) {
        exceptionResults.add(result);
        return new Result(exceptionResults);
      }
    }
    return result;
  }
@Override
  public Result applyFilter(@NotNull String line, int textEndOffset)