mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
3000 lines
160 KiB
JSON
3000 lines
160 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-objects-with-methods-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
25,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
2,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"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": [
|
|
"objects-with-methods.js",
|
|
"objects-with-methods.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"7421e188d46cf98be199f3d272591a65ddc29ef1"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"objects-with-methods.js"
|
|
],
|
|
"sha1": "a42e2c6e09096d6d19f1ba33c43843781aa3b67a",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "a693aad71238adcb4611fb97c18c310da92a3cf5"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-objects-with-methods-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
14,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
26,
|
|
27
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
19,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
2,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
37
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
38
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
38
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
43
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
44,
|
|
45
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
47,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
63,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
52,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
40,
|
|
67
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
38,
|
|
69
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
38,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
38,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
38,
|
|
71
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
25,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
2,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
76
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
77,
|
|
78
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
80,
|
|
81
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
92,
|
|
93
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
96,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
92,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
85,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
73,
|
|
100
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
71,
|
|
102
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
71,
|
|
103
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
71,
|
|
104
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
71,
|
|
104
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
33,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
33,
|
|
33
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
104,
|
|
104
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
104,
|
|
104
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"objects-with-methods.js",
|
|
"objects-with-methods.js"
|
|
],
|
|
"oids": [
|
|
"7421e188d46cf98be199f3d272591a65ddc29ef1",
|
|
"59eb3a3df5e42ec577cadd4b85d82b33ffd2c610"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"objects-with-methods.js"
|
|
],
|
|
"sha1": "a693aad71238adcb4611fb97c18c310da92a3cf5",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "1bf78cad8baff50d901ef180551f688304d04686"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-objects-with-methods-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
2,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
14,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
26,
|
|
27
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
19,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
2,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
37
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
38
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
38
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
25,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
2,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
43
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
44,
|
|
45
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
47,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
63,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
52,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
40,
|
|
67
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
38,
|
|
69
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
38,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
38,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
38,
|
|
71
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
35,
|
|
38
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
39,
|
|
40
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
42,
|
|
43
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
54,
|
|
55
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
58,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
54,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
47,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
33,
|
|
66
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
76
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
77,
|
|
78
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
80,
|
|
81
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
92,
|
|
93
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
96,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
92,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
85,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
73,
|
|
100
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
71,
|
|
102
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
71,
|
|
103
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
71,
|
|
104
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
71,
|
|
104
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
68,
|
|
71
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
72,
|
|
73
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
75,
|
|
76
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
87,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
91,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
87,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
80,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
68,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
66,
|
|
99
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
104,
|
|
104
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
104,
|
|
104
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
99,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
99,
|
|
99
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"objects-with-methods.js",
|
|
"objects-with-methods.js"
|
|
],
|
|
"oids": [
|
|
"59eb3a3df5e42ec577cadd4b85d82b33ffd2c610",
|
|
"05689b17622c4729be0642be57c9cfbe2abe692b"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"objects-with-methods.js"
|
|
],
|
|
"sha1": "1bf78cad8baff50d901ef180551f688304d04686",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "c0162b84107dc5d56d349ee52d5e6c858d5779e7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-objects-with-methods-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
25,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
2,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
2,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
14,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
26,
|
|
27
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
19,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
2,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
37
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
38
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
38
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
35,
|
|
38
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
39,
|
|
40
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
42,
|
|
43
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
54,
|
|
55
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
58,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
54,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
47,
|
|
60
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
62
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
33,
|
|
66
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
43
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
44,
|
|
45
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
47,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
63,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
52,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
40,
|
|
67
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
38,
|
|
69
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
38,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
38,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
38,
|
|
71
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
68,
|
|
71
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
72,
|
|
73
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
75,
|
|
76
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
87,
|
|
88
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
91,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
87,
|
|
92
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
80,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
68,
|
|
95
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
66,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
66,
|
|
99
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
76
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
77,
|
|
78
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
80,
|
|
81
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
92,
|
|
93
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
96,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
92,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
85,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
73,
|
|
100
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
71,
|
|
102
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
71,
|
|
103
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
71,
|
|
104
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
71,
|
|
104
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
99,
|
|
99
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
99,
|
|
99
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
104,
|
|
104
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
104,
|
|
104
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"objects-with-methods.js",
|
|
"objects-with-methods.js"
|
|
],
|
|
"oids": [
|
|
"05689b17622c4729be0642be57c9cfbe2abe692b",
|
|
"59eb3a3df5e42ec577cadd4b85d82b33ffd2c610"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"objects-with-methods.js"
|
|
],
|
|
"sha1": "c0162b84107dc5d56d349ee52d5e6c858d5779e7",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "82c5c742ff8e46274240cb96788b14dd73bc03ce"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-objects-with-methods-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
14,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
26,
|
|
27
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
19,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
2,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
37
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
38
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
38
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
40,
|
|
43
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
44,
|
|
45
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
47,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
63,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
52,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
40,
|
|
67
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
38,
|
|
69
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
38,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
38,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
38,
|
|
71
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
73,
|
|
76
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
77,
|
|
78
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
80,
|
|
81
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
92,
|
|
93
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
96,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
92,
|
|
97
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
85,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
73,
|
|
100
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
71,
|
|
102
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
71,
|
|
103
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
71,
|
|
104
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
71,
|
|
104
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
25,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
2,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
33
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
35,
|
|
43
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
44,
|
|
45
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
47,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
63,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
52,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
67
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
69
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
33,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
33,
|
|
71
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
104,
|
|
104
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
104,
|
|
104
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
71,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
71,
|
|
71
|
|
],
|
|
"number": 3
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"objects-with-methods.js",
|
|
"objects-with-methods.js"
|
|
],
|
|
"oids": [
|
|
"59eb3a3df5e42ec577cadd4b85d82b33ffd2c610",
|
|
"29d3998790b8e7722b7d1167dd0feb5e14f11be8"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"objects-with-methods.js"
|
|
],
|
|
"sha1": "82c5c742ff8e46274240cb96788b14dd73bc03ce",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "2fa575839ba74e5fac1aebf2eac8bee5be10b57c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-objects-with-methods-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
25,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
2,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"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": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
35,
|
|
43
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
44,
|
|
45
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
47,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
60
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
63,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
64
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
52,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
67
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
69
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
33,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
33,
|
|
71
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
14,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
26,
|
|
27
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
19,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
2,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
37
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
38
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
38
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
71,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
71,
|
|
71
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
38,
|
|
38
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
38,
|
|
38
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"objects-with-methods.js",
|
|
"objects-with-methods.js"
|
|
],
|
|
"oids": [
|
|
"29d3998790b8e7722b7d1167dd0feb5e14f11be8",
|
|
"80ad7f08d4faf3fc14918a3a60ce664a5e4a6700"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"objects-with-methods.js"
|
|
],
|
|
"sha1": "2fa575839ba74e5fac1aebf2eac8bee5be10b57c",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "abd180cb92f29a6e2976bb6bc9ca788445899361"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-objects-with-methods-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Object",
|
|
"children": [
|
|
{
|
|
"category": "Method",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
14,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "MathOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
26,
|
|
27
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
30,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
19,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
2,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
37
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
38
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
38
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
38,
|
|
38
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
38,
|
|
38
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"objects-with-methods.js",
|
|
"objects-with-methods.js"
|
|
],
|
|
"oids": [
|
|
"80ad7f08d4faf3fc14918a3a60ce664a5e4a6700",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"objects-with-methods.js"
|
|
],
|
|
"sha1": "abd180cb92f29a6e2976bb6bc9ca788445899361",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "e55084610bb027669752f92bfa387ea010b65bbe"
|
|
}]
|