<commit_before>/**
 *
 */
package org.workcraft.plugins.mpsat;

import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;

import org.workcraft.plugins.mpsat.tasks.MpsatChainResult;
import org.workcraft.plugins.mpsat.tasks.MpsatChainTask;
import org.workcraft.plugins.shared.tasks.ExternalProcessResult;
import org.workcraft.tasks.DummyProgressMonitor;
import org.workcraft.tasks.Result;
import org.workcraft.tasks.Result.Outcome;

public class MpsatChainResultHandler extends DummyProgressMonitor<MpsatChainResult> {
	private String errorMessage;
	private final MpsatChainTask task;

	public MpsatChainResultHandler(MpsatChainTask task) {
		this.task = task;
	}

	@Override
	public void finished(final Result<? extends MpsatChainResult> result, String description) {
		if (result.getOutcome() == Outcome.FINISHED) {
			final MpsatMode mpsatMode = result.getReturnValue().getMpsatSettings().getMode();
			switch (mpsatMode) {
			case UNDEFINED:
				SwingUtilities.invokeLater(new MpsatUndefinedResultHandler(task, result));
				break;
			case STG_REACHABILITY:
			case CSC_CONFLICT_DETECTION:
			case USC_CONFLICT_DETECTION:
			case NORMALCY:<commit_msg>Non-STG Reachability analysis mode is added.<commit_after>/**
 *
 */
package org.workcraft.plugins.mpsat;

import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;

import org.workcraft.plugins.mpsat.tasks.MpsatChainResult;
import org.workcraft.plugins.mpsat.tasks.MpsatChainTask;
import org.workcraft.plugins.shared.tasks.ExternalProcessResult;
import org.workcraft.tasks.DummyProgressMonitor;
import org.workcraft.tasks.Result;
import org.workcraft.tasks.Result.Outcome;

public class MpsatChainResultHandler extends DummyProgressMonitor<MpsatChainResult> {
	private String errorMessage;
	private final MpsatChainTask task;

	public MpsatChainResultHandler(MpsatChainTask task) {
		this.task = task;
	}

	@Override
	public void finished(final Result<? extends MpsatChainResult> result, String description) {
		if (result.getOutcome() == Outcome.FINISHED) {
			final MpsatMode mpsatMode = result.getReturnValue().getMpsatSettings().getMode();
			switch (mpsatMode) {
			case UNDEFINED:
				SwingUtilities.invokeLater(new MpsatUndefinedResultHandler(task, result));
				break;
			case REACHABILITY:
			case STG_REACHABILITY:
			case CSC_CONFLICT_DETECTION:
			case USC_CONFLICT_DETECTION:
			case NORMALCY:
{'fraction_non_alphanumeric': 0.0903741067675494, 'fraction_numerical': 0.0, 'mean_word_length': 5.898550724637682, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6722060', 'n_tokens_mistral': 824, 'n_tokens_neox': 771, 'n_words': 144}