mirror of
https://github.com/github/semantic.git
synced 2024-12-24 15:35:14 +03:00
1139 lines
36 KiB
JSON
1139 lines
36 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": "ebdebdac636f0c31c439a07859f1b6228a007470",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "a59c6243a223c61d2119dc7272fa74bc2fa8bf88"
|
|
}
|
|
,{
|
|
"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,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
9
|
|
],
|
|
"end": [
|
|
6,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b()' function call"
|
|
},
|
|
{
|
|
"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,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
17,
|
|
9
|
|
],
|
|
"end": [
|
|
17,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b()' function call"
|
|
},
|
|
{
|
|
"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": "a59c6243a223c61d2119dc7272fa74bc2fa8bf88",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "b183642dcdd066b2ebb32594f2828f4fe276560b"
|
|
}
|
|
,{
|
|
"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"
|
|
},
|
|
{
|
|
"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": "b183642dcdd066b2ebb32594f2828f4fe276560b",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "e512ab1f85b55375689e64068747abe5c16b2161"
|
|
}
|
|
,{
|
|
"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"
|
|
},
|
|
{
|
|
"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": "e512ab1f85b55375689e64068747abe5c16b2161",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "74e1acc8ef7a27bbe975dbb76e03f0f231268bd1"
|
|
}
|
|
,{
|
|
"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,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
9
|
|
],
|
|
"end": [
|
|
6,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b()' function call"
|
|
},
|
|
{
|
|
"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,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
17,
|
|
9
|
|
],
|
|
"end": [
|
|
17,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b()' function call"
|
|
},
|
|
{
|
|
"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,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
17,
|
|
9
|
|
],
|
|
"end": [
|
|
17,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b()' function call"
|
|
},
|
|
{
|
|
"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": "74e1acc8ef7a27bbe975dbb76e03f0f231268bd1",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "abb4a11c3fdc719a663576f2757ceb653b276512"
|
|
}
|
|
,{
|
|
"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,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
9
|
|
],
|
|
"end": [
|
|
6,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b()' function call"
|
|
},
|
|
{
|
|
"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": "abb4a11c3fdc719a663576f2757ceb653b276512",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "04eeca8bfaf75e0b6d4d8afa15c365387ef4b73b"
|
|
}
|
|
,{
|
|
"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": "04eeca8bfaf75e0b6d4d8afa15c365387ef4b73b",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "505d8869fe35a89665f1e84ec047dc51299afe77"
|
|
}]
|