@Override
  public @Nullable CompilerRef.CompilerClassHierarchyElementDef mayCallOfTypeCast(@NotNull CompilerRef.JavaCompilerMethodRef method,
                                                                                  int probabilityThreshold)
    throws ReferenceIndexUnavailableException {
    try {
      if (!myReadDataLock.tryLock()) return null;
      try {
        if (myReader == null) {
          throw new ReferenceIndexUnavailableException();
        }
        IntSet ids = myReader.getAllContainingFileIds(method);

        CompilerRef.CompilerClassHierarchyElementDef owner = method.getOwner();

        OccurrenceCounter<CompilerRef> bestTypeCast = myReader.getTypeCastOperands(owner, ids);
        CompilerRef best = bestTypeCast.getBest();
        return best != null && ids.size() > probabilityThreshold * (ids.size() - bestTypeCast.getBestOccurrences())
               ? (CompilerRef.CompilerClassHierarchyElementDef)best
               : null;
      }
      finally {
        myReadDataLock.unlock();
      }
    }
    catch (Exception e) {
      onException(e, "conditional probability");
      return null;
    }
  }
@Override
  public @Nullable CompilerRef.CompilerClassHierarchyElementDef mayCallOfTypeCast(@NotNull CompilerRef.JavaCompilerMethodRef method,
                                                                                  int probabilityThreshold)