<commit_before>package com.example.e4.rcp.todo.handlers;

import javax.inject.Named;

import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Shell;

import com.example.e4.rcp.todo.model.ITodoService;
import com.example.e4.rcp.todo.model.Todo;

public class RemoveTodoHandler {
	@Execute
	public void execute(ITodoService model,
			@Optional @Named(IServiceConstants.ACTIVE_SELECTION) Todo todo,
			@Named (IServiceConstants.ACTIVE_SHELL) Shell shell
			) {
		if (todo != null) {
			model.deleteTodo(todo.getId());
		} else {
			MessageDialog.openInformation(shell, "Deletion not possible",
					"No todo selected");
		}
	}
}<commit_msg>Rename model to todoService in RemoveTodohandler<commit_after>package com.example.e4.rcp.todo.handlers;

import javax.inject.Named;

import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Shell;

import com.example.e4.rcp.todo.model.ITodoService;
import com.example.e4.rcp.todo.model.Todo;

public class RemoveTodoHandler {
	@Execute
	public void execute(ITodoService todoService,
			@Optional @Named(IServiceConstants.ACTIVE_SELECTION) Todo todo,
			@Named (IServiceConstants.ACTIVE_SHELL) Shell shell
			) {
		if (todo != null) {
			todoService.deleteTodo(todo.getId());
		} else {
			MessageDialog.openInformation(shell, "Deletion not possible",
					"No todo selected");
		}
	}
}
{'fraction_non_alphanumeric': 0.1179273377010125, 'fraction_numerical': 0.00714711137581894, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1922585', 'n_tokens_mistral': 616, 'n_tokens_neox': 582, 'n_words': 97}