code: protected <T extends Node> T pop(String location, FragmentBuilder builder, Class<T> cls, String uri) {
          if (builder == null) {
              if (log.isLoggable(Level.WARNING)) {
                  log.warning("No fragment builder for this thread (" + Thread.currentThread()
                          + ") - trying to pop node of type: " + cls);
              }
              return null;
          }
  
          if (builder.getCurrentNode() == null) {
              if (log.isLoggable(Level.FINEST)) {
                  log.finest("WARNING: No 'current node' for this thread (" + Thread.currentThread()
                          + ") - trying to pop node of type: " + cls);
              }
              return null;
          }
  
          // Check if any in or out content should be processed for the current node
          processInContent(location, builder, -1);
          processOutContent(location, builder, -1);
  
          Node node = builder.popNode(cls, uri);
          if (node != null) {
              builder.finishNode(node);
              return cls.cast(node);
          }
  
          if (log.isLoggable(Level.FINEST)) {
              log.finest("Current node (type=" + builder.getCurrentNode().getClass()
                      + ") does not match required cls=" + cls + " and uri=" + uri
                      + " at location=" + location);
          }
  
          return null;
      }
docs: This method pops an existing node from the trace fragment.
  
  @param location The instrumentation location
  @param The class to pop
  @param The optional URI to match
  @return The node