mirror of
https://github.com/github/semantic.git
synced 2024-12-24 15:35:14 +03:00
2891 lines
92 KiB
JSON
2891 lines
92 KiB
JSON
[{
|
|
"testCaseDescription": "go-for-statements-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-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": [
|
|
"for-statements.go"
|
|
],
|
|
"sha1": "d0afc2e652c5efeb2093ef6281ada2d7f415f1da",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "de0de48205cea09a3cd728c13bf3b1391ed4537b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-for-statements-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
6
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
5
|
|
],
|
|
"end": [
|
|
7,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
16
|
|
],
|
|
"end": [
|
|
7,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
9,
|
|
7
|
|
],
|
|
"end": [
|
|
9,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
11,
|
|
5
|
|
],
|
|
"end": [
|
|
11,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
12,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
13,
|
|
10
|
|
],
|
|
"end": [
|
|
13,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'loop2' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
15,
|
|
7
|
|
],
|
|
"end": [
|
|
15,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
15,
|
|
11
|
|
],
|
|
"end": [
|
|
15,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '10'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
15,
|
|
15
|
|
],
|
|
"end": [
|
|
15,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
16,
|
|
1
|
|
],
|
|
"end": [
|
|
16,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
17,
|
|
1
|
|
],
|
|
"end": [
|
|
17,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'continue' continue_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
20,
|
|
1
|
|
],
|
|
"end": [
|
|
20,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
20,
|
|
3
|
|
],
|
|
"end": [
|
|
20,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
21,
|
|
1
|
|
],
|
|
"end": [
|
|
21,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'break' break_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
24,
|
|
1
|
|
],
|
|
"end": [
|
|
24,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
25,
|
|
6
|
|
],
|
|
"end": [
|
|
25,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
27,
|
|
5
|
|
],
|
|
"end": [
|
|
27,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
27,
|
|
13
|
|
],
|
|
"end": [
|
|
27,
|
|
14
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
27,
|
|
17
|
|
],
|
|
"end": [
|
|
27,
|
|
18
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '5'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
27,
|
|
20
|
|
],
|
|
"end": [
|
|
27,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
28,
|
|
1
|
|
],
|
|
"end": [
|
|
28,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
29,
|
|
7
|
|
],
|
|
"end": [
|
|
29,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
31,
|
|
7
|
|
],
|
|
"end": [
|
|
31,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
31,
|
|
11
|
|
],
|
|
"end": [
|
|
31,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '10'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
31,
|
|
15
|
|
],
|
|
"end": [
|
|
31,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
32,
|
|
1
|
|
],
|
|
"end": [
|
|
32,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
33,
|
|
10
|
|
],
|
|
"end": [
|
|
33,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'loop2' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
35,
|
|
5
|
|
],
|
|
"end": [
|
|
35,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
36,
|
|
1
|
|
],
|
|
"end": [
|
|
36,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
37,
|
|
1
|
|
],
|
|
"end": [
|
|
37,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'continue' continue_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
39,
|
|
5
|
|
],
|
|
"end": [
|
|
39,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
39,
|
|
16
|
|
],
|
|
"end": [
|
|
39,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
40,
|
|
1
|
|
],
|
|
"end": [
|
|
40,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
40,
|
|
3
|
|
],
|
|
"end": [
|
|
40,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
41,
|
|
1
|
|
],
|
|
"end": [
|
|
41,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'break' break_statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-statements.go"
|
|
],
|
|
"sha1": "de0de48205cea09a3cd728c13bf3b1391ed4537b",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "2d167136f44fb7266a3f337fdb5c0f30f1c6a74f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-for-statements-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
6
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
5
|
|
],
|
|
"end": [
|
|
7,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
13
|
|
],
|
|
"end": [
|
|
7,
|
|
14
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
17
|
|
],
|
|
"end": [
|
|
7,
|
|
18
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '5'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
20
|
|
],
|
|
"end": [
|
|
7,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
9,
|
|
7
|
|
],
|
|
"end": [
|
|
9,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
11,
|
|
7
|
|
],
|
|
"end": [
|
|
11,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
11,
|
|
11
|
|
],
|
|
"end": [
|
|
11,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '10'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
11,
|
|
15
|
|
],
|
|
"end": [
|
|
11,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
12,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
13,
|
|
10
|
|
],
|
|
"end": [
|
|
13,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'loop2' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
15,
|
|
5
|
|
],
|
|
"end": [
|
|
15,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
16,
|
|
1
|
|
],
|
|
"end": [
|
|
16,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
17,
|
|
1
|
|
],
|
|
"end": [
|
|
17,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'continue' continue_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
20,
|
|
1
|
|
],
|
|
"end": [
|
|
20,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a()' function call with the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
9,
|
|
7
|
|
],
|
|
"end": [
|
|
9,
|
|
11
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
21,
|
|
1
|
|
],
|
|
"end": [
|
|
21,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'loop' identifier with the 'break' break_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
11,
|
|
5
|
|
],
|
|
"end": [
|
|
11,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
12,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
13,
|
|
10
|
|
],
|
|
"end": [
|
|
13,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'loop2' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
15,
|
|
7
|
|
],
|
|
"end": [
|
|
15,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
15,
|
|
11
|
|
],
|
|
"end": [
|
|
15,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '10'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
15,
|
|
15
|
|
],
|
|
"end": [
|
|
15,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
16,
|
|
1
|
|
],
|
|
"end": [
|
|
16,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
17,
|
|
1
|
|
],
|
|
"end": [
|
|
17,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'continue' continue_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
20,
|
|
1
|
|
],
|
|
"end": [
|
|
20,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
20,
|
|
3
|
|
],
|
|
"end": [
|
|
20,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
21,
|
|
1
|
|
],
|
|
"end": [
|
|
21,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'break' break_statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-statements.go"
|
|
],
|
|
"sha1": "2d167136f44fb7266a3f337fdb5c0f30f1c6a74f",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "4d46be416e5b8ea9e3b3e161fbf73b18c4323e8f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-for-statements-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
6
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
5
|
|
],
|
|
"end": [
|
|
7,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
16
|
|
],
|
|
"end": [
|
|
7,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
9,
|
|
7
|
|
],
|
|
"end": [
|
|
9,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
11,
|
|
5
|
|
],
|
|
"end": [
|
|
11,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
12,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
13,
|
|
10
|
|
],
|
|
"end": [
|
|
13,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'loop2' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
15,
|
|
7
|
|
],
|
|
"end": [
|
|
15,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
15,
|
|
11
|
|
],
|
|
"end": [
|
|
15,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '10'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
15,
|
|
15
|
|
],
|
|
"end": [
|
|
15,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
16,
|
|
1
|
|
],
|
|
"end": [
|
|
16,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
17,
|
|
1
|
|
],
|
|
"end": [
|
|
17,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'continue' continue_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
20,
|
|
1
|
|
],
|
|
"end": [
|
|
20,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
20,
|
|
3
|
|
],
|
|
"end": [
|
|
20,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
21,
|
|
1
|
|
],
|
|
"end": [
|
|
21,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'break' break_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
5
|
|
],
|
|
"end": [
|
|
7,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
13
|
|
],
|
|
"end": [
|
|
7,
|
|
14
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
17
|
|
],
|
|
"end": [
|
|
7,
|
|
18
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '5'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
20
|
|
],
|
|
"end": [
|
|
7,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
9,
|
|
7
|
|
],
|
|
"end": [
|
|
9,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
11,
|
|
7
|
|
],
|
|
"end": [
|
|
11,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
11,
|
|
11
|
|
],
|
|
"end": [
|
|
11,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '10'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
11,
|
|
15
|
|
],
|
|
"end": [
|
|
11,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
12,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
13,
|
|
10
|
|
],
|
|
"end": [
|
|
13,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'loop2' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
15,
|
|
5
|
|
],
|
|
"end": [
|
|
15,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
16,
|
|
1
|
|
],
|
|
"end": [
|
|
16,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
17,
|
|
1
|
|
],
|
|
"end": [
|
|
17,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'continue' continue_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
19,
|
|
5
|
|
],
|
|
"end": [
|
|
19,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
19,
|
|
16
|
|
],
|
|
"end": [
|
|
19,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
20,
|
|
1
|
|
],
|
|
"end": [
|
|
20,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
20,
|
|
3
|
|
],
|
|
"end": [
|
|
20,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
21,
|
|
1
|
|
],
|
|
"end": [
|
|
21,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'break' break_statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-statements.go"
|
|
],
|
|
"sha1": "4d46be416e5b8ea9e3b3e161fbf73b18c4323e8f",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "e31be408062bab3ff17ac0bf4985c227f2df2672"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-for-statements-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
6
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
5
|
|
],
|
|
"end": [
|
|
7,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
16
|
|
],
|
|
"end": [
|
|
7,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
9,
|
|
7
|
|
],
|
|
"end": [
|
|
9,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
11,
|
|
5
|
|
],
|
|
"end": [
|
|
11,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
12,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
13,
|
|
10
|
|
],
|
|
"end": [
|
|
13,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'loop2' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
15,
|
|
7
|
|
],
|
|
"end": [
|
|
15,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
15,
|
|
11
|
|
],
|
|
"end": [
|
|
15,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '10'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
15,
|
|
15
|
|
],
|
|
"end": [
|
|
15,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
16,
|
|
1
|
|
],
|
|
"end": [
|
|
16,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
17,
|
|
1
|
|
],
|
|
"end": [
|
|
17,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'continue' continue_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
20,
|
|
1
|
|
],
|
|
"end": [
|
|
20,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
20,
|
|
3
|
|
],
|
|
"end": [
|
|
20,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
21,
|
|
1
|
|
],
|
|
"end": [
|
|
21,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'break' break_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
24,
|
|
1
|
|
],
|
|
"end": [
|
|
24,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
25,
|
|
6
|
|
],
|
|
"end": [
|
|
25,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
27,
|
|
5
|
|
],
|
|
"end": [
|
|
27,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
27,
|
|
13
|
|
],
|
|
"end": [
|
|
27,
|
|
14
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
27,
|
|
17
|
|
],
|
|
"end": [
|
|
27,
|
|
18
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '5'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
27,
|
|
20
|
|
],
|
|
"end": [
|
|
27,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
28,
|
|
1
|
|
],
|
|
"end": [
|
|
28,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
29,
|
|
7
|
|
],
|
|
"end": [
|
|
29,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
31,
|
|
7
|
|
],
|
|
"end": [
|
|
31,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
31,
|
|
11
|
|
],
|
|
"end": [
|
|
31,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '10'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
31,
|
|
15
|
|
],
|
|
"end": [
|
|
31,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
32,
|
|
1
|
|
],
|
|
"end": [
|
|
32,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
33,
|
|
10
|
|
],
|
|
"end": [
|
|
33,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'loop2' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
35,
|
|
5
|
|
],
|
|
"end": [
|
|
35,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
36,
|
|
1
|
|
],
|
|
"end": [
|
|
36,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
37,
|
|
1
|
|
],
|
|
"end": [
|
|
37,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'continue' continue_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
39,
|
|
5
|
|
],
|
|
"end": [
|
|
39,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
39,
|
|
16
|
|
],
|
|
"end": [
|
|
39,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
40,
|
|
1
|
|
],
|
|
"end": [
|
|
40,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
40,
|
|
3
|
|
],
|
|
"end": [
|
|
40,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
41,
|
|
1
|
|
],
|
|
"end": [
|
|
41,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'break' break_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
23,
|
|
6
|
|
],
|
|
"end": [
|
|
23,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
24,
|
|
1
|
|
],
|
|
"end": [
|
|
24,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
25,
|
|
6
|
|
],
|
|
"end": [
|
|
25,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
27,
|
|
5
|
|
],
|
|
"end": [
|
|
27,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
27,
|
|
16
|
|
],
|
|
"end": [
|
|
27,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
28,
|
|
1
|
|
],
|
|
"end": [
|
|
28,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
29,
|
|
7
|
|
],
|
|
"end": [
|
|
29,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
31,
|
|
5
|
|
],
|
|
"end": [
|
|
31,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
32,
|
|
1
|
|
],
|
|
"end": [
|
|
32,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
33,
|
|
10
|
|
],
|
|
"end": [
|
|
33,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'loop2' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
35,
|
|
7
|
|
],
|
|
"end": [
|
|
35,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
35,
|
|
11
|
|
],
|
|
"end": [
|
|
35,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '10'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
35,
|
|
15
|
|
],
|
|
"end": [
|
|
35,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
36,
|
|
1
|
|
],
|
|
"end": [
|
|
36,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
37,
|
|
1
|
|
],
|
|
"end": [
|
|
37,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'continue' continue_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
40,
|
|
1
|
|
],
|
|
"end": [
|
|
40,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
40,
|
|
3
|
|
],
|
|
"end": [
|
|
40,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
41,
|
|
1
|
|
],
|
|
"end": [
|
|
41,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'break' break_statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-statements.go"
|
|
],
|
|
"sha1": "e31be408062bab3ff17ac0bf4985c227f2df2672",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "73847c6782b8bfb1daa9128c8e1f25549dd29989"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-for-statements-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
5
|
|
],
|
|
"end": [
|
|
7,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
13
|
|
],
|
|
"end": [
|
|
7,
|
|
14
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
17
|
|
],
|
|
"end": [
|
|
7,
|
|
18
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '5'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
20
|
|
],
|
|
"end": [
|
|
7,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
9,
|
|
7
|
|
],
|
|
"end": [
|
|
9,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'loop' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
11,
|
|
7
|
|
],
|
|
"end": [
|
|
11,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
11,
|
|
11
|
|
],
|
|
"end": [
|
|
11,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '10'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
11,
|
|
15
|
|
],
|
|
"end": [
|
|
11,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
12,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
13,
|
|
10
|
|
],
|
|
"end": [
|
|
13,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'loop2' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
15,
|
|
5
|
|
],
|
|
"end": [
|
|
15,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ';;' for_clause"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
16,
|
|
1
|
|
],
|
|
"end": [
|
|
16,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
17,
|
|
1
|
|
],
|
|
"end": [
|
|
17,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'continue' continue_statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
19,
|
|
5
|
|
],
|
|
"end": [
|
|
19,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
19,
|
|
16
|
|
],
|
|
"end": [
|
|
19,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
20,
|
|
1
|
|
],
|
|
"end": [
|
|
20,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
20,
|
|
3
|
|
],
|
|
"end": [
|
|
20,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
21,
|
|
1
|
|
],
|
|
"end": [
|
|
21,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'break' break_statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-statements.go"
|
|
],
|
|
"sha1": "73847c6782b8bfb1daa9128c8e1f25549dd29989",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "fe83468e5531230cfacc263981381f019f45306f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-for-statements-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-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": [
|
|
"for-statements.go"
|
|
],
|
|
"sha1": "fe83468e5531230cfacc263981381f019f45306f",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "398072c98a5f8da23fd30fd7fae16e0ae97276c2"
|
|
}]
|