<commit_before>package no.uio.ifi.alboc.chargenerator;

/*
 * module CharGenerator
 */

import java.io.*;

import no.uio.ifi.alboc.alboc.AlboC;
import no.uio.ifi.alboc.error.Error;
import no.uio.ifi.alboc.log.Log;

/*
 * Module for reading single characters.
 */
public class CharGenerator {
	public static char curC, nextC;

	private static LineNumberReader sourceFile = null;
	private static String sourceLine;
	private static int sourcePos;
	private static int sourceLength;

	public static void init() {
		try {
			sourceFile = new LineNumberReader(new FileReader(AlboC.sourceName));
		} catch (FileNotFoundException e) {
			Error.error("Cannot read " + AlboC.sourceName + "!");
		}
		sourceLine = "";
		sourcePos = 0;
		curC = nextC = ' ';
		readNext();
		readNext();
	}

	public static void finish() {
		if (sourceFile != null) {
			try {
				sourceFile.close();
			} catch (IOException e) {
				Error.error("Could not close source file!");
			}
		}
	}

	public static boolean isMoreToRead() {

		return false;
	}

	public static int curLineNum() {
		return (sourceFile == null ? 0 : sourceFile.getLineNumber());
	}

	public static void readNext() {
		curC = nextC;
		
		if (!isMoreToRead())
			return;
		try {
			if (sourcePos == sourceLine.length()){
				nextC = sourceLine.charAt(sourcePos);
				sourcePos++;
				sourceLine = sourceFile.readLine();
				if(sourceLine.charAt(0) == '#')
					sourceLine = sourceFile.readLine();
				sourcePos = 0;
				
			}
			nextC = sourceLine.charAt(sourcePos);
			sourcePos++;
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		
		
		
	}
}<commit_msg>fixd charGenerator. isMoreToRead and ReadNext should work<commit_after>package no.uio.ifi.alboc.chargenerator;

/*
 * module CharGenerator
 */

import java.io.*;

import no.uio.ifi.alboc.alboc.AlboC;
import no.uio.ifi.alboc.error.Error;
import no.uio.ifi.alboc.log.Log;

/*
 * Module for reading single characters.
 */
public class CharGenerator {
	public static char curC, nextC;

	private static LineNumberReader sourceFile = null;
	private static String sourceLine;
	private static int sourcePos;
	private static int sourceLength;

	public static void init() {
		try {
			sourceFile = new LineNumberReader(new FileReader(AlboC.sourceName));
		} catch (FileNotFoundException e) {
			Error.error("Cannot read " + AlboC.sourceName + "!");
		}
		sourceLine = "";
		sourcePos = 0;
		curC = nextC = ' ';
		readNext();
		readNext();
	}

	public static void finish() {
		if (sourceFile != null) {
			try {
				sourceFile.close();
			} catch (IOException e) {
				Error.error("Could not close source file!");
			}
		}
	}

	public static boolean isMoreToRead() {
		if(sourceLine == null)
			return false;
		return true;
	}

	public static int curLineNum() {
		return (sourceFile == null ? 0 : sourceFile.getLineNumber());
	}

	public static void readNext() {
		curC = nextC;
		
		if (!isMoreToRead())
			return;
		try {
			if (sourcePos > sourceLine.length()-1){
				nextC = sourceLine.charAt(sourcePos);
				sourcePos++;
				sourceLine = sourceFile.readLine();
				if(sourceLine == null)
					return;
				if(sourceLine.charAt(0) == '#')
					sourceLine = sourceFile.readLine();
				sourcePos = 0;
				
			}
			nextC = sourceLine.charAt(sourcePos);
			sourcePos++;
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
{'fraction_non_alphanumeric': 0.1304609822235613, 'fraction_numerical': 0.0027116601385959627, 'mean_word_length': 3.3398692810457518, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2491967', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1105, 'n_words': 265}