mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
3061 lines
163 KiB
JSON
3061 lines
163 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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
|
|
"index e69de29..7421e18 100644",
|
|
"--- a/objects-with-methods.js",
|
|
"+++ b/objects-with-methods.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+{ add(a, b) { return a + b; } };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d85c24526768ef13d44a0e8cce5aefe270e43c4a..8eea4fae7706338a3f452fd4bd3055b37c97016a"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
|
|
"index 7421e18..59eb3a3 100644",
|
|
"--- a/objects-with-methods.js",
|
|
"+++ b/objects-with-methods.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+{ subtract(a, b) { return a - b; } };",
|
|
"+{ add(a, b) { return a + b; } };",
|
|
" { add(a, b) { return a + b; } };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "8eea4fae7706338a3f452fd4bd3055b37c97016a..6eff566d865d623bc9da78e1d3effc0e71359b64"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
|
|
"index 59eb3a3..05689b1 100644",
|
|
"--- a/objects-with-methods.js",
|
|
"+++ b/objects-with-methods.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-{ subtract(a, b) { return a - b; } };",
|
|
"+{ add(a, b) { return a + b; } };",
|
|
" { add(a, b) { return a + b; } };",
|
|
" { add(a, b) { return a + b; } };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "6eff566d865d623bc9da78e1d3effc0e71359b64..5e157004b3bbcf754390b5ea0b16a1293f239d41"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
|
|
"index 05689b1..59eb3a3 100644",
|
|
"--- a/objects-with-methods.js",
|
|
"+++ b/objects-with-methods.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-{ add(a, b) { return a + b; } };",
|
|
"+{ subtract(a, b) { return a - b; } };",
|
|
" { add(a, b) { return a + b; } };",
|
|
" { add(a, b) { return a + b; } };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "5e157004b3bbcf754390b5ea0b16a1293f239d41..c31bcd1e44f97b7db87ff2b5a6cf0406e0d9e081"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
|
|
"index 59eb3a3..29d3998 100644",
|
|
"--- a/objects-with-methods.js",
|
|
"+++ b/objects-with-methods.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-{ subtract(a, b) { return a - b; } };",
|
|
"-{ add(a, b) { return a + b; } };",
|
|
" { add(a, b) { return a + b; } };",
|
|
"+{ subtract(a, b) { return a - b; } };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "c31bcd1e44f97b7db87ff2b5a6cf0406e0d9e081..9224e4bb69acfd7cae9b2c42bef700ee0193975f"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
|
|
"index 29d3998..80ad7f0 100644",
|
|
"--- a/objects-with-methods.js",
|
|
"+++ b/objects-with-methods.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-{ add(a, b) { return a + b; } };",
|
|
" { subtract(a, b) { return a - b; } };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "9224e4bb69acfd7cae9b2c42bef700ee0193975f..09865379a4ced5df31bdfc3432abeeb525fa8b53"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
|
|
"index 80ad7f0..e69de29 100644",
|
|
"--- a/objects-with-methods.js",
|
|
"+++ b/objects-with-methods.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-{ subtract(a, b) { return a - b; } };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "09865379a4ced5df31bdfc3432abeeb525fa8b53..b4b7955f8a8306e856b260875bdf3039b29612a8"
|
|
}]
|