private static boolean hasEqualSourceRootTypes(@NotNull List<FileTargetContextWrapper> wrappers) {
    if (wrappers.size() <= 1) {
      return true;
    }

    JpsModuleSourceRootType<?> sourceRootType = null;
    for (FileTargetContextWrapper item : wrappers) {
      JpsModuleSourceRootType<?> itemSourceRootType = item.getSourceRootType();
      if (sourceRootType == null) {
        if (itemSourceRootType != null) {
          sourceRootType = itemSourceRootType;
        }
      }
      else if (sourceRootType != itemSourceRootType) {
        return false;
      }
    }

    return true;
  }
private static boolean hasEqualSourceRootTypes(@NotNull List<FileTargetContextWrapper> wrappers)