1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
semantic/test/corpus/json/javascript/if-else.json
2016-11-01 10:03:25 -05:00

4840 lines
248 KiB
JSON

[{
"testCaseDescription": "javascript-if-else-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
}
],
"range": [
7,
9
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
22,
23
]
}
],
"range": [
22,
24
]
}
],
"range": [
15,
62
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
34,
35
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
37,
38
]
}
],
"range": [
37,
39
]
}
],
"range": [
30,
62
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
49,
50
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
52,
53
]
}
],
"range": [
52,
54
]
}
],
"range": [
45,
62
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
60,
61
]
}
],
"range": [
60,
62
]
}
],
"range": [
0,
62
]
}
],
"patch": "insert",
"range": [
0,
62
]
}
],
"hasChanges": true,
"range": [
0,
62
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
62,
62
]
}
],
"hasChanges": true,
"range": [
62,
62
],
"number": 2
}
]
],
"paths": [
"if-else.js",
"if-else.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"d81ebadd53d433754add9258494477aec1954688"
]
},
"filePaths": [
"if-else.js"
],
"sha1": "5bed70449c367b583657f3b6bd984cc0834152b6",
"gitDir": "test/corpus/repos/javascript",
"sha2": "4a50bf60bff71bbd7b50c9a77c3e8cc6b584bd1a"
}
,{
"testCaseDescription": "javascript-if-else-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
}
],
"range": [
7,
9
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
24,
25
]
}
],
"range": [
24,
26
]
}
],
"range": [
22,
28
]
}
],
"range": [
15,
70
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
38,
39
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
41,
42
]
}
],
"range": [
41,
43
]
}
],
"range": [
34,
70
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
53,
54
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
58,
59
]
}
],
"range": [
58,
60
]
}
],
"range": [
56,
62
]
}
],
"range": [
49,
70
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
68,
69
]
}
],
"range": [
68,
70
]
}
],
"patch": "insert",
"range": [
0,
70
]
}
],
"range": [
0,
70
]
}
],
"hasChanges": true,
"range": [
0,
70
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
74,
75
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
77,
78
]
}
],
"range": [
77,
79
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
89,
90
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
92,
93
]
}
],
"range": [
92,
94
]
}
],
"range": [
85,
132
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
104,
105
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
107,
108
]
}
],
"range": [
107,
109
]
}
],
"range": [
100,
132
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
119,
120
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
122,
123
]
}
],
"range": [
122,
124
]
}
],
"range": [
115,
132
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
130,
131
]
}
],
"range": [
130,
132
]
}
],
"patch": "insert",
"range": [
70,
132
]
}
],
"range": [
70,
132
]
}
],
"hasChanges": true,
"range": [
70,
132
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
}
],
"range": [
7,
9
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
22,
23
]
}
],
"range": [
22,
24
]
}
],
"range": [
15,
62
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
34,
35
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
37,
38
]
}
],
"range": [
37,
39
]
}
],
"range": [
30,
62
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
49,
50
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
52,
53
]
}
],
"range": [
52,
54
]
}
],
"range": [
45,
62
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
60,
61
]
}
],
"range": [
60,
62
]
}
],
"range": [
0,
62
]
}
],
"range": [
0,
62
]
}
],
"hasChanges": false,
"range": [
0,
62
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
136,
137
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
139,
140
]
}
],
"range": [
139,
141
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
151,
152
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
154,
155
]
}
],
"range": [
154,
156
]
}
],
"range": [
147,
194
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
166,
167
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
169,
170
]
}
],
"range": [
169,
171
]
}
],
"range": [
162,
194
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
181,
182
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
184,
185
]
}
],
"range": [
184,
186
]
}
],
"range": [
177,
194
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
192,
193
]
}
],
"range": [
192,
194
]
}
],
"range": [
132,
194
]
}
],
"range": [
132,
194
]
}
],
"hasChanges": false,
"range": [
132,
194
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
62,
62
]
}
],
"hasChanges": false,
"range": [
62,
62
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
194,
194
]
}
],
"hasChanges": false,
"range": [
194,
194
],
"number": 4
}
]
],
"paths": [
"if-else.js",
"if-else.js"
],
"oids": [
"d81ebadd53d433754add9258494477aec1954688",
"6bb0eaa7ec6274091ce5ce960f47c96db97d4620"
]
},
"filePaths": [
"if-else.js"
],
"sha1": "4a50bf60bff71bbd7b50c9a77c3e8cc6b584bd1a",
"gitDir": "test/corpus/repos/javascript",
"sha2": "7e613c54076bc2b257a6c49165149b64fe35240b"
}
,{
"testCaseDescription": "javascript-if-else-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
4,
5
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
7,
8
]
}
],
"range": [
7,
9
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
24,
25
]
}
],
"patch": "delete",
"range": [
24,
26
]
}
],
"range": [
22,
28
]
}
],
"range": [
15,
70
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
38,
39
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
41,
42
]
}
],
"range": [
41,
43
]
}
],
"range": [
34,
70
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
53,
54
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
58,
59
]
}
],
"patch": "delete",
"range": [
58,
60
]
}
],
"range": [
56,
62
]
}
],
"range": [
49,
70
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
68,
69
]
}
],
"range": [
68,
70
]
}
],
"range": [
0,
70
]
}
],
"range": [
0,
70
]
}
],
"hasChanges": true,
"range": [
0,
70
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
4,
5
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
7,
8
]
}
],
"range": [
7,
9
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "insert",
"range": [
22,
23
]
}
],
"range": [
22,
24
]
}
],
"range": [
15,
62
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
34,
35
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
37,
38
]
}
],
"range": [
37,
39
]
}
],
"range": [
30,
62
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
49,
50
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "insert",
"range": [
52,
53
]
}
],
"range": [
52,
54
]
}
],
"range": [
45,
62
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
60,
61
]
}
],
"range": [
60,
62
]
}
],
"range": [
0,
62
]
}
],
"range": [
0,
62
]
}
],
"hasChanges": true,
"range": [
0,
62
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
74,
75
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
77,
78
]
}
],
"range": [
77,
79
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
89,
90
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
92,
93
]
}
],
"range": [
92,
94
]
}
],
"range": [
85,
132
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
104,
105
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
107,
108
]
}
],
"range": [
107,
109
]
}
],
"range": [
100,
132
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
119,
120
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
122,
123
]
}
],
"range": [
122,
124
]
}
],
"range": [
115,
132
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
130,
131
]
}
],
"range": [
130,
132
]
}
],
"range": [
70,
132
]
}
],
"range": [
70,
132
]
}
],
"hasChanges": false,
"range": [
70,
132
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
66,
67
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
69,
70
]
}
],
"range": [
69,
71
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
81,
82
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
84,
85
]
}
],
"range": [
84,
86
]
}
],
"range": [
77,
124
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
96,
97
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
99,
100
]
}
],
"range": [
99,
101
]
}
],
"range": [
92,
124
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
111,
112
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
114,
115
]
}
],
"range": [
114,
116
]
}
],
"range": [
107,
124
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
122,
123
]
}
],
"range": [
122,
124
]
}
],
"range": [
62,
124
]
}
],
"range": [
62,
124
]
}
],
"hasChanges": false,
"range": [
62,
124
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
136,
137
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
139,
140
]
}
],
"range": [
139,
141
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
151,
152
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
154,
155
]
}
],
"range": [
154,
156
]
}
],
"range": [
147,
194
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
166,
167
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
169,
170
]
}
],
"range": [
169,
171
]
}
],
"range": [
162,
194
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
181,
182
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
184,
185
]
}
],
"range": [
184,
186
]
}
],
"range": [
177,
194
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
192,
193
]
}
],
"range": [
192,
194
]
}
],
"range": [
132,
194
]
}
],
"range": [
132,
194
]
}
],
"hasChanges": false,
"range": [
132,
194
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
128,
129
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
131,
132
]
}
],
"range": [
131,
133
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
143,
144
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
146,
147
]
}
],
"range": [
146,
148
]
}
],
"range": [
139,
186
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
158,
159
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
161,
162
]
}
],
"range": [
161,
163
]
}
],
"range": [
154,
186
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
173,
174
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
176,
177
]
}
],
"range": [
176,
178
]
}
],
"range": [
169,
186
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
184,
185
]
}
],
"range": [
184,
186
]
}
],
"range": [
124,
186
]
}
],
"range": [
124,
186
]
}
],
"hasChanges": false,
"range": [
124,
186
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
194,
194
]
}
],
"hasChanges": false,
"range": [
194,
194
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
186,
186
]
}
],
"hasChanges": false,
"range": [
186,
186
],
"number": 4
}
]
],
"paths": [
"if-else.js",
"if-else.js"
],
"oids": [
"6bb0eaa7ec6274091ce5ce960f47c96db97d4620",
"2034be1bb30315b1f005d8a8d6108d49c6cfc57f"
]
},
"filePaths": [
"if-else.js"
],
"sha1": "7e613c54076bc2b257a6c49165149b64fe35240b",
"gitDir": "test/corpus/repos/javascript",
"sha2": "afa3e68388f624507e80515d1c85ff083e861cb6"
}
,{
"testCaseDescription": "javascript-if-else-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
4,
5
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
7,
8
]
}
],
"range": [
7,
9
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "delete",
"range": [
22,
23
]
}
],
"range": [
22,
24
]
}
],
"range": [
15,
62
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
34,
35
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
37,
38
]
}
],
"range": [
37,
39
]
}
],
"range": [
30,
62
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
49,
50
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "delete",
"range": [
52,
53
]
}
],
"range": [
52,
54
]
}
],
"range": [
45,
62
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
60,
61
]
}
],
"range": [
60,
62
]
}
],
"range": [
0,
62
]
}
],
"range": [
0,
62
]
}
],
"hasChanges": true,
"range": [
0,
62
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
4,
5
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
7,
8
]
}
],
"range": [
7,
9
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
24,
25
]
}
],
"patch": "insert",
"range": [
24,
26
]
}
],
"range": [
22,
28
]
}
],
"range": [
15,
70
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
38,
39
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
41,
42
]
}
],
"range": [
41,
43
]
}
],
"range": [
34,
70
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
53,
54
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
58,
59
]
}
],
"patch": "insert",
"range": [
58,
60
]
}
],
"range": [
56,
62
]
}
],
"range": [
49,
70
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
68,
69
]
}
],
"range": [
68,
70
]
}
],
"range": [
0,
70
]
}
],
"range": [
0,
70
]
}
],
"hasChanges": true,
"range": [
0,
70
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
66,
67
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
69,
70
]
}
],
"range": [
69,
71
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
81,
82
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
84,
85
]
}
],
"range": [
84,
86
]
}
],
"range": [
77,
124
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
96,
97
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
99,
100
]
}
],
"range": [
99,
101
]
}
],
"range": [
92,
124
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
111,
112
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
114,
115
]
}
],
"range": [
114,
116
]
}
],
"range": [
107,
124
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
122,
123
]
}
],
"range": [
122,
124
]
}
],
"range": [
62,
124
]
}
],
"range": [
62,
124
]
}
],
"hasChanges": false,
"range": [
62,
124
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
74,
75
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
77,
78
]
}
],
"range": [
77,
79
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
89,
90
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
92,
93
]
}
],
"range": [
92,
94
]
}
],
"range": [
85,
132
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
104,
105
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
107,
108
]
}
],
"range": [
107,
109
]
}
],
"range": [
100,
132
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
119,
120
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
122,
123
]
}
],
"range": [
122,
124
]
}
],
"range": [
115,
132
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
130,
131
]
}
],
"range": [
130,
132
]
}
],
"range": [
70,
132
]
}
],
"range": [
70,
132
]
}
],
"hasChanges": false,
"range": [
70,
132
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
128,
129
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
131,
132
]
}
],
"range": [
131,
133
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
143,
144
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
146,
147
]
}
],
"range": [
146,
148
]
}
],
"range": [
139,
186
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
158,
159
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
161,
162
]
}
],
"range": [
161,
163
]
}
],
"range": [
154,
186
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
173,
174
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
176,
177
]
}
],
"range": [
176,
178
]
}
],
"range": [
169,
186
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
184,
185
]
}
],
"range": [
184,
186
]
}
],
"range": [
124,
186
]
}
],
"range": [
124,
186
]
}
],
"hasChanges": false,
"range": [
124,
186
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
136,
137
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
139,
140
]
}
],
"range": [
139,
141
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
151,
152
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
154,
155
]
}
],
"range": [
154,
156
]
}
],
"range": [
147,
194
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
166,
167
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
169,
170
]
}
],
"range": [
169,
171
]
}
],
"range": [
162,
194
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
181,
182
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
184,
185
]
}
],
"range": [
184,
186
]
}
],
"range": [
177,
194
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
192,
193
]
}
],
"range": [
192,
194
]
}
],
"range": [
132,
194
]
}
],
"range": [
132,
194
]
}
],
"hasChanges": false,
"range": [
132,
194
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
186,
186
]
}
],
"hasChanges": false,
"range": [
186,
186
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
194,
194
]
}
],
"hasChanges": false,
"range": [
194,
194
],
"number": 4
}
]
],
"paths": [
"if-else.js",
"if-else.js"
],
"oids": [
"2034be1bb30315b1f005d8a8d6108d49c6cfc57f",
"6bb0eaa7ec6274091ce5ce960f47c96db97d4620"
]
},
"filePaths": [
"if-else.js"
],
"sha1": "afa3e68388f624507e80515d1c85ff083e861cb6",
"gitDir": "test/corpus/repos/javascript",
"sha2": "7fdef82fc8d53e6d0b51d7471c287fb7718bd2cb"
}
,{
"testCaseDescription": "javascript-if-else-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
}
],
"range": [
7,
9
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
24,
25
]
}
],
"range": [
24,
26
]
}
],
"range": [
22,
28
]
}
],
"range": [
15,
70
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
38,
39
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
41,
42
]
}
],
"range": [
41,
43
]
}
],
"range": [
34,
70
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
53,
54
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
58,
59
]
}
],
"range": [
58,
60
]
}
],
"range": [
56,
62
]
}
],
"range": [
49,
70
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
68,
69
]
}
],
"range": [
68,
70
]
}
],
"patch": "delete",
"range": [
0,
70
]
}
],
"range": [
0,
70
]
}
],
"hasChanges": true,
"range": [
0,
70
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
74,
75
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
77,
78
]
}
],
"range": [
77,
79
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
89,
90
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
92,
93
]
}
],
"range": [
92,
94
]
}
],
"range": [
85,
132
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
104,
105
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
107,
108
]
}
],
"range": [
107,
109
]
}
],
"range": [
100,
132
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
119,
120
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
122,
123
]
}
],
"range": [
122,
124
]
}
],
"range": [
115,
132
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
130,
131
]
}
],
"range": [
130,
132
]
}
],
"patch": "delete",
"range": [
70,
132
]
}
],
"range": [
70,
132
]
}
],
"hasChanges": true,
"range": [
70,
132
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
136,
137
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
139,
140
]
}
],
"range": [
139,
141
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
151,
152
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
154,
155
]
}
],
"range": [
154,
156
]
}
],
"range": [
147,
194
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
166,
167
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
169,
170
]
}
],
"range": [
169,
171
]
}
],
"range": [
162,
194
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
181,
182
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
184,
185
]
}
],
"range": [
184,
186
]
}
],
"range": [
177,
194
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
192,
193
]
}
],
"range": [
192,
194
]
}
],
"range": [
132,
194
]
}
],
"range": [
132,
194
]
}
],
"hasChanges": false,
"range": [
132,
194
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
}
],
"range": [
7,
9
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
22,
23
]
}
],
"range": [
22,
24
]
}
],
"range": [
15,
62
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
34,
35
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
37,
38
]
}
],
"range": [
37,
39
]
}
],
"range": [
30,
62
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
49,
50
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
52,
53
]
}
],
"range": [
52,
54
]
}
],
"range": [
45,
62
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
60,
61
]
}
],
"range": [
60,
62
]
}
],
"range": [
0,
62
]
}
],
"range": [
0,
62
]
}
],
"hasChanges": false,
"range": [
0,
62
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
66,
67
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
69,
70
]
}
],
"range": [
69,
71
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
81,
82
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
86,
87
]
}
],
"range": [
86,
88
]
}
],
"range": [
84,
90
]
}
],
"range": [
77,
132
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
100,
101
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
103,
104
]
}
],
"range": [
103,
105
]
}
],
"range": [
96,
132
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
115,
116
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
120,
121
]
}
],
"range": [
120,
122
]
}
],
"range": [
118,
124
]
}
],
"range": [
111,
132
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
130,
131
]
}
],
"range": [
130,
132
]
}
],
"patch": "insert",
"range": [
62,
132
]
}
],
"range": [
62,
132
]
}
],
"hasChanges": true,
"range": [
62,
132
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
194,
194
]
}
],
"hasChanges": false,
"range": [
194,
194
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
132,
132
]
}
],
"hasChanges": false,
"range": [
132,
132
],
"number": 3
}
]
],
"paths": [
"if-else.js",
"if-else.js"
],
"oids": [
"6bb0eaa7ec6274091ce5ce960f47c96db97d4620",
"e26d6c43872f2810a2aca6432a8fefa636abfe9e"
]
},
"filePaths": [
"if-else.js"
],
"sha1": "7fdef82fc8d53e6d0b51d7471c287fb7718bd2cb",
"gitDir": "test/corpus/repos/javascript",
"sha2": "0b5da85e436955c7d417fd73c3fa98248cf08f9a"
}
,{
"testCaseDescription": "javascript-if-else-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
}
],
"range": [
7,
9
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
22,
23
]
}
],
"range": [
22,
24
]
}
],
"range": [
15,
62
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
34,
35
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
37,
38
]
}
],
"range": [
37,
39
]
}
],
"range": [
30,
62
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
49,
50
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
52,
53
]
}
],
"range": [
52,
54
]
}
],
"range": [
45,
62
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
60,
61
]
}
],
"range": [
60,
62
]
}
],
"patch": "delete",
"range": [
0,
62
]
}
],
"range": [
0,
62
]
}
],
"hasChanges": true,
"range": [
0,
62
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
66,
67
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
69,
70
]
}
],
"range": [
69,
71
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
81,
82
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
86,
87
]
}
],
"range": [
86,
88
]
}
],
"range": [
84,
90
]
}
],
"range": [
77,
132
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
100,
101
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
103,
104
]
}
],
"range": [
103,
105
]
}
],
"range": [
96,
132
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
115,
116
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
120,
121
]
}
],
"range": [
120,
122
]
}
],
"range": [
118,
124
]
}
],
"range": [
111,
132
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
130,
131
]
}
],
"range": [
130,
132
]
}
],
"range": [
62,
132
]
}
],
"range": [
62,
132
]
}
],
"hasChanges": false,
"range": [
62,
132
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
}
],
"range": [
7,
9
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
24,
25
]
}
],
"range": [
24,
26
]
}
],
"range": [
22,
28
]
}
],
"range": [
15,
70
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
38,
39
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
41,
42
]
}
],
"range": [
41,
43
]
}
],
"range": [
34,
70
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
53,
54
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
58,
59
]
}
],
"range": [
58,
60
]
}
],
"range": [
56,
62
]
}
],
"range": [
49,
70
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
68,
69
]
}
],
"range": [
68,
70
]
}
],
"range": [
0,
70
]
}
],
"range": [
0,
70
]
}
],
"hasChanges": false,
"range": [
0,
70
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
132,
132
]
}
],
"hasChanges": false,
"range": [
132,
132
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
70,
70
]
}
],
"hasChanges": false,
"range": [
70,
70
],
"number": 2
}
]
],
"paths": [
"if-else.js",
"if-else.js"
],
"oids": [
"e26d6c43872f2810a2aca6432a8fefa636abfe9e",
"1a55d0bd4e0f601787524953f62c0f621fd96702"
]
},
"filePaths": [
"if-else.js"
],
"sha1": "0b5da85e436955c7d417fd73c3fa98248cf08f9a",
"gitDir": "test/corpus/repos/javascript",
"sha2": "22ea0cae66ce46104f28b6f0f587da03be6ea992"
}
,{
"testCaseDescription": "javascript-if-else-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
}
],
"range": [
7,
9
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
24,
25
]
}
],
"range": [
24,
26
]
}
],
"range": [
22,
28
]
}
],
"range": [
15,
70
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
38,
39
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
41,
42
]
}
],
"range": [
41,
43
]
}
],
"range": [
34,
70
]
},
{
"category": "If",
"children": [
{
"category": "Identifier",
"range": [
53,
54
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
58,
59
]
}
],
"range": [
58,
60
]
}
],
"range": [
56,
62
]
}
],
"range": [
49,
70
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
68,
69
]
}
],
"range": [
68,
70
]
}
],
"range": [
0,
70
]
}
],
"patch": "delete",
"range": [
0,
70
]
}
],
"hasChanges": true,
"range": [
0,
70
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
70,
70
]
}
],
"hasChanges": true,
"range": [
70,
70
],
"number": 2
}
]
],
"paths": [
"if-else.js",
"if-else.js"
],
"oids": [
"1a55d0bd4e0f601787524953f62c0f621fd96702",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"if-else.js"
],
"sha1": "22ea0cae66ce46104f28b6f0f587da03be6ea992",
"gitDir": "test/corpus/repos/javascript",
"sha2": "e722399570aae20bc74d8ac937e87d9a952c6396"
}]