mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
2229 lines
99 KiB
JSON
2229 lines
99 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-member-access-assignment-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
9
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "insert",
|
|
"range": [
|
|
9,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
9,
|
|
9
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access-assignment.js",
|
|
"member-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"7a99e3099456e71f6d44eae1634a02873cf08445"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access-assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access-assignment.js b/member-access-assignment.js",
|
|
"index e69de29..7a99e30 100644",
|
|
"--- a/member-access-assignment.js",
|
|
"+++ b/member-access-assignment.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+y.x = 0;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "30a517ace94526eae9f09618d7cc587cdbb96c25..8d4dfc6dee6848d963a1ae274414a21efda49931"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-member-access-assignment-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
9
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
15,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
9,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
18
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
9,
|
|
18
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
9
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
20,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
24,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
18,
|
|
27
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
9,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
9,
|
|
9
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
27,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
27,
|
|
27
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access-assignment.js",
|
|
"member-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"7a99e3099456e71f6d44eae1634a02873cf08445",
|
|
"32040068931708fb0b9512d6957fc4b1eb61238c"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access-assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access-assignment.js b/member-access-assignment.js",
|
|
"index 7a99e30..3204006 100644",
|
|
"--- a/member-access-assignment.js",
|
|
"+++ b/member-access-assignment.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+y.x = 1;",
|
|
"+y.x = 0;",
|
|
" y.x = 0;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "8d4dfc6dee6848d963a1ae274414a21efda49931..85fb25af4dc9beca3e862fec80f2212cb67e51a8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-member-access-assignment-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
9
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
9
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
15,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
18
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
9,
|
|
18
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
15,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
18
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
9,
|
|
18
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
20,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
24,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
18,
|
|
27
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
20,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
24,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
18,
|
|
27
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
27,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
27,
|
|
27
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
27,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
27,
|
|
27
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access-assignment.js",
|
|
"member-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"32040068931708fb0b9512d6957fc4b1eb61238c",
|
|
"94893a32f203ac706838c159344b8ab9085db17d"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access-assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access-assignment.js b/member-access-assignment.js",
|
|
"index 3204006..94893a3 100644",
|
|
"--- a/member-access-assignment.js",
|
|
"+++ b/member-access-assignment.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-y.x = 1;",
|
|
"+y.x = 0;",
|
|
" y.x = 0;",
|
|
" y.x = 0;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "85fb25af4dc9beca3e862fec80f2212cb67e51a8..20e1b9fe5bd2d81f12abfc191d986ef7fcc86401"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-member-access-assignment-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
9
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
9
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
15,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
18
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
9,
|
|
18
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
15,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
18
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
9,
|
|
18
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
20,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
24,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
18,
|
|
27
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
20,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
24,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
18,
|
|
27
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
27,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
27,
|
|
27
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
27,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
27,
|
|
27
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access-assignment.js",
|
|
"member-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"94893a32f203ac706838c159344b8ab9085db17d",
|
|
"32040068931708fb0b9512d6957fc4b1eb61238c"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access-assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access-assignment.js b/member-access-assignment.js",
|
|
"index 94893a3..3204006 100644",
|
|
"--- a/member-access-assignment.js",
|
|
"+++ b/member-access-assignment.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-y.x = 0;",
|
|
"+y.x = 1;",
|
|
" y.x = 0;",
|
|
" y.x = 0;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "20e1b9fe5bd2d81f12abfc191d986ef7fcc86401..0a32ed61310da85bb560f6fe0466714dfb0623f5"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-member-access-assignment-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
9
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
15,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
9,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
18
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
9,
|
|
18
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
20,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
24,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
18,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
18,
|
|
27
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
9
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
15,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
9,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
18
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
9,
|
|
18
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
27,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
27,
|
|
27
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
18,
|
|
18
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
18,
|
|
18
|
|
],
|
|
"number": 3
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access-assignment.js",
|
|
"member-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"32040068931708fb0b9512d6957fc4b1eb61238c",
|
|
"8d78a24f4a6b385148718b33a24742123a8c413a"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access-assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access-assignment.js b/member-access-assignment.js",
|
|
"index 3204006..8d78a24 100644",
|
|
"--- a/member-access-assignment.js",
|
|
"+++ b/member-access-assignment.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-y.x = 1;",
|
|
"-y.x = 0;",
|
|
" y.x = 0;",
|
|
"+y.x = 1;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "0a32ed61310da85bb560f6fe0466714dfb0623f5..8906b689174ac6fdae79acf100face3eb283fadd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-member-access-assignment-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
9
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
15,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
9,
|
|
18
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
9,
|
|
18
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
9
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
18,
|
|
18
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
18,
|
|
18
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
9,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
9,
|
|
9
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access-assignment.js",
|
|
"member-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"8d78a24f4a6b385148718b33a24742123a8c413a",
|
|
"799018d077c34569268d97d29864cda54c49aa23"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access-assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access-assignment.js b/member-access-assignment.js",
|
|
"index 8d78a24..799018d 100644",
|
|
"--- a/member-access-assignment.js",
|
|
"+++ b/member-access-assignment.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-y.x = 0;",
|
|
" y.x = 1;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "8906b689174ac6fdae79acf100face3eb283fadd..6b8df6e5c3cb67d6c14497e03fbc3f2fbb850f95"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-member-access-assignment-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
9
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
9,
|
|
9
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
9,
|
|
9
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access-assignment.js",
|
|
"member-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"799018d077c34569268d97d29864cda54c49aa23",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access-assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access-assignment.js b/member-access-assignment.js",
|
|
"index 799018d..e69de29 100644",
|
|
"--- a/member-access-assignment.js",
|
|
"+++ b/member-access-assignment.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-y.x = 1;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "6b8df6e5c3cb67d6c14497e03fbc3f2fbb850f95..6a942b8c8b6674795040d75810b847dd6dbf37e4"
|
|
}]
|