rem:  return true; 
add: } actualLength++; 
context: function testEquals(actual, expected, depth){    // Rather than failing we assume that it works!    if (depth > 10)    {        return true;    }    if (expected == null)    {        if (actual != null)        {            return "expected: null, actual non-null: " + DWRUtil.toDescriptiveString(actual);        }        return true;    }    if (actual == null)    {        if (expected != null)        {            return "actual: null, expected non-null: " + DWRUtil.toDescriptiveString(expected);        }        // wont get here of course ...        return true;    }    if (expected instanceof Object)    {        if (!(actual instanceof Object))        {            return "expected object, actual not an object";        }        var actualLength = 0;        for (var prop in actual)        {            if (typeof actual[prop] != "function" || typeof expected[prop] != "function")            {                var nest = testEquals(actual[prop], expected[prop], depth + 1);                if (typeof nest != "boolean" || !nest)                {                    return "element '" + prop + "' does not match: " + nest;                }            }            actualLength++;        }        // need to check length too        var expectedLength = 0;        for (prop in expected)        {            expectedLength++;        }        if (actualLength != expectedLength)        {            return "expected object size = " + expectedLength + ", actual object size = " + actualLength;        }        return true;    }    if (actual != expected)    {        return "expected = " + expected + " (type=" + typeof expected + "), actual = " + actual + " (type=" + typeof actual + ")";    }    if (expected instanceof Array)    {        if (!(actual instanceof Array))        {            return "expected array, actual not an array";        }        if (actual.length != expected.length)        {            return "expected array length = " + expected.length + ", actual array length = " + actual.length;        }        for (var i = 0; i < actual.length; i++)        {            var inner = testEquals(actual[i], expected[i], depth + 1);            if (typeof inner != "boolean" || !inner)            {                return "element " + i + " does not match: " + inner;            }        }        return true;    }    return true;}
meta: 266	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/266/a6659fd28de5e0d001fe9e46da6cdb9dd78104c0/testsuite.js/buggy/web/testsuite.js