<commit_before>package rb;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

/**
 * Created by IntelliJ IDEA.
 * User: <NAME>
 * Date: 5/16/11
 * Time: 12:12 PM
 */
public class MemoryFile {
    String name;
    String content;

    public MemoryFile(String name, String diff) {
        this.name = name;
        this.content = diff;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public InputStream getInputStream() {
        return new ByteArrayInputStream(content.getBytes());
    }
}<commit_msg>Set default encoding of diff file to utf-8 according of issue reported by @yqt: diff file gets wrong encoding<commit_after>package rb;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;

/**
 * Created by IntelliJ IDEA.
 * User: <NAME>
 * Date: 5/16/11
 * Time: 12:12 PM
 */
public class MemoryFile {
    String name;
    String content;

    public MemoryFile(String name, String diff) {
        this.name = name;
        this.content = diff;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public InputStream getInputStream() throws UnsupportedEncodingException {
        return new ByteArrayInputStream(content.getBytes("utf-8"));
    }
}
{'fraction_non_alphanumeric': 0.09588235294117647, 'fraction_numerical': 0.011764705882352941, 'mean_word_length': 2.5961945031712474, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6307520', 'n_tokens_mistral': 510, 'n_tokens_neox': 483, 'n_words': 144}