for (var i = 0; i < def.params.length; i++) { call.args.push(xlateArgument(command.getParameterAt(i))); } 
if ("open" == def.name && options.urlSuffix && !command.target.match(/^\w+:\/\  call.args.push(xlateArgument(options.urlSuffix + command.target)); } else { for (var i = 0; i < def.params.length; i++) { call.args.push(xlateArgument(command.getParameterAt(i))); } } 
function formatCommand(command) {	var line = null;	if (command.type == 'command') {		var def = command.getDefinition();		if (def && def.isAccessor) {			var call = new CallSelenium(def.name);			for (var i = 0; i < def.params.length; i++) {				call.args.push(xlateArgument(command.getParameterAt(i)));			}			var extraArg = command.getParameterAt(def.params.length)			if (def.name.match(/^is/)) { // isXXX				if (command.command.match(/^assert/) ||					(this.assertOrVerifyFailureOnNext && command.command.match(/^verify/))) {					line = (def.negative ? assertFalse : assertTrue)(call);				} else if (command.command.match(/^verify/)) {					line = (def.negative ? verifyFalse : verifyTrue)(call);				} else if (command.command.match(/^store/)) {					addDeclaredVar(extraArg);					line = statement(assignToVariable('boolean', extraArg, call));				} else if (command.command.match(/^waitFor/)) {					line = waitFor(def.negative ? call.invert() : call);				}			} else { // getXXX				if (command.command.match(/^(verify|assert)/)) {					var eq = seleniumEquals(def.returnType, extraArg, call);					if (def.negative) eq = eq.invert();					var method = (!this.assertOrVerifyFailureOnNext && command.command.match(/^verify/)) ? 'verify' : 'assert';					line = eq[method]();				} else if (command.command.match(/^store/)) {					addDeclaredVar(extraArg);					line = statement(assignToVariable(def.returnType, extraArg, call));				} else if (command.command.match(/^waitFor/)) {					var eq = seleniumEquals(def.returnType, extraArg, call);					if (def.negative) eq = eq.invert();					line = waitFor(eq);				}			}		} else if (this.pause && 'pause' == command.command) {			line = pause(command.target);		} else if (this.echo && 'echo' == command.command) {			line = echo(command.target);		} else if ('store' == command.command) {			addDeclaredVar(command.value);			line = statement(assignToVariable('String', command.value, xlateArgument(command.target)));		} else if (command.command.match(/^(assert|verify)Selected$/)) {			var optionLocator = command.value;			var flavor = 'Label';			var value = optionLocator;			var r = /^(index|label|value|id)=(.*)$/.exec(optionLocator);			if (r) {				flavor = r[1].replace(/^[a-z]/, function(str) { return str.toUpperCase() });				value = r[2];			}			var method = (!this.assertOrVerifyFailureOnNext && command.command.match(/^verify/)) ? 'verify' : 'assert';			var call = new CallSelenium("getSelected" + flavor);			call.args.push(xlateArgument(command.target));			var eq = seleniumEquals('String', value, call);			line = statement(eq[method]());		} else if (def) {			if (def.name.match(/^(assert|verify)(Error|Failure)OnNext$/)) {				this.assertOrVerifyFailureOnNext = true;				this.assertFailureOnNext = def.name.match(/^assert/);				this.verifyFailureOnNext = def.name.match(/^verify/);			} else {				var call = new CallSelenium(def.name);				for (var i = 0; i < def.params.length; i++) {					call.args.push(xlateArgument(command.getParameterAt(i)));				}				line = statement(call);			}		} else {			this.log.info("unknown command: <" + command.command + ">");			// TODO			var call = new CallSelenium(command.command);			if ((command.target != null && command.target.length > 0)				|| (command.value != null && command.value.length > 0)) {				call.args.push(string(command.target));				if (command.value != null && command.value.length > 0) {					call.args.push(string(command.value));				}			}			line = formatComment(new Comment(statement(call)));		}	}	if (line && this.assertOrVerifyFailureOnNext) {		line = assertOrVerifyFailure(line, this.assertFailureOnNext);		this.assertOrVerifyFailureOnNext = false;		this.assertFailureOnNext = false;		this.verifyFailureOnNext = false;	}	return line;}
4983	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4983/30ac360e2f853d32088682d4a0b30157216d19bd/remoteControl.js/clean/src/content/formats/remoteControl.js