<commit_before>package simpledb;

import Zql.ZQuery;
import Zql.ZStatement;
import Zql.ZqlParser;

import java.io.*;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.ParseException;
import java.util.List;

public class SimpleDb {
	public static void main(String args[]) throws DbException, TransactionAbortedException, IOException {
		// convert a file
		if (args[0].equals("convert")) {
			BufferedReader in = null;
			BufferedOutputStream out = null;
			try {
				if (args.length < 3 || args.length > 5) {
					System.err.println("Usage: simpledb convert FILE NUM_COLUMNS");
					System.err.println("Usage: simpledb convert FILE TYPE_STRING [FIELD_SEP]");
					System.exit(-1);
				}
				
				File inFile = new File(args[1]);
				if (!inFile.canRead()) {
					System.err.format("Cannot read input file: %s", inFile);
					System.exit(-1);
				}
				in = new BufferedReader(new FileReader(args[1]));
				
				out = new BufferedOutputStream(System.out);
				
				int numOfAttributes = Integer.parseInt(args[2]);
				Type[] ts = new Type[numOfAttributes];
				char fieldSeparator = ',';<commit_msg>fix: convert error message was missing num of columns<commit_after>package simpledb;

import Zql.ZQuery;
import Zql.ZStatement;
import Zql.ZqlParser;

import java.io.*;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.ParseException;
import java.util.List;

public class SimpleDb {
	public static void main(String args[]) throws DbException, TransactionAbortedException, IOException {
		// convert a file
		if (args[0].equals("convert")) {
			BufferedReader in = null;
			BufferedOutputStream out = null;
			try {
				if (args.length < 3 || args.length > 5) {
					System.err.println("Usage: simpledb convert FILE NUM_COLUMNS");
					System.err.println("Usage: simpledb convert FILE NUM_COLUMNS TYPE_STRING [FIELD_SEP]");
					System.exit(-1);
				}
				
				File inFile = new File(args[1]);
				if (!inFile.canRead()) {
					System.err.format("Cannot read input file: %s", inFile);
					System.exit(-1);
				}
				in = new BufferedReader(new FileReader(args[1]));
				
				out = new BufferedOutputStream(System.out);
				
				int numOfAttributes = Integer.parseInt(args[2]);
				Type[] ts = new Type[numOfAttributes];
				char fieldSeparator = ',';
{'fraction_non_alphanumeric': 0.12819420783645655, 'fraction_numerical': 0.0068143100511073255, 'mean_word_length': 3.7358870967741935, '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': '1676651', 'n_tokens_mistral': 882, 'n_tokens_neox': 737, 'n_words': 189}