final Set<RepositoryQuery> queries = Sets.filter(tasksState.getTaskList().getQueries(),
isQueryForRepository(repository));
final UnsubmittedTaskContainer unsubmitted = tasksState.getTaskList()
.getUnsubmittedContainer(repository.getRepositoryUrl());
try {
<BUG>monitor.subTask("Deleting old repository, tasks, and queries");
try {</BUG>
DeleteAction.prepareDeletion(tasks);
if (unsubmitted != null) {
DeleteAction.prepareDeletion(unsubmitted.getChildren());

final Set<RepositoryQuery> queries = Sets.filter(tasksState.getTaskList().getQueries(),
isQueryForRepository(repository));
final UnsubmittedTaskContainer unsubmitted = tasksState.getTaskList()
.getUnsubmittedContainer(repository.getRepositoryUrl());
try {
monitor.subTask(Messages.ConnectorMigrationUi_Deleting_old_repository_tasks_and_queries);
try {
DeleteAction.prepareDeletion(tasks);
if (unsubmitted != null) {
DeleteAction.prepareDeletion(unsubmitted.getChildren());
