rem:  newWordArray.findAll(function(word){ return wordCacheHash[word.text] != undefined && wordCacheHash[word.text].state == "new"; }).each(function(word){ word.state = "requesting"; new Ajax.Request("/syllables/" + word.text + ";json", { method: "get", onComplete: updateWordCacheHash }); 
add:   newWordHash.findAll(function(kvPair){ return wordCacheHash[kvPair.value.text] != undefined && wordCacheHash[kvPair.value.text].state == "new"; }).each(function(kvPair){ kvPair.value.state = "requesting"; new Ajax.Request("/syllables/" + kvPair.value.text + ";json", { method: "get", onComplete: updateWordCacheHash }); 
context: function haikuMaster(oldValue, newValue, element) {	oldWordHash = $H();		textToWords(oldValue).each(function(word){		oldWordHash[word.text] = word;	});		var newWordArray = textToWords(newValue);	newWordHash = $H();		newWordArray.each(function(word){		newWordHash[word.text] = word;	});		wordCacheHash.each(function(word){	   if (word.value.state == "new" && newWordHash[word.value.text] == undefined) {	       delete wordCacheHash[word.value.text];        }	});			    newWordArray.findAll(function(word){	   return wordCacheHash[word.text] != undefined && wordCacheHash[word.text].state == "new";	}).each(function(word){            word.state = "requesting";    		new Ajax.Request("/syllables/" + word.text + ";json", {    			method: "get",    			onComplete: updateWordCacheHash    		});	});		//Find the changed words from last cycle	newWordArray.each(function(word){		if (oldWordHash[word.text] != undefined && 		    wordCacheHash[word.text] == undefined ){			wordCacheHash[word.text] = word;		}	});			haiku = renderHaiku( newValue, element );	return isValidHaiku(haiku);}
meta: 8786	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8786/a3dde0e2b9702bb49f9501aed6345b4bf7be4bdb/haiku.js/buggy/public/javascripts/haiku.js