Sub-classes need to override this method (as of 1.8)
484532
@Override
    public MatchStrength hasFormat(InputAccessor acc) throws IOException
    {
        if (!acc.hasMoreBytes()) {
            return MatchStrength.INCONCLUSIVE;
        }
        byte b = acc.nextByte();
        // Very first thing, a UTF-8 BOM?
        if (b == UTF8_BOM_1) { // yes, looks like UTF-8 BOM
            if (!acc.hasMoreBytes()) {
                return MatchStrength.INCONCLUSIVE;
            }
            if (acc.nextByte() != UTF8_BOM_2) {
                return MatchStrength.NO_MATCH;
            }
            if (!acc.hasMoreBytes()) {
                return MatchStrength.INCONCLUSIVE;
            }
            if (acc.nextByte() != UTF8_BOM_3) {
                return MatchStrength.NO_MATCH;
            }
            if (!acc.hasMoreBytes()) {
                return MatchStrength.INCONCLUSIVE;
            }
            b = acc.nextByte();
        }
        if (b == '{' || Character.isLetter((char) b) || Character.isDigit((char) b)) {
            return MatchStrength.WEAK_MATCH;
        }
        return MatchStrength.INCONCLUSIVE;
    }
848069
private void visitOverride(AnnotatedNode node, AnnotationNode visited) {
        ClassNode annotationClassNode = visited.getClassNode();
        if (annotationClassNode.isResolved() && annotationClassNode.getName().equals("java.lang.Override")) {
            if (node instanceof MethodNode) {
                MethodNode origMethod = (MethodNode) node;
                ClassNode cNode = node.getDeclaringClass();
                ClassNode next = cNode;
                outer:
                while (next != null) {
                    Map genericsSpec = createGenericsSpec(next);
                    MethodNode mn = correctToGenericsSpec(genericsSpec, origMethod);
                    if (next != cNode) {
                        ClassNode correctedNext = correctToGenericsSpecRecurse(genericsSpec, next);
                        MethodNode found = getDeclaredMethodCorrected(genericsSpec, mn, correctedNext);
                        if (found != null) break;
                    }
                    List<ClassNode> ifaces = new ArrayList<ClassNode>();
                    ifaces.addAll(Arrays.asList(next.getInterfaces()));
                    Map updatedGenericsSpec = new HashMap(genericsSpec);
                    while (!ifaces.isEmpty()) {
                        ClassNode origInterface = ifaces.remove(0);
                        if (!origInterface.equals(ClassHelper.OBJECT_TYPE)) {
                            updatedGenericsSpec = createGenericsSpec(origInterface, updatedGenericsSpec);
                            ClassNode iNode = correctToGenericsSpecRecurse(updatedGenericsSpec, origInterface);
                            MethodNode found2 = getDeclaredMethodCorrected(updatedGenericsSpec, mn, iNode);
                            if (found2 != null) break outer;
                            ifaces.addAll(Arrays.asList(iNode.getInterfaces()));
                        }
                    }
                    ClassNode superClass = next.getUnresolvedSuperClass();
                    if (superClass!=null) {
                        next =  correctToGenericsSpecRecurse(updatedGenericsSpec, superClass);
                    } else {
                        next = null;
                    }
                }
                if (next == null) {
                    addError("Method '" + origMethod.getName() + "' from class '" + cNode.getName() + "' does not override " +
                            "method from its superclass or interfaces but is annotated with @Override.", visited);
                }
            }
        }
    }
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;
    }
197245
public static boolean methodCanBeOverridden(MethodSymbol methodSymbol) {
    if (methodSymbol.getModifiers().contains(Modifier.ABSTRACT)) {
      return true;
    }

    if (methodSymbol.isStatic()
        || methodSymbol.isPrivate()
        || isFinal(methodSymbol)
        || methodSymbol.isConstructor()) {
      return false;
    }

    ClassSymbol classSymbol = (ClassSymbol) methodSymbol.owner;
    return !isFinal(classSymbol) && !classSymbol.isAnonymous();
  }
1011464
function override (server) {
  ['trace', 'log', 'info', 'warn', 'error'].forEach(method => {
    const target = method === 'log' ? 'debug' : method
    console[method] = wrapper.bind(undefined, server, target)
  })
}
494912
private void overrideUseArtifactoryGradlePlugin(T overrider, Class overriderClass) {
        if (overriderClass.getSimpleName().equals(ArtifactoryGradleConfigurator.class.getSimpleName())) {
            try {
                Field useArtifactoryGradlePluginField = overriderClass.getDeclaredField("useArtifactoryGradlePlugin");
                useArtifactoryGradlePluginField.setAccessible(true);
                Object useArtifactoryGradlePlugin = useArtifactoryGradlePluginField.get(overrider);

                if (useArtifactoryGradlePlugin == null) {
                    Field skipInjectInitScriptField = overriderClass.getDeclaredField("skipInjectInitScript");
                    skipInjectInitScriptField.setAccessible(true);
                    Object skipInjectInitScript = skipInjectInitScriptField.get(overrider);
                    if (skipInjectInitScript instanceof Boolean && skipInjectInitScript != null) {
                        useArtifactoryGradlePluginField.set(overrider, skipInjectInitScript);
                    }
                }
            } catch (NoSuchFieldException | IllegalAccessException e) {
                converterErrors.add(getConversionErrorMessage(overrider, e));
            }
        }
    }
467083
@Override
    public void visitMethod(Method obj) {
        if (!obj.isAbstract())
            return;

        String methodName = obj.getName();
        String methodSig = obj.getSignature();
        outer: for (JavaClass cls : superClasses) {
            Method[] methods = cls.getMethods();
            for (Method m : methods) {
                if (m.isPrivate() || m.isAbstract())
                    continue;
                if (methodName.equals(m.getName()) && methodSig.equals(m.getSignature())) {
                    BugInstance bug = new BugInstance(this, BugType.AOM_ABSTRACT_OVERRIDDEN_METHOD.name(), NORMAL_PRIORITY).addClass(this).addMethod(this);

                    Code code = obj.getCode();
                    if (code != null)
                        bug.addSourceLineRange(clsContext, this, 0, code.getLength() - 1);
                    bugReporter.reportBug(bug);

                    break outer;
                }
            }
        }
    }
1057355
def override(klass):
    

    namespace = klass.__module__.rsplit(".", 1)[-1]
    mod_name = const.PREFIX[-1] + "." + namespace
    module = sys.modules[mod_name]

    if isinstance(klass, types.FunctionType):
        def wrap(wrapped):
            setattr(module, klass.__name__, wrapped)
            return wrapped
        return wrap

    old_klass = klass.__mro__[1]
    name = old_klass.__name__
    klass.__name__ = name
    klass.__module__ = old_klass.__module__

    setattr(module, name, klass)

    return klass
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();
        }
    }
885891
def override_spec(cls, **kwargs):
        """"""
        cls._default_spec.set(**kwargs)
        cls.spec.set(**kwargs)
1264323
private void checkFinalClassOverrides(Node ctor) {
    if (!isFunctionOrClass(ctor)) {
      return;
    }

    JSType type = ctor.getJSType().toMaybeFunctionType();
    if (type != null && type.isConstructor()) {
      JSType finalParentClass = getSuperClassInstanceIfFinal(bestInstanceTypeForMethodOrCtor(ctor));
      if (finalParentClass != null) {
        compiler.report(
            JSError.make(
                ctor,
                EXTEND_FINAL_CLASS,
                type.getDisplayName(),
                finalParentClass.getDisplayName()));
      }
    }
  }
177311
def _superclass_hooks
      hooks = { before: {}, after: {} }
      ancestors.reverse.each do |ancestor|
        next if ancestor == self
        hooks = hooks.deep_merge(ancestor.send(:_hooks)) if ancestor.respond_to?(:_hooks)
      end
      hooks
    end
300591
def _subclass_must_implement(self, fn):
        
        m = "Missing function implementation in {}: {}".format(type(self), fn)
        return NotImplementedError(m)
600407
function overrideSelector(selectorContext) {
    selectorContext.overrideKeys[selectorContext.sourceKey] = true;
    selectorContext.sourceKeys[selectorContext.sourceKey] = selectorContext.targetKey;
}
647508
private void addSuperClass(Object object, Class<?> type)
    {
        for (final Class<?> types : type.getInterfaces())
        {
            addType(types, object);
        }
        final Class<?> parent = type.getSuperclass();
        if (parent != null)
        {
            addSuperClass(object, parent);
        }
    }
88263
private boolean overridingMethodFound(MethodDoc method) {
        ClassDoc containingClass = method.containingClass();
        for (MethodDoc listmethod : methlist) {
            if (containingClass == listmethod.containingClass()) {
                // it's the same method.
                return true;
            }
            ClassDoc cd = listmethod.overriddenClass();
            if (cd == null) {
                continue;
            }
            if (cd == containingClass || cd.subclassOf(containingClass)) {
                return true;
            }
        }
        return false;
    }
1234660
public boolean overrides(ExecutableElement e1, ExecutableElement e2, TypeElement cls) {
        MethodSymbol rider = (MethodSymbol)e1;
        MethodSymbol ridee = (MethodSymbol)e2;
        ClassSymbol origin = (ClassSymbol)cls;

        return rider.name == ridee.name &&

               // not reflexive as per JLS
               rider != ridee &&

               // we don't care if ridee is static, though that wouldn't
               // compile
               !rider.isStatic() &&

               // Symbol.overrides assumes the following
               ridee.isMemberOf(origin, toolEnv.getTypes()) &&

               // check access, signatures and check return types
               rider.overrides(ridee, origin, toolEnv.getTypes(), true);
    }