Program: 91651
Project: 91651
Buggy source:
@Override public void execute(IAction action) throws InvocationTargetException {
  final Repository repository=getRepository(true);
  if (repository == null)   return;
  if (!repository.getRepositoryState().canCheckout()) {
    MessageDialog.openError(getShell(),UIText.BranchAction_cannotCheckout,NLS.bind(UIText.BranchAction_repositoryState,repository.getRepositoryState().getDescription()));
    return;
  }
  BranchSelectionDialog dialog=new BranchSelectionDialog(getShell(),repository);
  dialog.setShowResetType(false);
  if (dialog.open() != IDialogConstants.OK_ID) {
    return;
  }
  final String refName=dialog.getRefName();
  try {
    getTargetPart().getSite().getWorkbenchWindow().run(true,false,new IRunnableWithProgress(){
      public void run(      final IProgressMonitor monitor) throws InvocationTargetException {
        try {
          new BranchOperation(repository,refName).run(monitor);
          GitLightweightDecorator.refresh();
        }
 catch (        final CoreException e) {
          if (GitTraceLocation.UI.isActive())           GitTraceLocation.getTrace().trace(GitTraceLocation.UI.getLocation(),e.getMessage(),e);
          Display.getDefault().asyncExec(new Runnable(){
            public void run(){
              handle(e,UIText.BranchAction_errorSwitchingBranches,UIText.BranchAction_unableToSwitchBranches);
            }
          }
);
        }
      }
    }
);
  }
 catch (  InvocationTargetException e) {
    if (GitTraceLocation.UI.isActive())     GitTraceLocation.getTrace().trace(GitTraceLocation.UI.getLocation(),e.getMessage(),e);
  }
catch (  InterruptedException e) {
    if (GitTraceLocation.UI.isActive())     GitTraceLocation.getTrace().trace(GitTraceLocation.UI.getLocation(),e.getMessage(),e);
  }
}

Fixed version (ground truth):
@Override public void execute(IAction action) throws InvocationTargetException, InterruptedException {
  final Repository repository=getRepository(true);
  if (repository == null)   return;
  if (!repository.getRepositoryState().canCheckout()) {
    MessageDialog.openError(getShell(),UIText.BranchAction_cannotCheckout,NLS.bind(UIText.BranchAction_repositoryState,repository.getRepositoryState().getDescription()));
    return;
  }
  BranchSelectionDialog dialog=new BranchSelectionDialog(getShell(),repository);
  dialog.setShowResetType(false);
  if (dialog.open() != IDialogConstants.OK_ID) {
    return;
  }
  final String refName=dialog.getRefName();
  try {
    getTargetPart().getSite().getWorkbenchWindow().run(true,false,new IRunnableWithProgress(){
      public void run(      final IProgressMonitor monitor) throws InvocationTargetException {
        try {
          new BranchOperation(repository,refName).run(monitor);
          GitLightweightDecorator.refresh();
        }
 catch (        final CoreException e) {
          if (GitTraceLocation.UI.isActive())           GitTraceLocation.getTrace().trace(GitTraceLocation.UI.getLocation(),e.getMessage(),e);
          Display.getDefault().asyncExec(new Runnable(){
            public void run(){
              handle(new TeamException(e.getStatus()),UIText.BranchAction_errorSwitchingBranches,UIText.BranchAction_unableToSwitchBranches);
            }
          }
);
        }
      }
    }
);
  }
 catch (  InvocationTargetException e) {
    if (GitTraceLocation.UI.isActive())     GitTraceLocation.getTrace().trace(GitTraceLocation.UI.getLocation(),e.getMessage(),e);
    throw e;
  }
catch (  InterruptedException e) {
    if (GitTraceLocation.UI.isActive())     GitTraceLocation.getTrace().trace(GitTraceLocation.UI.getLocation(),e.getMessage(),e);
    throw new InvocationTargetException(e);
  }
}