mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
3654 lines
217 KiB
JSON
3654 lines
217 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
56,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
65
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "insert",
|
|
"range": [
|
|
65,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
65,
|
|
65
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"nested-do-while-in-function.js",
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"d205614e4003d65c0c1e0884312fea4c3284ee27"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"sha1": "0291d16becdede843afe9ad8ca16b6a28a53b1a5",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "393d758dc52bcc6136f67e6044d88d811c90c73e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
56,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
65
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
74,
|
|
75
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
76,
|
|
80
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
82,
|
|
86
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
95,
|
|
104
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
105,
|
|
109
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
110
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
111
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
93,
|
|
113
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
121,
|
|
125
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
127
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
88,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
65,
|
|
130
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
56,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
65
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
139,
|
|
140
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
141,
|
|
145
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
147,
|
|
151
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
160,
|
|
169
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
170,
|
|
174
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
160,
|
|
175
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
160,
|
|
176
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
158,
|
|
178
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
186,
|
|
190
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
155,
|
|
192
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
153,
|
|
194
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
194
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
130,
|
|
195
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
65,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
65,
|
|
65
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
195,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
195,
|
|
195
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"nested-do-while-in-function.js",
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"oids": [
|
|
"d205614e4003d65c0c1e0884312fea4c3284ee27",
|
|
"5dfcca69fc8c45b892e7e7d0c2177e46ff90047d"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"sha1": "393d758dc52bcc6136f67e6044d88d811c90c73e",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "e0d40bd3ad9c1c25d6fd1ecb0cf0ba576e49f718"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
40,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
56,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
65
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
40,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
56,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
65
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
74,
|
|
75
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
76,
|
|
80
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
82,
|
|
86
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
95,
|
|
104
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
105,
|
|
109
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
110
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
111
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
93,
|
|
113
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
121,
|
|
125
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
127
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
88,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
65,
|
|
130
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
74,
|
|
75
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
76,
|
|
80
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
82,
|
|
86
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
95,
|
|
104
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
105,
|
|
109
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
110
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
111
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
93,
|
|
113
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
121,
|
|
125
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
127
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
88,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
65,
|
|
130
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
139,
|
|
140
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
141,
|
|
145
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
147,
|
|
151
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
160,
|
|
169
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
170,
|
|
174
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
160,
|
|
175
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
160,
|
|
176
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
158,
|
|
178
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
186,
|
|
190
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
155,
|
|
192
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
153,
|
|
194
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
194
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
130,
|
|
195
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
139,
|
|
140
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
141,
|
|
145
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
147,
|
|
151
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
160,
|
|
169
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
170,
|
|
174
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
160,
|
|
175
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
160,
|
|
176
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
158,
|
|
178
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
186,
|
|
190
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
155,
|
|
192
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
153,
|
|
194
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
194
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
130,
|
|
195
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
195,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
195,
|
|
195
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
195,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
195,
|
|
195
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"nested-do-while-in-function.js",
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"oids": [
|
|
"5dfcca69fc8c45b892e7e7d0c2177e46ff90047d",
|
|
"49cff7e6f3e7e1a6c3d91ed0b2ec8fbdcd20a842"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"sha1": "e0d40bd3ad9c1c25d6fd1ecb0cf0ba576e49f718",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "d3fe0454d2a0378aae6364e4e50cba24b239db0f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
40,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
56,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
65
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
40,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
56,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
65
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
74,
|
|
75
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
76,
|
|
80
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
82,
|
|
86
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
95,
|
|
104
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
105,
|
|
109
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
110
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
111
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
93,
|
|
113
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
121,
|
|
125
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
127
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
88,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
65,
|
|
130
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
74,
|
|
75
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
76,
|
|
80
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
82,
|
|
86
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
95,
|
|
104
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
105,
|
|
109
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
110
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
111
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
93,
|
|
113
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
121,
|
|
125
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
127
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
88,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
65,
|
|
130
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
139,
|
|
140
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
141,
|
|
145
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
147,
|
|
151
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
160,
|
|
169
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
170,
|
|
174
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
160,
|
|
175
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
160,
|
|
176
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
158,
|
|
178
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
186,
|
|
190
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
155,
|
|
192
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
153,
|
|
194
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
194
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
130,
|
|
195
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
139,
|
|
140
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
141,
|
|
145
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
147,
|
|
151
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
160,
|
|
169
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
170,
|
|
174
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
160,
|
|
175
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
160,
|
|
176
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
158,
|
|
178
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
186,
|
|
190
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
155,
|
|
192
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
153,
|
|
194
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
194
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
130,
|
|
195
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
195,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
195,
|
|
195
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
195,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
195,
|
|
195
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"nested-do-while-in-function.js",
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"oids": [
|
|
"49cff7e6f3e7e1a6c3d91ed0b2ec8fbdcd20a842",
|
|
"5dfcca69fc8c45b892e7e7d0c2177e46ff90047d"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"sha1": "d3fe0454d2a0378aae6364e4e50cba24b239db0f",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "8f2bb14eecb151b074e0f9f6296f0675a64c9428"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
56,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
65
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
74,
|
|
75
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
76,
|
|
80
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
82,
|
|
86
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
95,
|
|
104
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
105,
|
|
109
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
110
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
111
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
93,
|
|
113
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
121,
|
|
125
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
127
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
88,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
65,
|
|
130
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
139,
|
|
140
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
141,
|
|
145
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
147,
|
|
151
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
160,
|
|
169
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
170,
|
|
174
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
160,
|
|
175
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
160,
|
|
176
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
158,
|
|
178
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
186,
|
|
190
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
155,
|
|
192
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
153,
|
|
194
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
194
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
130,
|
|
195
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
56,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
65
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
74,
|
|
75
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
76,
|
|
80
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
82,
|
|
86
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
95,
|
|
104
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
105,
|
|
109
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
110
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
111
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
93,
|
|
113
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
121,
|
|
125
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
127
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
88,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
65,
|
|
130
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
195,
|
|
195
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
195,
|
|
195
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
130,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
130,
|
|
130
|
|
],
|
|
"number": 3
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"nested-do-while-in-function.js",
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"oids": [
|
|
"5dfcca69fc8c45b892e7e7d0c2177e46ff90047d",
|
|
"babb1e64587c352c2ff10aabaa632bbfc9012a02"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"sha1": "8f2bb14eecb151b074e0f9f6296f0675a64c9428",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "f91a5b7bb29fc33f8a536814274d5424ecfc9f3c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
56,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
65
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
74,
|
|
75
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
76,
|
|
80
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
82,
|
|
86
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
95,
|
|
104
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
105,
|
|
109
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
110
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
111
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
93,
|
|
113
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
121,
|
|
125
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
127
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
88,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
65,
|
|
130
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
56,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
65
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
130,
|
|
130
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
130,
|
|
130
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
65,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
65,
|
|
65
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"nested-do-while-in-function.js",
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"oids": [
|
|
"babb1e64587c352c2ff10aabaa632bbfc9012a02",
|
|
"2b155808a78e6f220d56186ac013b537f94a479c"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"sha1": "f91a5b7bb29fc33f8a536814274d5424ecfc9f3c",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "f31e42a64aa524b9ba47f2d94244f91bc819d75c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
30,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
56,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
65
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
65,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
65,
|
|
65
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"nested-do-while-in-function.js",
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"oids": [
|
|
"2b155808a78e6f220d56186ac013b537f94a479c",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"sha1": "f31e42a64aa524b9ba47f2d94244f91bc819d75c",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "307b241b57a7e5614c38e6b877e5e18f488d0c8b"
|
|
}]
|