mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
4248 lines
216 KiB
JSON
4248 lines
216 KiB
JSON
[{
|
|
"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"
|
|
],
|
|
"sha1": "f6f1a76087498759b09a64e05a2d7c1867a77ff3",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "8bff77a0d6b6f54aabc11ed858a61a21588c0b55"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"sha1": "8bff77a0d6b6f54aabc11ed858a61a21588c0b55",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "f86f43f8811bcbf4210981cf2f6457d775da3c6c"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"sha1": "f86f43f8811bcbf4210981cf2f6457d775da3c6c",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "d5fb28436455d42b065a2cec4fbd687af6fd830d"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"sha1": "d5fb28436455d42b065a2cec4fbd687af6fd830d",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "fa7723628489db5130dbad6152125d10dfbf9e1f"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"sha1": "fa7723628489db5130dbad6152125d10dfbf9e1f",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "0267f05f5b16c04fc84af196f688f8f2d1962654"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"sha1": "0267f05f5b16c04fc84af196f688f8f2d1962654",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "902ec8d54dc2dda2609c14440b08ae81d44c4de5"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"sha1": "902ec8d54dc2dda2609c14440b08ae81d44c4de5",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "5ab51e5a23cbcc433c36acf01b0f85eb614f11ab"
|
|
}]
|