[{ "testCaseDescription": "go-for-statements-insert-test", "expectedResult": { "changes": { "for-statements.go": [ { "span": { "insert": { "start": [ 1, 2 ], "end": [ 4, 2 ] } }, "summary": "Added the 'for {\na()\ngoto loop\n}' for statement" }, { "span": { "insert": { "start": [ 5, 1 ], "end": [ 8, 2 ] } }, "summary": "Added the 'i := 0; i < 5; i++' for statement" }, { "span": { "insert": { "start": [ 9, 1 ], "end": [ 12, 2 ] } }, "summary": "Added the 'i < 10; i++' for statement" }, { "span": { "insert": { "start": [ 13, 1 ], "end": [ 16, 2 ] } }, "summary": "Added the 'for ;; {\na()\ncontinue\n}' for statement" }, { "span": { "insert": { "start": [ 17, 1 ], "end": [ 20, 2 ] } }, "summary": "Added the 'x := range y' for statement" } ] }, "errors": {} }, "filePaths": [ "for-statements.go" ], "patch": [ "diff --git a/for-statements.go b/for-statements.go", "index e69de29..cf40a00 100644", "--- a/for-statements.go", "+++ b/for-statements.go", "@@ -0,0 +1,20 @@", "+ for {", "+a()", "+goto loop", "+}", "+for i := 0; i < 5; i++ {", "+a()", "+break loop", "+}", "+for ; i < 10; i++ {", "+a()", "+continue loop2", "+}", "+for ;; {", "+a()", "+continue", "+}", "+for x := range y {", "+a(x)", "+break", "+}" ], "gitDir": "test/corpus/repos/go", "shas": "d2477a592fdd731c7bb7e1b1d1fe4b3b87939257..6984ba63ffd00c83f5187b731ed31f1fb3e92136" } ,{ "testCaseDescription": "go-for-statements-replacement-insert-test", "expectedResult": { "changes": { "for-statements.go": [ { "span": { "insert": { "start": [ 1, 2 ], "end": [ 4, 2 ] } }, "summary": "Added the 'for ;; {\na()\ngoto loop\n}' for statement" }, { "span": { "insert": { "start": [ 5, 1 ], "end": [ 8, 2 ] } }, "summary": "Added the 'x := range y' for statement" }, { "span": { "insert": { "start": [ 9, 1 ], "end": [ 12, 2 ] } }, "summary": "Added the 'for ;; {\na()\ncontinue loop2\n}' for statement" }, { "span": { "insert": { "start": [ 13, 1 ], "end": [ 16, 2 ] } }, "summary": "Added the 'i < 10; i++' for statement" }, { "span": { "insert": { "start": [ 17, 1 ], "end": [ 20, 2 ] } }, "summary": "Added the 'for {\na(x)\nbreak\n}' for statement" }, { "span": { "insert": { "start": [ 21, 2 ], "end": [ 24, 2 ] } }, "summary": "Added the 'for {\na()\ngoto loop\n}' for statement" }, { "span": { "insert": { "start": [ 25, 1 ], "end": [ 28, 2 ] } }, "summary": "Added the 'i := 0; i < 5; i++' for statement" }, { "span": { "insert": { "start": [ 29, 1 ], "end": [ 32, 2 ] } }, "summary": "Added the 'i < 10; i++' for statement" }, { "span": { "insert": { "start": [ 33, 1 ], "end": [ 36, 2 ] } }, "summary": "Added the 'for ;; {\na()\ncontinue\n}' for statement" }, { "span": { "insert": { "start": [ 37, 1 ], "end": [ 40, 2 ] } }, "summary": "Added the 'x := range y' for statement" } ] }, "errors": {} }, "filePaths": [ "for-statements.go" ], "patch": [ "diff --git a/for-statements.go b/for-statements.go", "index cf40a00..4fd7ac5 100644", "--- a/for-statements.go", "+++ b/for-statements.go", "@@ -1,3 +1,43 @@", "+ for ;; {", "+a()", "+goto loop", "+}", "+for x := range y {", "+a()", "+break loop", "+}", "+for ;; {", "+a()", "+continue loop2", "+}", "+for ; i < 10; i++ {", "+a()", "+continue", "+}", "+for {", "+a(x)", "+break", "+}", "+ for {", "+a()", "+goto loop", "+}", "+for i := 0; i < 5; i++ {", "+a()", "+break loop", "+}", "+for ; i < 10; i++ {", "+a()", "+continue loop2", "+}", "+for ;; {", "+a()", "+continue", "+}", "+for x := range y {", "+a(x)", "+break", "+}", " for {", " a()", " goto loop" ], "gitDir": "test/corpus/repos/go", "shas": "6984ba63ffd00c83f5187b731ed31f1fb3e92136..2ceaeb8bb7db636422d1c53c2afa970cce458854" } ,{ "testCaseDescription": "go-for-statements-delete-insert-test", "expectedResult": { "changes": { "for-statements.go": [ { "span": { "insert": { "start": [ 5, 1 ], "end": [ 8, 2 ] } }, "summary": "Added the 'i := 0; i < 5; i++' for statement" }, { "span": { "insert": { "start": [ 9, 1 ], "end": [ 12, 2 ] } }, "summary": "Added the 'i < 10; i++' for statement" }, { "span": { "insert": { "start": [ 13, 1 ], "end": [ 16, 2 ] } }, "summary": "Added the 'for ;; {\na()\ncontinue\n}' for statement" }, { "span": { "replace": [ { "start": [ 6, 1 ], "end": [ 6, 4 ] }, { "start": [ 18, 1 ], "end": [ 18, 5 ] } ] }, "summary": "Replaced the 'a()' function call with the 'a(x)' at line 18, column 1 - line 18, column 5" }, { "span": { "replace": [ { "start": [ 7, 7 ], "end": [ 7, 11 ] }, { "start": [ 19, 1 ], "end": [ 19, 6 ] } ] }, "summary": "Replaced the 'loop' identifier with the 'break' break_statement" }, { "span": { "delete": { "start": [ 9, 1 ], "end": [ 12, 2 ] } }, "summary": "Deleted the 'for ;; {\na()\ncontinue loop2\n}' for statement" }, { "span": { "delete": { "start": [ 13, 1 ], "end": [ 16, 2 ] } }, "summary": "Deleted the 'i < 10; i++' for statement" }, { "span": { "delete": { "start": [ 17, 1 ], "end": [ 20, 2 ] } }, "summary": "Deleted the 'for {\na(x)\nbreak\n}' for statement" } ] }, "errors": {} }, "filePaths": [ "for-statements.go" ], "patch": [ "diff --git a/for-statements.go b/for-statements.go", "index 4fd7ac5..ac76ef3 100644", "--- a/for-statements.go", "+++ b/for-statements.go", "@@ -1,20 +1,20 @@", "- for ;; {", "+ for {", " a()", " goto loop", " }", "-for x := range y {", "+for i := 0; i < 5; i++ {", " a()", " break loop", " }", "-for ;; {", "+for ; i < 10; i++ {", " a()", " continue loop2", " }", "-for ; i < 10; i++ {", "+for ;; {", " a()", " continue", " }", "-for {", "+for x := range y {", " a(x)", " break", " }" ], "gitDir": "test/corpus/repos/go", "shas": "2ceaeb8bb7db636422d1c53c2afa970cce458854..cd69afc283ced0496ec51adf52ec8d39ccfe3301" } ,{ "testCaseDescription": "go-for-statements-replacement-test", "expectedResult": { "changes": { "for-statements.go": [ { "span": { "insert": { "start": [ 5, 1 ], "end": [ 8, 2 ] } }, "summary": "Added the 'x := range y' for statement" }, { "span": { "insert": { "start": [ 9, 1 ], "end": [ 12, 2 ] } }, "summary": "Added the 'for ;; {\na()\ncontinue loop2\n}' for statement" }, { "span": { "insert": { "start": [ 13, 1 ], "end": [ 16, 2 ] } }, "summary": "Added the 'i < 10; i++' for statement" }, { "span": { "insert": { "start": [ 17, 1 ], "end": [ 20, 2 ] } }, "summary": "Added the 'for {\na(x)\nbreak\n}' for statement" }, { "span": { "delete": { "start": [ 5, 1 ], "end": [ 8, 2 ] } }, "summary": "Deleted the 'i := 0; i < 5; i++' for statement" }, { "span": { "delete": { "start": [ 9, 1 ], "end": [ 12, 2 ] } }, "summary": "Deleted the 'i < 10; i++' for statement" }, { "span": { "delete": { "start": [ 13, 1 ], "end": [ 16, 2 ] } }, "summary": "Deleted the 'for ;; {\na()\ncontinue\n}' for statement" }, { "span": { "delete": { "start": [ 17, 1 ], "end": [ 20, 2 ] } }, "summary": "Deleted the 'x := range y' for statement" } ] }, "errors": {} }, "filePaths": [ "for-statements.go" ], "patch": [ "diff --git a/for-statements.go b/for-statements.go", "index ac76ef3..4fd7ac5 100644", "--- a/for-statements.go", "+++ b/for-statements.go", "@@ -1,20 +1,20 @@", "- for {", "+ for ;; {", " a()", " goto loop", " }", "-for i := 0; i < 5; i++ {", "+for x := range y {", " a()", " break loop", " }", "-for ; i < 10; i++ {", "+for ;; {", " a()", " continue loop2", " }", "-for ;; {", "+for ; i < 10; i++ {", " a()", " continue", " }", "-for x := range y {", "+for {", " a(x)", " break", " }" ], "gitDir": "test/corpus/repos/go", "shas": "cd69afc283ced0496ec51adf52ec8d39ccfe3301..bef0883962d7c1d15b1e6ae1c2bc212c15769210" } ,{ "testCaseDescription": "go-for-statements-delete-replacement-test", "expectedResult": { "changes": { "for-statements.go": [ { "span": { "delete": { "start": [ 1, 2 ], "end": [ 4, 2 ] } }, "summary": "Deleted the 'for ;; {\na()\ngoto loop\n}' for statement" }, { "span": { "delete": { "start": [ 5, 1 ], "end": [ 8, 2 ] } }, "summary": "Deleted the 'x := range y' for statement" }, { "span": { "delete": { "start": [ 9, 1 ], "end": [ 12, 2 ] } }, "summary": "Deleted the 'for ;; {\na()\ncontinue loop2\n}' for statement" }, { "span": { "delete": { "start": [ 13, 1 ], "end": [ 16, 2 ] } }, "summary": "Deleted the 'i < 10; i++' for statement" }, { "span": { "delete": { "start": [ 17, 1 ], "end": [ 20, 2 ] } }, "summary": "Deleted the 'for {\na(x)\nbreak\n}' for statement" }, { "span": { "insert": { "start": [ 25, 1 ], "end": [ 28, 2 ] } }, "summary": "Added the 'x := range y' for statement" }, { "span": { "insert": { "start": [ 29, 1 ], "end": [ 32, 2 ] } }, "summary": "Added the 'for ;; {\na()\ncontinue loop2\n}' for statement" }, { "span": { "insert": { "start": [ 33, 1 ], "end": [ 36, 2 ] } }, "summary": "Added the 'i < 10; i++' for statement" }, { "span": { "insert": { "start": [ 37, 1 ], "end": [ 40, 2 ] } }, "summary": "Added the 'for {\na(x)\nbreak\n}' for statement" }, { "span": { "delete": { "start": [ 45, 1 ], "end": [ 48, 2 ] } }, "summary": "Deleted the 'i := 0; i < 5; i++' for statement" }, { "span": { "delete": { "start": [ 49, 1 ], "end": [ 52, 2 ] } }, "summary": "Deleted the 'i < 10; i++' for statement" }, { "span": { "delete": { "start": [ 53, 1 ], "end": [ 56, 2 ] } }, "summary": "Deleted the 'for ;; {\na()\ncontinue\n}' for statement" }, { "span": { "delete": { "start": [ 57, 1 ], "end": [ 60, 2 ] } }, "summary": "Deleted the 'x := range y' for statement" } ] }, "errors": {} }, "filePaths": [ "for-statements.go" ], "patch": [ "diff --git a/for-statements.go b/for-statements.go", "index 4fd7ac5..53849f8 100644", "--- a/for-statements.go", "+++ b/for-statements.go", "@@ -1,23 +1,3 @@", "- for ;; {", "-a()", "-goto loop", "-}", "-for x := range y {", "-a()", "-break loop", "-}", "-for ;; {", "-a()", "-continue loop2", "-}", "-for ; i < 10; i++ {", "-a()", "-continue", "-}", "-for {", "-a(x)", "-break", "-}", " for {", " a()", " goto loop", "@@ -38,23 +18,23 @@ for x := range y {", " a(x)", " break", " }", "- for {", "+ for ;; {", " a()", " goto loop", " }", "-for i := 0; i < 5; i++ {", "+for x := range y {", " a()", " break loop", " }", "-for ; i < 10; i++ {", "+for ;; {", " a()", " continue loop2", " }", "-for ;; {", "+for ; i < 10; i++ {", " a()", " continue", " }", "-for x := range y {", "+for {", " a(x)", " break", " }" ], "gitDir": "test/corpus/repos/go", "shas": "bef0883962d7c1d15b1e6ae1c2bc212c15769210..3b2e93ef38806de39708ec266b3994fa93e4a92e" } ,{ "testCaseDescription": "go-for-statements-delete-test", "expectedResult": { "changes": { "for-statements.go": [ { "span": { "delete": { "start": [ 1, 2 ], "end": [ 4, 2 ] } }, "summary": "Deleted the 'for {\na()\ngoto loop\n}' for statement" }, { "span": { "delete": { "start": [ 5, 1 ], "end": [ 8, 2 ] } }, "summary": "Deleted the 'i := 0; i < 5; i++' for statement" }, { "span": { "delete": { "start": [ 9, 1 ], "end": [ 12, 2 ] } }, "summary": "Deleted the 'i < 10; i++' for statement" }, { "span": { "delete": { "start": [ 13, 1 ], "end": [ 16, 2 ] } }, "summary": "Deleted the 'for ;; {\na()\ncontinue\n}' for statement" }, { "span": { "delete": { "start": [ 17, 1 ], "end": [ 20, 2 ] } }, "summary": "Deleted the 'x := range y' for statement" } ] }, "errors": {} }, "filePaths": [ "for-statements.go" ], "patch": [ "diff --git a/for-statements.go b/for-statements.go", "index 53849f8..c242f13 100644", "--- a/for-statements.go", "+++ b/for-statements.go", "@@ -1,23 +1,3 @@", "- for {", "-a()", "-goto loop", "-}", "-for i := 0; i < 5; i++ {", "-a()", "-break loop", "-}", "-for ; i < 10; i++ {", "-a()", "-continue loop2", "-}", "-for ;; {", "-a()", "-continue", "-}", "-for x := range y {", "-a(x)", "-break", "-}", " for ;; {", " a()", " goto loop" ], "gitDir": "test/corpus/repos/go", "shas": "3b2e93ef38806de39708ec266b3994fa93e4a92e..cfa1315edd0fa9bf2b9a48632ca47f3c4f79fdd1" } ,{ "testCaseDescription": "go-for-statements-delete-rest-test", "expectedResult": { "changes": { "for-statements.go": [ { "span": { "delete": { "start": [ 1, 2 ], "end": [ 4, 2 ] } }, "summary": "Deleted the 'for ;; {\na()\ngoto loop\n}' for statement" }, { "span": { "delete": { "start": [ 5, 1 ], "end": [ 8, 2 ] } }, "summary": "Deleted the 'x := range y' for statement" }, { "span": { "delete": { "start": [ 9, 1 ], "end": [ 12, 2 ] } }, "summary": "Deleted the 'for ;; {\na()\ncontinue loop2\n}' for statement" }, { "span": { "delete": { "start": [ 13, 1 ], "end": [ 16, 2 ] } }, "summary": "Deleted the 'i < 10; i++' for statement" }, { "span": { "delete": { "start": [ 17, 1 ], "end": [ 20, 2 ] } }, "summary": "Deleted the 'for {\na(x)\nbreak\n}' for statement" } ] }, "errors": {} }, "filePaths": [ "for-statements.go" ], "patch": [ "diff --git a/for-statements.go b/for-statements.go", "index c242f13..e69de29 100644", "--- a/for-statements.go", "+++ b/for-statements.go", "@@ -1,20 +0,0 @@", "- for ;; {", "-a()", "-goto loop", "-}", "-for x := range y {", "-a()", "-break loop", "-}", "-for ;; {", "-a()", "-continue loop2", "-}", "-for ; i < 10; i++ {", "-a()", "-continue", "-}", "-for {", "-a(x)", "-break", "-}" ], "gitDir": "test/corpus/repos/go", "shas": "cfa1315edd0fa9bf2b9a48632ca47f3c4f79fdd1..1cfc4770f33afe51641b5c1ed9683984d1ac4ae5" }]