[{ "testCaseDescription": "javascript-for-loop-with-in-statement-insert-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 5, 8 ] }, { "category": "Identifier", "range": [ 12, 21 ] } ], "range": [ 5, 21 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 25, 26 ] }, { "category": "NumberLiteral", "range": [ 29, 30 ] } ], "range": [ 25, 30 ] } ], "range": [ 5, 30 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 32, 33 ] }, { "category": "Identifier", "range": [ 36, 37 ] } ], "range": [ 32, 37 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 39, 40 ] } ], "range": [ 39, 42 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 46, 57 ] } ], "range": [ 46, 59 ] } ], "range": [ 46, 60 ] } ], "range": [ 44, 62 ] } ], "range": [ 0, 62 ] } ], "patch": "insert", "range": [ 0, 63 ] } ], "hasChanges": true, "range": [ 0, 63 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [], "patch": "insert", "range": [ 63, 63 ] } ], "hasChanges": true, "range": [ 63, 63 ], "number": 2 } ] ], "paths": [ "for-loop-with-in-statement.js", "for-loop-with-in-statement.js" ], "oids": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "c467478aec217a5b0911a4123d649479f2ec1975" ] }, "filePaths": [ "for-loop-with-in-statement.js" ], "patch": [ "diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js", "index e69de29..c467478 100644", "--- a/for-loop-with-in-statement.js", "+++ b/for-loop-with-in-statement.js", "@@ -0,0 +1 @@", "+for (key in something && i = 0; i < n; i++) { doSomething(); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "8dd4d424eeae076b657c04fb290058c4635ae818..9811288bc6b350e349973dec14748a359efedc76" } ,{ "testCaseDescription": "javascript-for-loop-with-in-statement-replacement-insert-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 5, 13 ] }, { "category": "Identifier", "range": [ 17, 26 ] } ], "range": [ 5, 26 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 30, 31 ] }, { "category": "NumberLiteral", "range": [ 34, 35 ] } ], "range": [ 30, 35 ] } ], "range": [ 5, 35 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 37, 38 ] }, { "category": "Identifier", "range": [ 41, 42 ] } ], "range": [ 37, 42 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 44, 45 ] } ], "range": [ 44, 47 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 51, 67 ] } ], "range": [ 51, 69 ] } ], "range": [ 51, 70 ] } ], "range": [ 49, 72 ] } ], "patch": "insert", "range": [ 0, 72 ] } ], "range": [ 0, 73 ] } ], "hasChanges": true, "range": [ 0, 73 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 78, 81 ] }, { "category": "Identifier", "range": [ 85, 94 ] } ], "range": [ 78, 94 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 98, 99 ] }, { "category": "NumberLiteral", "range": [ 102, 103 ] } ], "range": [ 98, 103 ] } ], "range": [ 78, 103 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 105, 106 ] }, { "category": "Identifier", "range": [ 109, 110 ] } ], "range": [ 105, 110 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 112, 113 ] } ], "range": [ 112, 115 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 119, 130 ] } ], "range": [ 119, 132 ] } ], "range": [ 119, 133 ] } ], "range": [ 117, 135 ] } ], "patch": "insert", "range": [ 73, 135 ] } ], "range": [ 73, 136 ] } ], "hasChanges": true, "range": [ 73, 136 ], "number": 2 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 5, 8 ] }, { "category": "Identifier", "range": [ 12, 21 ] } ], "range": [ 5, 21 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 25, 26 ] }, { "category": "NumberLiteral", "range": [ 29, 30 ] } ], "range": [ 25, 30 ] } ], "range": [ 5, 30 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 32, 33 ] }, { "category": "Identifier", "range": [ 36, 37 ] } ], "range": [ 32, 37 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 39, 40 ] } ], "range": [ 39, 42 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 46, 57 ] } ], "range": [ 46, 59 ] } ], "range": [ 46, 60 ] } ], "range": [ 44, 62 ] } ], "range": [ 0, 62 ] } ], "range": [ 0, 63 ] } ], "hasChanges": false, "range": [ 0, 63 ], "number": 1 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 141, 144 ] }, { "category": "Identifier", "range": [ 148, 157 ] } ], "range": [ 141, 157 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 161, 162 ] }, { "category": "NumberLiteral", "range": [ 165, 166 ] } ], "range": [ 161, 166 ] } ], "range": [ 141, 166 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 168, 169 ] }, { "category": "Identifier", "range": [ 172, 173 ] } ], "range": [ 168, 173 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 175, 176 ] } ], "range": [ 175, 178 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 182, 193 ] } ], "range": [ 182, 195 ] } ], "range": [ 182, 196 ] } ], "range": [ 180, 198 ] } ], "range": [ 136, 198 ] } ], "range": [ 136, 199 ] } ], "hasChanges": false, "range": [ 136, 199 ], "number": 3 } ], [ { "terms": [ { "category": "Program", "children": [], "range": [ 63, 63 ] } ], "hasChanges": false, "range": [ 63, 63 ], "number": 2 }, { "terms": [ { "category": "Program", "children": [], "range": [ 199, 199 ] } ], "hasChanges": false, "range": [ 199, 199 ], "number": 4 } ] ], "paths": [ "for-loop-with-in-statement.js", "for-loop-with-in-statement.js" ], "oids": [ "c467478aec217a5b0911a4123d649479f2ec1975", "0147d3180bc89a8f7f7722ebe9ba1ee53fbeeb87" ] }, "filePaths": [ "for-loop-with-in-statement.js" ], "patch": [ "diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js", "index c467478..0147d31 100644", "--- a/for-loop-with-in-statement.js", "+++ b/for-loop-with-in-statement.js", "@@ -1 +1,3 @@", "+for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }", "+for (key in something && i = 0; i < n; i++) { doSomething(); }", " for (key in something && i = 0; i < n; i++) { doSomething(); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "9811288bc6b350e349973dec14748a359efedc76..63fc9f47c0b135eec17ac28e315a58a052f21fc8" } ,{ "testCaseDescription": "javascript-for-loop-with-in-statement-delete-insert-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "patch": "replace", "range": [ 5, 13 ] }, { "category": "Identifier", "range": [ 17, 26 ] } ], "range": [ 5, 26 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 30, 31 ] }, { "category": "NumberLiteral", "range": [ 34, 35 ] } ], "range": [ 30, 35 ] } ], "range": [ 5, 35 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 37, 38 ] }, { "category": "Identifier", "range": [ 41, 42 ] } ], "range": [ 37, 42 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 44, 45 ] } ], "range": [ 44, 47 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "patch": "replace", "range": [ 51, 67 ] } ], "range": [ 51, 69 ] } ], "range": [ 51, 70 ] } ], "range": [ 49, 72 ] } ], "range": [ 0, 72 ] } ], "range": [ 0, 73 ] } ], "hasChanges": true, "range": [ 0, 73 ], "number": 1 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "patch": "replace", "range": [ 5, 8 ] }, { "category": "Identifier", "range": [ 12, 21 ] } ], "range": [ 5, 21 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 25, 26 ] }, { "category": "NumberLiteral", "range": [ 29, 30 ] } ], "range": [ 25, 30 ] } ], "range": [ 5, 30 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 32, 33 ] }, { "category": "Identifier", "range": [ 36, 37 ] } ], "range": [ 32, 37 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 39, 40 ] } ], "range": [ 39, 42 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "patch": "replace", "range": [ 46, 57 ] } ], "range": [ 46, 59 ] } ], "range": [ 46, 60 ] } ], "range": [ 44, 62 ] } ], "range": [ 0, 62 ] } ], "range": [ 0, 63 ] } ], "hasChanges": true, "range": [ 0, 63 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 78, 81 ] }, { "category": "Identifier", "range": [ 85, 94 ] } ], "range": [ 78, 94 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 98, 99 ] }, { "category": "NumberLiteral", "range": [ 102, 103 ] } ], "range": [ 98, 103 ] } ], "range": [ 78, 103 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 105, 106 ] }, { "category": "Identifier", "range": [ 109, 110 ] } ], "range": [ 105, 110 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 112, 113 ] } ], "range": [ 112, 115 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 119, 130 ] } ], "range": [ 119, 132 ] } ], "range": [ 119, 133 ] } ], "range": [ 117, 135 ] } ], "range": [ 73, 135 ] } ], "range": [ 73, 136 ] } ], "hasChanges": false, "range": [ 73, 136 ], "number": 2 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 68, 71 ] }, { "category": "Identifier", "range": [ 75, 84 ] } ], "range": [ 68, 84 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 88, 89 ] }, { "category": "NumberLiteral", "range": [ 92, 93 ] } ], "range": [ 88, 93 ] } ], "range": [ 68, 93 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 95, 96 ] }, { "category": "Identifier", "range": [ 99, 100 ] } ], "range": [ 95, 100 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 102, 103 ] } ], "range": [ 102, 105 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 109, 120 ] } ], "range": [ 109, 122 ] } ], "range": [ 109, 123 ] } ], "range": [ 107, 125 ] } ], "range": [ 63, 125 ] } ], "range": [ 63, 126 ] } ], "hasChanges": false, "range": [ 63, 126 ], "number": 2 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 141, 144 ] }, { "category": "Identifier", "range": [ 148, 157 ] } ], "range": [ 141, 157 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 161, 162 ] }, { "category": "NumberLiteral", "range": [ 165, 166 ] } ], "range": [ 161, 166 ] } ], "range": [ 141, 166 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 168, 169 ] }, { "category": "Identifier", "range": [ 172, 173 ] } ], "range": [ 168, 173 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 175, 176 ] } ], "range": [ 175, 178 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 182, 193 ] } ], "range": [ 182, 195 ] } ], "range": [ 182, 196 ] } ], "range": [ 180, 198 ] } ], "range": [ 136, 198 ] } ], "range": [ 136, 199 ] } ], "hasChanges": false, "range": [ 136, 199 ], "number": 3 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 131, 134 ] }, { "category": "Identifier", "range": [ 138, 147 ] } ], "range": [ 131, 147 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 151, 152 ] }, { "category": "NumberLiteral", "range": [ 155, 156 ] } ], "range": [ 151, 156 ] } ], "range": [ 131, 156 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 158, 159 ] }, { "category": "Identifier", "range": [ 162, 163 ] } ], "range": [ 158, 163 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 165, 166 ] } ], "range": [ 165, 168 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 172, 183 ] } ], "range": [ 172, 185 ] } ], "range": [ 172, 186 ] } ], "range": [ 170, 188 ] } ], "range": [ 126, 188 ] } ], "range": [ 126, 189 ] } ], "hasChanges": false, "range": [ 126, 189 ], "number": 3 } ], [ { "terms": [ { "category": "Program", "children": [], "range": [ 199, 199 ] } ], "hasChanges": false, "range": [ 199, 199 ], "number": 4 }, { "terms": [ { "category": "Program", "children": [], "range": [ 189, 189 ] } ], "hasChanges": false, "range": [ 189, 189 ], "number": 4 } ] ], "paths": [ "for-loop-with-in-statement.js", "for-loop-with-in-statement.js" ], "oids": [ "0147d3180bc89a8f7f7722ebe9ba1ee53fbeeb87", "306fa88ad3746b62c1be13a704052205e59fa345" ] }, "filePaths": [ "for-loop-with-in-statement.js" ], "patch": [ "diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js", "index 0147d31..306fa88 100644", "--- a/for-loop-with-in-statement.js", "+++ b/for-loop-with-in-statement.js", "@@ -1,3 +1,3 @@", "-for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }", "+for (key in something && i = 0; i < n; i++) { doSomething(); }", " for (key in something && i = 0; i < n; i++) { doSomething(); }", " for (key in something && i = 0; i < n; i++) { doSomething(); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "63fc9f47c0b135eec17ac28e315a58a052f21fc8..2cd005d0e852939bc0e1af4e0de6d3fba1855845" } ,{ "testCaseDescription": "javascript-for-loop-with-in-statement-replacement-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "patch": "replace", "range": [ 5, 8 ] }, { "category": "Identifier", "range": [ 12, 21 ] } ], "range": [ 5, 21 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 25, 26 ] }, { "category": "NumberLiteral", "range": [ 29, 30 ] } ], "range": [ 25, 30 ] } ], "range": [ 5, 30 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 32, 33 ] }, { "category": "Identifier", "range": [ 36, 37 ] } ], "range": [ 32, 37 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 39, 40 ] } ], "range": [ 39, 42 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "patch": "replace", "range": [ 46, 57 ] } ], "range": [ 46, 59 ] } ], "range": [ 46, 60 ] } ], "range": [ 44, 62 ] } ], "range": [ 0, 62 ] } ], "range": [ 0, 63 ] } ], "hasChanges": true, "range": [ 0, 63 ], "number": 1 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "patch": "replace", "range": [ 5, 13 ] }, { "category": "Identifier", "range": [ 17, 26 ] } ], "range": [ 5, 26 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 30, 31 ] }, { "category": "NumberLiteral", "range": [ 34, 35 ] } ], "range": [ 30, 35 ] } ], "range": [ 5, 35 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 37, 38 ] }, { "category": "Identifier", "range": [ 41, 42 ] } ], "range": [ 37, 42 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 44, 45 ] } ], "range": [ 44, 47 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "patch": "replace", "range": [ 51, 67 ] } ], "range": [ 51, 69 ] } ], "range": [ 51, 70 ] } ], "range": [ 49, 72 ] } ], "range": [ 0, 72 ] } ], "range": [ 0, 73 ] } ], "hasChanges": true, "range": [ 0, 73 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 68, 71 ] }, { "category": "Identifier", "range": [ 75, 84 ] } ], "range": [ 68, 84 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 88, 89 ] }, { "category": "NumberLiteral", "range": [ 92, 93 ] } ], "range": [ 88, 93 ] } ], "range": [ 68, 93 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 95, 96 ] }, { "category": "Identifier", "range": [ 99, 100 ] } ], "range": [ 95, 100 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 102, 103 ] } ], "range": [ 102, 105 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 109, 120 ] } ], "range": [ 109, 122 ] } ], "range": [ 109, 123 ] } ], "range": [ 107, 125 ] } ], "range": [ 63, 125 ] } ], "range": [ 63, 126 ] } ], "hasChanges": false, "range": [ 63, 126 ], "number": 2 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 78, 81 ] }, { "category": "Identifier", "range": [ 85, 94 ] } ], "range": [ 78, 94 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 98, 99 ] }, { "category": "NumberLiteral", "range": [ 102, 103 ] } ], "range": [ 98, 103 ] } ], "range": [ 78, 103 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 105, 106 ] }, { "category": "Identifier", "range": [ 109, 110 ] } ], "range": [ 105, 110 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 112, 113 ] } ], "range": [ 112, 115 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 119, 130 ] } ], "range": [ 119, 132 ] } ], "range": [ 119, 133 ] } ], "range": [ 117, 135 ] } ], "range": [ 73, 135 ] } ], "range": [ 73, 136 ] } ], "hasChanges": false, "range": [ 73, 136 ], "number": 2 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 131, 134 ] }, { "category": "Identifier", "range": [ 138, 147 ] } ], "range": [ 131, 147 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 151, 152 ] }, { "category": "NumberLiteral", "range": [ 155, 156 ] } ], "range": [ 151, 156 ] } ], "range": [ 131, 156 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 158, 159 ] }, { "category": "Identifier", "range": [ 162, 163 ] } ], "range": [ 158, 163 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 165, 166 ] } ], "range": [ 165, 168 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 172, 183 ] } ], "range": [ 172, 185 ] } ], "range": [ 172, 186 ] } ], "range": [ 170, 188 ] } ], "range": [ 126, 188 ] } ], "range": [ 126, 189 ] } ], "hasChanges": false, "range": [ 126, 189 ], "number": 3 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 141, 144 ] }, { "category": "Identifier", "range": [ 148, 157 ] } ], "range": [ 141, 157 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 161, 162 ] }, { "category": "NumberLiteral", "range": [ 165, 166 ] } ], "range": [ 161, 166 ] } ], "range": [ 141, 166 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 168, 169 ] }, { "category": "Identifier", "range": [ 172, 173 ] } ], "range": [ 168, 173 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 175, 176 ] } ], "range": [ 175, 178 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 182, 193 ] } ], "range": [ 182, 195 ] } ], "range": [ 182, 196 ] } ], "range": [ 180, 198 ] } ], "range": [ 136, 198 ] } ], "range": [ 136, 199 ] } ], "hasChanges": false, "range": [ 136, 199 ], "number": 3 } ], [ { "terms": [ { "category": "Program", "children": [], "range": [ 189, 189 ] } ], "hasChanges": false, "range": [ 189, 189 ], "number": 4 }, { "terms": [ { "category": "Program", "children": [], "range": [ 199, 199 ] } ], "hasChanges": false, "range": [ 199, 199 ], "number": 4 } ] ], "paths": [ "for-loop-with-in-statement.js", "for-loop-with-in-statement.js" ], "oids": [ "306fa88ad3746b62c1be13a704052205e59fa345", "0147d3180bc89a8f7f7722ebe9ba1ee53fbeeb87" ] }, "filePaths": [ "for-loop-with-in-statement.js" ], "patch": [ "diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js", "index 306fa88..0147d31 100644", "--- a/for-loop-with-in-statement.js", "+++ b/for-loop-with-in-statement.js", "@@ -1,3 +1,3 @@", "-for (key in something && i = 0; i < n; i++) { doSomething(); }", "+for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }", " for (key in something && i = 0; i < n; i++) { doSomething(); }", " for (key in something && i = 0; i < n; i++) { doSomething(); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "2cd005d0e852939bc0e1af4e0de6d3fba1855845..a0f7c8fd3b681499414c0eb241efb7d677d12d93" } ,{ "testCaseDescription": "javascript-for-loop-with-in-statement-delete-replacement-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 5, 13 ] }, { "category": "Identifier", "range": [ 17, 26 ] } ], "range": [ 5, 26 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 30, 31 ] }, { "category": "NumberLiteral", "range": [ 34, 35 ] } ], "range": [ 30, 35 ] } ], "range": [ 5, 35 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 37, 38 ] }, { "category": "Identifier", "range": [ 41, 42 ] } ], "range": [ 37, 42 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 44, 45 ] } ], "range": [ 44, 47 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 51, 67 ] } ], "range": [ 51, 69 ] } ], "range": [ 51, 70 ] } ], "range": [ 49, 72 ] } ], "patch": "delete", "range": [ 0, 72 ] } ], "range": [ 0, 73 ] } ], "hasChanges": true, "range": [ 0, 73 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 78, 81 ] }, { "category": "Identifier", "range": [ 85, 94 ] } ], "range": [ 78, 94 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 98, 99 ] }, { "category": "NumberLiteral", "range": [ 102, 103 ] } ], "range": [ 98, 103 ] } ], "range": [ 78, 103 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 105, 106 ] }, { "category": "Identifier", "range": [ 109, 110 ] } ], "range": [ 105, 110 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 112, 113 ] } ], "range": [ 112, 115 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 119, 130 ] } ], "range": [ 119, 132 ] } ], "range": [ 119, 133 ] } ], "range": [ 117, 135 ] } ], "patch": "delete", "range": [ 73, 135 ] } ], "range": [ 73, 136 ] } ], "hasChanges": true, "range": [ 73, 136 ], "number": 2 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 141, 144 ] }, { "category": "Identifier", "range": [ 148, 157 ] } ], "range": [ 141, 157 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 161, 162 ] }, { "category": "NumberLiteral", "range": [ 165, 166 ] } ], "range": [ 161, 166 ] } ], "range": [ 141, 166 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 168, 169 ] }, { "category": "Identifier", "range": [ 172, 173 ] } ], "range": [ 168, 173 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 175, 176 ] } ], "range": [ 175, 178 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 182, 193 ] } ], "range": [ 182, 195 ] } ], "range": [ 182, 196 ] } ], "range": [ 180, 198 ] } ], "range": [ 136, 198 ] } ], "range": [ 136, 199 ] } ], "hasChanges": false, "range": [ 136, 199 ], "number": 3 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 5, 8 ] }, { "category": "Identifier", "range": [ 12, 21 ] } ], "range": [ 5, 21 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 25, 26 ] }, { "category": "NumberLiteral", "range": [ 29, 30 ] } ], "range": [ 25, 30 ] } ], "range": [ 5, 30 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 32, 33 ] }, { "category": "Identifier", "range": [ 36, 37 ] } ], "range": [ 32, 37 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 39, 40 ] } ], "range": [ 39, 42 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 46, 57 ] } ], "range": [ 46, 59 ] } ], "range": [ 46, 60 ] } ], "range": [ 44, 62 ] } ], "range": [ 0, 62 ] } ], "range": [ 0, 63 ] } ], "hasChanges": false, "range": [ 0, 63 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 68, 76 ] }, { "category": "Identifier", "range": [ 80, 89 ] } ], "range": [ 68, 89 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 93, 94 ] }, { "category": "NumberLiteral", "range": [ 97, 98 ] } ], "range": [ 93, 98 ] } ], "range": [ 68, 98 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 100, 101 ] }, { "category": "Identifier", "range": [ 104, 105 ] } ], "range": [ 100, 105 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 107, 108 ] } ], "range": [ 107, 110 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 114, 130 ] } ], "range": [ 114, 132 ] } ], "range": [ 114, 133 ] } ], "range": [ 112, 135 ] } ], "patch": "insert", "range": [ 63, 135 ] } ], "range": [ 63, 136 ] } ], "hasChanges": true, "range": [ 63, 136 ], "number": 2 } ], [ { "terms": [ { "category": "Program", "children": [], "range": [ 199, 199 ] } ], "hasChanges": false, "range": [ 199, 199 ], "number": 4 }, { "terms": [ { "category": "Program", "children": [], "range": [ 136, 136 ] } ], "hasChanges": false, "range": [ 136, 136 ], "number": 3 } ] ], "paths": [ "for-loop-with-in-statement.js", "for-loop-with-in-statement.js" ], "oids": [ "0147d3180bc89a8f7f7722ebe9ba1ee53fbeeb87", "f23fa3166fa271818ae890675d03b9089c15fc17" ] }, "filePaths": [ "for-loop-with-in-statement.js" ], "patch": [ "diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js", "index 0147d31..f23fa31 100644", "--- a/for-loop-with-in-statement.js", "+++ b/for-loop-with-in-statement.js", "@@ -1,3 +1,2 @@", "-for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }", "-for (key in something && i = 0; i < n; i++) { doSomething(); }", " for (key in something && i = 0; i < n; i++) { doSomething(); }", "+for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "a0f7c8fd3b681499414c0eb241efb7d677d12d93..6b7a2fd51ee8f4d50b6694c613e614f365ae5043" } ,{ "testCaseDescription": "javascript-for-loop-with-in-statement-delete-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 5, 8 ] }, { "category": "Identifier", "range": [ 12, 21 ] } ], "range": [ 5, 21 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 25, 26 ] }, { "category": "NumberLiteral", "range": [ 29, 30 ] } ], "range": [ 25, 30 ] } ], "range": [ 5, 30 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 32, 33 ] }, { "category": "Identifier", "range": [ 36, 37 ] } ], "range": [ 32, 37 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 39, 40 ] } ], "range": [ 39, 42 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 46, 57 ] } ], "range": [ 46, 59 ] } ], "range": [ 46, 60 ] } ], "range": [ 44, 62 ] } ], "patch": "delete", "range": [ 0, 62 ] } ], "range": [ 0, 63 ] } ], "hasChanges": true, "range": [ 0, 63 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 68, 76 ] }, { "category": "Identifier", "range": [ 80, 89 ] } ], "range": [ 68, 89 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 93, 94 ] }, { "category": "NumberLiteral", "range": [ 97, 98 ] } ], "range": [ 93, 98 ] } ], "range": [ 68, 98 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 100, 101 ] }, { "category": "Identifier", "range": [ 104, 105 ] } ], "range": [ 100, 105 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 107, 108 ] } ], "range": [ 107, 110 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 114, 130 ] } ], "range": [ 114, 132 ] } ], "range": [ 114, 133 ] } ], "range": [ 112, 135 ] } ], "range": [ 63, 135 ] } ], "range": [ 63, 136 ] } ], "hasChanges": false, "range": [ 63, 136 ], "number": 2 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 5, 13 ] }, { "category": "Identifier", "range": [ 17, 26 ] } ], "range": [ 5, 26 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 30, 31 ] }, { "category": "NumberLiteral", "range": [ 34, 35 ] } ], "range": [ 30, 35 ] } ], "range": [ 5, 35 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 37, 38 ] }, { "category": "Identifier", "range": [ 41, 42 ] } ], "range": [ 37, 42 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 44, 45 ] } ], "range": [ 44, 47 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 51, 67 ] } ], "range": [ 51, 69 ] } ], "range": [ 51, 70 ] } ], "range": [ 49, 72 ] } ], "range": [ 0, 72 ] } ], "range": [ 0, 73 ] } ], "hasChanges": false, "range": [ 0, 73 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [], "range": [ 136, 136 ] } ], "hasChanges": false, "range": [ 136, 136 ], "number": 3 }, { "terms": [ { "category": "Program", "children": [], "range": [ 73, 73 ] } ], "hasChanges": false, "range": [ 73, 73 ], "number": 2 } ] ], "paths": [ "for-loop-with-in-statement.js", "for-loop-with-in-statement.js" ], "oids": [ "f23fa3166fa271818ae890675d03b9089c15fc17", "e968160740d6cbcaed6e64dc2052d267099690fb" ] }, "filePaths": [ "for-loop-with-in-statement.js" ], "patch": [ "diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js", "index f23fa31..e968160 100644", "--- a/for-loop-with-in-statement.js", "+++ b/for-loop-with-in-statement.js", "@@ -1,2 +1 @@", "-for (key in something && i = 0; i < n; i++) { doSomething(); }", " for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "6b7a2fd51ee8f4d50b6694c613e614f365ae5043..1ae61c25b593a57731d6b465c56186922d43a9be" } ,{ "testCaseDescription": "javascript-for-loop-with-in-statement-delete-rest-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "BooleanOperator", "children": [ { "category": "Operator", "children": [ { "category": "Identifier", "range": [ 5, 13 ] }, { "category": "Identifier", "range": [ 17, 26 ] } ], "range": [ 5, 26 ] }, { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 30, 31 ] }, { "category": "NumberLiteral", "range": [ 34, 35 ] } ], "range": [ 30, 35 ] } ], "range": [ 5, 35 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 37, 38 ] }, { "category": "Identifier", "range": [ 41, 42 ] } ], "range": [ 37, 42 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 44, 45 ] } ], "range": [ 44, 47 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 51, 67 ] } ], "range": [ 51, 69 ] } ], "range": [ 51, 70 ] } ], "range": [ 49, 72 ] } ], "range": [ 0, 72 ] } ], "patch": "delete", "range": [ 0, 73 ] } ], "hasChanges": true, "range": [ 0, 73 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [], "patch": "delete", "range": [ 73, 73 ] } ], "hasChanges": true, "range": [ 73, 73 ], "number": 2 } ] ], "paths": [ "for-loop-with-in-statement.js", "for-loop-with-in-statement.js" ], "oids": [ "e968160740d6cbcaed6e64dc2052d267099690fb", "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391" ] }, "filePaths": [ "for-loop-with-in-statement.js" ], "patch": [ "diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js", "index e968160..e69de29 100644", "--- a/for-loop-with-in-statement.js", "+++ b/for-loop-with-in-statement.js", "@@ -1 +0,0 @@", "-for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "1ae61c25b593a57731d6b465c56186922d43a9be..d86b209de9dedc4b2f245fbfc5ea1497b4f94189" }]