Program: 124880
Project: 124880
Buggy source:
private Object getHadoopClusterRepositoryValue(HadoopClusterConnection hcConnection,String value,IMetadataTable table){
  if (EHDFSRepositoryToComponent.DISTRIBUTION.getRepositoryValue().equals(value)) {
    return hcConnection.getDistribution();
  }
 else   if (EHDFSRepositoryToComponent.DB_VERSION.getRepositoryValue().equals(value)) {
    return hcConnection.getDfVersion();
  }
 else   if (EHDFSRepositoryToComponent.HADOOP_CUSTOM_JARS.getRepositoryValue().equals(value)) {
    return HCVersionUtil.getCompCustomJarsParamFromRep(hcConnection,ECustomVersionGroup.MAP_REDUCE);
  }
 else   if (EHDFSRepositoryToComponent.USE_YARN.getRepositoryValue().equals(value)) {
    return hcConnection.isUseYarn();
  }
 else   if (EHDFSRepositoryToComponent.AUTHENTICATION_MODE.getRepositoryValue().equals(value)) {
    return hcConnection.getAuthMode();
  }
 else   if (EHDFSRepositoryToComponent.FS_DEFAULT_NAME.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getNameNodeURI()));
  }
 else   if (EHDFSRepositoryToComponent.USE_KRB.getRepositoryValue().equals(value)) {
    return hcConnection.isEnableKerberos();
  }
 else   if (EHDFSRepositoryToComponent.NAMENODE_PRINCIPAL.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getPrincipal()));
  }
 else   if (EHDFSRepositoryToComponent.JOBTRACKER_PRINCIPAL.getRepositoryValue().equals(value) || EHDFSRepositoryToComponent.RESOURCEMANAGER_PRINCIPAL.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getJtOrRmPrincipal()));
  }
 else   if (EHDFSRepositoryToComponent.JOBHISTORY_PRINCIPAL.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getJobHistoryPrincipal()));
  }
 else   if (EHDFSRepositoryToComponent.GROUP.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getGroup()));
  }
 else   if (EHDFSRepositoryToComponent.LOCAL.getRepositoryValue().equals(value)) {
    return false;
  }
 else   if (EHDFSRepositoryToComponent.MAPREDUCE.getRepositoryValue().equals(value)) {
    return true;
  }
 else   if (EHDFSRepositoryToComponent.PIG_VERSION.getRepositoryValue().equals(value)) {
    return hcConnection.getDfVersion();
  }
 else   if (EHDFSRepositoryToComponent.MAPRED_JOB_TRACKER.getRepositoryValue().equals(value) || EHDFSRepositoryToComponent.MAPRED_RESOURCE_MANAGER.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getJobTrackerURI());
  }
 else   if (EHDFSRepositoryToComponent.USERNAME.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getUserName()));
  }
 else   if (EHDFSRepositoryToComponent.USE_KEYTAB.getRepositoryValue().equals(value)) {
    return hcConnection.isUseKeytab();
  }
 else   if (EHDFSRepositoryToComponent.KEYTAB_PRINCIPAL.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getKeytabPrincipal()));
  }
 else   if (EHDFSRepositoryToComponent.KEYTAB_PATH.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getKeytab()));
  }
 else   if (EParameterNameForComponent.PARA_NAME_WEBHCAT_HOST.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_HOSTNAME));
  }
 else   if (EParameterNameForComponent.PARA_NAME_WEBHCAT_PORT.getName().equals(value)) {
    return hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_PORT);
  }
 else   if (EParameterNameForComponent.PARA_NAME_WEBHCAT_USERNAME.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_USERNAME));
  }
 else   if (EParameterNameForComponent.PARA_NAME_STATUSDIR.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_JOB_RESULT_FOLDER));
  }
 else   if (EParameterNameForComponent.PARA_NAME_HDINSIGHT_USERNAME.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HDI_USERNAME));
  }
 else   if (EParameterNameForComponent.PARA_NAME_HDINSIGHT_PASSWORD.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HDI_PASSWORD));
  }
 else   if (EParameterNameForComponent.PARA_NAME_WASB_HOST.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_HOSTNAME));
  }
 else   if (EParameterNameForComponent.PARA_NAME_WASB_CONTAINER.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_CONTAINER));
  }
 else   if (EParameterNameForComponent.PARA_NAME_WASB_USERNAME.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_USERNAME));
  }
 else   if (EParameterNameForComponent.PARA_NAME_WASB_PASSWORD.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_PASSWORD));
  }
 else   if (EParameterNameForComponent.PARA_NAME_REMOTE_FOLDER.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_DEPLOY_BLOB));
  }
  return null;
}

Fixed version (ground truth):
private Object getHadoopClusterRepositoryValue(HadoopClusterConnection hcConnection,String value,IMetadataTable table){
  if (EHDFSRepositoryToComponent.DISTRIBUTION.getRepositoryValue().equals(value)) {
    return hcConnection.getDistribution();
  }
 else   if (EHDFSRepositoryToComponent.DB_VERSION.getRepositoryValue().equals(value)) {
    return hcConnection.getDfVersion();
  }
 else   if (EHDFSRepositoryToComponent.HADOOP_CUSTOM_JARS.getRepositoryValue().equals(value)) {
    return HCVersionUtil.getCompCustomJarsParamFromRep(hcConnection,ECustomVersionGroup.MAP_REDUCE);
  }
 else   if (EHDFSRepositoryToComponent.USE_YARN.getRepositoryValue().equals(value)) {
    return hcConnection.isUseYarn();
  }
 else   if (EHDFSRepositoryToComponent.AUTHENTICATION_MODE.getRepositoryValue().equals(value)) {
    return hcConnection.getAuthMode();
  }
 else   if (EHDFSRepositoryToComponent.FS_DEFAULT_NAME.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getNameNodeURI()));
  }
 else   if (EHDFSRepositoryToComponent.USE_KRB.getRepositoryValue().equals(value)) {
    return hcConnection.isEnableKerberos();
  }
 else   if (EHDFSRepositoryToComponent.NAMENODE_PRINCIPAL.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getPrincipal()));
  }
 else   if (EHDFSRepositoryToComponent.JOBTRACKER_PRINCIPAL.getRepositoryValue().equals(value) || EHDFSRepositoryToComponent.RESOURCEMANAGER_PRINCIPAL.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getJtOrRmPrincipal()));
  }
 else   if (EHDFSRepositoryToComponent.JOBHISTORY_PRINCIPAL.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getJobHistoryPrincipal()));
  }
 else   if (EHDFSRepositoryToComponent.GROUP.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getGroup()));
  }
 else   if (EHDFSRepositoryToComponent.LOCAL.getRepositoryValue().equals(value)) {
    return false;
  }
 else   if (EHDFSRepositoryToComponent.MAPREDUCE.getRepositoryValue().equals(value)) {
    return true;
  }
 else   if (EHDFSRepositoryToComponent.PIG_VERSION.getRepositoryValue().equals(value)) {
    return hcConnection.getDfVersion();
  }
 else   if (EHDFSRepositoryToComponent.MAPRED_JOB_TRACKER.getRepositoryValue().equals(value) || EHDFSRepositoryToComponent.MAPRED_RESOURCE_MANAGER.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getJobTrackerURI());
  }
 else   if (EHDFSRepositoryToComponent.USERNAME.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getUserName()));
  }
 else   if (EHDFSRepositoryToComponent.USE_KEYTAB.getRepositoryValue().equals(value)) {
    return hcConnection.isUseKeytab();
  }
 else   if (EHDFSRepositoryToComponent.KEYTAB_PRINCIPAL.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getKeytabPrincipal()));
  }
 else   if (EHDFSRepositoryToComponent.KEYTAB_PATH.getRepositoryValue().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getKeytab()));
  }
 else   if (EParameterNameForComponent.PARA_NAME_WEBHCAT_HOST.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_HOSTNAME));
  }
 else   if (EParameterNameForComponent.PARA_NAME_WEBHCAT_PORT.getName().equals(value)) {
    return hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_PORT);
  }
 else   if (EParameterNameForComponent.PARA_NAME_WEBHCAT_USERNAME.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_USERNAME));
  }
 else   if (EParameterNameForComponent.PARA_NAME_STATUSDIR.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_JOB_RESULT_FOLDER));
  }
 else   if (EParameterNameForComponent.PARA_NAME_HDINSIGHT_USERNAME.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HDI_USERNAME));
  }
 else   if (EParameterNameForComponent.PARA_NAME_HDINSIGHT_PASSWORD.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HDI_PASSWORD));
  }
 else   if (EParameterNameForComponent.PARA_NAME_WASB_HOST.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_HOSTNAME));
  }
 else   if (EParameterNameForComponent.PARA_NAME_WASB_CONTAINER.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_CONTAINER));
  }
 else   if (EParameterNameForComponent.PARA_NAME_WASB_USERNAME.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_USERNAME));
  }
 else   if (EParameterNameForComponent.PARA_NAME_WASB_PASSWORD.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_PASSWORD));
  }
 else   if (EParameterNameForComponent.PARA_NAME_REMOTE_FOLDER.getName().equals(value)) {
    return TalendQuoteUtils.addQuotesIfNotExist(hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_DEPLOY_BLOB));
  }
 else   if (EHDFSRepositoryToComponent.HADOOP_ADVANCED_PROPERTIES.getRepositoryValue().equals(value)) {
    return HadoopRepositoryUtil.getHadoopPropertiesFullList(hcConnection,hcConnection.getHadoopProperties(),true);
  }
  return null;
}