2016-10-27 00:32:08 +03:00
|
|
|
[{
|
|
|
|
"testCaseDescription": "ruby-if-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
7,
|
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'foo' if statement"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if.rb b/if.rb",
|
|
|
|
"index e69de29..c4c729f 100644",
|
|
|
|
"--- a/if.rb",
|
|
|
|
"+++ b/if.rb",
|
|
|
|
"@@ -0,0 +1,7 @@",
|
|
|
|
"+if foo",
|
|
|
|
"+ bar",
|
|
|
|
"+elsif quux",
|
|
|
|
"+ baz",
|
|
|
|
"+else",
|
|
|
|
"+ bat",
|
|
|
|
"+end"
|
|
|
|
],
|
2016-10-27 00:32:08 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-12-06 02:58:20 +03:00
|
|
|
"shas": "a8b440ad76232e4e95f5a5ed53b9b6604ece8a17..4469095014f7bc3f2ba06bba93197b7113965a36"
|
2016-10-27 00:32:08 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-if-replacement-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
2,
|
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'x' if statement"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
3,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'y' if statement"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
11,
|
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'foo' if statement"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if.rb b/if.rb",
|
|
|
|
"index c4c729f..326833f 100644",
|
|
|
|
"--- a/if.rb",
|
|
|
|
"+++ b/if.rb",
|
|
|
|
"@@ -1,3 +1,14 @@",
|
|
|
|
"+if x",
|
|
|
|
"+end",
|
|
|
|
"+if y then",
|
|
|
|
"+end",
|
|
|
|
"+if foo",
|
|
|
|
"+ bar",
|
|
|
|
"+elsif quux",
|
|
|
|
"+ baz",
|
|
|
|
"+else",
|
|
|
|
"+ bat",
|
|
|
|
"+end",
|
|
|
|
" if foo",
|
|
|
|
" bar",
|
|
|
|
" elsif quux"
|
|
|
|
],
|
2016-10-27 00:32:08 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-12-06 02:58:20 +03:00
|
|
|
"shas": "4469095014f7bc3f2ba06bba93197b7113965a36..49f95d96fcf4b3e1ddc5d64c6d19c1f1415aa21f"
|
2016-10-27 00:32:08 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-if-delete-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
4
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
4
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-05 01:35:09 +03:00
|
|
|
"summary": "Replaced the 'x' identifier with the 'foo' identifier in the 'foo' if statement"
|
2016-10-27 00:32:08 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-02 22:32:46 +03:00
|
|
|
2,
|
|
|
|
3
|
2016-10-27 00:32:08 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-11-02 22:32:46 +03:00
|
|
|
2,
|
|
|
|
6
|
2016-10-27 00:32:08 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-05 01:35:09 +03:00
|
|
|
"summary": "Added the 'bar' identifier in the 'foo' if statement"
|
2016-10-27 00:32:08 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-02 22:32:46 +03:00
|
|
|
3,
|
|
|
|
1
|
2016-10-27 00:32:08 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-06 02:58:20 +03:00
|
|
|
7,
|
2016-11-02 22:32:46 +03:00
|
|
|
1
|
2016-10-27 00:32:08 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-05 01:35:09 +03:00
|
|
|
"summary": "Added the 'quux' elsif block in the 'foo' if statement"
|
2016-10-27 00:32:08 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
3,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'y' if statement"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if.rb b/if.rb",
|
|
|
|
"index 326833f..2cbbfda 100644",
|
|
|
|
"--- a/if.rb",
|
|
|
|
"+++ b/if.rb",
|
|
|
|
"@@ -1,6 +1,9 @@",
|
|
|
|
"-if x",
|
|
|
|
"-end",
|
|
|
|
"-if y then",
|
|
|
|
"+if foo",
|
|
|
|
"+ bar",
|
|
|
|
"+elsif quux",
|
|
|
|
"+ baz",
|
|
|
|
"+else",
|
|
|
|
"+ bat",
|
|
|
|
" end",
|
|
|
|
" if foo",
|
|
|
|
" bar"
|
|
|
|
],
|
2016-10-27 00:32:08 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-12-06 02:58:20 +03:00
|
|
|
"shas": "49f95d96fcf4b3e1ddc5d64c6d19c1f1415aa21f..69de797721bf90b5e163efddf6c21683973e91e5"
|
2016-10-27 00:32:08 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-if-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
4
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
4
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-05 01:35:09 +03:00
|
|
|
"summary": "Replaced the 'foo' identifier with the 'x' identifier in the 'x' if statement"
|
2016-10-27 00:32:08 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-02 22:32:46 +03:00
|
|
|
2,
|
|
|
|
3
|
2016-10-27 00:32:08 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-11-02 22:32:46 +03:00
|
|
|
2,
|
|
|
|
6
|
2016-10-27 00:32:08 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-05 01:35:09 +03:00
|
|
|
"summary": "Deleted the 'bar' identifier in the 'x' if statement"
|
2016-10-27 00:32:08 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-02 22:32:46 +03:00
|
|
|
3,
|
|
|
|
1
|
2016-10-27 00:32:08 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-06 02:58:20 +03:00
|
|
|
7,
|
2016-11-02 22:32:46 +03:00
|
|
|
1
|
2016-10-27 00:32:08 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-05 01:35:09 +03:00
|
|
|
"summary": "Deleted the 'quux' elsif block in the 'x' if statement"
|
2016-10-27 00:32:08 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
3,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'y' if statement"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if.rb b/if.rb",
|
|
|
|
"index 2cbbfda..326833f 100644",
|
|
|
|
"--- a/if.rb",
|
|
|
|
"+++ b/if.rb",
|
|
|
|
"@@ -1,9 +1,6 @@",
|
|
|
|
"-if foo",
|
|
|
|
"- bar",
|
|
|
|
"-elsif quux",
|
|
|
|
"- baz",
|
|
|
|
"-else",
|
|
|
|
"- bat",
|
|
|
|
"+if x",
|
|
|
|
"+end",
|
|
|
|
"+if y then",
|
|
|
|
" end",
|
|
|
|
" if foo",
|
|
|
|
" bar"
|
|
|
|
],
|
2016-10-27 00:32:08 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-12-06 02:58:20 +03:00
|
|
|
"shas": "69de797721bf90b5e163efddf6c21683973e91e5..c4dc260bbc97bb7f7c90d41a7ee7418e31529715"
|
2016-10-27 00:32:08 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-if-delete-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
12,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
18,
|
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'foo' if statement"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if.rb b/if.rb",
|
|
|
|
"index 326833f..2927cc0 100644",
|
|
|
|
"--- a/if.rb",
|
|
|
|
"+++ b/if.rb",
|
|
|
|
"@@ -1,7 +1,3 @@",
|
|
|
|
"-if x",
|
|
|
|
"-end",
|
|
|
|
"-if y then",
|
|
|
|
"-end",
|
|
|
|
" if foo",
|
|
|
|
" bar",
|
|
|
|
" elsif quux",
|
|
|
|
"@@ -9,10 +5,7 @@ elsif quux",
|
|
|
|
" else",
|
|
|
|
" bat",
|
|
|
|
" end",
|
|
|
|
"-if foo",
|
|
|
|
"- bar",
|
|
|
|
"-elsif quux",
|
|
|
|
"- baz",
|
|
|
|
"-else",
|
|
|
|
"- bat",
|
|
|
|
"+if x",
|
|
|
|
"+end",
|
|
|
|
"+if y then",
|
|
|
|
" end"
|
|
|
|
],
|
2016-10-27 00:32:08 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-12-06 02:58:20 +03:00
|
|
|
"shas": "c4dc260bbc97bb7f7c90d41a7ee7418e31529715..941d12bbe9281602e9f778ef87716fa0cdc94f6c"
|
2016-10-27 00:32:08 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-if-delete-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
7,
|
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'foo' if statement"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if.rb b/if.rb",
|
|
|
|
"index 2927cc0..5bfb167 100644",
|
|
|
|
"--- a/if.rb",
|
|
|
|
"+++ b/if.rb",
|
|
|
|
"@@ -1,10 +1,3 @@",
|
|
|
|
"-if foo",
|
|
|
|
"- bar",
|
|
|
|
"-elsif quux",
|
|
|
|
"- baz",
|
|
|
|
"-else",
|
|
|
|
"- bat",
|
|
|
|
"-end",
|
|
|
|
" if x",
|
|
|
|
" end",
|
|
|
|
" if y then"
|
|
|
|
],
|
2016-10-27 00:32:08 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-12-06 02:58:20 +03:00
|
|
|
"shas": "941d12bbe9281602e9f778ef87716fa0cdc94f6c..79311ce946c9650610644371262924744f9acecc"
|
2016-10-27 00:32:08 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-if-delete-rest-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
2,
|
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'x' if statement"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
3,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'y' if statement"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if.rb b/if.rb",
|
|
|
|
"index 5bfb167..e69de29 100644",
|
|
|
|
"--- a/if.rb",
|
|
|
|
"+++ b/if.rb",
|
|
|
|
"@@ -1,4 +0,0 @@",
|
|
|
|
"-if x",
|
|
|
|
"-end",
|
|
|
|
"-if y then",
|
|
|
|
"-end"
|
|
|
|
],
|
2016-10-27 00:32:08 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-12-06 02:58:20 +03:00
|
|
|
"shas": "79311ce946c9650610644371262924744f9acecc..6745758f03dc308eff3e95e8876445225bcdf49e"
|
2016-10-27 00:32:08 +03:00
|
|
|
}]
|