rem: var isEmpty  = (sqlQuery.value == '') ? 1 : 0; 
add: isEmpty      = (sqlQuery.value == '') ? 1 : 0; 
context: function checkSqlQuery(theForm){    var sqlQuery = theForm.elements['sql_query'];    // The replace function (js1.2) isn't supported -> basic tests    if (typeof(sqlQuery.value.replace) == 'undefined') {        var isEmpty  = (sqlQuery.value == '') ? 1 : 0;        if (isEmpty && typeof(theForm.elements['sql_file']) != 'undefined') {            isEmpty  = (theForm.elements['sql_file'].value == '') ? 1 : 0;        }        if (isEmpty && typeof(theForm.elements['id_bookmark']) != 'undefined') {            isEmpty  = (theForm.elements['id_bookmark'].value == null || theForm.elements['id_bookmark'].value == '');        }    }    // js1.2+ -> validation with regular expressions     else {        var space_re = new RegExp('\\s+');        var isEmpty  = (sqlQuery.value.replace(space_re, '') == '') ? 1 : 0;        // Checks for "DROP/DELETE/ALTER" statements        if (!isEmpty && !confirmQuery(theForm, sqlQuery)) {            return false;        }        if (isEmpty && typeof(theForm.elements['sql_file']) != 'undefined') {            isEmpty  = (theForm.elements['sql_file'].value.replace(space_re, '') == '') ? 1 : 0;        }        if (isEmpty && typeof(theForm.elements['id_bookmark']) != 'undefined') {            isEmpty  = (theForm.elements['id_bookmark'].value == null || theForm.elements['id_bookmark'].value == '');            isEmpty  = (theForm.elements['id_bookmark'].selectedIndex == 0);        }        if (isEmpty) {            theForm.reset();        }    }    if (isEmpty) {        sqlQuery.select();        alert(errorMsg0);        sqlQuery.focus();        return false;    }    return true;} // end of the 'checkSqlQuery()' function
meta: 6623	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6623/c357aa9976b524b045a841806670d877d8a45f45/functions.js/buggy/libraries/functions.js