<commit_before>package com.workerbee.example;

import com.workerbee.Database;
import com.workerbee.MigrationGenerator;
import com.workerbee.Table;
import com.workerbee.example.baseball.Batting;
import com.workerbee.dr.SelectQuery;

import java.io.File;
import java.io.IOException;
import java.sql.SQLException;

import static com.workerbee.QueryGenerator.select;
import static com.workerbee.dr.SelectFunctionGenerator.max;

public class BaseBall extends Database {
  public static final BaseBall db = new BaseBall();

  private BaseBall() {
    super("BaseBall", "BaseBall database");
  }

  public static SelectQuery highestScoreForEachYear() {
    return select(Batting.year, max(Batting.runs))
      .from(Batting.tb)
      .groupBy(Batting.year)
      .ascOrderOf(Batting.year);
  }

  public static SelectQuery playerWithHighestScoreForEachYear() {
    SelectQuery selectQuery = highestScoreForEachYear().as("MaxRunsForEachYear");

    Table<Table> maxRunsForEachYear = selectQuery.table();

    return select(Batting.playerId, Batting.year, Batting.runs).from(Batting.tb)
      .join(selectQuery)
      .on(Batting.year.eq(maxRunsForEachYear.getColumn(Batting.year))
          .and(Batting.runs.eq(maxRunsForEachYear.getColumn(Batting.runs)))
      );
  }

  public static void main(String[] args) throws IOException, SQLException {
    if (args.length < 1){
      System.out.println("Please provide first argument as migration directory.");
      return;
    }

    File migrationDirectory = new File(args[0]);

    if (!migrationDirectory.exists() || !migrationDirectory.isDirectory()){
      System.out.println("Please provide first argument as migration directory.");
      return;
    }

    Table t = Batting.tb;
    MigrationGenerator.generateFilesFor(BaseBall.db, migrationDirectory);
  }
}<commit_msg>Adding duplicate statement for adding table to a database, to make MigrationGenerator happy.<commit_after>package com.workerbee.example;

import com.workerbee.Database;
import com.workerbee.MigrationGenerator;
import com.workerbee.Table;
import com.workerbee.example.baseball.Batting;
import com.workerbee.dr.SelectQuery;

import java.io.File;
import java.io.IOException;
import java.sql.SQLException;

import static com.workerbee.QueryGenerator.select;
import static com.workerbee.dr.SelectFunctionGenerator.max;

public class BaseBall extends Database {
  public static final BaseBall db = new BaseBall();

  static {
    db.havingTable(Batting.tb);
  }

  private BaseBall() {
    super("BaseBall", "BaseBall database");
  }

  public static SelectQuery highestScoreForEachYear() {
    return select(Batting.year, max(Batting.runs))
      .from(Batting.tb)
      .groupBy(Batting.year)
      .ascOrderOf(Batting.year);
  }

  public static SelectQuery playerWithHighestScoreForEachYear() {
    SelectQuery selectQuery = highestScoreForEachYear().as("MaxRunsForEachYear");

    Table<Table> maxRunsForEachYear = selectQuery.table();

    return select(Batting.playerId, Batting.year, Batting.runs).from(Batting.tb)
      .join(selectQuery)
      .on(Batting.year.eq(maxRunsForEachYear.getColumn(Batting.year))
          .and(Batting.runs.eq(maxRunsForEachYear.getColumn(Batting.runs)))
      );
  }

  public static void main(String[] args) throws IOException, SQLException {
    if (args.length < 1){
      System.out.println("Please provide first argument as migration directory.");
      return;
    }

    File migrationDirectory = new File(args[0]);

    if (!migrationDirectory.exists() || !migrationDirectory.isDirectory()){
      System.out.println("Please provide first argument as migration directory.");
      return;
    }

    MigrationGenerator.generateFilesFor(BaseBall.db, migrationDirectory);
  }
}
{'fraction_non_alphanumeric': 0.10929547281007233, 'fraction_numerical': 0.0010715242432360033, 'mean_word_length': 4.319088319088319, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '3868873', 'n_tokens_mistral': 1130, 'n_tokens_neox': 1090, 'n_words': 225}