<commit_before>/**
 * Copyright (C) 2015 <NAME> (<EMAIL>)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.brunocvcunha.dbparser4gl.helper;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

import org.apache.log4j.Logger;
import org.brunocvcunha.dbparser4gl.DatabaseDefinitionsParser;
import org.brunocvcunha.dbparser4gl.vo.Field;
import org.brunocvcunha.dbparser4gl.vo.Table;


/**
 * Parses all Definition Files of an specified directory, returning always a Collection of Tables.
 * 
 * @author <NAME>
 * 
 */
public class DatabaseTablesHelper {

  private static List<Table> defaultTablesInstance;

  private static Logger log = Logger.getLogger(DatabaseTablesHelper.class);

  private static final boolean IS_VERBOSE = true;

  private static final String BASE_DIR = "\\\\TOUROS\\DFS";
  private static final String EAI_DEFAULT = BASE_DIR + "\\EAI\\12.1.2";
  private static final String EMS2_DEFAULT = BASE_DIR + "\\EMS2\\12.1.2";
  private static final String EMS5_DEFAULT = BASE_DIR + "\\EMS5\\12.1.2";
  private static final String FND_DEFAULT = BASE_DIR + "\\Foundation\\12.1.2";
  private static final String GP_DEFAULT = BASE_DIR + "\\GP\\12.1.2";
  private static final String HCM_DEFAULT = BASE_DIR + "\\HCM\\12.1.2";
  private static final String METADADOS_DEFAULT = BASE_DIR + "\\CRM\\12.1.2";

  private DatabaseTablesHelper() {}

  public static List<Table> listTables() {
    synchronized (DatabaseTablesHelper.class) {
      if (defaultTablesInstance == null) {
        defaultTablesInstance =
            listTables(new File[] {new File(EAI_DEFAULT), new File(EMS2_DEFAULT),
                new File(EMS5_DEFAULT), new File(FND_DEFAULT), new File(HCM_DEFAULT),
                new File(GP_DEFAULT), new File(METADADOS_DEFAULT)});
      }
    }

    return defaultTablesInstance;<commit_msg>default version dump for tables<commit_after>/**
 * Copyright (C) 2015 <NAME> (<EMAIL>)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.brunocvcunha.dbparser4gl.helper;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

import org.apache.log4j.Logger;
import org.brunocvcunha.dbparser4gl.DatabaseDefinitionsParser;
import org.brunocvcunha.dbparser4gl.vo.Field;
import org.brunocvcunha.dbparser4gl.vo.Table;


/**
 * Parses all Definition Files of an specified directory, returning always a Collection of Tables.
 * 
 * @author <NAME>
 * 
 */
public class DatabaseTablesHelper {

  private static List<Table> defaultTablesInstance;

  private static Logger log = Logger.getLogger(DatabaseTablesHelper.class);

  private static final boolean IS_VERBOSE = true;

  private static final String BASE_DIR = "\\\\TOUROS.jv01.local\\DFS";
  private static final String EAI_DEFAULT = BASE_DIR + "\\EAI\\12.1.3";
  private static final String EMS2_DEFAULT = BASE_DIR + "\\EMS2\\12.1.3";
  private static final String EMS5_DEFAULT = BASE_DIR + "\\EMS5\\12.1.3";
  private static final String FND_DEFAULT = BASE_DIR + "\\Foundation\\12.1.3";
  private static final String GP_DEFAULT = BASE_DIR + "\\GP\\12.1.3";
  private static final String HCM_DEFAULT = BASE_DIR + "\\HCM\\12.1.3";
  private static final String METADADOS_DEFAULT = BASE_DIR + "\\CRM\\12.1.3";

  private DatabaseTablesHelper() {}

  public static List<Table> listTables() {
    synchronized (DatabaseTablesHelper.class) {
      if (defaultTablesInstance == null) {
        defaultTablesInstance =
            listTables(new File[] {new File(EAI_DEFAULT), new File(EMS2_DEFAULT),
                new File(EMS5_DEFAULT), new File(FND_DEFAULT), new File(HCM_DEFAULT),
                new File(GP_DEFAULT), new File(METADADOS_DEFAULT)});
      }
    }

    return defaultTablesInstance;
{'fraction_non_alphanumeric': 0.10301079341033895, 'fraction_numerical': 0.018178375307706874, 'mean_word_length': 3.95962441314554, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '5327872', 'n_tokens_mistral': 1620, 'n_tokens_neox': 1541, 'n_words': 469}