<commit_before>package edu.brandeis.cs.steele.util;

import junit.framework.JUnit4TestAdapter;
import org.junit.*;
import static org.junit.Assert.*;
import java.util.*;

public class MultiLevelIterableTest {

  @Test
  public void test1() {
    final List<Integer> empty = Collections.emptyList();
    final List<List<Integer>> emptyEmpty = new ArrayList<List<Integer>>();
    emptyEmpty.add(Collections.<Integer>emptyList());
    assertEquals(empty, list(MultiLevelIterable.of(emptyEmpty)));
    final List<Integer> ints1 = Arrays.asList(1,2,3);
    final List<Integer> ints2 = Arrays.asList(1,2,4);
    final List<List<Integer>> ints1Ints2 = Arrays.asList(ints1, ints2);
    final List<Integer> merged = Arrays.asList(1,2,3,1,2,4);
    assertEquals(merged, list(MultiLevelIterable.of(ints1Ints2)));
    final List<List<Integer>> ints1EmptyEmptyInts2 = Arrays.asList(ints1, empty, empty, ints2);
    assertEquals(merged, list(MultiLevelIterable.of(ints1EmptyEmptyInts2)));
    final List<List<Integer>> emptyInts1EmptyEmptyInts2Empty = 
      Arrays.asList(empty, ints1, empty, empty, ints2, empty);
    assertEquals(merged, list(MultiLevelIterable.of(emptyInts1EmptyEmptyInts2Empty)));
  }

  static <T> ArrayList<T> list(final Iterable<T> sequence) {
    final ArrayList<T> list = new ArrayList<T>();
    for (final T t : sequence) {
      list.add(t);
    }
    return list;
  }

  public static junit.framework.Test suite() {
    return new JUnit4TestAdapter(MultiLevelIterableTest.class);
  }
}
<commit_msg>unused import<commit_after>package edu.brandeis.cs.steele.util;

import org.junit.*;
import static org.junit.Assert.*;
import java.util.*;

public class MultiLevelIterableTest {

  @Test
  public void test1() {
    final List<Integer> empty = Collections.emptyList();
    final List<List<Integer>> emptyEmpty = new ArrayList<List<Integer>>();
    emptyEmpty.add(Collections.<Integer>emptyList());
    assertEquals(empty, list(MultiLevelIterable.of(emptyEmpty)));
    final List<Integer> ints1 = Arrays.asList(1,2,3);
    final List<Integer> ints2 = Arrays.asList(1,2,4);
    final List<List<Integer>> ints1Ints2 = Arrays.asList(ints1, ints2);
    final List<Integer> merged = Arrays.asList(1,2,3,1,2,4);
    assertEquals(merged, list(MultiLevelIterable.of(ints1Ints2)));
    final List<List<Integer>> ints1EmptyEmptyInts2 = Arrays.asList(ints1, empty, empty, ints2);
    assertEquals(merged, list(MultiLevelIterable.of(ints1EmptyEmptyInts2)));
    final List<List<Integer>> emptyInts1EmptyEmptyInts2Empty = 
      Arrays.asList(empty, ints1, empty, empty, ints2, empty);
    assertEquals(merged, list(MultiLevelIterable.of(emptyInts1EmptyEmptyInts2Empty)));
  }

  static <T> ArrayList<T> list(final Iterable<T> sequence) {
    final ArrayList<T> list = new ArrayList<T>();
    for (final T t : sequence) {
      list.add(t);
    }
    return list;
  }
}

{'fraction_non_alphanumeric': 0.13423988842398885, 'fraction_numerical': 0.023709902370990237, 'mean_word_length': 5.04, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6818369', 'n_tokens_mistral': 980, 'n_tokens_neox': 961, 'n_words': 182}