<commit_before>package com.continuuity.internal.app.runtime;

import com.continuuity.api.data.DataSet;
import com.continuuity.api.data.OperationException;
import com.continuuity.data.dataset.DataSetContext;
import com.google.common.collect.ImmutableMap;

import java.util.Map;

/**
 * Helper to create DataSets
 */
public final class DataSets {

  public static Map<String, DataSet> createDataSets(DataSetContext context,
                                                    Iterable<String> datasets) {
    ImmutableMap.Builder<String, DataSet> builder = ImmutableMap.builder();

    for (String dataset : datasets) {
      if (context.hasDataSet(dataset)){
        builder.put(dataset, context.getDataSet(dataset));
      }
    }
    return builder.build();
  }

  private DataSets() {}


}<commit_msg> +review CR-66 ENG-2176  Remove hasDataSet call<commit_after>package com.continuuity.internal.app.runtime;

import com.continuuity.api.data.DataSet;
import com.continuuity.api.data.OperationException;
import com.continuuity.data.dataset.DataSetContext;
import com.google.common.collect.ImmutableMap;

import java.util.Map;

/**
 * Helper to create DataSets
 */
public final class DataSets {

  public static Map<String, DataSet> createDataSets(DataSetContext context,
                                                    Iterable<String> datasets) {
    ImmutableMap.Builder<String, DataSet> builder = ImmutableMap.builder();

    for (String dataset : datasets) {
        builder.put(dataset, context.getDataSet(dataset));
    }
    return builder.build();
  }

  private DataSets() {}


}
{'fraction_non_alphanumeric': 0.10552763819095477, 'fraction_numerical': 0.0037688442211055275, 'mean_word_length': 3.2593582887700534, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6540704', 'n_tokens_mistral': 452, 'n_tokens_neox': 448, 'n_words': 92}