<commit_before>package com.sudoku.data.model;

import java.sql.Timestamp;
import java.util.*;

public class Grid {
  private UUID id;
  private String title;
  private String description;
  private int difficulty;
  private boolean published;
  private List<Comment> comments;
  private List<Tag> tags;
  private Cell[][] grid;
  private User createUser;
  private String createPseudo;
  private String createSalt; // Salt of the creator used as an UUID
  private Date createDate;
  private Date updateDate;

  private Grid() {
  }

  public Grid(String t, User u) {
    id = UUID.randomUUID();
    title = t;
    description = "";
    difficulty = 0;
    published = false;
    comments = new ArrayList<>();
    tags = new ArrayList<>();

    grid = new Cell[9][9];
    for (byte i = 0; i < 9; i++) {
      for (byte j = 0; j < 9; j++) {
        grid[i][j] = new EmptyCell(i, j);
      }
    }
    createUser = u;
    createPseudo = u.getPseudo();
    createSalt = u.getSalt();
    Calendar cal = new GregorianCalendar();
    createDate = cal.getTime();
    updateDate = createDate;

  }

  public static Grid buildFromAvroGrid(com.sudoku.comm.generated.Grid grid) {
    Grid resultGrid = new Grid();
    resultGrid.id = UUID.fromString(grid.getId());
    resultGrid.title = grid.getTitle();
    resultGrid.description = grid.getDescription();
    resultGrid.difficulty = grid.getDifficulty();
    resultGrid.published = grid.getPublished();
    resultGrid.createDate = Timestamp.valueOf(grid.getCreateDate());
    resultGrid.updateDate = Timestamp.valueOf(grid.getUpdateDate());
    resultGrid.createUser = User.buildFromAvroUser(grid.getCreateUser());<commit_msg>Quick push to fix compiling<commit_after>package com.sudoku.data.model;

import java.sql.Timestamp;
import java.util.*;

public class Grid {
  private UUID id;
  private String title;
  private String description;
  private int difficulty;
  private boolean published;
  private List<Comment> comments;
  private List<Tag> tags;
  private Cell[][] grid;
  private User createUser;
  private String createPseudo;
  private String createSalt; // Salt of the creator used as an UUID
  private Date createDate;
  private Date updateDate;

  public Grid() {
  }

  public Grid(String t, User u) {
    id = UUID.randomUUID();
    title = t;
    description = "";
    difficulty = 0;
    published = false;
    comments = new ArrayList<>();
    tags = new ArrayList<>();

    grid = new Cell[9][9];
    for (byte i = 0; i < 9; i++) {
      for (byte j = 0; j < 9; j++) {
        grid[i][j] = new EmptyCell(i, j);
      }
    }
    createUser = u;
    try{
        createPseudo = u.getPseudo();
        createSalt = u.getSalt();
    }
    catch(NullPointerException e){
        createPseudo = "";
        createSalt = "" ;
    }
    createPseudo = u.getPseudo();
    createSalt = u.getSalt();
    Calendar cal = new GregorianCalendar();
    createDate = cal.getTime();
    updateDate = createDate;

  }

  public static Grid buildFromAvroGrid(com.sudoku.comm.generated.Grid grid) {
    Grid resultGrid = new Grid();
    resultGrid.id = UUID.fromString(grid.getId());
    resultGrid.title = grid.getTitle();
    resultGrid.description = grid.getDescription();
    resultGrid.difficulty = grid.getDifficulty();
    resultGrid.published = grid.getPublished();
    resultGrid.createDate = Timestamp.valueOf(grid.getCreateDate());
    resultGrid.updateDate = Timestamp.valueOf(grid.getUpdateDate());
    resultGrid.createUser = User.buildFromAvroUser(grid.getCreateUser());
{'fraction_non_alphanumeric': 0.12195121951219512, 'fraction_numerical': 0.003970504821327283, 'mean_word_length': 3.264812575574365, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 11, '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': '1768328', 'n_tokens_mistral': 1098, 'n_tokens_neox': 1063, 'n_words': 288}