rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 13
136k
| meta
stringlengths 132
347
|
---|---|---|---|
if (normalize(listItems[i].childNodes[0].nodeValue) == normalizedQuery) { | if (normalize(listItems[i].childNodes[0].nodeValue) == normalizedQuery) { | function saveQueryHistory(query, appendFlag) { debug("saveQueryHistory: " + query); var listNode = getQueryHistoryListNode(true); // simple de-dupe check // abort when we see the first duplicate: // this is most likely to happen with the most recent query // also implements history limit... var listItems = listNode.childNodes; var normalizedQuery = normalize(query); if (query == null || query == "") { return; } if (listItems && listItems[0]) { debug("saveQueryHistory: checking " + listItems.length); for (var i = 0; i < listItems.length; i++) { //debug("saveQueryHistory: " + i); if (normalize(listItems[i].childNodes[0].nodeValue) == normalizedQuery) { // we want to remove a node and then break listNode.removeChild(listItems[i]); debug("saveQueryHistory: " + i + " matched!"); if (g_cq_history_limit != null && g_cq_history_limit > 0) break; } if (g_cq_history_limit != null && i > g_cq_history_limit) listNode.removeChild(listItems[i]); } } var newItem = document.createElement("li"); newItem.appendChild(document.createTextNode(query)); // onclick, copy to current textarea newItem.onclick = function() { var buf = getBuffer(); buf.value = this.childNodes[0].nodeValue; // don't refresh buffer list //refreshBufferList(g_cq_buffer_current, "saveQueryHistory"); } // tool-tip newItem.title = "Click here to copy this query into the current buffer."; // delete widget var deleteLink = document.createElement("span"); deleteLink.className = "query-delete"; deleteLink.onclick = function() { if (confirm("Are you sure you want to delete this history item?")) { this.parentNode.parentNode.removeChild(this.parentNode); } // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, this.parentNode.parentNode.innerHTML); }; // tool-tip deleteLink.title = "Click here to delete this query from your history."; deleteLink.appendChild(document.createTextNode(" (x) ")); newItem.appendChild(deleteLink); // spacing: css padding, margin don't seem to work with ol newItem.appendChild(document.createElement("hr")); // it's nice to have the most-recent at the top... if (listItems && listItems[0] && (!appendFlag)) { listNode.insertBefore(newItem, listItems[0]); } else { listNode.appendChild(newItem); } // finally, update the saved-queries cookie // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, listNode.innerHTML);} // saveQueryHistory | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
debug("saveQueryHistory: " + i + " matched!"); | debug.print("saveQueryHistory: " + i + " matched!"); | function saveQueryHistory(query, appendFlag) { debug("saveQueryHistory: " + query); var listNode = getQueryHistoryListNode(true); // simple de-dupe check // abort when we see the first duplicate: // this is most likely to happen with the most recent query // also implements history limit... var listItems = listNode.childNodes; var normalizedQuery = normalize(query); if (query == null || query == "") { return; } if (listItems && listItems[0]) { debug("saveQueryHistory: checking " + listItems.length); for (var i = 0; i < listItems.length; i++) { //debug("saveQueryHistory: " + i); if (normalize(listItems[i].childNodes[0].nodeValue) == normalizedQuery) { // we want to remove a node and then break listNode.removeChild(listItems[i]); debug("saveQueryHistory: " + i + " matched!"); if (g_cq_history_limit != null && g_cq_history_limit > 0) break; } if (g_cq_history_limit != null && i > g_cq_history_limit) listNode.removeChild(listItems[i]); } } var newItem = document.createElement("li"); newItem.appendChild(document.createTextNode(query)); // onclick, copy to current textarea newItem.onclick = function() { var buf = getBuffer(); buf.value = this.childNodes[0].nodeValue; // don't refresh buffer list //refreshBufferList(g_cq_buffer_current, "saveQueryHistory"); } // tool-tip newItem.title = "Click here to copy this query into the current buffer."; // delete widget var deleteLink = document.createElement("span"); deleteLink.className = "query-delete"; deleteLink.onclick = function() { if (confirm("Are you sure you want to delete this history item?")) { this.parentNode.parentNode.removeChild(this.parentNode); } // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, this.parentNode.parentNode.innerHTML); }; // tool-tip deleteLink.title = "Click here to delete this query from your history."; deleteLink.appendChild(document.createTextNode(" (x) ")); newItem.appendChild(deleteLink); // spacing: css padding, margin don't seem to work with ol newItem.appendChild(document.createElement("hr")); // it's nice to have the most-recent at the top... if (listItems && listItems[0] && (!appendFlag)) { listNode.insertBefore(newItem, listItems[0]); } else { listNode.appendChild(newItem); } // finally, update the saved-queries cookie // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, listNode.innerHTML);} // saveQueryHistory | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
newItem.appendChild(document.createTextNode(query)); | var queryNode = document.createElement("span"); queryNode.appendChild(document.createTextNode(query)); | function saveQueryHistory(query, appendFlag) { debug("saveQueryHistory: " + query); var listNode = getQueryHistoryListNode(true); // simple de-dupe check // abort when we see the first duplicate: // this is most likely to happen with the most recent query // also implements history limit... var listItems = listNode.childNodes; var normalizedQuery = normalize(query); if (query == null || query == "") { return; } if (listItems && listItems[0]) { debug("saveQueryHistory: checking " + listItems.length); for (var i = 0; i < listItems.length; i++) { //debug("saveQueryHistory: " + i); if (normalize(listItems[i].childNodes[0].nodeValue) == normalizedQuery) { // we want to remove a node and then break listNode.removeChild(listItems[i]); debug("saveQueryHistory: " + i + " matched!"); if (g_cq_history_limit != null && g_cq_history_limit > 0) break; } if (g_cq_history_limit != null && i > g_cq_history_limit) listNode.removeChild(listItems[i]); } } var newItem = document.createElement("li"); newItem.appendChild(document.createTextNode(query)); // onclick, copy to current textarea newItem.onclick = function() { var buf = getBuffer(); buf.value = this.childNodes[0].nodeValue; // don't refresh buffer list //refreshBufferList(g_cq_buffer_current, "saveQueryHistory"); } // tool-tip newItem.title = "Click here to copy this query into the current buffer."; // delete widget var deleteLink = document.createElement("span"); deleteLink.className = "query-delete"; deleteLink.onclick = function() { if (confirm("Are you sure you want to delete this history item?")) { this.parentNode.parentNode.removeChild(this.parentNode); } // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, this.parentNode.parentNode.innerHTML); }; // tool-tip deleteLink.title = "Click here to delete this query from your history."; deleteLink.appendChild(document.createTextNode(" (x) ")); newItem.appendChild(deleteLink); // spacing: css padding, margin don't seem to work with ol newItem.appendChild(document.createElement("hr")); // it's nice to have the most-recent at the top... if (listItems && listItems[0] && (!appendFlag)) { listNode.insertBefore(newItem, listItems[0]); } else { listNode.appendChild(newItem); } // finally, update the saved-queries cookie // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, listNode.innerHTML);} // saveQueryHistory | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
newItem.onclick = function() { | queryNode.onclick = function() { | function saveQueryHistory(query, appendFlag) { debug("saveQueryHistory: " + query); var listNode = getQueryHistoryListNode(true); // simple de-dupe check // abort when we see the first duplicate: // this is most likely to happen with the most recent query // also implements history limit... var listItems = listNode.childNodes; var normalizedQuery = normalize(query); if (query == null || query == "") { return; } if (listItems && listItems[0]) { debug("saveQueryHistory: checking " + listItems.length); for (var i = 0; i < listItems.length; i++) { //debug("saveQueryHistory: " + i); if (normalize(listItems[i].childNodes[0].nodeValue) == normalizedQuery) { // we want to remove a node and then break listNode.removeChild(listItems[i]); debug("saveQueryHistory: " + i + " matched!"); if (g_cq_history_limit != null && g_cq_history_limit > 0) break; } if (g_cq_history_limit != null && i > g_cq_history_limit) listNode.removeChild(listItems[i]); } } var newItem = document.createElement("li"); newItem.appendChild(document.createTextNode(query)); // onclick, copy to current textarea newItem.onclick = function() { var buf = getBuffer(); buf.value = this.childNodes[0].nodeValue; // don't refresh buffer list //refreshBufferList(g_cq_buffer_current, "saveQueryHistory"); } // tool-tip newItem.title = "Click here to copy this query into the current buffer."; // delete widget var deleteLink = document.createElement("span"); deleteLink.className = "query-delete"; deleteLink.onclick = function() { if (confirm("Are you sure you want to delete this history item?")) { this.parentNode.parentNode.removeChild(this.parentNode); } // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, this.parentNode.parentNode.innerHTML); }; // tool-tip deleteLink.title = "Click here to delete this query from your history."; deleteLink.appendChild(document.createTextNode(" (x) ")); newItem.appendChild(deleteLink); // spacing: css padding, margin don't seem to work with ol newItem.appendChild(document.createElement("hr")); // it's nice to have the most-recent at the top... if (listItems && listItems[0] && (!appendFlag)) { listNode.insertBefore(newItem, listItems[0]); } else { listNode.appendChild(newItem); } // finally, update the saved-queries cookie // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, listNode.innerHTML);} // saveQueryHistory | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
newItem.title = "Click here to copy this query into the current buffer."; | queryNode.title = "Click here to copy this query into the current buffer."; newItem.appendChild(queryNode); | function saveQueryHistory(query, appendFlag) { debug("saveQueryHistory: " + query); var listNode = getQueryHistoryListNode(true); // simple de-dupe check // abort when we see the first duplicate: // this is most likely to happen with the most recent query // also implements history limit... var listItems = listNode.childNodes; var normalizedQuery = normalize(query); if (query == null || query == "") { return; } if (listItems && listItems[0]) { debug("saveQueryHistory: checking " + listItems.length); for (var i = 0; i < listItems.length; i++) { //debug("saveQueryHistory: " + i); if (normalize(listItems[i].childNodes[0].nodeValue) == normalizedQuery) { // we want to remove a node and then break listNode.removeChild(listItems[i]); debug("saveQueryHistory: " + i + " matched!"); if (g_cq_history_limit != null && g_cq_history_limit > 0) break; } if (g_cq_history_limit != null && i > g_cq_history_limit) listNode.removeChild(listItems[i]); } } var newItem = document.createElement("li"); newItem.appendChild(document.createTextNode(query)); // onclick, copy to current textarea newItem.onclick = function() { var buf = getBuffer(); buf.value = this.childNodes[0].nodeValue; // don't refresh buffer list //refreshBufferList(g_cq_buffer_current, "saveQueryHistory"); } // tool-tip newItem.title = "Click here to copy this query into the current buffer."; // delete widget var deleteLink = document.createElement("span"); deleteLink.className = "query-delete"; deleteLink.onclick = function() { if (confirm("Are you sure you want to delete this history item?")) { this.parentNode.parentNode.removeChild(this.parentNode); } // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, this.parentNode.parentNode.innerHTML); }; // tool-tip deleteLink.title = "Click here to delete this query from your history."; deleteLink.appendChild(document.createTextNode(" (x) ")); newItem.appendChild(deleteLink); // spacing: css padding, margin don't seem to work with ol newItem.appendChild(document.createElement("hr")); // it's nice to have the most-recent at the top... if (listItems && listItems[0] && (!appendFlag)) { listNode.insertBefore(newItem, listItems[0]); } else { listNode.appendChild(newItem); } // finally, update the saved-queries cookie // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, listNode.innerHTML);} // saveQueryHistory | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/499e513a3cc333dbcb784318ca05ad90a90b7c8e/cq.js/clean/cq.js |
function saveQueryHistory(query, appendFlag, checkFlag) { if (appendFlag == null) appendFlag = false; | function saveQueryHistory(query, checkFlag) { if (query == null || query == "") { return; } var normalizedQuery = normalizeSpace(query); if (normalizedQuery == null || normalizedQuery == "") { return; } | function saveQueryHistory(query, appendFlag, checkFlag) { if (appendFlag == null) appendFlag = false; // NOTE: if we know that there are no dups, don't check if (checkFlag == null) checkFlag = true; debug.print("saveQueryHistory: append=" + appendFlag + ", check=" + checkFlag + ": " + query.substr(0, 16)); var listNode = getQueryHistoryListNode(true); // simple de-dupe check // abort when we see the first duplicate: // this is most likely to happen with the most recent query // also implements history limit... var listItems = listNode.childNodes; var normalizedQuery = normalize(query); if (query == null || query == "") { return; } if (checkFlag && listItems && listItems[0]) { debug.print("saveQueryHistory: dup-checking " + listItems.length); for (var i = 0; i < listItems.length; i++) { //debug.print("saveQueryHistory: " + i); if (normalize(listItems[i].childNodes[0].nodeValue) == normalizedQuery) { // we want to remove a node and then break listNode.removeChild(listItems[i]); debug.print("saveQueryHistory: " + i + " matched!"); if (g_cq_history_limit != null && g_cq_history_limit > 0) break; } if (g_cq_history_limit != null && i > g_cq_history_limit) listNode.removeChild(listItems[i]); } } var newItem = document.createElement("li"); var queryNode = document.createElement("span"); queryNode.appendChild(document.createTextNode(query)); // onclick, copy to current textarea queryNode.onclick = function() { var buf = getBuffer(); buf.value = this.childNodes[0].nodeValue; // don't refresh buffer list //refreshBufferList(g_cq_buffer_current, "saveQueryHistory"); } // tool-tip queryNode.title = "Click here to copy this query into the current buffer."; newItem.appendChild(queryNode); // delete widget var deleteLink = document.createElement("span"); deleteLink.className = "query-delete"; deleteLink.onclick = function() { if (confirm("Are you sure you want to delete this history item?")) { this.parentNode.parentNode.removeChild(this.parentNode); } // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, this.parentNode.parentNode.innerHTML); }; // tool-tip deleteLink.title = "Click here to delete this query from your history."; deleteLink.appendChild(document.createTextNode(" (x) ")); newItem.appendChild(deleteLink); // spacing: css padding, margin don't seem to work with ol newItem.appendChild(document.createElement("hr")); // it's nice to have the most-recent at the top... if (listItems && listItems[0] && (!appendFlag)) { listNode.insertBefore(newItem, listItems[0]); } else { listNode.appendChild(newItem); } // finally, update the saved-queries cookie // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, listNode.innerHTML);} // saveQueryHistory | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/6b355f08875fd342ed1dc304b04eaed9f1da1046/cq.js/buggy/cq.js |
debug.print("saveQueryHistory: append=" + appendFlag + ", check=" + checkFlag + ": " + query.substr(0, 16)); | debug.print("saveQueryHistory: " + ", check=" + checkFlag + ": " + normalizedQuery.substr(0, 16)); | function saveQueryHistory(query, appendFlag, checkFlag) { if (appendFlag == null) appendFlag = false; // NOTE: if we know that there are no dups, don't check if (checkFlag == null) checkFlag = true; debug.print("saveQueryHistory: append=" + appendFlag + ", check=" + checkFlag + ": " + query.substr(0, 16)); var listNode = getQueryHistoryListNode(true); // simple de-dupe check // abort when we see the first duplicate: // this is most likely to happen with the most recent query // also implements history limit... var listItems = listNode.childNodes; var normalizedQuery = normalize(query); if (query == null || query == "") { return; } if (checkFlag && listItems && listItems[0]) { debug.print("saveQueryHistory: dup-checking " + listItems.length); for (var i = 0; i < listItems.length; i++) { //debug.print("saveQueryHistory: " + i); if (normalize(listItems[i].childNodes[0].nodeValue) == normalizedQuery) { // we want to remove a node and then break listNode.removeChild(listItems[i]); debug.print("saveQueryHistory: " + i + " matched!"); if (g_cq_history_limit != null && g_cq_history_limit > 0) break; } if (g_cq_history_limit != null && i > g_cq_history_limit) listNode.removeChild(listItems[i]); } } var newItem = document.createElement("li"); var queryNode = document.createElement("span"); queryNode.appendChild(document.createTextNode(query)); // onclick, copy to current textarea queryNode.onclick = function() { var buf = getBuffer(); buf.value = this.childNodes[0].nodeValue; // don't refresh buffer list //refreshBufferList(g_cq_buffer_current, "saveQueryHistory"); } // tool-tip queryNode.title = "Click here to copy this query into the current buffer."; newItem.appendChild(queryNode); // delete widget var deleteLink = document.createElement("span"); deleteLink.className = "query-delete"; deleteLink.onclick = function() { if (confirm("Are you sure you want to delete this history item?")) { this.parentNode.parentNode.removeChild(this.parentNode); } // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, this.parentNode.parentNode.innerHTML); }; // tool-tip deleteLink.title = "Click here to delete this query from your history."; deleteLink.appendChild(document.createTextNode(" (x) ")); newItem.appendChild(deleteLink); // spacing: css padding, margin don't seem to work with ol newItem.appendChild(document.createElement("hr")); // it's nice to have the most-recent at the top... if (listItems && listItems[0] && (!appendFlag)) { listNode.insertBefore(newItem, listItems[0]); } else { listNode.appendChild(newItem); } // finally, update the saved-queries cookie // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, listNode.innerHTML);} // saveQueryHistory | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/6b355f08875fd342ed1dc304b04eaed9f1da1046/cq.js/buggy/cq.js |
var normalizedQuery = normalize(query); if (query == null || query == "") { return; } | function saveQueryHistory(query, appendFlag, checkFlag) { if (appendFlag == null) appendFlag = false; // NOTE: if we know that there are no dups, don't check if (checkFlag == null) checkFlag = true; debug.print("saveQueryHistory: append=" + appendFlag + ", check=" + checkFlag + ": " + query.substr(0, 16)); var listNode = getQueryHistoryListNode(true); // simple de-dupe check // abort when we see the first duplicate: // this is most likely to happen with the most recent query // also implements history limit... var listItems = listNode.childNodes; var normalizedQuery = normalize(query); if (query == null || query == "") { return; } if (checkFlag && listItems && listItems[0]) { debug.print("saveQueryHistory: dup-checking " + listItems.length); for (var i = 0; i < listItems.length; i++) { //debug.print("saveQueryHistory: " + i); if (normalize(listItems[i].childNodes[0].nodeValue) == normalizedQuery) { // we want to remove a node and then break listNode.removeChild(listItems[i]); debug.print("saveQueryHistory: " + i + " matched!"); if (g_cq_history_limit != null && g_cq_history_limit > 0) break; } if (g_cq_history_limit != null && i > g_cq_history_limit) listNode.removeChild(listItems[i]); } } var newItem = document.createElement("li"); var queryNode = document.createElement("span"); queryNode.appendChild(document.createTextNode(query)); // onclick, copy to current textarea queryNode.onclick = function() { var buf = getBuffer(); buf.value = this.childNodes[0].nodeValue; // don't refresh buffer list //refreshBufferList(g_cq_buffer_current, "saveQueryHistory"); } // tool-tip queryNode.title = "Click here to copy this query into the current buffer."; newItem.appendChild(queryNode); // delete widget var deleteLink = document.createElement("span"); deleteLink.className = "query-delete"; deleteLink.onclick = function() { if (confirm("Are you sure you want to delete this history item?")) { this.parentNode.parentNode.removeChild(this.parentNode); } // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, this.parentNode.parentNode.innerHTML); }; // tool-tip deleteLink.title = "Click here to delete this query from your history."; deleteLink.appendChild(document.createTextNode(" (x) ")); newItem.appendChild(deleteLink); // spacing: css padding, margin don't seem to work with ol newItem.appendChild(document.createElement("hr")); // it's nice to have the most-recent at the top... if (listItems && listItems[0] && (!appendFlag)) { listNode.insertBefore(newItem, listItems[0]); } else { listNode.appendChild(newItem); } // finally, update the saved-queries cookie // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, listNode.innerHTML);} // saveQueryHistory | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/6b355f08875fd342ed1dc304b04eaed9f1da1046/cq.js/buggy/cq.js |
|
if (normalize(listItems[i].childNodes[0].nodeValue) | if (normalizeSpace(listItems[i].firstChild.firstChild.nodeValue) | function saveQueryHistory(query, appendFlag, checkFlag) { if (appendFlag == null) appendFlag = false; // NOTE: if we know that there are no dups, don't check if (checkFlag == null) checkFlag = true; debug.print("saveQueryHistory: append=" + appendFlag + ", check=" + checkFlag + ": " + query.substr(0, 16)); var listNode = getQueryHistoryListNode(true); // simple de-dupe check // abort when we see the first duplicate: // this is most likely to happen with the most recent query // also implements history limit... var listItems = listNode.childNodes; var normalizedQuery = normalize(query); if (query == null || query == "") { return; } if (checkFlag && listItems && listItems[0]) { debug.print("saveQueryHistory: dup-checking " + listItems.length); for (var i = 0; i < listItems.length; i++) { //debug.print("saveQueryHistory: " + i); if (normalize(listItems[i].childNodes[0].nodeValue) == normalizedQuery) { // we want to remove a node and then break listNode.removeChild(listItems[i]); debug.print("saveQueryHistory: " + i + " matched!"); if (g_cq_history_limit != null && g_cq_history_limit > 0) break; } if (g_cq_history_limit != null && i > g_cq_history_limit) listNode.removeChild(listItems[i]); } } var newItem = document.createElement("li"); var queryNode = document.createElement("span"); queryNode.appendChild(document.createTextNode(query)); // onclick, copy to current textarea queryNode.onclick = function() { var buf = getBuffer(); buf.value = this.childNodes[0].nodeValue; // don't refresh buffer list //refreshBufferList(g_cq_buffer_current, "saveQueryHistory"); } // tool-tip queryNode.title = "Click here to copy this query into the current buffer."; newItem.appendChild(queryNode); // delete widget var deleteLink = document.createElement("span"); deleteLink.className = "query-delete"; deleteLink.onclick = function() { if (confirm("Are you sure you want to delete this history item?")) { this.parentNode.parentNode.removeChild(this.parentNode); } // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, this.parentNode.parentNode.innerHTML); }; // tool-tip deleteLink.title = "Click here to delete this query from your history."; deleteLink.appendChild(document.createTextNode(" (x) ")); newItem.appendChild(deleteLink); // spacing: css padding, margin don't seem to work with ol newItem.appendChild(document.createElement("hr")); // it's nice to have the most-recent at the top... if (listItems && listItems[0] && (!appendFlag)) { listNode.insertBefore(newItem, listItems[0]); } else { listNode.appendChild(newItem); } // finally, update the saved-queries cookie // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, listNode.innerHTML);} // saveQueryHistory | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/6b355f08875fd342ed1dc304b04eaed9f1da1046/cq.js/buggy/cq.js |
if (listItems && listItems[0] && (!appendFlag)) { | if (listItems && listItems[0]) { | function saveQueryHistory(query, appendFlag, checkFlag) { if (appendFlag == null) appendFlag = false; // NOTE: if we know that there are no dups, don't check if (checkFlag == null) checkFlag = true; debug.print("saveQueryHistory: append=" + appendFlag + ", check=" + checkFlag + ": " + query.substr(0, 16)); var listNode = getQueryHistoryListNode(true); // simple de-dupe check // abort when we see the first duplicate: // this is most likely to happen with the most recent query // also implements history limit... var listItems = listNode.childNodes; var normalizedQuery = normalize(query); if (query == null || query == "") { return; } if (checkFlag && listItems && listItems[0]) { debug.print("saveQueryHistory: dup-checking " + listItems.length); for (var i = 0; i < listItems.length; i++) { //debug.print("saveQueryHistory: " + i); if (normalize(listItems[i].childNodes[0].nodeValue) == normalizedQuery) { // we want to remove a node and then break listNode.removeChild(listItems[i]); debug.print("saveQueryHistory: " + i + " matched!"); if (g_cq_history_limit != null && g_cq_history_limit > 0) break; } if (g_cq_history_limit != null && i > g_cq_history_limit) listNode.removeChild(listItems[i]); } } var newItem = document.createElement("li"); var queryNode = document.createElement("span"); queryNode.appendChild(document.createTextNode(query)); // onclick, copy to current textarea queryNode.onclick = function() { var buf = getBuffer(); buf.value = this.childNodes[0].nodeValue; // don't refresh buffer list //refreshBufferList(g_cq_buffer_current, "saveQueryHistory"); } // tool-tip queryNode.title = "Click here to copy this query into the current buffer."; newItem.appendChild(queryNode); // delete widget var deleteLink = document.createElement("span"); deleteLink.className = "query-delete"; deleteLink.onclick = function() { if (confirm("Are you sure you want to delete this history item?")) { this.parentNode.parentNode.removeChild(this.parentNode); } // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, this.parentNode.parentNode.innerHTML); }; // tool-tip deleteLink.title = "Click here to delete this query from your history."; deleteLink.appendChild(document.createTextNode(" (x) ")); newItem.appendChild(deleteLink); // spacing: css padding, margin don't seem to work with ol newItem.appendChild(document.createElement("hr")); // it's nice to have the most-recent at the top... if (listItems && listItems[0] && (!appendFlag)) { listNode.insertBefore(newItem, listItems[0]); } else { listNode.appendChild(newItem); } // finally, update the saved-queries cookie // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, listNode.innerHTML);} // saveQueryHistory | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/6b355f08875fd342ed1dc304b04eaed9f1da1046/cq.js/buggy/cq.js |
debug.print("saveQueryHistory: appending " + newItem + " to " + listNode); | function saveQueryHistory(query, appendFlag, checkFlag) { if (appendFlag == null) appendFlag = false; // NOTE: if we know that there are no dups, don't check if (checkFlag == null) checkFlag = true; debug.print("saveQueryHistory: append=" + appendFlag + ", check=" + checkFlag + ": " + query.substr(0, 16)); var listNode = getQueryHistoryListNode(true); // simple de-dupe check // abort when we see the first duplicate: // this is most likely to happen with the most recent query // also implements history limit... var listItems = listNode.childNodes; var normalizedQuery = normalize(query); if (query == null || query == "") { return; } if (checkFlag && listItems && listItems[0]) { debug.print("saveQueryHistory: dup-checking " + listItems.length); for (var i = 0; i < listItems.length; i++) { //debug.print("saveQueryHistory: " + i); if (normalize(listItems[i].childNodes[0].nodeValue) == normalizedQuery) { // we want to remove a node and then break listNode.removeChild(listItems[i]); debug.print("saveQueryHistory: " + i + " matched!"); if (g_cq_history_limit != null && g_cq_history_limit > 0) break; } if (g_cq_history_limit != null && i > g_cq_history_limit) listNode.removeChild(listItems[i]); } } var newItem = document.createElement("li"); var queryNode = document.createElement("span"); queryNode.appendChild(document.createTextNode(query)); // onclick, copy to current textarea queryNode.onclick = function() { var buf = getBuffer(); buf.value = this.childNodes[0].nodeValue; // don't refresh buffer list //refreshBufferList(g_cq_buffer_current, "saveQueryHistory"); } // tool-tip queryNode.title = "Click here to copy this query into the current buffer."; newItem.appendChild(queryNode); // delete widget var deleteLink = document.createElement("span"); deleteLink.className = "query-delete"; deleteLink.onclick = function() { if (confirm("Are you sure you want to delete this history item?")) { this.parentNode.parentNode.removeChild(this.parentNode); } // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, this.parentNode.parentNode.innerHTML); }; // tool-tip deleteLink.title = "Click here to delete this query from your history."; deleteLink.appendChild(document.createTextNode(" (x) ")); newItem.appendChild(deleteLink); // spacing: css padding, margin don't seem to work with ol newItem.appendChild(document.createElement("hr")); // it's nice to have the most-recent at the top... if (listItems && listItems[0] && (!appendFlag)) { listNode.insertBefore(newItem, listItems[0]); } else { listNode.appendChild(newItem); } // finally, update the saved-queries cookie // this approach won't work: cookies get too big //setCookie(g_cq_history_cookie, listNode.innerHTML);} // saveQueryHistory | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/6b355f08875fd342ed1dc304b04eaed9f1da1046/cq.js/buggy/cq.js |
|
this.view.syncModel(); | function saveTestCase() { if (this.testManager.save(this.testCase)) { //document.getElementById("filename").value = this.testCase.filename; return true; } else { return false; }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/8559b7c3e1067cd32f5489bd7a35360a222901a0/selenium-ide.js/clean/src/content/selenium-ide.js |
|
function sc_caaadr(p) { return p.car.car.car.cdr; } | function sc_caaadr(p) { return p.cdr.car.car.car; } | function sc_caaadr(p) { return p.car.car.car.cdr; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_caadar(p) { return p.car.car.cdr.car; } | function sc_caadar(p) { return p.car.cdr.car.car; } | function sc_caadar(p) { return p.car.car.cdr.car; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_caaddr(p) { return p.car.car.cdr.cdr; } | function sc_caaddr(p) { return p.cdr.cdr.car.car; } | function sc_caaddr(p) { return p.car.car.cdr.cdr; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_caadr(p) { return p.car.car.cdr; } | function sc_caadr(p) { return p.cdr.car.car; } | function sc_caadr(p) { return p.car.car.cdr; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_cadaar(p) { return p.car.cdr.car.car; } | function sc_cadaar(p) { return p.car.car.cdr.car; } | function sc_cadaar(p) { return p.car.cdr.car.car; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_cadadr(p) { return p.car.cdr.car.cdr; } | function sc_cadadr(p) { return p.cdr.car.cdr.car; } | function sc_cadadr(p) { return p.car.cdr.car.cdr; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_cadddr(p) { return p.car.cdr.cdr.cdr; } | function sc_cadddr(p) { return p.cdr.cdr.cdr.car; } | function sc_cadddr(p) { return p.car.cdr.cdr.cdr; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_caddr(p) { return p.car.cdr.cdr; } | function sc_caddr(p) { return p.cdr.cdr.car; } | function sc_caddr(p) { return p.car.cdr.cdr; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_cadr(p) { return p.car.cdr; } | function sc_cadr(p) { return p.cdr.car; } | function sc_cadr(p) { return p.car.cdr; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
return; | return undefined; | function sc_callCcRestart(exc) { while (true) { try { exc.root(); if (sc_CALLCC_STORAGE.firstCall) { return sc_CALLCC_STORAGE.firstCall(); } return; } catch (e) { if (e instanceof sc_CallCcException) exc = e; else throw e; } }} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/6f126e296c2abf467096563f59303f565c8bd74d/runtime.js/buggy/scheme2js/runtime/runtime.js |
return undefined; | function sc_callCcRestart(exc) { while (true) { try { exc.root(); if (sc_CALLCC_STORAGE.firstCall) { return sc_CALLCC_STORAGE.firstCall(); } return; } catch (e) { if (e instanceof sc_CallCcException) exc = e; else throw e; } }} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/6f126e296c2abf467096563f59303f565c8bd74d/runtime.js/buggy/scheme2js/runtime/runtime.js |
|
consumer.apply(null, producer()); | var produced = producer(); if (produced instanceof sc_Values) return consumer.apply(null, produced.values); else return consumer(produced); | function sc_callWithValues(producer, consumer) { /// export consumer.apply(null, producer());} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_cdaaar(p) { return p.cdr.car.car.car; } | function sc_cdaaar(p) { return p.car.car.car.cdr; } | function sc_cdaaar(p) { return p.cdr.car.car.car; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_cdaar(p) { return p.cdr.car.car; } | function sc_cdaar(p) { return p.car.car.cdr; } | function sc_cdaar(p) { return p.cdr.car.car; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_cdadar(p) { return p.cdr.car.cdr.car; } | function sc_cdadar(p) { return p.car.cdr.car.cdr; } | function sc_cdadar(p) { return p.cdr.car.cdr.car; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_cdaddr(p) { return p.cdr.car.cdr.cdr; } | function sc_cdaddr(p) { return p.cdr.cdr.car.cdr; } | function sc_cdaddr(p) { return p.cdr.car.cdr.cdr; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_cdar(p) { return p.cdr.car; } | function sc_cdar(p) { return p.car.cdr; } | function sc_cdar(p) { return p.cdr.car; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_cddaar(p) { return p.cdr.cdr.car.car; } | function sc_cddaar(p) { return p.car.car.cdr.cdr; } | function sc_cddaar(p) { return p.cdr.cdr.car.car; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_cddadr(p) { return p.cdr.cdr.car.cdr; } | function sc_cddadr(p) { return p.cdr.car.cdr.cdr; } | function sc_cddadr(p) { return p.cdr.cdr.car.cdr; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_cddar(p) { return p.cdr.cdr.car; } | function sc_cddar(p) { return p.car.cdr.cdr; } | function sc_cddar(p) { return p.cdr.cdr.car; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_cdddar(p) { return p.cdr.cdr.cdr.car; } | function sc_cdddar(p) { return p.car.cdr.cdr.cdr; } | function sc_cdddar(p) { return p.cdr.cdr.cdr.car; } /// export | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
return undefined; | function sc_Char(c) { var cached = sc_Char.lazy[c]; if (cached) return cached; this.val = c; sc_Char.lazy[c] = this;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/6f126e296c2abf467096563f59303f565c8bd74d/runtime.js/buggy/scheme2js/runtime/runtime.js |
|
p.close(); | return p.close(); | function sc_closeInputPort(p) { /// export p.close();} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/044f4d23c83edd137fe822af6e08f3246972ad26/runtime.js/buggy/scheme2js/runtime/runtime.js |
p.close(); | return p.close(); | function sc_closeOutputPort(p) { /// export p.close();} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/044f4d23c83edd137fe822af6e08f3246972ad26/runtime.js/buggy/scheme2js/runtime/runtime.js |
function sc_div(x, y) { if (y === undefined) return 1 / x; else return x / y; | function sc_div(x) { if (arguments.length === 1) return 1/x; else { var res = x; for (var i = 1; i < arguments.length; i++) res /= arguments[i]; return res; } | function sc_div(x, y) { /// export / /fl if (y === undefined) return 1 / x; else return x / y;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
return o.doDisplay(p); | o.doDisplay(p); | function sc_doDisplay(p, o) { if (o === null) p.appendJSString("()"); else if (o === true) p.appendJSString("#t"); else if (o === false) p.appendJSString("#f"); else if (o === undefined) p.appendJSString("#unspecified"); else return o.doDisplay(p);} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/6f126e296c2abf467096563f59303f565c8bd74d/runtime.js/buggy/scheme2js/runtime/runtime.js |
return o.doWrite(p); | o.doWrite(p); | function sc_doWrite(p, o) { if (o === null) p.appendJSString("()"); else if (o === true) p.appendJSString("#t"); else if (o === false) p.appendJSString("#f"); else if (o === undefined) p.appendJSString("#unspecified"); else return o.doWrite(p);} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/6f126e296c2abf467096563f59303f565c8bd74d/runtime.js/buggy/scheme2js/runtime/runtime.js |
function sc_dynamicWind(before thunk after) { | function sc_dynamicWind(before, thunk, after) { | function sc_dynamicWind(before thunk after) { /// export before(); var res = thunk(); after(); return res;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/da42b59bdd4cfc5bb2bdb2a6f367757c3f81c3ff/runtime.js/clean/scheme2js/runtime/runtime.js |
var res = thunk(); after(); return res; | try { var res = thunk(); return res; } finally { after(); } | function sc_dynamicWind(before, thunk, after) { /// export before(); var res = thunk(); after(); return res;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/18f4d7df1b34e4cf8b2a45d4053dd889a0502fd6/runtime.js/clean/scheme2js/runtime/runtime.js |
sc_print_immutable("**ERROR**"); for (var i = 0; i < arguments.length; i++) { sc_print_immutable(arguments[i]); } throw "ERROR"; | var t = sc_withOutputToString_mutable( function () { sc_print_immutable("**ERROR**"); for (var i = 0; i < arguments.length; i++) { sc_print_mutable(arguments[i]); } }); throw t; | function sc_error_immutable() { /// export sc_print_immutable("**ERROR**"); for (var i = 0; i < arguments.length; i++) { sc_print_immutable(arguments[i]); } throw "ERROR";} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/18f4d7df1b34e4cf8b2a45d4053dd889a0502fd6/runtime.js/clean/scheme2js/runtime/runtime.js |
sc_print_mutable("**ERROR**"); for (var i = 0; i < arguments.length; i++) { sc_print_mutable(arguments[i]); } throw "ERROR"; | var t = sc_withOutputToString_mutable( function () { sc_print_mutable("**ERROR**"); for (var i = 0; i < arguments.length; i++) { sc_print_mutable(arguments[i]); } }); throw t; | function sc_error_mutable() { /// export sc_print_mutable("**ERROR**"); for (var i = 0; i < arguments.length; i++) { sc_print_mutable(arguments[i]); } throw "ERROR";} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/18f4d7df1b34e4cf8b2a45d4053dd889a0502fd6/runtime.js/clean/scheme2js/runtime/runtime.js |
return res; | function sc_escapeWriteString(s) { var res = ""; var j = 0; for (i = 0; i < s.length; i++) { switch (s.charAt(i)) { case "\0": res += s.substring(j, i) + "\\0"; j = i + 1; break; case "\a": res += s.substring(j, i) + "\\a"; j = i + 1; break; case "\b": res += s.substring(j, i) + "\\b"; j = i + 1; break; case "\f": res += s.substring(j, i) + "\\f"; j = i + 1; break; case "\n": res += s.substring(j, i) + "\\n"; j = i + 1; break; case "\r": res += s.substring(j, i) + "\\r"; j = i + 1; break; case "\t": res += s.substring(j, i) + "\\t"; j = i + 1; break; case "\v": res += s.substring(j, i) + "\\v"; j = i + 1; break; case '"': res += s.substring(j, i) + '\\"'; j = i + 1; break; case "\\": res += s.substring(j, i) + "\\\\"; j = i + 1; break; default: if (s.charAt(i) < ' ' || s.charCodeAt(i) > 127) { /* non printable character and special chars */ res += s.substring(j, i) + "\\x" + charCodeAt(i).toString(16); j = i + 1; } // else just let i increase... } } res += s.substring(j, i);} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/0bc8f13bad18ef0f992ba2b90f387c220c907455/runtime.js/buggy/scheme2js/runtime/runtime.js |
|
return undefined; | function sc_forEach(proc, l1, l2, l3) { /// export-higher if (l2 === undefined) return sc_forEach1(proc, l1); else if (l3 === undefined) return sc_forEach2(proc, l1, l2); // else var nbApplyArgs = arguments.length - 1; var applyArgs = new Array(nbApplyArgs); while (l1 !== null) { for (var i = 0; i < nbApplyArgs; i++) { applyArgs[i] = arguments[i + 1].car; arguments[i + 1] = arguments[i + 1].cdr; } proc.apply(null, applyArgs); }} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/6f126e296c2abf467096563f59303f565c8bd74d/runtime.js/buggy/scheme2js/runtime/runtime.js |
|
function sc_forEach(proc, l1) { if (arguments.length == 2) | function sc_forEach(proc, l1, l2, l3) { if (l2 === undefined) | function sc_forEach(proc, l1) { /// export if (arguments.length == 2) return sc_forEach1(proc, l1); else if (arguments.length == 3) return sc_forEach2(proc, l1, l2); // else var nbApplyArgs = arguments.length - 1; var applyArgs = new Array(nbApplyArgs); while (l1 !== null) { for (var i = 0; i < nbApplyArgs; i++) { applyArgs[i] = arguments[i + 1].car; arguments[i + 1] = arguments[i + 1].cdr; } proc.apply(null, applyArgs); }} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/18f4d7df1b34e4cf8b2a45d4053dd889a0502fd6/runtime.js/clean/scheme2js/runtime/runtime.js |
else if (arguments.length == 3) | else if (l3 === undefined) | function sc_forEach(proc, l1) { /// export if (arguments.length == 2) return sc_forEach1(proc, l1); else if (arguments.length == 3) return sc_forEach2(proc, l1, l2); // else var nbApplyArgs = arguments.length - 1; var applyArgs = new Array(nbApplyArgs); while (l1 !== null) { for (var i = 0; i < nbApplyArgs; i++) { applyArgs[i] = arguments[i + 1].car; arguments[i + 1] = arguments[i + 1].cdr; } proc.apply(null, applyArgs); }} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/18f4d7df1b34e4cf8b2a45d4053dd889a0502fd6/runtime.js/clean/scheme2js/runtime/runtime.js |
return undefined; | function sc_hashtableForEach_callcc(ht, f) { /// export-higher var sc_storage = sc_CALLCC_STORAGE; if (sc_storage.doRestore) { return sc_forEach_callcc(); } var l = null; for (var v in ht) { if (ht[v] instanceof sc_HashtableElement) l = new sc_Pair(ht[v], l); } sc_forEach_callcc(function(e) { f(e.key, e.val); }, l);} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/6f126e296c2abf467096563f59303f565c8bd74d/runtime.js/buggy/scheme2js/runtime/runtime.js |
|
while (rabbit != null) { if (sc_isPair(rabbit) && sc_isPair(rabbit.cdr)) { | while (true) { if (rabbit === null || (rabbit instanceof sc_Pair && rabbit.cdr === null)) return true; else if ((rabbit instanceof sc_Pair) && (rabbit.cdr instanceof sc_Pair)) { | function sc_isList(o) { /// export var rabbit; var turtle; var rabbit = o; var turtle = o; while (rabbit != null) { if (sc_isPair(rabbit) && sc_isPair(rabbit.cdr)) { rabbit = rabbit.cdr.cdr; turtle = turtle.cdr; if (rabbit === turtle) return false; // cycle } else return false; // not pair } return true;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
return true; | function sc_isList(o) { /// export var rabbit; var turtle; var rabbit = o; var turtle = o; while (rabbit != null) { if (sc_isPair(rabbit) && sc_isPair(rabbit.cdr)) { rabbit = rabbit.cdr.cdr; turtle = turtle.cdr; if (rabbit === turtle) return false; // cycle } else return false; // not pair } return true;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
|
function sc_isPairEqual(p1, p2) { return (sc_isEqual(p1.car, p2.car) && sc_isEqual(p1.cdr, p2.cdr)); | function sc_isPairEqual(p1, p2, comp) { return (comp(p1.car, p2.car) && comp(p1.cdr, p2.cdr)); | function sc_isPairEqual(p1, p2) { return (sc_isEqual(p1.car, p2.car) && sc_isEqual(p1.cdr, p2.cdr));} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_isVectorEqual(v1, v2) { | function sc_isVectorEqual(v1, v2, comp) { | function sc_isVectorEqual(v1, v2) { if (v1.length != v2.length) return false; for (var i = 0; i < v1.length; i++) if (!sc_isEqual(v1[i], v2[i])) return false; return true;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
if (!sc_isEqual(v1[i], v2[i])) return false; | if (!comp(v1[i], v2[i])) return false; | function sc_isVectorEqual(v1, v2) { if (v1.length != v2.length) return false; for (var i = 0; i < v1.length; i++) if (!sc_isEqual(v1[i], v2[i])) return false; return true;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
sc_storage.push(sc_frame); | function sc_jsCall_callcc(o, fun) { /// export-higher var sc_storage = sc_CALLCC_STORAGE; if (sc_storage.doRestore) { var sc_frame = sc_storage.getNextFrame(); o = sc_frame.o; fun = sc_frame.fun; } else { // we don't need to store the arguments, as they called function needs // to store it's parameters anyways. var sc_frame = new Object(); sc_frame.o = o; sc_frame.fun = fun; } try { var args = new Array(); for (var i = 2; i < arguments.length; i++) args[i-2] = arguments[i]; return fun.apply(o, args); } finally { sc_storage.pop(); }} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/4de97378509531e2db1b4111780ef8fc73b1a270/runtime.js/buggy/scheme2js/runtime/runtime.js |
|
field = sc_frame.field; | fun = sc_frame.fun; | function sc_jsMethodCall_callcc(o, field) { /// export var sc_storage = sc_CALLCC_STORAGE; if (sc_storage.doRestore) { var sc_frame = sc_storage.getNextFrame(); o = sc_frame.o; field = sc_frame.field; } else { // we don't need to store the arguments, as they called function needs // to store it's parameters anyways. var sc_frame = new Object(); sc_frame.o = o; sc_frame.field = field; } try { var args = new Array(); for (var i = 2; i < arguments.length; i++) args[i-2] = arguments[i]; return o[field].apply(o, args); } finally { sc_storage.pop(); }} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/15e0f7fa5d71e224616f2a82d172c02269b92bc3/runtime.js/clean/scheme2js/runtime/runtime.js |
sc_frame.field = field; | sc_frame.fun = fun = o[field]; args = new Array(); for (var i = 2; i < arguments.length; i++) args[i-2] = arguments[i]; | function sc_jsMethodCall_callcc(o, field) { /// export var sc_storage = sc_CALLCC_STORAGE; if (sc_storage.doRestore) { var sc_frame = sc_storage.getNextFrame(); o = sc_frame.o; field = sc_frame.field; } else { // we don't need to store the arguments, as they called function needs // to store it's parameters anyways. var sc_frame = new Object(); sc_frame.o = o; sc_frame.field = field; } try { var args = new Array(); for (var i = 2; i < arguments.length; i++) args[i-2] = arguments[i]; return o[field].apply(o, args); } finally { sc_storage.pop(); }} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/15e0f7fa5d71e224616f2a82d172c02269b92bc3/runtime.js/clean/scheme2js/runtime/runtime.js |
var args = new Array(); for (var i = 2; i < arguments.length; i++) args[i-2] = arguments[i]; return o[field].apply(o, args); | return fun.apply(o, args); | function sc_jsMethodCall_callcc(o, field) { /// export var sc_storage = sc_CALLCC_STORAGE; if (sc_storage.doRestore) { var sc_frame = sc_storage.getNextFrame(); o = sc_frame.o; field = sc_frame.field; } else { // we don't need to store the arguments, as they called function needs // to store it's parameters anyways. var sc_frame = new Object(); sc_frame.o = o; sc_frame.field = field; } try { var args = new Array(); for (var i = 2; i < arguments.length; i++) args[i-2] = arguments[i]; return o[field].apply(o, args); } finally { sc_storage.pop(); }} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/15e0f7fa5d71e224616f2a82d172c02269b92bc3/runtime.js/clean/scheme2js/runtime/runtime.js |
sc_storage.push(sc_frame) | function sc_jsMethodCall_callcc(o, field) { /// export-higher var sc_storage = sc_CALLCC_STORAGE; var fun; var args; if (sc_storage.doRestore) { var sc_frame = sc_storage.getNextFrame(); o = sc_frame.o; fun = sc_frame.fun; } else { // we don't need to store the arguments, as they called function needs // to store it's parameters anyways. var sc_frame = new Object(); sc_frame.o = o; sc_frame.fun = fun = o[field]; args = new Array(); for (var i = 2; i < arguments.length; i++) args[i-2] = arguments[i]; } try { return fun.apply(o, args); } finally { sc_storage.pop(); }} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/4de97378509531e2db1b4111780ef8fc73b1a270/runtime.js/buggy/scheme2js/runtime/runtime.js |
|
return this.val = str; | var old = SeenKeywords[str]; if (old === undefined) { SeenKeywords[str] = this; return this.val = str; } else { return old; } | function sc_Keyword(str) { /// export return this.val = str;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/14aae7a0e0d45ae9762394262ec1b01d286e82e2/runtime.js/clean/scheme2js/runtime/runtime.js |
return undefined; | function sc_Keyword(str) { var cached = sc_Keyword.lazy[str]; if (cached) return cached; sc_Keyword.lazy[str] = this; this.val = str;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/6f126e296c2abf467096563f59303f565c8bd74d/runtime.js/buggy/scheme2js/runtime/runtime.js |
|
res = sc_cons(a[i], res); | res = new sc_Pair(a[i], res); | function sc_list() { /// export var res = null; var a = arguments; for (var i = a.length-1; i >= 0; i--) res = sc_cons(a[i], res); return res;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
res = sc_cons(fill, res); | res = new sc_Pair(fill, res); | function sc_makeList(nbEls, fill) { /// export var res = null; for (var i = 0; i < nbEls; i++) res = sc_cons(fill, res); return res;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_map(proc, l1, l2) { if (arguments.length == 2) | function sc_map(proc, l1, l2, l3) { if (l2 === undefined) | function sc_map(proc, l1, l2) { /// export if (arguments.length == 2) return sc_map1(proc, l1); else if (arguments.length == 3) return sc_map2(proc, l1, l2); // else var nbApplyArgs = arguments.length - 1; var applyArgs = new Array(nbApplyArgs); var revres = null; while (l1 !== null) { for (var i = 0; i < nbApplyArgs; i++) { applyArgs[i] = arguments[i + 1].car; arguments[i + 1] = arguments[i + 1].cdr; } revres = sc_cons(proc.apply(null, applyArgs), revres); } return sc_destReverseAppend(revres, null);} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/18f4d7df1b34e4cf8b2a45d4053dd889a0502fd6/runtime.js/clean/scheme2js/runtime/runtime.js |
else if (arguments.length == 3) | else if (l3 === undefined) | function sc_map(proc, l1, l2) { /// export if (arguments.length == 2) return sc_map1(proc, l1); else if (arguments.length == 3) return sc_map2(proc, l1, l2); // else var nbApplyArgs = arguments.length - 1; var applyArgs = new Array(nbApplyArgs); var revres = null; while (l1 !== null) { for (var i = 0; i < nbApplyArgs; i++) { applyArgs[i] = arguments[i + 1].car; arguments[i + 1] = arguments[i + 1].cdr; } revres = sc_cons(proc.apply(null, applyArgs), revres); } return sc_destReverseAppend(revres, null);} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/18f4d7df1b34e4cf8b2a45d4053dd889a0502fd6/runtime.js/clean/scheme2js/runtime/runtime.js |
function sc_minus(x, y) { if (y === undefined) | function sc_minus(x) { if (arguments.length === 1) | function sc_minus(x, y) { /// export - -fx -fl if (y === undefined) return -x; else return x - y;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
else return x - y; | else { var res = x; for (var i = 1; i < arguments.length; i++) res -= arguments[i]; return res; } | function sc_minus(x, y) { /// export - -fx -fl if (y === undefined) return -x; else return x - y;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
return port.peekChar(); | var t = port.peekChar(); return t === SC_EOF_OBJECT? t: new sc_Char(t); | function sc_peekChar(port) { /// export if (port === undefined) // we assume the port hasn't been given. port = SC_DEFAULT_IN; // THREAD: shared var... return port.peekChar();} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/18f4d7df1b34e4cf8b2a45d4053dd889a0502fd6/runtime.js/clean/scheme2js/runtime/runtime.js |
return port.readChar(); | var t = port.readChar(); return t === SC_EOF_OBJECT? t: new sc_Char(t); | function sc_readChar(port) { /// export if (port === undefined) // we assume the port hasn't been given. port = SC_DEFAULT_IN; // THREAD: shared var... return port.readChar();} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/18f4d7df1b34e4cf8b2a45d4053dd889a0502fd6/runtime.js/clean/scheme2js/runtime/runtime.js |
res = sc_cons(s.charAt(i), res); | res = sc_cons(new sc_Char(s.charAt(i)), res); | function sc_string2list_immutable(s) { /// export var res = null; for (var i = s.length - 1; i >= 0; i--) res = sc_cons(s.charAt(i), res); return res;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/0bc8f13bad18ef0f992ba2b90f387c220c907455/runtime.js/buggy/scheme2js/runtime/runtime.js |
sc_symbol2number(s.val, radix); | sc_symbol2number_mutable(s.val, radix); | function sc_string2number_mutable(s, radix) { /// export sc_symbol2number(s.val, radix);} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/0bc8f13bad18ef0f992ba2b90f387c220c907455/runtime.js/buggy/scheme2js/runtime/runtime.js |
sc_symbol2number_mutable(s.val, radix); | return sc_symbol2number_mutable(s.val, radix); | function sc_string2number_mutable(s, radix) { /// export sc_symbol2number_mutable(s.val, radix);} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
return s.charAt(k); | return new sc_Char(s.charAt(k)); | function sc_stringRef_immutable(s, k) { /// export return s.charAt(k);} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/69077bec30b85c2868c6d201c5ad659fdf97944f/runtime.js/buggy/scheme2js/runtime/runtime.js |
return s.val.charAt(k); | return new sc_Char(s.val.charAt(k)); | function sc_stringRef_mutable(s, k) { /// export return s.val.charAt(k);} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/69077bec30b85c2868c6d201c5ad659fdf97944f/runtime.js/buggy/scheme2js/runtime/runtime.js |
return arguments; | return new sc_Values(arguments); | function sc_values() { /// export return arguments;} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/3caaa4f2e71f46f403b867ee75a438bbd506ced7/runtime.js/clean/scheme2js/runtime/runtime.js |
var outp = new sc_StringOutputPort(); | var outp = new sc_StringOutputPort_immutable(); | function sc_withOutputToString_immutable(thunk) { /// export var tmp = SC_DEFAULT_OUT; // THREAD: shared var. var outp = new sc_StringOutputPort(); SC_DEFAULT_OUT = outp; var tmp2 = thunk(); SC_DEFAULT_OUT = tmp; return outp.close();} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/044f4d23c83edd137fe822af6e08f3246972ad26/runtime.js/buggy/scheme2js/runtime/runtime.js |
return new sc_String(sc_withOutputToString_immutable(thunk)); | var tmp = SC_DEFAULT_OUT; var outp = new sc_StringOutputPort_mutable(); SC_DEFAULT_OUT = outp; var tmp2 = thunk(); SC_DEFAULT_OUT = tmp; return outp.close(); | function sc_withOutputToString_mutable(thunk) { /// export return new sc_String(sc_withOutputToString_immutable(thunk));} | 4636 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/044f4d23c83edd137fe822af6e08f3246972ad26/runtime.js/buggy/scheme2js/runtime/runtime.js |
for(thiskl in KLines) { if (KLines[thiskl].hostmask && match_irc_mask(theuser.uprefix + "@" + theuser.hostname,KLines[thiskl].hostmask)) theuser.quit("User has been K:Lined (" + KLines[thiskl].reason + ")"); } | if (isklined(theuser.uprefix + "@" + theuser.hostname)) theuser.quit("User has been K:Lined (" + KLines[thiskl].reason + ")"); | function scan_for_klined_clients() { for(thisUser in Clients) { if (Clients[thisUser]) { theuser=Clients[thisUser]; if (theuser.local && !theuser.server && (theuser.conntype == TYPE_USER)) { for(thiskl in KLines) { if (KLines[thiskl].hostmask && match_irc_mask(theuser.uprefix + "@" + theuser.hostname,KLines[thiskl].hostmask)) theuser.quit("User has been K:Lined (" + KLines[thiskl].reason + ")"); } } } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a8d6cb0d2c42aa8c23da559752d1d706d38ce217/ircd.js/buggy/ircd.js |
var kline=isklined(theuser.uprefix + "@" + theuser.hostname)); | var kline=isklined(theuser.uprefix + "@" + theuser.hostname); | function scan_for_klined_clients() { for(thisUser in Local_Users) { var theuser=Local_Users[thisUser]; var kline=isklined(theuser.uprefix + "@" + theuser.hostname)); if (kline) theuser.quit("User has been K:Lined (" + kline.reason + ")"); if (iszlined(theuser.ip)) theuser.quit("User has been Z:Lined"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/96728d48d2ce5b1f25b185a367c9275b35959218/ircd.js/buggy/ircd.js |
theuser.quit("User has been K:Lined (" + KLines[thiskl].reason + ")",true); | theuser.quit("User has been K:Lined (" + KLines[thiskl].reason + ")"); | function scan_for_klined_clients() { for(thisUser in Clients) { if (Clients[thisUser]) { theuser=Clients[thisUser]; if (theuser.local && !theuser.server && (theuser.conntype == TYPE_USER)) { if (isklined(theuser.uprefix + "@" + theuser.hostname)) theuser.quit("User has been K:Lined (" + KLines[thiskl].reason + ")",true); if (iszlined(theuser.ip)) theuser.quit("User has been Z:Lined",true); } } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/3a0a82db2f096ce1ac1bb5a9c7319a6849b0e22a/ircd.js/buggy/ircd.js |
theuser.quit("User has been Z:Lined",true); | theuser.quit("User has been Z:Lined"); | function scan_for_klined_clients() { for(thisUser in Clients) { if (Clients[thisUser]) { theuser=Clients[thisUser]; if (theuser.local && !theuser.server && (theuser.conntype == TYPE_USER)) { if (isklined(theuser.uprefix + "@" + theuser.hostname)) theuser.quit("User has been K:Lined (" + KLines[thiskl].reason + ")",true); if (iszlined(theuser.ip)) theuser.quit("User has been Z:Lined",true); } } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/3a0a82db2f096ce1ac1bb5a9c7319a6849b0e22a/ircd.js/buggy/ircd.js |
if (theuser.uprefix && isklined(theuser.uprefix + "@" + theuser.hostname)) theuser.quit("User has been K:Lined (" + KLines[thiskl].reason + ")"); | var kline=isklined(theuser.uprefix + "@" + theuser.hostname)); if (kline) theuser.quit("User has been K:Lined (" + kline.reason + ")"); | function scan_for_klined_clients() { for(thisUser in Local_Users) { var theuser=Local_Users[thisUser]; if (theuser.uprefix && isklined(theuser.uprefix + "@" + theuser.hostname)) theuser.quit("User has been K:Lined (" + KLines[thiskl].reason + ")"); if (iszlined(theuser.ip)) theuser.quit("User has been Z:Lined"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/ddc5d1f8540694fa91565015427d7c84d13e9011/ircd.js/buggy/ircd.js |
theuser.quit("User has been K:Lined (" + KLines[thiskl].reason + ")"); | theuser.quit("User has been K:Lined (" + KLines[thiskl].reason + ")",true); | function scan_for_klined_clients() { for(thisUser in Clients) { if (Clients[thisUser]) { theuser=Clients[thisUser]; if (theuser.local && !theuser.server && (theuser.conntype == TYPE_USER)) { if (isklined(theuser.uprefix + "@" + theuser.hostname)) theuser.quit("User has been K:Lined (" + KLines[thiskl].reason + ")"); if (iszlined(theuser.ip)) theuser.quit("User has been Z:Lined"); } } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a697289b2285a18656115e68c62bcc033aa5b402/ircd.js/clean/ircd.js |
theuser.quit("User has been Z:Lined"); | theuser.quit("User has been Z:Lined",true); | function scan_for_klined_clients() { for(thisUser in Clients) { if (Clients[thisUser]) { theuser=Clients[thisUser]; if (theuser.local && !theuser.server && (theuser.conntype == TYPE_USER)) { if (isklined(theuser.uprefix + "@" + theuser.hostname)) theuser.quit("User has been K:Lined (" + KLines[thiskl].reason + ")"); if (iszlined(theuser.ip)) theuser.quit("User has been Z:Lined"); } } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a697289b2285a18656115e68c62bcc033aa5b402/ircd.js/clean/ircd.js |
return "\x01H\x01Y\x014"+channels.current.topic.substr(0,80)+SPACEx80.substr(0,(80-channels.current.topic.length)>0?(80-channels.current.topic.length):0)+"\x01N\x01W\x010"; | return "\x01H\x01Y\x014"+channels.current.topic.substr(0,79)+SPACEx80.substr(0,(79-channels.current.topic.length)>0?(79-channels.current.topic.length):0)+"\x01N\x01W\x010"; | function Screen() { console.clear(); this.line=new Array(console.screen_rows-3); this.rows=console.screen_rows-3; // Title, Status, and input rows are not counted. this.update_input_line=Screen_update_input_line; this.print_line=Screen_print_line; this.update_statline=Screen_update_statline; this.statusline getter=function() { // THIS NEEDS TO GO INTO THE SCREEN BUFFER!!! ToDo bbs.nodesync(); if(connected) { if(channels != undefined) { if(channels.current != undefined) { return "\x01N\x014 Nick: "+nick+" Channel: "+channels.current.display+SPACEx80.substr(0,79-34-nick.length-channels.current.display.length)+" /quit to exit \x01N\x010\x01W"; } } } return "\x01N\x014 Nick: "+nick+" Channel: No Channel"+SPACEx80.substr(0,79-44-nick.length)+" /quit to exit \x01N\x010\x01W"; }; this.topicline getter=function() { if(connected) { if(channels != undefined) { if(channels.current != undefined) { return "\x01H\x01Y\x014"+channels.current.topic.substr(0,80)+SPACEx80.substr(0,(80-channels.current.topic.length)>0?(80-channels.current.topic.length):0)+"\x01N\x01W\x010"; } } } return "\x01H\x01Y\x014No Topic"+SPACEx80.substr(0,72)+"\x01N\x01W\x010"; } this.input_buffer=""; this.input_pos=0; this.handle_key=Screen_handle_key; this.update=Screen_update; this.print_line("\1n\1hSynchronet \1cInternet Relay Chat \1wModule \1n" + REVISION + "\r\n");} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/17efe2284c9cba73905332567c8dece4adaef82f/irc.js/clean/irc.js |
return "\x01H\x01Y\x014No Topic"+SPACEx80.substr(0,72)+"\x01N\x01W\x010"; | return "\x01H\x01Y\x014No Topic"+SPACEx80.substr(0,71)+"\x01N\x01W\x010"; | function Screen() { console.clear(); this.line=new Array(console.screen_rows-3); this.rows=console.screen_rows-3; // Title, Status, and input rows are not counted. this.update_input_line=Screen_update_input_line; this.print_line=Screen_print_line; this.update_statline=Screen_update_statline; this.statusline getter=function() { // THIS NEEDS TO GO INTO THE SCREEN BUFFER!!! ToDo bbs.nodesync(); if(connected) { if(channels != undefined) { if(channels.current != undefined) { return "\x01N\x014 Nick: "+nick+" Channel: "+channels.current.display+SPACEx80.substr(0,79-34-nick.length-channels.current.display.length)+" /quit to exit \x01N\x010\x01W"; } } } return "\x01N\x014 Nick: "+nick+" Channel: No Channel"+SPACEx80.substr(0,79-44-nick.length)+" /quit to exit \x01N\x010\x01W"; }; this.topicline getter=function() { if(connected) { if(channels != undefined) { if(channels.current != undefined) { return "\x01H\x01Y\x014"+channels.current.topic.substr(0,80)+SPACEx80.substr(0,(80-channels.current.topic.length)>0?(80-channels.current.topic.length):0)+"\x01N\x01W\x010"; } } } return "\x01H\x01Y\x014No Topic"+SPACEx80.substr(0,72)+"\x01N\x01W\x010"; } this.input_buffer=""; this.input_pos=0; this.handle_key=Screen_handle_key; this.update=Screen_update; this.print_line("\1n\1hSynchronet \1cInternet Relay Chat \1wModule \1n" + REVISION + "\r\n");} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/17efe2284c9cba73905332567c8dece4adaef82f/irc.js/clean/irc.js |
console.crlf(); | function Screen_handle_key(key) { var commands=[null]; var command=null; var nickmatch=""; var lastspace=0; switch(key) { case "\r": if(this.input_buffer=="") { break; } history.addline(this.input_buffer); while(history.line.length>MAX_HIST) { history.shift(); } this.input_buffer=this.input_buffer.replace(/%C/g,"\x03"); this.input_buffer=this.input_buffer.replace(/%%/g,"%"); if(this.input_buffer.substr(0,1)=="/" && this.input_buffer.substr(1,1)!="/") { commands=this.input_buffer.split(" "); command=commands.shift(); command=command.substr(1); command=command.toUpperCase(); send_command(command,commands.join(" ")); } else { if(this.input_buffer.substr(0,1)=="/") { this.input_buffer=this.input_buffer.substr(1); } if(channels.current==undefined) { this.print_line("\x01H\x01RYou are not in a channel!\x01N\x01W"); } else { channels.current.send(this.input_buffer); this.print_line("\x01N\x01M<\x01N\x01W"+nick+"\x01N\x01M>\x01N\x01W "+this.input_buffer); } } this.input_buffer=""; this.input_pos=0; this.update_input_line(); break; case "\x08": if(this.input_pos > 0) { this.input_buffer=this.input_buffer.slice(0,this.input_pos-1)+this.input_buffer.slice(this.input_pos); this.input_pos--; this.update_input_line(); } break; case "\x0b": this.input_buffer=this.input_buffer+"%C"; this.input_pos+=2; break; case "\x1e": // Up arrow if(history.index==null) { history.incomplete=this.input_buffer; } this.input_buffer=history.previous; this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x0a": // Down arrow if(history.index==null) { history.incomplete=this.input_buffer; } this.input_buffer=history.next; this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x1d": // Left arrow if(this.input_pos > 0) { this.input_pos--; } this.update_input_line(); break; case "\x02": // Home this.input_pos=0; this.update_input_line() break; case "\x05": // End this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x06": // right arrow if(this.input_pos < (this.input_buffer.length)) { this.input_pos++; } this.update_input_line(); break; case "\t": // Tab lastspace=this.input_buffer.lastIndexOf(" ",this.input_pos); nickmatch=channels.current.matchnick(this.input_buffer.substr(lastspace+1,this.input_pos-lastspace-1)); if(nickmatch != null) { this.input_buffer=this.input_buffer.substr(0,lastspace+1)+nickmatch+(lastspace==-1?": ":" ")+this.input_buffer.substr(this.input_pos); this.input_pos=lastspace+2+nickmatch.length; if(lastspace==-1) this.input_pos++; } this.update_input_line(); break; default: if(ascii(key)<ascii(' ')) { if(ascii(key) != 27 && console.handle_ctrlkey!=undefined) { console.line_counter=0; // defeat pause console.ansi_gotoxy(1,console.screen_rows-1); console.clearline(); console.ansi_gotoxy(1,console.screen_rows); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-2); console.handle_ctrlkey(key,0); // for now console.print(this.topicline); console.print(this.statusline); this.update_input_line(); } } else { this.input_buffer=this.input_buffer.slice(0,this.input_pos)+key+this.input_buffer.slice(this.input_pos); this.input_pos++; this.update_input_line(); } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/17efe2284c9cba73905332567c8dece4adaef82f/irc.js/clean/irc.js |
|
var my_eol = this.input_buffer.length; this.input_pos = my_eol; | function Screen_handle_key(key) { var commands=[null]; var command=null; switch(key) { case "\r": if(this.input_buffer=="") { break; } history.addline(this.input_buffer); while(history.line.length>MAX_HIST) { history.shift(); } this.input_buffer=this.input_buffer.replace(/%C/g,"\x03"); this.input_buffer=this.input_buffer.replace(/%%/g,"%"); if(this.input_buffer.substr(0,1)=="/" && this.input_buffer.substr(1,1)!="/") { commands=this.input_buffer.split(" "); command=commands.shift(); command=command.substr(1); command=command.toUpperCase(); send_command(command,commands.join(" ")); } else { if(this.input_buffer.substr(0,1)=="/") { this.input_buffer=this.input_buffer.substr(1); } if(channels.current==undefined) { this.print_line("\x01H\x01RYou are not in a channel!\x01N\x01W"); } else { channels.current.send(this.input_buffer); this.print_line("\x01N\x01M<\x01N\x01W"+nick+"\x01N\x01M>\x01N\x01W "+this.input_buffer); } } this.input_buffer=""; this.input_pos=0; this.update_input_line(); break; case "\x08": if(this.input_pos > 0) { this.input_buffer=this.input_buffer.slice(0,this.input_pos-1)+this.input_buffer.slice(this.input_pos); this.input_pos--; this.update_input_line(); } break; case "\x0b": this.input_buffer=this.input_buffer+"%C"; this.input_pos+=2; break; case "\x1e": // Up arrow if(history.index==null) { history.incomplete=this.input_buffer; } this.input_buffer=history.previous; this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x0a": // Down arrow if(history.index==null) { history.incomplete=this.input_buffer; } this.input_buffer=history.next; this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x1d": // Left arrow if(this.input_pos > 0) { this.input_pos--; } this.update_input_line(); break; case "\x02": // Home this.input_pos=0; this.update_input_line() break; case "\x05": // End this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x06": // right arrow if(this.input_pos < (this.input_buffer.length)) { this.input_pos++; } this.update_input_line(); break; case "\t": // Tab this.input_buffer=channels.current.matchnick(this.input_buffer); this.update_input_line(); break; default: if(ascii(key)<ascii(' ')) { if(ascii(key) != 27 && console.handle_ctrlkey!=undefined) { console.line_counter=0; // defeat pause console.ansi_gotoxy(1,console.screen_rows-1); console.clearline(); console.ansi_gotoxy(1,console.screen_rows); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-1); console.handle_ctrlkey(key,0); // for now console.print(this.statusline); console.crlf(); console.ansi_gotoxy(1,1); console.clearline(); console.print(this.topicline); this.update_input_line(); } } else { this.input_buffer=this.input_buffer.slice(0,this.input_pos)+key+this.input_buffer.slice(this.input_pos); this.input_pos++; this.update_input_line(); } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/b5722c5182ef7629ea0e2d9c4906098cad06553a/irc.js/buggy/irc.js |
|
screen.print_line("\x01N\x01M<\x01N\x01W"+nick+"\x01N\x01M>\x01N\x01W "+screen.input_buffer); | function Screen_handle_key(key) { var commands=[null]; var command=null; switch(key) { case "\r": if(screen.input_buffer=="") { break; } history.addline(screen.input_buffer); while(history.line.length>MAX_HIST) { history.shift(); } screen.input_buffer=screen.input_buffer.replace(/%C/g,"\x03"); screen.input_buffer=screen.input_buffer.replace(/%%/g,"%"); if(screen.input_buffer.substr(0,1)=="/" && screen.input_buffer.substr(1,1)!="/") { commands=screen.input_buffer.split(" "); command=commands.shift(); command=command.substr(1); command=command.toUpperCase(); send_command(command,commands.join(" ")); } else { if(screen.input_buffer.substr(0,1)=="/") { screen.input_buffer=screen.input_buffer.substr(1); } if(channels.current==undefined) { screen.print_line("\x01H\x01RYou are not in a channel!\x01N\x01W"); } else { channels.current.send(screen.input_buffer); } screen.print_line("\x01N\x01M<\x01N\x01W"+nick+"\x01N\x01M>\x01N\x01W "+screen.input_buffer); } screen.input_buffer=""; screen.update_input_line(); break; case "\x08": screen.input_buffer=screen.input_buffer.slice(0,-1); screen.update_input_line(); break; case "\x0b": screen.input_buffer=screen.input_buffer+"%C"; break; case "\x1e": // Up arrow if(history.index==null) { history.incomplete=screen.input_buffer; } screen.input_buffer=history.previous; screen.update_input_line() break; case "\x0a": // Down arrow if(history.index==null) { history.incomplete=screen.input_buffer; } screen.input_buffer=history.next; screen.update_input_line() break; case "\x1d": // Left arrow channels.index-=1; if(channels.index<0) { channels.index=channels.length-1; } screen.update_statline(); break; case "\x06": // right arrow channels.index+=1; if(channels.index>=channels.length) { channels.index=0; } screen.update_statline(); break; case "\t": // Tab screen.input_buffer=channels.current.matchnick(screen.input_buffer); screen.update_input_line(); break; default: screen.input_buffer=screen.input_buffer+key; screen.update_input_line(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/9a1dea9a611c8145e3b33bff13768ac5b7ed50e9/irc.js/clean/irc.js |
|
var nickmatch=""; var lastspace=0; | function Screen_handle_key(key) { var commands=[null]; var command=null; switch(key) { case "\r": if(this.input_buffer=="") { break; } history.addline(this.input_buffer); while(history.line.length>MAX_HIST) { history.shift(); } this.input_buffer=this.input_buffer.replace(/%C/g,"\x03"); this.input_buffer=this.input_buffer.replace(/%%/g,"%"); if(this.input_buffer.substr(0,1)=="/" && this.input_buffer.substr(1,1)!="/") { commands=this.input_buffer.split(" "); command=commands.shift(); command=command.substr(1); command=command.toUpperCase(); send_command(command,commands.join(" ")); } else { if(this.input_buffer.substr(0,1)=="/") { this.input_buffer=this.input_buffer.substr(1); } if(channels.current==undefined) { this.print_line("\x01H\x01RYou are not in a channel!\x01N\x01W"); } else { channels.current.send(this.input_buffer); this.print_line("\x01N\x01M<\x01N\x01W"+nick+"\x01N\x01M>\x01N\x01W "+this.input_buffer); } } this.input_buffer=""; this.input_pos=0; this.update_input_line(); break; case "\x08": if(this.input_pos > 0) { this.input_buffer=this.input_buffer.slice(0,this.input_pos-1)+this.input_buffer.slice(this.input_pos); this.input_pos--; this.update_input_line(); } break; case "\x0b": this.input_buffer=this.input_buffer+"%C"; this.input_pos+=2; break; case "\x1e": // Up arrow if(history.index==null) { history.incomplete=this.input_buffer; } this.input_buffer=history.previous; this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x0a": // Down arrow if(history.index==null) { history.incomplete=this.input_buffer; } this.input_buffer=history.next; this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x1d": // Left arrow if(this.input_pos > 0) { this.input_pos--; } this.update_input_line(); break; case "\x02": // Home this.input_pos=0; this.update_input_line() break; case "\x05": // End this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x06": // right arrow if(this.input_pos < (this.input_buffer.length)) { this.input_pos++; } this.update_input_line(); break; case "\t": // Tab this.input_buffer=channels.current.matchnick(this.input_buffer); // Always go to the end of the line on a tab. -- Cyan var my_eol = this.input_buffer.length; this.input_pos = my_eol; this.update_input_line(); break; default: if(ascii(key)<ascii(' ')) { if(ascii(key) != 27 && console.handle_ctrlkey!=undefined) { console.line_counter=0; // defeat pause console.ansi_gotoxy(1,console.screen_rows-1); console.clearline(); console.ansi_gotoxy(1,console.screen_rows); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-1); console.handle_ctrlkey(key,0); // for now console.print(this.statusline); console.crlf(); console.ansi_gotoxy(1,1); console.clearline(); console.print(this.topicline); this.update_input_line(); } } else { this.input_buffer=this.input_buffer.slice(0,this.input_pos)+key+this.input_buffer.slice(this.input_pos); this.input_pos++; this.update_input_line(); } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/88d6273437263e6dcee5f3b5915f6f5ff5f29c9e/irc.js/clean/irc.js |
|
this.input_buffer=channels.current.matchnick(this.input_buffer); var my_eol = this.input_buffer.length; this.input_pos = my_eol; | lastspace=this.input_buffer.lastIndexOf(" ",this.input_pos); nickmatch=channels.current.matchnick(this.input_buffer.substr(lastspace+1,this.input_pos-lastspace-1)); if(nickmatch != null) { this.input_buffer=this.input_buffer.substr(0,lastspace+1)+nickmatch+(lastspace==-1?": ":" ")+this.input_buffer.substr(this.input_pos); this.input_pos=lastspace+2+nickmatch.length; if(lastspace==-1) this.input_pos++; } | function Screen_handle_key(key) { var commands=[null]; var command=null; switch(key) { case "\r": if(this.input_buffer=="") { break; } history.addline(this.input_buffer); while(history.line.length>MAX_HIST) { history.shift(); } this.input_buffer=this.input_buffer.replace(/%C/g,"\x03"); this.input_buffer=this.input_buffer.replace(/%%/g,"%"); if(this.input_buffer.substr(0,1)=="/" && this.input_buffer.substr(1,1)!="/") { commands=this.input_buffer.split(" "); command=commands.shift(); command=command.substr(1); command=command.toUpperCase(); send_command(command,commands.join(" ")); } else { if(this.input_buffer.substr(0,1)=="/") { this.input_buffer=this.input_buffer.substr(1); } if(channels.current==undefined) { this.print_line("\x01H\x01RYou are not in a channel!\x01N\x01W"); } else { channels.current.send(this.input_buffer); this.print_line("\x01N\x01M<\x01N\x01W"+nick+"\x01N\x01M>\x01N\x01W "+this.input_buffer); } } this.input_buffer=""; this.input_pos=0; this.update_input_line(); break; case "\x08": if(this.input_pos > 0) { this.input_buffer=this.input_buffer.slice(0,this.input_pos-1)+this.input_buffer.slice(this.input_pos); this.input_pos--; this.update_input_line(); } break; case "\x0b": this.input_buffer=this.input_buffer+"%C"; this.input_pos+=2; break; case "\x1e": // Up arrow if(history.index==null) { history.incomplete=this.input_buffer; } this.input_buffer=history.previous; this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x0a": // Down arrow if(history.index==null) { history.incomplete=this.input_buffer; } this.input_buffer=history.next; this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x1d": // Left arrow if(this.input_pos > 0) { this.input_pos--; } this.update_input_line(); break; case "\x02": // Home this.input_pos=0; this.update_input_line() break; case "\x05": // End this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x06": // right arrow if(this.input_pos < (this.input_buffer.length)) { this.input_pos++; } this.update_input_line(); break; case "\t": // Tab this.input_buffer=channels.current.matchnick(this.input_buffer); // Always go to the end of the line on a tab. -- Cyan var my_eol = this.input_buffer.length; this.input_pos = my_eol; this.update_input_line(); break; default: if(ascii(key)<ascii(' ')) { if(ascii(key) != 27 && console.handle_ctrlkey!=undefined) { console.line_counter=0; // defeat pause console.ansi_gotoxy(1,console.screen_rows-1); console.clearline(); console.ansi_gotoxy(1,console.screen_rows); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-1); console.handle_ctrlkey(key,0); // for now console.print(this.statusline); console.crlf(); console.ansi_gotoxy(1,1); console.clearline(); console.print(this.topicline); this.update_input_line(); } } else { this.input_buffer=this.input_buffer.slice(0,this.input_pos)+key+this.input_buffer.slice(this.input_pos); this.input_pos++; this.update_input_line(); } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/88d6273437263e6dcee5f3b5915f6f5ff5f29c9e/irc.js/clean/irc.js |
console.ansi_gotoxy(1,console.screen_rows-1); | console.ansi_gotoxy(1,console.screen_rows-2); | function Screen_handle_key(key) { var commands=[null]; var command=null; switch(key) { case "\r": if(this.input_buffer=="") { break; } history.addline(this.input_buffer); while(history.line.length>MAX_HIST) { history.shift(); } this.input_buffer=this.input_buffer.replace(/%C/g,"\x03"); this.input_buffer=this.input_buffer.replace(/%%/g,"%"); if(this.input_buffer.substr(0,1)=="/" && this.input_buffer.substr(1,1)!="/") { commands=this.input_buffer.split(" "); command=commands.shift(); command=command.substr(1); command=command.toUpperCase(); send_command(command,commands.join(" ")); } else { if(this.input_buffer.substr(0,1)=="/") { this.input_buffer=this.input_buffer.substr(1); } if(channels.current==undefined) { this.print_line("\x01H\x01RYou are not in a channel!\x01N\x01W"); } else { channels.current.send(this.input_buffer); this.print_line("\x01N\x01M<\x01N\x01W"+nick+"\x01N\x01M>\x01N\x01W "+this.input_buffer); } } this.input_buffer=""; this.input_pos=0; this.update_input_line(); break; case "\x08": if(this.input_pos > 0) { this.input_buffer=this.input_buffer.slice(0,this.input_pos-1)+this.input_buffer.slice(this.input_pos); this.input_pos--; this.update_input_line(); } break; case "\x0b": this.input_buffer=this.input_buffer+"%C"; this.input_pos+=2; break; case "\x1e": // Up arrow if(history.index==null) { history.incomplete=this.input_buffer; } this.input_buffer=history.previous; this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x0a": // Down arrow if(history.index==null) { history.incomplete=this.input_buffer; } this.input_buffer=history.next; this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x1d": // Left arrow if(this.input_pos > 0) { this.input_pos--; } this.update_input_line(); break; case "\x02": // Home this.input_pos=0; this.update_input_line() break; case "\x05": // End this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x06": // right arrow if(this.input_pos < (this.input_buffer.length)) { this.input_pos++; } this.update_input_line(); break; case "\t": // Tab this.input_buffer=channels.current.matchnick(this.input_buffer); // Always go to the end of the line on a tab. -- Cyan var my_eol = this.input_buffer.length; this.input_pos = my_eol; this.update_input_line(); break; default: if(ascii(key)<ascii(' ')) { if(ascii(key) != 27 && console.handle_ctrlkey!=undefined) { console.line_counter=0; // defeat pause console.ansi_gotoxy(1,console.screen_rows-1); console.clearline(); console.ansi_gotoxy(1,console.screen_rows); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-1); console.handle_ctrlkey(key,0); // for now console.print(this.statusline); console.crlf(); console.ansi_gotoxy(1,1); console.clearline(); console.print(this.topicline); this.update_input_line(); } } else { this.input_buffer=this.input_buffer.slice(0,this.input_pos)+key+this.input_buffer.slice(this.input_pos); this.input_pos++; this.update_input_line(); } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/88d6273437263e6dcee5f3b5915f6f5ff5f29c9e/irc.js/clean/irc.js |
console.crlf(); console.ansi_gotoxy(1,1); console.clearline(); console.print(this.topicline); | function Screen_handle_key(key) { var commands=[null]; var command=null; switch(key) { case "\r": if(this.input_buffer=="") { break; } history.addline(this.input_buffer); while(history.line.length>MAX_HIST) { history.shift(); } this.input_buffer=this.input_buffer.replace(/%C/g,"\x03"); this.input_buffer=this.input_buffer.replace(/%%/g,"%"); if(this.input_buffer.substr(0,1)=="/" && this.input_buffer.substr(1,1)!="/") { commands=this.input_buffer.split(" "); command=commands.shift(); command=command.substr(1); command=command.toUpperCase(); send_command(command,commands.join(" ")); } else { if(this.input_buffer.substr(0,1)=="/") { this.input_buffer=this.input_buffer.substr(1); } if(channels.current==undefined) { this.print_line("\x01H\x01RYou are not in a channel!\x01N\x01W"); } else { channels.current.send(this.input_buffer); this.print_line("\x01N\x01M<\x01N\x01W"+nick+"\x01N\x01M>\x01N\x01W "+this.input_buffer); } } this.input_buffer=""; this.input_pos=0; this.update_input_line(); break; case "\x08": if(this.input_pos > 0) { this.input_buffer=this.input_buffer.slice(0,this.input_pos-1)+this.input_buffer.slice(this.input_pos); this.input_pos--; this.update_input_line(); } break; case "\x0b": this.input_buffer=this.input_buffer+"%C"; this.input_pos+=2; break; case "\x1e": // Up arrow if(history.index==null) { history.incomplete=this.input_buffer; } this.input_buffer=history.previous; this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x0a": // Down arrow if(history.index==null) { history.incomplete=this.input_buffer; } this.input_buffer=history.next; this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x1d": // Left arrow if(this.input_pos > 0) { this.input_pos--; } this.update_input_line(); break; case "\x02": // Home this.input_pos=0; this.update_input_line() break; case "\x05": // End this.input_pos=this.input_buffer.length; this.update_input_line() break; case "\x06": // right arrow if(this.input_pos < (this.input_buffer.length)) { this.input_pos++; } this.update_input_line(); break; case "\t": // Tab this.input_buffer=channels.current.matchnick(this.input_buffer); // Always go to the end of the line on a tab. -- Cyan var my_eol = this.input_buffer.length; this.input_pos = my_eol; this.update_input_line(); break; default: if(ascii(key)<ascii(' ')) { if(ascii(key) != 27 && console.handle_ctrlkey!=undefined) { console.line_counter=0; // defeat pause console.ansi_gotoxy(1,console.screen_rows-1); console.clearline(); console.ansi_gotoxy(1,console.screen_rows); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-1); console.handle_ctrlkey(key,0); // for now console.print(this.statusline); console.crlf(); console.ansi_gotoxy(1,1); console.clearline(); console.print(this.topicline); this.update_input_line(); } } else { this.input_buffer=this.input_buffer.slice(0,this.input_pos)+key+this.input_buffer.slice(this.input_pos); this.input_pos++; this.update_input_line(); } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/88d6273437263e6dcee5f3b5915f6f5ff5f29c9e/irc.js/clean/irc.js |
|
console.ansi_gotoxy(1,console.screen_rows-2); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-1); console.clearline(); console.ansi_gotoxy(1,console.screen_rows); console.clearline(); | function Screen_print_line(line) { var i=0; var lastspace=0; var linestart=0; var prev_colour=""; var last_colour=""; var cname=""; var topic=""; console.line_counter=0; // defeat pause console.ansi_gotoxy(1,console.screen_rows-2); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-1); console.clearline(); console.ansi_gotoxy(1,console.screen_rows); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-2); // Remove bold line=line.replace(/\x02/g,""); // mIRC colour codes line=line.replace(/\x03([0-9\,]{1,5})/g, function(str,p1,offset,s) { var p2; var ending=null; var codes=[null]; var ret=null; ending=""; codes=p1.split(","); p1=codes[0]; codes.shift(); p2=codes[0]; codes.shift(); ending=","+codes.join(","); if(p2==undefined) { p2="-1"; } if(p2.length>2) { ending=p2.substr(2)+ending; p2=p2.substr(0,2); } if(p1.length>2) { ending=p1.substr(2)+ending; p1=p1.substr(0,2); } p1=Number(p1); p2=Number(p2); p1=p1 % 16; if(p2>=0 && p2<=99) { p2=Number(p2) % 8; } else { p2=8; } switch(p1) { case 0: ret="\x01H\x01W"; break; case 1: ret="\x01N\x01K"; break; case 2: ret="\x01N\x01B"; break; case 3: ret="\x01N\x01G"; break; case 4: ret="\x01N\x01R"; break; case 5: ret="\x01N\x01Y"; break; case 6: ret="\x01H\x01M"; break; case 7: // This is supposed to be ORANGE damnit! ret="\x01H\x01R"; break; case 8: ret="\x01H\x01Y"; break; case 9: ret="\x01H\x01G"; break; case 10: ret="\x01N\x01C"; break; case 11: ret="\x01H\x01C"; break; case 12: ret="\x01H\x01B"; break; case 13: ret="\x01H\x01M"; break; case 14: ret="\x01H\x01K"; break; case 15: ret="\x01N\x01W"; break; default: ret=""; } switch(p2) { case 0: ret=ret+"\x017"; break; case 1: ret=ret+"\x010"; break; case 2: ret=ret+"\x014"; break; case 3: ret=ret+"\x012"; break; case 4: ret=ret+"\x011"; break; case 5: ret=ret+"\x013"; break; case 6: ret=ret+"\x015"; break; case 7: // This is supposed to be ORANGE damnit! ret=ret+"\x016"; break; } return ret+ending; } ); if(line.length > 78) { // Word Wrap... for(var j=0;j<=line.length;j++) { switch(line.charAt(j)) { case "\x01": last_colour=last_colour+line.substr(j,2); j+=1; break; case " ": lastspace=j; default: if(i>=78) { if(lastspace==linestart-1) { lastspace=j; } console.print(prev_colour+line.substring(linestart,lastspace+1)); prev_colour=last_colour; console.crlf(); this.line.shift(); this.line.push(prev_colour+line.substring(linestart,lastspace+1)); linestart=lastspace+1; j=lastspace; i=0; } i+=1; } } } if(i<=78) { console.print(prev_colour+line.substr(linestart)); this.line.shift(); this.line.push(prev_colour+line.substr(linestart)); console.crlf(); } if(!connected) { cname="No channel"; topic="Not in channel"; } else if (channels==undefined) { cname="No channel"; topic="Not in channel"; } else if (channels.current==undefined) { cname="No channel"; topic="Not in channel"; } else { cname=channels.current.display; topic=channels.current.topic; } console.print(this.topicline); console.print(this.statusline); console.crlf(); this.update_input_line();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/17efe2284c9cba73905332567c8dece4adaef82f/irc.js/clean/irc.js |
|
console.crlf(); | function Screen_print_line(line) { var i=0; var lastspace=0; var linestart=0; var prev_colour=""; var last_colour=""; var cname=""; var topic=""; console.line_counter=0; // defeat pause console.ansi_gotoxy(1,console.screen_rows-2); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-1); console.clearline(); console.ansi_gotoxy(1,console.screen_rows); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-2); // Remove bold line=line.replace(/\x02/g,""); // mIRC colour codes line=line.replace(/\x03([0-9\,]{1,5})/g, function(str,p1,offset,s) { var p2; var ending=null; var codes=[null]; var ret=null; ending=""; codes=p1.split(","); p1=codes[0]; codes.shift(); p2=codes[0]; codes.shift(); ending=","+codes.join(","); if(p2==undefined) { p2="-1"; } if(p2.length>2) { ending=p2.substr(2)+ending; p2=p2.substr(0,2); } if(p1.length>2) { ending=p1.substr(2)+ending; p1=p1.substr(0,2); } p1=Number(p1); p2=Number(p2); p1=p1 % 16; if(p2>=0 && p2<=99) { p2=Number(p2) % 8; } else { p2=8; } switch(p1) { case 0: ret="\x01H\x01W"; break; case 1: ret="\x01N\x01K"; break; case 2: ret="\x01N\x01B"; break; case 3: ret="\x01N\x01G"; break; case 4: ret="\x01N\x01R"; break; case 5: ret="\x01N\x01Y"; break; case 6: ret="\x01H\x01M"; break; case 7: // This is supposed to be ORANGE damnit! ret="\x01H\x01R"; break; case 8: ret="\x01H\x01Y"; break; case 9: ret="\x01H\x01G"; break; case 10: ret="\x01N\x01C"; break; case 11: ret="\x01H\x01C"; break; case 12: ret="\x01H\x01B"; break; case 13: ret="\x01H\x01M"; break; case 14: ret="\x01H\x01K"; break; case 15: ret="\x01N\x01W"; break; default: ret=""; } switch(p2) { case 0: ret=ret+"\x017"; break; case 1: ret=ret+"\x010"; break; case 2: ret=ret+"\x014"; break; case 3: ret=ret+"\x012"; break; case 4: ret=ret+"\x011"; break; case 5: ret=ret+"\x013"; break; case 6: ret=ret+"\x015"; break; case 7: // This is supposed to be ORANGE damnit! ret=ret+"\x016"; break; } return ret+ending; } ); if(line.length > 78) { // Word Wrap... for(var j=0;j<=line.length;j++) { switch(line.charAt(j)) { case "\x01": last_colour=last_colour+line.substr(j,2); j+=1; break; case " ": lastspace=j; default: if(i>=78) { if(lastspace==linestart-1) { lastspace=j; } console.print(prev_colour+line.substring(linestart,lastspace+1)); prev_colour=last_colour; console.crlf(); this.line.shift(); this.line.push(prev_colour+line.substring(linestart,lastspace+1)); linestart=lastspace+1; j=lastspace; i=0; } i+=1; } } } if(i<=78) { console.print(prev_colour+line.substr(linestart)); this.line.shift(); this.line.push(prev_colour+line.substr(linestart)); console.crlf(); } if(!connected) { cname="No channel"; topic="Not in channel"; } else if (channels==undefined) { cname="No channel"; topic="Not in channel"; } else if (channels.current==undefined) { cname="No channel"; topic="Not in channel"; } else { cname=channels.current.display; topic=channels.current.topic; } console.print(this.topicline); console.print(this.statusline); console.crlf(); this.update_input_line();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/17efe2284c9cba73905332567c8dece4adaef82f/irc.js/clean/irc.js |
|
if(i<78) { | if(i<=78) { | function Screen_print_line(line) { var i=0; var lastspace=0; var linestart=0; var prev_colour=""; var last_colour=""; var cname=""; var topic=""; console.line_counter=0; // defeat pause console.ansi_gotoxy(1,console.screen_rows-1); console.clearline(); console.ansi_gotoxy(1,console.screen_rows); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-1); // Remove bold line=line.replace(/\x02/g,""); // mIRC colour codes line=line.replace(/\x03([0-9\,]{1,5})/g, function(str,p1,offset,s) { var p2; var ending=null; var codes=[null]; var ret=null; ending=""; codes=p1.split(","); p1=codes[0]; codes.shift(); p2=codes[0]; codes.shift(); ending=","+codes.join(","); if(p2==undefined) { p2="-1"; } if(p2.length>2) { ending=p2.substr(2)+ending; p2=p2.substr(0,2); } if(p1.length>2) { ending=p1.substr(2)+ending; p1=p1.substr(0,2); } p1=Number(p1); p2=Number(p2); p1=p1 % 16; if(p2>=0 && p2<=99) { p2=Number(p2) % 8; } else { p2=8; } switch(p1) { case 0: ret="\x01H\x01W"; break; case 1: ret="\x01N\x01K"; break; case 2: ret="\x01N\x01B"; break; case 3: ret="\x01N\x01G"; break; case 4: ret="\x01N\x01R"; break; case 5: ret="\x01N\x01Y"; break; case 6: ret="\x01H\x01M"; break; case 7: // This is supposed to be ORANGE damnit! ret="\x01H\x01R"; break; case 8: ret="\x01H\x01Y"; break; case 9: ret="\x01H\x01G"; break; case 10: ret="\x01N\x01C"; break; case 11: ret="\x01H\x01C"; break; case 12: ret="\x01H\x01B"; break; case 13: ret="\x01H\x01M"; break; case 14: ret="\x01H\x01K"; break; case 15: ret="\x01N\x01W"; break; default: ret=""; } switch(p2) { case 0: ret=ret+"\x017"; break; case 1: ret=ret+"\x010"; break; case 2: ret=ret+"\x014"; break; case 3: ret=ret+"\x012"; break; case 4: ret=ret+"\x011"; break; case 5: ret=ret+"\x013"; break; case 6: ret=ret+"\x015"; break; case 7: // This is supposed to be ORANGE damnit! ret=ret+"\x016"; break; } return ret+ending; } ); if(line.length > 78) { // Word Wrap... for(var j=0;j<=line.length;j++) { switch(line.charAt(j)) { case "\x01": last_colour=last_colour+line.substr(j,2); j+=1; break; case " ": lastspace=j; default: if(i>=78) { if(lastspace==linestart-1) { lastspace=j; } console.print(prev_colour+line.substring(linestart,lastspace+1)); prev_colour=last_colour; console.crlf(); this.line.shift(); this.line.push(prev_colour+line.substring(linestart,lastspace+1)); linestart=lastspace+1; j=lastspace; i=0; } i+=1; } } } if(i<78) { console.print(prev_colour+line.substr(linestart)); this.line.shift(); this.line.push(prev_colour+line.substr(linestart)); console.crlf(); } if(!connected) { cname="No channel"; topic="Not in channel"; } else if (channels==undefined) { cname="No channel"; topic="Not in channel"; } else if (channels.current==undefined) { cname="No channel"; topic="Not in channel"; } else { cname=channels.current.display; topic=channels.current.topic; } console.print(this.statusline); console.crlf(); console.ansi_gotoxy(1,1); console.clearline(); console.print(this.topicline); this.update_input_line();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/0806a42f5b2ec872bfe9400d9d78e95eebb2c03e/irc.js/buggy/irc.js |
console.ansi_gotoxy(1,console.screen_rows-1); | console.ansi_gotoxy(1,console.screen_rows-2); | function Screen_print_line(line) { var i=0; var lastspace=0; var linestart=0; var prev_colour=""; var last_colour=""; var cname=""; var topic=""; console.line_counter=0; // defeat pause console.ansi_gotoxy(1,console.screen_rows-1); console.clearline(); console.ansi_gotoxy(1,console.screen_rows); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-1); // Remove bold line=line.replace(/\x02/g,""); // mIRC colour codes line=line.replace(/\x03([0-9\,]{1,5})/g, function(str,p1,offset,s) { var p2; var ending=null; var codes=[null]; var ret=null; ending=""; codes=p1.split(","); p1=codes[0]; codes.shift(); p2=codes[0]; codes.shift(); ending=","+codes.join(","); if(p2==undefined) { p2="-1"; } if(p2.length>2) { ending=p2.substr(2)+ending; p2=p2.substr(0,2); } if(p1.length>2) { ending=p1.substr(2)+ending; p1=p1.substr(0,2); } p1=Number(p1); p2=Number(p2); p1=p1 % 16; if(p2>=0 && p2<=99) { p2=Number(p2) % 8; } else { p2=8; } switch(p1) { case 0: ret="\x01H\x01W"; break; case 1: ret="\x01N\x01K"; break; case 2: ret="\x01N\x01B"; break; case 3: ret="\x01N\x01G"; break; case 4: ret="\x01N\x01R"; break; case 5: ret="\x01N\x01Y"; break; case 6: ret="\x01H\x01M"; break; case 7: // This is supposed to be ORANGE damnit! ret="\x01H\x01R"; break; case 8: ret="\x01H\x01Y"; break; case 9: ret="\x01H\x01G"; break; case 10: ret="\x01N\x01C"; break; case 11: ret="\x01H\x01C"; break; case 12: ret="\x01H\x01B"; break; case 13: ret="\x01H\x01M"; break; case 14: ret="\x01H\x01K"; break; case 15: ret="\x01N\x01W"; break; default: ret=""; } switch(p2) { case 0: ret=ret+"\x017"; break; case 1: ret=ret+"\x010"; break; case 2: ret=ret+"\x014"; break; case 3: ret=ret+"\x012"; break; case 4: ret=ret+"\x011"; break; case 5: ret=ret+"\x013"; break; case 6: ret=ret+"\x015"; break; case 7: // This is supposed to be ORANGE damnit! ret=ret+"\x016"; break; } return ret+ending; } ); if(line.length > 78) { // Word Wrap... for(var j=0;j<=line.length;j++) { switch(line.charAt(j)) { case "\x01": last_colour=last_colour+line.substr(j,2); j+=1; break; case " ": lastspace=j; default: if(i>=78) { if(lastspace==linestart-1) { lastspace=j; } console.print(prev_colour+line.substring(linestart,lastspace+1)); prev_colour=last_colour; console.crlf(); this.line.shift(); this.line.push(prev_colour+line.substring(linestart,lastspace+1)); linestart=lastspace+1; j=lastspace; i=0; } i+=1; } } } if(i<=78) { console.print(prev_colour+line.substr(linestart)); this.line.shift(); this.line.push(prev_colour+line.substr(linestart)); console.crlf(); } if(!connected) { cname="No channel"; topic="Not in channel"; } else if (channels==undefined) { cname="No channel"; topic="Not in channel"; } else if (channels.current==undefined) { cname="No channel"; topic="Not in channel"; } else { cname=channels.current.display; topic=channels.current.topic; } console.print(this.statusline); console.crlf(); console.ansi_gotoxy(1,1); console.clearline(); console.print(this.topicline); this.update_input_line();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/88d6273437263e6dcee5f3b5915f6f5ff5f29c9e/irc.js/clean/irc.js |
console.ansi_gotoxy(1,1); console.clearline(); console.print(this.topicline); | function Screen_print_line(line) { var i=0; var lastspace=0; var linestart=0; var prev_colour=""; var last_colour=""; var cname=""; var topic=""; console.line_counter=0; // defeat pause console.ansi_gotoxy(1,console.screen_rows-1); console.clearline(); console.ansi_gotoxy(1,console.screen_rows); console.clearline(); console.ansi_gotoxy(1,console.screen_rows-1); // Remove bold line=line.replace(/\x02/g,""); // mIRC colour codes line=line.replace(/\x03([0-9\,]{1,5})/g, function(str,p1,offset,s) { var p2; var ending=null; var codes=[null]; var ret=null; ending=""; codes=p1.split(","); p1=codes[0]; codes.shift(); p2=codes[0]; codes.shift(); ending=","+codes.join(","); if(p2==undefined) { p2="-1"; } if(p2.length>2) { ending=p2.substr(2)+ending; p2=p2.substr(0,2); } if(p1.length>2) { ending=p1.substr(2)+ending; p1=p1.substr(0,2); } p1=Number(p1); p2=Number(p2); p1=p1 % 16; if(p2>=0 && p2<=99) { p2=Number(p2) % 8; } else { p2=8; } switch(p1) { case 0: ret="\x01H\x01W"; break; case 1: ret="\x01N\x01K"; break; case 2: ret="\x01N\x01B"; break; case 3: ret="\x01N\x01G"; break; case 4: ret="\x01N\x01R"; break; case 5: ret="\x01N\x01Y"; break; case 6: ret="\x01H\x01M"; break; case 7: // This is supposed to be ORANGE damnit! ret="\x01H\x01R"; break; case 8: ret="\x01H\x01Y"; break; case 9: ret="\x01H\x01G"; break; case 10: ret="\x01N\x01C"; break; case 11: ret="\x01H\x01C"; break; case 12: ret="\x01H\x01B"; break; case 13: ret="\x01H\x01M"; break; case 14: ret="\x01H\x01K"; break; case 15: ret="\x01N\x01W"; break; default: ret=""; } switch(p2) { case 0: ret=ret+"\x017"; break; case 1: ret=ret+"\x010"; break; case 2: ret=ret+"\x014"; break; case 3: ret=ret+"\x012"; break; case 4: ret=ret+"\x011"; break; case 5: ret=ret+"\x013"; break; case 6: ret=ret+"\x015"; break; case 7: // This is supposed to be ORANGE damnit! ret=ret+"\x016"; break; } return ret+ending; } ); if(line.length > 78) { // Word Wrap... for(var j=0;j<=line.length;j++) { switch(line.charAt(j)) { case "\x01": last_colour=last_colour+line.substr(j,2); j+=1; break; case " ": lastspace=j; default: if(i>=78) { if(lastspace==linestart-1) { lastspace=j; } console.print(prev_colour+line.substring(linestart,lastspace+1)); prev_colour=last_colour; console.crlf(); this.line.shift(); this.line.push(prev_colour+line.substring(linestart,lastspace+1)); linestart=lastspace+1; j=lastspace; i=0; } i+=1; } } } if(i<=78) { console.print(prev_colour+line.substr(linestart)); this.line.shift(); this.line.push(prev_colour+line.substr(linestart)); console.crlf(); } if(!connected) { cname="No channel"; topic="Not in channel"; } else if (channels==undefined) { cname="No channel"; topic="Not in channel"; } else if (channels.current==undefined) { cname="No channel"; topic="Not in channel"; } else { cname=channels.current.display; topic=channels.current.topic; } console.print(this.statusline); console.crlf(); console.ansi_gotoxy(1,1); console.clearline(); console.print(this.topicline); this.update_input_line();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/88d6273437263e6dcee5f3b5915f6f5ff5f29c9e/irc.js/clean/irc.js |
|
var key=console.inkey(); | var key=console.inkey(100); | function Screen_update() { while(1) { var key=console.inkey(); if(key!="") this.handle_key(key); else break; }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/88d6273437263e6dcee5f3b5915f6f5ff5f29c9e/irc.js/clean/irc.js |
function Screen_update() { | function Screen_update(wait) { | function Screen_update() { while(1) { var key=console.inkey(100); if(key!="") this.handle_key(key); else break; }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/50fb015d6b7ae46d1aa8ca76db9f7c07fe4bf370/irc.js/clean/irc.js |
var key=console.inkey(100); | var key=console.inkey(wait); | function Screen_update() { while(1) { var key=console.inkey(100); if(key!="") this.handle_key(key); else break; }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/50fb015d6b7ae46d1aa8ca76db9f7c07fe4bf370/irc.js/clean/irc.js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.