Program: 126960
Project: 126960
Buggy source:
static List<IContextParameter> getSalesforceVariables(String prefixName,SalesforceSchemaConnection ssConn){
  if (ssConn == null || prefixName == null) {
    return Collections.emptyList();
  }
  List<IContextParameter> varList=new ArrayList<IContextParameter>();
  prefixName=prefixName + ConnectionContextHelper.LINE;
  String paramName=null;
  if (ssConn.getLoginType().equals(BASIC)) {
    paramName=prefixName + EParamName.WebServiceUrl;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getWebServiceUrl());
    paramName=prefixName + EParamName.UserName;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getUserName());
    paramName=prefixName + EParamName.Password;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getPassword(),JavaTypesManager.PASSWORD);
    paramName=prefixName + EParamName.BatchSize;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getBatchSize());
    paramName=prefixName + EParamName.TimeOut;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getTimeOut(),JavaTypesManager.INTEGER);
    paramName=prefixName + EParamName.QueryCondition;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getQueryCondition());
    paramName=prefixName + EParamName.SFProxyHost;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getProxyHost());
    paramName=prefixName + EParamName.SFProxyPort;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getProxyPort());
    paramName=prefixName + EParamName.SFProxyUsername;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getProxyUsername());
    paramName=prefixName + EParamName.SFProxyPassword;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getProxyPassword());
  }
 else {
    paramName=prefixName + EParamName.WebServiceUrlForOauth;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getWebServiceUrlTextForOAuth());
    paramName=prefixName + EParamName.ConsumerKey;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getConsumeKey());
    paramName=prefixName + EParamName.ConsumerSecret;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getConsumeSecret());
    paramName=prefixName + EParamName.CallbackHost;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getCallbackHost());
    paramName=prefixName + EParamName.CallbackPort;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getCallbackPort(),JavaTypesManager.INTEGER);
    paramName=prefixName + EParamName.SalesforceVersion;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getSalesforceVersion());
    paramName=prefixName + EParamName.token;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getToken());
    paramName=prefixName + EParamName.BatchSize;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getBatchSize());
    paramName=prefixName + EParamName.TimeOut;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getTimeOut(),JavaTypesManager.INTEGER);
    paramName=prefixName + EParamName.QueryCondition;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getQueryCondition());
  }
  return varList;
}

Fixed version (ground truth):
static List<IContextParameter> getSalesforceVariables(String prefixName,SalesforceSchemaConnection ssConn){
  if (ssConn == null || prefixName == null) {
    return Collections.emptyList();
  }
  List<IContextParameter> varList=new ArrayList<IContextParameter>();
  prefixName=prefixName + ConnectionContextHelper.LINE;
  String paramName=null;
  if (ssConn.getLoginType().equalsIgnoreCase(BASIC)) {
    paramName=prefixName + EParamName.WebServiceUrl;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getWebServiceUrl());
    paramName=prefixName + EParamName.UserName;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getUserName());
    paramName=prefixName + EParamName.Password;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getPassword(),JavaTypesManager.PASSWORD);
    paramName=prefixName + EParamName.BatchSize;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getBatchSize());
    paramName=prefixName + EParamName.TimeOut;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getTimeOut(),JavaTypesManager.INTEGER);
    paramName=prefixName + EParamName.QueryCondition;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getQueryCondition());
    paramName=prefixName + EParamName.SFProxyHost;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getProxyHost());
    paramName=prefixName + EParamName.SFProxyPort;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getProxyPort());
    paramName=prefixName + EParamName.SFProxyUsername;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getProxyUsername());
    paramName=prefixName + EParamName.SFProxyPassword;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getProxyPassword());
  }
 else {
    paramName=prefixName + EParamName.WebServiceUrlForOauth;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getWebServiceUrlTextForOAuth());
    paramName=prefixName + EParamName.ConsumerKey;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getConsumeKey());
    paramName=prefixName + EParamName.ConsumerSecret;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getConsumeSecret());
    paramName=prefixName + EParamName.CallbackHost;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getCallbackHost());
    paramName=prefixName + EParamName.CallbackPort;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getCallbackPort(),JavaTypesManager.INTEGER);
    paramName=prefixName + EParamName.SalesforceVersion;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getSalesforceVersion());
    paramName=prefixName + EParamName.token;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getToken());
    paramName=prefixName + EParamName.BatchSize;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getBatchSize());
    paramName=prefixName + EParamName.TimeOut;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getTimeOut(),JavaTypesManager.INTEGER);
    paramName=prefixName + EParamName.QueryCondition;
    ConnectionContextHelper.createParameters(varList,paramName,ssConn.getQueryCondition());
  }
  return varList;
}