Program: 124931
Project: 124931
Buggy source:
protected void addListeners(){
  if (propertiesTableView != null) {
    propertiesTableView.getExtendedTableModel().addAfterOperationListListener(new IListenableListListener(){
      @Override public void handleEvent(      ListenableListEvent event){
        updateModel();
      }
    }
);
    propertiesTableView.getExtendedTableModel().addModifiedBeanListener(new IModifiedBeanListener<HashMap<String,Object>>(){
      @Override public void handleEvent(      ModifiedBeanEvent<HashMap<String,Object>> event){
        updateModel();
      }
    }
);
  }
  kerbBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      setEnableKerberos(kerbBtn.getSelection());
      initUI();
    }
  }
);
  principalText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      setPrincipal(principalText.getText());
    }
  }
);
  if (ooziePropertyTypeCombo != null) {
    ooziePropertyTypeCombo.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      ModifyEvent e){
        oozieSelectBtn.setVisible(ooziePropertyTypeCombo.getSelectionIndex() == 1);
        oozieRepositoryText.setVisible(ooziePropertyTypeCombo.getSelectionIndex() == 1);
        if (ooziePropertyTypeCombo.getSelectionIndex() == 0) {
          IProcess2 process=OozieJobTrackerListener.getProcess();
          process.getElementParameter(EOozieParameterName.REPOSITORY_CONNECTION_ID.getName()).setValue("String_Node_Str");
          oozieRepositoryText.setText("String_Node_Str");
          setRepositoryId("String_Node_Str");
        }
        updateProperty();
      }
    }
);
  }
  if (oozieSelectBtn != null) {
    oozieSelectBtn.addSelectionListener(new SelectionListener(){
      @Override public void widgetSelected(      SelectionEvent e){
        RepositoryReviewDialog dialog=new RepositoryReviewDialog(new Shell(),ERepositoryObjectType.METADATA,"String_Node_Str");
        if (dialog.open() == RepositoryReviewDialog.OK) {
          String id=dialog.getResult().getObject().getId();
          repositoryId=id;
          oozieRepositoryText.setText(dialog.getResult().getObject().getLabel());
          IProcess2 process=OozieJobTrackerListener.getProcess();
          process.getElementParameter(EOozieParameterName.REPOSITORY_CONNECTION_ID.getName()).setValue(repositoryId);
          enableKerberos=enableKerberosFromRepository(repositoryId);
          kerbBtn.setSelection(enableKerberos);
        }
        updateProperty();
      }
      @Override public void widgetDefaultSelected(      SelectionEvent e){
      }
    }
);
  }
  hadoopDistributionCombo.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      String newDistributionDisplayName=hadoopDistributionCombo.getText();
      EHadoopDistributions distribution=EHadoopDistributions.getDistributionByDisplayName(newDistributionDisplayName);
      if (distribution != null) {
        if (hadoopDistributionValue != null && !hadoopDistributionValue.equals(newDistributionDisplayName)) {
          hadoopDistributionValue=distribution.getName();
          updateVersionPart(distribution);
          initUI();
        }
      }
    }
  }
);
  hadoopVersionCombo.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      String newVersionDisplayName=hadoopVersionCombo.getText();
      EHadoopVersion4Drivers newVersion4Drivers=EHadoopVersion4Drivers.indexOfByVersionDisplay(newVersionDisplayName);
      if (newVersion4Drivers != null) {
        hadoopVersionValue=newVersion4Drivers.getVersionValue();
        boolean isSupportSecurity=isSupportSecurity(newVersion4Drivers);
        updateSetting(isSupportSecurity);
      }
    }
  }
);
  customButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      HadoopCustomVersionDefineDialog customVersionDialog=new HadoopCustomVersionDefineDialog(getShell(),getCustomVersionMap()){
        @Override protected ECustomVersionType[] getDisplayTypes(){
          return new ECustomVersionType[]{ECustomVersionType.OOZIE};
        }
      }
;
      if (customVersionDialog.open() == Window.OK) {
        customJars=customVersionDialog.getLibListStr(ECustomVersionGroup.COMMON);
      }
    }
  }
);
  nameNodeEndPointTxt.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      nameNodeEndPointValue=nameNodeEndPointTxt.getText();
    }
  }
);
  jobTrackerEndPointTxt.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      jobTrackerEndPointValue=jobTrackerEndPointTxt.getText();
    }
  }
);
  oozieEndPointTxt.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      oozieEndPointValue=oozieEndPointTxt.getText();
    }
  }
);
  userNameTxt.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      userNameValue=userNameTxt.getText();
    }
  }
);
}

Fixed version (ground truth):
protected void addListeners(){
  if (propertiesTableView != null) {
    propertiesTableView.getExtendedTableModel().addAfterOperationListListener(new IListenableListListener(){
      @Override public void handleEvent(      ListenableListEvent event){
        updateModel();
      }
    }
);
    propertiesTableView.getExtendedTableModel().addModifiedBeanListener(new IModifiedBeanListener<HashMap<String,Object>>(){
      @Override public void handleEvent(      ModifiedBeanEvent<HashMap<String,Object>> event){
        updateModel();
      }
    }
);
  }
  kerbBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      setEnableKerberos(kerbBtn.getSelection());
      initUI();
    }
  }
);
  principalText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      setPrincipal(principalText.getText());
    }
  }
);
  if (ooziePropertyTypeCombo != null) {
    ooziePropertyTypeCombo.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      ModifyEvent e){
        oozieSelectBtn.setVisible(ooziePropertyTypeCombo.getSelectionIndex() == 1);
        oozieRepositoryText.setVisible(ooziePropertyTypeCombo.getSelectionIndex() == 1);
        if (ooziePropertyTypeCombo.getSelectionIndex() == 0) {
          IProcess2 process=OozieJobTrackerListener.getProcess();
          process.getElementParameter(EOozieParameterName.REPOSITORY_CONNECTION_ID.getName()).setValue("String_Node_Str");
          oozieRepositoryText.setText("String_Node_Str");
          setRepositoryId("String_Node_Str");
          model.setProperties(new ArrayList<HashMap<String,Object>>());
          propertiesTableView.getTable().redraw();
        }
        updateProperty();
      }
    }
);
  }
  if (oozieSelectBtn != null) {
    oozieSelectBtn.addSelectionListener(new SelectionListener(){
      @Override public void widgetSelected(      SelectionEvent e){
        RepositoryReviewDialog dialog=new RepositoryReviewDialog(new Shell(),ERepositoryObjectType.METADATA,"String_Node_Str");
        if (dialog.open() == RepositoryReviewDialog.OK) {
          String id=dialog.getResult().getObject().getId();
          repositoryId=id;
          oozieRepositoryText.setText(dialog.getResult().getObject().getLabel());
          IProcess2 process=OozieJobTrackerListener.getProcess();
          process.getElementParameter(EOozieParameterName.REPOSITORY_CONNECTION_ID.getName()).setValue(repositoryId);
          enableKerberos=enableKerberosFromRepository(repositoryId);
          kerbBtn.setSelection(enableKerberos);
          model.setProperties(getHadoopProperties(repositoryId));
          propertiesTableView.getTable().redraw();
        }
        updateProperty();
      }
      @Override public void widgetDefaultSelected(      SelectionEvent e){
      }
    }
);
  }
  hadoopDistributionCombo.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      String newDistributionDisplayName=hadoopDistributionCombo.getText();
      EHadoopDistributions distribution=EHadoopDistributions.getDistributionByDisplayName(newDistributionDisplayName);
      if (distribution != null) {
        if (hadoopDistributionValue != null && !hadoopDistributionValue.equals(newDistributionDisplayName)) {
          hadoopDistributionValue=distribution.getName();
          updateVersionPart(distribution);
          initUI();
        }
      }
    }
  }
);
  hadoopVersionCombo.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      String newVersionDisplayName=hadoopVersionCombo.getText();
      EHadoopVersion4Drivers newVersion4Drivers=EHadoopVersion4Drivers.indexOfByVersionDisplay(newVersionDisplayName);
      if (newVersion4Drivers != null) {
        hadoopVersionValue=newVersion4Drivers.getVersionValue();
        boolean isSupportSecurity=isSupportSecurity(newVersion4Drivers);
        updateSetting(isSupportSecurity);
      }
    }
  }
);
  customButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      HadoopCustomVersionDefineDialog customVersionDialog=new HadoopCustomVersionDefineDialog(getShell(),getCustomVersionMap()){
        @Override protected ECustomVersionType[] getDisplayTypes(){
          return new ECustomVersionType[]{ECustomVersionType.OOZIE};
        }
      }
;
      if (customVersionDialog.open() == Window.OK) {
        customJars=customVersionDialog.getLibListStr(ECustomVersionGroup.COMMON);
      }
    }
  }
);
  nameNodeEndPointTxt.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      nameNodeEndPointValue=nameNodeEndPointTxt.getText();
    }
  }
);
  jobTrackerEndPointTxt.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      jobTrackerEndPointValue=jobTrackerEndPointTxt.getText();
    }
  }
);
  oozieEndPointTxt.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      oozieEndPointValue=oozieEndPointTxt.getText();
    }
  }
);
  userNameTxt.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      userNameValue=userNameTxt.getText();
    }
  }
);
}