2016-10-28 04:46:12 +03:00
|
|
|
[{
|
|
|
|
"testCaseDescription": "javascript-if-else-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
19,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
34,
|
|
|
|
35
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
37,
|
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
37,
|
2016-11-04 01:41:59 +03:00
|
|
|
39
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
49,
|
|
|
|
50
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
52,
|
|
|
|
53
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
52,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
60,
|
|
|
|
61
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
60,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
45,
|
|
|
|
62
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
30,
|
|
|
|
62
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
15,
|
2016-10-28 04:46:12 +03:00
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
62
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"if-else.js",
|
|
|
|
"if-else.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
|
|
"d81ebadd53d433754add9258494477aec1954688"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index e69de29..d81ebad 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -0,0 +1 @@",
|
|
|
|
"+if (x) y; else if (a) b; else if (c) d; else if (e) f; else g"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "a7c68af9b8e2a95ea64781f7701d616d9831d54b..859101c77238fb0c59826bfa95b840d6ce142fe4"
|
2016-10-28 04:46:12 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-if-else-replacement-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
19,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
25
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
28
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
38,
|
|
|
|
39
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
41,
|
|
|
|
42
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
41,
|
|
|
|
43
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
53,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
58,
|
|
|
|
59
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
58,
|
|
|
|
60
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
56,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
68,
|
|
|
|
69
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
68,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
49,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
34,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
15,
|
2016-10-28 04:46:12 +03:00
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
74,
|
|
|
|
75
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
77,
|
|
|
|
78
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
77,
|
|
|
|
79
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
89,
|
|
|
|
90
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
92,
|
|
|
|
93
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
92,
|
|
|
|
94
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
104,
|
|
|
|
105
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
107,
|
|
|
|
108
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
107,
|
2016-11-04 01:41:59 +03:00
|
|
|
109
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
119,
|
|
|
|
120
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
122,
|
|
|
|
123
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
122,
|
|
|
|
124
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
130,
|
|
|
|
131
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
130,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
115,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
100,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
85,
|
2016-10-28 04:46:12 +03:00
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
132
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
19,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
34,
|
|
|
|
35
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
37,
|
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
37,
|
2016-11-04 01:41:59 +03:00
|
|
|
39
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
49,
|
|
|
|
50
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
52,
|
|
|
|
53
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
52,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
60,
|
|
|
|
61
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
60,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
45,
|
|
|
|
62
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
30,
|
|
|
|
62
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
15,
|
2016-10-28 04:46:12 +03:00
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
136,
|
|
|
|
137
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
139,
|
|
|
|
140
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
139,
|
|
|
|
141
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
151,
|
|
|
|
152
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
154,
|
|
|
|
155
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
154,
|
|
|
|
156
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
166,
|
|
|
|
167
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
169,
|
|
|
|
170
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
169,
|
2016-11-04 01:41:59 +03:00
|
|
|
171
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
181,
|
|
|
|
182
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
184,
|
|
|
|
185
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
184,
|
|
|
|
186
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
192,
|
|
|
|
193
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
192,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
177,
|
|
|
|
194
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
162,
|
|
|
|
194
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
147,
|
2016-10-28 04:46:12 +03:00
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
194
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
62
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
194,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
194,
|
|
|
|
194
|
|
|
|
],
|
|
|
|
"number": 4
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"if-else.js",
|
|
|
|
"if-else.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"d81ebadd53d433754add9258494477aec1954688",
|
|
|
|
"6bb0eaa7ec6274091ce5ce960f47c96db97d4620"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index d81ebad..6bb0eaa 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -1 +1,3 @@",
|
|
|
|
"+if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o",
|
|
|
|
"+if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
" if (x) y; else if (a) b; else if (c) d; else if (e) f; else g"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "859101c77238fb0c59826bfa95b840d6ce142fe4..7aa5ca0081c95e390cc3fb383e893ad607d21ac6"
|
2016-10-28 04:46:12 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-if-else-delete-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
19,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
25
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
28
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
38,
|
|
|
|
39
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": "replace",
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
41,
|
|
|
|
42
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
41,
|
|
|
|
43
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
53,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
58,
|
|
|
|
59
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
58,
|
|
|
|
60
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
56,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
68,
|
|
|
|
69
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
68,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
49,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
34,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
15,
|
2016-10-28 04:46:12 +03:00
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
19,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
34,
|
|
|
|
35
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
37,
|
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
37,
|
2016-11-04 01:41:59 +03:00
|
|
|
39
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
49,
|
|
|
|
50
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
52,
|
|
|
|
53
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
52,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
60,
|
|
|
|
61
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
60,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
45,
|
|
|
|
62
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
30,
|
|
|
|
62
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
15,
|
2016-10-28 04:46:12 +03:00
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
74,
|
|
|
|
75
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
77,
|
|
|
|
78
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
77,
|
|
|
|
79
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
89,
|
|
|
|
90
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
92,
|
|
|
|
93
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
92,
|
|
|
|
94
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
104,
|
|
|
|
105
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
107,
|
|
|
|
108
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
107,
|
2016-11-04 01:41:59 +03:00
|
|
|
109
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
119,
|
|
|
|
120
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
122,
|
|
|
|
123
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
122,
|
|
|
|
124
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
130,
|
|
|
|
131
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
130,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
115,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
100,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
85,
|
2016-10-28 04:46:12 +03:00
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
132
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
66,
|
|
|
|
67
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
69,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
69,
|
|
|
|
71
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
81,
|
|
|
|
82
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
84,
|
|
|
|
85
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
84,
|
|
|
|
86
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
96,
|
|
|
|
97
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
99,
|
|
|
|
100
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
99,
|
2016-11-04 01:41:59 +03:00
|
|
|
101
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
111,
|
|
|
|
112
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
114,
|
|
|
|
115
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
114,
|
|
|
|
116
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
122,
|
|
|
|
123
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
122,
|
|
|
|
124
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
107,
|
|
|
|
124
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
92,
|
|
|
|
124
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
77,
|
2016-10-28 04:46:12 +03:00
|
|
|
124
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
124
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
124
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
124
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
136,
|
|
|
|
137
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
139,
|
|
|
|
140
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
139,
|
|
|
|
141
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
151,
|
|
|
|
152
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
154,
|
|
|
|
155
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
154,
|
|
|
|
156
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
166,
|
|
|
|
167
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
169,
|
|
|
|
170
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
169,
|
2016-11-04 01:41:59 +03:00
|
|
|
171
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
181,
|
|
|
|
182
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
184,
|
|
|
|
185
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
184,
|
|
|
|
186
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
192,
|
|
|
|
193
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
192,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
177,
|
|
|
|
194
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
162,
|
|
|
|
194
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
147,
|
2016-10-28 04:46:12 +03:00
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
194
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
128,
|
|
|
|
129
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
131,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
131,
|
|
|
|
133
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
143,
|
|
|
|
144
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
146,
|
|
|
|
147
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
146,
|
|
|
|
148
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
158,
|
|
|
|
159
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
161,
|
|
|
|
162
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
161,
|
2016-11-04 01:41:59 +03:00
|
|
|
163
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
173,
|
|
|
|
174
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
176,
|
|
|
|
177
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
176,
|
|
|
|
178
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
184,
|
|
|
|
185
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
184,
|
|
|
|
186
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
169,
|
|
|
|
186
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
154,
|
|
|
|
186
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
139,
|
2016-10-28 04:46:12 +03:00
|
|
|
186
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
124,
|
|
|
|
186
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
124,
|
|
|
|
186
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
124,
|
|
|
|
186
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
194,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
194,
|
|
|
|
194
|
|
|
|
],
|
|
|
|
"number": 4
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
186,
|
|
|
|
186
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
186,
|
|
|
|
186
|
|
|
|
],
|
|
|
|
"number": 4
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"if-else.js",
|
|
|
|
"if-else.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"6bb0eaa7ec6274091ce5ce960f47c96db97d4620",
|
|
|
|
"2034be1bb30315b1f005d8a8d6108d49c6cfc57f"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index 6bb0eaa..2034be1 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -1,3 +1,3 @@",
|
|
|
|
"-if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o",
|
|
|
|
"+if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
" if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
" if (x) y; else if (a) b; else if (c) d; else if (e) f; else g"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "7aa5ca0081c95e390cc3fb383e893ad607d21ac6..db2dc88faaeca02e77d4d12d5c72988d460da4aa"
|
2016-10-28 04:46:12 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-if-else-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
19,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
34,
|
|
|
|
35
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
37,
|
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
37,
|
2016-11-04 01:41:59 +03:00
|
|
|
39
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
49,
|
|
|
|
50
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
52,
|
|
|
|
53
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
52,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
60,
|
|
|
|
61
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
60,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
45,
|
|
|
|
62
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
30,
|
|
|
|
62
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
15,
|
2016-10-28 04:46:12 +03:00
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
19,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
25
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
28
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
38,
|
|
|
|
39
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": "replace",
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
41,
|
|
|
|
42
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
41,
|
|
|
|
43
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
53,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
58,
|
|
|
|
59
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
58,
|
|
|
|
60
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
56,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"patch": "replace",
|
|
|
|
"range": [
|
|
|
|
68,
|
|
|
|
69
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
68,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
49,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
34,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
15,
|
2016-10-28 04:46:12 +03:00
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
66,
|
|
|
|
67
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
69,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
69,
|
|
|
|
71
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
81,
|
|
|
|
82
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
84,
|
|
|
|
85
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
84,
|
|
|
|
86
|
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
96,
|
|
|
|
97
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
99,
|
|
|
|
100
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
99,
|
2016-11-04 01:41:59 +03:00
|
|
|
101
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
111,
|
|
|
|
112
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
114,
|
|
|
|
115
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
114,
|
|
|
|
116
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
122,
|
|
|
|
123
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
122,
|
|
|
|
124
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
107,
|
|
|
|
124
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
92,
|
|
|
|
124
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
77,
|
2016-10-28 04:46:12 +03:00
|
|
|
124
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
124
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
124
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
124
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
74,
|
|
|
|
75
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
77,
|
|
|
|
78
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
77,
|
|
|
|
79
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
89,
|
|
|
|
90
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
92,
|
|
|
|
93
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
92,
|
|
|
|
94
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
104,
|
|
|
|
105
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
107,
|
|
|
|
108
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
107,
|
2016-11-04 01:41:59 +03:00
|
|
|
109
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
119,
|
|
|
|
120
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
122,
|
|
|
|
123
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
122,
|
|
|
|
124
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
130,
|
|
|
|
131
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
130,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
115,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
100,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
85,
|
2016-10-28 04:46:12 +03:00
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
132
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
128,
|
|
|
|
129
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
131,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
131,
|
|
|
|
133
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
143,
|
|
|
|
144
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
146,
|
|
|
|
147
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
146,
|
|
|
|
148
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
158,
|
|
|
|
159
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
161,
|
|
|
|
162
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
161,
|
2016-11-04 01:41:59 +03:00
|
|
|
163
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
173,
|
|
|
|
174
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
176,
|
|
|
|
177
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
176,
|
|
|
|
178
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
184,
|
|
|
|
185
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
184,
|
|
|
|
186
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
169,
|
|
|
|
186
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
154,
|
|
|
|
186
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
139,
|
2016-10-28 04:46:12 +03:00
|
|
|
186
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
124,
|
|
|
|
186
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
124,
|
|
|
|
186
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
124,
|
|
|
|
186
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
136,
|
|
|
|
137
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
139,
|
|
|
|
140
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
139,
|
|
|
|
141
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
151,
|
|
|
|
152
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
154,
|
|
|
|
155
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
154,
|
|
|
|
156
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
166,
|
|
|
|
167
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
169,
|
|
|
|
170
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
169,
|
|
|
|
171
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
181,
|
|
|
|
182
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
184,
|
|
|
|
185
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
184,
|
|
|
|
186
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
192,
|
|
|
|
193
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
192,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
177,
|
|
|
|
194
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
162,
|
|
|
|
194
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
147,
|
2016-10-28 04:46:12 +03:00
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
194
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
186,
|
|
|
|
186
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
186,
|
|
|
|
186
|
|
|
|
],
|
|
|
|
"number": 4
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
194,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
194,
|
|
|
|
194
|
|
|
|
],
|
|
|
|
"number": 4
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"if-else.js",
|
|
|
|
"if-else.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"2034be1bb30315b1f005d8a8d6108d49c6cfc57f",
|
|
|
|
"6bb0eaa7ec6274091ce5ce960f47c96db97d4620"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index 2034be1..6bb0eaa 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -1,3 +1,3 @@",
|
|
|
|
"-if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
"+if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o",
|
|
|
|
" if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
" if (x) y; else if (a) b; else if (c) d; else if (e) f; else g"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "db2dc88faaeca02e77d4d12d5c72988d460da4aa..5b0fdc4282d1d7326c122766cb51190a2be1b6bb"
|
2016-10-28 04:46:12 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-if-else-delete-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
19,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
25
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
28
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
38,
|
|
|
|
39
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
41,
|
|
|
|
42
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
41,
|
|
|
|
43
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
53,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
58,
|
|
|
|
59
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
58,
|
|
|
|
60
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
56,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
68,
|
|
|
|
69
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
68,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
49,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
34,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
15,
|
2016-10-28 04:46:12 +03:00
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
74,
|
|
|
|
75
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
77,
|
|
|
|
78
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
77,
|
|
|
|
79
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
89,
|
|
|
|
90
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
92,
|
|
|
|
93
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
92,
|
|
|
|
94
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
104,
|
|
|
|
105
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
107,
|
|
|
|
108
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
107,
|
2016-11-04 01:41:59 +03:00
|
|
|
109
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
119,
|
|
|
|
120
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
122,
|
|
|
|
123
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
122,
|
|
|
|
124
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
130,
|
|
|
|
131
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
130,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
115,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
100,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
85,
|
2016-10-28 04:46:12 +03:00
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
132
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
136,
|
|
|
|
137
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
139,
|
|
|
|
140
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
139,
|
|
|
|
141
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
151,
|
|
|
|
152
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
154,
|
|
|
|
155
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
154,
|
|
|
|
156
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
166,
|
|
|
|
167
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
169,
|
|
|
|
170
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
169,
|
|
|
|
171
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
181,
|
|
|
|
182
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
184,
|
|
|
|
185
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
184,
|
|
|
|
186
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
192,
|
|
|
|
193
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
192,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
177,
|
|
|
|
194
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
162,
|
|
|
|
194
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
147,
|
2016-10-28 04:46:12 +03:00
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
194
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
19,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
2016-11-04 01:41:59 +03:00
|
|
|
"range": [
|
|
|
|
34,
|
|
|
|
35
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
37,
|
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
|
|
|
37,
|
2016-11-04 01:41:59 +03:00
|
|
|
39
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
49,
|
|
|
|
50
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
52,
|
|
|
|
53
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
52,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
60,
|
|
|
|
61
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
60,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
45,
|
|
|
|
62
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
30,
|
|
|
|
62
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
15,
|
2016-10-28 04:46:12 +03:00
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
66,
|
|
|
|
67
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
69,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
69,
|
|
|
|
71
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
81,
|
|
|
|
82
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
86,
|
|
|
|
87
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
86,
|
|
|
|
88
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
84,
|
|
|
|
90
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
100,
|
|
|
|
101
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
103,
|
|
|
|
104
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
103,
|
|
|
|
105
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
115,
|
|
|
|
116
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
120,
|
|
|
|
121
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
120,
|
|
|
|
122
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
118,
|
|
|
|
124
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
130,
|
|
|
|
131
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
130,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
111,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
96,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
77,
|
2016-10-28 04:46:12 +03:00
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "insert",
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
132
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
194,
|
|
|
|
194
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
194,
|
|
|
|
194
|
|
|
|
],
|
|
|
|
"number": 4
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
132
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"if-else.js",
|
|
|
|
"if-else.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"6bb0eaa7ec6274091ce5ce960f47c96db97d4620",
|
|
|
|
"e26d6c43872f2810a2aca6432a8fefa636abfe9e"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index 6bb0eaa..e26d6c4 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -1,3 +1,2 @@",
|
|
|
|
"-if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o",
|
|
|
|
"-if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
" if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
"+if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "5b0fdc4282d1d7326c122766cb51190a2be1b6bb..2f737e139adcdbaeeaf780eb49df2b904642b16b"
|
2016-10-28 04:46:12 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-if-else-delete-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
19,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
34,
|
|
|
|
35
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
37,
|
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
37,
|
|
|
|
39
|
|
|
|
]
|
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
49,
|
|
|
|
50
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
52,
|
|
|
|
53
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
52,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
60,
|
|
|
|
61
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
60,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
45,
|
|
|
|
62
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
30,
|
|
|
|
62
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
15,
|
2016-10-28 04:46:12 +03:00
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
62
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
66,
|
|
|
|
67
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
69,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
69,
|
|
|
|
71
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
81,
|
|
|
|
82
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
86,
|
|
|
|
87
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
86,
|
|
|
|
88
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
84,
|
|
|
|
90
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
100,
|
|
|
|
101
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
103,
|
|
|
|
104
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
103,
|
|
|
|
105
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
115,
|
|
|
|
116
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
120,
|
|
|
|
121
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
120,
|
|
|
|
122
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
118,
|
|
|
|
124
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
130,
|
|
|
|
131
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
130,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
111,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
96,
|
|
|
|
132
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
77,
|
2016-10-28 04:46:12 +03:00
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
62,
|
|
|
|
132
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
19,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
25
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
28
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
38,
|
|
|
|
39
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
41,
|
|
|
|
42
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
41,
|
|
|
|
43
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
53,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
58,
|
|
|
|
59
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
58,
|
|
|
|
60
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
56,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
68,
|
|
|
|
69
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
68,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
49,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
34,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
15,
|
2016-10-28 04:46:12 +03:00
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
132
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
132,
|
|
|
|
132
|
|
|
|
],
|
|
|
|
"number": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": false,
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
70
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"if-else.js",
|
|
|
|
"if-else.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"e26d6c43872f2810a2aca6432a8fefa636abfe9e",
|
|
|
|
"1a55d0bd4e0f601787524953f62c0f621fd96702"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index e26d6c4..1a55d0b 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -1,2 +1 @@",
|
|
|
|
"-if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
" if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "2f737e139adcdbaeeaf780eb49df2b904642b16b..168b06d356ffd180f13ad8f9c26fa0ed8adfc3eb"
|
2016-10-28 04:46:12 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-if-else-delete-rest-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"rows": [
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
7,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
19,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
25
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
24,
|
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
22,
|
|
|
|
28
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2016-11-04 01:41:59 +03:00
|
|
|
"category": "If",
|
2016-10-28 04:46:12 +03:00
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
38,
|
|
|
|
39
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
2016-11-04 01:41:59 +03:00
|
|
|
},
|
2016-10-28 04:46:12 +03:00
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
41,
|
|
|
|
42
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
41,
|
|
|
|
43
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "If",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
53,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
58,
|
|
|
|
59
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
58,
|
|
|
|
60
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
56,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"category": "ExpressionStatements",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"category": "Identifier",
|
|
|
|
"range": [
|
|
|
|
68,
|
|
|
|
69
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
68,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
49,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
34,
|
|
|
|
70
|
2016-10-28 04:46:12 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
2016-11-04 01:41:59 +03:00
|
|
|
15,
|
2016-10-28 04:46:12 +03:00
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
0,
|
|
|
|
70
|
|
|
|
],
|
|
|
|
"number": 1
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"terms": [
|
|
|
|
{
|
|
|
|
"category": "Program",
|
|
|
|
"children": [],
|
|
|
|
"patch": "delete",
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hasChanges": true,
|
|
|
|
"range": [
|
|
|
|
70,
|
|
|
|
70
|
|
|
|
],
|
|
|
|
"number": 2
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
"paths": [
|
|
|
|
"if-else.js",
|
|
|
|
"if-else.js"
|
|
|
|
],
|
|
|
|
"oids": [
|
|
|
|
"1a55d0bd4e0f601787524953f62c0f621fd96702",
|
|
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index 1a55d0b..e69de29 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -1 +0,0 @@",
|
|
|
|
"-if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o"
|
|
|
|
],
|
2016-10-28 04:46:12 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "168b06d356ffd180f13ad8f9c26fa0ed8adfc3eb..c32361c31b256ea32638cead8a9639d9d3bb55d4"
|
2016-10-28 04:46:12 +03:00
|
|
|
}]
|