mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
2649 lines
130 KiB
JSON
2649 lines
130 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-do-while-statement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
27
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
35,
|
|
39
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
41
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
42
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
42
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "insert",
|
|
"range": [
|
|
42,
|
|
42
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
42,
|
|
42
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"do-while-statement.js",
|
|
"do-while-statement.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"d1ec804be028c1082c29147c22df5a1fd753125a"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"do-while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/do-while-statement.js b/do-while-statement.js",
|
|
"index e69de29..d1ec804 100644",
|
|
"--- a/do-while-statement.js",
|
|
"+++ b/do-while-statement.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+do { console.log(insert); } while (true);"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "a22f0481bc6a70fba4f09d450abc7b2787f85762..7abcf89b7a75b91d70522e0d5aa9b9307ef26224"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-do-while-statement-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
32
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
40,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
48
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
53,
|
|
60
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
61,
|
|
64
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
65,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
53,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
53,
|
|
73
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
51,
|
|
75
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
83,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
48,
|
|
89
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
90
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
48,
|
|
90
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
27
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
35,
|
|
39
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
41
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
42
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
42
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
95,
|
|
102
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
103,
|
|
106
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
107,
|
|
113
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
114
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
115
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
93,
|
|
117
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
125,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
131
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
90,
|
|
132
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
42,
|
|
42
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
42,
|
|
42
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
132,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
132,
|
|
132
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"do-while-statement.js",
|
|
"do-while-statement.js"
|
|
],
|
|
"oids": [
|
|
"d1ec804be028c1082c29147c22df5a1fd753125a",
|
|
"d9a410d6571c70907e09d1e530a76acbd56b7c94"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"do-while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/do-while-statement.js b/do-while-statement.js",
|
|
"index d1ec804..d9a410d 100644",
|
|
"--- a/do-while-statement.js",
|
|
"+++ b/do-while-statement.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+do { console.log(replacement); } while (false);",
|
|
"+do { console.log(insert); } while (true);",
|
|
" do { console.log(insert); } while (true);"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "7abcf89b7a75b91d70522e0d5aa9b9307ef26224..74d2541a79d1212236c1d9f7a9dd5138a5dcf059"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-do-while-statement-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
17,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
32
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"patch": "replace",
|
|
"range": [
|
|
40,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
48
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
17,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
27
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"patch": "replace",
|
|
"range": [
|
|
35,
|
|
39
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
41
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
42
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
42
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
53,
|
|
60
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
61,
|
|
64
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
65,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
53,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
53,
|
|
73
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
51,
|
|
75
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
83,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
89
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
90
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
48,
|
|
90
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
47,
|
|
54
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
55,
|
|
58
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
47,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
47,
|
|
67
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
45,
|
|
69
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
77,
|
|
81
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
42,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
42,
|
|
84
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
42,
|
|
84
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
95,
|
|
102
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
103,
|
|
106
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
107,
|
|
113
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
114
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
115
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
93,
|
|
117
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
125,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
131
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
90,
|
|
132
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
89,
|
|
96
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
97,
|
|
100
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
101,
|
|
107
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
89,
|
|
108
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
89,
|
|
109
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
87,
|
|
111
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
119,
|
|
123
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
84,
|
|
125
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
84,
|
|
126
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
84,
|
|
126
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
132,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
132,
|
|
132
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
126,
|
|
126
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
126,
|
|
126
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"do-while-statement.js",
|
|
"do-while-statement.js"
|
|
],
|
|
"oids": [
|
|
"d9a410d6571c70907e09d1e530a76acbd56b7c94",
|
|
"4197835909b801739dc2901215041f848ccfbaa1"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"do-while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/do-while-statement.js b/do-while-statement.js",
|
|
"index d9a410d..4197835 100644",
|
|
"--- a/do-while-statement.js",
|
|
"+++ b/do-while-statement.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-do { console.log(replacement); } while (false);",
|
|
"+do { console.log(insert); } while (true);",
|
|
" do { console.log(insert); } while (true);",
|
|
" do { console.log(insert); } while (true);"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "74d2541a79d1212236c1d9f7a9dd5138a5dcf059..8133ce7720b56dceb36f7fd781e37f3348c7a72f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-do-while-statement-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
17,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
27
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"patch": "replace",
|
|
"range": [
|
|
35,
|
|
39
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
41
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
42
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
42
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
17,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
32
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"patch": "replace",
|
|
"range": [
|
|
40,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
48
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
47,
|
|
54
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
55,
|
|
58
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
47,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
47,
|
|
67
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
45,
|
|
69
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
77,
|
|
81
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
42,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
42,
|
|
84
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
42,
|
|
84
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
53,
|
|
60
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
61,
|
|
64
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
65,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
53,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
53,
|
|
73
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
51,
|
|
75
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
83,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
89
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
90
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
48,
|
|
90
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
89,
|
|
96
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
97,
|
|
100
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
101,
|
|
107
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
89,
|
|
108
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
89,
|
|
109
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
87,
|
|
111
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
119,
|
|
123
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
84,
|
|
125
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
84,
|
|
126
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
84,
|
|
126
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
95,
|
|
102
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
103,
|
|
106
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
107,
|
|
113
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
114
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
115
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
93,
|
|
117
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
125,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
131
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
90,
|
|
132
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
126,
|
|
126
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
126,
|
|
126
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
132,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
132,
|
|
132
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"do-while-statement.js",
|
|
"do-while-statement.js"
|
|
],
|
|
"oids": [
|
|
"4197835909b801739dc2901215041f848ccfbaa1",
|
|
"d9a410d6571c70907e09d1e530a76acbd56b7c94"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"do-while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/do-while-statement.js b/do-while-statement.js",
|
|
"index 4197835..d9a410d 100644",
|
|
"--- a/do-while-statement.js",
|
|
"+++ b/do-while-statement.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-do { console.log(insert); } while (true);",
|
|
"+do { console.log(replacement); } while (false);",
|
|
" do { console.log(insert); } while (true);",
|
|
" do { console.log(insert); } while (true);"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "8133ce7720b56dceb36f7fd781e37f3348c7a72f..c6c0469d03dd8958d0e0ad486cdd788101104fa7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-do-while-statement-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
32
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
40,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
48
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
53,
|
|
60
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
61,
|
|
64
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
65,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
53,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
53,
|
|
73
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
51,
|
|
75
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
83,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
48,
|
|
89
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
90
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
48,
|
|
90
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
95,
|
|
102
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
103,
|
|
106
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
107,
|
|
113
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
114
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
95,
|
|
115
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
93,
|
|
117
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
125,
|
|
129
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
131
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
90,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
90,
|
|
132
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
27
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
35,
|
|
39
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
41
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
42
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
42
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
47,
|
|
54
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
55,
|
|
58
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
47,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
47,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
45,
|
|
74
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
82,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
42,
|
|
89
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
42,
|
|
90
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
42,
|
|
90
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
132,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
132,
|
|
132
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
90,
|
|
90
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
90,
|
|
90
|
|
],
|
|
"number": 3
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"do-while-statement.js",
|
|
"do-while-statement.js"
|
|
],
|
|
"oids": [
|
|
"d9a410d6571c70907e09d1e530a76acbd56b7c94",
|
|
"c5291b47b88a3879190af5225191ff232cd4ebce"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"do-while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/do-while-statement.js b/do-while-statement.js",
|
|
"index d9a410d..c5291b4 100644",
|
|
"--- a/do-while-statement.js",
|
|
"+++ b/do-while-statement.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-do { console.log(replacement); } while (false);",
|
|
"-do { console.log(insert); } while (true);",
|
|
" do { console.log(insert); } while (true);",
|
|
"+do { console.log(replacement); } while (false);"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "c6c0469d03dd8958d0e0ad486cdd788101104fa7..3b1ba172e86f43f1976164c806df448a6bc53e3e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-do-while-statement-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
27
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
35,
|
|
39
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
41
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
42
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
42
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
47,
|
|
54
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
55,
|
|
58
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
59,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
47,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
47,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
45,
|
|
74
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
82,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
42,
|
|
89
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
42,
|
|
90
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
42,
|
|
90
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
32
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
40,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
48
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
90,
|
|
90
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
90,
|
|
90
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
48,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
48,
|
|
48
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"do-while-statement.js",
|
|
"do-while-statement.js"
|
|
],
|
|
"oids": [
|
|
"c5291b47b88a3879190af5225191ff232cd4ebce",
|
|
"6085cb11f70dbccaedffcb6a02f1bde589b13168"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"do-while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/do-while-statement.js b/do-while-statement.js",
|
|
"index c5291b4..6085cb1 100644",
|
|
"--- a/do-while-statement.js",
|
|
"+++ b/do-while-statement.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-do { console.log(insert); } while (true);",
|
|
" do { console.log(replacement); } while (false);"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "3b1ba172e86f43f1976164c806df448a6bc53e3e..cb580d744365fee8ee88e2dcc525cd7af8b237fc"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-do-while-statement-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "DoWhile",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MethodCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
5,
|
|
12
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
13,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
17,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
5,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
32
|
|
]
|
|
},
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
40,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
48
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
48,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
48,
|
|
48
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"do-while-statement.js",
|
|
"do-while-statement.js"
|
|
],
|
|
"oids": [
|
|
"6085cb11f70dbccaedffcb6a02f1bde589b13168",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"do-while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/do-while-statement.js b/do-while-statement.js",
|
|
"index 6085cb1..e69de29 100644",
|
|
"--- a/do-while-statement.js",
|
|
"+++ b/do-while-statement.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-do { console.log(replacement); } while (false);"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "cb580d744365fee8ee88e2dcc525cd7af8b237fc..9fdae081cef5395f539eef79836a911574344379"
|
|
}]
|