<commit_before>/**
 * @license
 * Copyright 2018 The FOAM Authors. All Rights Reserved.
 * http://www.apache.org/licenses/LICENSE-2.0
 */

package foam.dao;

import foam.core.ClassInfo;
import foam.lib.json.Outputter;
import foam.lib.json.OutputterMode;
import java.io.*;

public class JDAO
  extends AbstractJDAO
{
  protected Outputter outputter_ = new Outputter(OutputterMode.STORAGE);

  public JDAO(foam.core.X x, ClassInfo classInfo, String filename) {
    this(x, new MapDAO(classInfo), filename);
  }

  public JDAO(foam.core.X x, DAO delegate, String filename) {
    super(x, delegate, filename + ".1");
    try {
      int index = 0;
      File file = null;
      while ( true ) {
        file = getX().get(foam.nanos.fs.Storage.class).get(filename + "." + index);
        if ( ! file.exists() ) break;
        loadJournal(file);
        index++;
      } 
    } catch ( IOException e ) {
      logger_.error(e);<commit_msg>revert JDAO; keep JDAO same as before<commit_after>/**
 * @license
 * Copyright 2018 The FOAM Authors. All Rights Reserved.
 * http://www.apache.org/licenses/LICENSE-2.0
 */

package foam.dao;

import foam.core.ClassInfo;
import foam.lib.json.Outputter;
import foam.lib.json.OutputterMode;
import java.io.IOException;

public class JDAO
  extends AbstractJDAO
{
  protected Outputter outputter_ = new Outputter(OutputterMode.STORAGE);

  public JDAO(foam.core.X x, ClassInfo classInfo, String filename) {
    this(x, new MapDAO(classInfo), filename);
  }

  public JDAO(foam.core.X x, DAO delegate, String filename) {
    super(x, delegate, filename);
    try {
      loadJournal(getX().get(foam.nanos.fs.Storage.class).get(filename));
    } catch ( IOException e ) {
      logger_.error(e);
{'fraction_non_alphanumeric': 0.12935034802784223, 'fraction_numerical': 0.008120649651972157, 'mean_word_length': 3.345088161209068, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '477206', 'n_tokens_mistral': 585, 'n_tokens_neox': 573, 'n_words': 137}