Program: 124749
Project: 124749
Buggy source:
@Override protected void addFieldsListeners(){
  authenticationCombo.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      String newAuthDisplayName=authenticationCombo.getText();
      EAuthenticationMode newAuthMode=EAuthenticationMode.getAuthenticationByDisplayName(newAuthDisplayName);
      String originalAuthName=getConnection().getAuthMode();
      EAuthenticationMode originalAuthMode=EAuthenticationMode.getAuthenticationByName(originalAuthName,false);
      if (newAuthMode != null && newAuthMode != originalAuthMode) {
        getConnection().setAuthMode(newAuthMode.getName());
        updateForm();
        checkFieldsValue();
      }
    }
  }
);
  namenodeUriText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setNameNodeURI(namenodeUriText.getText());
      checkFieldsValue();
    }
  }
);
  jobtrackerUriText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setJobTrackerURI(jobtrackerUriText.getText());
      checkFieldsValue();
    }
  }
);
  rmSchedulerText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setRmScheduler(rmSchedulerText.getText());
      checkFieldsValue();
    }
  }
);
  jobHistoryText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setJobHistory(jobHistoryText.getText());
      checkFieldsValue();
    }
  }
);
  stagingDirectoryText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setStagingDirectory(stagingDirectoryText.getText());
      checkFieldsValue();
    }
  }
);
  useDNHostBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getConnection().setUseDNHost(useDNHostBtn.getSelection());
      checkFieldsValue();
    }
  }
);
  useCustomConfBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      hadoopConfsButton.setEnabled(useCustomConfBtn.getSelection());
      getConnection().setUseCustomConfs(useCustomConfBtn.getSelection());
      checkFieldsValue();
    }
  }
);
  hadoopConfsButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      AbstractHadoopForm form=null;
      if (parentForm instanceof AbstractHadoopForm) {
        form=(AbstractHadoopForm)parentForm;
      }
      HadoopConfsUtils.openHadoopConfsWizard(form,(HadoopClusterConnectionItem)connectionItem,creation);
    }
  }
);
  if (useClouderaNaviBtn != null) {
    useClouderaNaviBtn.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        clouderaNaviButton.setEnabled(useClouderaNaviBtn.getSelection());
        getConnection().setUseClouderaNavi(useClouderaNaviBtn.getSelection());
        checkFieldsValue();
      }
    }
);
    clouderaNaviButton.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        AbstractHadoopForm form=null;
        if (parentForm instanceof AbstractHadoopForm) {
          form=(AbstractHadoopForm)parentForm;
        }
        HadoopConfsUtils.openClouderaNaviWizard(form,(HadoopClusterConnectionItem)connectionItem,creation);
      }
    }
);
  }
  rmSchedulerText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setRmScheduler(rmSchedulerText.getText());
      checkFieldsValue();
    }
  }
);
  jobHistoryText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setJobHistory(jobHistoryText.getText());
      checkFieldsValue();
    }
  }
);
  stagingDirectoryText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setStagingDirectory(stagingDirectoryText.getText());
      checkFieldsValue();
    }
  }
);
  useDNHostBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getConnection().setUseDNHost(useDNHostBtn.getSelection());
      checkFieldsValue();
    }
  }
);
  useCustomConfBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      hadoopConfsButton.setEnabled(useCustomConfBtn.getSelection());
      getConnection().setUseCustomConfs(useCustomConfBtn.getSelection());
      checkFieldsValue();
    }
  }
);
  namenodePrincipalText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setPrincipal(namenodePrincipalText.getText());
      checkFieldsValue();
    }
  }
);
  jtOrRmPrincipalText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setJtOrRmPrincipal(jtOrRmPrincipalText.getText());
      checkFieldsValue();
    }
  }
);
  jobHistoryPrincipalText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      getConnection().setJobHistoryPrincipal(jobHistoryPrincipalText.getText());
      checkFieldsValue();
    }
  }
);
  userNameText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setUserName(userNameText.getText());
      checkFieldsValue();
    }
  }
);
  groupText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setGroup(groupText.getText());
      checkFieldsValue();
    }
  }
);
  kerberosBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      hideControl(authNodejtOrRmHistoryComposite,!kerberosBtn.getSelection());
      hideControl(authKeytabComposite,!kerberosBtn.getSelection());
      hideControl(maprTPasswordCompposite,kerberosBtn.getSelection() && maprTBtn.getSelection());
      getConnection().setEnableKerberos(kerberosBtn.getSelection());
      updateForm();
      checkFieldsValue();
    }
  }
);
  keytabBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getConnection().setUseKeytab(keytabBtn.getSelection());
      updateForm();
      checkFieldsValue();
    }
  }
);
  keytabPrincipalText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setKeytabPrincipal(keytabPrincipalText.getText());
      checkFieldsValue();
    }
  }
);
  keytabText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setKeytab(keytabText.getText());
      checkFieldsValue();
    }
  }
);
  maprTBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      hideControl(maprTPCDCompposite,!maprTBtn.getSelection());
      hideControl(maprTSetComposite,!maprTBtn.getSelection());
      getConnection().setEnableMaprT(maprTBtn.getSelection());
      updateForm();
      checkFieldsValue();
    }
  }
);
  maprTPasswordText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setMaprTPassword(maprTPasswordText.getText());
      checkFieldsValue();
    }
  }
);
  maprTClusterText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setMaprTCluster(maprTClusterText.getText());
      checkFieldsValue();
    }
  }
);
  maprTDurationText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setMaprTDuration(maprTDurationText.getText());
      checkFieldsValue();
    }
  }
);
  setMaprTHomeDirBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getConnection().setSetMaprTHomeDir(setMaprTHomeDirBtn.getSelection());
      maprTHomeDirText.setText(getConnection().getMaprTHomeDir());
      updateForm();
      checkFieldsValue();
    }
  }
);
  maprTHomeDirText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setMaprTHomeDir(maprTHomeDirText.getText());
      checkFieldsValue();
    }
  }
);
  setHadoopLoginBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getConnection().setSetHadoopLogin(setHadoopLoginBtn.getSelection());
      maprTHadoopLoginText.setText(getConnection().getMaprTHadoopLogin());
      updateForm();
      checkFieldsValue();
    }
  }
);
  maprTHadoopLoginText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setMaprTHadoopLogin(maprTHadoopLoginText.getText());
      checkFieldsValue();
    }
  }
);
  preloadAuthentificationBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getConnection().setPreloadAuthentification(preloadAuthentificationBtn.getSelection());
      updateForm();
      checkFieldsValue();
    }
  }
);
}

Fixed version (ground truth):
@Override protected void addFieldsListeners(){
  authenticationCombo.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      String newAuthDisplayName=authenticationCombo.getText();
      EAuthenticationMode newAuthMode=EAuthenticationMode.getAuthenticationByDisplayName(newAuthDisplayName);
      String originalAuthName=getConnection().getAuthMode();
      EAuthenticationMode originalAuthMode=EAuthenticationMode.getAuthenticationByName(originalAuthName,false);
      if (newAuthMode != null && newAuthMode != originalAuthMode) {
        if (EAuthenticationMode.UGI.equals(newAuthMode)) {
          maprTBtn.setEnabled(true);
          hideControl(maprTBtn,false);
          if (maprTBtn.getSelection()) {
            hideControl(maprTPCDCompposite,false);
            hideControl(maprTSetComposite,false);
          }
          authMaprTComposite.layout();
          authMaprTComposite.getParent().layout();
        }
        getConnection().setAuthMode(newAuthMode.getName());
        updateForm();
        checkFieldsValue();
      }
    }
  }
);
  namenodeUriText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setNameNodeURI(namenodeUriText.getText());
      checkFieldsValue();
    }
  }
);
  jobtrackerUriText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setJobTrackerURI(jobtrackerUriText.getText());
      checkFieldsValue();
    }
  }
);
  rmSchedulerText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setRmScheduler(rmSchedulerText.getText());
      checkFieldsValue();
    }
  }
);
  jobHistoryText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setJobHistory(jobHistoryText.getText());
      checkFieldsValue();
    }
  }
);
  stagingDirectoryText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setStagingDirectory(stagingDirectoryText.getText());
      checkFieldsValue();
    }
  }
);
  useDNHostBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getConnection().setUseDNHost(useDNHostBtn.getSelection());
      checkFieldsValue();
    }
  }
);
  useCustomConfBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      hadoopConfsButton.setEnabled(useCustomConfBtn.getSelection());
      getConnection().setUseCustomConfs(useCustomConfBtn.getSelection());
      checkFieldsValue();
    }
  }
);
  hadoopConfsButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      AbstractHadoopForm form=null;
      if (parentForm instanceof AbstractHadoopForm) {
        form=(AbstractHadoopForm)parentForm;
      }
      HadoopConfsUtils.openHadoopConfsWizard(form,(HadoopClusterConnectionItem)connectionItem,creation);
    }
  }
);
  if (useClouderaNaviBtn != null) {
    useClouderaNaviBtn.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        clouderaNaviButton.setEnabled(useClouderaNaviBtn.getSelection());
        getConnection().setUseClouderaNavi(useClouderaNaviBtn.getSelection());
        checkFieldsValue();
      }
    }
);
    clouderaNaviButton.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        AbstractHadoopForm form=null;
        if (parentForm instanceof AbstractHadoopForm) {
          form=(AbstractHadoopForm)parentForm;
        }
        HadoopConfsUtils.openClouderaNaviWizard(form,(HadoopClusterConnectionItem)connectionItem,creation);
      }
    }
);
  }
  rmSchedulerText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setRmScheduler(rmSchedulerText.getText());
      checkFieldsValue();
    }
  }
);
  jobHistoryText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setJobHistory(jobHistoryText.getText());
      checkFieldsValue();
    }
  }
);
  stagingDirectoryText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setStagingDirectory(stagingDirectoryText.getText());
      checkFieldsValue();
    }
  }
);
  useDNHostBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getConnection().setUseDNHost(useDNHostBtn.getSelection());
      checkFieldsValue();
    }
  }
);
  useCustomConfBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      hadoopConfsButton.setEnabled(useCustomConfBtn.getSelection());
      getConnection().setUseCustomConfs(useCustomConfBtn.getSelection());
      checkFieldsValue();
    }
  }
);
  namenodePrincipalText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setPrincipal(namenodePrincipalText.getText());
      checkFieldsValue();
    }
  }
);
  jtOrRmPrincipalText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setJtOrRmPrincipal(jtOrRmPrincipalText.getText());
      checkFieldsValue();
    }
  }
);
  jobHistoryPrincipalText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      getConnection().setJobHistoryPrincipal(jobHistoryPrincipalText.getText());
      checkFieldsValue();
    }
  }
);
  userNameText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setUserName(userNameText.getText());
      checkFieldsValue();
    }
  }
);
  groupText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setGroup(groupText.getText());
      checkFieldsValue();
    }
  }
);
  kerberosBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      hideControl(authNodejtOrRmHistoryComposite,!kerberosBtn.getSelection());
      hideControl(authKeytabComposite,!kerberosBtn.getSelection());
      hideControl(maprTPasswordCompposite,kerberosBtn.getSelection() && maprTBtn.getSelection());
      getConnection().setEnableKerberos(kerberosBtn.getSelection());
      updateForm();
      checkFieldsValue();
    }
  }
);
  keytabBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getConnection().setUseKeytab(keytabBtn.getSelection());
      updateForm();
      checkFieldsValue();
    }
  }
);
  keytabPrincipalText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setKeytabPrincipal(keytabPrincipalText.getText());
      checkFieldsValue();
    }
  }
);
  keytabText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setKeytab(keytabText.getText());
      checkFieldsValue();
    }
  }
);
  maprTBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      hideControl(maprTPCDCompposite,!maprTBtn.getSelection());
      hideControl(maprTSetComposite,!maprTBtn.getSelection());
      getConnection().setEnableMaprT(maprTBtn.getSelection());
      updateForm();
      checkFieldsValue();
    }
  }
);
  maprTPasswordText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setMaprTPassword(maprTPasswordText.getText());
      checkFieldsValue();
    }
  }
);
  maprTClusterText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setMaprTCluster(maprTClusterText.getText());
      checkFieldsValue();
    }
  }
);
  maprTDurationText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setMaprTDuration(maprTDurationText.getText());
      checkFieldsValue();
    }
  }
);
  setMaprTHomeDirBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getConnection().setSetMaprTHomeDir(setMaprTHomeDirBtn.getSelection());
      maprTHomeDirText.setText(getConnection().getMaprTHomeDir());
      updateForm();
      checkFieldsValue();
    }
  }
);
  maprTHomeDirText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setMaprTHomeDir(maprTHomeDirText.getText());
      checkFieldsValue();
    }
  }
);
  setHadoopLoginBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getConnection().setSetHadoopLogin(setHadoopLoginBtn.getSelection());
      maprTHadoopLoginText.setText(getConnection().getMaprTHadoopLogin());
      updateForm();
      checkFieldsValue();
    }
  }
);
  maprTHadoopLoginText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setMaprTHadoopLogin(maprTHadoopLoginText.getText());
      checkFieldsValue();
    }
  }
);
  preloadAuthentificationBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getConnection().setPreloadAuthentification(preloadAuthentificationBtn.getSelection());
      updateForm();
      checkFieldsValue();
    }
  }
);
}