@Override
  public @Nullable ChainOpAndOccurrences<TypeCast> getMostUsedTypeCast(@NotNull String operandQName)
    throws ReferenceIndexUnavailableException {
    try {
      if (!myReadDataLock.tryLock()) {
        return null;
      }
      try {
        if (myReader == null) {
          throw new ReferenceIndexUnavailableException();
        }
        int nameId = getNameId(operandQName);
        if (nameId == 0) return null;
        CompilerRef.JavaCompilerClassRef target = new CompilerRef.JavaCompilerClassRef(nameId);
        OccurrenceCounter<CompilerRef> typeCasts = myReader.getTypeCastOperands(target, null);
        CompilerRef bestCast = typeCasts.getBest();
        if (bestCast == null) return null;
        return new ChainOpAndOccurrences<>(new TypeCast((CompilerRef.CompilerClassHierarchyElementDef)bestCast, target, this),
                                           typeCasts.getBestOccurrences());
      }
      finally {
        myReadDataLock.unlock();
      }
    }
    catch (Exception e) {
      onException(e, "best type cast search");
      return null;
    }
  }
@Override
  public @Nullable ChainOpAndOccurrences<TypeCast> getMostUsedTypeCast(@NotNull String operandQName)