public static boolean isPatchedModuleRoot(@NotNull String targetModuleName, @NotNull Module module, @NotNull VirtualFile root) {
    List<String> options = getAdditionalOptions(module.getProject(), module);
    if (options.isEmpty()) {
      return false;
    }

    String prefix = targetModuleName + "=";
    for (String option : optionValues(options, PATCH_MODULE_OPTION)) {
      if (option.startsWith(prefix)) {
        String[] patchingPaths = option.substring(prefix.length()).split(File.pathSeparator);
        for (String patchingPath : patchingPaths) {
          if (VfsUtilCore.pathEqualsTo(root, FileUtil.toSystemIndependentName(patchingPath))) {
            return true;
          }
        }
      }
    }
    return false;
  }
public static boolean isPatchedModuleRoot(@NotNull String targetModuleName, @NotNull Module module, @NotNull VirtualFile root)