1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 01:42:43 +03:00
semantic/test/corpus/json/javascript/for-loop-with-in-statement.json
2016-11-01 10:19:04 -05:00

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": "8f8309aab5b170620dd56a95dde3a0a1c4307c68",
"gitDir": "test/corpus/repos/javascript",
"sha2": "d4ef819b2032599dec76b1b8bca7a958bb532a7d"
}
,{
"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": "d4ef819b2032599dec76b1b8bca7a958bb532a7d",
"gitDir": "test/corpus/repos/javascript",
"sha2": "49650dfb0ab5263272659bbda9ff3973d87b27ba"
}
,{
"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": "49650dfb0ab5263272659bbda9ff3973d87b27ba",
"gitDir": "test/corpus/repos/javascript",
"sha2": "22e9c180fbf1f60eb4100fa046df08f30da91ed0"
}
,{
"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": "22e9c180fbf1f60eb4100fa046df08f30da91ed0",
"gitDir": "test/corpus/repos/javascript",
"sha2": "c0ffef38d1db59a8c01b722f43ff51088d0d5aab"
}
,{
"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": "c0ffef38d1db59a8c01b722f43ff51088d0d5aab",
"gitDir": "test/corpus/repos/javascript",
"sha2": "3ffd2138c6d5f249ff6546a3be3b2f05964872bc"
}
,{
"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": "3ffd2138c6d5f249ff6546a3be3b2f05964872bc",
"gitDir": "test/corpus/repos/javascript",
"sha2": "e8052ac71b7500d674a59d99771f30d9ada7d3a8"
}
,{
"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": "e8052ac71b7500d674a59d99771f30d9ada7d3a8",
"gitDir": "test/corpus/repos/javascript",
"sha2": "ceb4421fb8736b7ea77887631c5d741c11d4b91c"
}]