Checks if method_name is set in the attributes hash
 and returns true when found, otherwise proxies the
 call to the superclass.
321040
def respond_to?(method_name, _include_all = false)
      if attrs.key?(method_name.to_s)
        true
      else
        super(method_name)
      end
    end
399462
def method_missing(method_name, *arguments, &block)
      super unless dynamic_method?(method_name)

      if dynamic_state_check?(method_name)
        # Used to check state - allows for methods such as #published? and #expired?
        # Will return true if the active_state corresponds to the name of the method
        "#{publish_state.downcase}?" == method_name.to_s
      else
        # Used to query for any field on the relevant ContentType and return data from the content_item
        field_items.find { |field_item| field_item.field.name.parameterize(separator: '_') == method_name.to_s }.data.values.first
      end
    end
763039
def method_missing(method, *args, &block)
      super
    rescue NoMethodError
      return regs(method) if self.has_reg?(method)
      return ports(method) if self.has_port?(method)
      if method.to_s =~ /=$/
        define_singleton_method(method) do |val|
          instance_variable_set("@#{method.to_s.sub('=', '')}", val)
        end
      else
        define_singleton_method(method) do
          instance_variable_get("@#{method}")
        end
      end
      send(method, *args, &block)
    end
1119992
def is_method_of(method, object):
    """"""
    if not callable(method) or not hasattr(method, "__name__"):
        return False
    if inspect.ismethod(method):
        return method.__self__ is object
    for cls in inspect.getmro(object.__class__):
        if cls.__dict__.get(method.__name__, None) is method:
            return True
    return False
736052
private boolean isHandlerMethod(final Method method) {
        boolean isHandler = false;

        if (hasStartSagaAnnotation(method) || hasHandlerAnnotation(method)) {
            if (method.getReturnType().equals(Void.TYPE)) {
                Class<?>[] parameterTypes = method.getParameterTypes();
                if (parameterTypes.length == 1) {
                    isHandler = true;
                } else {
                    LOG.warn("Method {}.{} marked for saga does not have the expected single parameter.", method.getDeclaringClass(), method.getName());
                }
            } else {
                LOG.warn("Method {}.{} marked for saga event handling but does return a value.", method.getDeclaringClass(), method.getName());
            }
        }

        return isHandler;
    }
530776
def method_missing(method, *args, &block)
      if method[-1] == '='
        # setter
        key = method.slice(0...-1).to_sym

        unless has_key?(key)
          super
        end
        self[key] = args[0]
      else
        unless has_key?(method)
          super
        end

        prop = self[method]
        if prop.is_a? JSFunction
          prop.call_with_instance(self, *args, &block)
        else
          prop
        end
      end
    end
1007286
public boolean usesMethod(String className, String methodName, String descriptor) {
		int classIndex = findClass(className);
		if (classIndex == NOT_FOUND) return false;
		int nameAndTypeIndex = findNameAndType(methodName, descriptor);
		if (nameAndTypeIndex == NOT_FOUND) return false;
		
		for (int i = 1; i < maxPoolSize; i++) {
			if (isMethod(i) && 
					readValue(offsets[i]) == classIndex && 
					readValue(offsets[i] + 2) == nameAndTypeIndex) return true;
		}
		return false;
	}
1004139
private Method isSelfCall(InvokeInstruction inv) {
        ConstantPoolGen cpg = classContext.getConstantPoolGen();
        JavaClass jclass = classContext.getJavaClass();

        String calledClassName = inv.getClassName(cpg);

        // FIXME: is it possible we would see a superclass name here?
        // Not a big deal for now, as we are mostly just interested in calls
        // to private methods, for which we will definitely see the right
        // called class name.
        if (!calledClassName.equals(jclass.getClassName())) {
            return null;
        }

        String calledMethodName = inv.getMethodName(cpg);
        String calledMethodSignature = inv.getSignature(cpg);
        boolean isStaticCall = (inv instanceof INVOKESTATIC);

        // Scan methods for one that matches.
        Method[] methods = jclass.getMethods();
        for (Method method : methods) {
            String methodName = method.getName();
            String signature = method.getSignature();
            boolean isStatic = method.isStatic();

            if (methodName.equals(calledMethodName) && signature.equals(calledMethodSignature) && isStatic == isStaticCall) {
                // This method looks like a match.
                return wantCallsFor(method) ? method : null;
            }
        }

        // Hmm...no matching method found.
        // This is almost certainly because the named method
        // was inherited from a superclass.
        LOG.debug("No method found for {}.{} : {}", calledClassName, calledMethodName, calledMethodSignature);
        return null;
    }
1182856
static boolean isJavaPropertyMethod(final String methodName) {
        return (methodName.length() > PROPERTY_METHOD_PREFIX_LEN
                && (methodName.startsWith("get") || methodName.startsWith(("set"))));
    }
524108
def has_field_item?(method_name)
      field_items.any? { |field_item| field_item.field.name.parameterize(separator: '_') == method_name.to_s }
    end
603617
def respond_to?(method_name, include_private_methods = false)
      attr = "@#{method_name}"
      return super if method_name.match(/[\?!]$/) || !instance_variable_defined?(attr)
      true
    end
408497
private boolean isMethodApi(Method method)
  {
    if (_type == _api) {
      return true;
    }
    
    for (Method methodApi : _api.getMethods()) {
      if (methodApi.getName().equals(method.getName())) {
        return true;
      }
    }
    
    return false;
  }
637508
private boolean overridesSuperclassMethod(JavaClass javaClass, Method method) {
        if (method.isStatic()) {
            return false;
        }

        try {
            JavaClass[] superclassList = javaClass.getSuperClasses();
            if (superclassList != null) {
                JavaClassAndMethod match = Hierarchy.findMethod(superclassList, method.getName(), method.getSignature(),
                        Hierarchy.INSTANCE_METHOD);
                if (match != null) {
                    return true;
                }
            }

            JavaClass[] interfaceList = javaClass.getAllInterfaces();
            if (interfaceList != null) {
                JavaClassAndMethod match = Hierarchy.findMethod(interfaceList, method.getName(), method.getSignature(),
                        Hierarchy.INSTANCE_METHOD);
                if (match != null) {
                    return true;
                }
            }

            return false;
        } catch (ClassNotFoundException e) {
            return true;
        }
    }
1226713
private static boolean containsMethod(Method method, List<Method> methods) {
    if(methods != null) {
      for(Method aMethod : methods){
        if(method.getName().equals(aMethod.getName())) {
          return true;
        }
      }
    }
    return false;
  }
775146
def method_missing(method, *args)
      getter_name = "get_#{method}"
      return send(getter_name, *args) if respond_to?(getter_name)

      if method.to_s =~ /(.*)=$/
        setter_name = "set_#{Regexp.last_match[1]}"
        return send(setter_name, *args) if respond_to?(setter_name)
      end
      super
    end
235437
def check_method(tab_ops, prefix, method_sym, do_call, *arguments, &block)
      method_sym = method_sym.id2name
      verb = :get
      [:post, :get, :delete, :put].each do |averb|
        if method_sym.start_with? averb.id2name
          verb = averb
          method_sym[averb.id2name + '_'] = ''
          break
        end
      end
      if tab_ops[verb].include? method_sym.to_sym
        if do_call
          params = arguments.first
          method = prefix + method_sym
          method += "/#{params.shift}"  if params.first && params.first.class != Hash
          return do_request verb, method, params.shift
        else
          return nil
        end
      end
      nil
    end
537019
def method_missing(method_id, *arguments, &block)#:nodoc:

      # If the missing method is  XXX_without_static_rc, define XXX
      # using the superclass ActiveRecord::Base method_missing then
      # Finally, alias chain it to XXX_with_static_rc
      if ((match = method_id.to_s.match(/(.*)_without_static_rc$/)) &&
          (base_method_id = match[1]))
        begin
          return super(base_method_id, *arguments, &block)
        ensure
          define_static_rc_alias(base_method_id)
        end
      end

      # If the missing method is a finder like find_by_name
      # Define on the class then invoke find_by_name_with_static_rc
      if match = ActiveRecord::DynamicFinderMatch.match(method_id)
        attribute_names = match.attribute_names
        if all_attributes_exists?(attribute_names) &&  match.finder?
          attributes = construct_attributes_from_arguments(attribute_names, arguments)
          method_name = define_static_record_finder_method(method_id, match.finder, match.bang?, attributes)
          return self.send method_name, *arguments
        end
      end

      #If nothing matches, invoke the super
      super(method_id, *arguments, &block)
    end