private static @NotNull List<? extends FilePatch> createFilePatchesFromShelf(@NotNull Project project,
                                                                               @NotNull Path basePath,
                                                                               @NotNull ShelvedChangeList shelvedList,
                                                                               @Nullable Collection<String> selectedPaths) {
    try {
      List<TextFilePatch> textFilePatches = ShelveChangesManager.loadPatches(project, shelvedList.getPath(), null);
      List<TextFilePatch> result = ContainerUtil.isEmpty(selectedPaths) ? textFilePatches : ContainerUtil.filter(textFilePatches, patch -> {
        return selectedPaths.contains(patch.getAfterName());
      });
      mapPatchesToNewBase(ProjectKt.getStateStore(project).getProjectBasePath(), basePath, result);
      return result;
    }
    catch (Exception exception) {
      LOG.error(exception);
      return Collections.emptyList();
    }
  }
private static @NotNull List<? extends FilePatch> createFilePatchesFromShelf(@NotNull Project project,
                                                                               @NotNull Path basePath,
                                                                               @NotNull ShelvedChangeList shelvedList,
                                                                               @Nullable Collection<String> selectedPaths)