mirror of
https://github.com/github/semantic.git
synced 2024-12-24 15:35:14 +03:00
713 lines
24 KiB
JSON
713 lines
24 KiB
JSON
[{
|
|
"testCaseDescription": "go-constructors-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"constructors.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"constructors.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/constructors.go b/constructors.go",
|
|
"index e69de29..7905807 100644",
|
|
"--- a/constructors.go",
|
|
"+++ b/constructors.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "21e727f376a9c78c9ad9d0828abd21c3361ca339..c6cbd6861b982731b97f7a277261893ba9672182"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-constructors-insert-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {
|
|
"constructors.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'make(chan<- int)' at line 4, column 1 - line 4, column 17 in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
30
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'make(chan<- int, (new - old))' at line 5, column 1 - line 5, column 30 in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'make(chan<- int, 5, 10)' at line 6, column 1 - line 6, column 24 in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
2
|
|
],
|
|
"end": [
|
|
7,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'new(map[string]string)' at line 7, column 2 - line 7, column 24 in the main function of the 'main' module"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"constructors.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/constructors.go b/constructors.go",
|
|
"index 7905807..082e65f 100644",
|
|
"--- a/constructors.go",
|
|
"+++ b/constructors.go",
|
|
"@@ -1,5 +1,8 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+make(chan<- int)",
|
|
"+make(chan<- int, (new - old))",
|
|
"+make(chan<- int, 5, 10)",
|
|
"+ new(map[string]string)",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "c6cbd6861b982731b97f7a277261893ba9672182..129f4848b7f01bbb8345b0c292de53bf2768f845"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-constructors-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"constructors.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
13
|
|
],
|
|
"end": [
|
|
4,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
13
|
|
],
|
|
"end": [
|
|
4,
|
|
19
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'int' identifier with the 'string' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
13
|
|
],
|
|
"end": [
|
|
5,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
13
|
|
],
|
|
"end": [
|
|
5,
|
|
19
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'int' identifier with the 'string' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
13
|
|
],
|
|
"end": [
|
|
6,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
13
|
|
],
|
|
"end": [
|
|
6,
|
|
19
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'int' identifier with the 'string' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
18
|
|
],
|
|
"end": [
|
|
6,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
21
|
|
],
|
|
"end": [
|
|
6,
|
|
22
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '5' with '7' in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
21
|
|
],
|
|
"end": [
|
|
6,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
24
|
|
],
|
|
"end": [
|
|
6,
|
|
26
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '10' with '11' in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
10
|
|
],
|
|
"end": [
|
|
7,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
10
|
|
],
|
|
"end": [
|
|
7,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'string' identifier with the 'int' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
17
|
|
],
|
|
"end": [
|
|
7,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
14
|
|
],
|
|
"end": [
|
|
7,
|
|
17
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'string' identifier with the 'int' identifier in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"constructors.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/constructors.go b/constructors.go",
|
|
"index 082e65f..e4fdb2e 100644",
|
|
"--- a/constructors.go",
|
|
"+++ b/constructors.go",
|
|
"@@ -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)",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "129f4848b7f01bbb8345b0c292de53bf2768f845..dcfd4dc038c351edbad4dacca2cea5616d17bf6e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-constructors-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"constructors.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
13
|
|
],
|
|
"end": [
|
|
4,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
13
|
|
],
|
|
"end": [
|
|
4,
|
|
16
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'string' identifier with the 'int' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
13
|
|
],
|
|
"end": [
|
|
5,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
13
|
|
],
|
|
"end": [
|
|
5,
|
|
16
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'string' identifier with the 'int' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
13
|
|
],
|
|
"end": [
|
|
6,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
13
|
|
],
|
|
"end": [
|
|
6,
|
|
16
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'string' identifier with the 'int' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
21
|
|
],
|
|
"end": [
|
|
6,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
18
|
|
],
|
|
"end": [
|
|
6,
|
|
19
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '7' with '5' in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
24
|
|
],
|
|
"end": [
|
|
6,
|
|
26
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
21
|
|
],
|
|
"end": [
|
|
6,
|
|
23
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '11' with '10' in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
10
|
|
],
|
|
"end": [
|
|
7,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
10
|
|
],
|
|
"end": [
|
|
7,
|
|
16
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'int' identifier with the 'string' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
14
|
|
],
|
|
"end": [
|
|
7,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
17
|
|
],
|
|
"end": [
|
|
7,
|
|
23
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'int' identifier with the 'string' identifier in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"constructors.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/constructors.go b/constructors.go",
|
|
"index e4fdb2e..082e65f 100644",
|
|
"--- a/constructors.go",
|
|
"+++ b/constructors.go",
|
|
"@@ -1,8 +1,8 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-make(chan<- string)",
|
|
"-make(chan<- string, (new - old))",
|
|
"-make(chan<- string, 7, 11)",
|
|
"- new(map[int]int)",
|
|
"+make(chan<- int)",
|
|
"+make(chan<- int, (new - old))",
|
|
"+make(chan<- int, 5, 10)",
|
|
"+ new(map[string]string)",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "dcfd4dc038c351edbad4dacca2cea5616d17bf6e..a4c42877e9dfd541fcde44659a4140139b16216f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-constructors-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {
|
|
"constructors.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'make(chan<- int)' at line 4, column 1 - line 4, column 17 in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
30
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'make(chan<- int, (new - old))' at line 5, column 1 - line 5, column 30 in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'make(chan<- int, 5, 10)' at line 6, column 1 - line 6, column 24 in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
2
|
|
],
|
|
"end": [
|
|
7,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'new(map[string]string)' at line 7, column 2 - line 7, column 24 in the main function of the 'main' module"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"constructors.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/constructors.go b/constructors.go",
|
|
"index 082e65f..7905807 100644",
|
|
"--- a/constructors.go",
|
|
"+++ b/constructors.go",
|
|
"@@ -1,8 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-make(chan<- int)",
|
|
"-make(chan<- int, (new - old))",
|
|
"-make(chan<- int, 5, 10)",
|
|
"- new(map[string]string)",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a4c42877e9dfd541fcde44659a4140139b16216f..ce8fcfc4cec00f77323276fcc4530ab4cf230a86"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-constructors-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"constructors.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"constructors.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/constructors.go b/constructors.go",
|
|
"index 7905807..e69de29 100644",
|
|
"--- a/constructors.go",
|
|
"+++ b/constructors.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "ce8fcfc4cec00f77323276fcc4530ab4cf230a86..e3fdc3dffa62a0c8db531accad41fd5b55963868"
|
|
}]
|