override methods
496020
function init(autocomplete) {
    if (autocomplete.__bunny_autocomplete !== undefined) {
      return false;
    }
    autocomplete.__bunny_autocomplete = {};
    autocomplete.__bunny_autocomplete_state = this.getCurState(autocomplete);
    this._addEvents(autocomplete);
    this._setARIA(autocomplete);

    initObjectExtensions(this, autocomplete);

    return true;
  }
1326003
function customizeMethods(custom) {
  _.each(custom, function(classMethods, className) {
    _.extend(xml2js.CLASSES[className].methods, _.pick(classMethods, function(methodSpec, methodName) {
      return isValidMethodSpec(methodSpec, className + '.' + methodName);
    }));
  });
}
568688
private void overrideUseMavenPatterns(T overrider, Class overriderClass) {
        if (useMavenPatternsOverrideList.contains(overriderClass.getSimpleName())) {
            try {
                Field useMavenPatternsField = overriderClass.getDeclaredField("useMavenPatterns");
                useMavenPatternsField.setAccessible(true);
                Object useMavenPatterns = useMavenPatternsField.get(overrider);

                if (useMavenPatterns == null) {
                    Field notM2CompatibleField = overriderClass.getDeclaredField("notM2Compatible");
                    notM2CompatibleField.setAccessible(true);
                    Object notM2Compatible = notM2CompatibleField.get(overrider);
                    if (notM2Compatible instanceof Boolean && notM2Compatible != null) {
                        useMavenPatternsField.set(overrider, !(Boolean)notM2Compatible);
                    }
                }
            } catch (NoSuchFieldException | IllegalAccessException e) {
                converterErrors.add(getConversionErrorMessage(overrider, e));
            }
        }
    }
275620
private void overrideDeployerDetails(T overrider, Class overriderClass) {
        if (overrider instanceof DeployerOverrider) {
            try {
                Field deployerDetailsField = overriderClass.getDeclaredField("deployerDetails");
                deployerDetailsField.setAccessible(true);
                Object deployerDetails = deployerDetailsField.get(overrider);

                if (deployerDetails == null) {
                    Field oldDeployerDetailsField = overriderClass.getDeclaredField("details");
                    oldDeployerDetailsField.setAccessible(true);
                    Object oldDeployerDetails = oldDeployerDetailsField.get(overrider);
                    if (oldDeployerDetails != null) {
                        ServerDetails deployerServerDetails = createInitialDeployDetailsFromOldDeployDetails((ServerDetails) oldDeployerDetails);
                        deployerDetailsField.set(overrider, deployerServerDetails);
                    }
                }
            } catch (NoSuchFieldException | IllegalAccessException e) {
                converterErrors.add(getConversionErrorMessage(overrider, e));
            }
        }
    }
694120
def monkey_patch_override_instance_method(instance):
    
    def perform_override(override_fn):
        fn_name = override_fn.__name__
        original_fn_name = '_original_' + fn_name
        # Override instance method, if it hasn't already been done
        if not hasattr(instance, original_fn_name):
            original_fn = getattr(instance, fn_name)
            setattr(instance, original_fn_name, original_fn)
            bound_override_fn = override_fn.__get__(instance)
            setattr(instance, fn_name, bound_override_fn)
    return perform_override
635122
def overrideable_partial(func, *args, **default_kwargs):
    
    import functools
    @functools.wraps(func)
    def partial_wrapper(*given_args, **given_kwargs):
        kwargs = default_kwargs.copy()
        kwargs.update(given_kwargs)
        return func(*(args + given_args), **kwargs)
    return partial_wrapper
1203463
public static Optional<ExecutableElement> override(
      DeclaredType type, Types types, String methodName, TypeMirror... params) {
    return override(asElement(type), types, methodName, params);
  }
1225551
def accept_override(self):
        """"""
        conflicts = self.check_conflicts()
        if conflicts:
            for shortcut in conflicts:
                shortcut.key = ''
        self.accept()
1277713
function addOptionMethod( PluginClass ) {
				// don't overwrite original option method
				if ( PluginClass.prototype.option ) {
					return;
				}

			  // option setter
			  PluginClass.prototype.option = function( opts ) {
			    // bail out if not an object
			    if ( !$.isPlainObject( opts ) ){
			      return;
			    }
			    this.options = $.extend( true, this.options, opts );
			  };
			}
26285
function overrideMethod(name, f) {
            // Use Object.defineProperty to prevent methods from appearing in
            // the subject's for in loop
            if (_es5_object_supported) {
                Object.defineProperty(subject, name, {
                    value: f
                });
            } else {
                subject[name] = f;
            }
        }
96219
private void overridePacksAndModules(Celerio celerio) {
        String filename = xmlTemplatePacksOverride;
        if (!FileUtils.fileExists(filename)) {
            return;
        }
        getLog().info("Overriding configuration with " + filename);

        CelerioLoader celerioLoader = context.getBean(CelerioLoader.class);
        try {
            Configuration configuration = celerioLoader.load(filename).getConfiguration();
            // override celerioContext
            CelerioTemplateContext ctc = configuration.getCelerioTemplateContext();
            if (ctc != null) {
                celerio.getConfiguration().setCelerioTemplateContext(ctc);
            }

            // override packs
            List<Pack> newPacks = configuration.getPacks();
            if (newPacks != null && !newPacks.isEmpty()) {
                celerio.getConfiguration().setPacks(newPacks);
            }

            // override modules
            List<Module> newModules = configuration.getModules();
            if (newModules != null && !newModules.isEmpty()) {
                celerio.getConfiguration().setModules(newModules);
            }
        } catch (Exception e) {
            throw new RuntimeException("Could not do override: ["+ filename + "]", e);
        }
    }
768016
def modify_class(original_class, modifier_class, override=True):
    
    # get members to add
    modifier_methods = inspect.getmembers(modifier_class, inspect.ismethod)
    
    # set methods
    for method_tuple in modifier_methods:
        name = method_tuple[0]
        method = method_tuple[1]
        if isinstance(method, types.UnboundMethodType):
            if hasattr(original_class, name) and not override:
                return None
            else:
                setattr(original_class, name, method.im_func)
885891
def override_spec(cls, **kwargs):
        """"""
        cls._default_spec.set(**kwargs)
        cls.spec.set(**kwargs)
1329614
private void addToOverrideMap(ExecutableElement methodElement) {
    String overrideID = stitchOverrideMethodIdentifier(methodElement);
    if (overrideMap.containsKey(overrideID)) {
      overrideMap.get(overrideID).add(stitchMethodIdentifier(methodElement));
    } else {
      HashSet<String> overrideSet = new HashSet<String>();
      overrideSet.add(stitchMethodIdentifier(methodElement));
      overrideMap.put(overrideID, overrideSet);
    }
  }
1093959
def overrides(method):
    '''
    
    '''
    def wrapper(func):
        if func.__name__ != method.__name__:
            msg = "Wrong @override: %r expected, but overwriting %r."
            msg = msg % (func.__name__, method.__name__)
            raise AssertionError(msg)

        if func.__doc__ is None:
            func.__doc__ = method.__doc__

        return func

    return wrapper
1146219
function createOverride(sXHRMethod) {

		mRegistry[sXHRMethod] = Object.create(null);

		//  backup the original function
		mXHRFunctions[sXHRMethod] = window.XMLHttpRequest.prototype[sXHRMethod];

		window.XMLHttpRequest.prototype[sXHRMethod] = function() {
			var oArgs = arguments;

			// call the original function first
			mXHRFunctions[sXHRMethod].apply(this, oArgs);

			// call the registered callbacks in order of their registration
			for (var sName in mRegistry[sXHRMethod]) {
				mRegistry[sXHRMethod][sName].apply(this, oArgs);
			}

		};

	}
499940
def override(self, config_params):
        
        map = StringValueMap.from_maps(self, config_params)
        return ConfigParams(map)