Program: 125587
Project: 125587
Buggy source:
private void adaptHadoopLinkedPartToReadOnly(){
  boolean fromRepository=hcPropertyTypeCombo.getSelectionIndex() == 1;
  hcSelectBtn.setVisible(fromRepository);
  hcRepositoryText.setVisible(fromRepository);
  dbTypeCombo.setReadOnly(fromRepository || isContextMode());
  hbaseDistributionCombo.setReadOnly(fromRepository || isContextMode());
  hbaseVersionCombo.setReadOnly(fromRepository || isContextMode());
  hbaseCustomButton.setEnabled(!fromRepository && !isContextMode());
  impalaDistributionCombo.setReadOnly(fromRepository || isContextMode());
  impalaVersionCombo.setReadOnly(fromRepository || isContextMode());
  impalaCustomButton.setEnabled(!fromRepository && !isContextMode());
  hiveDistributionCombo.setReadOnly(fromRepository || isContextMode());
  hiveVersionCombo.setReadOnly(fromRepository || isContextMode());
  nameNodeURLTxt.setReadOnly(fromRepository || isContextMode());
  jobTrackerURLTxt.setReadOnly(fromRepository || isContextMode());
  hiveCustomButton.setEnabled(!fromRepository && !isContextMode());
  hcPropertyTypeCombo.setReadOnly(isContextMode());
  hiveModeCombo.setReadOnly(isContextMode());
  hiveServerVersionCombo.setReadOnly(isContextMode());
  useKerberos.setEnabled(!isContextMode());
  useKeyTab.setEnabled(!isContextMode());
  browseDriverJarBtn.setEnabled(!isContextMode());
  browseDriverClassButton.setEnabled(!isContextMode());
  hivePrincipalTxt.setEditable(!isContextMode());
  metastoreUrlTxt.setEditable(!isContextMode());
  driverJarTxt.setEditable(!isContextMode());
  driverClassTxt.setReadOnly(isContextMode());
  usernameTxt.setEditable(!isContextMode());
  passwordTxt.setEditable(!isContextMode());
  principalTxt.setEditable(!isContextMode());
  keytabTxt.setEditable(!isContextMode());
  additionalJDBCSettingsText.setEditable(!isContextMode());
  useSSLEncryption.setEnabled(!isContextMode());
  trustStorePath.setEditable(!isContextMode());
  trustStorePassword.setEditable(!isContextMode());
  useMaprTForHive.setEnabled(!isContextMode());
  maprTUsernameForHiveTxt.setEditable(!isContextMode());
  maprTPasswordForHiveTxt.setEditable(!isContextMode());
  maprTClusterForHiveTxt.setEditable(!isContextMode());
  maprTDurationForHiveTxt.setEditable(!isContextMode());
  if (isContextMode()) {
    trustStorePassword.getTextControl().setEchoChar('\0');
  }
 else {
    trustStorePassword.getTextControl().setEchoChar('*');
  }
}

Fixed version (ground truth):
private void adaptHadoopLinkedPartToReadOnly(){
  boolean fromRepository=hcPropertyTypeCombo.getSelectionIndex() == 1;
  hcSelectBtn.setVisible(fromRepository);
  hcRepositoryText.setVisible(fromRepository);
  dbTypeCombo.setReadOnly(fromRepository || isContextMode());
  hbaseDistributionCombo.setReadOnly(fromRepository || isContextMode());
  hbaseVersionCombo.setReadOnly(fromRepository || isContextMode());
  hbaseCustomButton.setEnabled(!fromRepository && !isContextMode());
  impalaDistributionCombo.setReadOnly(fromRepository || isContextMode());
  impalaVersionCombo.setReadOnly(fromRepository || isContextMode());
  impalaCustomButton.setEnabled(!fromRepository && !isContextMode());
  hiveDistributionCombo.setReadOnly(fromRepository || isContextMode());
  hiveVersionCombo.setReadOnly(fromRepository || isContextMode());
  nameNodeURLTxt.setReadOnly(fromRepository || isContextMode());
  jobTrackerURLTxt.setReadOnly(fromRepository || isContextMode());
  hiveCustomButton.setEnabled(!fromRepository && !isContextMode());
  hcPropertyTypeCombo.setReadOnly(isContextMode());
  hiveModeCombo.setReadOnly(isContextMode());
  hiveServerVersionCombo.setReadOnly(isContextMode());
  useKerberos.setEnabled(!isContextMode());
  useKeyTab.setEnabled(!isContextMode());
  browseDriverJarBtn.setEnabled(!isContextMode());
  browseDriverClassButton.setEnabled(!isContextMode());
  hivePrincipalTxt.setEditable(!isContextMode());
  metastoreUrlTxt.setEditable(!isContextMode());
  driverJarTxt.setEditable(!isContextMode());
  driverClassTxt.setReadOnly(isContextMode());
  usernameTxt.setEditable(!isContextMode());
  passwordTxt.setEditable(!isContextMode());
  principalTxt.setEditable(!isContextMode());
  keytabTxt.setEditable(!isContextMode());
  additionalJDBCSettingsText.setEditable(!isContextMode());
  useSSLEncryption.setEnabled(!isContextMode());
  trustStorePath.setEditable(!isContextMode());
  trustStorePassword.setEditable(!isContextMode());
  useMaprTForHive.setEnabled(!isContextMode());
  maprTUsernameForHiveTxt.setEditable(!isContextMode());
  maprTPasswordForHiveTxt.setEditable(!isContextMode());
  maprTClusterForHiveTxt.setEditable(!isContextMode());
  maprTDurationForHiveTxt.setEditable(!isContextMode());
  if (isContextMode()) {
    trustStorePassword.getTextControl().setEchoChar('\0');
    maprTPasswordForHiveTxt.getTextControl().setEchoChar('\0');
  }
 else {
    trustStorePassword.getTextControl().setEchoChar('*');
    maprTPasswordForHiveTxt.getTextControl().setEchoChar('*');
  }
}