<commit_before>package org.intermine.bio.dataconversion;

/*
 * Copyright (C) 2002-2003 FlyMine
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  See the LICENSE file for more
 * information or http://www.gnu.org/copyleft/lesser.html.
 *
 */

import java.io.File;
import java.io.FileReader;
import java.io.Reader;
import java.io.StringReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Set;

import org.intermine.dataconversion.ItemsTestCase;
import org.intermine.dataconversion.MockItemWriter;
import org.intermine.metadata.Model;
import org.intermine.xml.full.Attribute;
import org.intermine.xml.full.Item;
import org.intermine.xml.full.Reference;
import org.intermine.xml.full.ReferenceList;

public class MageConverterTest extends ItemsTestCase
{
    MageConverter converter;
    String ns = "http://www.intermine.org/model/mage#";
    File f = null;
    Model model;


    public MageConverterTest(String arg) {
        super(arg);
    }

    public void setUp() throws Exception {
        model = Model.getInstanceByName("genomic");
        converter = new MageConverter(new MockItemWriter(new HashMap()), model);
    }

    public void tearDown() throws Exception {
        converter.close();
        if (f != null) {
            f.delete();
        }<commit_msg>Fix for MageConverterTest so that it will run in Eclipse.<commit_after>package org.intermine.bio.dataconversion;

/*
 * Copyright (C) 2002-2003 FlyMine
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  See the LICENSE file for more
 * information or http://www.gnu.org/copyleft/lesser.html.
 *
 */

import java.io.File;
import java.io.FileReader;
import java.io.Reader;
import java.io.StringReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Set;

import org.intermine.dataconversion.ItemsTestCase;
import org.intermine.dataconversion.MockItemWriter;
import org.intermine.metadata.Model;
import org.intermine.xml.full.Attribute;
import org.intermine.xml.full.Item;
import org.intermine.xml.full.Reference;
import org.intermine.xml.full.ReferenceList;

public class MageConverterTest extends ItemsTestCase
{
    MageConverter converter;
    String ns = "http://www.intermine.org/model/mage#";
    File f = null;
    Model model;
    ClassLoader cl;

    public MageConverterTest(String arg) {
        super(arg);
    }

    public void setUp() throws Exception {
        // Needed so that STAX can find it's implementation classes
        cl = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(getClass().getClassLoader());

        model = Model.getInstanceByName("genomic");
        converter = new MageConverter(new MockItemWriter(new HashMap()), model);
    }

    public void tearDown() throws Exception {
        Thread.currentThread().setContextClassLoader(cl);
        converter.close();
        if (f != null) {
            f.delete();
        }
{'fraction_non_alphanumeric': 0.10301204819277109, 'fraction_numerical': 0.004819277108433735, 'mean_word_length': 3.644755244755245, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 8}, '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': '6892679', 'n_tokens_mistral': 980, 'n_tokens_neox': 950, 'n_words': 256}