1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/javascript/chained-callbacks.json
2016-11-03 16:02:56 -07:00

456 lines
15 KiB
JSON

[{
"testCaseDescription": "javascript-chained-callbacks-insert-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
39
]
}
},
"summary": "Added the 'this.map(…)' method call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index e69de29..ce9ee1e 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -0,0 +1 @@",
"+this.map(function (a) { return a.b; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "1512ae1cef2a096ce2723ce98334e4ce0e4bc82b..2a014ee8fd6ea4f8ce5b6bae0ca35a4fa6462deb"
}
,{
"testCaseDescription": "javascript-chained-callbacks-replacement-insert-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
42
]
}
},
"summary": "Added the 'this.reduce(…)' method call"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
39
]
}
},
"summary": "Added the 'this.map(…)' method call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index ce9ee1e..acba744 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -1 +1,3 @@",
"+this.reduce(function (a) { return b.a; })",
"+this.map(function (a) { return a.b; })",
" this.map(function (a) { return a.b; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "2a014ee8fd6ea4f8ce5b6bae0ca35a4fa6462deb..6a6e1ae99abc9cae5f8ac31aac43836380944603"
}
,{
"testCaseDescription": "javascript-chained-callbacks-delete-insert-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"replace": [
{
"start": [
1,
6
],
"end": [
1,
12
]
},
{
"start": [
1,
6
],
"end": [
1,
9
]
}
]
},
"summary": "Replaced the 'reduce' identifier with the 'map' identifier in the this.map(…) method call"
},
{
"span": {
"replace": [
{
"start": [
1,
35
],
"end": [
1,
36
]
},
{
"start": [
1,
32
],
"end": [
1,
33
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'a' identifier in the this.map(…) method call"
},
{
"span": {
"replace": [
{
"start": [
1,
37
],
"end": [
1,
38
]
},
{
"start": [
1,
34
],
"end": [
1,
35
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'b' identifier in the this.map(…) method call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index acba744..7390534 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -1,3 +1,3 @@",
"-this.reduce(function (a) { return b.a; })",
"+this.map(function (a) { return a.b; })",
" this.map(function (a) { return a.b; })",
" this.map(function (a) { return a.b; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "6a6e1ae99abc9cae5f8ac31aac43836380944603..c86429cb689c74e2ce3988c8bc257a365734cbe3"
}
,{
"testCaseDescription": "javascript-chained-callbacks-replacement-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"replace": [
{
"start": [
1,
6
],
"end": [
1,
9
]
},
{
"start": [
1,
6
],
"end": [
1,
12
]
}
]
},
"summary": "Replaced the 'map' identifier with the 'reduce' identifier in the this.reduce(…) method call"
},
{
"span": {
"replace": [
{
"start": [
1,
32
],
"end": [
1,
33
]
},
{
"start": [
1,
35
],
"end": [
1,
36
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'b' identifier in the this.reduce(…) method call"
},
{
"span": {
"replace": [
{
"start": [
1,
34
],
"end": [
1,
35
]
},
{
"start": [
1,
37
],
"end": [
1,
38
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'a' identifier in the this.reduce(…) method call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index 7390534..acba744 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -1,3 +1,3 @@",
"-this.map(function (a) { return a.b; })",
"+this.reduce(function (a) { return b.a; })",
" this.map(function (a) { return a.b; })",
" this.map(function (a) { return a.b; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "c86429cb689c74e2ce3988c8bc257a365734cbe3..c4df0b8afdd73cae6d89a9098ae38d9c3085dbb8"
}
,{
"testCaseDescription": "javascript-chained-callbacks-delete-replacement-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
42
]
}
},
"summary": "Deleted the 'this.reduce(…)' method call"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
39
]
}
},
"summary": "Deleted the 'this.map(…)' method call"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
42
]
}
},
"summary": "Added the 'this.reduce(…)' method call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index acba744..c4db432 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -1,3 +1,2 @@",
"-this.reduce(function (a) { return b.a; })",
"-this.map(function (a) { return a.b; })",
" this.map(function (a) { return a.b; })",
"+this.reduce(function (a) { return b.a; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "c4df0b8afdd73cae6d89a9098ae38d9c3085dbb8..8b7dbbb0ca20e47dfed24fb3eb3a790721d2e9d0"
}
,{
"testCaseDescription": "javascript-chained-callbacks-delete-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
39
]
}
},
"summary": "Deleted the 'this.map(…)' method call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index c4db432..e593419 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -1,2 +1 @@",
"-this.map(function (a) { return a.b; })",
" this.reduce(function (a) { return b.a; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "8b7dbbb0ca20e47dfed24fb3eb3a790721d2e9d0..e2c2e86db834a0ab3c6006c6385e90d780851357"
}
,{
"testCaseDescription": "javascript-chained-callbacks-delete-rest-test",
"expectedResult": {
"changes": {
"chained-callbacks.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
42
]
}
},
"summary": "Deleted the 'this.reduce(…)' method call"
}
]
},
"errors": {}
},
"filePaths": [
"chained-callbacks.js"
],
"patch": [
"diff --git a/chained-callbacks.js b/chained-callbacks.js",
"index e593419..e69de29 100644",
"--- a/chained-callbacks.js",
"+++ b/chained-callbacks.js",
"@@ -1 +0,0 @@",
"-this.reduce(function (a) { return b.a; })"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "e2c2e86db834a0ab3c6006c6385e90d780851357..5ef42771e35b5af39f3befe137fedf40f174a5c7"
}]