<commit_before>package froop.db.jdbc;

import froop.db.testutil.DBUnitForJUnit4;
import org.dbunit.Assertion;
import org.dbunit.JdbcDatabaseTester;
import org.dbunit.dataset.DataSetException;
import org.dbunit.dataset.IDataSet;
import org.dbunit.dataset.ITable;
import org.dbunit.dataset.ReplacementDataSet;
import org.dbunit.dataset.filter.DefaultColumnFilter;
import org.dbunit.dataset.xml.FlatXmlDataSetBuilder;
import org.dbunit.operation.DatabaseOperation;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;

import java.io.InputStream;
import java.sql.SQLException;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

public class JUnit4JdbcSampleTest {

  @Rule
  public final DBUnitForJUnit4 dbUnit;

  private JdbcSample target;

  public JUnit4JdbcSampleTest() throws ClassNotFoundException, DataSetException {
    this.dbUnit = new DBUnitForJUnit4(
        new JdbcDatabaseTester("org.apache.derby.jdbc.EmbeddedDriver", "jdbc:derby:data/derby/sample", "", ""),
        DatabaseOperation.CLEAN_INSERT, null, createDataSet(this.getClass().getResourceAsStream("Sample.xml")), null);
  }

  @Before
  public void setUp() throws Exception {
    target = new JdbcSample();
  }

  @Test
  public void testSelectNameById() throws SQLException {
    assertThat(target.selectNameById(1).get(), is("name1"));
  }

  @Test
  public void testUpdate() throws Exception {<commit_msg>refactoring remove not use parameters<commit_after>package froop.db.jdbc;

import froop.db.testutil.DBUnitForJUnit4;
import org.dbunit.Assertion;
import org.dbunit.JdbcDatabaseTester;
import org.dbunit.dataset.DataSetException;
import org.dbunit.dataset.IDataSet;
import org.dbunit.dataset.ITable;
import org.dbunit.dataset.ReplacementDataSet;
import org.dbunit.dataset.filter.DefaultColumnFilter;
import org.dbunit.dataset.xml.FlatXmlDataSetBuilder;
import org.dbunit.operation.DatabaseOperation;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;

import java.io.InputStream;
import java.sql.SQLException;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

public class JUnit4JdbcSampleTest {

  @Rule
  public final DBUnitForJUnit4 dbUnit;

  private JdbcSample target;

  public JUnit4JdbcSampleTest() throws ClassNotFoundException, DataSetException {
    this.dbUnit = new DBUnitForJUnit4(
        new JdbcDatabaseTester("org.apache.derby.jdbc.EmbeddedDriver", "jdbc:derby:data/derby/sample"),
        DatabaseOperation.CLEAN_INSERT, null, createDataSet(this.getClass().getResourceAsStream("Sample.xml")), null);
  }

  @Before
  public void setUp() throws Exception {
    target = new JdbcSample();
  }

  @Test
  public void testSelectNameById() throws SQLException {
    assertThat(target.selectNameById(1).get(), is("name1"));
  }

  @Test
  public void testUpdate() throws Exception {
{'fraction_non_alphanumeric': 0.10318559556786704, 'fraction_numerical': 0.004847645429362881, 'mean_word_length': 5.434298440979956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '4935378', 'n_tokens_mistral': 912, 'n_tokens_neox': 903, 'n_words': 178}