public static void stubTreeToBuffer(@NotNull Stub node, @NotNull Appendable buffer, int indent) {
    StringUtil.repeatSymbol(buffer, ' ', indent);
    try {
      ObjectStubSerializer<?, ?> stubType = node.getStubType();
      if (stubType != null) {
        buffer.append(stubType.toString()).append(':');
      }
      buffer.append(node.toString()).append('\n');

      List<? extends Stub> children = node.getChildrenStubs();
      for (Stub child : children) {
        stubTreeToBuffer(child, buffer, indent + 2);
      }
    }
    catch (IOException e) {
      LOG.error(e);
    }
  }
public static void stubTreeToBuffer(@NotNull Stub node, @NotNull Appendable buffer, int indent)