<commit_before>/**
 * Copyright (c) 2011 committers of YAKINDU and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     committers of YAKINDU - initial API and implementation
 */
package org.yakindu.sct.model.sexec.interpreter.factory;

import org.yakindu.sct.model.sexec.ExecutionFlow;
import org.yakindu.sct.model.sexec.interpreter.IExecutionFlowInterpreter;
import org.yakindu.sct.model.sexec.interpreter.InterpreterModule;
import org.yakindu.sct.model.sexec.transformation.ModelSequencer;
import org.yakindu.sct.model.sexec.transformation.SequencerModule;
import org.yakindu.sct.model.sgraph.Statechart;
import org.yakindu.sct.simulation.core.runtime.IExecutionFacadeFactory;

import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.util.Modules;

/**
 * Factory registered via extension point
 * 'org.yakindu.sct.simulation.core.executionfactory'
 * 
 * @author <NAME> - Initial contribution and API
 * 
 */
public class SexecExecutionFacadeFactory implements IExecutionFacadeFactory {

	@Inject
	private ModelSequencer sequencer;
	@Inject
	private IExecutionFlowInterpreter interpreter;

	public SexecExecutionFacadeFactory() {
		Guice.createInjector(
				Modules.override(new SequencerModule()).with(
						new InterpreterModule())).injectMembers(this);
	}

	public IExecutionFlowInterpreter createExecutionFacade(Statechart statechart) {
		ExecutionFlow flow = sequencer.transform(statechart);
		interpreter.initialize(flow);
		return interpreter;

	}

	public boolean isApplicable(Statechart statechart) {
		return statechart.eResource().getURI().lastSegment().equals("sct");
	}

   
}<commit_msg>Bugfix: SexecExecutionFacadeFactory checked resource extension for endswith instead of equals<commit_after>/**
 * Copyright (c) 2011 committers of YAKINDU and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     committers of YAKINDU - initial API and implementation
 */
package org.yakindu.sct.model.sexec.interpreter.factory;

import org.yakindu.sct.model.sexec.ExecutionFlow;
import org.yakindu.sct.model.sexec.interpreter.IExecutionFlowInterpreter;
import org.yakindu.sct.model.sexec.interpreter.InterpreterModule;
import org.yakindu.sct.model.sexec.transformation.ModelSequencer;
import org.yakindu.sct.model.sexec.transformation.SequencerModule;
import org.yakindu.sct.model.sgraph.Statechart;
import org.yakindu.sct.simulation.core.runtime.IExecutionFacadeFactory;

import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.util.Modules;

/**
 * Factory registered via extension point
 * 'org.yakindu.sct.simulation.core.executionfactory'
 * 
 * @author <NAME> - Initial contribution and API
 * 
 */
public class SexecExecutionFacadeFactory implements IExecutionFacadeFactory {

	@Inject
	private ModelSequencer sequencer;
	@Inject
	private IExecutionFlowInterpreter interpreter;

	public SexecExecutionFacadeFactory() {
		Guice.createInjector(
				Modules.override(new SequencerModule()).with(
						new InterpreterModule())).injectMembers(this);
	}

	public IExecutionFlowInterpreter createExecutionFacade(Statechart statechart) {
		ExecutionFlow flow = sequencer.transform(statechart);
		interpreter.initialize(flow);
		return interpreter;

	}

	public boolean isApplicable(Statechart statechart) {
		return statechart.eResource().getURI().fileExtension().equals("sct");
	}

   
}
{'fraction_non_alphanumeric': 0.09507595599790467, 'fraction_numerical': 0.0041906757464641176, 'mean_word_length': 5.365, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6208963', 'n_tokens_mistral': 1206, 'n_tokens_neox': 1171, 'n_words': 243}