mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
1805 lines
71 KiB
JSON
1805 lines
71 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-boolean-operator-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"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": [
|
|
"boolean-operator.js",
|
|
"boolean-operator.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"7280a98cdd0353c1bb7e03770613ae709bcb2cf5"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"boolean-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/boolean-operator.js b/boolean-operator.js",
|
|
"index e69de29..7280a98 100644",
|
|
"--- a/boolean-operator.js",
|
|
"+++ b/boolean-operator.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+i || j;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "b0194f4ccae027de9b6fbbc4ceefe070cf51555c..c8ce4905edb0321dfaf25203714eda8d05133dc0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-boolean-operator-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
8
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"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": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
8
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
16,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"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": [
|
|
"boolean-operator.js",
|
|
"boolean-operator.js"
|
|
],
|
|
"oids": [
|
|
"7280a98cdd0353c1bb7e03770613ae709bcb2cf5",
|
|
"fe3f30646b4683f9a0bf94b7464d5dd0a9b216d5"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"boolean-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/boolean-operator.js b/boolean-operator.js",
|
|
"index 7280a98..fe3f306 100644",
|
|
"--- a/boolean-operator.js",
|
|
"+++ b/boolean-operator.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+i && j;",
|
|
"+i || j;",
|
|
" i || j;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "c8ce4905edb0321dfaf25203714eda8d05133dc0..018d110adadddb7b94c0c87869f4ef32d9f38bc8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-boolean-operator-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
8
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
8
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
8,
|
|
16
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
8,
|
|
16
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
16,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
16,
|
|
24
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
16,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"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": [
|
|
"boolean-operator.js",
|
|
"boolean-operator.js"
|
|
],
|
|
"oids": [
|
|
"fe3f30646b4683f9a0bf94b7464d5dd0a9b216d5",
|
|
"273c0ee8f4c5684f46f62e9bc61a9b937fd42da6"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"boolean-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/boolean-operator.js b/boolean-operator.js",
|
|
"index fe3f306..273c0ee 100644",
|
|
"--- a/boolean-operator.js",
|
|
"+++ b/boolean-operator.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-i && j;",
|
|
"+i || j;",
|
|
" i || j;",
|
|
" i || j;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "018d110adadddb7b94c0c87869f4ef32d9f38bc8..a6577b774ffd0e26986c4e60b951efb7b2680f5c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-boolean-operator-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
8
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
8
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
8,
|
|
16
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
8,
|
|
16
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
16,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
16,
|
|
24
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
16,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"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": [
|
|
"boolean-operator.js",
|
|
"boolean-operator.js"
|
|
],
|
|
"oids": [
|
|
"273c0ee8f4c5684f46f62e9bc61a9b937fd42da6",
|
|
"fe3f30646b4683f9a0bf94b7464d5dd0a9b216d5"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"boolean-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/boolean-operator.js b/boolean-operator.js",
|
|
"index 273c0ee..fe3f306 100644",
|
|
"--- a/boolean-operator.js",
|
|
"+++ b/boolean-operator.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-i || j;",
|
|
"+i && j;",
|
|
" i || j;",
|
|
" i || j;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "a6577b774ffd0e26986c4e60b951efb7b2680f5c..742092b6c51172647d7fae976b8b8a5f90842bcc"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-boolean-operator-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"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": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
8,
|
|
16
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
8
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
8
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
16,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
16,
|
|
24
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"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": [
|
|
"boolean-operator.js",
|
|
"boolean-operator.js"
|
|
],
|
|
"oids": [
|
|
"fe3f30646b4683f9a0bf94b7464d5dd0a9b216d5",
|
|
"7f4873c126dd7633b40d7d706254e05fdf4fa703"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"boolean-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/boolean-operator.js b/boolean-operator.js",
|
|
"index fe3f306..7f4873c 100644",
|
|
"--- a/boolean-operator.js",
|
|
"+++ b/boolean-operator.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-i && j;",
|
|
"-i || j;",
|
|
" i || j;",
|
|
"+i && j;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "742092b6c51172647d7fae976b8b8a5f90842bcc..2d12e99c24f6e12742ce6c4456d2ee36b8506d95"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-boolean-operator-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"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": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
8,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
8,
|
|
16
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"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": [
|
|
"boolean-operator.js",
|
|
"boolean-operator.js"
|
|
],
|
|
"oids": [
|
|
"7f4873c126dd7633b40d7d706254e05fdf4fa703",
|
|
"c6921d12a6f183c99b1d8107b16f6f428d133af8"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"boolean-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/boolean-operator.js b/boolean-operator.js",
|
|
"index 7f4873c..c6921d1 100644",
|
|
"--- a/boolean-operator.js",
|
|
"+++ b/boolean-operator.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-i || j;",
|
|
" i && j;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "2d12e99c24f6e12742ce6c4456d2ee36b8506d95..c5a063d347caaa73b7d767f02acda08a144928c0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-boolean-operator-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "BooleanOperator",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"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": [
|
|
"boolean-operator.js",
|
|
"boolean-operator.js"
|
|
],
|
|
"oids": [
|
|
"c6921d12a6f183c99b1d8107b16f6f428d133af8",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"boolean-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/boolean-operator.js b/boolean-operator.js",
|
|
"index c6921d1..e69de29 100644",
|
|
"--- a/boolean-operator.js",
|
|
"+++ b/boolean-operator.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-i && j;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "c5a063d347caaa73b7d767f02acda08a144928c0..94fca5fc215c9c7199b86ef4da0ad543ca630b92"
|
|
}]
|