<commit_before>package rath.libxml;

import rath.libxml.util.Utils;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * User: rath
 * Date: 02/11/2013
 * Time: 23:50
 * To change this template use File | Settings | File Templates.
 */
public class LibXml {
	static {
		loadNativeLibrary();
	}

	private static synchronized void loadNativeLibrary() {
		String fullname = System.mapLibraryName("hello");
		String suffix = fullname.substring(fullname.lastIndexOf('.'));
		String libname = "libxml2j" + suffix;

		File targetLibrary = null;

		File localXcodeLibrary = new File("/Users/rath/Library/Developer/Xcode/DerivedData/libxml2-java-fkrlovtvxnmqhfhhoxmlslcqmtjx/Build/Products/Debug/" + libname);
		if( localXcodeLibrary.exists() && localXcodeLibrary.lastModified()-(1000L*60L*30L) < System.currentTimeMillis()) {
			targetLibrary = localXcodeLibrary;
			System.out.println("*****************************************");
			System.out.println("* Using libxml2j.dylib built on Xcode 5 *");
			System.out.println("*****************************************");<commit_msg>Fixed library suffix detection.<commit_after>package rath.libxml;

import rath.libxml.util.Utils;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * User: rath
 * Date: 02/11/2013
 * Time: 23:50
 * To change this template use File | Settings | File Templates.
 */
public class LibXml {
	static {
		loadNativeLibrary();
	}

	private static synchronized void loadNativeLibrary() {
		String fullname = System.mapLibraryName("hello");
		String suffix = fullname.substring(fullname.lastIndexOf('.'));
		if (suffix.equalsIgnoreCase(".jnilib")) suffix = ".dylib";
		String libname = "libxml2j" + suffix;

		File targetLibrary = null;

		File localXcodeLibrary = new File("/Users/rath/Library/Developer/Xcode/DerivedData/libxml2-java-fkrlovtvxnmqhfhhoxmlslcqmtjx/Build/Products/Debug/" + libname);
		if( localXcodeLibrary.exists() && localXcodeLibrary.lastModified()-(1000L*60L*30L) < System.currentTimeMillis()) {
			targetLibrary = localXcodeLibrary;
			System.out.println("*****************************************");
			System.out.println("* Using libxml2j.dylib built on Xcode 5 *");
			System.out.println("*****************************************");
{'fraction_non_alphanumeric': 0.19164204305614183, 'fraction_numerical': 0.020261713803292527, 'mean_word_length': 5.286472148541114, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '509552', 'n_tokens_mistral': 807, 'n_tokens_neox': 727, 'n_words': 150}