<commit_before>package org.eclipse.emf.emfstore.client.ui.common;

import java.util.concurrent.Callable;

import org.eclipse.emf.emfstore.server.exceptions.EmfStoreException;
import org.eclipse.swt.widgets.Display;

public class RunInUI {

	private static RunInUI runInUI;

	private RunInUI() {

	}

	public static class WithException {

		private static RunInUI runInUI = new RunInUI();

		public static <T> T runWithResult(final Callable<T> callable) throws EmfStoreException {
			return runInUI.new RunInUIThreadWithResult<T>() {
				@Override
				public T doRun() throws EmfStoreException {
					try {
						return callable.call();
					} catch (EmfStoreException e) {
						throw e;
					} catch (Exception e) {<commit_msg>fixed NPE in RunInUI<commit_after>package org.eclipse.emf.emfstore.client.ui.common;

import java.util.concurrent.Callable;

import org.eclipse.emf.emfstore.server.exceptions.EmfStoreException;
import org.eclipse.swt.widgets.Display;

public class RunInUI {

	private static RunInUI runInUI = new RunInUI();

	private RunInUI() {

	}

	public static class WithException {

		public static <T> T runWithResult(final Callable<T> callable) throws EmfStoreException {
			return runInUI.new RunInUIThreadWithResult<T>() {
				@Override
				public T doRun() throws EmfStoreException {
					try {
						return callable.call();
					} catch (EmfStoreException e) {
						throw e;
					} catch (Exception e) {
{'fraction_non_alphanumeric': 0.09453781512605042, 'fraction_numerical': 0.0, 'mean_word_length': 4.014035087719298, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3441603', 'n_tokens_mistral': 534, 'n_tokens_neox': 453, 'n_words': 111}