mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
2830 lines
147 KiB
JSON
2830 lines
147 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-anonymous-function-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
23,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
27,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
32
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "insert",
|
|
"range": [
|
|
32,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
32,
|
|
32
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-function.js",
|
|
"anonymous-function.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"b59286814d33474a8667383c72b79e078a5136a8"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"sha1": "56f451956d623f7bbf419f7ccf5256129744c435",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "7ffd09d764198dd8589758397db695c5f35edcab"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-function-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
23,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
27,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
32
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
41,
|
|
42
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
55,
|
|
56
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
61
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
46,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
32,
|
|
64
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
23,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
27,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
32
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
74
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
75,
|
|
76
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
87,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
91,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
87,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
80,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
78,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
64,
|
|
96
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
32,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
32,
|
|
32
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
96,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
96,
|
|
96
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-function.js",
|
|
"anonymous-function.js"
|
|
],
|
|
"oids": [
|
|
"b59286814d33474a8667383c72b79e078a5136a8",
|
|
"e1de356cc2db59253a7d991cd857caaf3c1cf4ef"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"sha1": "7ffd09d764198dd8589758397db695c5f35edcab",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "391d90206d94569af0867f2bb3ce6e8288f36bdc"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-function-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
23,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
27,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
32
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
23,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
27,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
32
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
41,
|
|
42
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
55,
|
|
56
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
61
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
46,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
32,
|
|
64
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
41,
|
|
42
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
55,
|
|
56
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
61
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
46,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
32,
|
|
64
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
74
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
75,
|
|
76
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
87,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
91,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
87,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
80,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
78,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
64,
|
|
96
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
74
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
75,
|
|
76
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
87,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
91,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
87,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
80,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
78,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
64,
|
|
96
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
96,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
96,
|
|
96
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
96,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
96,
|
|
96
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-function.js",
|
|
"anonymous-function.js"
|
|
],
|
|
"oids": [
|
|
"e1de356cc2db59253a7d991cd857caaf3c1cf4ef",
|
|
"4ca0d4c7ab996e35752d0a7ebdc0b51818e38c89"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"sha1": "391d90206d94569af0867f2bb3ce6e8288f36bdc",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "5ae8246a527fb7f11fce74d33d438a29287a7259"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-function-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
23,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
27,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
32
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
23,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
27,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
32
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
41,
|
|
42
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
55,
|
|
56
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
61
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
46,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
32,
|
|
64
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
41,
|
|
42
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
55,
|
|
56
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
61
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
46,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
32,
|
|
64
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
74
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
75,
|
|
76
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
87,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
91,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
87,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
80,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
78,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
64,
|
|
96
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
74
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
75,
|
|
76
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
87,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
91,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
87,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
80,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
78,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
64,
|
|
96
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
96,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
96,
|
|
96
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
96,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
96,
|
|
96
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-function.js",
|
|
"anonymous-function.js"
|
|
],
|
|
"oids": [
|
|
"4ca0d4c7ab996e35752d0a7ebdc0b51818e38c89",
|
|
"e1de356cc2db59253a7d991cd857caaf3c1cf4ef"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"sha1": "5ae8246a527fb7f11fce74d33d438a29287a7259",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "6d6afa1a1dcb3043eeccce7acb53db62b9af99b1"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-function-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
23,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
27,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
32
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
41,
|
|
42
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
55,
|
|
56
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
61
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
46,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
32,
|
|
64
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
74
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
75,
|
|
76
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
87,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
91,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
87,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
80,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
78,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
64,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
64,
|
|
96
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
23,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
27,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
32
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
41,
|
|
42
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
55,
|
|
56
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
61
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
46,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
32,
|
|
64
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
96,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
96,
|
|
96
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
64,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
64,
|
|
64
|
|
],
|
|
"number": 3
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-function.js",
|
|
"anonymous-function.js"
|
|
],
|
|
"oids": [
|
|
"e1de356cc2db59253a7d991cd857caaf3c1cf4ef",
|
|
"afdaccf774a09485c39a606dc0e0ca185e90aff0"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"sha1": "6d6afa1a1dcb3043eeccce7acb53db62b9af99b1",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "ce885118c53e5897f2341f8fe94ddfe9eca3b12a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-function-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
23,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
27,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
32
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
41,
|
|
42
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
55,
|
|
56
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
61
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
46,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
63
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
32,
|
|
64
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
23,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
27,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
32
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
64,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
64,
|
|
64
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
32,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
32,
|
|
32
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-function.js",
|
|
"anonymous-function.js"
|
|
],
|
|
"oids": [
|
|
"afdaccf774a09485c39a606dc0e0ca185e90aff0",
|
|
"9f1856f5c7c35a7866a562e85a98af16aee083dc"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"sha1": "ce885118c53e5897f2341f8fe94ddfe9eca3b12a",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "7aa4613a3b75599020fbe97f7d034ec017d7fe9a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-function-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
23,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
27,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
32
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
32,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
32,
|
|
32
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-function.js",
|
|
"anonymous-function.js"
|
|
],
|
|
"oids": [
|
|
"9f1856f5c7c35a7866a562e85a98af16aee083dc",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"sha1": "7aa4613a3b75599020fbe97f7d034ec017d7fe9a",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "34d4921cff813bbebcbe79e2eedbc09046af6148"
|
|
}]
|