@Override
  public @NotNull Collection<PsiJavaModule> findModules(@NotNull String moduleName, @NotNull GlobalSearchScope scope) {
    JavaFileManager javaFileManager = JavaFileManager.getInstance(myProject);
    //it can be called in dumb mode
    //see com.intellij.psi.impl.JavaPlatformModuleSystem.accessibleFromLoadedModules
    //but in this case it must not be cached!
    if (DumbService.isDumb(myProject) && DumbUtil.getInstance(myProject).mayUseIndices()) {
      return javaFileManager.findModules(moduleName, scope);
    }
    return CachedValuesManager.getManager(myProject)
      .getCachedValue(myProject, () -> {
        Map<GlobalSearchScope, Map<String, Collection<PsiJavaModule>>> scope2ModulesMap =
          ConcurrentFactoryMap.create(searchScope ->
                                        ConcurrentFactoryMap.create(name -> javaFileManager.findModules(name, searchScope), () -> CollectionFactory.createConcurrentWeakValueMap()),
                                      () -> ContainerUtil.createConcurrentSoftKeySoftValueMap());
        return new CachedValueProvider.Result<>(scope2ModulesMap, 
                                                PsiJavaModuleModificationTracker.getInstance(myProject),
                                                ProjectRootModificationTracker.getInstance(myProject));
      })
      .get(scope)
      .get(moduleName);
  }
@Override
  public @NotNull Collection<PsiJavaModule> findModules(@NotNull String moduleName, @NotNull GlobalSearchScope scope)