mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
2047 lines
88 KiB
JSON
2047 lines
88 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-throw-statement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
10,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
16,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
10,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
6,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
26
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "insert",
|
|
"range": [
|
|
26,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
26,
|
|
26
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"throw-statement.js",
|
|
"throw-statement.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"e2fcb67ea93292e648039798eba22569dc2d0138"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"throw-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/throw-statement.js b/throw-statement.js",
|
|
"index e69de29..e2fcb67 100644",
|
|
"--- a/throw-statement.js",
|
|
"+++ b/throw-statement.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+throw new Error(\"uh oh\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "5feeb9240c4cfaac7dec387bafe580d79ff959c8..f4f56dd11222632b6dd231901ea27caa19dd049b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-throw-statement-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
10,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
16,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
10,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
6,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
29
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
39,
|
|
44
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
45,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
39,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
29,
|
|
54
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
29,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
29,
|
|
55
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
10,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
16,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
10,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
6,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
26
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
65,
|
|
70
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
71,
|
|
78
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
79
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
61,
|
|
79
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
80
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
81
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
55,
|
|
81
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
26,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
26,
|
|
26
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
81,
|
|
81
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
81,
|
|
81
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"throw-statement.js",
|
|
"throw-statement.js"
|
|
],
|
|
"oids": [
|
|
"e2fcb67ea93292e648039798eba22569dc2d0138",
|
|
"c0020c895262071db6c99e3ea52554ee17ff3c49"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"throw-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/throw-statement.js b/throw-statement.js",
|
|
"index e2fcb67..c0020c8 100644",
|
|
"--- a/throw-statement.js",
|
|
"+++ b/throw-statement.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+throw new Error(\"oooooops\");",
|
|
"+throw new Error(\"uh oh\");",
|
|
" throw new Error(\"uh oh\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f4f56dd11222632b6dd231901ea27caa19dd049b..53022b5b1f89288775172d711942c23c6600e7ea"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-throw-statement-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
10,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
16,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
10,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
6,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
29
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
10,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
16,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
10,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
6,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
26
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
39,
|
|
44
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
45,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
39,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
29,
|
|
54
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
29,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
29,
|
|
55
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
36,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
42,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
50
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
50
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
51
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
26,
|
|
52
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
65,
|
|
70
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
71,
|
|
78
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
79
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
61,
|
|
79
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
80
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
81
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
55,
|
|
81
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
62,
|
|
67
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
68,
|
|
75
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
62,
|
|
76
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
58,
|
|
76
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
52,
|
|
77
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
52,
|
|
78
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
52,
|
|
78
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
81,
|
|
81
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
81,
|
|
81
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
78,
|
|
78
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
78,
|
|
78
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"throw-statement.js",
|
|
"throw-statement.js"
|
|
],
|
|
"oids": [
|
|
"c0020c895262071db6c99e3ea52554ee17ff3c49",
|
|
"46442332954a6c0b223aab4467e31cef04dde82d"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"throw-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/throw-statement.js b/throw-statement.js",
|
|
"index c0020c8..4644233 100644",
|
|
"--- a/throw-statement.js",
|
|
"+++ b/throw-statement.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-throw new Error(\"oooooops\");",
|
|
"+throw new Error(\"uh oh\");",
|
|
" throw new Error(\"uh oh\");",
|
|
" throw new Error(\"uh oh\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "53022b5b1f89288775172d711942c23c6600e7ea..f4c157c075f67866be5d801f75c662500a3ffe0d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-throw-statement-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
10,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
16,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
10,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
6,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
26
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
10,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
16,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
10,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
6,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
29
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
36,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
42,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
50
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
50
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
51
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
26,
|
|
52
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
39,
|
|
44
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
45,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
39,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
29,
|
|
54
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
29,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
29,
|
|
55
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
62,
|
|
67
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
68,
|
|
75
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
62,
|
|
76
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
58,
|
|
76
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
52,
|
|
77
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
52,
|
|
78
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
52,
|
|
78
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
65,
|
|
70
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
71,
|
|
78
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
79
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
61,
|
|
79
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
80
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
81
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
55,
|
|
81
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
78,
|
|
78
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
78,
|
|
78
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
81,
|
|
81
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
81,
|
|
81
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"throw-statement.js",
|
|
"throw-statement.js"
|
|
],
|
|
"oids": [
|
|
"46442332954a6c0b223aab4467e31cef04dde82d",
|
|
"c0020c895262071db6c99e3ea52554ee17ff3c49"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"throw-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/throw-statement.js b/throw-statement.js",
|
|
"index 4644233..c0020c8 100644",
|
|
"--- a/throw-statement.js",
|
|
"+++ b/throw-statement.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-throw new Error(\"uh oh\");",
|
|
"+throw new Error(\"oooooops\");",
|
|
" throw new Error(\"uh oh\");",
|
|
" throw new Error(\"uh oh\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f4c157c075f67866be5d801f75c662500a3ffe0d..958f241f6f3e4321851c930b1408b6c70c78caa7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-throw-statement-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
10,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
16,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
10,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
6,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
29
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
39,
|
|
44
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
45,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
39,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
29,
|
|
54
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
29,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
29,
|
|
55
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
65,
|
|
70
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
71,
|
|
78
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
65,
|
|
79
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
61,
|
|
79
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
80
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
55,
|
|
81
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
55,
|
|
81
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
10,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
16,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
10,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
6,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
26
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
36,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
42,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
26,
|
|
54
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
26,
|
|
55
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
81,
|
|
81
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
81,
|
|
81
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
55,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
55,
|
|
55
|
|
],
|
|
"number": 3
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"throw-statement.js",
|
|
"throw-statement.js"
|
|
],
|
|
"oids": [
|
|
"c0020c895262071db6c99e3ea52554ee17ff3c49",
|
|
"a1bbf3e1f6f96b955220ec188de47cf41d06ec9f"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"throw-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/throw-statement.js b/throw-statement.js",
|
|
"index c0020c8..a1bbf3e 100644",
|
|
"--- a/throw-statement.js",
|
|
"+++ b/throw-statement.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-throw new Error(\"oooooops\");",
|
|
"-throw new Error(\"uh oh\");",
|
|
" throw new Error(\"uh oh\");",
|
|
"+throw new Error(\"oooooops\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "958f241f6f3e4321851c930b1408b6c70c78caa7..f7af002e3c9b8d7d09687a49a12d31f98ba32d19"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-throw-statement-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
10,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
16,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
10,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
6,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
26
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
36,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
42,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
54
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
26,
|
|
55
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
10,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
16,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
10,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
6,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
29
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
55,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
55,
|
|
55
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
29,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
29,
|
|
29
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"throw-statement.js",
|
|
"throw-statement.js"
|
|
],
|
|
"oids": [
|
|
"a1bbf3e1f6f96b955220ec188de47cf41d06ec9f",
|
|
"cc3c531246597a50e37b9760c7a6d45989e4583c"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"throw-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/throw-statement.js b/throw-statement.js",
|
|
"index a1bbf3e..cc3c531 100644",
|
|
"--- a/throw-statement.js",
|
|
"+++ b/throw-statement.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-throw new Error(\"uh oh\");",
|
|
" throw new Error(\"oooooops\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f7af002e3c9b8d7d09687a49a12d31f98ba32d19..ea612e0a3b13b75a009a60b24db85afe61e73534"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-throw-statement-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Throw",
|
|
"children": [
|
|
{
|
|
"category": "Constructor",
|
|
"children": [
|
|
{
|
|
"category": "FunctionCall",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
10,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
16,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
10,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
6,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
29
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
29,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
29,
|
|
29
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"throw-statement.js",
|
|
"throw-statement.js"
|
|
],
|
|
"oids": [
|
|
"cc3c531246597a50e37b9760c7a6d45989e4583c",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"throw-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/throw-statement.js b/throw-statement.js",
|
|
"index cc3c531..e69de29 100644",
|
|
"--- a/throw-statement.js",
|
|
"+++ b/throw-statement.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-throw new Error(\"oooooops\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "ea612e0a3b13b75a009a60b24db85afe61e73534..3a1f9b51fe7092afcbd5589b8987d6e91e2100a5"
|
|
}]
|