<commit_before>package com.codingbat.array3;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 * The class Array3Test is contains tests for Array-3 section.
 */
public class Array3Test {

  /** The instance variable to test the not static methods. */
  private static Array3 instance;

  /**
   * Setup before the tests start.
   *
   * @throws Exception the exception if something go wrong
   */
  @BeforeClass
  public static void setUp() throws Exception {
    instance = new Array3();
  }

  /**
   * Tear down after the tests finish.
   *
   * @throws Exception the exception if something go wrong
   */
  @AfterClass
  public static void tearDown() throws Exception {
    instance = null;
  }

  /**
   * Test method for {@link Array3#maxSpan(int[])}.
   */
  @Test
  public void testMaxSpan() {
    Assert.assertEquals(4, instance.maxSpan(new int[] {1, 2, 1, 1, 3}));
    Assert.assertEquals(6, instance.maxSpan(new int[] {1, 4, 2, 1, 4, 1, 4}));
    Assert.assertEquals(6, instance.maxSpan(new int[] {1, 4, 2, 1, 4, 4, 4}));
    Assert.assertEquals(3, instance.maxSpan(new int[] {3, 3, 3}));
    Assert.assertEquals(3, instance.maxSpan(new int[] {3, 9, 3}));
    Assert.assertEquals(2, instance.maxSpan(new int[] {3, 9, 9}));
    Assert.assertEquals(1, instance.maxSpan(new int[] {3, 9,}));
    Assert.assertEquals(2, instance.maxSpan(new int[] {3, 3}));
    Assert.assertEquals(0, instance.maxSpan(new int[] {}));
    Assert.assertEquals(1, instance.maxSpan(new int[] {1}));
  }

  /**
   * Test method for {@link Array3#fix34(int[])}.
   */
  @Test
  public void testFix34() {
    Assert.assertArrayEquals(new int[] {1, 3, 4, 1}, instance.fix34(new int[] {1, 3, 1, 4}));
    Assert.assertArrayEquals(new int[] {1, 3, 4, 1, 1, 3, 4},
        instance.fix34(new int[] {1, 3, 1, 4, 4, 3, 1}));
    Assert.assertArrayEquals(new int[] {3, 4, 2, 2}, instance.fix34(new int[] {3, 2, 2, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 3, 4, 2, 2},
        instance.fix34(new int[] {3, 2, 3, 2, 4, 4}));
    Assert.assertArrayEquals(new int[] {2, 3, 4, 3, 4, 2, 2},
        instance.fix34(new int[] {2, 3, 2, 3, 2, 4, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 1}, instance.fix34(new int[] {3, 1, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 1}, instance.fix34(new int[] {3, 4, 1}));
    Assert.assertArrayEquals(new int[] {1, 1, 1}, instance.fix34(new int[] {1, 1, 1}));
    Assert.assertArrayEquals(new int[] {1}, instance.fix34(new int[] {1}));
    Assert.assertArrayEquals(new int[] {}, instance.fix34(new int[] {}));
    Assert.assertArrayEquals(new int[] {7, 3, 4, 7, 7}, instance.fix34(new int[] {7, 3, 7, 7, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 1, 3, 4, 1},
        instance.fix34(new int[] {3, 1, 4, 3, 1, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 1, 3, 4, 1},
        instance.fix34(new int[] {3, 1, 1, 3, 4, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 2, 3, 4, 1},
        instance.fix34(new int[] {3, 1, 2, 3, 4, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 2, 5, 1}, instance.fix34(new int[] {3, 1, 2, 5, 4}));
  }<commit_msg>Reduce visibility.<commit_after>package com.codingbat.array3;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 * The class Array3Test is contains tests for Array-3 section.
 */
public class Array3Test {

  /** The instance variable to test the not static methods. */
  private static Array3 instance;

  /**
   * Setup before the tests start.
   *
   * @throws Exception the exception if something go wrong
   */
  @BeforeClass
  public static void setUp() throws Exception {
    instance = new Array3();
  }

  /**
   * Tear down after the tests finish.
   *
   * @throws Exception the exception if something go wrong
   */
  @AfterClass
  public static void tearDown() throws Exception {
    instance = null;
  }

  /**
   * Test method for {@link Array3#maxSpan(int[])}.
   */
  @Test
  void testMaxSpan() {
    Assert.assertEquals(4, instance.maxSpan(new int[] {1, 2, 1, 1, 3}));
    Assert.assertEquals(6, instance.maxSpan(new int[] {1, 4, 2, 1, 4, 1, 4}));
    Assert.assertEquals(6, instance.maxSpan(new int[] {1, 4, 2, 1, 4, 4, 4}));
    Assert.assertEquals(3, instance.maxSpan(new int[] {3, 3, 3}));
    Assert.assertEquals(3, instance.maxSpan(new int[] {3, 9, 3}));
    Assert.assertEquals(2, instance.maxSpan(new int[] {3, 9, 9}));
    Assert.assertEquals(1, instance.maxSpan(new int[] {3, 9,}));
    Assert.assertEquals(2, instance.maxSpan(new int[] {3, 3}));
    Assert.assertEquals(0, instance.maxSpan(new int[] {}));
    Assert.assertEquals(1, instance.maxSpan(new int[] {1}));
  }

  /**
   * Test method for {@link Array3#fix34(int[])}.
   */
  @Test
  void testFix34() {
    Assert.assertArrayEquals(new int[] {1, 3, 4, 1}, instance.fix34(new int[] {1, 3, 1, 4}));
    Assert.assertArrayEquals(new int[] {1, 3, 4, 1, 1, 3, 4},
        instance.fix34(new int[] {1, 3, 1, 4, 4, 3, 1}));
    Assert.assertArrayEquals(new int[] {3, 4, 2, 2}, instance.fix34(new int[] {3, 2, 2, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 3, 4, 2, 2},
        instance.fix34(new int[] {3, 2, 3, 2, 4, 4}));
    Assert.assertArrayEquals(new int[] {2, 3, 4, 3, 4, 2, 2},
        instance.fix34(new int[] {2, 3, 2, 3, 2, 4, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 1}, instance.fix34(new int[] {3, 1, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 1}, instance.fix34(new int[] {3, 4, 1}));
    Assert.assertArrayEquals(new int[] {1, 1, 1}, instance.fix34(new int[] {1, 1, 1}));
    Assert.assertArrayEquals(new int[] {1}, instance.fix34(new int[] {1}));
    Assert.assertArrayEquals(new int[] {}, instance.fix34(new int[] {}));
    Assert.assertArrayEquals(new int[] {7, 3, 4, 7, 7}, instance.fix34(new int[] {7, 3, 7, 7, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 1, 3, 4, 1},
        instance.fix34(new int[] {3, 1, 4, 3, 1, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 1, 3, 4, 1},
        instance.fix34(new int[] {3, 1, 1, 3, 4, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 2, 3, 4, 1},
        instance.fix34(new int[] {3, 1, 2, 3, 4, 4}));
    Assert.assertArrayEquals(new int[] {3, 4, 2, 5, 1}, instance.fix34(new int[] {3, 1, 2, 5, 4}));
  }
{'fraction_non_alphanumeric': 0.18974521285013451, 'fraction_numerical': 0.06868175344200032, 'mean_word_length': 3.4854506742370477, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3299939', 'n_tokens_mistral': 2597, 'n_tokens_neox': 2301, 'n_words': 707}