<commit_before>package eu.stratosphere.hadoopcompat.datatypes;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.hadoop.io.Writable;

import eu.stratosphere.types.Value;
import eu.stratosphere.util.InstantiationUtil;

public class WritableWrapper implements Value {
	private static final long serialVersionUID = 1L;
	
	private Writable wrapped;
	private String wrappedType;
	
	public WritableWrapper() {
	}
	
	public WritableWrapper(Writable toWrap) {
		wrapped = toWrap;
		wrappedType = toWrap.getClass().getCanonicalName();
	}

	public Writable value() {
		return wrapped;
	}
	
	@Override
	public void write(DataOutput out) throws IOException {
		out.writeUTF(wrappedType);
		wrapped.write(out);
	}

	@Override
	public void read(DataInput in) throws IOException {
		wrappedType = in.readUTF();
		try {
			Class wrClass = Class.forName(wrappedType);
			wrapped = InstantiationUtil.instantiate(wrClass, Writable.class);
		} catch (ClassNotFoundException e) {
			throw new RuntimeException("Error cerating the WritableWrapper");
		}
		
		wrapped.readFields(in);
	}<commit_msg>quick fix for build error<commit_after>package eu.stratosphere.hadoopcompat.datatypes;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.hadoop.io.Writable;

import eu.stratosphere.types.Value;
import eu.stratosphere.util.InstantiationUtil;

public class WritableWrapper implements Value {
	private static final long serialVersionUID = 1L;
	
	private Writable wrapped;
	private String wrappedType;
	
	public WritableWrapper() {
	}
	
	public WritableWrapper(Writable toWrap) {
		wrapped = toWrap;
		wrappedType = toWrap.getClass().getCanonicalName();
	}

	public Writable value() {
		return wrapped;
	}
	
	@Override
	public void write(DataOutput out) throws IOException {
		out.writeUTF(wrappedType);
		wrapped.write(out);
	}

	@Override
	public void read(DataInput in) throws IOException {
		wrappedType = in.readUTF();
		try {
			Class wrClass = Class.forName(wrappedType);
			wrapped = (Writable) InstantiationUtil.instantiate(wrClass, Writable.class);
		} catch (ClassNotFoundException e) {
			throw new RuntimeException("Error cerating the WritableWrapper");
		}
		
		wrapped.readFields(in);
	}
{'fraction_non_alphanumeric': 0.09494505494505495, 'fraction_numerical': 0.0008791208791208791, 'mean_word_length': 4.927083333333333, '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': '6547146', 'n_tokens_mistral': 761, 'n_tokens_neox': 699, 'n_words': 165}