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

2116 lines
91 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"
],
"sha1": "9563b621c12e140f41142fdf5f6541b40e8320b4",
"gitDir": "test/corpus/repos/javascript",
"sha2": "f1d988cc79f5795e3b70b2965521c6e02d0ae738"
}
,{
"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"
],
"sha1": "f1d988cc79f5795e3b70b2965521c6e02d0ae738",
"gitDir": "test/corpus/repos/javascript",
"sha2": "86613499c3e126026cf3845f44e4d65fae1388bc"
}
,{
"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"
],
"sha1": "86613499c3e126026cf3845f44e4d65fae1388bc",
"gitDir": "test/corpus/repos/javascript",
"sha2": "bf1bf091540f06cf3238eed6160af69f176e2db3"
}
,{
"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"
],
"sha1": "bf1bf091540f06cf3238eed6160af69f176e2db3",
"gitDir": "test/corpus/repos/javascript",
"sha2": "a5bee83ba9513647bb13c7fed089006e53dc9385"
}
,{
"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"
],
"sha1": "a5bee83ba9513647bb13c7fed089006e53dc9385",
"gitDir": "test/corpus/repos/javascript",
"sha2": "01c397ff1c99c3d3342fdc4995999d334398dc00"
}
,{
"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"
],
"sha1": "01c397ff1c99c3d3342fdc4995999d334398dc00",
"gitDir": "test/corpus/repos/javascript",
"sha2": "ed9c54d9708663cda0ebfc4d92f3b5a5cedff9dd"
}
,{
"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"
],
"sha1": "ed9c54d9708663cda0ebfc4d92f3b5a5cedff9dd",
"gitDir": "test/corpus/repos/javascript",
"sha2": "f2b60a7c95b891bf04855798a2f57300e30db502"
}]