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

3242 lines
181 KiB
JSON

[{
"testCaseDescription": "javascript-chained-callbacks-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
},
{
"category": "Identifier",
"range": [
5,
8
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
31,
32
]
},
{
"category": "Identifier",
"range": [
33,
34
]
}
],
"range": [
31,
34
]
}
],
"range": [
24,
35
]
}
],
"range": [
22,
37
]
}
],
"range": [
9,
37
]
}
],
"range": [
0,
38
]
}
],
"range": [
0,
39
]
}
],
"patch": "insert",
"range": [
0,
39
]
}
],
"hasChanges": true,
"range": [
0,
39
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
39,
39
]
}
],
"hasChanges": true,
"range": [
39,
39
],
"number": 2
}
]
],
"paths": [
"chained-callbacks.js",
"chained-callbacks.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"ce9ee1ed9e861af97055f45e8bba4135e730cd5c"
]
},
"filePaths": [
"chained-callbacks.js"
],
"sha1": "d71792c4844350bf1135af6e1c7adc7f2354ec10",
"gitDir": "test/corpus/repos/javascript",
"sha2": "383a5b7fcf78cfb9e6f017646de5a3ff5b7d104e"
}
,{
"testCaseDescription": "javascript-chained-callbacks-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
},
{
"category": "Identifier",
"range": [
5,
11
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
22,
23
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
34,
35
]
},
{
"category": "Identifier",
"range": [
36,
37
]
}
],
"range": [
34,
37
]
}
],
"range": [
27,
38
]
}
],
"range": [
25,
40
]
}
],
"range": [
12,
40
]
}
],
"range": [
0,
41
]
}
],
"patch": "insert",
"range": [
0,
42
]
}
],
"range": [
0,
42
]
}
],
"hasChanges": true,
"range": [
0,
42
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
42,
46
]
},
{
"category": "Identifier",
"range": [
47,
50
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
61,
62
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
73,
74
]
},
{
"category": "Identifier",
"range": [
75,
76
]
}
],
"range": [
73,
76
]
}
],
"range": [
66,
77
]
}
],
"range": [
64,
79
]
}
],
"range": [
51,
79
]
}
],
"range": [
42,
80
]
}
],
"patch": "insert",
"range": [
42,
81
]
}
],
"range": [
42,
81
]
}
],
"hasChanges": true,
"range": [
42,
81
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
},
{
"category": "Identifier",
"range": [
5,
8
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
31,
32
]
},
{
"category": "Identifier",
"range": [
33,
34
]
}
],
"range": [
31,
34
]
}
],
"range": [
24,
35
]
}
],
"range": [
22,
37
]
}
],
"range": [
9,
37
]
}
],
"range": [
0,
38
]
}
],
"range": [
0,
39
]
}
],
"range": [
0,
39
]
}
],
"hasChanges": false,
"range": [
0,
39
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
81,
85
]
},
{
"category": "Identifier",
"range": [
86,
89
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
100,
101
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
112,
113
]
},
{
"category": "Identifier",
"range": [
114,
115
]
}
],
"range": [
112,
115
]
}
],
"range": [
105,
116
]
}
],
"range": [
103,
118
]
}
],
"range": [
90,
118
]
}
],
"range": [
81,
119
]
}
],
"range": [
81,
120
]
}
],
"range": [
81,
120
]
}
],
"hasChanges": false,
"range": [
81,
120
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
39,
39
]
}
],
"hasChanges": false,
"range": [
39,
39
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
120,
120
]
}
],
"hasChanges": false,
"range": [
120,
120
],
"number": 4
}
]
],
"paths": [
"chained-callbacks.js",
"chained-callbacks.js"
],
"oids": [
"ce9ee1ed9e861af97055f45e8bba4135e730cd5c",
"acba744a8426d46dd1ef2f760336b6be5329b75b"
]
},
"filePaths": [
"chained-callbacks.js"
],
"sha1": "383a5b7fcf78cfb9e6f017646de5a3ff5b7d104e",
"gitDir": "test/corpus/repos/javascript",
"sha2": "7838a9b34e8b18a66bea53da72f7ce0467030d58"
}
,{
"testCaseDescription": "javascript-chained-callbacks-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
5,
11
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
22,
23
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
34,
35
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
36,
37
]
}
],
"range": [
34,
37
]
}
],
"range": [
27,
38
]
}
],
"range": [
25,
40
]
}
],
"range": [
12,
40
]
}
],
"range": [
0,
41
]
}
],
"range": [
0,
42
]
}
],
"range": [
0,
42
]
}
],
"hasChanges": true,
"range": [
0,
42
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
5,
8
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
31,
32
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
33,
34
]
}
],
"range": [
31,
34
]
}
],
"range": [
24,
35
]
}
],
"range": [
22,
37
]
}
],
"range": [
9,
37
]
}
],
"range": [
0,
38
]
}
],
"range": [
0,
39
]
}
],
"range": [
0,
39
]
}
],
"hasChanges": true,
"range": [
0,
39
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
42,
46
]
},
{
"category": "Identifier",
"range": [
47,
50
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
61,
62
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
73,
74
]
},
{
"category": "Identifier",
"range": [
75,
76
]
}
],
"range": [
73,
76
]
}
],
"range": [
66,
77
]
}
],
"range": [
64,
79
]
}
],
"range": [
51,
79
]
}
],
"range": [
42,
80
]
}
],
"range": [
42,
81
]
}
],
"range": [
42,
81
]
}
],
"hasChanges": false,
"range": [
42,
81
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
39,
43
]
},
{
"category": "Identifier",
"range": [
44,
47
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
58,
59
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
70,
71
]
},
{
"category": "Identifier",
"range": [
72,
73
]
}
],
"range": [
70,
73
]
}
],
"range": [
63,
74
]
}
],
"range": [
61,
76
]
}
],
"range": [
48,
76
]
}
],
"range": [
39,
77
]
}
],
"range": [
39,
78
]
}
],
"range": [
39,
78
]
}
],
"hasChanges": false,
"range": [
39,
78
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
81,
85
]
},
{
"category": "Identifier",
"range": [
86,
89
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
100,
101
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
112,
113
]
},
{
"category": "Identifier",
"range": [
114,
115
]
}
],
"range": [
112,
115
]
}
],
"range": [
105,
116
]
}
],
"range": [
103,
118
]
}
],
"range": [
90,
118
]
}
],
"range": [
81,
119
]
}
],
"range": [
81,
120
]
}
],
"range": [
81,
120
]
}
],
"hasChanges": false,
"range": [
81,
120
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
78,
82
]
},
{
"category": "Identifier",
"range": [
83,
86
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
97,
98
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
109,
110
]
},
{
"category": "Identifier",
"range": [
111,
112
]
}
],
"range": [
109,
112
]
}
],
"range": [
102,
113
]
}
],
"range": [
100,
115
]
}
],
"range": [
87,
115
]
}
],
"range": [
78,
116
]
}
],
"range": [
78,
117
]
}
],
"range": [
78,
117
]
}
],
"hasChanges": false,
"range": [
78,
117
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
120,
120
]
}
],
"hasChanges": false,
"range": [
120,
120
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
117,
117
]
}
],
"hasChanges": false,
"range": [
117,
117
],
"number": 4
}
]
],
"paths": [
"chained-callbacks.js",
"chained-callbacks.js"
],
"oids": [
"acba744a8426d46dd1ef2f760336b6be5329b75b",
"7390534322bff352014e45fdc8399881b290d5a2"
]
},
"filePaths": [
"chained-callbacks.js"
],
"sha1": "7838a9b34e8b18a66bea53da72f7ce0467030d58",
"gitDir": "test/corpus/repos/javascript",
"sha2": "c81be05c887d473b37e697bd3116824a679aae51"
}
,{
"testCaseDescription": "javascript-chained-callbacks-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
5,
8
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
31,
32
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
33,
34
]
}
],
"range": [
31,
34
]
}
],
"range": [
24,
35
]
}
],
"range": [
22,
37
]
}
],
"range": [
9,
37
]
}
],
"range": [
0,
38
]
}
],
"range": [
0,
39
]
}
],
"range": [
0,
39
]
}
],
"hasChanges": true,
"range": [
0,
39
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
5,
11
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
22,
23
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
34,
35
]
},
{
"category": "Identifier",
"patch": "replace",
"range": [
36,
37
]
}
],
"range": [
34,
37
]
}
],
"range": [
27,
38
]
}
],
"range": [
25,
40
]
}
],
"range": [
12,
40
]
}
],
"range": [
0,
41
]
}
],
"range": [
0,
42
]
}
],
"range": [
0,
42
]
}
],
"hasChanges": true,
"range": [
0,
42
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
39,
43
]
},
{
"category": "Identifier",
"range": [
44,
47
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
58,
59
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
70,
71
]
},
{
"category": "Identifier",
"range": [
72,
73
]
}
],
"range": [
70,
73
]
}
],
"range": [
63,
74
]
}
],
"range": [
61,
76
]
}
],
"range": [
48,
76
]
}
],
"range": [
39,
77
]
}
],
"range": [
39,
78
]
}
],
"range": [
39,
78
]
}
],
"hasChanges": false,
"range": [
39,
78
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
42,
46
]
},
{
"category": "Identifier",
"range": [
47,
50
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
61,
62
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
73,
74
]
},
{
"category": "Identifier",
"range": [
75,
76
]
}
],
"range": [
73,
76
]
}
],
"range": [
66,
77
]
}
],
"range": [
64,
79
]
}
],
"range": [
51,
79
]
}
],
"range": [
42,
80
]
}
],
"range": [
42,
81
]
}
],
"range": [
42,
81
]
}
],
"hasChanges": false,
"range": [
42,
81
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
78,
82
]
},
{
"category": "Identifier",
"range": [
83,
86
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
97,
98
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
109,
110
]
},
{
"category": "Identifier",
"range": [
111,
112
]
}
],
"range": [
109,
112
]
}
],
"range": [
102,
113
]
}
],
"range": [
100,
115
]
}
],
"range": [
87,
115
]
}
],
"range": [
78,
116
]
}
],
"range": [
78,
117
]
}
],
"range": [
78,
117
]
}
],
"hasChanges": false,
"range": [
78,
117
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
81,
85
]
},
{
"category": "Identifier",
"range": [
86,
89
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
100,
101
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
112,
113
]
},
{
"category": "Identifier",
"range": [
114,
115
]
}
],
"range": [
112,
115
]
}
],
"range": [
105,
116
]
}
],
"range": [
103,
118
]
}
],
"range": [
90,
118
]
}
],
"range": [
81,
119
]
}
],
"range": [
81,
120
]
}
],
"range": [
81,
120
]
}
],
"hasChanges": false,
"range": [
81,
120
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
117,
117
]
}
],
"hasChanges": false,
"range": [
117,
117
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
120,
120
]
}
],
"hasChanges": false,
"range": [
120,
120
],
"number": 4
}
]
],
"paths": [
"chained-callbacks.js",
"chained-callbacks.js"
],
"oids": [
"7390534322bff352014e45fdc8399881b290d5a2",
"acba744a8426d46dd1ef2f760336b6be5329b75b"
]
},
"filePaths": [
"chained-callbacks.js"
],
"sha1": "c81be05c887d473b37e697bd3116824a679aae51",
"gitDir": "test/corpus/repos/javascript",
"sha2": "ab6b402c2345565993955b535faec8fca7d16ce5"
}
,{
"testCaseDescription": "javascript-chained-callbacks-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
},
{
"category": "Identifier",
"range": [
5,
11
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
22,
23
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
34,
35
]
},
{
"category": "Identifier",
"range": [
36,
37
]
}
],
"range": [
34,
37
]
}
],
"range": [
27,
38
]
}
],
"range": [
25,
40
]
}
],
"range": [
12,
40
]
}
],
"range": [
0,
41
]
}
],
"patch": "delete",
"range": [
0,
42
]
}
],
"range": [
0,
42
]
}
],
"hasChanges": true,
"range": [
0,
42
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
42,
46
]
},
{
"category": "Identifier",
"range": [
47,
50
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
61,
62
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
73,
74
]
},
{
"category": "Identifier",
"range": [
75,
76
]
}
],
"range": [
73,
76
]
}
],
"range": [
66,
77
]
}
],
"range": [
64,
79
]
}
],
"range": [
51,
79
]
}
],
"range": [
42,
80
]
}
],
"patch": "delete",
"range": [
42,
81
]
}
],
"range": [
42,
81
]
}
],
"hasChanges": true,
"range": [
42,
81
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
81,
85
]
},
{
"category": "Identifier",
"range": [
86,
89
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
100,
101
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
112,
113
]
},
{
"category": "Identifier",
"range": [
114,
115
]
}
],
"range": [
112,
115
]
}
],
"range": [
105,
116
]
}
],
"range": [
103,
118
]
}
],
"range": [
90,
118
]
}
],
"range": [
81,
119
]
}
],
"range": [
81,
120
]
}
],
"range": [
81,
120
]
}
],
"hasChanges": false,
"range": [
81,
120
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
},
{
"category": "Identifier",
"range": [
5,
8
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
31,
32
]
},
{
"category": "Identifier",
"range": [
33,
34
]
}
],
"range": [
31,
34
]
}
],
"range": [
24,
35
]
}
],
"range": [
22,
37
]
}
],
"range": [
9,
37
]
}
],
"range": [
0,
38
]
}
],
"range": [
0,
39
]
}
],
"range": [
0,
39
]
}
],
"hasChanges": false,
"range": [
0,
39
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
39,
43
]
},
{
"category": "Identifier",
"range": [
44,
50
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
61,
62
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
73,
74
]
},
{
"category": "Identifier",
"range": [
75,
76
]
}
],
"range": [
73,
76
]
}
],
"range": [
66,
77
]
}
],
"range": [
64,
79
]
}
],
"range": [
51,
79
]
}
],
"range": [
39,
80
]
}
],
"patch": "insert",
"range": [
39,
81
]
}
],
"range": [
39,
81
]
}
],
"hasChanges": true,
"range": [
39,
81
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
120,
120
]
}
],
"hasChanges": false,
"range": [
120,
120
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
81,
81
]
}
],
"hasChanges": false,
"range": [
81,
81
],
"number": 3
}
]
],
"paths": [
"chained-callbacks.js",
"chained-callbacks.js"
],
"oids": [
"acba744a8426d46dd1ef2f760336b6be5329b75b",
"c4db4326d7f3f7ffe3d6ec61d9962c153c2d3d9e"
]
},
"filePaths": [
"chained-callbacks.js"
],
"sha1": "ab6b402c2345565993955b535faec8fca7d16ce5",
"gitDir": "test/corpus/repos/javascript",
"sha2": "04d2c7bacba3310adf21c44749b81a23187f33c8"
}
,{
"testCaseDescription": "javascript-chained-callbacks-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
},
{
"category": "Identifier",
"range": [
5,
8
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
31,
32
]
},
{
"category": "Identifier",
"range": [
33,
34
]
}
],
"range": [
31,
34
]
}
],
"range": [
24,
35
]
}
],
"range": [
22,
37
]
}
],
"range": [
9,
37
]
}
],
"range": [
0,
38
]
}
],
"patch": "delete",
"range": [
0,
39
]
}
],
"range": [
0,
39
]
}
],
"hasChanges": true,
"range": [
0,
39
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
39,
43
]
},
{
"category": "Identifier",
"range": [
44,
50
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
61,
62
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
73,
74
]
},
{
"category": "Identifier",
"range": [
75,
76
]
}
],
"range": [
73,
76
]
}
],
"range": [
66,
77
]
}
],
"range": [
64,
79
]
}
],
"range": [
51,
79
]
}
],
"range": [
39,
80
]
}
],
"range": [
39,
81
]
}
],
"range": [
39,
81
]
}
],
"hasChanges": false,
"range": [
39,
81
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
},
{
"category": "Identifier",
"range": [
5,
11
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
22,
23
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
34,
35
]
},
{
"category": "Identifier",
"range": [
36,
37
]
}
],
"range": [
34,
37
]
}
],
"range": [
27,
38
]
}
],
"range": [
25,
40
]
}
],
"range": [
12,
40
]
}
],
"range": [
0,
41
]
}
],
"range": [
0,
42
]
}
],
"range": [
0,
42
]
}
],
"hasChanges": false,
"range": [
0,
42
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
81,
81
]
}
],
"hasChanges": false,
"range": [
81,
81
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
42,
42
]
}
],
"hasChanges": false,
"range": [
42,
42
],
"number": 2
}
]
],
"paths": [
"chained-callbacks.js",
"chained-callbacks.js"
],
"oids": [
"c4db4326d7f3f7ffe3d6ec61d9962c153c2d3d9e",
"e593419889a5ac26f2f6d01ba83fe3c421f04feb"
]
},
"filePaths": [
"chained-callbacks.js"
],
"sha1": "04d2c7bacba3310adf21c44749b81a23187f33c8",
"gitDir": "test/corpus/repos/javascript",
"sha2": "23a13797cede3a3ced4891609a72b8ba8fc22540"
}
,{
"testCaseDescription": "javascript-chained-callbacks-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MethodCall",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
},
{
"category": "Identifier",
"range": [
5,
11
]
},
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
22,
23
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
34,
35
]
},
{
"category": "Identifier",
"range": [
36,
37
]
}
],
"range": [
34,
37
]
}
],
"range": [
27,
38
]
}
],
"range": [
25,
40
]
}
],
"range": [
12,
40
]
}
],
"range": [
0,
41
]
}
],
"range": [
0,
42
]
}
],
"patch": "delete",
"range": [
0,
42
]
}
],
"hasChanges": true,
"range": [
0,
42
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
42,
42
]
}
],
"hasChanges": true,
"range": [
42,
42
],
"number": 2
}
]
],
"paths": [
"chained-callbacks.js",
"chained-callbacks.js"
],
"oids": [
"e593419889a5ac26f2f6d01ba83fe3c421f04feb",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"chained-callbacks.js"
],
"sha1": "23a13797cede3a3ced4891609a72b8ba8fc22540",
"gitDir": "test/corpus/repos/javascript",
"sha2": "4269870b1b5cbac2c062f4081ad9f8f9c1d823be"
}]