Is my return_to under my trust_root?

        @returntype: bool
350517
def trustRootValid(self):
        
        if not self.trust_root:
            return True
        tr = TrustRoot.parse(self.trust_root)
        if tr is None:
            raise MalformedTrustRoot(self.message, self.trust_root)

        if self.return_to is not None:
            return tr.validateURL(self.return_to)
        else:
            return True
925559
protected function detectReturnType()
    {
        if (isset($_GET['cookie'])) {
            $this->returnType = 'none';
            return;
        } elseif (!empty($_GET['return_url'])) {
            $this->returnType = 'redirect';
        } elseif (!empty($_GET['callback'])) {
            $this->returnType = 'jsonp';
        } elseif (strpos($_SERVER['HTTP_ACCEPT'], 'image/') !== false) {
            $this->returnType = 'image';
        } elseif (strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false) {
            $this->returnType = 'json';
        }
    }
1189961
private boolean returnValueNeedsIntCast(Expression arg) {
    ExecutableElement methodElement = TreeUtil.getExecutableElement(arg);
    assert methodElement != null;

    if (arg.getParent() instanceof ExpressionStatement) {
      // Avoid "unused return value" warning.
      return false;
    }

    String methodName = nameTable.getMethodSelector(methodElement);
    if (methodName.equals("hash") && methodElement.getReturnType().getKind() == TypeKind.INT) {
      return true;
    }
    return false;
  }
800430
Class evalReturnType( CallStack callstack, Interpreter interpreter )
        throws EvalError
    {
        insureNodesParsed();
        if ( returnTypeNode != null )
            return returnTypeNode.evalReturnType( callstack, interpreter );
        else
            return null;
    }
311402
def on_self
      scope  = current_scope
      method = scope.lookup(scope.method_call_type, 'self')

      push_value(method.return_value)
    end
968996
def add
      return if !verify_logged_in      
      
      resp = Caboose::StdClass.new
      
      if SavedSearch.exists?(:uri => params[:uri])
        resp.redirect = "/saved-searches"
      else        
        search = SavedSearch.new(
          :user_id        => logged_in_user.id,
          :date_last      => Date.today,
          :interval       => 1,
          :notify         => true,
          :uri            => params[:uri],
          :property_type  => params[:property_type],
          :params         => params[:params]        
        )
        if search.save
          resp.redirect = "/saved-searches"        
        else
          resp.error = "There was an error saving your search."        
        end
      end
      render :json => resp
    end
137682
def checkSanity(cls, trust_root_string):
        
        trust_root = cls.parse(trust_root_string)
        if trust_root is None:
            return False
        else:
            return trust_root.isSane()
355045
def _ha_return_method(func):
        '''  '''
        def wrapped(self, *args, **kw):
            self._reset_retries()
            while(True): # switch between all namenodes
                try:
                    return func(self, *args, **kw)
                except RequestError as e:
                    self.__handle_request_error(e)
                except socket.error as e:
                    self.__handle_socket_error(e)
        return wrapped
1106624
def checkURL(cls, trust_root, url):
        """"""
        tr = cls.parse(trust_root)
        return tr is not None and tr.validateURL(url)
412742
def method_missing(sym, *args, &block)
      if self.internal_object.key?(sym.to_s)
        return self.internal_object[sym.to_s]
      end

      super
    end
1150896
public void returnVoid() {
        if (!method.returnType.equals(TypeId.VOID)) {
            throw new IllegalArgumentException("declared " + method.returnType
                    + " but returned void");
        }
        addInstruction(new PlainInsn(Rops.RETURN_VOID, sourcePosition, null,
                RegisterSpecList.EMPTY));
    }
1338657
def setup_backtrace_cleaner_path
      return unless Rails.backtrace_cleaner.instance_variable_get(:@root) == '/'
      Rails.backtrace_cleaner.instance_variable_set :@root, Rails.root.to_s
    end
530437
def returner(load):
    '''
    
    '''
    conn = _get_conn()
    if conn is None:
        return None
    cur = conn.cursor()
    sql = '''INSERT INTO salt_returns
            (fun, jid, return, id, success)
            VALUES (%s, %s, %s, %s, %s)'''
    try:
        ret = six.text_type(load['return'])
    except UnicodeDecodeError:
        ret = str(load['return'])
    job_ret = {'return': ret}
    if 'retcode' in load:
        job_ret['retcode'] = load['retcode']
    if 'success' in load:
        job_ret['success'] = load['success']
    cur.execute(
        sql, (
            load['fun'],
            load['jid'],
            salt.utils.json.dumps(job_ret),
            load['id'],
            load.get('success'),
        )
    )
    _close_conn(conn)
790821
private function returnTransfertToRaw()
    {
        if ($this->returnTransfert()) {
            if (!curl_setopt($this->ch, CURLOPT_BINARYTRANSFER, true)) {
                $this->close();

                return false;
            }
        }

        return true;
    }
1306217
def _get_initial_returning(self):
        

        hooker = None
        if self.is_syscall:
            hooker = self.project.simos.syscall_from_addr(self.addr)
        elif self.is_simprocedure:
            hooker = self.project.hooked_by(self.addr)
        if hooker and hasattr(hooker, 'NO_RET'):
            return not hooker.NO_RET

        # Cannot determine
        return None
405240
def _make_retval_checker(self):
        """"""
        rvchk = self.retval.checker
        if rvchk:
            def _checker(value):
                if not rvchk.check(value):
                    raise self._type_error(
                        "Incorrect return type in %s: expected %s got %s" %
                        (self.name_bt, rvchk.name(),
                         checker_for_type(type(value)).name())
                    )
        else:
            def _checker(value):
                pass
        return _checker
1211165
def root(self):
        ''''''
        with self._mutex:
            if self._parent:
                return self._parent.root
            else:
                return self