function ParamSubstitution(aParamValue, aSearchTerms, aEngine) {  var value = aParamValue;  var distributionID = MOZ_DISTRIBUTION_ID;  try {    var prefB = Cc["@mozilla.org/preferences-service;1"].                getService(Ci.nsIPrefBranch);    distributionID = prefB.getCharPref(BROWSER_SEARCH_PREF + "distributionID");  }  catch (ex) { }  // Custom search parameters. These are only available to app-shipped search  // engines.  if (aEngine._isInAppDir) {    value = value.replace(MOZ_PARAM_LOCALE, getLocale());    value = value.replace(MOZ_PARAM_DIST_ID, distributionID);    value = value.replace(MOZ_PARAM_OFFICIAL, MOZ_OFFICIAL);  }  // Insert the OpenSearch parameters we're confident about  value = value.replace(OS_PARAM_USER_DEFINED, aSearchTerms);  value = value.replace(OS_PARAM_INPUT_ENCODING, aEngine.queryCharset);  value = value.replace(OS_PARAM_LANGUAGE,                        getLocale() || OS_PARAM_LANGUAGE_DEF);  value = value.replace(OS_PARAM_OUTPUT_ENCODING,                        OS_PARAM_OUTPUT_ENCODING_DEF);  // Replace any optional parameters  value = value.replace(OS_PARAM_OPTIONAL, "");  // Insert any remaining required params with our default values  for (var i = 0; i < OS_UNSUPPORTED_PARAMS.length; ++i) {    value = value.replace(OS_UNSUPPORTED_PARAMS[i][0],                          OS_UNSUPPORTED_PARAMS[i][1]);  }  return value;}
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/1a65fe5fdabaf299312d9a1034ee66c5519381b9/nsSearchService.js/buggy/browser/components/search/nsSearchService.js