code: Symbol binaryQualifier(Symbol sym, Type site) {
  
          if (site.hasTag(ARRAY)) {
              if (sym == syms.lengthVar ||
                  sym.owner != syms.arrayClass)
                  return sym;
              // array clone can be qualified by the array type in later targets
              Symbol qualifier = new ClassSymbol(Flags.PUBLIC, site.tsym.name,
                                                 site, syms.noSymbol);
              return sym.clone(qualifier);
          }
  
          if (sym.owner == site.tsym ||
              (sym.flags() & (STATIC | SYNTHETIC)) == (STATIC | SYNTHETIC)) {
              return sym;
          }
  
          // leave alone methods inherited from Object
          // JLS 13.1.
          if (sym.owner == syms.objectType.tsym)
              return sym;
  
          return sym.clone(site.tsym);
      }
docs: Construct a symbol to reflect the qualifying type that should
  appear in the byte code as per JLS 13.1.
  
  For {@literal target >= 1.2}: Clone a method with the qualifier as owner (except
  for those cases where we need to work around VM bugs).
  
  For {@literal target <= 1.1}: If qualified variable or method is defined in a
  non-accessible class, clone it with the qualifier class as owner.
  
  @param sym    The accessed symbol
  @param site   The qualifier's type.