<commit_before>package ch.openech.xml.read;

import static ch.openech.model.XmlConstants.*;
import static ch.openech.xml.read.StaxEch.*;

import java.io.InputStream;
import java.io.StringReader;

import javax.swing.ProgressMonitor;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;

import org.minimalj.backend.Backend;
import org.minimalj.frontend.toolkit.ProgressListener;
import org.minimalj.util.StringUtils;
import org.threeten.bp.LocalDateTime;

import ch.openech.model.Event;
import ch.openech.model.code.TypeOfResidenceOrganisation;
import ch.openech.model.organisation.Organisation;
import ch.openech.model.organisation.OrganisationIdentification;
import ch.openech.transaction.EchPersistence;

public class StaxEch0148 {
	private final Backend backend;
	
	private Event e;
	private Object insertId = null;
	
	public StaxEch0148(Backend backend) {
		this.backend = backend;
	}
	
	public void insertOrganisation(Organisation organisation) {
		organisation.event = e;
		
		backend.insert(organisation);
		insertId = backend.insert(organisation);
	}
	
	public Object getInsertId() {
		return insertId;
	}

	public void process(String xmlString) throws XMLStreamException {<commit_msg>StaxEch0148: Organisation was inserted twice<commit_after>package ch.openech.xml.read;

import static ch.openech.model.XmlConstants.*;
import static ch.openech.xml.read.StaxEch.*;

import java.io.InputStream;
import java.io.StringReader;

import javax.swing.ProgressMonitor;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;

import org.minimalj.backend.Backend;
import org.minimalj.frontend.toolkit.ProgressListener;
import org.minimalj.util.StringUtils;
import org.threeten.bp.LocalDateTime;

import ch.openech.model.Event;
import ch.openech.model.code.TypeOfResidenceOrganisation;
import ch.openech.model.organisation.Organisation;
import ch.openech.model.organisation.OrganisationIdentification;
import ch.openech.transaction.EchPersistence;

public class StaxEch0148 {
	private final Backend backend;
	
	private Event e;
	private Object insertId = null;
	
	public StaxEch0148(Backend backend) {
		this.backend = backend;
	}
	
	public void insertOrganisation(Organisation organisation) {
		organisation.event = e;
		insertId = backend.insert(organisation);
	}
	
	public Object getInsertId() {
		return insertId;
	}

	public void process(String xmlString) throws XMLStreamException {
{'fraction_non_alphanumeric': 0.09303187546330616, 'fraction_numerical': 0.007412898443291327, 'mean_word_length': 5.78140703517588, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, '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': '6034189', 'n_tokens_mistral': 881, 'n_tokens_neox': 837, 'n_words': 165}