<commit_before>package org.directmemory.storage;

import java.io.File;
import java.io.IOException;
import java.util.List;

import org.directmemory.cache.CacheEntry;

import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.id.ORID;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.OCommandSQL;
import com.orientechnologies.orient.core.sql.query.OSQLSynchQuery;

public class OrientDBStorage extends Storage {
	
	public String baseDir = "orientdb";
	public String docDir = "db";
	
	ODatabaseDocumentTx docDb;
	
	private void createDocDb() {
        File base = new File(baseDir + "\\" + docDir);
		if (base.exists()) {
			logger.info("Base folder: " + base.getPath() + " checked ok");
		} else if (base.mkdir()) {
			logger.info("Base folder: " + base.getPath() + " created");
		} else {
			logger.error("Could not create base directory: " + base.getPath());
		}
		docDb = new ODatabaseDocumentTx("local:" + base.getAbsolutePath() + "\\data");
		docDb.delete();
		docDb.create();
		logger.info("OrientDB document database: " + docDb.getURL() + " created");
	}<commit_msg>organized imports in orientdb storage<commit_after>package org.directmemory.storage;

import java.io.File;
import java.io.IOException;

import org.directmemory.cache.CacheEntry;

import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.id.ORID;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.impl.ODocument;

public class OrientDBStorage extends Storage {
	
	public String baseDir = "orientdb";
	public String docDir = "db";
	
	ODatabaseDocumentTx docDb;
	
	private void createDocDb() {
        File base = new File(baseDir + "\\" + docDir);
		if (base.exists()) {
			logger.info("Base folder: " + base.getPath() + " checked ok");
		} else if (base.mkdir()) {
			logger.info("Base folder: " + base.getPath() + " created");
		} else {
			logger.error("Could not create base directory: " + base.getPath());
		}
		docDb = new ODatabaseDocumentTx("local:" + base.getAbsolutePath() + "\\data");
		docDb.delete();
		docDb.create();
		logger.info("OrientDB document database: " + docDb.getURL() + " created");
	}
{'fraction_non_alphanumeric': 0.1411764705882353, 'fraction_numerical': 0.0, 'mean_word_length': 4.615566037735849, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1795984', 'n_tokens_mistral': 800, 'n_tokens_neox': 750, 'n_words': 154}