2016-11-02 17:50:05 +03:00
|
|
|
[{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-constructors-setup-test",
|
2016-11-02 17:50:05 +03:00
|
|
|
"expectedResult": {
|
2016-12-02 00:03:52 +03:00
|
|
|
"changes": {
|
2016-11-02 17:50:05 +03:00
|
|
|
"constructors.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2017-01-24 23:09:28 +03:00
|
|
|
1,
|
|
|
|
13
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-12-02 00:03:52 +03:00
|
|
|
"summary": "Added the 'main' module"
|
2017-01-24 23:09:28 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
3,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
2
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'main' function"
|
2016-11-11 00:19:53 +03:00
|
|
|
}
|
|
|
|
]
|
2016-12-02 00:03:52 +03:00
|
|
|
},
|
|
|
|
"errors": {}
|
2016-11-11 00:19:53 +03:00
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"constructors.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/constructors.go b/constructors.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index e69de29b..79058077 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/constructors.go",
|
|
|
|
"+++ b/constructors.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -0,0 +1,5 @@",
|
|
|
|
"+package main",
|
|
|
|
"+",
|
|
|
|
"+func main() {",
|
|
|
|
"+",
|
|
|
|
"+}"
|
2016-11-11 00:19:53 +03:00
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-02-07 18:51:15 +03:00
|
|
|
"shas": "0250472bf2d4727dbb4522c246d1d1f5552a8071..58305f05b5633c2f89f20d9febcc9783083b19c8"
|
2016-11-11 00:19:53 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-constructors-insert-test",
|
2016-11-11 00:19:53 +03:00
|
|
|
"expectedResult": {
|
2016-12-02 00:07:40 +03:00
|
|
|
"changes": {
|
2016-11-11 00:19:53 +03:00
|
|
|
"constructors.go": [
|
2016-11-02 17:50:05 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-12-02 00:03:52 +03:00
|
|
|
1
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-12-02 00:03:52 +03:00
|
|
|
17
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Added the 'make(chan<- int)' function call in the main function"
|
2016-11-11 00:19:53 +03:00
|
|
|
},
|
2016-11-02 17:50:05 +03:00
|
|
|
{
|
|
|
|
"span": {
|
2016-11-11 00:19:53 +03:00
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
2016-12-02 00:03:52 +03:00
|
|
|
30
|
2016-11-11 00:19:53 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Added the 'make(chan<- int, …)' function call in the main function"
|
2016-11-11 00:19:53 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
6,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
6,
|
2016-11-22 23:10:04 +03:00
|
|
|
24
|
2016-11-11 00:19:53 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Added the 'make(chan<- int, 5, 10)' function call in the main function"
|
2016-11-11 00:19:53 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
2016-11-22 23:10:04 +03:00
|
|
|
2
|
2016-11-11 00:19:53 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
2016-11-22 23:10:04 +03:00
|
|
|
24
|
2016-11-11 00:19:53 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Added the 'new(…)' function call in the main function"
|
2016-11-11 00:19:53 +03:00
|
|
|
}
|
|
|
|
]
|
2016-12-02 00:07:40 +03:00
|
|
|
},
|
|
|
|
"errors": {}
|
2016-11-11 00:19:53 +03:00
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"constructors.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/constructors.go b/constructors.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index 79058077..082e65fd 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/constructors.go",
|
|
|
|
"+++ b/constructors.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -1,5 +1,8 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
|
|
|
"-",
|
2016-11-11 00:19:53 +03:00
|
|
|
"+make(chan<- int)",
|
|
|
|
"+make(chan<- int, (new - old))",
|
|
|
|
"+make(chan<- int, 5, 10)",
|
|
|
|
"+ new(map[string]string)",
|
2016-12-02 00:03:52 +03:00
|
|
|
" }"
|
2016-11-11 00:19:53 +03:00
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-02-07 18:51:15 +03:00
|
|
|
"shas": "58305f05b5633c2f89f20d9febcc9783083b19c8..2f9533535cadeb5ec661546671dd5dd0a395fb08"
|
2016-11-11 00:19:53 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-constructors-replacement-test",
|
2016-11-11 00:19:53 +03:00
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"constructors.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
2016-11-02 17:50:05 +03:00
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
4,
|
|
|
|
16
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
4,
|
|
|
|
19
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2017-01-17 23:26:07 +03:00
|
|
|
"summary": "Replaced the 'int' identifier with the 'string' identifier in the chan<- string channel type of the 'main' function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
|
|
|
16
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
|
|
|
19
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2017-01-17 23:26:07 +03:00
|
|
|
"summary": "Replaced the 'int' identifier with the 'string' identifier in the chan<- string channel type of the 'main' function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
2016-11-11 00:19:53 +03:00
|
|
|
13
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
16
|
2016-11-11 00:19:53 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
2016-11-11 00:19:53 +03:00
|
|
|
13
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
19
|
2016-11-11 00:19:53 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2017-01-17 23:26:07 +03:00
|
|
|
"summary": "Replaced the 'int' identifier with the 'string' identifier in the chan<- string channel type of the 'main' function"
|
2016-11-11 00:19:53 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
18
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
19
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
21
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
22
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2017-01-17 23:26:07 +03:00
|
|
|
"summary": "Replaced '5' with '7' in the make(chan<- string, 7, 11) function call of the 'main' function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
21
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
23
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
24
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
26
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2017-01-17 23:26:07 +03:00
|
|
|
"summary": "Replaced '10' with '11' in the make(chan<- string, 7, 11) function call of the 'main' function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
|
|
|
16
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
|
|
|
13
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-12-02 00:07:40 +03:00
|
|
|
"summary": "Replaced the 'string' identifier with the 'int' identifier in the new(…) function call of the 'main' function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
|
|
|
17
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
|
|
|
23
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
|
|
|
14
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
|
|
|
17
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-12-02 00:07:40 +03:00
|
|
|
"summary": "Replaced the 'string' identifier with the 'int' identifier in the new(…) function call of the 'main' function"
|
2016-11-02 17:50:05 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"constructors.go"
|
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/constructors.go b/constructors.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index 082e65fd..e4fdb2e9 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/constructors.go",
|
|
|
|
"+++ b/constructors.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -1,8 +1,8 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
|
|
|
"-make(chan<- int)",
|
|
|
|
"-make(chan<- int, (new - old))",
|
|
|
|
"-make(chan<- int, 5, 10)",
|
|
|
|
"- new(map[string]string)",
|
|
|
|
"+make(chan<- string)",
|
|
|
|
"+make(chan<- string, (new - old))",
|
|
|
|
"+make(chan<- string, 7, 11)",
|
|
|
|
"+ new(map[int]int)",
|
|
|
|
" }"
|
2016-11-11 00:19:53 +03:00
|
|
|
],
|
2016-11-02 17:50:05 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-02-07 18:51:15 +03:00
|
|
|
"shas": "2f9533535cadeb5ec661546671dd5dd0a395fb08..0068232ed171bbcd77d8347de97d5531ea834f41"
|
2016-11-02 17:50:05 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-constructors-delete-replacement-test",
|
2016-11-02 17:50:05 +03:00
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"constructors.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
4,
|
|
|
|
19
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
4,
|
|
|
|
16
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2017-01-17 23:26:07 +03:00
|
|
|
"summary": "Replaced the 'string' identifier with the 'int' identifier in the chan<- int channel type of the 'main' function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
|
|
|
19
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
|
|
|
16
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2017-01-17 23:26:07 +03:00
|
|
|
"summary": "Replaced the 'string' identifier with the 'int' identifier in the chan<- int channel type of the 'main' function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
19
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
16
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2017-01-17 23:26:07 +03:00
|
|
|
"summary": "Replaced the 'string' identifier with the 'int' identifier in the chan<- int channel type of the 'main' function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
21
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
22
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
18
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
19
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2017-01-17 23:26:07 +03:00
|
|
|
"summary": "Replaced '7' with '5' in the make(chan<- int, 5, 10) function call of the 'main' function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
24
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
26
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
21
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
23
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2017-01-17 23:26:07 +03:00
|
|
|
"summary": "Replaced '11' with '10' in the make(chan<- int, 5, 10) function call of the 'main' function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
|
|
|
13
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
|
|
|
16
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-12-02 00:07:40 +03:00
|
|
|
"summary": "Replaced the 'int' identifier with the 'string' identifier in the new(…) function call of the 'main' function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
|
|
|
14
|
2016-11-22 23:10:04 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
|
|
|
17
|
2016-11-22 23:10:04 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
|
|
|
17
|
2016-11-22 23:10:04 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
|
|
|
23
|
2016-11-22 23:10:04 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
2016-12-02 00:07:40 +03:00
|
|
|
"summary": "Replaced the 'int' identifier with the 'string' identifier in the new(…) function call of the 'main' function"
|
2016-11-11 00:19:53 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"constructors.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/constructors.go b/constructors.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index e4fdb2e9..082e65fd 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/constructors.go",
|
|
|
|
"+++ b/constructors.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -1,8 +1,8 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
2016-11-22 23:10:04 +03:00
|
|
|
"-make(chan<- string)",
|
|
|
|
"-make(chan<- string, (new - old))",
|
|
|
|
"-make(chan<- string, 7, 11)",
|
|
|
|
"- new(map[int]int)",
|
2016-12-02 00:03:52 +03:00
|
|
|
"+make(chan<- int)",
|
|
|
|
"+make(chan<- int, (new - old))",
|
|
|
|
"+make(chan<- int, 5, 10)",
|
|
|
|
"+ new(map[string]string)",
|
|
|
|
" }"
|
2016-11-11 00:19:53 +03:00
|
|
|
],
|
2016-11-02 17:50:05 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-02-07 18:51:15 +03:00
|
|
|
"shas": "0068232ed171bbcd77d8347de97d5531ea834f41..990fc1eeef53108bc6ca1a5d7ee7351d479cbc78"
|
2016-11-02 17:50:05 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-constructors-delete-insert-test",
|
2016-11-02 17:50:05 +03:00
|
|
|
"expectedResult": {
|
2016-12-02 00:07:40 +03:00
|
|
|
"changes": {
|
2016-11-02 17:50:05 +03:00
|
|
|
"constructors.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
4,
|
2016-11-22 23:10:04 +03:00
|
|
|
17
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Deleted the 'make(chan<- int)' function call in the main function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
2016-11-02 17:50:05 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
2016-11-22 23:10:04 +03:00
|
|
|
30
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Deleted the 'make(chan<- int, …)' function call in the main function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
2016-11-22 23:10:04 +03:00
|
|
|
1
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
2016-11-22 23:10:04 +03:00
|
|
|
24
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Deleted the 'make(chan<- int, 5, 10)' function call in the main function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
2016-11-22 23:10:04 +03:00
|
|
|
2
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
2016-11-22 23:10:04 +03:00
|
|
|
24
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Deleted the 'new(…)' function call in the main function"
|
2016-11-22 23:10:04 +03:00
|
|
|
}
|
|
|
|
]
|
2016-12-02 00:07:40 +03:00
|
|
|
},
|
|
|
|
"errors": {}
|
2016-11-22 23:10:04 +03:00
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"constructors.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/constructors.go b/constructors.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index 082e65fd..79058077 100644",
|
2016-11-22 23:10:04 +03:00
|
|
|
"--- a/constructors.go",
|
|
|
|
"+++ b/constructors.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -1,8 +1,5 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
2016-11-22 23:10:04 +03:00
|
|
|
"-make(chan<- int)",
|
|
|
|
"-make(chan<- int, (new - old))",
|
|
|
|
"-make(chan<- int, 5, 10)",
|
|
|
|
"- new(map[string]string)",
|
2016-12-02 00:03:52 +03:00
|
|
|
"+",
|
|
|
|
" }"
|
2016-11-22 23:10:04 +03:00
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-02-07 18:51:15 +03:00
|
|
|
"shas": "990fc1eeef53108bc6ca1a5d7ee7351d479cbc78..f587c29538a2f33234e73b6eaff4ac2824c07919"
|
2016-11-22 23:10:04 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-constructors-teardown-test",
|
2016-11-22 23:10:04 +03:00
|
|
|
"expectedResult": {
|
2016-12-02 00:03:52 +03:00
|
|
|
"changes": {
|
2016-11-22 23:10:04 +03:00
|
|
|
"constructors.go": [
|
2016-11-02 17:50:05 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-22 23:10:04 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2017-01-24 23:09:28 +03:00
|
|
|
1,
|
|
|
|
13
|
2016-11-02 17:50:05 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-12-02 00:03:52 +03:00
|
|
|
"summary": "Deleted the 'main' module"
|
2017-01-24 23:09:28 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
3,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
2
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'main' function"
|
2016-11-02 17:50:05 +03:00
|
|
|
}
|
|
|
|
]
|
2016-12-02 00:03:52 +03:00
|
|
|
},
|
|
|
|
"errors": {}
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"constructors.go"
|
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/constructors.go b/constructors.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index 79058077..e69de29b 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/constructors.go",
|
|
|
|
"+++ b/constructors.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -1,5 +0,0 @@",
|
|
|
|
"-package main",
|
|
|
|
"-",
|
|
|
|
"-func main() {",
|
|
|
|
"-",
|
|
|
|
"-}"
|
2016-11-02 17:50:05 +03:00
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-02-07 18:51:15 +03:00
|
|
|
"shas": "f587c29538a2f33234e73b6eaff4ac2824c07919..e002d077df73ef77746435ffaa5ce884b02b66f6"
|
2016-11-02 17:50:05 +03:00
|
|
|
}]
|