mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
4486 lines
235 KiB
JSON
4486 lines
235 KiB
JSON
[{
|
|
"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"
|
|
],
|
|
"sha1": "d8dd6ac9fe9fb21b4cbe0f7f7988158be5205847",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "790b0d8392b4bf8d74097fa622e4da085d4f3c42"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"sha1": "790b0d8392b4bf8d74097fa622e4da085d4f3c42",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "c2cc3bf8b9a63a5f294db9810da3218e42709357"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"sha1": "c2cc3bf8b9a63a5f294db9810da3218e42709357",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "962c140f45507f9bcd90cc4d0f68a74420b3aa87"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"sha1": "962c140f45507f9bcd90cc4d0f68a74420b3aa87",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "6820847ceb7faa611de00773f4edafc61ab8796e"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"sha1": "6820847ceb7faa611de00773f4edafc61ab8796e",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "7ef2a8211a6306530d4ca0c475362d0aa94adbd1"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"sha1": "7ef2a8211a6306530d4ca0c475362d0aa94adbd1",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "a583b45e33382dc4e4f8166f216854adf3384939"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"sha1": "a583b45e33382dc4e4f8166f216854adf3384939",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "4f57c6ee704dc712a38d492a63c54cd8832f73ee"
|
|
}]
|