1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00
semantic/test/corpus/diff-summaries/javascript/if-else.json
Rob Rix 483e8a3f00 Regenerate all the things!
JavaScript: method call → function call.

Go: regenerated everything.
2017-01-24 15:09:28 -05:00

792 lines
27 KiB
JSON

[{
"testCaseDescription": "javascript-if-else-insert-test",
"expectedResult": {
"changes": {
"if-else.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
2,
1
]
}
},
"summary": "Added the 'x' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-else.js"
],
"patch": [
"diff --git a/if-else.js b/if-else.js",
"index e69de29b..d81ebadd 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"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "9b27e4158f8b990b3f7ca2f77fcf65bf40e26802..6da4e4af4550225b9f9493faa2575360b93f8e5f"
}
,{
"testCaseDescription": "javascript-if-else-replacement-insert-test",
"expectedResult": {
"changes": {
"if-else.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
2,
1
]
}
},
"summary": "Added the 'g' if statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
3,
1
]
}
},
"summary": "Added the 'x' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-else.js"
],
"patch": [
"diff --git a/if-else.js b/if-else.js",
"index d81ebadd..6bb0eaa7 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"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "6da4e4af4550225b9f9493faa2575360b93f8e5f..8a8df26cb938506ec102e908d4552929a7073d00"
}
,{
"testCaseDescription": "javascript-if-else-delete-insert-test",
"expectedResult": {
"changes": {
"if-else.js": [
{
"span": {
"replace": [
{
"start": [
1,
5
],
"end": [
1,
6
]
},
{
"start": [
1,
5
],
"end": [
1,
6
]
}
]
},
"summary": "Replaced the 'g' identifier with the 'x' identifier in the 'x' if statement"
},
{
"span": {
"replace": [
{
"start": [
1,
8
],
"end": [
1,
9
]
},
{
"start": [
1,
8
],
"end": [
1,
9
]
}
]
},
"summary": "Replaced the 'h' identifier with the 'y' identifier in the 'x' if statement"
},
{
"span": {
"replace": [
{
"start": [
1,
20
],
"end": [
1,
21
]
},
{
"start": [
1,
20
],
"end": [
1,
21
]
}
]
},
"summary": "Replaced the 'i' identifier with the 'a' identifier in the 'a' if statement"
},
{
"span": {
"insert": {
"start": [
1,
23
],
"end": [
1,
24
]
}
},
"summary": "Added the 'b' identifier in the 'a' if statement"
},
{
"span": {
"delete": {
"start": [
1,
25
],
"end": [
1,
26
]
}
},
"summary": "Deleted the 'j' identifier in the 'a' if statement"
},
{
"span": {
"replace": [
{
"start": [
1,
39
],
"end": [
1,
40
]
},
{
"start": [
1,
35
],
"end": [
1,
36
]
}
]
},
"summary": "Replaced the 'k' identifier with the 'c' identifier in the 'c' if statement"
},
{
"span": {
"replace": [
{
"start": [
1,
42
],
"end": [
1,
43
]
},
{
"start": [
1,
38
],
"end": [
1,
39
]
}
]
},
"summary": "Replaced the 'l' identifier with the 'd' identifier in the 'c' if statement"
},
{
"span": {
"replace": [
{
"start": [
1,
54
],
"end": [
1,
55
]
},
{
"start": [
1,
50
],
"end": [
1,
51
]
}
]
},
"summary": "Replaced the 'm' identifier with the 'e' identifier in the 'e' if statement"
},
{
"span": {
"insert": {
"start": [
1,
53
],
"end": [
1,
54
]
}
},
"summary": "Added the 'f' identifier in the 'e' if statement"
},
{
"span": {
"delete": {
"start": [
1,
59
],
"end": [
1,
60
]
}
},
"summary": "Deleted the 'n' identifier in the 'e' if statement"
},
{
"span": {
"replace": [
{
"start": [
1,
69
],
"end": [
1,
70
]
},
{
"start": [
1,
61
],
"end": [
1,
62
]
}
]
},
"summary": "Replaced the 'o' identifier with the 'g' identifier in the 'e' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-else.js"
],
"patch": [
"diff --git a/if-else.js b/if-else.js",
"index 6bb0eaa7..2034be1b 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"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "8a8df26cb938506ec102e908d4552929a7073d00..0dc2b9999e933cc5f579be3de82aafbe951cd42c"
}
,{
"testCaseDescription": "javascript-if-else-replacement-test",
"expectedResult": {
"changes": {
"if-else.js": [
{
"span": {
"replace": [
{
"start": [
1,
5
],
"end": [
1,
6
]
},
{
"start": [
1,
5
],
"end": [
1,
6
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'g' identifier in the 'g' if statement"
},
{
"span": {
"replace": [
{
"start": [
1,
8
],
"end": [
1,
9
]
},
{
"start": [
1,
8
],
"end": [
1,
9
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'h' identifier in the 'g' if statement"
},
{
"span": {
"replace": [
{
"start": [
1,
20
],
"end": [
1,
21
]
},
{
"start": [
1,
20
],
"end": [
1,
21
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'i' identifier in the 'i' if statement"
},
{
"span": {
"insert": {
"start": [
1,
25
],
"end": [
1,
26
]
}
},
"summary": "Added the 'j' identifier in the 'i' if statement"
},
{
"span": {
"delete": {
"start": [
1,
23
],
"end": [
1,
24
]
}
},
"summary": "Deleted the 'b' identifier in the 'i' if statement"
},
{
"span": {
"replace": [
{
"start": [
1,
35
],
"end": [
1,
36
]
},
{
"start": [
1,
39
],
"end": [
1,
40
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'k' identifier in the 'k' if statement"
},
{
"span": {
"replace": [
{
"start": [
1,
38
],
"end": [
1,
39
]
},
{
"start": [
1,
42
],
"end": [
1,
43
]
}
]
},
"summary": "Replaced the 'd' identifier with the 'l' identifier in the 'k' if statement"
},
{
"span": {
"replace": [
{
"start": [
1,
50
],
"end": [
1,
51
]
},
{
"start": [
1,
54
],
"end": [
1,
55
]
}
]
},
"summary": "Replaced the 'e' identifier with the 'm' identifier in the 'm' if statement"
},
{
"span": {
"insert": {
"start": [
1,
59
],
"end": [
1,
60
]
}
},
"summary": "Added the 'n' identifier in the 'm' if statement"
},
{
"span": {
"delete": {
"start": [
1,
53
],
"end": [
1,
54
]
}
},
"summary": "Deleted the 'f' identifier in the 'm' if statement"
},
{
"span": {
"replace": [
{
"start": [
1,
61
],
"end": [
1,
62
]
},
{
"start": [
1,
69
],
"end": [
1,
70
]
}
]
},
"summary": "Replaced the 'g' identifier with the 'o' identifier in the 'm' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-else.js"
],
"patch": [
"diff --git a/if-else.js b/if-else.js",
"index 2034be1b..6bb0eaa7 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"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "0dc2b9999e933cc5f579be3de82aafbe951cd42c..0b04aed14c61bf7674a5161b0f0de2b45aa73c7d"
}
,{
"testCaseDescription": "javascript-if-else-delete-replacement-test",
"expectedResult": {
"changes": {
"if-else.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
2,
1
]
}
},
"summary": "Deleted the 'g' if statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
3,
1
]
}
},
"summary": "Deleted the 'x' if statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
3,
1
]
}
},
"summary": "Added the 'g' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-else.js"
],
"patch": [
"diff --git a/if-else.js b/if-else.js",
"index 6bb0eaa7..e26d6c43 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"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "0b04aed14c61bf7674a5161b0f0de2b45aa73c7d..805c0a73d13a58a939691a22c60cf60a9bf9ebe9"
}
,{
"testCaseDescription": "javascript-if-else-delete-test",
"expectedResult": {
"changes": {
"if-else.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
2,
1
]
}
},
"summary": "Deleted the 'x' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-else.js"
],
"patch": [
"diff --git a/if-else.js b/if-else.js",
"index e26d6c43..1a55d0bd 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"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "805c0a73d13a58a939691a22c60cf60a9bf9ebe9..c61977d5bbe6b4469c6df78bfaeaff5caca6fa6f"
}
,{
"testCaseDescription": "javascript-if-else-delete-rest-test",
"expectedResult": {
"changes": {
"if-else.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
2,
1
]
}
},
"summary": "Deleted the 'g' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-else.js"
],
"patch": [
"diff --git a/if-else.js b/if-else.js",
"index 1a55d0bd..e69de29b 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"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "c61977d5bbe6b4469c6df78bfaeaff5caca6fa6f..b0cccfc42d36aba8e42003998233c798245c627f"
}]