1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/json/javascript/nested-functions.json

5448 lines
395 KiB
JSON
Raw Normal View History

[{
"testCaseDescription": "javascript-nested-functions-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
15
]
},
{
"category": "Identifier",
"range": [
17,
21
]
},
{
"category": "Identifier",
"range": [
23,
27
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
45
]
},
{
"category": "Identifier",
"range": [
47,
51
]
},
{
"category": "Identifier",
"range": [
53,
57
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
61,
68
]
},
{
"category": "Identifier",
"range": [
69,
72
]
},
{
"category": "Identifier",
"range": [
73,
77
]
}
],
"range": [
61,
78
]
}
],
"range": [
61,
79
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
80,
87
]
},
{
"category": "Identifier",
"range": [
88,
91
]
},
{
"category": "Identifier",
"range": [
92,
96
]
}
],
"range": [
80,
97
]
}
],
"range": [
80,
98
]
}
],
"range": [
59,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
29,
102
]
}
],
"range": [
0,
102
]
}
],
"range": [
0,
103
]
}
],
"patch": "insert",
"range": [
0,
103
]
}
],
"hasChanges": true,
"range": [
0,
103
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
103,
103
]
}
],
"hasChanges": true,
"range": [
103,
103
],
"number": 2
}
]
],
"paths": [
"nested-functions.js",
"nested-functions.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"72531d81633b54539c4e0e118c94794023582163"
]
},
"filePaths": [
"nested-functions.js"
],
"sha1": "72dfbbc017e437532971a170f7d6906fb5723872",
"gitDir": "test/corpus/repos/javascript",
"sha2": "9f8f18cb74fe6403360fca4c3c4b17bdd97a5a75"
}
,{
"testCaseDescription": "javascript-nested-functions-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
15
]
},
{
"category": "Identifier",
"range": [
17,
21
]
},
{
"category": "Identifier",
"range": [
23,
27
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
45
]
},
{
"category": "Identifier",
"range": [
47,
51
]
},
{
"category": "Identifier",
"range": [
53,
57
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
61,
68
]
},
{
"category": "Identifier",
"range": [
69,
72
]
},
{
"category": "Identifier",
"range": [
73,
77
]
}
],
"range": [
61,
78
]
}
],
"range": [
61,
79
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
80,
87
]
},
{
"category": "Identifier",
"range": [
88,
91
]
},
{
"category": "Identifier",
"range": [
92,
96
]
}
],
"range": [
80,
97
]
}
],
"range": [
80,
98
]
}
],
"range": [
59,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
29,
102
]
}
],
"range": [
0,
102
]
}
],
"patch": "insert",
"range": [
0,
103
]
}
],
"range": [
0,
103
]
}
],
"hasChanges": true,
"range": [
0,
103
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
112,
118
]
},
{
"category": "Identifier",
"range": [
120,
124
]
},
{
"category": "Identifier",
"range": [
126,
130
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
143,
148
]
},
{
"category": "Identifier",
"range": [
150,
154
]
},
{
"category": "Identifier",
"range": [
156,
160
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
164,
171
]
},
{
"category": "Identifier",
"range": [
172,
175
]
},
{
"category": "Identifier",
"range": [
176,
180
]
}
],
"range": [
164,
181
]
}
],
"range": [
164,
182
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
183,
190
]
},
{
"category": "Identifier",
"range": [
191,
194
]
},
{
"category": "Identifier",
"range": [
195,
199
]
}
],
"range": [
183,
200
]
}
],
"range": [
183,
201
]
}
],
"range": [
162,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
132,
205
]
}
],
"range": [
103,
205
]
}
],
"patch": "insert",
"range": [
103,
206
]
}
],
"range": [
103,
206
]
}
],
"hasChanges": true,
"range": [
103,
206
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
15
]
},
{
"category": "Identifier",
"range": [
17,
21
]
},
{
"category": "Identifier",
"range": [
23,
27
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
45
]
},
{
"category": "Identifier",
"range": [
47,
51
]
},
{
"category": "Identifier",
"range": [
53,
57
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
61,
68
]
},
{
"category": "Identifier",
"range": [
69,
72
]
},
{
"category": "Identifier",
"range": [
73,
77
]
}
],
"range": [
61,
78
]
}
],
"range": [
61,
79
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
80,
87
]
},
{
"category": "Identifier",
"range": [
88,
91
]
},
{
"category": "Identifier",
"range": [
92,
96
]
}
],
"range": [
80,
97
]
}
],
"range": [
80,
98
]
}
],
"range": [
59,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
29,
102
]
}
],
"range": [
0,
102
]
}
],
"range": [
0,
103
]
}
],
"range": [
0,
103
]
}
],
"hasChanges": false,
"range": [
0,
103
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
215,
221
]
},
{
"category": "Identifier",
"range": [
223,
227
]
},
{
"category": "Identifier",
"range": [
229,
233
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
246,
251
]
},
{
"category": "Identifier",
"range": [
253,
257
]
},
{
"category": "Identifier",
"range": [
259,
263
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
267,
274
]
},
{
"category": "Identifier",
"range": [
275,
278
]
},
{
"category": "Identifier",
"range": [
279,
283
]
}
],
"range": [
267,
284
]
}
],
"range": [
267,
285
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
286,
293
]
},
{
"category": "Identifier",
"range": [
294,
297
]
},
{
"category": "Identifier",
"range": [
298,
302
]
}
],
"range": [
286,
303
]
}
],
"range": [
286,
304
]
}
],
"range": [
265,
306
]
}
],
"range": [
237,
306
]
}
],
"range": [
237,
306
]
}
],
"range": [
235,
308
]
}
],
"range": [
206,
308
]
}
],
"range": [
206,
309
]
}
],
"range": [
206,
309
]
}
],
"hasChanges": false,
"range": [
206,
309
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
103,
103
]
}
],
"hasChanges": false,
"range": [
103,
103
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
309,
309
]
}
],
"hasChanges": false,
"range": [
309,
309
],
"number": 4
}
]
],
"paths": [
"nested-functions.js",
"nested-functions.js"
],
"oids": [
"72531d81633b54539c4e0e118c94794023582163",
"c960aae180e11fcaea00d3e8b5ff586e41e0f2da"
]
},
"filePaths": [
"nested-functions.js"
],
"sha1": "9f8f18cb74fe6403360fca4c3c4b17bdd97a5a75",
"gitDir": "test/corpus/repos/javascript",
"sha2": "f4214ee15a875a37eeb6ef2ffe075469ee907433"
}
,{
"testCaseDescription": "javascript-nested-functions-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
15
]
},
{
"category": "Identifier",
"range": [
17,
21
]
},
{
"category": "Identifier",
"range": [
23,
27
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
45
]
},
{
"category": "Identifier",
"range": [
47,
51
]
},
{
"category": "Identifier",
"range": [
53,
57
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
61,
68
]
},
{
"category": "Identifier",
"range": [
69,
72
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
73,
77
]
}
],
"range": [
61,
78
]
}
],
"range": [
61,
79
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
80,
87
]
},
{
"category": "Identifier",
"range": [
88,
91
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
92,
96
]
}
],
"range": [
80,
97
]
}
],
"range": [
80,
98
]
}
],
"range": [
59,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
29,
102
]
}
],
"range": [
0,
102
]
}
],
"range": [
0,
103
]
}
],
"range": [
0,
103
]
}
],
"hasChanges": true,
"range": [
0,
103
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
15
]
},
{
"category": "Identifier",
"range": [
17,
21
]
},
{
"category": "Identifier",
"range": [
23,
27
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
45
]
},
{
"category": "Identifier",
"range": [
47,
51
]
},
{
"category": "Identifier",
"range": [
53,
57
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
61,
68
]
},
{
"category": "Identifier",
"range": [
69,
72
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
73,
77
]
}
],
"range": [
61,
78
]
}
],
"range": [
61,
79
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
80,
87
]
},
{
"category": "Identifier",
"range": [
88,
91
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
92,
96
]
}
],
"range": [
80,
97
]
}
],
"range": [
80,
98
]
}
],
"range": [
59,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
29,
102
]
}
],
"range": [
0,
102
]
}
],
"range": [
0,
103
]
}
],
"range": [
0,
103
]
}
],
"hasChanges": true,
"range": [
0,
103
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
112,
118
]
},
{
"category": "Identifier",
"range": [
120,
124
]
},
{
"category": "Identifier",
"range": [
126,
130
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
143,
148
]
},
{
"category": "Identifier",
"range": [
150,
154
]
},
{
"category": "Identifier",
"range": [
156,
160
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
164,
171
]
},
{
"category": "Identifier",
"range": [
172,
175
]
},
{
"category": "Identifier",
"range": [
176,
180
]
}
],
"range": [
164,
181
]
}
],
"range": [
164,
182
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
183,
190
]
},
{
"category": "Identifier",
"range": [
191,
194
]
},
{
"category": "Identifier",
"range": [
195,
199
]
}
],
"range": [
183,
200
]
}
],
"range": [
183,
201
]
}
],
"range": [
162,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
132,
205
]
}
],
"range": [
103,
205
]
}
],
"range": [
103,
206
]
}
],
"range": [
103,
206
]
}
],
"hasChanges": false,
"range": [
103,
206
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
112,
118
]
},
{
"category": "Identifier",
"range": [
120,
124
]
},
{
"category": "Identifier",
"range": [
126,
130
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
143,
148
]
},
{
"category": "Identifier",
"range": [
150,
154
]
},
{
"category": "Identifier",
"range": [
156,
160
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
164,
171
]
},
{
"category": "Identifier",
"range": [
172,
175
]
},
{
"category": "Identifier",
"range": [
176,
180
]
}
],
"range": [
164,
181
]
}
],
"range": [
164,
182
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
183,
190
]
},
{
"category": "Identifier",
"range": [
191,
194
]
},
{
"category": "Identifier",
"range": [
195,
199
]
}
],
"range": [
183,
200
]
}
],
"range": [
183,
201
]
}
],
"range": [
162,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
132,
205
]
}
],
"range": [
103,
205
]
}
],
"range": [
103,
206
]
}
],
"range": [
103,
206
]
}
],
"hasChanges": false,
"range": [
103,
206
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
215,
221
]
},
{
"category": "Identifier",
"range": [
223,
227
]
},
{
"category": "Identifier",
"range": [
229,
233
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
246,
251
]
},
{
"category": "Identifier",
"range": [
253,
257
]
},
{
"category": "Identifier",
"range": [
259,
263
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
267,
274
]
},
{
"category": "Identifier",
"range": [
275,
278
]
},
{
"category": "Identifier",
"range": [
279,
283
]
}
],
"range": [
267,
284
]
}
],
"range": [
267,
285
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
286,
293
]
},
{
"category": "Identifier",
"range": [
294,
297
]
},
{
"category": "Identifier",
"range": [
298,
302
]
}
],
"range": [
286,
303
]
}
],
"range": [
286,
304
]
}
],
"range": [
265,
306
]
}
],
"range": [
237,
306
]
}
],
"range": [
237,
306
]
}
],
"range": [
235,
308
]
}
],
"range": [
206,
308
]
}
],
"range": [
206,
309
]
}
],
"range": [
206,
309
]
}
],
"hasChanges": false,
"range": [
206,
309
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
215,
221
]
},
{
"category": "Identifier",
"range": [
223,
227
]
},
{
"category": "Identifier",
"range": [
229,
233
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
246,
251
]
},
{
"category": "Identifier",
"range": [
253,
257
]
},
{
"category": "Identifier",
"range": [
259,
263
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
267,
274
]
},
{
"category": "Identifier",
"range": [
275,
278
]
},
{
"category": "Identifier",
"range": [
279,
283
]
}
],
"range": [
267,
284
]
}
],
"range": [
267,
285
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
286,
293
]
},
{
"category": "Identifier",
"range": [
294,
297
]
},
{
"category": "Identifier",
"range": [
298,
302
]
}
],
"range": [
286,
303
]
}
],
"range": [
286,
304
]
}
],
"range": [
265,
306
]
}
],
"range": [
237,
306
]
}
],
"range": [
237,
306
]
}
],
"range": [
235,
308
]
}
],
"range": [
206,
308
]
}
],
"range": [
206,
309
]
}
],
"range": [
206,
309
]
}
],
"hasChanges": false,
"range": [
206,
309
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
309,
309
]
}
],
"hasChanges": false,
"range": [
309,
309
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
309,
309
]
}
],
"hasChanges": false,
"range": [
309,
309
],
"number": 4
}
]
],
"paths": [
"nested-functions.js",
"nested-functions.js"
],
"oids": [
"c960aae180e11fcaea00d3e8b5ff586e41e0f2da",
"1b9b61a3964ffb047472f21103b352f506252d1f"
]
},
"filePaths": [
"nested-functions.js"
],
"sha1": "f4214ee15a875a37eeb6ef2ffe075469ee907433",
"gitDir": "test/corpus/repos/javascript",
"sha2": "96d72bed7790cbf4948508d095c0bf74cb680873"
}
,{
"testCaseDescription": "javascript-nested-functions-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
15
]
},
{
"category": "Identifier",
"range": [
17,
21
]
},
{
"category": "Identifier",
"range": [
23,
27
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
45
]
},
{
"category": "Identifier",
"range": [
47,
51
]
},
{
"category": "Identifier",
"range": [
53,
57
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
61,
68
]
},
{
"category": "Identifier",
"range": [
69,
72
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
73,
77
]
}
],
"range": [
61,
78
]
}
],
"range": [
61,
79
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
80,
87
]
},
{
"category": "Identifier",
"range": [
88,
91
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
92,
96
]
}
],
"range": [
80,
97
]
}
],
"range": [
80,
98
]
}
],
"range": [
59,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
29,
102
]
}
],
"range": [
0,
102
]
}
],
"range": [
0,
103
]
}
],
"range": [
0,
103
]
}
],
"hasChanges": true,
"range": [
0,
103
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
15
]
},
{
"category": "Identifier",
"range": [
17,
21
]
},
{
"category": "Identifier",
"range": [
23,
27
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
45
]
},
{
"category": "Identifier",
"range": [
47,
51
]
},
{
"category": "Identifier",
"range": [
53,
57
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
61,
68
]
},
{
"category": "Identifier",
"range": [
69,
72
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
73,
77
]
}
],
"range": [
61,
78
]
}
],
"range": [
61,
79
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
80,
87
]
},
{
"category": "Identifier",
"range": [
88,
91
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
92,
96
]
}
],
"range": [
80,
97
]
}
],
"range": [
80,
98
]
}
],
"range": [
59,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
29,
102
]
}
],
"range": [
0,
102
]
}
],
"range": [
0,
103
]
}
],
"range": [
0,
103
]
}
],
"hasChanges": true,
"range": [
0,
103
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
112,
118
]
},
{
"category": "Identifier",
"range": [
120,
124
]
},
{
"category": "Identifier",
"range": [
126,
130
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
143,
148
]
},
{
"category": "Identifier",
"range": [
150,
154
]
},
{
"category": "Identifier",
"range": [
156,
160
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
164,
171
]
},
{
"category": "Identifier",
"range": [
172,
175
]
},
{
"category": "Identifier",
"range": [
176,
180
]
}
],
"range": [
164,
181
]
}
],
"range": [
164,
182
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
183,
190
]
},
{
"category": "Identifier",
"range": [
191,
194
]
},
{
"category": "Identifier",
"range": [
195,
199
]
}
],
"range": [
183,
200
]
}
],
"range": [
183,
201
]
}
],
"range": [
162,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
132,
205
]
}
],
"range": [
103,
205
]
}
],
"range": [
103,
206
]
}
],
"range": [
103,
206
]
}
],
"hasChanges": false,
"range": [
103,
206
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
112,
118
]
},
{
"category": "Identifier",
"range": [
120,
124
]
},
{
"category": "Identifier",
"range": [
126,
130
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
143,
148
]
},
{
"category": "Identifier",
"range": [
150,
154
]
},
{
"category": "Identifier",
"range": [
156,
160
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
164,
171
]
},
{
"category": "Identifier",
"range": [
172,
175
]
},
{
"category": "Identifier",
"range": [
176,
180
]
}
],
"range": [
164,
181
]
}
],
"range": [
164,
182
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
183,
190
]
},
{
"category": "Identifier",
"range": [
191,
194
]
},
{
"category": "Identifier",
"range": [
195,
199
]
}
],
"range": [
183,
200
]
}
],
"range": [
183,
201
]
}
],
"range": [
162,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
132,
205
]
}
],
"range": [
103,
205
]
}
],
"range": [
103,
206
]
}
],
"range": [
103,
206
]
}
],
"hasChanges": false,
"range": [
103,
206
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
215,
221
]
},
{
"category": "Identifier",
"range": [
223,
227
]
},
{
"category": "Identifier",
"range": [
229,
233
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
246,
251
]
},
{
"category": "Identifier",
"range": [
253,
257
]
},
{
"category": "Identifier",
"range": [
259,
263
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
267,
274
]
},
{
"category": "Identifier",
"range": [
275,
278
]
},
{
"category": "Identifier",
"range": [
279,
283
]
}
],
"range": [
267,
284
]
}
],
"range": [
267,
285
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
286,
293
]
},
{
"category": "Identifier",
"range": [
294,
297
]
},
{
"category": "Identifier",
"range": [
298,
302
]
}
],
"range": [
286,
303
]
}
],
"range": [
286,
304
]
}
],
"range": [
265,
306
]
}
],
"range": [
237,
306
]
}
],
"range": [
237,
306
]
}
],
"range": [
235,
308
]
}
],
"range": [
206,
308
]
}
],
"range": [
206,
309
]
}
],
"range": [
206,
309
]
}
],
"hasChanges": false,
"range": [
206,
309
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
215,
221
]
},
{
"category": "Identifier",
"range": [
223,
227
]
},
{
"category": "Identifier",
"range": [
229,
233
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
246,
251
]
},
{
"category": "Identifier",
"range": [
253,
257
]
},
{
"category": "Identifier",
"range": [
259,
263
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
267,
274
]
},
{
"category": "Identifier",
"range": [
275,
278
]
},
{
"category": "Identifier",
"range": [
279,
283
]
}
],
"range": [
267,
284
]
}
],
"range": [
267,
285
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
286,
293
]
},
{
"category": "Identifier",
"range": [
294,
297
]
},
{
"category": "Identifier",
"range": [
298,
302
]
}
],
"range": [
286,
303
]
}
],
"range": [
286,
304
]
}
],
"range": [
265,
306
]
}
],
"range": [
237,
306
]
}
],
"range": [
237,
306
]
}
],
"range": [
235,
308
]
}
],
"range": [
206,
308
]
}
],
"range": [
206,
309
]
}
],
"range": [
206,
309
]
}
],
"hasChanges": false,
"range": [
206,
309
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
309,
309
]
}
],
"hasChanges": false,
"range": [
309,
309
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
309,
309
]
}
],
"hasChanges": false,
"range": [
309,
309
],
"number": 4
}
]
],
"paths": [
"nested-functions.js",
"nested-functions.js"
],
"oids": [
"1b9b61a3964ffb047472f21103b352f506252d1f",
"c960aae180e11fcaea00d3e8b5ff586e41e0f2da"
]
},
"filePaths": [
"nested-functions.js"
],
"sha1": "96d72bed7790cbf4948508d095c0bf74cb680873",
"gitDir": "test/corpus/repos/javascript",
"sha2": "65a026d5ed91c63a070812a49d4214679dacb1b0"
}
,{
"testCaseDescription": "javascript-nested-functions-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
15
]
},
{
"category": "Identifier",
"range": [
17,
21
]
},
{
"category": "Identifier",
"range": [
23,
27
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
45
]
},
{
"category": "Identifier",
"range": [
47,
51
]
},
{
"category": "Identifier",
"range": [
53,
57
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
61,
68
]
},
{
"category": "Identifier",
"range": [
69,
72
]
},
{
"category": "Identifier",
"range": [
73,
77
]
}
],
"range": [
61,
78
]
}
],
"range": [
61,
79
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
80,
87
]
},
{
"category": "Identifier",
"range": [
88,
91
]
},
{
"category": "Identifier",
"range": [
92,
96
]
}
],
"range": [
80,
97
]
}
],
"range": [
80,
98
]
}
],
"range": [
59,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
29,
102
]
}
],
"range": [
0,
102
]
}
],
"patch": "delete",
"range": [
0,
103
]
}
],
"range": [
0,
103
]
}
],
"hasChanges": true,
"range": [
0,
103
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
112,
118
]
},
{
"category": "Identifier",
"range": [
120,
124
]
},
{
"category": "Identifier",
"range": [
126,
130
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
143,
148
]
},
{
"category": "Identifier",
"range": [
150,
154
]
},
{
"category": "Identifier",
"range": [
156,
160
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
164,
171
]
},
{
"category": "Identifier",
"range": [
172,
175
]
},
{
"category": "Identifier",
"range": [
176,
180
]
}
],
"range": [
164,
181
]
}
],
"range": [
164,
182
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
183,
190
]
},
{
"category": "Identifier",
"range": [
191,
194
]
},
{
"category": "Identifier",
"range": [
195,
199
]
}
],
"range": [
183,
200
]
}
],
"range": [
183,
201
]
}
],
"range": [
162,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
132,
205
]
}
],
"range": [
103,
205
]
}
],
"patch": "delete",
"range": [
103,
206
]
}
],
"range": [
103,
206
]
}
],
"hasChanges": true,
"range": [
103,
206
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
215,
221
]
},
{
"category": "Identifier",
"range": [
223,
227
]
},
{
"category": "Identifier",
"range": [
229,
233
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
246,
251
]
},
{
"category": "Identifier",
"range": [
253,
257
]
},
{
"category": "Identifier",
"range": [
259,
263
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
267,
274
]
},
{
"category": "Identifier",
"range": [
275,
278
]
},
{
"category": "Identifier",
"range": [
279,
283
]
}
],
"range": [
267,
284
]
}
],
"range": [
267,
285
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
286,
293
]
},
{
"category": "Identifier",
"range": [
294,
297
]
},
{
"category": "Identifier",
"range": [
298,
302
]
}
],
"range": [
286,
303
]
}
],
"range": [
286,
304
]
}
],
"range": [
265,
306
]
}
],
"range": [
237,
306
]
}
],
"range": [
237,
306
]
}
],
"range": [
235,
308
]
}
],
"range": [
206,
308
]
}
],
"range": [
206,
309
]
}
],
"range": [
206,
309
]
}
],
"hasChanges": false,
"range": [
206,
309
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
15
]
},
{
"category": "Identifier",
"range": [
17,
21
]
},
{
"category": "Identifier",
"range": [
23,
27
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
45
]
},
{
"category": "Identifier",
"range": [
47,
51
]
},
{
"category": "Identifier",
"range": [
53,
57
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
61,
68
]
},
{
"category": "Identifier",
"range": [
69,
72
]
},
{
"category": "Identifier",
"range": [
73,
77
]
}
],
"range": [
61,
78
]
}
],
"range": [
61,
79
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
80,
87
]
},
{
"category": "Identifier",
"range": [
88,
91
]
},
{
"category": "Identifier",
"range": [
92,
96
]
}
],
"range": [
80,
97
]
}
],
"range": [
80,
98
]
}
],
"range": [
59,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
29,
102
]
}
],
"range": [
0,
102
]
}
],
"range": [
0,
103
]
}
],
"range": [
0,
103
]
}
],
"hasChanges": false,
"range": [
0,
103
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
112,
118
]
},
{
"category": "Identifier",
"range": [
120,
124
]
},
{
"category": "Identifier",
"range": [
126,
130
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
143,
148
]
},
{
"category": "Identifier",
"range": [
150,
154
]
},
{
"category": "Identifier",
"range": [
156,
160
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
164,
171
]
},
{
"category": "Identifier",
"range": [
172,
175
]
},
{
"category": "Identifier",
"range": [
176,
180
]
}
],
"range": [
164,
181
]
}
],
"range": [
164,
182
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
183,
190
]
},
{
"category": "Identifier",
"range": [
191,
194
]
},
{
"category": "Identifier",
"range": [
195,
199
]
}
],
"range": [
183,
200
]
}
],
"range": [
183,
201
]
}
],
"range": [
162,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
132,
205
]
}
],
"range": [
103,
205
]
}
],
"patch": "insert",
"range": [
103,
206
]
}
],
"range": [
103,
206
]
}
],
"hasChanges": true,
"range": [
103,
206
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
309,
309
]
}
],
"hasChanges": false,
"range": [
309,
309
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
206,
206
]
}
],
"hasChanges": false,
"range": [
206,
206
],
"number": 3
}
]
],
"paths": [
"nested-functions.js",
"nested-functions.js"
],
"oids": [
"c960aae180e11fcaea00d3e8b5ff586e41e0f2da",
"81522c7de2c57509747653614226409aac798ff8"
]
},
"filePaths": [
"nested-functions.js"
],
"sha1": "65a026d5ed91c63a070812a49d4214679dacb1b0",
"gitDir": "test/corpus/repos/javascript",
"sha2": "540004ef800eb28b3b9f261a7111e8e960afaa8c"
}
,{
"testCaseDescription": "javascript-nested-functions-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
15
]
},
{
"category": "Identifier",
"range": [
17,
21
]
},
{
"category": "Identifier",
"range": [
23,
27
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
45
]
},
{
"category": "Identifier",
"range": [
47,
51
]
},
{
"category": "Identifier",
"range": [
53,
57
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
61,
68
]
},
{
"category": "Identifier",
"range": [
69,
72
]
},
{
"category": "Identifier",
"range": [
73,
77
]
}
],
"range": [
61,
78
]
}
],
"range": [
61,
79
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
80,
87
]
},
{
"category": "Identifier",
"range": [
88,
91
]
},
{
"category": "Identifier",
"range": [
92,
96
]
}
],
"range": [
80,
97
]
}
],
"range": [
80,
98
]
}
],
"range": [
59,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
29,
102
]
}
],
"range": [
0,
102
]
}
],
"patch": "delete",
"range": [
0,
103
]
}
],
"range": [
0,
103
]
}
],
"hasChanges": true,
"range": [
0,
103
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
112,
118
]
},
{
"category": "Identifier",
"range": [
120,
124
]
},
{
"category": "Identifier",
"range": [
126,
130
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
143,
148
]
},
{
"category": "Identifier",
"range": [
150,
154
]
},
{
"category": "Identifier",
"range": [
156,
160
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
164,
171
]
},
{
"category": "Identifier",
"range": [
172,
175
]
},
{
"category": "Identifier",
"range": [
176,
180
]
}
],
"range": [
164,
181
]
}
],
"range": [
164,
182
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
183,
190
]
},
{
"category": "Identifier",
"range": [
191,
194
]
},
{
"category": "Identifier",
"range": [
195,
199
]
}
],
"range": [
183,
200
]
}
],
"range": [
183,
201
]
}
],
"range": [
162,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
134,
203
]
}
],
"range": [
132,
205
]
}
],
"range": [
103,
205
]
}
],
"range": [
103,
206
]
}
],
"range": [
103,
206
]
}
],
"hasChanges": false,
"range": [
103,
206
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
15
]
},
{
"category": "Identifier",
"range": [
17,
21
]
},
{
"category": "Identifier",
"range": [
23,
27
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
45
]
},
{
"category": "Identifier",
"range": [
47,
51
]
},
{
"category": "Identifier",
"range": [
53,
57
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
61,
68
]
},
{
"category": "Identifier",
"range": [
69,
72
]
},
{
"category": "Identifier",
"range": [
73,
77
]
}
],
"range": [
61,
78
]
}
],
"range": [
61,
79
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
80,
87
]
},
{
"category": "Identifier",
"range": [
88,
91
]
},
{
"category": "Identifier",
"range": [
92,
96
]
}
],
"range": [
80,
97
]
}
],
"range": [
80,
98
]
}
],
"range": [
59,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
29,
102
]
}
],
"range": [
0,
102
]
}
],
"range": [
0,
103
]
}
],
"range": [
0,
103
]
}
],
"hasChanges": false,
"range": [
0,
103
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
206,
206
]
}
],
"hasChanges": false,
"range": [
206,
206
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
103,
103
]
}
],
"hasChanges": false,
"range": [
103,
103
],
"number": 2
}
]
],
"paths": [
"nested-functions.js",
"nested-functions.js"
],
"oids": [
"81522c7de2c57509747653614226409aac798ff8",
"3056480033bd7114a2ec5dd52e466f4f746952c1"
]
},
"filePaths": [
"nested-functions.js"
],
"sha1": "540004ef800eb28b3b9f261a7111e8e960afaa8c",
"gitDir": "test/corpus/repos/javascript",
"sha2": "5df9ee6f5d09429a69cddc67872810cd73c7dd06"
}
,{
"testCaseDescription": "javascript-nested-functions-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
15
]
},
{
"category": "Identifier",
"range": [
17,
21
]
},
{
"category": "Identifier",
"range": [
23,
27
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "trailing_expression_statement",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
45
]
},
{
"category": "Identifier",
"range": [
47,
51
]
},
{
"category": "Identifier",
"range": [
53,
57
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
61,
68
]
},
{
"category": "Identifier",
"range": [
69,
72
]
},
{
"category": "Identifier",
"range": [
73,
77
]
}
],
"range": [
61,
78
]
}
],
"range": [
61,
79
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
80,
87
]
},
{
"category": "Identifier",
"range": [
88,
91
]
},
{
"category": "Identifier",
"range": [
92,
96
]
}
],
"range": [
80,
97
]
}
],
"range": [
80,
98
]
}
],
"range": [
59,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
31,
100
]
}
],
"range": [
29,
102
]
}
],
"range": [
0,
102
]
}
],
"range": [
0,
103
]
}
],
"patch": "delete",
"range": [
0,
103
]
}
],
"hasChanges": true,
"range": [
0,
103
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
103,
103
]
}
],
"hasChanges": true,
"range": [
103,
103
],
"number": 2
}
]
],
"paths": [
"nested-functions.js",
"nested-functions.js"
],
"oids": [
"3056480033bd7114a2ec5dd52e466f4f746952c1",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"nested-functions.js"
],
"sha1": "5df9ee6f5d09429a69cddc67872810cd73c7dd06",
"gitDir": "test/corpus/repos/javascript",
"sha2": "bdf2400047f120e1a2ce01daf543bc9dcb3874d5"
}]