code: public static Collection<? extends Artifact> filter(Collection<Artifact> artifacts) {
          LinkedHashSet<Artifact> set = new LinkedHashSet<>();
          for (Artifact artifact : artifacts) {
              if (MavenArtifact.isValid(artifact)) {
                  set.add(artifact);
              }
          }
          return set;
      }
docs: Removes non valid artifacts from the given list.
  
  @param artifacts the list of artifacts than may contain fake artifacts.
  @return the cleaned up list