<commit_before>class TaskList
  def before_save
    unless self.position
      first_task_list = self.project.task_lists.first(:select => 'position')
      if first_task_list
        last_position = first_task_list.position
        self.position = last_position.nil? ? 1 : last_position.succ
      else
        self.position = 0<commit_msg>TaskList should alway be in first position on creation<commit_after>class TaskList
  def before_create
    unless self.position
      self.position = 0
      project.task_lists.each do |t|
        t.increment!(:position) unless t == self
{'fraction_non_alphanumeric': 0.07452339688041594, 'fraction_numerical': 0.005199306759098787, 'mean_word_length': 3.158273381294964, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2115571', 'n_tokens_mistral': 169, 'n_tokens_neox': 164, 'n_words': 42}