Program: 124800
Project: 124800
Buggy source:
@Override public List<IContextParameter> createContextParameters(String prefixName,Connection connection,Set<IConnParamName> paramSet){
  List<IContextParameter> varList=new ArrayList<IContextParameter>();
  if (connection instanceof HadoopClusterConnection) {
    HadoopClusterConnection conn=(HadoopClusterConnection)connection;
    String paramPrefix=prefixName + ConnectionContextHelper.LINE;
    String paramName=null;
    for (    IConnParamName param : paramSet) {
      if (param instanceof EHadoopParamName) {
        EHadoopParamName hadoopParam=(EHadoopParamName)param;
        paramName=paramPrefix + hadoopParam;
switch (hadoopParam) {
case NameNodeUri:
          ConnectionContextHelper.createParameters(varList,paramName,conn.getNameNodeURI());
        break;
case JobTrackerUri:
      ConnectionContextHelper.createParameters(varList,paramName,conn.getJobTrackerURI());
    break;
case ResourceManager:
  ConnectionContextHelper.createParameters(varList,paramName,conn.getJobTrackerURI());
break;
case ResourceManagerScheduler:
ConnectionContextHelper.createParameters(varList,paramName,conn.getRmScheduler());
break;
case JobHistory:
ConnectionContextHelper.createParameters(varList,paramName,conn.getJobHistory());
break;
case StagingDirectory:
ConnectionContextHelper.createParameters(varList,paramName,conn.getStagingDirectory());
break;
case NameNodePrin:
ConnectionContextHelper.createParameters(varList,paramName,conn.getPrincipal());
break;
case JTOrRMPrin:
ConnectionContextHelper.createParameters(varList,paramName,conn.getJtOrRmPrincipal());
break;
case JobHistroyPrin:
ConnectionContextHelper.createParameters(varList,paramName,conn.getJobHistoryPrincipal());
break;
case User:
ConnectionContextHelper.createParameters(varList,paramName,conn.getUserName());
break;
case Group:
ConnectionContextHelper.createParameters(varList,paramName,conn.getGroup());
break;
case Principal:
ConnectionContextHelper.createParameters(varList,paramName,conn.getKeytabPrincipal());
break;
case KeyTab:
ConnectionContextHelper.createParameters(varList,paramName,conn.getKeytab());
break;
case WebHostName:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_HOSTNAME));
break;
case WebPort:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_PORT));
break;
case WebUser:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_USERNAME));
break;
case WebJobResFolder:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_JOB_RESULT_FOLDER));
break;
case HDIUser:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HDI_USERNAME));
break;
case HDIPassword:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HDI_PASSWORD),JavaTypesManager.PASSWORD);
break;
case KeyAzureHost:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_HOSTNAME));
break;
case KeyAzureContainer:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_CONTAINER));
break;
case KeyAzuresUser:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_USERNAME));
break;
case KeyAzurePassword:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_PASSWORD),JavaTypesManager.PASSWORD);
break;
case KeyAzureDeployBlob:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_DEPLOY_BLOB));
break;
default :
}
}
}
createHadoopPropertiesContextVariable(prefixName,varList,conn.getHadoopProperties());
}
return varList;
}

Fixed version (ground truth):
@Override public List<IContextParameter> createContextParameters(String prefixName,Connection connection,Set<IConnParamName> paramSet){
  List<IContextParameter> varList=new ArrayList<IContextParameter>();
  if (connection instanceof HadoopClusterConnection) {
    HadoopClusterConnection conn=(HadoopClusterConnection)connection;
    String paramPrefix=prefixName + ConnectionContextHelper.LINE;
    String paramName=null;
    for (    IConnParamName param : paramSet) {
      if (param instanceof EHadoopParamName) {
        EHadoopParamName hadoopParam=(EHadoopParamName)param;
        paramName=paramPrefix + hadoopParam;
switch (hadoopParam) {
case NameNodeUri:
          ConnectionContextHelper.createParameters(varList,paramName,conn.getNameNodeURI());
        break;
case JobTrackerUri:
      ConnectionContextHelper.createParameters(varList,paramName,conn.getJobTrackerURI());
    break;
case ResourceManager:
  ConnectionContextHelper.createParameters(varList,paramName,conn.getJobTrackerURI());
break;
case ResourceManagerScheduler:
ConnectionContextHelper.createParameters(varList,paramName,conn.getRmScheduler());
break;
case JobHistory:
ConnectionContextHelper.createParameters(varList,paramName,conn.getJobHistory());
break;
case StagingDirectory:
ConnectionContextHelper.createParameters(varList,paramName,conn.getStagingDirectory());
break;
case NameNodePrin:
ConnectionContextHelper.createParameters(varList,paramName,conn.getPrincipal());
break;
case JTOrRMPrin:
ConnectionContextHelper.createParameters(varList,paramName,conn.getJtOrRmPrincipal());
break;
case JobHistroyPrin:
ConnectionContextHelper.createParameters(varList,paramName,conn.getJobHistoryPrincipal());
break;
case User:
ConnectionContextHelper.createParameters(varList,paramName,conn.getUserName());
break;
case Group:
ConnectionContextHelper.createParameters(varList,paramName,conn.getGroup());
break;
case Principal:
ConnectionContextHelper.createParameters(varList,paramName,conn.getKeytabPrincipal());
break;
case KeyTab:
ConnectionContextHelper.createParameters(varList,paramName,conn.getKeytab());
break;
case WebHostName:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_HOSTNAME));
break;
case WebPort:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_PORT));
break;
case WebUser:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_USERNAME));
break;
case WebJobResFolder:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_WEB_HCAT_JOB_RESULT_FOLDER));
break;
case HDIUser:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HDI_USERNAME));
break;
case HDIPassword:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HDI_PASSWORD),JavaTypesManager.PASSWORD);
break;
case KeyAzureHost:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_HOSTNAME));
break;
case KeyAzureContainer:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_CONTAINER));
break;
case KeyAzuresUser:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_USERNAME));
break;
case KeyAzurePassword:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_PASSWORD),JavaTypesManager.PASSWORD);
break;
case KeyAzureDeployBlob:
ConnectionContextHelper.createParameters(varList,paramName,conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_AZURE_DEPLOY_BLOB));
break;
case ClouderaNavigatorUsername:
ConnectionContextHelper.createParameters(varList,paramName,conn.getClouderaNaviUserName());
break;
case ClouderaNavigatorPassword:
ConnectionContextHelper.createParameters(varList,paramName,conn.getClouderaNaviPassword());
break;
case ClouderaNavigatorUrl:
ConnectionContextHelper.createParameters(varList,paramName,conn.getClouderaNaviUrl());
break;
case ClouderaNavigatorMetadataUrl:
ConnectionContextHelper.createParameters(varList,paramName,conn.getClouderaNaviMetadataUrl());
break;
case ClouderaNavigatorClientUrl:
ConnectionContextHelper.createParameters(varList,paramName,conn.getClouderaNaviClientUrl());
break;
default :
}
}
}
createHadoopPropertiesContextVariable(prefixName,varList,conn.getHadoopProperties());
}
return varList;
}