If this method actually gets called it means that we are the {@link SipHeaderImpl} itself
and that we need to frame it further. Subclasses MUST override this method and simply return
'this'.
320406
@Override
    public SipHeader ensure() {
        final Function<SipHeader, ? extends SipHeader> framer = SipParser.getFramer(this.name);
        if (framer != null) {
            return framer.apply(this);
        }
        return this;
    }
545318
private boolean isStreamBlocked()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(this, tc, "isStreamBlocked");
            SibTr.exit(tc, "isStreamBlocked", new Object[] { Boolean.valueOf(isStreamBlocked),
                                                            Long.valueOf(linkBlockingTick) });
        }
        return this.isStreamBlocked;

    }
739201
@Override
	public IncomingRemoteCallTracer traceIncomingRemoteCall(String remoteMethod, String remoteService,
			String clientEndpoint) {
		return RemoteCallServerTracerNoop.INSTANCE;
	}
505719
protected String getCallingClassName() {
        boolean outerSubclassReached = false;
        for (StackTraceElement element : Thread.currentThread().getStackTrace()) {
            // the method call that leads to the first invocation of this class or its subclass is considered the caller
            if (!knownClassNames.contains(element.getClassName())) {
                if (outerSubclassReached) {
                    return element.getClassName();
                }
            } else {
                outerSubclassReached = true;
            }
        }
        throw BeanManagerLogger.LOG.unableToIdentifyBeanManager();
    }
854891
private void inferCaller() {
        needToInferCaller = false;
        // Android-changed: Use VMStack.getThreadStackTrace.
        /* J2ObjC modified.
        StackTraceElement[] stack = VMStack.getThreadStackTrace(Thread.currentThread());
        */
        StackTraceElement[] stack = Thread.currentThread().getStackTrace();
        int depth = stack.length;

        boolean lookingForLogger = true;
        for (int ix = 0; ix < depth; ix++) {
            // Calling getStackTraceElement directly prevents the VM
            // from paying the cost of building the entire stack frame.
            //
            // Android-changed: Use value from getThreadStackTrace.
            StackTraceElement frame = stack[ix];
            String cname = frame.getClassName();
            boolean isLoggerImpl = isLoggerImplFrame(cname);
            if (lookingForLogger) {
                // Skip all frames until we have found the first logger frame.
                if (isLoggerImpl) {
                    lookingForLogger = false;
                }
            } else {
                if (!isLoggerImpl) {
                    // skip reflection call
                    if (!cname.startsWith("java.lang.reflect.") && !cname.startsWith("sun.reflect.")) {
                       // We've found the relevant frame.
                       setSourceClassName(cname);
                       setSourceMethodName(frame.getMethodName());
                       return;
                    }
                }
            }
        }
        // We haven't found a suitable frame, so just punt.  This is
        // OK as we are only committed to making a "best effort" here.
    }
497736
function () {                                                                             // 441
    var self = this;                                                                                              // 442
    if (self._methodResult && self._dataVisible) {                                                                // 443
      // Call the callback. (This won't throw: the callback was wrapped with                                      // 444
      // bindEnvironment.)                                                                                        // 445
      self._callback(self._methodResult[0], self._methodResult[1]);                                               // 446
                                                                                                                  // 447
      // Forget about this method.                                                                                // 448
      delete self._connection._methodInvokers[self.methodId];                                                     // 449
                                                                                                                  // 450
      // Let the connection know that this method is finished, so it can try to                                   // 451
      // move on to the next block of methods.                                                                    // 452
      self._connection._outstandingMethodFinished();                                                              // 453
    }                                                                                                             // 454
  }
197543
def dispatch(self, receiver):
        ''' 

        '''
        super(SessionCallbackAdded, self).dispatch(receiver)
        if hasattr(receiver, '_session_callback_added'):
            receiver._session_callback_added(self)
1145264
public Object invoke(Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable {
        if (thisMethod == null) {
            BeanLogger.LOG.methodHandlerProcessingReturningBeanInstance(self.getClass());
            if (beanInstance == null) {
                throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean());
            }
            return beanInstance.getInstance();
        }
        BeanLogger.LOG.methodHandlerProcessingCall(thisMethod, self.getClass());
        if (thisMethod.getDeclaringClass().equals(TargetInstanceProxy.class)) {
            if (beanInstance == null) {
                throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean());
            }
            if (thisMethod.getName().equals("weld_getTargetInstance")) {
                return beanInstance.getInstance();
            } else if (thisMethod.getName().equals("weld_getTargetClass")) {
                return beanInstance.getInstanceType();
            } else {
                return null;
            }
        } else if (thisMethod.getName().equals("_initMH")) {
            BeanLogger.LOG.settingNewMethodHandler(args[0], self.getClass());
            return new ProxyMethodHandler(contextId, new TargetBeanInstance(args[0]), getBean());
        } else {
            if (beanInstance == null) {
                throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean());
            }
            Object instance = beanInstance.getInstance();
            Object result = beanInstance.invoke(instance, thisMethod, args);
            // if the method returns this and the return type matches the proxy type, return the proxy instead
            // to prevent the bean instance escaping
            if (result != null && result == instance && (thisMethod.getReturnType().isAssignableFrom(self.getClass()))) {
                return self;
            }
            return result;
        }
    }
311402
def on_self
      scope  = current_scope
      method = scope.lookup(scope.method_call_type, 'self')

      push_value(method.return_value)
    end
452935
public boolean isXForwardedHeaderRequired() {
        return forwardedHeader == null && (xForwardedForHeader != null || xForwardedByHeader != null ||
                xForwardedHostHeader != null || xForwardedProtoHeader != null);
    }
293220
public void execute() {
        state = State.Running;
        for (Subscription sub : subscriptions) {
           sub.publish(this, message);
        }
        state = State.Finished;
        // This part is necessary to support the feature of publishing a DeadMessage or FilteredMessage
        // in case that the original message has not made it to any listener.
        // This happens if subscriptions are empty (due to GC of weak listeners or explicit desubscription)
        // or if configured filters do not let a message pass. The flag is set by the dispatchers.
        // META: This seems to be a suboptimal design
        if (!dispatched) {
            if (!isFilteredMessage() && !isDeadMessage()) {
                runtime.getProvider().publish(new FilteredMessage(message));
            } else if (!isDeadMessage()) {
                runtime.getProvider().publish(new DeadMessage(message));
            }

        }
    }
477316
def on(method, *args, &block)

      if [:initialize, :before, :setup, :after].include? method
        raise "#{method} should not be called directly"
      end

      buffer  = [] # Container for the response buffer  
      threads = [] # Container for the execution threads

  		@registry.each do |s|
        if s.respond_to?(method.to_sym, false)
          threads << Thread.new do 
            responder = DispatchResponder.new(s)
          
            responder.trap(@timeout) do 
              if s.method(method.to_sym).arity == 0
                s.send(method, &block)
              else
                s.send(method, *args, &block)
              end
            end

            responder.finalize

            buffer << responder.to_h
          end
  			end
  		end

      threads.map(&:join)

      buffer
  	end
953748
private void handleMainMethodIfPresent(List methods) {
        boolean found = false;
        for (Iterator iter = methods.iterator(); iter.hasNext();) {
            MethodNode node = (MethodNode) iter.next();
            if(node.getName().equals("main")) {
                if (node.isStatic() && node.getParameters().length == 1) {
                    boolean retTypeMatches, argTypeMatches;
                    ClassNode argType = node.getParameters()[0].getType();
                    ClassNode retType = node.getReturnType();

                    argTypeMatches = (argType.equals(ClassHelper.OBJECT_TYPE) || argType.getName().contains("String[]"));
                    retTypeMatches = (retType == ClassHelper.VOID_TYPE || retType == ClassHelper.OBJECT_TYPE);
                    
                    if(retTypeMatches && argTypeMatches) {
                        if(found) {
                            throw new RuntimeException("Repetitive main method found.");
                        } else {
                            found = true;
                        }
                        // if script has both loose statements as well as main(), then main() is ignored
                        if(statementBlock.isEmpty()) {
                            addStatement(node.getCode());
                        }
                        iter.remove();
                    }
                }
            }
        }
    }
1136440
public static StackTraceElement callerFrame() {
        final Thread me = currentThread();
        StackTraceElement[] se = me.getStackTrace();
        for (int i = 0; i < se.length; i++) {
            String sClass = se[i].getClassName();
            if (!sClass.equals(CLASS)) continue;
            String method = se[i].getMethodName();
            if (!"callerFrame".equals(method)) continue;
            if (i + 2 < se.length) return se[i + 2];
        }
        throw new IllegalStateException("bad stack");
    }
290284
private boolean isRedirectNeeded(final HttpMethod method) {
		switch (method.getStatusCode()) {
			case HttpStatus.SC_MOVED_TEMPORARILY:
			case HttpStatus.SC_MOVED_PERMANENTLY:
			case HttpStatus.SC_SEE_OTHER:
			case HttpStatus.SC_TEMPORARY_REDIRECT:
				LOG.debug("Redirect required");
                if (method.getFollowRedirects()) {
                    return true;
                } else {
                    return false;
                }
			default:
				return false;
		} //end of switch
	}
692939
private void visitFrameAfterOnMethodEntry() {
        if (!visitFramesAfterCallbacks)
            return;

        // The frame that is required after the trace guard must be
        // fully specified as 'this' is no longer an 'uninitialized this'
        if (isConstructor()) {
            List<Object> stackLocals = new ArrayList<Object>(argTypes.length + 1);
            stackLocals.add(classAdapter.getClassType().getInternalName());
            for (Type type : argTypes) {
                switch (type.getSort()) {
                    case Type.ARRAY:
                    case Type.OBJECT:
                        stackLocals.add(type.getInternalName());
                        break;
                    case Type.BOOLEAN:
                    case Type.CHAR:
                    case Type.BYTE:
                    case Type.SHORT:
                    case Type.INT:
                        stackLocals.add(INTEGER);
                        break;
                    case Type.LONG:
                        stackLocals.add(LONG);
                        break;
                    case Type.FLOAT:
                        stackLocals.add(FLOAT);
                        break;
                    case Type.DOUBLE:
                        stackLocals.add(DOUBLE);
                        break;
                }
            }
            visitFrame(F_FULL, stackLocals.size(), stackLocals.toArray(), 0, new Object[] {});
            visitInsn(NOP);
        } else {
            visitFrame(F_SAME, 0, null, 0, null);
            visitInsn(NOP);
        }
    }
605474
@Override
  public FutureResultImpl<T> setHandler(Handler<AsyncResult<T>> handler) {
    this.handler = handler;
    checkCallHandler();
    return this;
  }