Program: 125588
Project: 125588
Buggy source:
private void collectHiveContextParams(){
  if (isHiveDBConnSelected()) {
    getConetxtParams().clear();
    addContextParams(EDBParamName.Login,true);
    addContextParams(EDBParamName.Server,true);
    addContextParams(EDBParamName.Port,true);
    addContextParams(EDBParamName.Database,true);
    addContextParams(EDBParamName.NameNode,useHadoopRepositoryParam());
    addContextParams(EDBParamName.JobTrackerOrResourceManager,useHadoopRepositoryParam());
    addContextParams(EDBParamName.Password,!isHiveEmbeddedMode());
    boolean isHivePrincipal=isHiveDBConnSelected() && doSupportSecurity() && useKerberos.getSelection();
    addContextParams(EDBParamName.HivePrincipal,isHivePrincipal);
    boolean hasAuthentication=isHivePrincipal && isHiveEmbeddedMode();
    addContextParams(EDBParamName.HiveMetastore,hasAuthentication);
    addContextParams(EDBParamName.HiveDriverJar,hasAuthentication);
    addContextParams(EDBParamName.HiveDriveClass,hasAuthentication);
    addContextParams(EDBParamName.HiveUserName,hasAuthentication);
    addContextParams(EDBParamName.HivePassword,hasAuthentication);
    addContextParams(EDBParamName.HiveKeyTabPrincipal,isHivePrincipal && useKeyTab.getSelection());
    addContextParams(EDBParamName.HiveKeyTab,isHivePrincipal && useKeyTab.getSelection());
    addContextParams(EDBParamName.hiveAdditionalJDBCParameters,isSupportHiveAdditionalSettings());
    boolean addSSLEncryptionContext=isSupportHiveEncryption() && isSupportHiveTrustStore();
    addContextParams(EDBParamName.hiveSSLTrustStorePath,addSSLEncryptionContext);
    addContextParams(EDBParamName.hiveSSLTrustStorePassword,addSSLEncryptionContext);
  }
}

Fixed version (ground truth):
private void collectHiveContextParams(){
  if (isHiveDBConnSelected()) {
    getConetxtParams().clear();
    addContextParams(EDBParamName.Login,true);
    addContextParams(EDBParamName.Server,true);
    addContextParams(EDBParamName.Port,true);
    addContextParams(EDBParamName.Database,true);
    addContextParams(EDBParamName.NameNode,useHadoopRepositoryParam());
    addContextParams(EDBParamName.JobTrackerOrResourceManager,useHadoopRepositoryParam());
    addContextParams(EDBParamName.Password,!isHiveEmbeddedMode());
    boolean isHivePrincipal=isHiveDBConnSelected() && doSupportSecurity() && useKerberos.getSelection();
    addContextParams(EDBParamName.HivePrincipal,isHivePrincipal);
    boolean hasAuthentication=isHivePrincipal && isHiveEmbeddedMode();
    addContextParams(EDBParamName.HiveMetastore,hasAuthentication);
    addContextParams(EDBParamName.HiveDriverJar,hasAuthentication);
    addContextParams(EDBParamName.HiveDriveClass,hasAuthentication);
    addContextParams(EDBParamName.HiveUserName,hasAuthentication);
    addContextParams(EDBParamName.HivePassword,hasAuthentication);
    addContextParams(EDBParamName.HiveKeyTabPrincipal,isHivePrincipal && useKeyTab.getSelection());
    addContextParams(EDBParamName.HiveKeyTab,isHivePrincipal && useKeyTab.getSelection());
    addContextParams(EDBParamName.hiveAdditionalJDBCParameters,isSupportHiveAdditionalSettings());
    boolean addSSLEncryptionContext=isSupportHiveEncryption() && isSupportHiveTrustStore();
    addContextParams(EDBParamName.hiveSSLTrustStorePath,addSSLEncryptionContext);
    addContextParams(EDBParamName.hiveSSLTrustStorePassword,addSSLEncryptionContext);
    addContextParams(EDBParamName.Username,!useKerberos.getSelection() && useMaprTForHive.getSelection());
    addContextParams(EDBParamName.Maprticket_Password,!useKerberos.getSelection() && useMaprTForHive.getSelection());
    addContextParams(EDBParamName.Maprticket_Cluster,useMaprTForHive.getSelection());
    addContextParams(EDBParamName.Maprticket_Duration,useMaprTForHive.getSelection());
  }
}