[{ "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": "a24aa3e2b60f060695159e452b2b3e4604f1fc89..e7ade6ff61ffc13af629b35f6938219b0fc16aed" } ,{ "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": "e7ade6ff61ffc13af629b35f6938219b0fc16aed..8391c65da6fdfbe50f17356e490bbfe548a751ab" } ,{ "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, 2 ] } ] }, "summary": "Replaced the 'a()' function call with the 'a' identifier" }, { "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": "8391c65da6fdfbe50f17356e490bbfe548a751ab..99c4701084cb432eeeb119a574dff6744c545757" } ,{ "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": "99c4701084cb432eeeb119a574dff6744c545757..f3f2a8588145f83c8bd257714e279bf31c014c83" } ,{ "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": "f3f2a8588145f83c8bd257714e279bf31c014c83..7d0d622961021892e4ca8a4a5c634db4cadb3abb" } ,{ "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": "7d0d622961021892e4ca8a4a5c634db4cadb3abb..1712d12bfa3e539c99330713660ff71bbb538aa1" } ,{ "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": "1712d12bfa3e539c99330713660ff71bbb538aa1..9c5cbc32b0b9e1d0466db151c6106dca83be2bee" }]