[{ "testCaseDescription": "javascript-for-statement-insert-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 5, 6 ] }, { "category": "NumberLiteral", "range": [ 9, 10 ] } ], "range": [ 5, 10 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 12, 16 ] } ], "range": [ 12, 18 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 20, 21 ] }, { "category": "NumberLiteral", "range": [ 24, 26 ] } ], "range": [ 20, 26 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 28, 29 ] } ], "range": [ 28, 31 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 35, 38 ] }, { "category": "Identifier", "range": [ 39, 40 ] } ], "range": [ 35, 41 ] } ], "range": [ 35, 42 ] } ], "range": [ 33, 44 ] } ], "range": [ 0, 44 ] } ], "patch": "insert", "range": [ 0, 45 ] } ], "hasChanges": true, "range": [ 0, 45 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [], "patch": "insert", "range": [ 45, 45 ] } ], "hasChanges": true, "range": [ 45, 45 ], "number": 2 } ] ], "paths": [ "for-statement.js", "for-statement.js" ], "oids": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "2f51258ee05f7e8b9c3daa021cdedf2ff7a29c58" ] }, "filePaths": [ "for-statement.js" ], "patch": [ "diff --git a/for-statement.js b/for-statement.js", "index e69de29..2f51258 100644", "--- a/for-statement.js", "+++ b/for-statement.js", "@@ -0,0 +1 @@", "+for (i = 0, init(); i < 10; i++) { log(i); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "6ca5e77d4063360bcd0a90d891c3e81e09835b84..67d8ed44c8d2d20d1e580881d6c0700961468d34" } ,{ "testCaseDescription": "javascript-for-statement-replacement-insert-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 5, 6 ] }, { "category": "NumberLiteral", "range": [ 9, 10 ] } ], "range": [ 5, 10 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 12, 16 ] } ], "range": [ 12, 18 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 20, 21 ] }, { "category": "NumberLiteral", "range": [ 24, 27 ] } ], "range": [ 20, 27 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 29, 30 ] } ], "range": [ 29, 32 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 36, 39 ] }, { "category": "Identifier", "range": [ 40, 41 ] } ], "range": [ 36, 42 ] } ], "range": [ 36, 43 ] } ], "range": [ 34, 45 ] } ], "patch": "insert", "range": [ 0, 45 ] } ], "range": [ 0, 46 ] } ], "hasChanges": true, "range": [ 0, 46 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 51, 52 ] }, { "category": "NumberLiteral", "range": [ 55, 56 ] } ], "range": [ 51, 56 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 58, 62 ] } ], "range": [ 58, 64 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 66, 67 ] }, { "category": "NumberLiteral", "range": [ 70, 72 ] } ], "range": [ 66, 72 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 74, 75 ] } ], "range": [ 74, 77 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 81, 84 ] }, { "category": "Identifier", "range": [ 85, 86 ] } ], "range": [ 81, 87 ] } ], "range": [ 81, 88 ] } ], "range": [ 79, 90 ] } ], "patch": "insert", "range": [ 46, 90 ] } ], "range": [ 46, 91 ] } ], "hasChanges": true, "range": [ 46, 91 ], "number": 2 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 5, 6 ] }, { "category": "NumberLiteral", "range": [ 9, 10 ] } ], "range": [ 5, 10 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 12, 16 ] } ], "range": [ 12, 18 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 20, 21 ] }, { "category": "NumberLiteral", "range": [ 24, 26 ] } ], "range": [ 20, 26 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 28, 29 ] } ], "range": [ 28, 31 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 35, 38 ] }, { "category": "Identifier", "range": [ 39, 40 ] } ], "range": [ 35, 41 ] } ], "range": [ 35, 42 ] } ], "range": [ 33, 44 ] } ], "range": [ 0, 44 ] } ], "range": [ 0, 45 ] } ], "hasChanges": false, "range": [ 0, 45 ], "number": 1 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 96, 97 ] }, { "category": "NumberLiteral", "range": [ 100, 101 ] } ], "range": [ 96, 101 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 103, 107 ] } ], "range": [ 103, 109 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 111, 112 ] }, { "category": "NumberLiteral", "range": [ 115, 117 ] } ], "range": [ 111, 117 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 119, 120 ] } ], "range": [ 119, 122 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 126, 129 ] }, { "category": "Identifier", "range": [ 130, 131 ] } ], "range": [ 126, 132 ] } ], "range": [ 126, 133 ] } ], "range": [ 124, 135 ] } ], "range": [ 91, 135 ] } ], "range": [ 91, 136 ] } ], "hasChanges": false, "range": [ 91, 136 ], "number": 3 } ], [ { "terms": [ { "category": "Program", "children": [], "range": [ 45, 45 ] } ], "hasChanges": false, "range": [ 45, 45 ], "number": 2 }, { "terms": [ { "category": "Program", "children": [], "range": [ 136, 136 ] } ], "hasChanges": false, "range": [ 136, 136 ], "number": 4 } ] ], "paths": [ "for-statement.js", "for-statement.js" ], "oids": [ "2f51258ee05f7e8b9c3daa021cdedf2ff7a29c58", "095241f1377bd981220d93eacab9975e9efd42ee" ] }, "filePaths": [ "for-statement.js" ], "patch": [ "diff --git a/for-statement.js b/for-statement.js", "index 2f51258..095241f 100644", "--- a/for-statement.js", "+++ b/for-statement.js", "@@ -1 +1,3 @@", "+for (i = 0, init(); i < 100; i++) { log(i); }", "+for (i = 0, init(); i < 10; i++) { log(i); }", " for (i = 0, init(); i < 10; i++) { log(i); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "67d8ed44c8d2d20d1e580881d6c0700961468d34..b2b93708ee067b6893c94f3728896489a9ac3c4a" } ,{ "testCaseDescription": "javascript-for-statement-delete-insert-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 5, 6 ] }, { "category": "NumberLiteral", "range": [ 9, 10 ] } ], "range": [ 5, 10 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 12, 16 ] } ], "range": [ 12, 18 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 20, 21 ] }, { "category": "NumberLiteral", "patch": "replace", "range": [ 24, 27 ] } ], "range": [ 20, 27 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 29, 30 ] } ], "range": [ 29, 32 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 36, 39 ] }, { "category": "Identifier", "range": [ 40, 41 ] } ], "range": [ 36, 42 ] } ], "range": [ 36, 43 ] } ], "range": [ 34, 45 ] } ], "range": [ 0, 45 ] } ], "range": [ 0, 46 ] } ], "hasChanges": true, "range": [ 0, 46 ], "number": 1 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 5, 6 ] }, { "category": "NumberLiteral", "range": [ 9, 10 ] } ], "range": [ 5, 10 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 12, 16 ] } ], "range": [ 12, 18 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 20, 21 ] }, { "category": "NumberLiteral", "patch": "replace", "range": [ 24, 26 ] } ], "range": [ 20, 26 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 28, 29 ] } ], "range": [ 28, 31 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 35, 38 ] }, { "category": "Identifier", "range": [ 39, 40 ] } ], "range": [ 35, 41 ] } ], "range": [ 35, 42 ] } ], "range": [ 33, 44 ] } ], "range": [ 0, 44 ] } ], "range": [ 0, 45 ] } ], "hasChanges": true, "range": [ 0, 45 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 51, 52 ] }, { "category": "NumberLiteral", "range": [ 55, 56 ] } ], "range": [ 51, 56 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 58, 62 ] } ], "range": [ 58, 64 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 66, 67 ] }, { "category": "NumberLiteral", "range": [ 70, 72 ] } ], "range": [ 66, 72 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 74, 75 ] } ], "range": [ 74, 77 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 81, 84 ] }, { "category": "Identifier", "range": [ 85, 86 ] } ], "range": [ 81, 87 ] } ], "range": [ 81, 88 ] } ], "range": [ 79, 90 ] } ], "range": [ 46, 90 ] } ], "range": [ 46, 91 ] } ], "hasChanges": false, "range": [ 46, 91 ], "number": 2 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 50, 51 ] }, { "category": "NumberLiteral", "range": [ 54, 55 ] } ], "range": [ 50, 55 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 57, 61 ] } ], "range": [ 57, 63 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 65, 66 ] }, { "category": "NumberLiteral", "range": [ 69, 71 ] } ], "range": [ 65, 71 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 73, 74 ] } ], "range": [ 73, 76 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 80, 83 ] }, { "category": "Identifier", "range": [ 84, 85 ] } ], "range": [ 80, 86 ] } ], "range": [ 80, 87 ] } ], "range": [ 78, 89 ] } ], "range": [ 45, 89 ] } ], "range": [ 45, 90 ] } ], "hasChanges": false, "range": [ 45, 90 ], "number": 2 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 96, 97 ] }, { "category": "NumberLiteral", "range": [ 100, 101 ] } ], "range": [ 96, 101 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 103, 107 ] } ], "range": [ 103, 109 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 111, 112 ] }, { "category": "NumberLiteral", "range": [ 115, 117 ] } ], "range": [ 111, 117 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 119, 120 ] } ], "range": [ 119, 122 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 126, 129 ] }, { "category": "Identifier", "range": [ 130, 131 ] } ], "range": [ 126, 132 ] } ], "range": [ 126, 133 ] } ], "range": [ 124, 135 ] } ], "range": [ 91, 135 ] } ], "range": [ 91, 136 ] } ], "hasChanges": false, "range": [ 91, 136 ], "number": 3 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 95, 96 ] }, { "category": "NumberLiteral", "range": [ 99, 100 ] } ], "range": [ 95, 100 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 102, 106 ] } ], "range": [ 102, 108 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 110, 111 ] }, { "category": "NumberLiteral", "range": [ 114, 116 ] } ], "range": [ 110, 116 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 118, 119 ] } ], "range": [ 118, 121 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 125, 128 ] }, { "category": "Identifier", "range": [ 129, 130 ] } ], "range": [ 125, 131 ] } ], "range": [ 125, 132 ] } ], "range": [ 123, 134 ] } ], "range": [ 90, 134 ] } ], "range": [ 90, 135 ] } ], "hasChanges": false, "range": [ 90, 135 ], "number": 3 } ], [ { "terms": [ { "category": "Program", "children": [], "range": [ 136, 136 ] } ], "hasChanges": false, "range": [ 136, 136 ], "number": 4 }, { "terms": [ { "category": "Program", "children": [], "range": [ 135, 135 ] } ], "hasChanges": false, "range": [ 135, 135 ], "number": 4 } ] ], "paths": [ "for-statement.js", "for-statement.js" ], "oids": [ "095241f1377bd981220d93eacab9975e9efd42ee", "9b0e26d472ddac99038ae86981d46a37f76db7eb" ] }, "filePaths": [ "for-statement.js" ], "patch": [ "diff --git a/for-statement.js b/for-statement.js", "index 095241f..9b0e26d 100644", "--- a/for-statement.js", "+++ b/for-statement.js", "@@ -1,3 +1,3 @@", "-for (i = 0, init(); i < 100; i++) { log(i); }", "+for (i = 0, init(); i < 10; i++) { log(i); }", " for (i = 0, init(); i < 10; i++) { log(i); }", " for (i = 0, init(); i < 10; i++) { log(i); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "b2b93708ee067b6893c94f3728896489a9ac3c4a..f4c615d37eccfcad119e8743f398fe72f12e2119" } ,{ "testCaseDescription": "javascript-for-statement-replacement-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 5, 6 ] }, { "category": "NumberLiteral", "range": [ 9, 10 ] } ], "range": [ 5, 10 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 12, 16 ] } ], "range": [ 12, 18 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 20, 21 ] }, { "category": "NumberLiteral", "patch": "replace", "range": [ 24, 26 ] } ], "range": [ 20, 26 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 28, 29 ] } ], "range": [ 28, 31 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 35, 38 ] }, { "category": "Identifier", "range": [ 39, 40 ] } ], "range": [ 35, 41 ] } ], "range": [ 35, 42 ] } ], "range": [ 33, 44 ] } ], "range": [ 0, 44 ] } ], "range": [ 0, 45 ] } ], "hasChanges": true, "range": [ 0, 45 ], "number": 1 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 5, 6 ] }, { "category": "NumberLiteral", "range": [ 9, 10 ] } ], "range": [ 5, 10 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 12, 16 ] } ], "range": [ 12, 18 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 20, 21 ] }, { "category": "NumberLiteral", "patch": "replace", "range": [ 24, 27 ] } ], "range": [ 20, 27 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 29, 30 ] } ], "range": [ 29, 32 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 36, 39 ] }, { "category": "Identifier", "range": [ 40, 41 ] } ], "range": [ 36, 42 ] } ], "range": [ 36, 43 ] } ], "range": [ 34, 45 ] } ], "range": [ 0, 45 ] } ], "range": [ 0, 46 ] } ], "hasChanges": true, "range": [ 0, 46 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 50, 51 ] }, { "category": "NumberLiteral", "range": [ 54, 55 ] } ], "range": [ 50, 55 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 57, 61 ] } ], "range": [ 57, 63 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 65, 66 ] }, { "category": "NumberLiteral", "range": [ 69, 71 ] } ], "range": [ 65, 71 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 73, 74 ] } ], "range": [ 73, 76 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 80, 83 ] }, { "category": "Identifier", "range": [ 84, 85 ] } ], "range": [ 80, 86 ] } ], "range": [ 80, 87 ] } ], "range": [ 78, 89 ] } ], "range": [ 45, 89 ] } ], "range": [ 45, 90 ] } ], "hasChanges": false, "range": [ 45, 90 ], "number": 2 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 51, 52 ] }, { "category": "NumberLiteral", "range": [ 55, 56 ] } ], "range": [ 51, 56 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 58, 62 ] } ], "range": [ 58, 64 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 66, 67 ] }, { "category": "NumberLiteral", "range": [ 70, 72 ] } ], "range": [ 66, 72 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 74, 75 ] } ], "range": [ 74, 77 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 81, 84 ] }, { "category": "Identifier", "range": [ 85, 86 ] } ], "range": [ 81, 87 ] } ], "range": [ 81, 88 ] } ], "range": [ 79, 90 ] } ], "range": [ 46, 90 ] } ], "range": [ 46, 91 ] } ], "hasChanges": false, "range": [ 46, 91 ], "number": 2 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 95, 96 ] }, { "category": "NumberLiteral", "range": [ 99, 100 ] } ], "range": [ 95, 100 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 102, 106 ] } ], "range": [ 102, 108 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 110, 111 ] }, { "category": "NumberLiteral", "range": [ 114, 116 ] } ], "range": [ 110, 116 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 118, 119 ] } ], "range": [ 118, 121 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 125, 128 ] }, { "category": "Identifier", "range": [ 129, 130 ] } ], "range": [ 125, 131 ] } ], "range": [ 125, 132 ] } ], "range": [ 123, 134 ] } ], "range": [ 90, 134 ] } ], "range": [ 90, 135 ] } ], "hasChanges": false, "range": [ 90, 135 ], "number": 3 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 96, 97 ] }, { "category": "NumberLiteral", "range": [ 100, 101 ] } ], "range": [ 96, 101 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 103, 107 ] } ], "range": [ 103, 109 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 111, 112 ] }, { "category": "NumberLiteral", "range": [ 115, 117 ] } ], "range": [ 111, 117 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 119, 120 ] } ], "range": [ 119, 122 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 126, 129 ] }, { "category": "Identifier", "range": [ 130, 131 ] } ], "range": [ 126, 132 ] } ], "range": [ 126, 133 ] } ], "range": [ 124, 135 ] } ], "range": [ 91, 135 ] } ], "range": [ 91, 136 ] } ], "hasChanges": false, "range": [ 91, 136 ], "number": 3 } ], [ { "terms": [ { "category": "Program", "children": [], "range": [ 135, 135 ] } ], "hasChanges": false, "range": [ 135, 135 ], "number": 4 }, { "terms": [ { "category": "Program", "children": [], "range": [ 136, 136 ] } ], "hasChanges": false, "range": [ 136, 136 ], "number": 4 } ] ], "paths": [ "for-statement.js", "for-statement.js" ], "oids": [ "9b0e26d472ddac99038ae86981d46a37f76db7eb", "095241f1377bd981220d93eacab9975e9efd42ee" ] }, "filePaths": [ "for-statement.js" ], "patch": [ "diff --git a/for-statement.js b/for-statement.js", "index 9b0e26d..095241f 100644", "--- a/for-statement.js", "+++ b/for-statement.js", "@@ -1,3 +1,3 @@", "-for (i = 0, init(); i < 10; i++) { log(i); }", "+for (i = 0, init(); i < 100; i++) { log(i); }", " for (i = 0, init(); i < 10; i++) { log(i); }", " for (i = 0, init(); i < 10; i++) { log(i); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "f4c615d37eccfcad119e8743f398fe72f12e2119..e7c088c711503cc6f52aa3307363dd069ef73101" } ,{ "testCaseDescription": "javascript-for-statement-delete-replacement-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 5, 6 ] }, { "category": "NumberLiteral", "range": [ 9, 10 ] } ], "range": [ 5, 10 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 12, 16 ] } ], "range": [ 12, 18 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 20, 21 ] }, { "category": "NumberLiteral", "range": [ 24, 27 ] } ], "range": [ 20, 27 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 29, 30 ] } ], "range": [ 29, 32 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 36, 39 ] }, { "category": "Identifier", "range": [ 40, 41 ] } ], "range": [ 36, 42 ] } ], "range": [ 36, 43 ] } ], "range": [ 34, 45 ] } ], "patch": "delete", "range": [ 0, 45 ] } ], "range": [ 0, 46 ] } ], "hasChanges": true, "range": [ 0, 46 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 51, 52 ] }, { "category": "NumberLiteral", "range": [ 55, 56 ] } ], "range": [ 51, 56 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 58, 62 ] } ], "range": [ 58, 64 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 66, 67 ] }, { "category": "NumberLiteral", "range": [ 70, 72 ] } ], "range": [ 66, 72 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 74, 75 ] } ], "range": [ 74, 77 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 81, 84 ] }, { "category": "Identifier", "range": [ 85, 86 ] } ], "range": [ 81, 87 ] } ], "range": [ 81, 88 ] } ], "range": [ 79, 90 ] } ], "patch": "delete", "range": [ 46, 90 ] } ], "range": [ 46, 91 ] } ], "hasChanges": true, "range": [ 46, 91 ], "number": 2 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 96, 97 ] }, { "category": "NumberLiteral", "range": [ 100, 101 ] } ], "range": [ 96, 101 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 103, 107 ] } ], "range": [ 103, 109 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 111, 112 ] }, { "category": "NumberLiteral", "range": [ 115, 117 ] } ], "range": [ 111, 117 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 119, 120 ] } ], "range": [ 119, 122 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 126, 129 ] }, { "category": "Identifier", "range": [ 130, 131 ] } ], "range": [ 126, 132 ] } ], "range": [ 126, 133 ] } ], "range": [ 124, 135 ] } ], "range": [ 91, 135 ] } ], "range": [ 91, 136 ] } ], "hasChanges": false, "range": [ 91, 136 ], "number": 3 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 5, 6 ] }, { "category": "NumberLiteral", "range": [ 9, 10 ] } ], "range": [ 5, 10 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 12, 16 ] } ], "range": [ 12, 18 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 20, 21 ] }, { "category": "NumberLiteral", "range": [ 24, 26 ] } ], "range": [ 20, 26 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 28, 29 ] } ], "range": [ 28, 31 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 35, 38 ] }, { "category": "Identifier", "range": [ 39, 40 ] } ], "range": [ 35, 41 ] } ], "range": [ 35, 42 ] } ], "range": [ 33, 44 ] } ], "range": [ 0, 44 ] } ], "range": [ 0, 45 ] } ], "hasChanges": false, "range": [ 0, 45 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 50, 51 ] }, { "category": "NumberLiteral", "range": [ 54, 55 ] } ], "range": [ 50, 55 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 57, 61 ] } ], "range": [ 57, 63 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 65, 66 ] }, { "category": "NumberLiteral", "range": [ 69, 72 ] } ], "range": [ 65, 72 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 74, 75 ] } ], "range": [ 74, 77 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 81, 84 ] }, { "category": "Identifier", "range": [ 85, 86 ] } ], "range": [ 81, 87 ] } ], "range": [ 81, 88 ] } ], "range": [ 79, 90 ] } ], "patch": "insert", "range": [ 45, 90 ] } ], "range": [ 45, 91 ] } ], "hasChanges": true, "range": [ 45, 91 ], "number": 2 } ], [ { "terms": [ { "category": "Program", "children": [], "range": [ 136, 136 ] } ], "hasChanges": false, "range": [ 136, 136 ], "number": 4 }, { "terms": [ { "category": "Program", "children": [], "range": [ 91, 91 ] } ], "hasChanges": false, "range": [ 91, 91 ], "number": 3 } ] ], "paths": [ "for-statement.js", "for-statement.js" ], "oids": [ "095241f1377bd981220d93eacab9975e9efd42ee", "39af699a6f85d38d3e18d61ec278a943a01701fa" ] }, "filePaths": [ "for-statement.js" ], "patch": [ "diff --git a/for-statement.js b/for-statement.js", "index 095241f..39af699 100644", "--- a/for-statement.js", "+++ b/for-statement.js", "@@ -1,3 +1,2 @@", "-for (i = 0, init(); i < 100; i++) { log(i); }", "-for (i = 0, init(); i < 10; i++) { log(i); }", " for (i = 0, init(); i < 10; i++) { log(i); }", "+for (i = 0, init(); i < 100; i++) { log(i); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "e7c088c711503cc6f52aa3307363dd069ef73101..030f6e47ed5f03b21e98c128d8bb398225366bfb" } ,{ "testCaseDescription": "javascript-for-statement-delete-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 5, 6 ] }, { "category": "NumberLiteral", "range": [ 9, 10 ] } ], "range": [ 5, 10 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 12, 16 ] } ], "range": [ 12, 18 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 20, 21 ] }, { "category": "NumberLiteral", "range": [ 24, 26 ] } ], "range": [ 20, 26 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 28, 29 ] } ], "range": [ 28, 31 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 35, 38 ] }, { "category": "Identifier", "range": [ 39, 40 ] } ], "range": [ 35, 41 ] } ], "range": [ 35, 42 ] } ], "range": [ 33, 44 ] } ], "patch": "delete", "range": [ 0, 44 ] } ], "range": [ 0, 45 ] } ], "hasChanges": true, "range": [ 0, 45 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 50, 51 ] }, { "category": "NumberLiteral", "range": [ 54, 55 ] } ], "range": [ 50, 55 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 57, 61 ] } ], "range": [ 57, 63 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 65, 66 ] }, { "category": "NumberLiteral", "range": [ 69, 72 ] } ], "range": [ 65, 72 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 74, 75 ] } ], "range": [ 74, 77 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 81, 84 ] }, { "category": "Identifier", "range": [ 85, 86 ] } ], "range": [ 81, 87 ] } ], "range": [ 81, 88 ] } ], "range": [ 79, 90 ] } ], "range": [ 45, 90 ] } ], "range": [ 45, 91 ] } ], "hasChanges": false, "range": [ 45, 91 ], "number": 2 }, { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 5, 6 ] }, { "category": "NumberLiteral", "range": [ 9, 10 ] } ], "range": [ 5, 10 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 12, 16 ] } ], "range": [ 12, 18 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 20, 21 ] }, { "category": "NumberLiteral", "range": [ 24, 27 ] } ], "range": [ 20, 27 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 29, 30 ] } ], "range": [ 29, 32 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 36, 39 ] }, { "category": "Identifier", "range": [ 40, 41 ] } ], "range": [ 36, 42 ] } ], "range": [ 36, 43 ] } ], "range": [ 34, 45 ] } ], "range": [ 0, 45 ] } ], "range": [ 0, 46 ] } ], "hasChanges": false, "range": [ 0, 46 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [], "range": [ 91, 91 ] } ], "hasChanges": false, "range": [ 91, 91 ], "number": 3 }, { "terms": [ { "category": "Program", "children": [], "range": [ 46, 46 ] } ], "hasChanges": false, "range": [ 46, 46 ], "number": 2 } ] ], "paths": [ "for-statement.js", "for-statement.js" ], "oids": [ "39af699a6f85d38d3e18d61ec278a943a01701fa", "de8ae87b20aeb3e55c4cf6fd9f1fe5249118a0db" ] }, "filePaths": [ "for-statement.js" ], "patch": [ "diff --git a/for-statement.js b/for-statement.js", "index 39af699..de8ae87 100644", "--- a/for-statement.js", "+++ b/for-statement.js", "@@ -1,2 +1 @@", "-for (i = 0, init(); i < 10; i++) { log(i); }", " for (i = 0, init(); i < 100; i++) { log(i); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "030f6e47ed5f03b21e98c128d8bb398225366bfb..79269d7c37a4237b15a1cb4aa014c4f54e72faaf" } ,{ "testCaseDescription": "javascript-for-statement-delete-rest-test", "expectedResult": { "rows": [ [ { "terms": [ { "category": "Program", "children": [ { "category": "For", "children": [ { "category": "Assignment", "children": [ { "category": "Identifier", "range": [ 5, 6 ] }, { "category": "NumberLiteral", "range": [ 9, 10 ] } ], "range": [ 5, 10 ] }, { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 12, 16 ] } ], "range": [ 12, 18 ] }, { "category": "RelationalOperator", "children": [ { "category": "Identifier", "range": [ 20, 21 ] }, { "category": "NumberLiteral", "range": [ 24, 27 ] } ], "range": [ 20, 27 ] }, { "category": "MathOperator", "children": [ { "category": "Identifier", "range": [ 29, 30 ] } ], "range": [ 29, 32 ] }, { "category": "ExpressionStatements", "children": [ { "category": "ExpressionStatements", "children": [ { "category": "FunctionCall", "children": [ { "category": "Identifier", "range": [ 36, 39 ] }, { "category": "Identifier", "range": [ 40, 41 ] } ], "range": [ 36, 42 ] } ], "range": [ 36, 43 ] } ], "range": [ 34, 45 ] } ], "range": [ 0, 45 ] } ], "patch": "delete", "range": [ 0, 46 ] } ], "hasChanges": true, "range": [ 0, 46 ], "number": 1 } ], [ { "terms": [ { "category": "Program", "children": [], "patch": "delete", "range": [ 46, 46 ] } ], "hasChanges": true, "range": [ 46, 46 ], "number": 2 } ] ], "paths": [ "for-statement.js", "for-statement.js" ], "oids": [ "de8ae87b20aeb3e55c4cf6fd9f1fe5249118a0db", "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391" ] }, "filePaths": [ "for-statement.js" ], "patch": [ "diff --git a/for-statement.js b/for-statement.js", "index de8ae87..e69de29 100644", "--- a/for-statement.js", "+++ b/for-statement.js", "@@ -1 +0,0 @@", "-for (i = 0, init(); i < 100; i++) { log(i); }" ], "gitDir": "test/corpus/repos/javascript", "shas": "79269d7c37a4237b15a1cb4aa014c4f54e72faaf..aa5f6a7c2031a5c8823a005dffbe948bd997e140" }]