Source:
<code>public static void openImportProjectsDialog(Shell activeShell,Repository repository) throws ExecutionException, CoreException { if (repository == null) { throw new IllegalArgumentException(); <START> } <END> if (activeShell == null) { throw new IllegalArgumentException(); } ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService( ICommandService.class); if (commandService == null) { throw new IllegalStateException(); } Command command = commandService.getCommand(IMPORT_COMMAND_ID); if (command == null) { throw new IllegalStateException(); } IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService( IHandlerService.class); if (handlerService == null) { throw new IllegalStateException(); } ExecutionEvent executionEvent = handlerService.createExecutionEvent(command, new Event()); @SuppressWarnings("unchecked") Map<String, Object> parameters = new HashMap<String,Object>(executionEvent.getParameters()); StructuredSelection structuredSelection = new StructuredSelection(new RepositoryNode(null,repository)); parameters.put(ISources.ACTIVE_CURRENT_SELECTION_NAME, structuredSelection); parameters.put(ISources.ACTIVE_SHELL_NAME, activeShell); EvaluationContext evaluationContext = new EvaluationContext( (IEvaluationContext) (executionEvent.getApplicationContext() instanceof IEvaluationContext ? executionEvent.getApplicationContext() : null), structuredSelection); for (Map.Entry<String, Object> parameter : parameters.entrySet()) { evaluationContext.addVariable(parameter.getKey(), parameter.getValue()); } executionEvent = new ExecutionEvent(command, parameters, executionEvent.getTrigger(), evaluationContext); try { command.executeWithChecks(executionEvent); } catch (NotDefinedException e) { throw new CoreException(new Status(IStatus.ERROR,Activator.getPluginId(),UIText.EGitUI_ImportProjectsNotDefined,e)); } catch (NotEnabledException e) { throw new CoreException(new Status(IStatus.ERROR,Activator.getPluginId(),UIText.EGitUI_ImportProjectsNotEnabled,e)); } catch (NotHandledException e) { throw new CoreException(new Status(IStatus.ERROR,Activator.getPluginId(),UIText.EGitUI_ImportProjectsNotHandled,e)); } }</code><technical_language>style-nit: curlies needed for single-line statements</technical_language>

Target:
public static void openImportProjectsDialog(Shell activeShell,Repository repository) throws ExecutionException, CoreException { if (repository == null) throw new IllegalArgumentException(); if (activeShell == null) throw new IllegalArgumentException(); ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService( ICommandService.class); if (commandService == null) throw new IllegalStateException(); Command command = commandService.getCommand(IMPORT_COMMAND_ID); if (command == null) throw new IllegalStateException(); IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService( IHandlerService.class); if (handlerService == null) throw new IllegalStateException(); ExecutionEvent executionEvent = handlerService.createExecutionEvent(command, new Event()); @SuppressWarnings("unchecked") Map<String, Object> parameters = new HashMap<String,Object>(executionEvent.getParameters()); StructuredSelection structuredSelection = new StructuredSelection(new RepositoryNode(null,repository)); parameters.put(ISources.ACTIVE_CURRENT_SELECTION_NAME, structuredSelection); parameters.put(ISources.ACTIVE_SHELL_NAME, activeShell); EvaluationContext evaluationContext = new EvaluationContext( (IEvaluationContext) (executionEvent.getApplicationContext() instanceof IEvaluationContext ? executionEvent.getApplicationContext() : null), structuredSelection); for (Map.Entry<String, Object> parameter : parameters.entrySet()) { evaluationContext.addVariable(parameter.getKey(), parameter.getValue()); } executionEvent = new ExecutionEvent(command, parameters, executionEvent.getTrigger(), evaluationContext); try { command.executeWithChecks(executionEvent); } catch (NotDefinedException e) { throw new CoreException(new Status(IStatus.ERROR, Activator.getPluginId(), UIText.EGitUI_ImportProjectsNotDefined, e)); } catch (NotEnabledException e) { throw new CoreException(new Status(IStatus.ERROR, Activator.getPluginId(), UIText.EGitUI_ImportProjectsNotEnabled, e)); } catch (NotHandledException e) { throw new CoreException(new Status(IStatus.ERROR, Activator.getPluginId(), UIText.EGitUI_ImportProjectsNotHandled, e)); } }