code: public void mapOverridingMethods() {
      for (String key : elementReferenceMap.keySet()) {
        ReferenceNode node = elementReferenceMap.get(key);
        if (node instanceof MethodReferenceNode) {
          MethodReferenceNode methodNode = (MethodReferenceNode) node;
          if (methodNode.declared && !methodNode.invoked) {
            declaredSet.add(methodNode);
          }
        }
      }
  
      for (MethodReferenceNode derivedNode : declaredSet) {
        String overrideID = ElementReferenceMapper.stitchOverrideMethodIdentifier(
            derivedNode.methodElement, env.typeUtil());
        assert(overrideMap.get(overrideID) != null);
        for (String otherID : overrideMap.get(overrideID)) {
          MethodReferenceNode baseNode = ((MethodReferenceNode) elementReferenceMap.get(otherID));
          if (env.elementUtil().overrides(derivedNode.methodElement, baseNode.methodElement,
              ElementUtil.getDeclaringClass(derivedNode.methodElement))) {
            baseNode.overridingMethods.add(derivedNode.getUniqueID());
          }
        }
      }
    }
docs: Since the MethodInvocation node cannot currently detect invocations of overriding methods,
  (it only detects the top-level method being invoked), this method allows treeshaker to track
  which methods are being overridden. For all relevant methods (that are declared but not
  invoked), checks all other methods with the same overrideID in the overrideMap, and compares
  each pair with the ElementUtil.overrides method.