mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
2177 lines
93 KiB
JSON
2177 lines
93 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-method-call-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "insert",
|
|
"range": [
|
|
33,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
33,
|
|
33
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"method-call.js",
|
|
"method-call.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"07ab90c69d337ae3711ce064e3003f38aa49c5af"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index e69de29..07ab90c 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+object.someMethod(arg1, \"arg2\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "7aca49a04758f43f9e7c909ee616f33c18cf0e27..a391db61c291e9652b50630df1819b83df83ffea"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-method-call-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
33,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
50
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
51,
|
|
55
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
57,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
33,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
33,
|
|
66
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
66,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
84,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
90,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
66,
|
|
99
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
33,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
33,
|
|
33
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
99,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
99,
|
|
99
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"method-call.js",
|
|
"method-call.js"
|
|
],
|
|
"oids": [
|
|
"07ab90c69d337ae3711ce064e3003f38aa49c5af",
|
|
"9341e1754f85b838816c6c07c0e23a94bc817482"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index 07ab90c..9341e17 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+object.someMethod(arg1, \"arg3\");",
|
|
"+object.someMethod(arg1, \"arg2\");",
|
|
" object.someMethod(arg1, \"arg2\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "a391db61c291e9652b50630df1819b83df83ffea..8a52922fc1e9800afafa4c5bb1bd7c6bf8bc1673"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-method-call-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
33,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
50
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
51,
|
|
55
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
57,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
33,
|
|
66
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
33,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
50
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
51,
|
|
55
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
57,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
33,
|
|
66
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
66,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
84,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
90,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
66,
|
|
99
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
66,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
84,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
90,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
66,
|
|
99
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
99,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
99,
|
|
99
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
99,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
99,
|
|
99
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"method-call.js",
|
|
"method-call.js"
|
|
],
|
|
"oids": [
|
|
"9341e1754f85b838816c6c07c0e23a94bc817482",
|
|
"f6ada2d15e5cdbecee0da95ff9e84677f32f2e1e"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index 9341e17..f6ada2d 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-object.someMethod(arg1, \"arg3\");",
|
|
"+object.someMethod(arg1, \"arg2\");",
|
|
" object.someMethod(arg1, \"arg2\");",
|
|
" object.someMethod(arg1, \"arg2\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "8a52922fc1e9800afafa4c5bb1bd7c6bf8bc1673..af43a2e5f963ea29cb4bbef3df5d610dfb0dd6c4"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-method-call-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
33,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
50
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
51,
|
|
55
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
57,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
33,
|
|
66
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
33,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
50
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
51,
|
|
55
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
57,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
33,
|
|
66
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
66,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
84,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
90,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
66,
|
|
99
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
66,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
84,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
90,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
66,
|
|
99
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
99,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
99,
|
|
99
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
99,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
99,
|
|
99
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"method-call.js",
|
|
"method-call.js"
|
|
],
|
|
"oids": [
|
|
"f6ada2d15e5cdbecee0da95ff9e84677f32f2e1e",
|
|
"9341e1754f85b838816c6c07c0e23a94bc817482"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index f6ada2d..9341e17 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-object.someMethod(arg1, \"arg2\");",
|
|
"+object.someMethod(arg1, \"arg3\");",
|
|
" object.someMethod(arg1, \"arg2\");",
|
|
" object.someMethod(arg1, \"arg2\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "af43a2e5f963ea29cb4bbef3df5d610dfb0dd6c4..51076f4ed7a3e7277b2d21eaecc04fe0ac703d33"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-method-call-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
33,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
50
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
51,
|
|
55
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
57,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
33,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
33,
|
|
66
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
66,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
84,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
90,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
66,
|
|
99
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
33,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
50
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
51,
|
|
55
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
57,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
33,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
33,
|
|
66
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
99,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
99,
|
|
99
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
66,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
66,
|
|
66
|
|
],
|
|
"number": 3
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"method-call.js",
|
|
"method-call.js"
|
|
],
|
|
"oids": [
|
|
"9341e1754f85b838816c6c07c0e23a94bc817482",
|
|
"894dcf6638fa03abcfa66082a858e5a1266dd714"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index 9341e17..894dcf6 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-object.someMethod(arg1, \"arg3\");",
|
|
"-object.someMethod(arg1, \"arg2\");",
|
|
" object.someMethod(arg1, \"arg2\");",
|
|
"+object.someMethod(arg1, \"arg3\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "51076f4ed7a3e7277b2d21eaecc04fe0ac703d33..52f38ade18e39d463dad479757df8039e8f9cfb9"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-method-call-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
33,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
50
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
51,
|
|
55
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
57,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
33,
|
|
66
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
66,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
66,
|
|
66
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
33,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
33,
|
|
33
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"method-call.js",
|
|
"method-call.js"
|
|
],
|
|
"oids": [
|
|
"894dcf6638fa03abcfa66082a858e5a1266dd714",
|
|
"a82528c868f9222f29b3b80c97112469b67a2d1d"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index 894dcf6..a82528c 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-object.someMethod(arg1, \"arg2\");",
|
|
" object.someMethod(arg1, \"arg3\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "52f38ade18e39d463dad479757df8039e8f9cfb9..2b82d812ce523f1c1ec125ab8590a1cd7191bda9"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-method-call-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
33,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
33,
|
|
33
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"method-call.js",
|
|
"method-call.js"
|
|
],
|
|
"oids": [
|
|
"a82528c868f9222f29b3b80c97112469b67a2d1d",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index a82528c..e69de29 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-object.someMethod(arg1, \"arg3\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "2b82d812ce523f1c1ec125ab8590a1cd7191bda9..fc795a83fff7fcdcadac0ce15ce74b4c24bfcbd5"
|
|
}]
|