Program: 126936
Project: 126936
Buggy source:
/** 
 * DOC YeXiaowei Comment method "getSalesforceSchemaValue".
 * @param connection
 * @param value
 * @return
 */
private static Object getSalesforceSchemaValue(SalesforceSchemaConnection connection,String value,IMetadataTable table){
  if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getWebServiceUrl()) || isContextMode(connection,connection.getWebServiceUrlTextForOAuth())) {
      if (connection.getLoginType().equals("String_Node_Str")) {
        return connection.getWebServiceUrl();
      }
 else {
        return connection.getWebServiceUrlTextForOAuth();
      }
    }
 else {
      if (connection.getLoginType().equals("String_Node_Str")) {
        return TalendQuoteUtils.addQuotes(connection.getWebServiceUrl());
      }
 else {
        return TalendQuoteUtils.addQuotes(connection.getWebServiceUrlTextForOAuth());
      }
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getUserName())) {
      return connection.getUserName();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getUserName());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getPassword())) {
      return connection.getPassword();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getPassword());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (connection.isUseCustomModuleName()) {
      return "String_Node_Str";
    }
 else {
      if (table != null) {
        EList<SalesforceModuleUnit> moduleList=connection.getModules();
        for (        SalesforceModuleUnit unit : moduleList) {
          if (table.getLabel().equals(unit.getModuleName())) {
            return unit.getModuleName();
          }
        }
      }
      return connection.getModuleName();
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getQueryCondition())) {
      return connection.getQueryCondition();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getQueryCondition());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    return connection.getBatchSize();
  }
 else   if ("String_Node_Str".equals(value)) {
    return connection.isUseProxy();
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getProxyHost())) {
      return connection.getProxyHost();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getProxyHost());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getProxyPort())) {
      return connection.getProxyPort();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getProxyPort());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getProxyUsername())) {
      return connection.getProxyUsername();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getProxyUsername());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getProxyPassword())) {
      return connection.getProxyPassword();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getProxyPassword());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getTimeOut())) {
      return connection.getTimeOut();
    }
 else {
      return connection.getTimeOut();
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getSalesforceVersion())) {
      return connection.getSalesforceVersion();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getSalesforceVersion());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getConsumeKey())) {
      return connection.getConsumeKey();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getConsumeKey());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getConsumeSecret())) {
      return connection.getConsumeSecret();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getConsumeSecret());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getCallbackHost())) {
      return connection.getCallbackHost();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getCallbackHost());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getCallbackPort())) {
      return connection.getCallbackPort();
    }
 else {
      return connection.getCallbackPort();
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getLoginType())) {
      return connection.getLoginType();
    }
 else {
      if (connection.getLoginType().equals("String_Node_Str")) {
        return "String_Node_Str";
      }
 else {
        return "String_Node_Str";
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * DOC YeXiaowei Comment method "getSalesforceSchemaValue".
 * @param connection
 * @param value
 * @return
 */
private static Object getSalesforceSchemaValue(SalesforceSchemaConnection connection,String value,IMetadataTable table){
  if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getWebServiceUrl()) || isContextMode(connection,connection.getWebServiceUrlTextForOAuth())) {
      if (connection.getLoginType().equalsIgnoreCase("String_Node_Str")) {
        return connection.getWebServiceUrl();
      }
 else {
        return connection.getWebServiceUrlTextForOAuth();
      }
    }
 else {
      if (connection.getLoginType().equalsIgnoreCase("String_Node_Str")) {
        return TalendQuoteUtils.addQuotes(connection.getWebServiceUrl());
      }
 else {
        return TalendQuoteUtils.addQuotes(connection.getWebServiceUrlTextForOAuth());
      }
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getUserName())) {
      return connection.getUserName();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getUserName());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getPassword())) {
      return connection.getPassword();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getPassword());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (connection.isUseCustomModuleName()) {
      return "String_Node_Str";
    }
 else {
      if (table != null) {
        EList<SalesforceModuleUnit> moduleList=connection.getModules();
        for (        SalesforceModuleUnit unit : moduleList) {
          if (table.getLabel().equals(unit.getModuleName())) {
            return unit.getModuleName();
          }
        }
      }
      return connection.getModuleName();
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getQueryCondition())) {
      return connection.getQueryCondition();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getQueryCondition());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    return connection.getBatchSize();
  }
 else   if ("String_Node_Str".equals(value)) {
    return connection.isUseProxy();
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getProxyHost())) {
      return connection.getProxyHost();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getProxyHost());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getProxyPort())) {
      return connection.getProxyPort();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getProxyPort());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getProxyUsername())) {
      return connection.getProxyUsername();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getProxyUsername());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getProxyPassword())) {
      return connection.getProxyPassword();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getProxyPassword());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getTimeOut())) {
      return connection.getTimeOut();
    }
 else {
      return connection.getTimeOut();
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getSalesforceVersion())) {
      return connection.getSalesforceVersion();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getSalesforceVersion());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getConsumeKey())) {
      return connection.getConsumeKey();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getConsumeKey());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getConsumeSecret())) {
      return connection.getConsumeSecret();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getConsumeSecret());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getCallbackHost())) {
      return connection.getCallbackHost();
    }
 else {
      return TalendQuoteUtils.addQuotes(connection.getCallbackHost());
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getCallbackPort())) {
      return connection.getCallbackPort();
    }
 else {
      return connection.getCallbackPort();
    }
  }
 else   if ("String_Node_Str".equals(value)) {
    if (isContextMode(connection,connection.getLoginType())) {
      return connection.getLoginType();
    }
 else {
      if (connection.getLoginType().equalsIgnoreCase("String_Node_Str")) {
        return "String_Node_Str";
      }
 else {
        return "String_Node_Str";
      }
    }
  }
  return null;
}