<commit_before>package edu.kit.ipd.sdq.vitruvius.framework.contracts.change

import edu.kit.ipd.sdq.vitruvius.framework.contracts.datatypes.VURI
import org.eclipse.emf.ecore.change.ChangeDescription
import edu.kit.ipd.sdq.vitruvius.framework.contracts.change.impl.EMFModelChangeImpl
import edu.kit.ipd.sdq.vitruvius.framework.contracts.change.FileChange.FileChangeKind
import edu.kit.ipd.sdq.vitruvius.framework.contracts.change.impl.FileChangeImpl
import edu.kit.ipd.sdq.vitruvius.framework.contracts.change.impl.CompositeChangeImpl
import java.util.List
import edu.kit.ipd.sdq.vitruvius.framework.contracts.meta.change.EChange
import edu.kit.ipd.sdq.vitruvius.framework.contracts.change.impl.GeneralChangeImpl
import edu.kit.ipd.sdq.vitruvius.framework.contracts.datatypes.VitruviusChange
import edu.kit.ipd.sdq.vitruvius.framework.contracts.change.impl.TransactionalChangeImpl

class VitruviusChangeFactory {
	private static VitruviusChangeFactory instance;
	
	private new() {}
	
	public static def VitruviusChangeFactory getInstance() {
		if (instance == null) {
			instance = new VitruviusChangeFactory();
		}
		return instance;
	}
	
	public def EMFModelChange createEMFModelChange(ChangeDescription changeDescription, VURI vuri) {
		return new EMFModelChangeImpl(changeDescription, vuri);
	}
	
	public def GeneralChange createGeneralChange(List<EChange> changes, VURI vuri) {
		return new GeneralChangeImpl(changes, vuri);
	}
	
	public def FileChange createFileChange(FileChangeKind kind, VURI vuri) {
		return new FileChangeImpl(kind, vuri);
	}
	
	public def CompositeChange createCompositeChange() {
		return new CompositeChangeImpl();
	}
	
	public def TransactionalChange createTransactionalChange() {<commit_msg>Add method for creating a general change with only one EChange.<commit_after>package edu.kit.ipd.sdq.vitruvius.framework.contracts.change

import edu.kit.ipd.sdq.vitruvius.framework.contracts.datatypes.VURI
import org.eclipse.emf.ecore.change.ChangeDescription
import edu.kit.ipd.sdq.vitruvius.framework.contracts.change.impl.EMFModelChangeImpl
import edu.kit.ipd.sdq.vitruvius.framework.contracts.change.FileChange.FileChangeKind
import edu.kit.ipd.sdq.vitruvius.framework.contracts.change.impl.FileChangeImpl
import edu.kit.ipd.sdq.vitruvius.framework.contracts.change.impl.CompositeChangeImpl
import java.util.List
import edu.kit.ipd.sdq.vitruvius.framework.contracts.meta.change.EChange
import edu.kit.ipd.sdq.vitruvius.framework.contracts.change.impl.GeneralChangeImpl
import edu.kit.ipd.sdq.vitruvius.framework.contracts.datatypes.VitruviusChange
import edu.kit.ipd.sdq.vitruvius.framework.contracts.change.impl.TransactionalChangeImpl

class VitruviusChangeFactory {
	private static VitruviusChangeFactory instance;
	
	private new() {}
	
	public static def VitruviusChangeFactory getInstance() {
		if (instance == null) {
			instance = new VitruviusChangeFactory();
		}
		return instance;
	}
	
	public def EMFModelChange createEMFModelChange(ChangeDescription changeDescription, VURI vuri) {
		return new EMFModelChangeImpl(changeDescription, vuri);
	}
	
	public def GeneralChange createGeneralChange(EChange change, VURI vuri) {
		return new GeneralChangeImpl(#[change], vuri);
	}
	
	public def GeneralChange createGeneralChange(List<EChange> changes, VURI vuri) {
		return new GeneralChangeImpl(changes, vuri);
	}
	
	public def FileChange createFileChange(FileChangeKind kind, VURI vuri) {
		return new FileChangeImpl(kind, vuri);
	}
	
	public def CompositeChange createCompositeChange() {
		return new CompositeChangeImpl();
	}
	
	public def TransactionalChange createTransactionalChange() {
{'fraction_non_alphanumeric': 0.08970466464256141, 'fraction_numerical': 0.0, 'mean_word_length': 5.982658959537572, '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': '5837925', 'n_tokens_mistral': 1246, 'n_tokens_neox': 1180, 'n_words': 199}