<commit_before>package org.sagebionetworks.file.proxy;

import static org.junit.Assert.*;

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

import org.apache.commons.io.FileUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class LocalFileConnectionTest {
	
	String fileData;
	File tempFile;
	String pathPrefix;
	LocalFileConnection connection;

	@Before
	public void before() throws IOException, NotFoundException {
		// Use the temp directory as the pathPrefix
		pathPrefix = System.getProperty("java.io.tmpdir");
		connection = new LocalFileConnection(pathPrefix);
		
		// Create a tempFile to use.
		tempFile = File.createTempFile("LocalFileConnectionTest", ".txt");
		fileData = "This is the data that in the temp file";
		FileUtils.write(tempFile, fileData, "UTF-8");
	}
	
	@After
	public void after(){
		if(tempFile != null){
			tempFile.delete();
		}
	}
	<commit_msg>Path does not have training '/' on Linux.<commit_after>package org.sagebionetworks.file.proxy;

import static org.junit.Assert.*;

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

import org.apache.commons.io.FileUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class LocalFileConnectionTest {
	
	String fileData;
	File tempFile;
	String pathPrefix;
	LocalFileConnection connection;

	@Before
	public void before() throws IOException, NotFoundException {
		// Use the temp directory as the pathPrefix
		pathPrefix = System.getProperty("java.io.tmpdir");
		if(!pathPrefix.endsWith(File.separator)){
			pathPrefix += File.separator;
		}
		connection = new LocalFileConnection(pathPrefix);
		
		// Create a tempFile to use.
		tempFile = File.createTempFile("LocalFileConnectionTest", ".txt");
		fileData = "This is the data that in the temp file";
		FileUtils.write(tempFile, fileData, "UTF-8");
	}
	
	@After
	public void after(){
		if(tempFile != null){
			tempFile.delete();
		}
	}
	
{'fraction_non_alphanumeric': 0.11100049776007964, 'fraction_numerical': 0.0009955201592832255, 'mean_word_length': 4.56786703601108, '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': '1221161', 'n_tokens_mistral': 653, 'n_tokens_neox': 609, 'n_words': 163}