2016-10-28 04:46:12 +03:00
|
|
|
[{
|
|
|
|
"testCaseDescription": "javascript-identifier-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
6
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"identifier.js",
|
|
|
|
"identifier.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
|
|
"1cf4ad05ef284fd6411546e5ddfb1938c9151cb1"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"identifier.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/identifier.js b/identifier.js",
|
|
|
|
"index e69de29..1cf4ad0 100644",
|
|
|
|
"--- a/identifier.js",
|
|
|
|
"+++ b/identifier.js",
|
|
|
|
"@@ -0,0 +1 @@",
|
|
|
|
"+theVar;"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "1b8151602239d34159506d5d6e55de712e8c0d10..b4bc6d6ee5fd674fc9dbc5880f2734283a79c445"
|
2016-10-28 04:46:12 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-identifier-replacement-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
6
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
24
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
24
|
|
|
|
],
|
|
|
|
"number": 4
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"identifier.js",
|
|
|
|
"identifier.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"1cf4ad05ef284fd6411546e5ddfb1938c9151cb1",
|
|
|
|
"888855ad41100937e0019b87e0a81fb922b040b7"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"identifier.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/identifier.js b/identifier.js",
|
|
|
|
"index 1cf4ad0..888855a 100644",
|
|
|
|
"--- a/identifier.js",
|
|
|
|
"+++ b/identifier.js",
|
|
|
|
"@@ -1 +1,3 @@",
|
|
|
|
"+theVar2",
|
|
|
|
"+theVar;",
|
|
|
|
" theVar;"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "b4bc6d6ee5fd674fc9dbc5880f2734283a79c445..65c8ab30e080fc1e8a7a78a09d9a65ff4d70243d"
|
2016-10-28 04:46:12 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-identifier-delete-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
6
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
24
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
24
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
24
|
|
|
|
],
|
|
|
|
"number": 4
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
24
|
|
|
|
],
|
|
|
|
"number": 4
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"identifier.js",
|
|
|
|
"identifier.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"888855ad41100937e0019b87e0a81fb922b040b7",
|
|
|
|
"60e041c1f5c995232ea415ada7796a8fc59cf50a"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"identifier.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/identifier.js b/identifier.js",
|
|
|
|
"index 888855a..60e041c 100644",
|
|
|
|
"--- a/identifier.js",
|
|
|
|
"+++ b/identifier.js",
|
|
|
|
"@@ -1,3 +1,3 @@",
|
|
|
|
"-theVar2",
|
|
|
|
"+theVar;",
|
|
|
|
" theVar;",
|
|
|
|
" theVar;"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "65c8ab30e080fc1e8a7a78a09d9a65ff4d70243d..df5af19f39fbf09f64f8cf679e07b2b1020fbe28"
|
2016-10-28 04:46:12 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-identifier-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
6
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
24
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
24
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
24
|
|
|
|
],
|
|
|
|
"number": 4
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
24
|
|
|
|
],
|
|
|
|
"number": 4
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"identifier.js",
|
|
|
|
"identifier.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"60e041c1f5c995232ea415ada7796a8fc59cf50a",
|
|
|
|
"888855ad41100937e0019b87e0a81fb922b040b7"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"identifier.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/identifier.js b/identifier.js",
|
|
|
|
"index 60e041c..888855a 100644",
|
|
|
|
"--- a/identifier.js",
|
|
|
|
"+++ b/identifier.js",
|
|
|
|
"@@ -1,3 +1,3 @@",
|
|
|
|
"-theVar;",
|
|
|
|
"+theVar2",
|
|
|
|
" theVar;",
|
|
|
|
" theVar;"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "df5af19f39fbf09f64f8cf679e07b2b1020fbe28..935bdc032c3cacf8565bd269fa6c7f525c9a83b7"
|
2016-10-28 04:46:12 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-identifier-delete-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
24
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
6
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
24
|
|
|
|
],
|
|
|
|
"number": 4
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
16
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
16
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"identifier.js",
|
|
|
|
"identifier.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"888855ad41100937e0019b87e0a81fb922b040b7",
|
|
|
|
"fbc7b28e28030a5474633484e56cfb97fbba5102"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"identifier.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/identifier.js b/identifier.js",
|
|
|
|
"index 888855a..fbc7b28 100644",
|
|
|
|
"--- a/identifier.js",
|
|
|
|
"+++ b/identifier.js",
|
|
|
|
"@@ -1,3 +1,2 @@",
|
|
|
|
"-theVar2",
|
|
|
|
"-theVar;",
|
|
|
|
" theVar;",
|
|
|
|
"+theVar2"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "935bdc032c3cacf8565bd269fa6c7f525c9a83b7..99a3a4e1f2f45b9d0bd677e3252572fbdd77b297"
|
2016-10-28 04:46:12 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-identifier-delete-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
6
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
16
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
16
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
16,
|
|
|
|
16
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"identifier.js",
|
|
|
|
"identifier.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"fbc7b28e28030a5474633484e56cfb97fbba5102",
|
|
|
|
"7276d95d4675eba989693d641b606c19e5c1e6ba"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"identifier.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/identifier.js b/identifier.js",
|
|
|
|
"index fbc7b28..7276d95 100644",
|
|
|
|
"--- a/identifier.js",
|
|
|
|
"+++ b/identifier.js",
|
|
|
|
"@@ -1,2 +1 @@",
|
|
|
|
"-theVar;",
|
|
|
|
" theVar2"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "99a3a4e1f2f45b9d0bd677e3252572fbdd77b297..433e03b741975ca0b158e12ddd46c4ade00bf61d"
|
2016-10-28 04:46:12 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-identifier-delete-rest-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
8,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"identifier.js",
|
|
|
|
"identifier.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"7276d95d4675eba989693d641b606c19e5c1e6ba",
|
|
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"identifier.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/identifier.js b/identifier.js",
|
|
|
|
"index 7276d95..e69de29 100644",
|
|
|
|
"--- a/identifier.js",
|
|
|
|
"+++ b/identifier.js",
|
|
|
|
"@@ -1 +0,0 @@",
|
|
|
|
"-theVar2"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "433e03b741975ca0b158e12ddd46c4ade00bf61d..de56bb89881ee1f97c710b8447f22a479a373692"
|
2016-10-28 04:46:12 +03:00
|
|
|
}]
|