<commit_before>package com.csmancala.file;

import java.awt.Graphics;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Image;
import java.awt.Transparency;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;

import javax.imageio.ImageIO;

public class FileSystem {
	
	private static GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
	private static GraphicsDevice gd = ge.getDefaultScreenDevice();
	private static GraphicsConfiguration gc = gd.getDefaultConfiguration();
	private static ClassLoader classLoader = FileSystem.class.getClassLoader();
	
	public static String getClassLoaderResourceDirectory(String parent, String fileName) {
		if (fileName != null && !fileName.isEmpty()) {
			return parent + "/" + fileName;
		}
		else {
			return parent;
		}
	}
	
	public static File getClassLoaderResourceFile(String directory, String fileName) {
		URL url = null;
		File f = null;
		url = classLoader.getResource(directory + "/" + fileName);
		try {
			f = new File(url.toURI());
		} catch (URISyntaxException e) {
			e.printStackTrace();
		}
		return f;
	}
	
	public static BufferedImage readImageFile(File f) throws IOException {
		Image im = null;<commit_msg>Added file separator in FileSystem class.<commit_after>package com.csmancala.file;

import java.awt.Graphics;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Image;
import java.awt.Transparency;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;

import javax.imageio.ImageIO;

public class FileSystem {
	
	private static GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
	private static GraphicsDevice gd = ge.getDefaultScreenDevice();
	private static GraphicsConfiguration gc = gd.getDefaultConfiguration();
	private static ClassLoader classLoader = FileSystem.class.getClassLoader();
	private static String separator = File.separator;
	
	public static String getClassLoaderResourceDirectory(String parent, String fileName) {
		if (fileName != null && !fileName.isEmpty()) {
			return parent + separator + fileName;
		}
		else {
			return parent;
		}
	}
	
	public static File getClassLoaderResourceFile(String directory, String fileName) {
		URL url = null;
		File f = null;
		url = classLoader.getResource(directory + separator + fileName);
		try {
			f = new File(url.toURI());
		} catch (URISyntaxException e) {
			e.printStackTrace();
		}
		return f;
	}
	
	public static BufferedImage readImageFile(File f) throws IOException {
		Image im = null;
{'fraction_non_alphanumeric': 0.09425205283827205, 'fraction_numerical': 0.0, 'mean_word_length': 5.025806451612903, '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': '1544736', 'n_tokens_mistral': 843, 'n_tokens_neox': 790, 'n_words': 215}