[{ "testCaseDescription": "go-map-literals-setup-test", "expectedResult": { "changes": { "map-literals.go": [ { "span": { "insert": { "start": [ 1, 1 ], "end": [ 1, 13 ] } }, "summary": "Added the 'main' module" }, { "span": { "insert": { "start": [ 3, 1 ], "end": [ 5, 2 ] } }, "summary": "Added the 'main' function" } ] }, "errors": {} }, "filePaths": [ "map-literals.go" ], "patch": [ "diff --git a/map-literals.go b/map-literals.go", "index e69de29b..79058077 100644", "--- a/map-literals.go", "+++ b/map-literals.go", "@@ -0,0 +1,5 @@", "+package main", "+", "+func main() {", "+", "+}" ], "gitDir": "test/corpus/repos/go", "shas": "7d45b7b9d0cd21bc6e8f950464bb9ad4e1230ed9..aeb65aaeb42ef307d45dc401bf4b5738a16eebfb" } ,{ "testCaseDescription": "go-map-literals-insert-test", "expectedResult": { "changes": { "map-literals.go": [ { "span": { "insert": { "start": [ 4, 7 ], "end": [ 7, 2 ] } }, "summary": "Added the 's' var assignment in the main function" } ] }, "errors": {} }, "filePaths": [ "map-literals.go" ], "patch": [ "diff --git a/map-literals.go b/map-literals.go", "index 79058077..bb99b5ba 100644", "--- a/map-literals.go", "+++ b/map-literals.go", "@@ -1,5 +1,8 @@", " package main", " ", " func main() {", "-", "+const s = map[string]string{", "+\"hi\": \"hello\",", "+\"bye\": \"goodbye\",", "+}", " }" ], "gitDir": "test/corpus/repos/go", "shas": "aeb65aaeb42ef307d45dc401bf4b5738a16eebfb..b94d9a451e86fca1469ce881b26582fc41915f9a" } ,{ "testCaseDescription": "go-map-literals-replacement-test", "expectedResult": { "changes": { "map-literals.go": [ { "span": { "replace": [ { "start": [ 4, 22 ], "end": [ 4, 28 ] }, { "start": [ 4, 22 ], "end": [ 4, 25 ] } ] }, "summary": "Replaced the 'string' identifier with the 'int' identifier in the map[string]int composite_literal of the 'main' function" }, { "span": { "insert": { "start": [ 5, 1 ], "end": [ 5, 13 ] } }, "summary": "Added the '\"foo\": \"bar\"' pair in the map[string]int composite_literal of the 'main' function" }, { "span": { "replace": [ { "start": [ 5, 1 ], "end": [ 5, 5 ] }, { "start": [ 6, 1 ], "end": [ 6, 6 ] } ] }, "summary": "Replaced the \"hi\" string with the \"baz\" string in the \"baz\": \"hello\" pair of the 'main' function" }, { "span": { "delete": { "start": [ 6, 1 ], "end": [ 6, 17 ] } }, "summary": "Deleted the '\"bye\": \"goodbye\"' pair in the map[string]int composite_literal of the 'main' function" } ] }, "errors": {} }, "filePaths": [ "map-literals.go" ], "patch": [ "diff --git a/map-literals.go b/map-literals.go", "index bb99b5ba..a9e0b664 100644", "--- a/map-literals.go", "+++ b/map-literals.go", "@@ -1,8 +1,8 @@", " package main", " ", " func main() {", "-const s = map[string]string{", "-\"hi\": \"hello\",", "-\"bye\": \"goodbye\",", "+const s = map[string]int{", "+\"foo\": \"bar\",", "+\"baz\": \"hello\",", " }", " }" ], "gitDir": "test/corpus/repos/go", "shas": "b94d9a451e86fca1469ce881b26582fc41915f9a..f6ea0d0bccc307a7878e179cd7546cbc68db017b" } ,{ "testCaseDescription": "go-map-literals-delete-replacement-test", "expectedResult": { "changes": { "map-literals.go": [ { "span": { "replace": [ { "start": [ 4, 22 ], "end": [ 4, 25 ] }, { "start": [ 4, 22 ], "end": [ 4, 28 ] } ] }, "summary": "Replaced the 'int' identifier with the 'string' identifier in the map[string]string composite_literal of the 'main' function" }, { "span": { "replace": [ { "start": [ 5, 1 ], "end": [ 5, 6 ] }, { "start": [ 5, 1 ], "end": [ 5, 5 ] } ] }, "summary": "Replaced the \"foo\" string with the \"hi\" string in the \"hi\": \"hello\" pair of the 'main' function" }, { "span": { "replace": [ { "start": [ 5, 8 ], "end": [ 5, 13 ] }, { "start": [ 5, 7 ], "end": [ 5, 14 ] } ] }, "summary": "Replaced the \"bar\" string with the \"hello\" string in the \"hi\": \"hello\" pair of the 'main' function" }, { "span": { "replace": [ { "start": [ 6, 1 ], "end": [ 6, 6 ] }, { "start": [ 6, 1 ], "end": [ 6, 6 ] } ] }, "summary": "Replaced the \"baz\" string with the \"bye\" string in the \"bye\": \"goodbye\" pair of the 'main' function" }, { "span": { "replace": [ { "start": [ 6, 8 ], "end": [ 6, 15 ] }, { "start": [ 6, 8 ], "end": [ 6, 17 ] } ] }, "summary": "Replaced the \"hello\" string with the \"goodbye\" string in the \"bye\": \"goodbye\" pair of the 'main' function" } ] }, "errors": {} }, "filePaths": [ "map-literals.go" ], "patch": [ "diff --git a/map-literals.go b/map-literals.go", "index a9e0b664..bb99b5ba 100644", "--- a/map-literals.go", "+++ b/map-literals.go", "@@ -1,8 +1,8 @@", " package main", " ", " func main() {", "-const s = map[string]int{", "-\"foo\": \"bar\",", "-\"baz\": \"hello\",", "+const s = map[string]string{", "+\"hi\": \"hello\",", "+\"bye\": \"goodbye\",", " }", " }" ], "gitDir": "test/corpus/repos/go", "shas": "f6ea0d0bccc307a7878e179cd7546cbc68db017b..4c873fd8153b765bd75faac471b7d65e2b32729a" } ,{ "testCaseDescription": "go-map-literals-delete-insert-test", "expectedResult": { "changes": { "map-literals.go": [ { "span": { "delete": { "start": [ 4, 7 ], "end": [ 7, 2 ] } }, "summary": "Deleted the 's' var assignment in the main function" } ] }, "errors": {} }, "filePaths": [ "map-literals.go" ], "patch": [ "diff --git a/map-literals.go b/map-literals.go", "index bb99b5ba..79058077 100644", "--- a/map-literals.go", "+++ b/map-literals.go", "@@ -1,8 +1,5 @@", " package main", " ", " func main() {", "-const s = map[string]string{", "-\"hi\": \"hello\",", "-\"bye\": \"goodbye\",", "-}", "+", " }" ], "gitDir": "test/corpus/repos/go", "shas": "4c873fd8153b765bd75faac471b7d65e2b32729a..3a38582f722148eb574ef089d38273eef0f47ff8" } ,{ "testCaseDescription": "go-map-literals-teardown-test", "expectedResult": { "changes": { "map-literals.go": [ { "span": { "delete": { "start": [ 1, 1 ], "end": [ 1, 13 ] } }, "summary": "Deleted the 'main' module" }, { "span": { "delete": { "start": [ 3, 1 ], "end": [ 5, 2 ] } }, "summary": "Deleted the 'main' function" } ] }, "errors": {} }, "filePaths": [ "map-literals.go" ], "patch": [ "diff --git a/map-literals.go b/map-literals.go", "index 79058077..e69de29b 100644", "--- a/map-literals.go", "+++ b/map-literals.go", "@@ -1,5 +0,0 @@", "-package main", "-", "-func main() {", "-", "-}" ], "gitDir": "test/corpus/repos/go", "shas": "3a38582f722148eb574ef089d38273eef0f47ff8..7daeec28ef0d87b8689a78b17f7326b34bdb0a5a" }]