TODO Add @Override
495168
@Override
    public FilterMutableType getOrCreateFilter() {
        final List<Node> nodeList = this.getRootNode().get("filter");
        if (nodeList.size() > 0) {
            return createNewFilterViewForModel(nodeList.get(0));
        }
        return createFilter();
    }
1248173
public function mergeWith(self $flags, bool $override = true): self
    {
        if ($override) {
            $clone = clone ($this);
            foreach ($flags as $stringFlag => $flag) {
                /** @var FlagInterface $flag */
                $clone->flags[$flag->__toString()] = clone ($flag);
            }
        } else {
            $clone = clone ($flags);
            $clone->key = $this->key;
            foreach ($this as $stringFlag => $flag) {
                /** @var FlagInterface $flag */
                $clone->flags[$flag->__toString()] = clone ($flag);
            }
        }

        return $clone;
    }
682272
public function addArray($array, $override)
    {
        foreach ($array as $key => $value) {
            $this->add($key, $value, $override);
        }
    }
150537
function require_override(p){
  
  function createXMLHttp() {
    if (typeof XMLHttpRequest != 'undefined') {
      return new XMLHttpRequest();
    } else if (window.ActiveXObject) {
      var avers = ["Microsoft.XmlHttp", "MSXML2.XmlHttp", "MSXML2.XmlHttp.3.0", "MSXML2.XmlHttp.4.0", "MSXML2.XmlHttp.5.0"];
      for (var i = avers.length -1; i >= 0; i--) {
        try {
          httpObj = new ActiveXObject(avers[i]);
          return httpObj;
        } catch(e) {}
      }
    }
    throw new Error('XMLHttp (AJAX) not supported');
  }

  var ajaxObj = createXMLHttp();
  
  var path = require.resolve(p)
    , mod = require.modules[path];
  if (!mod) {
    var exports;
    
    var ajaxObj = createXMLHttp();
    ajaxObj.open('GET', path + '.js', false);
    ajaxObj.onreadystatechange = function() {
      if (this.readyState == 4 && this.status == 200) {
        exports = {};
        (new Function('exports', this.responseText))(exports);
        require.modules[path + '.js'] = { exports: exports };
      }
    };
    ajaxObj.send();

    if (exports != null) {
      return exports;
    }
    throw new Error('failed to require "' + p + '"');
  }
  if (!mod.exports) {
    mod.exports = {};
    mod.call(mod.exports, mod, mod.exports, require.relative(path));
  }
  return mod.exports;
}
60316
private List<ClassInfo> getOverrideOrder(final Set<ClassInfo> visited, final List<ClassInfo> overrideOrderOut) {
        if (visited.add(this)) {
            overrideOrderOut.add(this);
            for (final ClassInfo iface : getInterfaces()) {
                iface.getOverrideOrder(visited, overrideOrderOut);
            }
            final ClassInfo superclass = getSuperclass();
            if (superclass != null) {
                superclass.getOverrideOrder(visited, overrideOrderOut);
            }
        }
        return overrideOrderOut;
    }
386190
protected function addEditorOverride($text_format, array &$overrides) {
    $config_name = 'editor.editor.' . $text_format;
    /* @var \Drupal\Core\Config\Config $config */
    $config = $this->configFactory->getEditable($config_name);
    $settings = $config->get('settings');

    // Ensure we have an existing row that the button can be added to.
    if (empty($settings) || !isset($settings['toolbar']['rows']) || !is_array($settings['toolbar']['rows'])) {
      return;
    }

    $overrides = [];
    $button_exists = FALSE;

    foreach ($settings['toolbar']['rows'] as $row) {
      foreach ($row as $group) {
        foreach ($group['items'] as $button) {
          if ($button === 'social_embed') {
            $button_exists = TRUE;
            break 3;
          }
        }
      }
    }

    // If the button already exists we change nothing.
    if (!$button_exists) {
      $row_array_keys = array_keys($settings['toolbar']['rows']);
      $last_row_key = end($row_array_keys);
      // Ensure we add our button at the end of the row.
      // We use count to avoid issues when keys are non-numeric (even though
      // that shouldn't happen). This will break if the keys are non-consecutive
      // (which should also never happen).
      $group_key = count($settings['toolbar']['rows'][$last_row_key]) + 1;

      // Add the button as a new group to the bottom row as the last item.
      $group = [
        'name' => 'Embed',
        'items' => ['social_embed'],
      ];
      $overrides[$config_name]['settings']['toolbar']['rows'][$last_row_key][$group_key] = $group;
    }
  }
1326070
public function set($key, $value, $override = true) {
        if(is_null($key)) return;
        if(!$override && array_key_exists($key, $this->data)) return;
        $this->data[$key] = $value;        
    }
278045
protected function loadOverrides()
    {
        if ($this->overrides === null) {
            $this->overrides = [];

            if ($this->overrideFile !== null) {
                $this->overrides = Craft::$app->getConfig()->getConfigFromFile($this->overrideFile);
            }
        }
    }
621503
public function visible($visible = [], $override = false)
    {
        $this->each(function ($model) use ($visible, $override) {
            /** @var Model $model */
            $model->visible($visible, $override);
        });

        return $this;
    }
33887
private void applyResponseOverrides(PluginResponse httpServletResponse,
                                        HttpServletRequest httpServletRequest, HttpMethod httpMethodProxyRequest, History history) throws Exception {
        RequestInformation requestInfo = requestInformation.get();

        for (EndpointOverride selectedPath : requestInfo.selectedResponsePaths) {
            // check to see if there is custom override data
            // something like
            List<EnabledEndpoint> points = selectedPath.getEnabledEndpoints();
            for (EnabledEndpoint endpoint : points) {
                // skip if the repeat number is 0
                if (endpoint.getRepeatNumber() == 0) {
                    continue;
                }

                // skip if this is a custom override and one has already been applied
                if (endpoint.getOverrideId() == Constants.PLUGIN_RESPONSE_OVERRIDE_CUSTOM &&
                    requestInfo.usedCustomResponse) {
                    continue;
                }

                // decrease repeat number
                endpoint.decrementRepeatNumber();

                if (endpoint.getOverrideId() == Constants.PLUGIN_RESPONSE_OVERRIDE_CUSTOM) {
                    // return custom response
                    String response = endpoint.getArguments()[0].toString();
                    String responseCode = endpoint.getResponseCode();
                    if (responseCode != null && !responseCode.isEmpty()) {
                        httpServletResponse.setStatus(Integer.parseInt(responseCode));
                    }
                    httpServletResponse.setContentType(selectedPath.getContentType());
                    requestInfo.usedCustomResponse = true;
                    requestInfo.modified = true;
                    PluginHelper.writeResponseContent(httpServletResponse, response);
                } else if (endpoint.getOverrideId() == Constants.PLUGIN_RESPONSE_HEADER_OVERRIDE_ADD) {
                    httpServletResponse = (PluginResponse) HttpUtilities.addHeader(httpServletResponse, endpoint.getArguments());
                    requestInfo.modified = true;
                } else if (endpoint.getMethodInformation() != null &&
                    (endpoint.getMethodInformation().getMethodType().equals(Constants.PLUGIN_TYPE_RESPONSE_OVERRIDE) ||
                        endpoint.getMethodInformation().getMethodType().equals(Constants.PLUGIN_TYPE_RESPONSE_OVERRIDE_V2))) {
                    // run method
                    try {
                        com.groupon.odo.proxylib.models.Method methodInfo =
                            PathOverrideService.getInstance().getMethodForEnabledId(endpoint.getOverrideId());

                        logger.info("method = {}", methodInfo);
                        logger.info("Enabled endpoint: {}", methodInfo.getMethodName());
                        logger.info("Calling override for {}",
                                    httpServletRequest.getRequestURL() + "?" + httpServletRequest.getQueryString());

                        // For v1 plugins - verify HTTP code is set correctly
                        if (methodInfo.getOverrideVersion() == 1) {
                            logger.info("Running {}", methodInfo.getMethodName());
                            String responseOutput = (String) PluginManager.getInstance().callFunction(methodInfo.getClassName(), methodInfo.getMethodName(),
                                                                                                      httpServletResponse.getContentString(), endpoint.getArguments());
                            PluginHelper.writeResponseContent(httpServletResponse, responseOutput);

                            if (methodInfo.getHttpCode() != httpServletResponse.getStatus()) {
                                logger.info("Setting HTTP Code to {}", methodInfo.getHttpCode());
                                httpServletResponse.setStatus(methodInfo.getHttpCode());
                                // the server might have set a "Status" header.. so let's reset this too
                                httpServletResponse.setHeader(Constants.HEADER_STATUS,
                                                              Integer.toString(methodInfo.getHttpCode()));
                            }
                        } else if (methodInfo.getOverrideVersion() == 2) {
                            PluginArguments pluginArgs = new PluginArguments(httpServletResponse, requestInfo.originalRequestInfo, httpMethodProxyRequest);

                            PluginManager.getInstance().callFunction(
                                methodInfo.getClassName(), methodInfo.getMethodName(),
                                pluginArgs, endpoint.getArguments());
                        }

                        requestInfo.modified = true;
                        logger.info("Done calling override");
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }
        }

        httpServletResponse.flushBuffer();
    }
499313
public void createOverride(int groupId, String methodName, String className) throws Exception {
        // first make sure this doesn't already exist
        for (Method method : EditService.getInstance().getMethodsFromGroupId(groupId, null)) {
            if (method.getMethodName().equals(methodName) && method.getClassName().equals(className)) {
                // don't add if it already exists in the group
                return;
            }
        }

        try (Connection sqlConnection = sqlService.getConnection()) {
            PreparedStatement statement = sqlConnection.prepareStatement(
                "INSERT INTO " + Constants.DB_TABLE_OVERRIDE
                    + "(" + Constants.OVERRIDE_METHOD_NAME
                    + "," + Constants.OVERRIDE_CLASS_NAME
                    + "," + Constants.OVERRIDE_GROUP_ID
                    + ")"
                    + " VALUES (?, ?, ?)"
            );
            statement.setString(1, methodName);
            statement.setString(2, className);
            statement.setInt(3, groupId);
            statement.executeUpdate();
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
251336
function extendPreventingOverrides (a, b) {
          Object.keys(b).forEach(addContentFromBtoA)
          return a

          function addContentFromBtoA (key) {
            if (a.hasOwnProperty(key)) {
              mergeIntoAnArray(a, b, key)
            } else {
              a[key] = b[key]
            }
          }
        }
846914
function overrideLocEnd(toBeOverriddenNode, toOverrideNode) {
    if (options.originalText[locEnd(toOverrideNode)] === ";") {
      return;
    }
    if (options.parser === "flow") {
      toBeOverriddenNode.range = [
        toBeOverriddenNode.range[0],
        toOverrideNode.range[1]
      ];
    } else {
      toBeOverriddenNode.end = toOverrideNode.end;
    }
    toBeOverriddenNode.loc = Object.assign({}, toBeOverriddenNode.loc, {
      end: toBeOverriddenNode.loc.end
    });
  }
865339
def apply_overrides(request, omap):
        
        if omap:
            for k, v in omap.iteritems():
                o = request.GetElement('overrides').AppendElment()
                o.SetElement('fieldId', k)
                o.SetElement('value', v)
467850
private void visitOverride(AnnotatedNode node, AnnotationNode visited) {
        ClassNode annotationClassNode = visited.getClassNode();
        if (annotationClassNode.isResolved() && annotationClassNode.getName().equals("java.lang.Override")) {
            if (node instanceof MethodNode && !Boolean.TRUE.equals(node.getNodeMetaData(Verifier.DEFAULT_PARAMETER_GENERATED))) {
                boolean override = false;
                MethodNode origMethod = (MethodNode) node;
                ClassNode cNode = origMethod.getDeclaringClass();
                if (origMethod.hasDefaultValue()) {
                    List<MethodNode> variants = cNode.getDeclaredMethods(origMethod.getName());
                    for (MethodNode m : variants) {
                        if (m.getAnnotations().contains(visited) && isOverrideMethod(m)) {
                            override = true;
                            break;
                        }
                    }
                } else {
                    override = isOverrideMethod(origMethod);
                }

                if (!override) {
                    addError("Method '" + origMethod.getName() + "' from class '" + cNode.getName() + "' does not override " +
                            "method from its superclass or interfaces but is annotated with @Override.", visited);
                }
            }
        }
    }
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);
			}

		};

	}
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));
            }
        }
    }