rem:   regex = /\$\{(\w+)\}/g;  var variableValue = variableIndex.replace(regex, function(match, word) { return storedVars[word]; });  if( variableFunction == '') return variableValue; else { return eval("variableValue."+ eval("variableFunction") + "()" ); } 
add: return stringResult; 
context: function replaceVariables(str) {     //handle the case of ${userid}.toUpper    pattern = /\$\{(\w+)\}\.(.+)/;    var variableIndex = str;    var variableFunction='';    if(pattern.test(str)) {        pieces = str.split('.');        variableIndex = pieces[0];        variableFunction = pieces[1];    }    regex = /\$\{(\w+)\}/g;    var variableValue = variableIndex.replace(regex, function(match, word) {        return storedVars[word];    });    if( variableFunction == '')            return variableValue;    else    {        return eval("variableValue."+ eval("variableFunction") + "()" );    }}
meta: 3175	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3175/0e5e46a5e25dd4737acd757294020fdcd30abe85/selenium-fitrunner.js/buggy/code/javascript/selenium-fitrunner.js