1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00
semantic/test/corpus/json/javascript/function-call-args.json
2016-11-03 15:41:59 -07:00

4459 lines
267 KiB
JSON

[{
"testCaseDescription": "javascript-function-call-args-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
0,
12
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
},
{
"category": "StringLiteral",
"range": [
16,
24
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
35,
36
]
},
{
"category": "Identifier",
"range": [
37,
38
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
42,
49
]
},
{
"category": "Identifier",
"range": [
50,
53
]
},
{
"category": "Identifier",
"range": [
54,
55
]
}
],
"range": [
42,
56
]
}
],
"range": [
42,
57
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
65,
66
]
}
],
"range": [
58,
67
]
}
],
"range": [
40,
69
]
}
],
"range": [
26,
69
]
},
{
"category": "Boolean",
"range": [
71,
75
]
}
],
"range": [
0,
76
]
}
],
"range": [
0,
77
]
}
],
"patch": "insert",
"range": [
0,
77
]
}
],
"hasChanges": true,
"range": [
0,
77
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
77,
77
]
}
],
"hasChanges": true,
"range": [
77,
77
],
"number": 2
}
]
],
"paths": [
"function-call-args.js",
"function-call-args.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"699333de7b70cb953d61254bd14413214022e0d7"
]
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index e69de29..699333d 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -0,0 +1 @@",
"+someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "fc795a83fff7fcdcadac0ce15ce74b4c24bfcbd5..f0d27ee6b9aad8945ee36251c43edd314201c669"
}
,{
"testCaseDescription": "javascript-function-call-args-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
0,
12
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
},
{
"category": "StringLiteral",
"range": [
16,
29
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
41
]
},
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
47,
54
]
},
{
"category": "Identifier",
"range": [
55,
58
]
},
{
"category": "Identifier",
"range": [
59,
60
]
}
],
"range": [
47,
61
]
}
],
"range": [
47,
62
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
70,
71
]
}
],
"range": [
63,
72
]
}
],
"range": [
45,
74
]
}
],
"range": [
31,
74
]
},
{
"category": "Boolean",
"range": [
76,
81
]
}
],
"range": [
0,
82
]
}
],
"patch": "insert",
"range": [
0,
83
]
}
],
"range": [
0,
83
]
}
],
"hasChanges": true,
"range": [
0,
83
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
83,
95
]
},
{
"category": "NumberLiteral",
"range": [
96,
97
]
},
{
"category": "StringLiteral",
"range": [
99,
107
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
118,
119
]
},
{
"category": "Identifier",
"range": [
120,
121
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
125,
132
]
},
{
"category": "Identifier",
"range": [
133,
136
]
},
{
"category": "Identifier",
"range": [
137,
138
]
}
],
"range": [
125,
139
]
}
],
"range": [
125,
140
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
148,
149
]
}
],
"range": [
141,
150
]
}
],
"range": [
123,
152
]
}
],
"range": [
109,
152
]
},
{
"category": "Boolean",
"range": [
154,
158
]
}
],
"range": [
83,
159
]
}
],
"patch": "insert",
"range": [
83,
160
]
}
],
"range": [
83,
160
]
}
],
"hasChanges": true,
"range": [
83,
160
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
0,
12
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
},
{
"category": "StringLiteral",
"range": [
16,
24
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
35,
36
]
},
{
"category": "Identifier",
"range": [
37,
38
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
42,
49
]
},
{
"category": "Identifier",
"range": [
50,
53
]
},
{
"category": "Identifier",
"range": [
54,
55
]
}
],
"range": [
42,
56
]
}
],
"range": [
42,
57
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
65,
66
]
}
],
"range": [
58,
67
]
}
],
"range": [
40,
69
]
}
],
"range": [
26,
69
]
},
{
"category": "Boolean",
"range": [
71,
75
]
}
],
"range": [
0,
76
]
}
],
"range": [
0,
77
]
}
],
"range": [
0,
77
]
}
],
"hasChanges": false,
"range": [
0,
77
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
160,
172
]
},
{
"category": "NumberLiteral",
"range": [
173,
174
]
},
{
"category": "StringLiteral",
"range": [
176,
184
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
195,
196
]
},
{
"category": "Identifier",
"range": [
197,
198
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
202,
209
]
},
{
"category": "Identifier",
"range": [
210,
213
]
},
{
"category": "Identifier",
"range": [
214,
215
]
}
],
"range": [
202,
216
]
}
],
"range": [
202,
217
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
225,
226
]
}
],
"range": [
218,
227
]
}
],
"range": [
200,
229
]
}
],
"range": [
186,
229
]
},
{
"category": "Boolean",
"range": [
231,
235
]
}
],
"range": [
160,
236
]
}
],
"range": [
160,
237
]
}
],
"range": [
160,
237
]
}
],
"hasChanges": false,
"range": [
160,
237
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
77,
77
]
}
],
"hasChanges": false,
"range": [
77,
77
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
237,
237
]
}
],
"hasChanges": false,
"range": [
237,
237
],
"number": 4
}
]
],
"paths": [
"function-call-args.js",
"function-call-args.js"
],
"oids": [
"699333de7b70cb953d61254bd14413214022e0d7",
"3f4ee6eff96262b663d39cbd5835360a1f494473"
]
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index 699333d..3f4ee6e 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -1 +1,3 @@",
"+someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)",
"+someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
" someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "f0d27ee6b9aad8945ee36251c43edd314201c669..d523d6414978750538a5f0db9a039430426a16bd"
}
,{
"testCaseDescription": "javascript-function-call-args-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
0,
12
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
16,
29
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
40,
41
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
42,
43
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
47,
54
]
},
{
"category": "Identifier",
"range": [
55,
58
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
59,
60
]
}
],
"range": [
47,
61
]
}
],
"range": [
47,
62
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
70,
71
]
}
],
"range": [
63,
72
]
}
],
"range": [
45,
74
]
}
],
"range": [
31,
74
]
},
{
"category": "Boolean",
"patch": "replace",
"range": [
76,
81
]
}
],
"range": [
0,
82
]
}
],
"range": [
0,
83
]
}
],
"range": [
0,
83
]
}
],
"hasChanges": true,
"range": [
0,
83
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
0,
12
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
16,
24
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
35,
36
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
37,
38
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
42,
49
]
},
{
"category": "Identifier",
"range": [
50,
53
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
54,
55
]
}
],
"range": [
42,
56
]
}
],
"range": [
42,
57
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
65,
66
]
}
],
"range": [
58,
67
]
}
],
"range": [
40,
69
]
}
],
"range": [
26,
69
]
},
{
"category": "Boolean",
"patch": "replace",
"range": [
71,
75
]
}
],
"range": [
0,
76
]
}
],
"range": [
0,
77
]
}
],
"range": [
0,
77
]
}
],
"hasChanges": true,
"range": [
0,
77
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
83,
95
]
},
{
"category": "NumberLiteral",
"range": [
96,
97
]
},
{
"category": "StringLiteral",
"range": [
99,
107
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
118,
119
]
},
{
"category": "Identifier",
"range": [
120,
121
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
125,
132
]
},
{
"category": "Identifier",
"range": [
133,
136
]
},
{
"category": "Identifier",
"range": [
137,
138
]
}
],
"range": [
125,
139
]
}
],
"range": [
125,
140
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
148,
149
]
}
],
"range": [
141,
150
]
}
],
"range": [
123,
152
]
}
],
"range": [
109,
152
]
},
{
"category": "Boolean",
"range": [
154,
158
]
}
],
"range": [
83,
159
]
}
],
"range": [
83,
160
]
}
],
"range": [
83,
160
]
}
],
"hasChanges": false,
"range": [
83,
160
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
77,
89
]
},
{
"category": "NumberLiteral",
"range": [
90,
91
]
},
{
"category": "StringLiteral",
"range": [
93,
101
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
112,
113
]
},
{
"category": "Identifier",
"range": [
114,
115
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
119,
126
]
},
{
"category": "Identifier",
"range": [
127,
130
]
},
{
"category": "Identifier",
"range": [
131,
132
]
}
],
"range": [
119,
133
]
}
],
"range": [
119,
134
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
142,
143
]
}
],
"range": [
135,
144
]
}
],
"range": [
117,
146
]
}
],
"range": [
103,
146
]
},
{
"category": "Boolean",
"range": [
148,
152
]
}
],
"range": [
77,
153
]
}
],
"range": [
77,
154
]
}
],
"range": [
77,
154
]
}
],
"hasChanges": false,
"range": [
77,
154
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
160,
172
]
},
{
"category": "NumberLiteral",
"range": [
173,
174
]
},
{
"category": "StringLiteral",
"range": [
176,
184
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
195,
196
]
},
{
"category": "Identifier",
"range": [
197,
198
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
202,
209
]
},
{
"category": "Identifier",
"range": [
210,
213
]
},
{
"category": "Identifier",
"range": [
214,
215
]
}
],
"range": [
202,
216
]
}
],
"range": [
202,
217
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
225,
226
]
}
],
"range": [
218,
227
]
}
],
"range": [
200,
229
]
}
],
"range": [
186,
229
]
},
{
"category": "Boolean",
"range": [
231,
235
]
}
],
"range": [
160,
236
]
}
],
"range": [
160,
237
]
}
],
"range": [
160,
237
]
}
],
"hasChanges": false,
"range": [
160,
237
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
154,
166
]
},
{
"category": "NumberLiteral",
"range": [
167,
168
]
},
{
"category": "StringLiteral",
"range": [
170,
178
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
189,
190
]
},
{
"category": "Identifier",
"range": [
191,
192
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
196,
203
]
},
{
"category": "Identifier",
"range": [
204,
207
]
},
{
"category": "Identifier",
"range": [
208,
209
]
}
],
"range": [
196,
210
]
}
],
"range": [
196,
211
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
219,
220
]
}
],
"range": [
212,
221
]
}
],
"range": [
194,
223
]
}
],
"range": [
180,
223
]
},
{
"category": "Boolean",
"range": [
225,
229
]
}
],
"range": [
154,
230
]
}
],
"range": [
154,
231
]
}
],
"range": [
154,
231
]
}
],
"hasChanges": false,
"range": [
154,
231
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
237,
237
]
}
],
"hasChanges": false,
"range": [
237,
237
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
231,
231
]
}
],
"hasChanges": false,
"range": [
231,
231
],
"number": 4
}
]
],
"paths": [
"function-call-args.js",
"function-call-args.js"
],
"oids": [
"3f4ee6eff96262b663d39cbd5835360a1f494473",
"dc419cba5721af66b901680ae5608317dc162c81"
]
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index 3f4ee6e..dc419cb 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -1,3 +1,3 @@",
"-someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)",
"+someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
" someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
" someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "d523d6414978750538a5f0db9a039430426a16bd..e6ce816b8aef49808b88c148091b0cc5d1b50af7"
}
,{
"testCaseDescription": "javascript-function-call-args-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
0,
12
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
16,
24
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
35,
36
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
37,
38
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
42,
49
]
},
{
"category": "Identifier",
"range": [
50,
53
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
54,
55
]
}
],
"range": [
42,
56
]
}
],
"range": [
42,
57
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
65,
66
]
}
],
"range": [
58,
67
]
}
],
"range": [
40,
69
]
}
],
"range": [
26,
69
]
},
{
"category": "Boolean",
"patch": "replace",
"range": [
71,
75
]
}
],
"range": [
0,
76
]
}
],
"range": [
0,
77
]
}
],
"range": [
0,
77
]
}
],
"hasChanges": true,
"range": [
0,
77
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
0,
12
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
16,
29
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
40,
41
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
42,
43
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
47,
54
]
},
{
"category": "Identifier",
"range": [
55,
58
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
59,
60
]
}
],
"range": [
47,
61
]
}
],
"range": [
47,
62
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
70,
71
]
}
],
"range": [
63,
72
]
}
],
"range": [
45,
74
]
}
],
"range": [
31,
74
]
},
{
"category": "Boolean",
"patch": "replace",
"range": [
76,
81
]
}
],
"range": [
0,
82
]
}
],
"range": [
0,
83
]
}
],
"range": [
0,
83
]
}
],
"hasChanges": true,
"range": [
0,
83
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
77,
89
]
},
{
"category": "NumberLiteral",
"range": [
90,
91
]
},
{
"category": "StringLiteral",
"range": [
93,
101
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
112,
113
]
},
{
"category": "Identifier",
"range": [
114,
115
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
119,
126
]
},
{
"category": "Identifier",
"range": [
127,
130
]
},
{
"category": "Identifier",
"range": [
131,
132
]
}
],
"range": [
119,
133
]
}
],
"range": [
119,
134
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
142,
143
]
}
],
"range": [
135,
144
]
}
],
"range": [
117,
146
]
}
],
"range": [
103,
146
]
},
{
"category": "Boolean",
"range": [
148,
152
]
}
],
"range": [
77,
153
]
}
],
"range": [
77,
154
]
}
],
"range": [
77,
154
]
}
],
"hasChanges": false,
"range": [
77,
154
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
83,
95
]
},
{
"category": "NumberLiteral",
"range": [
96,
97
]
},
{
"category": "StringLiteral",
"range": [
99,
107
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
118,
119
]
},
{
"category": "Identifier",
"range": [
120,
121
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
125,
132
]
},
{
"category": "Identifier",
"range": [
133,
136
]
},
{
"category": "Identifier",
"range": [
137,
138
]
}
],
"range": [
125,
139
]
}
],
"range": [
125,
140
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
148,
149
]
}
],
"range": [
141,
150
]
}
],
"range": [
123,
152
]
}
],
"range": [
109,
152
]
},
{
"category": "Boolean",
"range": [
154,
158
]
}
],
"range": [
83,
159
]
}
],
"range": [
83,
160
]
}
],
"range": [
83,
160
]
}
],
"hasChanges": false,
"range": [
83,
160
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
154,
166
]
},
{
"category": "NumberLiteral",
"range": [
167,
168
]
},
{
"category": "StringLiteral",
"range": [
170,
178
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
189,
190
]
},
{
"category": "Identifier",
"range": [
191,
192
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
196,
203
]
},
{
"category": "Identifier",
"range": [
204,
207
]
},
{
"category": "Identifier",
"range": [
208,
209
]
}
],
"range": [
196,
210
]
}
],
"range": [
196,
211
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
219,
220
]
}
],
"range": [
212,
221
]
}
],
"range": [
194,
223
]
}
],
"range": [
180,
223
]
},
{
"category": "Boolean",
"range": [
225,
229
]
}
],
"range": [
154,
230
]
}
],
"range": [
154,
231
]
}
],
"range": [
154,
231
]
}
],
"hasChanges": false,
"range": [
154,
231
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
160,
172
]
},
{
"category": "NumberLiteral",
"range": [
173,
174
]
},
{
"category": "StringLiteral",
"range": [
176,
184
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
195,
196
]
},
{
"category": "Identifier",
"range": [
197,
198
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
202,
209
]
},
{
"category": "Identifier",
"range": [
210,
213
]
},
{
"category": "Identifier",
"range": [
214,
215
]
}
],
"range": [
202,
216
]
}
],
"range": [
202,
217
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
225,
226
]
}
],
"range": [
218,
227
]
}
],
"range": [
200,
229
]
}
],
"range": [
186,
229
]
},
{
"category": "Boolean",
"range": [
231,
235
]
}
],
"range": [
160,
236
]
}
],
"range": [
160,
237
]
}
],
"range": [
160,
237
]
}
],
"hasChanges": false,
"range": [
160,
237
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
231,
231
]
}
],
"hasChanges": false,
"range": [
231,
231
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
237,
237
]
}
],
"hasChanges": false,
"range": [
237,
237
],
"number": 4
}
]
],
"paths": [
"function-call-args.js",
"function-call-args.js"
],
"oids": [
"dc419cba5721af66b901680ae5608317dc162c81",
"3f4ee6eff96262b663d39cbd5835360a1f494473"
]
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index dc419cb..3f4ee6e 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -1,3 +1,3 @@",
"-someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
"+someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)",
" someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
" someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "e6ce816b8aef49808b88c148091b0cc5d1b50af7..505d2d8e44416f84023a062e474ea5547a9e24ef"
}
,{
"testCaseDescription": "javascript-function-call-args-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
0,
12
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
},
{
"category": "StringLiteral",
"range": [
16,
29
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
41
]
},
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
47,
54
]
},
{
"category": "Identifier",
"range": [
55,
58
]
},
{
"category": "Identifier",
"range": [
59,
60
]
}
],
"range": [
47,
61
]
}
],
"range": [
47,
62
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
70,
71
]
}
],
"range": [
63,
72
]
}
],
"range": [
45,
74
]
}
],
"range": [
31,
74
]
},
{
"category": "Boolean",
"range": [
76,
81
]
}
],
"range": [
0,
82
]
}
],
"patch": "delete",
"range": [
0,
83
]
}
],
"range": [
0,
83
]
}
],
"hasChanges": true,
"range": [
0,
83
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
83,
95
]
},
{
"category": "NumberLiteral",
"range": [
96,
97
]
},
{
"category": "StringLiteral",
"range": [
99,
107
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
118,
119
]
},
{
"category": "Identifier",
"range": [
120,
121
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
125,
132
]
},
{
"category": "Identifier",
"range": [
133,
136
]
},
{
"category": "Identifier",
"range": [
137,
138
]
}
],
"range": [
125,
139
]
}
],
"range": [
125,
140
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
148,
149
]
}
],
"range": [
141,
150
]
}
],
"range": [
123,
152
]
}
],
"range": [
109,
152
]
},
{
"category": "Boolean",
"range": [
154,
158
]
}
],
"range": [
83,
159
]
}
],
"patch": "delete",
"range": [
83,
160
]
}
],
"range": [
83,
160
]
}
],
"hasChanges": true,
"range": [
83,
160
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
160,
172
]
},
{
"category": "NumberLiteral",
"range": [
173,
174
]
},
{
"category": "StringLiteral",
"range": [
176,
184
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
195,
196
]
},
{
"category": "Identifier",
"range": [
197,
198
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
202,
209
]
},
{
"category": "Identifier",
"range": [
210,
213
]
},
{
"category": "Identifier",
"range": [
214,
215
]
}
],
"range": [
202,
216
]
}
],
"range": [
202,
217
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
225,
226
]
}
],
"range": [
218,
227
]
}
],
"range": [
200,
229
]
}
],
"range": [
186,
229
]
},
{
"category": "Boolean",
"range": [
231,
235
]
}
],
"range": [
160,
236
]
}
],
"range": [
160,
237
]
}
],
"range": [
160,
237
]
}
],
"hasChanges": false,
"range": [
160,
237
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
0,
12
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
},
{
"category": "StringLiteral",
"range": [
16,
24
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
35,
36
]
},
{
"category": "Identifier",
"range": [
37,
38
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
42,
49
]
},
{
"category": "Identifier",
"range": [
50,
53
]
},
{
"category": "Identifier",
"range": [
54,
55
]
}
],
"range": [
42,
56
]
}
],
"range": [
42,
57
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
65,
66
]
}
],
"range": [
58,
67
]
}
],
"range": [
40,
69
]
}
],
"range": [
26,
69
]
},
{
"category": "Boolean",
"range": [
71,
75
]
}
],
"range": [
0,
76
]
}
],
"range": [
0,
77
]
}
],
"range": [
0,
77
]
}
],
"hasChanges": false,
"range": [
0,
77
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
77,
89
]
},
{
"category": "NumberLiteral",
"range": [
90,
91
]
},
{
"category": "StringLiteral",
"range": [
93,
106
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
117,
118
]
},
{
"category": "Identifier",
"range": [
119,
120
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
124,
131
]
},
{
"category": "Identifier",
"range": [
132,
135
]
},
{
"category": "Identifier",
"range": [
136,
137
]
}
],
"range": [
124,
138
]
}
],
"range": [
124,
139
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
147,
148
]
}
],
"range": [
140,
149
]
}
],
"range": [
122,
151
]
}
],
"range": [
108,
151
]
},
{
"category": "Boolean",
"range": [
153,
158
]
}
],
"range": [
77,
159
]
}
],
"patch": "insert",
"range": [
77,
160
]
}
],
"range": [
77,
160
]
}
],
"hasChanges": true,
"range": [
77,
160
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
237,
237
]
}
],
"hasChanges": false,
"range": [
237,
237
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
160,
160
]
}
],
"hasChanges": false,
"range": [
160,
160
],
"number": 3
}
]
],
"paths": [
"function-call-args.js",
"function-call-args.js"
],
"oids": [
"3f4ee6eff96262b663d39cbd5835360a1f494473",
"cae967b66fad9a3b96bcabe6dcdfd25ae8f70050"
]
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index 3f4ee6e..cae967b 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -1,3 +1,2 @@",
"-someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)",
"-someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
" someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
"+someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "505d2d8e44416f84023a062e474ea5547a9e24ef..3993b0e88ee0edfd98dda259fc787ba4845495d4"
}
,{
"testCaseDescription": "javascript-function-call-args-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
0,
12
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
},
{
"category": "StringLiteral",
"range": [
16,
24
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
35,
36
]
},
{
"category": "Identifier",
"range": [
37,
38
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
42,
49
]
},
{
"category": "Identifier",
"range": [
50,
53
]
},
{
"category": "Identifier",
"range": [
54,
55
]
}
],
"range": [
42,
56
]
}
],
"range": [
42,
57
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
65,
66
]
}
],
"range": [
58,
67
]
}
],
"range": [
40,
69
]
}
],
"range": [
26,
69
]
},
{
"category": "Boolean",
"range": [
71,
75
]
}
],
"range": [
0,
76
]
}
],
"patch": "delete",
"range": [
0,
77
]
}
],
"range": [
0,
77
]
}
],
"hasChanges": true,
"range": [
0,
77
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
77,
89
]
},
{
"category": "NumberLiteral",
"range": [
90,
91
]
},
{
"category": "StringLiteral",
"range": [
93,
106
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
117,
118
]
},
{
"category": "Identifier",
"range": [
119,
120
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
124,
131
]
},
{
"category": "Identifier",
"range": [
132,
135
]
},
{
"category": "Identifier",
"range": [
136,
137
]
}
],
"range": [
124,
138
]
}
],
"range": [
124,
139
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
147,
148
]
}
],
"range": [
140,
149
]
}
],
"range": [
122,
151
]
}
],
"range": [
108,
151
]
},
{
"category": "Boolean",
"range": [
153,
158
]
}
],
"range": [
77,
159
]
}
],
"range": [
77,
160
]
}
],
"range": [
77,
160
]
}
],
"hasChanges": false,
"range": [
77,
160
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
0,
12
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
},
{
"category": "StringLiteral",
"range": [
16,
29
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
41
]
},
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
47,
54
]
},
{
"category": "Identifier",
"range": [
55,
58
]
},
{
"category": "Identifier",
"range": [
59,
60
]
}
],
"range": [
47,
61
]
}
],
"range": [
47,
62
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
70,
71
]
}
],
"range": [
63,
72
]
}
],
"range": [
45,
74
]
}
],
"range": [
31,
74
]
},
{
"category": "Boolean",
"range": [
76,
81
]
}
],
"range": [
0,
82
]
}
],
"range": [
0,
83
]
}
],
"range": [
0,
83
]
}
],
"hasChanges": false,
"range": [
0,
83
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
160,
160
]
}
],
"hasChanges": false,
"range": [
160,
160
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
83,
83
]
}
],
"hasChanges": false,
"range": [
83,
83
],
"number": 2
}
]
],
"paths": [
"function-call-args.js",
"function-call-args.js"
],
"oids": [
"cae967b66fad9a3b96bcabe6dcdfd25ae8f70050",
"0d19573d73190fda4203ba60df4eb7553c5da874"
]
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index cae967b..0d19573 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -1,2 +1 @@",
"-someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
" someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "3993b0e88ee0edfd98dda259fc787ba4845495d4..f89ece40228968ba4db1a434efef2d7dcb2299f1"
}
,{
"testCaseDescription": "javascript-function-call-args-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "FunctionCall",
"children": [
{
"category": "Identifier",
"range": [
0,
12
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
},
{
"category": "StringLiteral",
"range": [
16,
29
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
40,
41
]
},
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
47,
54
]
},
{
"category": "Identifier",
"range": [
55,
58
]
},
{
"category": "Identifier",
"range": [
59,
60
]
}
],
"range": [
47,
61
]
}
],
"range": [
47,
62
]
},
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
70,
71
]
}
],
"range": [
63,
72
]
}
],
"range": [
45,
74
]
}
],
"range": [
31,
74
]
},
{
"category": "Boolean",
"range": [
76,
81
]
}
],
"range": [
0,
82
]
}
],
"range": [
0,
83
]
}
],
"patch": "delete",
"range": [
0,
83
]
}
],
"hasChanges": true,
"range": [
0,
83
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
83,
83
]
}
],
"hasChanges": true,
"range": [
83,
83
],
"number": 2
}
]
],
"paths": [
"function-call-args.js",
"function-call-args.js"
],
"oids": [
"0d19573d73190fda4203ba60df4eb7553c5da874",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index 0d19573..e69de29 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -1 +0,0 @@",
"-someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "f89ece40228968ba4db1a434efef2d7dcb2299f1..24ed5bdc27489ca788d6784b0385a26f77c8c9d7"
}]