<commit_before>/**
 * Copyright 2011 The Open Source Research Group,
 *                University of Erlangen-Nürnberg
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.sweble.wikitext.dumpreader;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.ValidationEvent;
import javax.xml.bind.ValidationEventHandler;
import javax.xml.bind.ValidationEventLocator;
import javax.xml.stream.FactoryConfigurationError;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;

import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
import org.apache.log4j.Logger;

import sun.org.mozilla.javascript.WrappedException;

import com.sun.org.apache.xerces.internal.util.XMLCatalogResolver;

public abstract class DumpReader
{
	private final File dumpFile;
	
	private final Logger logger;
	
	private final XMLStreamReader xmlStreamReader;
	
	private final Unmarshaller unmarshaller;
	
	private final long fileLength;
	
	private final ExportSchemaVersion schemaVersion;
	
	private CountingInputStream decompressedInputStream;
	
	private CountingInputStream compressedInputStream;
	
	private long parsedCount;
	
	private boolean decompress;
	
	// =========================================================================
	<commit_msg>Use the correct WrappedException class<commit_after>/**
 * Copyright 2011 The Open Source Research Group,
 *                University of Erlangen-Nürnberg
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.sweble.wikitext.dumpreader;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.ValidationEvent;
import javax.xml.bind.ValidationEventHandler;
import javax.xml.bind.ValidationEventLocator;
import javax.xml.stream.FactoryConfigurationError;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;

import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
import org.apache.log4j.Logger;

import com.sun.org.apache.xerces.internal.util.XMLCatalogResolver;

import de.fau.cs.osr.utils.WrappedException;

public abstract class DumpReader
{
	private final File dumpFile;
	
	private final Logger logger;
	
	private final XMLStreamReader xmlStreamReader;
	
	private final Unmarshaller unmarshaller;
	
	private final long fileLength;
	
	private final ExportSchemaVersion schemaVersion;
	
	private CountingInputStream decompressedInputStream;
	
	private CountingInputStream compressedInputStream;
	
	private long parsedCount;
	
	private boolean decompress;
	
	// =========================================================================
	
{'fraction_non_alphanumeric': 0.10503432494279176, 'fraction_numerical': 0.005034324942791762, 'mean_word_length': 5.121848739495798, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 26}, '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': '421185', 'n_tokens_mistral': 1200, 'n_tokens_neox': 1135, 'n_words': 350}