<commit_before>/**
 * 
 */
package codemining.js.codeutils;

import static org.junit.Assert.assertTrue;

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

import org.apache.commons.io.FileUtils;
import org.eclipse.wst.jsdt.core.dom.ASTNode;
import org.junit.Before;
import org.junit.Test;

import codemining.languagetools.ParseType;

/**
 * @author <NAME> <<EMAIL>>
 * 
 */
// FIXME Javascript AST parser is quite buggy: For SampleJavascript the === is
// printed as + and for SampleJavascript2 it prints a random semicolon at line 7
// Is this just a buggy toString method issue?
public class JavascriptASTExtractorTest {

	String classContent;
	String methodContent;

	@Before
	public void setUp() throws IOException {
		classContent = FileUtils.readFileToString(new File(
				JavascriptASTExtractorTest.class.getClassLoader()
						.getResource("SampleJavascript.txt").getFile()));

		methodContent = FileUtils.readFileToString(new File(
				JavascriptASTExtractorTest.class.getClassLoader()
						.getResource("SampleMethod.txt").getFile()));
	}
<commit_msg>Add both test files<commit_after>/**
 * 
 */
package codemining.js.codeutils;

import static org.junit.Assert.assertTrue;

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

import org.apache.commons.io.FileUtils;
import org.eclipse.wst.jsdt.core.dom.ASTNode;
import org.junit.Before;
import org.junit.Test;

import codemining.languagetools.ParseType;

/**
 * @author <NAME> <<EMAIL>>
 * 
 */
// FIXME Javascript AST parser is quite buggy: For SampleJavascript the === is
// printed as + and for SampleJavascript2 it prints a random semicolon at line 7
// Is this just a buggy toString method issue?
public class JavascriptASTExtractorTest {

	String classContent;
	String methodContent;

	@Before
	public void setUp() throws IOException {
		classContent = FileUtils.readFileToString(new File(
				JavascriptASTExtractorTest.class.getClassLoader()
						.getResource("SampleJavascript2.txt").getFile()));

		methodContent = FileUtils.readFileToString(new File(
				JavascriptASTExtractorTest.class.getClassLoader()
						.getResource("SampleJavascript.txt").getFile()));
	}

{'fraction_non_alphanumeric': 0.11004126547455295, 'fraction_numerical': 0.0022925263640531865, 'mean_word_length': 4.712041884816754, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2654470', 'n_tokens_mistral': 717, 'n_tokens_neox': 657, 'n_words': 163}