<commit_before>package org.testory.plumbing.history;

import static org.testory.plumbing.PlumbingException.check;

import org.testory.common.Chain;

public class SynchronizedHistory implements History {
  private final History history;

  private SynchronizedHistory(History history) {
    this.history = history;
  }

  public static History synchronize(History history) {
    check(history != null);
    return new SynchronizedHistory(history);
  }

  public Chain<Object> get() {
    return history.get();
  }

  public History add(Object event) {
    return history.add(event);
  }

}
<commit_msg>fixed synchronization of history<commit_after>package org.testory.plumbing.history;

import static org.testory.plumbing.PlumbingException.check;

import org.testory.common.Chain;

public class SynchronizedHistory implements History {
  private final History history;

  private SynchronizedHistory(History history) {
    this.history = history;
  }

  public static History synchronize(History history) {
    check(history != null);
    return new SynchronizedHistory(history);
  }

  public synchronized Chain<Object> get() {
    return history.get();
  }

  public synchronized History add(Object event) {
    return history.add(event);
  }
}

{'fraction_non_alphanumeric': 0.0898876404494382, 'fraction_numerical': 0.0, 'mean_word_length': 4.3982683982683985, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5830845', 'n_tokens_mistral': 354, 'n_tokens_neox': 344, 'n_words': 89}