mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
1049 lines
34 KiB
JSON
1049 lines
34 KiB
JSON
[{
|
|
"testCaseDescription": "go-if-statements-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'main' module with the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if-statements.go"
|
|
],
|
|
"sha1": "ae948d5012e6a04567eacf083e70f96375ffdd4c",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "13f3930aff04fb759c856029f8c5a987a7267ab1"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-if-statements-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
4
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
4
|
|
],
|
|
"end": [
|
|
6,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
14
|
|
],
|
|
"end": [
|
|
6,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'd()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
9,
|
|
4
|
|
],
|
|
"end": [
|
|
9,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'z()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
10,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
12,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'c()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
14,
|
|
4
|
|
],
|
|
"end": [
|
|
14,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
15,
|
|
1
|
|
],
|
|
"end": [
|
|
15,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
17,
|
|
4
|
|
],
|
|
"end": [
|
|
17,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
17,
|
|
14
|
|
],
|
|
"end": [
|
|
17,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
18,
|
|
1
|
|
],
|
|
"end": [
|
|
18,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'd()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
20,
|
|
4
|
|
],
|
|
"end": [
|
|
20,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
21,
|
|
1
|
|
],
|
|
"end": [
|
|
21,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
23,
|
|
1
|
|
],
|
|
"end": [
|
|
23,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'c()' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if-statements.go"
|
|
],
|
|
"sha1": "13f3930aff04fb759c856029f8c5a987a7267ab1",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "91d8667207881cd241f043dd872d5752f634f516"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-if-statements-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
4
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
4
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a() function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
4
|
|
],
|
|
"end": [
|
|
6,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
4
|
|
],
|
|
"end": [
|
|
6,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'y' identifier with the 'a' identifier in the a variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
9,
|
|
4
|
|
],
|
|
"end": [
|
|
9,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
9,
|
|
4
|
|
],
|
|
"end": [
|
|
9,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'z' identifier with the 'a' identifier in the a() function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if-statements.go"
|
|
],
|
|
"sha1": "91d8667207881cd241f043dd872d5752f634f516",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "df0f65cdcd21ade59b00e07348a59037e2628e64"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-if-statements-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
4
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
4
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x() function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
4
|
|
],
|
|
"end": [
|
|
6,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
4
|
|
],
|
|
"end": [
|
|
6,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'y' identifier in the y variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
9,
|
|
4
|
|
],
|
|
"end": [
|
|
9,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
9,
|
|
4
|
|
],
|
|
"end": [
|
|
9,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'z' identifier in the z() function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if-statements.go"
|
|
],
|
|
"sha1": "df0f65cdcd21ade59b00e07348a59037e2628e64",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "960f2fba1e3cc5ffab4d2bef069f23e2145f7663"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-if-statements-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
4
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
4
|
|
],
|
|
"end": [
|
|
6,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
14
|
|
],
|
|
"end": [
|
|
6,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'd()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
9,
|
|
4
|
|
],
|
|
"end": [
|
|
9,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'z()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
10,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
12,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'c()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
14,
|
|
4
|
|
],
|
|
"end": [
|
|
14,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
15,
|
|
1
|
|
],
|
|
"end": [
|
|
15,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
17,
|
|
4
|
|
],
|
|
"end": [
|
|
17,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
17,
|
|
14
|
|
],
|
|
"end": [
|
|
17,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
18,
|
|
1
|
|
],
|
|
"end": [
|
|
18,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'd()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
20,
|
|
4
|
|
],
|
|
"end": [
|
|
20,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
21,
|
|
1
|
|
],
|
|
"end": [
|
|
21,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
23,
|
|
1
|
|
],
|
|
"end": [
|
|
23,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'c()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
14,
|
|
4
|
|
],
|
|
"end": [
|
|
14,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
15,
|
|
1
|
|
],
|
|
"end": [
|
|
15,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
17,
|
|
4
|
|
],
|
|
"end": [
|
|
17,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
17,
|
|
14
|
|
],
|
|
"end": [
|
|
17,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
18,
|
|
1
|
|
],
|
|
"end": [
|
|
18,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'd()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
20,
|
|
4
|
|
],
|
|
"end": [
|
|
20,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'z()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
21,
|
|
1
|
|
],
|
|
"end": [
|
|
21,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
23,
|
|
1
|
|
],
|
|
"end": [
|
|
23,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'c()' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if-statements.go"
|
|
],
|
|
"sha1": "960f2fba1e3cc5ffab4d2bef069f23e2145f7663",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "a40c8e1c0947cf1a231accfa231b661221616a2e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-if-statements-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
4
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
4
|
|
],
|
|
"end": [
|
|
6,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
14
|
|
],
|
|
"end": [
|
|
6,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'd()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
9,
|
|
4
|
|
],
|
|
"end": [
|
|
9,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
10,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
12,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'c()' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if-statements.go"
|
|
],
|
|
"sha1": "a40c8e1c0947cf1a231accfa231b661221616a2e",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "8293c0a5ac57c143014fe6948fdfc1ed352cd337"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-if-statements-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
1
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'main' module with the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if-statements.go"
|
|
],
|
|
"sha1": "8293c0a5ac57c143014fe6948fdfc1ed352cd337",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "4961ece78a5ae3daeec52eddce0a3a5ded25ca57"
|
|
}]
|