1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00
semantic/test/corpus/json/javascript/for-statement.json

4248 lines
216 KiB
JSON
Raw Normal View History

[{
"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": "8bace3fd3a38a02a008dc0731653277cf54ea3a9",
"gitDir": "test/corpus/repos/javascript",
"sha2": "e3ad4930d96e85b91d7fac7323477207584206fe"
}
,{
"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": "e3ad4930d96e85b91d7fac7323477207584206fe",
"gitDir": "test/corpus/repos/javascript",
"sha2": "2e789204d612b4597147dff8e0726042ca0a9bd5"
}
,{
"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": "2e789204d612b4597147dff8e0726042ca0a9bd5",
"gitDir": "test/corpus/repos/javascript",
"sha2": "a8987079e204c26673cb2449651f1bd35eb9d0f1"
}
,{
"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": "a8987079e204c26673cb2449651f1bd35eb9d0f1",
"gitDir": "test/corpus/repos/javascript",
"sha2": "068a3301264ae606715e686bdcc51cb0c22a9fb1"
}
,{
"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": "068a3301264ae606715e686bdcc51cb0c22a9fb1",
"gitDir": "test/corpus/repos/javascript",
"sha2": "2af2afe6a278f8242b780ac80346108ae1ab2829"
}
,{
"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": "2af2afe6a278f8242b780ac80346108ae1ab2829",
"gitDir": "test/corpus/repos/javascript",
"sha2": "5fccbe8084b6ddc7c80a0f402ad867dd6e02e4e2"
}
,{
"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": "5fccbe8084b6ddc7c80a0f402ad867dd6e02e4e2",
"gitDir": "test/corpus/repos/javascript",
"sha2": "410f5c5ff15b3e31897a5fc1a301d7fafa3720dd"
}]