1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
semantic/test/corpus/json/javascript/math-operator.json
2016-11-03 15:41:59 -07:00

3065 lines
157 KiB
JSON

[{
"testCaseDescription": "javascript-math-operator-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "NumberLiteral",
"range": [
8,
9
]
}
],
"range": [
4,
9
]
}
],
"range": [
0,
9
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
12,
13
]
},
{
"category": "NumberLiteral",
"range": [
16,
17
]
}
],
"range": [
12,
17
]
}
],
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"patch": "insert",
"range": [
0,
19
]
}
],
"hasChanges": true,
"range": [
0,
19
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
19,
19
]
}
],
"hasChanges": true,
"range": [
19,
19
],
"number": 2
}
]
],
"paths": [
"math-operator.js",
"math-operator.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"034466776814285bcd24cd966033449721d6e89b"
]
},
"filePaths": [
"math-operator.js"
],
"patch": [
"diff --git a/math-operator.js b/math-operator.js",
"index e69de29..0344667 100644",
"--- a/math-operator.js",
"+++ b/math-operator.js",
"@@ -0,0 +1 @@",
"+i + j * 3 - j % 5;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "349ec3f8639b7b854f6fcfdaaf8e2ef63c05fef7..c10213a914cc4c581935c845587b1615f782b23d"
}
,{
"testCaseDescription": "javascript-math-operator-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "NumberLiteral",
"range": [
8,
9
]
}
],
"range": [
4,
9
]
}
],
"range": [
0,
9
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
12,
13
]
},
{
"category": "NumberLiteral",
"range": [
16,
17
]
}
],
"range": [
12,
17
]
}
],
"range": [
0,
17
]
}
],
"patch": "insert",
"range": [
0,
18
]
}
],
"range": [
0,
19
]
}
],
"hasChanges": true,
"range": [
0,
19
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
23,
24
]
},
{
"category": "NumberLiteral",
"range": [
27,
28
]
}
],
"range": [
23,
28
]
}
],
"range": [
19,
28
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
31,
32
]
},
{
"category": "NumberLiteral",
"range": [
35,
36
]
}
],
"range": [
31,
36
]
}
],
"range": [
19,
36
]
}
],
"patch": "insert",
"range": [
19,
37
]
}
],
"range": [
19,
38
]
}
],
"hasChanges": true,
"range": [
19,
38
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "NumberLiteral",
"range": [
8,
9
]
}
],
"range": [
4,
9
]
}
],
"range": [
0,
9
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
12,
13
]
},
{
"category": "NumberLiteral",
"range": [
16,
17
]
}
],
"range": [
12,
17
]
}
],
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"range": [
0,
19
]
}
],
"hasChanges": false,
"range": [
0,
19
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
38,
39
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "NumberLiteral",
"range": [
46,
47
]
}
],
"range": [
42,
47
]
}
],
"range": [
38,
47
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
50,
51
]
},
{
"category": "NumberLiteral",
"range": [
54,
55
]
}
],
"range": [
50,
55
]
}
],
"range": [
38,
55
]
}
],
"range": [
38,
56
]
}
],
"range": [
38,
57
]
}
],
"hasChanges": false,
"range": [
38,
57
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
19,
19
]
}
],
"hasChanges": false,
"range": [
19,
19
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
57,
57
]
}
],
"hasChanges": false,
"range": [
57,
57
],
"number": 4
}
]
],
"paths": [
"math-operator.js",
"math-operator.js"
],
"oids": [
"034466776814285bcd24cd966033449721d6e89b",
"79f5f20cab835046e300f62aca0465b308b06b3f"
]
},
"filePaths": [
"math-operator.js"
],
"patch": [
"diff --git a/math-operator.js b/math-operator.js",
"index 0344667..79f5f20 100644",
"--- a/math-operator.js",
"+++ b/math-operator.js",
"@@ -1 +1,3 @@",
"+i + j * 2 - j % 4;",
"+i + j * 3 - j % 5;",
" i + j * 3 - j % 5;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "c10213a914cc4c581935c845587b1615f782b23d..8d0e873b6e585bc5d038b3597e50375979bab9d7"
}
,{
"testCaseDescription": "javascript-math-operator-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
8,
9
]
}
],
"range": [
4,
9
]
}
],
"range": [
0,
9
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
12,
13
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
16,
17
]
}
],
"range": [
12,
17
]
}
],
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"range": [
0,
19
]
}
],
"hasChanges": true,
"range": [
0,
19
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
8,
9
]
}
],
"range": [
4,
9
]
}
],
"range": [
0,
9
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
12,
13
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
16,
17
]
}
],
"range": [
12,
17
]
}
],
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"range": [
0,
19
]
}
],
"hasChanges": true,
"range": [
0,
19
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
23,
24
]
},
{
"category": "NumberLiteral",
"range": [
27,
28
]
}
],
"range": [
23,
28
]
}
],
"range": [
19,
28
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
31,
32
]
},
{
"category": "NumberLiteral",
"range": [
35,
36
]
}
],
"range": [
31,
36
]
}
],
"range": [
19,
36
]
}
],
"range": [
19,
37
]
}
],
"range": [
19,
38
]
}
],
"hasChanges": false,
"range": [
19,
38
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
23,
24
]
},
{
"category": "NumberLiteral",
"range": [
27,
28
]
}
],
"range": [
23,
28
]
}
],
"range": [
19,
28
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
31,
32
]
},
{
"category": "NumberLiteral",
"range": [
35,
36
]
}
],
"range": [
31,
36
]
}
],
"range": [
19,
36
]
}
],
"range": [
19,
37
]
}
],
"range": [
19,
38
]
}
],
"hasChanges": false,
"range": [
19,
38
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
38,
39
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "NumberLiteral",
"range": [
46,
47
]
}
],
"range": [
42,
47
]
}
],
"range": [
38,
47
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
50,
51
]
},
{
"category": "NumberLiteral",
"range": [
54,
55
]
}
],
"range": [
50,
55
]
}
],
"range": [
38,
55
]
}
],
"range": [
38,
56
]
}
],
"range": [
38,
57
]
}
],
"hasChanges": false,
"range": [
38,
57
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
38,
39
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "NumberLiteral",
"range": [
46,
47
]
}
],
"range": [
42,
47
]
}
],
"range": [
38,
47
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
50,
51
]
},
{
"category": "NumberLiteral",
"range": [
54,
55
]
}
],
"range": [
50,
55
]
}
],
"range": [
38,
55
]
}
],
"range": [
38,
56
]
}
],
"range": [
38,
57
]
}
],
"hasChanges": false,
"range": [
38,
57
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
57,
57
]
}
],
"hasChanges": false,
"range": [
57,
57
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
57,
57
]
}
],
"hasChanges": false,
"range": [
57,
57
],
"number": 4
}
]
],
"paths": [
"math-operator.js",
"math-operator.js"
],
"oids": [
"79f5f20cab835046e300f62aca0465b308b06b3f",
"284561c5dce063cf9773c88b0d61138440ef0ecb"
]
},
"filePaths": [
"math-operator.js"
],
"patch": [
"diff --git a/math-operator.js b/math-operator.js",
"index 79f5f20..284561c 100644",
"--- a/math-operator.js",
"+++ b/math-operator.js",
"@@ -1,3 +1,3 @@",
"-i + j * 2 - j % 4;",
"+i + j * 3 - j % 5;",
" i + j * 3 - j % 5;",
" i + j * 3 - j % 5;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "8d0e873b6e585bc5d038b3597e50375979bab9d7..410a2f6f9d81e855cad2997c46445446d9a969d3"
}
,{
"testCaseDescription": "javascript-math-operator-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
8,
9
]
}
],
"range": [
4,
9
]
}
],
"range": [
0,
9
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
12,
13
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
16,
17
]
}
],
"range": [
12,
17
]
}
],
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"range": [
0,
19
]
}
],
"hasChanges": true,
"range": [
0,
19
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
8,
9
]
}
],
"range": [
4,
9
]
}
],
"range": [
0,
9
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
12,
13
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
16,
17
]
}
],
"range": [
12,
17
]
}
],
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"range": [
0,
19
]
}
],
"hasChanges": true,
"range": [
0,
19
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
23,
24
]
},
{
"category": "NumberLiteral",
"range": [
27,
28
]
}
],
"range": [
23,
28
]
}
],
"range": [
19,
28
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
31,
32
]
},
{
"category": "NumberLiteral",
"range": [
35,
36
]
}
],
"range": [
31,
36
]
}
],
"range": [
19,
36
]
}
],
"range": [
19,
37
]
}
],
"range": [
19,
38
]
}
],
"hasChanges": false,
"range": [
19,
38
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
23,
24
]
},
{
"category": "NumberLiteral",
"range": [
27,
28
]
}
],
"range": [
23,
28
]
}
],
"range": [
19,
28
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
31,
32
]
},
{
"category": "NumberLiteral",
"range": [
35,
36
]
}
],
"range": [
31,
36
]
}
],
"range": [
19,
36
]
}
],
"range": [
19,
37
]
}
],
"range": [
19,
38
]
}
],
"hasChanges": false,
"range": [
19,
38
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
38,
39
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "NumberLiteral",
"range": [
46,
47
]
}
],
"range": [
42,
47
]
}
],
"range": [
38,
47
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
50,
51
]
},
{
"category": "NumberLiteral",
"range": [
54,
55
]
}
],
"range": [
50,
55
]
}
],
"range": [
38,
55
]
}
],
"range": [
38,
56
]
}
],
"range": [
38,
57
]
}
],
"hasChanges": false,
"range": [
38,
57
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
38,
39
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "NumberLiteral",
"range": [
46,
47
]
}
],
"range": [
42,
47
]
}
],
"range": [
38,
47
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
50,
51
]
},
{
"category": "NumberLiteral",
"range": [
54,
55
]
}
],
"range": [
50,
55
]
}
],
"range": [
38,
55
]
}
],
"range": [
38,
56
]
}
],
"range": [
38,
57
]
}
],
"hasChanges": false,
"range": [
38,
57
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
57,
57
]
}
],
"hasChanges": false,
"range": [
57,
57
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
57,
57
]
}
],
"hasChanges": false,
"range": [
57,
57
],
"number": 4
}
]
],
"paths": [
"math-operator.js",
"math-operator.js"
],
"oids": [
"284561c5dce063cf9773c88b0d61138440ef0ecb",
"79f5f20cab835046e300f62aca0465b308b06b3f"
]
},
"filePaths": [
"math-operator.js"
],
"patch": [
"diff --git a/math-operator.js b/math-operator.js",
"index 284561c..79f5f20 100644",
"--- a/math-operator.js",
"+++ b/math-operator.js",
"@@ -1,3 +1,3 @@",
"-i + j * 3 - j % 5;",
"+i + j * 2 - j % 4;",
" i + j * 3 - j % 5;",
" i + j * 3 - j % 5;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "410a2f6f9d81e855cad2997c46445446d9a969d3..2682d71eb0c050080c252a74b5086466a18fbeac"
}
,{
"testCaseDescription": "javascript-math-operator-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "NumberLiteral",
"range": [
8,
9
]
}
],
"range": [
4,
9
]
}
],
"range": [
0,
9
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
12,
13
]
},
{
"category": "NumberLiteral",
"range": [
16,
17
]
}
],
"range": [
12,
17
]
}
],
"range": [
0,
17
]
}
],
"patch": "delete",
"range": [
0,
18
]
}
],
"range": [
0,
19
]
}
],
"hasChanges": true,
"range": [
0,
19
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
23,
24
]
},
{
"category": "NumberLiteral",
"range": [
27,
28
]
}
],
"range": [
23,
28
]
}
],
"range": [
19,
28
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
31,
32
]
},
{
"category": "NumberLiteral",
"range": [
35,
36
]
}
],
"range": [
31,
36
]
}
],
"range": [
19,
36
]
}
],
"patch": "delete",
"range": [
19,
37
]
}
],
"range": [
19,
38
]
}
],
"hasChanges": true,
"range": [
19,
38
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
38,
39
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "NumberLiteral",
"range": [
46,
47
]
}
],
"range": [
42,
47
]
}
],
"range": [
38,
47
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
50,
51
]
},
{
"category": "NumberLiteral",
"range": [
54,
55
]
}
],
"range": [
50,
55
]
}
],
"range": [
38,
55
]
}
],
"range": [
38,
56
]
}
],
"range": [
38,
57
]
}
],
"hasChanges": false,
"range": [
38,
57
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "NumberLiteral",
"range": [
8,
9
]
}
],
"range": [
4,
9
]
}
],
"range": [
0,
9
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
12,
13
]
},
{
"category": "NumberLiteral",
"range": [
16,
17
]
}
],
"range": [
12,
17
]
}
],
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"range": [
0,
19
]
}
],
"hasChanges": false,
"range": [
0,
19
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
23,
24
]
},
{
"category": "NumberLiteral",
"range": [
27,
28
]
}
],
"range": [
23,
28
]
}
],
"range": [
19,
28
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
31,
32
]
},
{
"category": "NumberLiteral",
"range": [
35,
36
]
}
],
"range": [
31,
36
]
}
],
"range": [
19,
36
]
}
],
"patch": "insert",
"range": [
19,
37
]
}
],
"range": [
19,
38
]
}
],
"hasChanges": true,
"range": [
19,
38
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
57,
57
]
}
],
"hasChanges": false,
"range": [
57,
57
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
38,
38
]
}
],
"hasChanges": false,
"range": [
38,
38
],
"number": 3
}
]
],
"paths": [
"math-operator.js",
"math-operator.js"
],
"oids": [
"79f5f20cab835046e300f62aca0465b308b06b3f",
"d1055f77d631ead2c4f4959b2f21f6dab64462c3"
]
},
"filePaths": [
"math-operator.js"
],
"patch": [
"diff --git a/math-operator.js b/math-operator.js",
"index 79f5f20..d1055f7 100644",
"--- a/math-operator.js",
"+++ b/math-operator.js",
"@@ -1,3 +1,2 @@",
"-i + j * 2 - j % 4;",
"-i + j * 3 - j % 5;",
" i + j * 3 - j % 5;",
"+i + j * 2 - j % 4;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "2682d71eb0c050080c252a74b5086466a18fbeac..e94c4f98fb944fbc75a8f45d35f143b51d1eb642"
}
,{
"testCaseDescription": "javascript-math-operator-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "NumberLiteral",
"range": [
8,
9
]
}
],
"range": [
4,
9
]
}
],
"range": [
0,
9
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
12,
13
]
},
{
"category": "NumberLiteral",
"range": [
16,
17
]
}
],
"range": [
12,
17
]
}
],
"range": [
0,
17
]
}
],
"patch": "delete",
"range": [
0,
18
]
}
],
"range": [
0,
19
]
}
],
"hasChanges": true,
"range": [
0,
19
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
19,
20
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
23,
24
]
},
{
"category": "NumberLiteral",
"range": [
27,
28
]
}
],
"range": [
23,
28
]
}
],
"range": [
19,
28
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
31,
32
]
},
{
"category": "NumberLiteral",
"range": [
35,
36
]
}
],
"range": [
31,
36
]
}
],
"range": [
19,
36
]
}
],
"range": [
19,
37
]
}
],
"range": [
19,
38
]
}
],
"hasChanges": false,
"range": [
19,
38
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "NumberLiteral",
"range": [
8,
9
]
}
],
"range": [
4,
9
]
}
],
"range": [
0,
9
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
12,
13
]
},
{
"category": "NumberLiteral",
"range": [
16,
17
]
}
],
"range": [
12,
17
]
}
],
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"range": [
0,
19
]
}
],
"hasChanges": false,
"range": [
0,
19
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
38,
38
]
}
],
"hasChanges": false,
"range": [
38,
38
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
19,
19
]
}
],
"hasChanges": false,
"range": [
19,
19
],
"number": 2
}
]
],
"paths": [
"math-operator.js",
"math-operator.js"
],
"oids": [
"d1055f77d631ead2c4f4959b2f21f6dab64462c3",
"79ba2b3f103626747e184f54f8885acf39bc5d60"
]
},
"filePaths": [
"math-operator.js"
],
"patch": [
"diff --git a/math-operator.js b/math-operator.js",
"index d1055f7..79ba2b3 100644",
"--- a/math-operator.js",
"+++ b/math-operator.js",
"@@ -1,2 +1 @@",
"-i + j * 3 - j % 5;",
" i + j * 2 - j % 4;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "e94c4f98fb944fbc75a8f45d35f143b51d1eb642..946717e49735f8b580f7b162468c366784e6678d"
}
,{
"testCaseDescription": "javascript-math-operator-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
4,
5
]
},
{
"category": "NumberLiteral",
"range": [
8,
9
]
}
],
"range": [
4,
9
]
}
],
"range": [
0,
9
]
},
{
"category": "MathOperator",
"children": [
{
"category": "Identifier",
"range": [
12,
13
]
},
{
"category": "NumberLiteral",
"range": [
16,
17
]
}
],
"range": [
12,
17
]
}
],
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"patch": "delete",
"range": [
0,
19
]
}
],
"hasChanges": true,
"range": [
0,
19
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
19,
19
]
}
],
"hasChanges": true,
"range": [
19,
19
],
"number": 2
}
]
],
"paths": [
"math-operator.js",
"math-operator.js"
],
"oids": [
"79ba2b3f103626747e184f54f8885acf39bc5d60",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"math-operator.js"
],
"patch": [
"diff --git a/math-operator.js b/math-operator.js",
"index 79ba2b3..e69de29 100644",
"--- a/math-operator.js",
"+++ b/math-operator.js",
"@@ -1 +0,0 @@",
"-i + j * 2 - j % 4;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "946717e49735f8b580f7b162468c366784e6678d..b0194f4ccae027de9b6fbbc4ceefe070cf51555c"
}]