Program: 118970
Project: 118970
Buggy source:
@Override protected void addListeners(){
  super.addListeners();
  finishButton.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (FINISH_BUTTON_ACTION_CREATE_NEW_PROJECT.equals(finishButtonAction)) {
        createNewProject();
      }
 else       if (FINISH_BUTTON_ACTION_IMPORT_DEMO_PROJECT.equals(finishButtonAction)) {
        importDemoProject();
      }
 else       if (FINISH_BUTTON_ACTION_IMPORT_EXISTING_PROJECT.equals(finishButtonAction)) {
        importExistingProject();
      }
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  createNewProject.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (createNewProject.getSelection()) {
        selectNewProjectName();
        validateNewProjectName();
        finishButtonAction=FINISH_BUTTON_ACTION_CREATE_NEW_PROJECT;
      }
 else {
        createNewProject.setText(Messages.getString("String_Node_Str"));
        getErrorManager().clearCreateNewProjectError();
        newProjectName.setVisible(false);
        newProjectName.setBackground(null);
        finishButton.setEnabled(true);
      }
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  newProjectName.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      validateNewProjectName();
    }
  }
);
  importDemoProject.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      finishButtonAction=FINISH_BUTTON_ACTION_IMPORT_DEMO_PROJECT;
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  importExistingProject.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      finishButtonAction=FINISH_BUTTON_ACTION_IMPORT_EXISTING_PROJECT;
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  manageConnections.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      ConnectionsDialog connectionsDialog=new ConnectionsDialog(getShell());
      int open=connectionsDialog.open();
      if (open == Window.OK) {
        LoginFirstTimeStartupActionPageErrorManager iErrorManager=getErrorManager();
        iErrorManager.clearManageConnectionsError();
        iErrorManager.clearManageConnectionsWarn();
        refreshOperationAreaEnable(true);
        List<ConnectionBean> storedConnections=connectionsDialog.getConnections();
        if (storedConnections == null || storedConnections.isEmpty()) {
          defaultConnectionBean=LoginHelper.createDefaultLocalConnection();
          storedConnections=new ArrayList<ConnectionBean>();
          storedConnections.add(defaultConnectionBean);
          LoginHelper.getInstance().setStoredConnections(storedConnections);
          LoginHelper.getInstance().saveConnections(storedConnections);
          setRepositoryContextInContext();
        }
 else         if (storedConnections.size() == 1) {
          defaultConnectionBean=storedConnections.get(0);
          if (defaultConnectionBean.isComplete()) {
            LoginHelper.getInstance().setStoredConnections(storedConnections);
            LoginHelper.getInstance().saveConnections(storedConnections);
            setRepositoryContextInContext();
          }
 else {
            iErrorManager.setManageConnectionsError(Messages.getString("String_Node_Str"));
            refreshOperationAreaEnable(false);
          }
        }
 else {
          try {
            LoginHelper.getInstance().setStoredConnections(storedConnections);
            LoginHelper.getInstance().saveConnections(storedConnections);
            gotoNextPage();
          }
 catch (          Throwable e1) {
            CommonExceptionHandler.process(e1);
          }
        }
      }
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
}

Fixed version (ground truth):
@Override protected void addListeners(){
  super.addListeners();
  finishButton.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (FINISH_BUTTON_ACTION_CREATE_NEW_PROJECT.equals(finishButtonAction)) {
        createNewProject();
      }
 else       if (FINISH_BUTTON_ACTION_IMPORT_DEMO_PROJECT.equals(finishButtonAction)) {
        importDemoProject();
      }
 else       if (FINISH_BUTTON_ACTION_IMPORT_EXISTING_PROJECT.equals(finishButtonAction)) {
        importExistingProject();
      }
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  createNewProject.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (createNewProject.getSelection()) {
        selectNewProjectName();
        validateNewProjectName();
        finishButtonAction=FINISH_BUTTON_ACTION_CREATE_NEW_PROJECT;
      }
 else {
        createNewProject.setText(Messages.getString("String_Node_Str"));
        getErrorManager().clearCreateNewProjectError();
        newProjectName.setVisible(false);
        newProjectName.setBackground(null);
        finishButton.setEnabled(true);
      }
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  newProjectName.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      validateNewProjectName();
    }
  }
);
  importDemoProject.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      finishButtonAction=FINISH_BUTTON_ACTION_IMPORT_DEMO_PROJECT;
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  importExistingProject.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      finishButtonAction=FINISH_BUTTON_ACTION_IMPORT_EXISTING_PROJECT;
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  manageConnections.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      ConnectionsDialog connectionsDialog=new ConnectionsDialog(getShell());
      int open=connectionsDialog.open();
      if (open == Window.OK) {
        LoginFirstTimeStartupActionPageErrorManager iErrorManager=getErrorManager();
        iErrorManager.clearManageConnectionsError();
        iErrorManager.clearManageConnectionsWarn();
        refreshOperationAreaEnable(true);
        List<ConnectionBean> storedConnections=connectionsDialog.getConnections();
        if (storedConnections == null || storedConnections.isEmpty()) {
          defaultConnectionBean=LoginHelper.createDefaultLocalConnection();
          storedConnections=new ArrayList<ConnectionBean>();
          storedConnections.add(defaultConnectionBean);
          LoginHelper.getInstance().setStoredConnections(storedConnections);
          LoginHelper.getInstance().saveConnections(storedConnections);
          setRepositoryContextInContext();
        }
 else         if (storedConnections.size() == 1) {
          defaultConnectionBean=storedConnections.get(0);
          if (defaultConnectionBean.isComplete()) {
            LoginHelper.getInstance().setStoredConnections(storedConnections);
            LoginHelper.getInstance().saveConnections(storedConnections);
            if (LoginHelper.isRemoteConnection(defaultConnectionBean)) {
              try {
                gotoNextPage();
                return;
              }
 catch (              Throwable e1) {
                CommonExceptionHandler.process(e1);
              }
            }
 else {
              setRepositoryContextInContext();
            }
          }
 else {
            iErrorManager.setManageConnectionsError(Messages.getString("String_Node_Str"));
            refreshOperationAreaEnable(false);
          }
        }
 else {
          try {
            LoginHelper.getInstance().setStoredConnections(storedConnections);
            LoginHelper.getInstance().saveConnections(storedConnections);
            gotoNextPage();
            return;
          }
 catch (          Throwable e1) {
            CommonExceptionHandler.process(e1);
          }
        }
      }
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
}