text stringlengths 93 16.4k | id stringlengths 20 40 | metadata dict | input_ids listlengths 45 2.05k | attention_mask listlengths 45 2.05k | complexity int64 1 9 |
|---|---|---|---|---|---|
func TestGetTerminationMessagePath(t *testing.T) {
dm, fakeDocker := newTestDockerManager()
containers := []api.Container{
{
Name: "bar",
TerminationMessagePath: "/dev/somepath",
},
}
pod := makePod("foo", &api.PodSpec{
Containers: containers,
})
runSyncPod(t, dm, fakeDocker, pod, nil, false)
conta... | explode_data.jsonl/31172 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
1949,
21209,
32096,
2052,
1820,
1155,
353,
8840,
836,
8,
341,
2698,
76,
11,
12418,
35,
13659,
1669,
501,
2271,
35,
13659,
2043,
741,
197,
39399,
1669,
3056,
2068,
33672,
515,
197,
197,
515,
298,
21297,
25,
330,
2257,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_resolveInputs(t *testing.T) {
cases := []struct {
github GitHub
inputs *Inputs
hasError bool
tags []string
repository string
}{
{
github: GitHub{
Repository: "username/repo",
Commit: "45ba489c4f97b5f854ebaba6454b51fa",
Ref: "refs/heads/master",
},
... | explode_data.jsonl/29139 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1260
} | [
2830,
3393,
77291,
31946,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
3174,
3827,
257,
32095,
198,
197,
22427,
82,
257,
353,
31946,
198,
197,
63255,
1454,
256,
1807,
198,
197,
3244,
2032,
981,
3056,
917,
198,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestUserUpdateDeviceId(t *testing.T) {
th := Setup().InitBasic()
Client := th.BasicClient
team := &model.Team{DisplayName: "Name", Name: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN}
team = Client.Must(Client.CreateTeam(team)).Data.(*model.Team)
user := &model.User{Email: "... | explode_data.jsonl/13813 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 399
} | [
2830,
3393,
1474,
4289,
6985,
764,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
741,
71724,
1669,
270,
48868,
2959,
271,
197,
9196,
1669,
609,
2528,
65842,
90,
26456,
25,
330,
675,
497,
3988,
25,
330,
89,
9141,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestScan(t *testing.T) {
whitespaceLinecount := newlineCount(whitespace)
// error handler
eh := func(_ Position, msg string) {
t.Errorf("error handler called (msg = %s)", msg)
}
// verify scan
var s Scanner
s.Init(fset.AddFile("", fset.Base(), len(source)), source, eh)
// set up expected position
epo... | explode_data.jsonl/40291 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 595
} | [
2830,
3393,
26570,
1155,
353,
8840,
836,
8,
341,
197,
1312,
36074,
2460,
1830,
1669,
39027,
2507,
7,
1312,
36074,
692,
197,
322,
1465,
7013,
198,
197,
2636,
1669,
2915,
2490,
12380,
11,
3750,
914,
8,
341,
197,
3244,
13080,
445,
841,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetEndToEndHeaders(t *testing.T) {
resetTest()
var (
headers http.Header
end2end []string
)
headers = http.Header{}
headers.Set("content-type", "text/html")
headers.Set("te", "deflate")
end2end = getEndToEndHeaders(headers)
if !containsHeader(end2end, "content-type") {
t.Fatal(`doesn't contain ... | explode_data.jsonl/77639 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 472
} | [
2830,
3393,
1949,
3727,
66573,
10574,
1155,
353,
8840,
836,
8,
341,
70343,
2271,
741,
2405,
2399,
197,
67378,
1758,
15753,
198,
197,
6246,
17,
408,
3056,
917,
198,
197,
692,
67378,
284,
1758,
15753,
16094,
67378,
4202,
445,
1796,
10604,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestLabelService_CreateLabel(t *testing.T) {
type fields struct {
LabelService influxdb.LabelService
}
type args struct {
permission influxdb.Permission
}
type wants struct {
err error
}
tests := []struct {
name string
fields fields
args args
wants wants
}{
{
name: "unauthorized to... | explode_data.jsonl/35727 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1063
} | [
2830,
3393,
2476,
1860,
34325,
2476,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
82126,
1860,
52852,
1999,
4679,
1860,
198,
197,
532,
13158,
2827,
2036,
341,
197,
197,
22618,
52852,
1999,
73409,
198,
197,
532,
13158,
6801... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNSLookupMX(t *testing.T) {
testenv.MustHaveExternalNetwork(t)
for _, server := range nslookupTestServers {
mx, err := LookupMX(server)
if err != nil {
t.Error(err)
continue
}
if len(mx) == 0 {
t.Errorf("no results")
continue
}
expected, err := nslookupMX(server)
if err != nil {
... | explode_data.jsonl/5815 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
2448,
34247,
29423,
1155,
353,
8840,
836,
8,
341,
18185,
3160,
50463,
12116,
25913,
12320,
1155,
692,
2023,
8358,
3538,
1669,
2088,
12268,
21020,
2271,
78139,
341,
197,
2109,
87,
11,
1848,
1669,
50311,
29423,
21421,
340,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func Test_Cache2(t *testing.T) {
fn := "./test.txt"
str, _ := Read(fn)
if str != "Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aut... | explode_data.jsonl/63482 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 207
} | [
2830,
3393,
920,
1777,
17,
1155,
353,
8840,
836,
8,
341,
40095,
1669,
5924,
1944,
3909,
1837,
11355,
11,
716,
1669,
4457,
24008,
340,
743,
607,
961,
330,
32783,
26342,
23655,
2444,
27212,
11,
35140,
29266,
285,
3375,
30060,
11,
10923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDeleteWatchResource(t *testing.T) {
r, _ := http.NewRequest("DELETE", "/", nil)
req := restful.NewRequest(r)
getNewTank = operator.GetMockTankNewFunc(&operator.MockTank{})
request := newReqWatch(req)
defer request.exit()
if err := request.remove(); err != nil {
t.Errorf("remove() failed! err: %v", e... | explode_data.jsonl/24146 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 123
} | [
2830,
3393,
6435,
14247,
4783,
1155,
353,
8840,
836,
8,
341,
7000,
11,
716,
1669,
1758,
75274,
445,
14424,
497,
64657,
2092,
340,
24395,
1669,
2732,
1262,
75274,
2601,
692,
10366,
3564,
66033,
284,
5675,
2234,
11571,
66033,
3564,
9626,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestBlockReward_getEpsilonSelectAttenuationMount(t *testing.T) {
type fields struct {
chain util.ChainReader
st util.StateDB
rewardCfg *cfg.RewardCfg
foundationAccount common.Address
innerMinerAccounts []common.Address
bcInterval *mc.BCIntervalInfo
topo... | explode_data.jsonl/61632 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1804
} | [
2830,
3393,
4713,
59622,
3062,
36,
59892,
3379,
10456,
1481,
367,
16284,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
8819,
1060,
4094,
98269,
5062,
198,
197,
18388,
338,
4094,
18942,
3506,
198,
197,
17200,
1606,
4246... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestDependencyOrder(t *testing.T) {
content := `first:
from:
type: tar
url: http://example.com/tar.gz
second:
from:
type: built
tag: first
third:
from:
type: built
tag: second
`
sf := parse(t, content)
do, err := sf.DependencyOrder()
if err != nil {
... | explode_data.jsonl/81211 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 248
} | [
2830,
3393,
36387,
4431,
1155,
353,
8840,
836,
8,
341,
27751,
1669,
1565,
3896,
510,
262,
504,
510,
286,
943,
25,
12183,
198,
286,
2515,
25,
1758,
1110,
8687,
905,
5523,
277,
20963,
198,
5569,
510,
262,
504,
510,
286,
943,
25,
5798,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestValuesEnum(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec(`drop table if exists t;`)
tk.MustExec(`create table t (a bigint primary key, b enum('a','b','c'));`)
tk.MustExec(`insert into t values (1, "a");`)
... | explode_data.jsonl/65477 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 214
} | [
2830,
3393,
6227,
10766,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50463,
10216,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewLogsReceiver_version_err(t *testing.T) {
c := Config{
Encoding: defaultEncoding,
ProtocolVersion: "none",
}
r, err := newLogsReceiver(c, componenttest.NewNopReceiverCreateSettings(), defaultLogsUnmarshalers(), consumertest.NewNop())
assert.Error(t, err)
assert.Nil(t, r)
} | explode_data.jsonl/79397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
3564,
51053,
25436,
9438,
9266,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
5532,
515,
197,
197,
14690,
25,
286,
1638,
14690,
345,
197,
197,
20689,
5637,
25,
330,
6697,
756,
197,
532,
7000,
11,
1848,
1669,
501,
51053,
25436,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSaveTable(t *testing.T) {
s := objmock.NewStore()
tbl := &objects.Table{
Columns: []string{"a", "b", "c", "d"},
PK: []uint32{0},
RowsCount: 700,
Blocks: [][]byte{
testutils.SecureRandomBytes(16),
testutils.SecureRandomBytes(16),
testutils.SecureRandomBytes(16),
},
BlockIndices:... | explode_data.jsonl/57828 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 403
} | [
2830,
3393,
8784,
2556,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
2839,
16712,
7121,
6093,
2822,
3244,
2024,
1669,
609,
19210,
18257,
515,
197,
197,
13965,
25,
256,
3056,
917,
4913,
64,
497,
330,
65,
497,
330,
66,
497,
330,
67,
7115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestShouldBuild(t *testing.T) {
const file1 = "// +build tag1\n\n" +
"package main\n"
want1 := map[string]bool{"tag1": true}
const file2 = "// +build cgo\n\n" +
"// This package implements parsing of tags like\n" +
"// +build tag1\n" +
"package build"
want2 := map[string]bool{"cgo": true}
const file... | explode_data.jsonl/517 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 546
} | [
2830,
3393,
14996,
11066,
1155,
353,
8840,
836,
8,
341,
4777,
1034,
16,
284,
35574,
488,
5834,
4772,
16,
1699,
1699,
1,
3610,
197,
197,
1,
1722,
1887,
1699,
698,
50780,
16,
1669,
2415,
14032,
96436,
4913,
4578,
16,
788,
830,
630,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestPostUnmarshalTaskWithLocalVolumes(t *testing.T) {
// Constants used here are defined in task_unix_test.go and task_windows_test.go
taskFromACS := ecsacs.Task{
Arn: strptr("myArn"),
DesiredStatus: strptr("RUNNING"),
Family: strptr("myFamily"),
Version: strptr("1"),
Containers:... | explode_data.jsonl/37203 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 800
} | [
2830,
3393,
4133,
1806,
27121,
6262,
2354,
7319,
96325,
1155,
353,
8840,
836,
8,
341,
197,
322,
16605,
1483,
1588,
525,
4512,
304,
3383,
80572,
4452,
18002,
323,
3383,
58220,
4452,
18002,
198,
49115,
3830,
62687,
1669,
78422,
19252,
28258... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestContentTypeDelete(t *testing.T) {
var err error
assert := assert.New(t)
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
assert.Equal(r.Method, "DELETE")
assert.Equal(r.RequestURI, "/spaces/"+spaceID+"/content_types/63Vgs0BFK0USe4i2mQUGK6")
checkHeaders(r, assert)
w.Write... | explode_data.jsonl/66083 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 263
} | [
2830,
3393,
29504,
6435,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
6948,
1669,
2060,
7121,
1155,
692,
53326,
1669,
1758,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6948,
12808,
2601,
20798,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetTranscodeJob(t *testing.T) {
tests := []struct {
givenTestCase string
givenURI string
givenTriggerDBError bool
givenProtocol string
givenSegmentDuration uint
wantCode int
wantBody interface{}
}{
{
"Get job",
"/jobs/job-123",
false,
"hls",
5,
ht... | explode_data.jsonl/30223 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1048
} | [
2830,
3393,
1949,
3167,
1851,
12245,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
3174,
2071,
16458,
286,
914,
198,
197,
3174,
2071,
10301,
1797,
914,
198,
197,
3174,
2071,
17939,
3506,
1454,
220,
1807,
198,
197,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestPrintReplicaSetList(t *testing.T) {
replicaSetList := apps.ReplicaSetList{
Items: []apps.ReplicaSet{
{
ObjectMeta: metav1.ObjectMeta{
Name: "replicaset1",
CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)},
},
Spec: apps.ReplicaSetSpec{
Replicas: 5,
... | explode_data.jsonl/21624 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 851
} | [
2830,
3393,
8994,
18327,
15317,
1649,
852,
1155,
353,
8840,
836,
8,
1476,
73731,
15317,
1649,
852,
1669,
10500,
2817,
79,
15317,
1649,
852,
515,
197,
197,
4353,
25,
3056,
27635,
2817,
79,
15317,
1649,
515,
298,
197,
515,
571,
23816,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestLockfileGet(t *testing.T) {
lf := newLockfile(t, []tool.Tool{
{ImportPath: "github.com/cszatmary/go-fish", Version: "v0.1.0"},
{ImportPath: "github.com/golangci/golangci-lint/cmd/golangci-lint", Version: "v1.33.0"},
{ImportPath: "golang.org/x/tools/cmd/stringer", Version: "v0.0.0-20201211185031-d93e913c... | explode_data.jsonl/58262 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1367
} | [
2830,
3393,
11989,
1192,
1949,
1155,
353,
8840,
836,
8,
341,
8810,
69,
1669,
501,
11989,
1192,
1155,
11,
3056,
14172,
24439,
515,
197,
197,
90,
11511,
1820,
25,
330,
5204,
905,
2899,
14357,
266,
1534,
25525,
2220,
812,
497,
6079,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestPipeline_Secret_ParseOrg_success(t *testing.T) {
// setup tests
tests := []struct {
secret *Secret
org string
}{
{ // success with good data
secret: &Secret{
Name: "foo",
Value: "bar",
Key: "octocat/foo",
Engine: "native",
Type: "org",
},
org: "octocat",
},
}... | explode_data.jsonl/51849 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 341
} | [
2830,
3393,
34656,
1098,
50856,
77337,
42437,
18632,
1155,
353,
8840,
836,
8,
341,
197,
322,
6505,
7032,
198,
78216,
1669,
3056,
1235,
341,
197,
197,
20474,
353,
19773,
198,
197,
87625,
262,
914,
198,
197,
59403,
197,
197,
90,
442,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestGetClients_AddressError(t *testing.T) {
cleanup := initPeerTestEnv(t)
defer cleanup()
viper.Set("peer.tls.enabled", true)
// failure
eClient, err := common.GetEndorserClient("peer0", "")
assert.Contains(t, err.Error(), "tls root cert file must be set")
assert.Nil(t, eClient)
dClient, err := common.G... | explode_data.jsonl/62457 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 167
} | [
2830,
3393,
1949,
47174,
64899,
1454,
1155,
353,
8840,
836,
8,
341,
1444,
60639,
1669,
2930,
30888,
2271,
14359,
1155,
340,
16867,
21290,
2822,
5195,
12858,
4202,
445,
16537,
734,
4730,
22141,
497,
830,
692,
197,
322,
7901,
198,
7727,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSingleHandler(t *testing.T) {
h := HandlerFunc(func(ctx context.Context, rc *fasthttp.RequestCtx) {
name := URLParam(rc, "name")
rc.Write([]byte("hi " + name))
})
rc := fasthttp.RequestCtx{}
rc.Request.Header.SetMethod("GET")
rc.Request.SetRequestURI("/")
rctx := NewRouteContext()
rc.SetUserValue(... | explode_data.jsonl/47954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
10888,
3050,
1155,
353,
8840,
836,
8,
341,
9598,
1669,
19954,
9626,
18552,
7502,
2266,
9328,
11,
10192,
353,
9349,
1254,
9659,
23684,
8,
341,
197,
11609,
1669,
5548,
2001,
35429,
11,
330,
606,
1138,
197,
30295,
4073,
10556,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPositiveAmount(t *testing.T) {
tt := test.Start(t)
defer tt.Finish()
action := makeTestAction()
result := action.GetPositiveAmount("minus_one")
tt.Assert.Error(action.Err)
tt.Assert.Equal(xdr.Int64(0), result)
action.Err = nil
result = action.GetPositiveAmount("zero")
tt.Assert.Error(action.Err)
tt... | explode_data.jsonl/555 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
35490,
10093,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
1273,
12101,
1155,
340,
16867,
17853,
991,
18176,
741,
38933,
1669,
1281,
2271,
2512,
2822,
9559,
1669,
1917,
2234,
35490,
10093,
445,
38365,
11667,
1138,
3244,
83,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewDockerVolumeHelper(t *testing.T) {
tests := []struct {
name string
expectedCreateArgs []string
expectedDeleteArgs []string
}{
{
"foo",
[]string{"docker", "volume", "create", "--name", "foo"},
[]string{"docker", "volume", "rm", "foo"},
},
}
procManager := procmanager.NewP... | explode_data.jsonl/64353 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 508
} | [
2830,
3393,
3564,
35,
13659,
18902,
5511,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
2290,
914,
198,
197,
42400,
4021,
4117,
3056,
917,
198,
197,
42400,
6435,
4117,
3056,
917,
198,
197,
59403,
197,
197,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestMapProxy_PutTransientWithNonSerializableKey(t *testing.T) {
err := mp.PutTransient(student{}, "test", 1, time.Second)
AssertErrorNotNil(t, err, "putTransient did not return an error for nonserializable key")
mp.Clear()
} | explode_data.jsonl/57046 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
2227,
16219,
1088,
332,
48183,
2354,
8121,
29268,
1592,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
10490,
39825,
48183,
39004,
22655,
330,
1944,
497,
220,
16,
11,
882,
32435,
340,
18017,
1454,
96144,
1155,
11,
1848,
11,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestRequiresRegenerationServiceUIDMismatch(t *testing.T) {
tests := []struct {
name string
primeServices func(cache.Indexer)
secret *v1.Secret
expected bool
}{
{
name: "no service annotation",
primeServices: func(serviceCache cache.Indexer) {},
secret: &v1.Secret{... | explode_data.jsonl/76915 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2915
} | [
2830,
3393,
46961,
3477,
17252,
1860,
6463,
82572,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
25653,
545,
11025,
2915,
31933,
18338,
261,
340,
197,
197,
20474,
286,
353,
85,
16,
74779,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCompileUpdate(t *testing.T) {
tests := []struct {
oldAddrs []string
newAddrs []string
want []*Update
}{
{
[]string{},
[]string{"1.0.0.1"},
[]*Update{{Op: Add, Addr: "1.0.0.1"}},
},
{
[]string{"1.0.0.1"},
[]string{"1.0.0.1"},
[]*Update{},
},
{
[]string{"1.0.0.0"},
[... | explode_data.jsonl/22569 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1016
} | [
2830,
3393,
46126,
4289,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
61828,
2212,
5428,
3056,
917,
198,
197,
8638,
2212,
5428,
3056,
917,
198,
197,
50780,
257,
29838,
4289,
198,
197,
59403,
197,
197,
515,
298,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestMapProxy_IsLocked(t *testing.T) {
mp.Put("testingKey", "testingValue")
locked, err := mp.IsLocked("testingKey")
AssertEqualf(t, err, locked, false, "Key should not be locked.")
err = mp.Lock("testingKey")
if err != nil {
t.Fatal(err)
}
locked, err = mp.IsLocked("testingKey")
AssertEqualf(t, err, lock... | explode_data.jsonl/56988 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 204
} | [
2830,
3393,
2227,
16219,
31879,
49010,
1155,
353,
8840,
836,
8,
341,
53230,
39825,
445,
8840,
1592,
497,
330,
8840,
1130,
1138,
197,
24633,
11,
1848,
1669,
10490,
4506,
49010,
445,
8840,
1592,
1138,
18017,
2993,
69,
1155,
11,
1848,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestGetConfigEnvVars(t *testing.T) {
config := safeConfig{
Viper: viper.New(),
}
config.SetEnvPrefix("DD")
config.BindEnv("app_key")
assert.Contains(t, config.GetEnvVars(), "DD_APP_KEY")
config.BindEnv("logset")
assert.Contains(t, config.GetEnvVars(), "DD_LOGSET")
config.BindEnv("logs_config.run_path")
... | explode_data.jsonl/611 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
1949,
2648,
14359,
28305,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
6092,
2648,
515,
197,
17446,
12858,
25,
95132,
7121,
3148,
197,
532,
25873,
4202,
14359,
14335,
445,
4103,
5130,
25873,
32451,
14359,
445,
676,
3097,
1138,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestResolveConsul(t *testing.T) {
type ServiceResultNode struct {
Node string
Address string
}
type ServiceResultService struct {
Address string
Port int
}
type ServiceResult struct {
Node ServiceResultNode
Service ServiceResultService
}
server := httptest.NewServer(http.HandlerFunc(... | explode_data.jsonl/38861 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 769
} | [
2830,
3393,
56808,
15220,
360,
1155,
353,
8840,
836,
8,
341,
13158,
5362,
2077,
1955,
2036,
341,
197,
30217,
262,
914,
198,
197,
98090,
914,
198,
197,
630,
13158,
5362,
2077,
1860,
2036,
341,
197,
98090,
914,
198,
197,
98459,
262,
526... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestFaultToError(t *testing.T) {
assert.Nil(t, FaultToError(nil))
e := FaultToError(&provider.Fault{
ReasonCode: "MyCode",
Message: "My message",
Wrapped: []string{"wrapped"},
Properties: map[string]string{"this": "that"},
})
if assert.Error(t, e) {
assert.Equal(t, "My message", e.Error())
i... | explode_data.jsonl/17710 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 244
} | [
2830,
3393,
58780,
1249,
1454,
1155,
353,
8840,
836,
8,
341,
6948,
59678,
1155,
11,
59149,
1249,
1454,
27907,
4390,
7727,
1669,
59149,
1249,
1454,
2099,
19979,
991,
945,
515,
197,
197,
25139,
2078,
25,
330,
5050,
2078,
756,
197,
46733,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestReadError(t *testing.T) {
s := wire.NewSyncScanner(strings.NewReader(
"FAIL\004\000\000\000fail"))
_, err := newSyncFileReader(s)
assert.EqualError(t, err, "AdbError: server error for read-chunk request: fail ({Request:read-chunk ServerMsg:fail})")
} | explode_data.jsonl/50770 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 99
} | [
2830,
3393,
4418,
1454,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
9067,
7121,
12154,
31002,
51442,
68587,
1006,
197,
197,
1,
36973,
59,
15,
15,
19,
59,
15,
15,
15,
59,
15,
15,
15,
59,
15,
15,
15,
18403,
5455,
197,
6878,
1848,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStringReset(t *testing.T) {
mem := memory.NewCheckedAllocator(memory.NewGoAllocator())
sb1 := array.NewStringBuilder(mem)
sb2 := array.NewStringBuilder(mem)
defer sb1.Release()
defer sb2.Release()
sb1.Append("string1")
sb1.AppendNull()
var (
string1 = sb1.NewStringArray()
string2 = sb2.NewStringA... | explode_data.jsonl/4258 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 181
} | [
2830,
3393,
703,
14828,
1155,
353,
8840,
836,
8,
341,
14145,
1669,
4938,
7121,
12666,
42730,
63230,
7121,
10850,
42730,
2398,
24842,
16,
1669,
1334,
7121,
69412,
39908,
340,
24842,
17,
1669,
1334,
7121,
69412,
39908,
340,
16867,
7898,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStore_GetID_SetID(t *testing.T) {
dbTempFile, err := ioutil.TempFile("", "grype-db-test-store")
if err != nil {
t.Fatalf("could not create temp file: %+v", err)
}
defer os.Remove(dbTempFile.Name())
store, cleanupFn, err := New(dbTempFile.Name(), true)
defer cleanupFn()
if err != nil {
t.Fatalf("cou... | explode_data.jsonl/78501 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 312
} | [
2830,
3393,
6093,
13614,
915,
14812,
915,
1155,
353,
8840,
836,
8,
341,
20939,
12151,
1703,
11,
1848,
1669,
43144,
65009,
1703,
19814,
330,
901,
499,
60399,
16839,
33252,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
28077,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestHistogramBucket_Exemplar(t *testing.T) {
ms := NewHistogramBucket()
ms.InitEmpty()
assert.EqualValues(t, true, ms.Exemplar().IsNil())
ms.Exemplar().InitEmpty()
assert.EqualValues(t, false, ms.Exemplar().IsNil())
fillTestHistogramBucketExemplar(ms.Exemplar())
assert.EqualValues(t, generateTestHistogramBu... | explode_data.jsonl/19563 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 136
} | [
2830,
3393,
77210,
36018,
62531,
25892,
277,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
77210,
36018,
741,
47691,
26849,
3522,
741,
6948,
12808,
6227,
1155,
11,
830,
11,
9829,
5121,
25892,
277,
1005,
3872,
19064,
2398,
47691,
5121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBodyLimitReader(t *testing.T) {
hw := []byte("Hello, World!")
e := echo.New()
req := httptest.NewRequest(http.MethodPost, "/", bytes.NewReader(hw))
rec := httptest.NewRecorder()
config := BodyLimitConfig{
Skipper: DefaultSkipper,
Limit: "2B",
limit: 2,
}
reader := &limitedReader{
BodyLimitC... | explode_data.jsonl/37302 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 340
} | [
2830,
3393,
5444,
16527,
5062,
1155,
353,
8840,
836,
8,
341,
9598,
86,
1669,
3056,
3782,
445,
9707,
11,
4337,
22988,
7727,
1669,
1687,
7121,
741,
24395,
1669,
54320,
70334,
75274,
19886,
20798,
4133,
11,
64657,
5820,
68587,
73751,
1171,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetEarliestTaskStatusForContainersWhenSteadyStateIsResourceProvisioned(t *testing.T) {
resourcesProvisioned := apicontainerstatus.ContainerResourcesProvisioned
testTask := &Task{
KnownStatusUnsafe: apitaskstatus.TaskStatusNone,
Containers: []*apicontainer.Container{
{
KnownStatusUnsafe: apicontain... | explode_data.jsonl/37216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 492
} | [
2830,
3393,
1949,
17813,
23138,
6262,
2522,
2461,
74632,
4498,
623,
3149,
88,
1397,
3872,
4783,
1336,
13013,
291,
1155,
353,
8840,
836,
8,
341,
10202,
2360,
1336,
13013,
291,
1669,
1443,
51160,
1743,
2829,
33672,
11277,
1336,
13013,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSLOSegmentationBuffered(t *testing.T) {
ctx := context.Background()
c, rollback := makeConnectionWithSegmentsContainer(t)
defer rollback()
opts := swift.LargeObjectOpts{
Container: CONTAINER,
ObjectName: OBJECT,
ContentType: "image/jpeg",
ChunkSize: 6,
MinChunkSize: 4,
}
testSegmentati... | explode_data.jsonl/12738 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 732
} | [
2830,
3393,
50,
1593,
21086,
367,
4095,
291,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
11,
60414,
1669,
1281,
4526,
2354,
64813,
4502,
1155,
340,
16867,
60414,
741,
64734,
1669,
29362,
92762,
1190,
43451,
515,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestApp01myCustomerHndlrRowNext(t *testing.T) {
var td *TestData_App01myCustomer
var rcd App01myCustomer.App01myCustomer
t.Logf("TestCustomer.RowNext()...\n")
td = &TestData_App01myCustomer{}
td.Setup(t)
// Build and execute a URL.
rcd.TestData(0) // "A"
... | explode_data.jsonl/63216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 262
} | [
2830,
3393,
2164,
15,
16,
2408,
12792,
39,
303,
19018,
3102,
5847,
1155,
353,
8840,
836,
8,
341,
262,
762,
17941,
688,
353,
83920,
36117,
15,
16,
2408,
12792,
198,
262,
762,
435,
4385,
260,
1845,
15,
16,
2408,
12792,
5105,
15,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSetBreakpointWhileRunning(t *testing.T) {
runTest(t, "integrationprog", func(client *daptest.Client, fixture protest.Fixture) {
runDebugSessionWithBPs(t, client, "launch",
// Launch
func() {
client.LaunchRequest("exec", fixture.Path, !stopOnEntry)
},
// Set breakpoints
fixture.Source, []i... | explode_data.jsonl/17327 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1011
} | [
2830,
3393,
1649,
22524,
2768,
7983,
18990,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
1155,
11,
330,
60168,
32992,
497,
2915,
12805,
353,
91294,
1944,
11716,
11,
12507,
8665,
991,
12735,
8,
341,
197,
56742,
7939,
5283,
2354,
33,
20420,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewAttach(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("setupFIFOProducers not yet implemented on windows")
}
var (
expectedStdin = "this is the stdin"
expectedStdout = "this is the stdout"
expectedStderr = "this is the stderr"
stdin = bytes.NewBufferString(expectedStdin)
stdo... | explode_data.jsonl/32773 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 461
} | [
2830,
3393,
3564,
30485,
1155,
353,
8840,
836,
8,
341,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
341,
197,
3244,
57776,
445,
15188,
37,
25997,
1336,
33375,
537,
3602,
11537,
389,
11030,
1138,
197,
532,
2405,
2399,
197,
42400,
22748,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLeaderCommitPrecedingEntries(t *testing.T) {
tests := [][]pb.Entry{
{},
{{Term: 2, Index: 1}},
{{Term: 1, Index: 1}, {Term: 2, Index: 2}},
{{Term: 1, Index: 1}},
}
for i, tt := range tests {
storage := newTestMemoryStorage(withPeers(1, 2, 3))
storage.Append(tt)
r := newTestRaft(1, 10, 1, stora... | explode_data.jsonl/47058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 389
} | [
2830,
3393,
52621,
33441,
4703,
1998,
287,
24533,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
52931,
16650,
22330,
515,
197,
197,
38837,
197,
197,
2979,
17249,
25,
220,
17,
11,
8008,
25,
220,
16,
22050,
197,
197,
2979,
17249,
25,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestImmudbCommandFlagParser(t *testing.T) {
o := DefaultTestOptions()
var options server.Options
var err error
cmd := &cobra.Command{
Use: "immudb",
RunE: func(cmd *cobra.Command, args []string) (err error) {
options, err = parseOptions(cmd)
if err != nil {
return err
}
return nil
},
}
... | explode_data.jsonl/67844 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
50739,
661,
65,
4062,
12135,
6570,
1155,
353,
8840,
836,
8,
341,
22229,
1669,
7899,
2271,
3798,
2822,
2405,
2606,
3538,
22179,
198,
2405,
1848,
1465,
198,
25920,
1669,
609,
59410,
12714,
515,
197,
95023,
25,
330,
12543,
661,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLoadCookiedSession(t *testing.T) {
pcTest, err := NewProcessCookieTestWithDefaults()
if err != nil {
t.Fatal(err)
}
created := time.Now()
startSession := &sessions.SessionState{Email: "john.doe@example.com", AccessToken: "my_access_token", CreatedAt: &created}
err = pcTest.SaveSession(startSession)
a... | explode_data.jsonl/36396 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
5879,
58382,
1122,
5283,
1155,
353,
8840,
836,
8,
341,
82013,
2271,
11,
1848,
1669,
1532,
7423,
20616,
2271,
2354,
16273,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
197,
7120,
1669,
882,
13244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRemoteDoesntAllowOpeningTransaction(t *testing.T) {
payload := "my-payload"
trType := TransactionType("my-type")
ctx := context.Background()
broadcaster := &fakeBroadcaster{
openErr: ErrConcurrentTransaction,
}
man := NewTxManager(broadcaster)
tx1, err := man.BeginTransaction(ctx, trType, payload)
... | explode_data.jsonl/5852 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 171
} | [
2830,
3393,
24703,
21468,
406,
18605,
51298,
8070,
1155,
353,
8840,
836,
8,
341,
76272,
1669,
330,
2408,
2268,
6989,
698,
25583,
929,
1669,
17869,
929,
445,
2408,
10604,
1138,
20985,
1669,
2266,
19047,
741,
2233,
8546,
32020,
1669,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDb_GetSnapshot(t *testing.T) {
trun(t, func(h *dbHarness) {
bar := strings.Repeat("b", 200)
h.put("foo", "v1")
h.put(bar, "v1")
snap, err := h.db.GetSnapshot()
if err != nil {
t.Fatal("GetSnapshot: got error: ", err)
}
h.put("foo", "v2")
h.put(bar, "v2")
h.getVal("foo", "v2")
h.getVa... | explode_data.jsonl/6007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 326
} | [
2830,
3393,
7994,
13614,
15009,
1155,
353,
8840,
836,
8,
341,
25583,
359,
1155,
11,
2915,
3203,
353,
1999,
74248,
8,
341,
197,
90709,
1669,
9069,
2817,
10979,
445,
65,
497,
220,
17,
15,
15,
340,
197,
9598,
3597,
445,
7975,
497,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDefaultEndorsement(t *testing.T) {
factory := &builtin.DefaultEndorsementFactory{}
endorser := factory.New()
// Scenario I: Don't pass any dependencies, and observe that the initialization fails
err := endorser.Init()
assert.Equal(t, "could not find SigningIdentityFetcher in dependencies", err.Error())
... | explode_data.jsonl/6711 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 650
} | [
2830,
3393,
3675,
3727,
10836,
478,
1155,
353,
8840,
836,
8,
341,
1166,
2919,
1669,
609,
42457,
13275,
3727,
10836,
478,
4153,
16094,
6246,
269,
799,
1669,
8633,
7121,
2822,
197,
322,
58663,
358,
25,
4320,
944,
1494,
894,
19543,
11,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUFuturesHistoricalTrades(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() {
t.Skip("skipping test: api keys not set")
}
cp, err := currency.NewPairFromString("BTCUSDT")
if err != nil {
t.Error(err)
}
_, err = b.UFuturesHistoricalTrades(context.Background(), cp, "", 5)
if err != nil {
t.Error(... | explode_data.jsonl/76700 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 183
} | [
2830,
3393,
20538,
74606,
48983,
938,
1282,
3452,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
25,
6330,
6894,
537,
738,
1138,
197,
532... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestGetAllVarsNested(t *testing.T) {
th := kusttest_test.NewKustTestHarness(t, "/app/overlays/o2")
th.WriteK("/app/base", `
vars:
- name: AWARD
objref:
kind: Service
name: nobelPrize
apiVersion: v7
fieldref:
fieldpath: some.arbitrary.path
- name: BIRD
objref:
kind: S... | explode_data.jsonl/78146 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 525
} | [
2830,
3393,
1949,
2403,
28305,
71986,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
595,
590,
1944,
4452,
7121,
42,
590,
2271,
74248,
1155,
11,
3521,
676,
14,
1975,
63359,
20271,
17,
1138,
70479,
4073,
42,
4283,
676,
26090,
497,
22074,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestCopyChunkStream(t *testing.T) {
foo := "foo"
bar := "bar"
r := strings.NewReader(`["foo","bar",null],["bar",null,"foo"],[]`)
c := make(chan []*string, 3)
err := copyChunkStream(r, c)
if err != nil {
t.Fatalf("error while copying chunk stream. err: %v", err)
}
assertEqualRows([]*string{&foo, &bar, ni... | explode_data.jsonl/23255 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
12106,
28304,
3027,
1155,
353,
8840,
836,
8,
341,
197,
7975,
1669,
330,
7975,
698,
90709,
1669,
330,
2257,
1837,
7000,
1669,
9069,
68587,
5809,
1183,
7975,
2198,
2257,
497,
2921,
1125,
1183,
2257,
497,
2921,
1335,
7975,
7914... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestUintSetNonNumericString(t *testing.T) {
v := "a"
var expected uint64
tu := Uint{}
err := tu.Set(v)
if err == nil {
t.Error("Expected error.")
}
if tu.Weak() == expected {
t.Errorf("This value should return 0. value:%#v", tu.Weak())
}
} | explode_data.jsonl/13394 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
21570,
1649,
8121,
36296,
703,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
330,
64,
698,
2405,
3601,
2622,
21,
19,
198,
3244,
84,
1669,
27883,
16094,
9859,
1669,
9765,
4202,
3747,
340,
743,
1848,
621,
2092,
341,
197,
3244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestJSONP(t *testing.T) {
handler := ResourceHandler{
DisableJsonIndent: true,
PreRoutingMiddlewares: []Middleware{
&JsonpMiddleware{},
},
}
handler.SetRoutes(
&Route{"GET", "/ok",
func(w ResponseWriter, r *Request) {
w.WriteJson(map[string]string{"Id": "123"})
},
},
&Route{"GET", "/er... | explode_data.jsonl/58653 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 358
} | [
2830,
3393,
5370,
47,
1155,
353,
8840,
836,
8,
1476,
53326,
1669,
11765,
3050,
515,
197,
197,
25479,
5014,
42729,
25,
830,
345,
197,
197,
4703,
24701,
43935,
37903,
25,
3056,
24684,
515,
298,
197,
5,
5014,
79,
24684,
38837,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPRMRemapIdentityUnmarshalJSON(t *testing.T) {
policyJSONUmarshallerTests{
newDest: func() json.Unmarshaler { return &prmRemapIdentity{} },
newValidObject: func() (interface{}, error) {
return NewPRMRemapIdentity("example.com/docker-library", "docker.io/library")
},
otherJSONParser: func(validJSON [... | explode_data.jsonl/36523 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 478
} | [
2830,
3393,
6480,
44,
6590,
391,
18558,
1806,
27121,
5370,
1155,
353,
8840,
836,
8,
341,
3223,
8018,
5370,
52,
52541,
18200,
515,
197,
8638,
34830,
25,
2915,
368,
2951,
38097,
261,
314,
470,
609,
94043,
6590,
391,
18558,
6257,
1153,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHelmReleaseName(t *testing.T) {
f := newFixture(t)
defer f.TearDown()
f.file("helm/Chart.yaml", `apiVersion: v1
description: grafana chart
name: grafana
version: 0.1.0`)
f.file("helm/values.yaml", testdata.GrafanaHelmValues)
f.file("helm/templates/_helpers.tpl", testdata.GrafanaHelmHelpers)
f.file("hel... | explode_data.jsonl/15145 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 287
} | [
2830,
3393,
39,
23162,
16077,
675,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
340,
16867,
282,
836,
682,
4454,
2822,
1166,
9715,
445,
51899,
14,
14488,
33406,
497,
1565,
2068,
5637,
25,
348,
16,
198,
4684,
25,
58300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCreateDevicesRecordsCorrectInfoInDatabase(t *testing.T) {
httpHost, _ := url.Parse("localhost")
sessionStore := gothic.Store
db, err := NewSQLiteDatabase(":memory:")
if err != nil {
t.Fatalf(err.Error())
}
defer db.Close()
err = db.Initialize()
if err != nil {
t.Fatalf(err.Error())
}
err = db.A... | explode_data.jsonl/29022 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 721
} | [
2830,
3393,
4021,
40835,
25876,
33092,
1731,
641,
5988,
1155,
353,
8840,
836,
8,
341,
28080,
9296,
11,
716,
1669,
2515,
8937,
445,
8301,
1138,
25054,
6093,
1669,
728,
81564,
38047,
198,
20939,
11,
1848,
1669,
1532,
6688,
54251,
18893,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestCertServiceContextProviderMatch(t *testing.T) {
t.Run("returns ID string and CertificateFlow when a client-id-from-certificate is specified in the Header map of request body", func(t *testing.T) {
clientID := "de766a55-3abb-4480-8d4a-6d255990b159"
provider := tenantmapping.NewCertServiceContextProvider(ni... | explode_data.jsonl/34899 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 480
} | [
2830,
3393,
36934,
1860,
1972,
5179,
8331,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
4216,
3034,
914,
323,
31402,
18878,
979,
264,
2943,
12897,
38051,
1786,
20962,
374,
5189,
304,
279,
12104,
2415,
315,
1681,
2487,
497,
2915,
1155... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOptionalValue_Value(t *testing.T) {
tests := []struct {
name string
value *OptionalValue
want *Value
}{
{
name: "ok",
value: &OptionalValue{ov: *value.OptionalFrom(value.TypeString.ValueFrom("foobar", types))},
want: ValueTypeString.ValueFrom("foobar"),
},
{
name: "empty",
val... | explode_data.jsonl/8890 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 307
} | [
2830,
3393,
15309,
1130,
27867,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
16309,
353,
15309,
1130,
198,
197,
50780,
220,
353,
1130,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCompactParseJWE(t *testing.T) {
// Should parse
msg := "eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.dGVzdA.dGVzdA.dGVzdA.dGVzdA"
_, err := ParseEncrypted(msg)
if err != nil {
t.Error("Unable to parse valid message:", err)
}
// Messages that should fail to parse
failures := []string{
//... | explode_data.jsonl/14775 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 769
} | [
2830,
3393,
98335,
14463,
41,
12457,
1155,
353,
8840,
836,
8,
972,
197,
322,
12260,
4715,
319,
21169,
1669,
330,
84609,
49039,
38,
5855,
81096,
12545,
52,
15,
31860,
51,
15,
1748,
5459,
3872,
1427,
87142,
56,
88,
40,
21,
55262,
840,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestApp_Run(t *testing.T) {
s := ""
app := &App{
Action: func(c *Context) error {
s = s + c.Args().First()
return nil
},
}
err := app.Run([]string{"command", "foo"})
expect(t, err, nil)
err = app.Run([]string{"command", "bar"})
expect(t, err, nil)
expect(t, s, "foobar")
} | explode_data.jsonl/52562 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 136
} | [
2830,
3393,
2164,
84158,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
35829,
28236,
1669,
609,
2164,
515,
197,
67607,
25,
2915,
1337,
353,
1972,
8,
1465,
341,
298,
1903,
284,
274,
488,
272,
51015,
1005,
5338,
741,
298,
853,
2092,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEval(t *testing.T) {
for i, tt := range []struct {
in string
out interface{}
data map[string]interface{}
}{
// Number literals.
{in: `1 + 2`, out: int64(3)},
{in: `(foo*2) + ( (4/2) + (3 * 5) - 0.5 )`, out: float64(26.5), data: map[string]interface{}{"foo": float64(5)}},
{in: `foo / 2`, out:... | explode_data.jsonl/24820 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 877
} | [
2830,
3393,
54469,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
17853,
1669,
2088,
3056,
1235,
341,
197,
17430,
256,
914,
198,
197,
13967,
220,
3749,
16094,
197,
8924,
2415,
14032,
31344,
16094,
197,
59403,
197,
197,
322,
5624,
75275,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestMatch__Float(t *testing.T) {
var testData = []struct {
rawYql string
data map[string]interface{}
out bool
}{
{
rawYql: `a=10`,
data: map[string]interface{}{
"a": float64(10),
},
out: true,
},
{
rawYql: `a=10`,
data: map[string]interface{}{
"a": float64(10 - epsilon*... | explode_data.jsonl/65938 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 834
} | [
2830,
3393,
8331,
563,
5442,
1155,
353,
8840,
836,
8,
341,
2405,
67348,
284,
3056,
1235,
341,
197,
76559,
56,
1470,
914,
198,
197,
8924,
256,
2415,
14032,
31344,
16094,
197,
13967,
262,
1807,
198,
197,
59403,
197,
197,
515,
298,
76559... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestIncrementalPush(t *testing.T) {
s := xds.NewFakeDiscoveryServer(t, xds.FakeOptions{ConfigString: mustReadFile(t, "tests/testdata/config/destination-rule-all.yaml")})
ads := s.Connect(nil, nil, watchAll)
t.Run("Full Push", func(t *testing.T) {
s.Discovery.Push(&model.PushRequest{Full: true})
if _, err :=... | explode_data.jsonl/7945 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 878
} | [
2830,
3393,
38311,
278,
16644,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
856,
5356,
7121,
52317,
67400,
5475,
1155,
11,
856,
5356,
991,
726,
3798,
90,
2648,
703,
25,
1969,
4418,
1703,
1155,
11,
330,
23841,
12697,
691,
14730,
14,
17997... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestToLogEntryTrace(t *testing.T) {
logger := &Logger{client: &Client{parent: "projects/P"}}
// Verify that we get the trace from the HTTP request if it isn't
// provided by the caller.
u := &url.URL{Scheme: "http"}
for _, test := range []struct {
in Entry
want string
}{
{Entry{}, ""},
{Entry{Trace... | explode_data.jsonl/33207 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 545
} | [
2830,
3393,
1249,
2201,
5874,
6550,
1155,
353,
8840,
836,
8,
341,
17060,
1669,
609,
7395,
90,
2972,
25,
609,
2959,
90,
3765,
25,
330,
17161,
16341,
95642,
197,
322,
25429,
429,
582,
633,
279,
11655,
504,
279,
10130,
1681,
421,
432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_MongoDBCollectionGetProperties_StatusARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
t.Parallel()
parameters := gopter.DefaultTestParameters()
parameters.MaxSize = 10
properties := gopter.NewProperties(parameters)
properties.Property(
"Round trip of MongoDBCollectionGetProperties_StatusARM... | explode_data.jsonl/9503 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 178
} | [
2830,
3393,
1245,
6363,
3506,
6482,
1949,
7903,
36449,
17911,
62,
4498,
77521,
78967,
98054,
2848,
4756,
2121,
2993,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
67543,
1669,
728,
73137,
13275,
2271,
9706,
741,
67543,
14535,
1695... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInitializeEtcdraftConsenter(t *testing.T) {
consenters := make(map[string]consensus.Consenter)
tmpdir, err := ioutil.TempDir("", "main_test-")
require.NoError(t, err)
defer os.RemoveAll(tmpdir)
rlf, err := fileledger.New(tmpdir, &disabled.Provider{})
require.NoError(t, err)
conf := genesisconfig.Load(... | explode_data.jsonl/32660 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 497
} | [
2830,
3393,
9928,
31860,
4385,
2944,
15220,
1950,
1155,
353,
8840,
836,
8,
341,
197,
6254,
306,
388,
1669,
1281,
9147,
14032,
60,
6254,
13626,
94594,
1950,
692,
20082,
3741,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
3817,
4452,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRuleError(t *testing.T) {
tests := []struct {
in RuleError
want string
}{
{
RuleError{Description: "duplicate block"},
"duplicate block",
},
{
RuleError{Description: "human-readable error"},
"human-readable error",
},
}
t.Logf("Running %d tests", len(tests))
for i, test := range... | explode_data.jsonl/31867 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 202
} | [
2830,
3393,
11337,
1454,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
17430,
256,
18100,
1454,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
515,
298,
11143,
1111,
1454,
90,
5009,
25,
330,
63826,
2504,
7115,
298... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestParseElement(t *testing.T) {
// test cases
cases := []struct {
// name is the name of the test useful if you want to run a single test
// from the command line -run TestParseElement/<name>
name string
// in is the path element to be parsed
in string
// fieldName is field name (YANG node name) exp... | explode_data.jsonl/78334 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1964
} | [
2830,
3393,
14463,
1691,
1155,
353,
8840,
836,
8,
341,
197,
322,
1273,
5048,
198,
1444,
2264,
1669,
3056,
1235,
341,
197,
197,
322,
829,
374,
279,
829,
315,
279,
1273,
5390,
421,
498,
1366,
311,
1598,
264,
3175,
1273,
198,
197,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestCNCILaunch(t *testing.T) {
testClient, client, instances := testStartWorkloadLaunchCNCI(t, 1)
defer testClient.Shutdown()
defer client.Shutdown()
id := instances[0].TenantID
// get CNCI info for this tenant
instances, err := ctl.ds.GetTenantCNCIs(id)
if err != nil {
t.Fatal(err)
}
if len(instance... | explode_data.jsonl/39706 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 253
} | [
2830,
3393,
34,
9949,
1715,
18423,
1155,
353,
8840,
836,
8,
341,
18185,
2959,
11,
2943,
11,
13121,
1669,
1273,
3479,
6776,
1078,
32067,
34,
9949,
40,
1155,
11,
220,
16,
340,
16867,
1273,
2959,
10849,
18452,
741,
16867,
2943,
10849,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestU24HTickerPriceChangeStats(t *testing.T) {
t.Parallel()
_, err := b.U24HTickerPriceChangeStats(context.Background(), currency.NewPair(currency.BTC, currency.USDT))
if err != nil {
t.Error(err)
}
_, err = b.U24HTickerPriceChangeStats(context.Background(), currency.EMPTYPAIR)
if err != nil {
t.Error(er... | explode_data.jsonl/76559 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
52,
17,
19,
2545,
5215,
6972,
4072,
16635,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
293,
5255,
17,
19,
2545,
5215,
6972,
4072,
16635,
5378,
19047,
1507,
11413,
7121,
12443,
90475,
1785,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestFormatToBytes(t *testing.T) {
inputs := []struct {
v int64
e string
}{
{v: 1000, e: "1000b"},
{v: 1024, e: "1.0KiB"},
{v: 3*decor.MiB + 140*decor.KiB, e: "3.1MiB"},
{v: 2 * decor.GiB, e: "2.0GiB"},
{v: 4 * decor.TiB, e: "4.0TiB"},
}
for _, input := range inputs {
actual := decor.Format(inp... | explode_data.jsonl/19795 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 225
} | [
2830,
3393,
4061,
1249,
7078,
1155,
353,
8840,
836,
8,
341,
22427,
82,
1669,
3056,
1235,
341,
197,
5195,
526,
21,
19,
198,
197,
7727,
914,
198,
197,
59403,
197,
197,
90,
85,
25,
220,
16,
15,
15,
15,
11,
384,
25,
330,
16,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestInsert(t *testing.T) {
tests := []struct {
name string
key func(int) interface{}
}{
{name: "uintptr", key: uKey},
{name: "int", key: iKey},
{name: "string", key: sKey},
{name: "[]byte", key: bKey},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
m := &HashMap{}
_, ok :... | explode_data.jsonl/24423 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 484
} | [
2830,
3393,
13780,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
23634,
220,
2915,
1548,
8,
3749,
16094,
197,
59403,
197,
197,
47006,
25,
330,
51380,
497,
1376,
25,
575,
1592,
1583,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIfdBuilder_FindN__First_1(t *testing.T) {
im := NewIfdMapping()
err := LoadStandardIfds(im)
log.PanicIf(err)
ti := NewTagIndex()
ib := NewIfdBuilder(im, ti, exifcommon.IfdStandardIfdIdentity, exifcommon.TestDefaultByteOrder)
bt := &BuilderTag{
ifdPath: exifcommon.IfdStandardIfdIdentity.UnindexedStri... | explode_data.jsonl/36627 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 570
} | [
2830,
3393,
2679,
67,
3297,
95245,
45,
563,
5338,
62,
16,
1155,
353,
8840,
836,
8,
341,
54892,
1669,
1532,
2679,
67,
6807,
2822,
9859,
1669,
8893,
19781,
2679,
5356,
25107,
340,
6725,
1069,
31270,
2679,
3964,
692,
72859,
1669,
1532,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestRowsWithChunkDownloader(t *testing.T) {
numChunks := 12
// changed the workers
backupMaxChunkDownloadWorkers := MaxChunkDownloadWorkers
MaxChunkDownloadWorkers = 2
logger.Info("START TESTS")
var i int
cc := make([][]*string, 0)
for i = 0; i < 100; i++ {
v1 := fmt.Sprintf("%v", i)
v2 := fmt.Sprintf(... | explode_data.jsonl/1794 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 751
} | [
2830,
3393,
9024,
2354,
28304,
92698,
1155,
353,
8840,
836,
8,
341,
22431,
89681,
1669,
220,
16,
17,
198,
197,
322,
5497,
279,
7337,
198,
197,
31371,
5974,
28304,
11377,
74486,
1669,
7487,
28304,
11377,
74486,
198,
197,
5974,
28304,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestUnmarshalWithDecoderOptions(t *testing.T) {
Set("credentials", "{\"foo\":\"bar\"}")
opt := DecodeHook(mapstructure.ComposeDecodeHookFunc(
mapstructure.StringToTimeDurationHookFunc(),
mapstructure.StringToSliceHookFunc(","),
// Custom Decode Hook Function
func(rf reflect.Kind, rt reflect.Kind, data i... | explode_data.jsonl/5569 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 341
} | [
2830,
3393,
1806,
27121,
2354,
20732,
3798,
1155,
353,
8840,
836,
8,
341,
22212,
445,
32353,
497,
54734,
7975,
23488,
2257,
2105,
55266,
64838,
1669,
50194,
31679,
9147,
7837,
85860,
32564,
31679,
9626,
1006,
197,
19567,
7837,
6431,
1249,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestImportInsideTry(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
let x
try {
x = import('nope1')
x = await import('nope2')
} catch {
}
`,
},
entryPaths: []string{"/entry.js"},
options: config.Options{
Mode: con... | explode_data.jsonl/38487 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 236
} | [
2830,
3393,
11511,
24480,
21453,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
4085,
2857,
788,
22074,
571,
10217,
856,
198,
571,
6799,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNasTypeNewPDUSessionReleaseRejectMessage(t *testing.T) {
for i, table := range nasMessagePDUSessionReleaseRejectTable {
t.Logf("Test Cnt:%d", i)
a := nasMessage.NewPDUSessionReleaseReject(0)
b := nasMessage.NewPDUSessionReleaseReject(0)
assert.NotNil(t, a)
assert.NotNil(t, b)
a.ExtendedProtocolD... | explode_data.jsonl/80423 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 468
} | [
2830,
3393,
45,
300,
929,
3564,
23025,
2034,
1338,
16077,
78413,
2052,
1155,
353,
8840,
836,
8,
1476,
2023,
600,
11,
1965,
1669,
2088,
17141,
2052,
23025,
2034,
1338,
16077,
78413,
2556,
341,
197,
3244,
98954,
445,
2271,
356,
406,
7533,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestParseDatetimeErr(t *testing.T) {
testCases := []struct {
Name string
BadValue string
}{
{
Name: "TotallyWrong",
BadValue: "notaDT",
},
{
Name: "ContainsValidHead",
BadValue: "10100203040506.456789+0102SomeText",
},
{
Name: "ContainsValidHead_LineBreak",
BadValu... | explode_data.jsonl/33900 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1892
} | [
2830,
3393,
14463,
94191,
7747,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
21297,
257,
914,
198,
197,
12791,
329,
1130,
914,
198,
197,
59403,
197,
197,
515,
298,
21297,
25,
257,
330,
64602,
745,
29185,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCreateAxisIDX(t *testing.T) {
expect := []float64{0, 2, 4, 6}
actual := createAxisIDX(4, 0, 6)
assert.Equal(t, expect, actual)
} | explode_data.jsonl/5231 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
4021,
8143,
76113,
1155,
353,
8840,
836,
8,
341,
24952,
1669,
3056,
3649,
21,
19,
90,
15,
11,
220,
17,
11,
220,
19,
11,
220,
21,
532,
88814,
1669,
1855,
8143,
76113,
7,
19,
11,
220,
15,
11,
220,
21,
340,
6948,
12808,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestGremlin(t *testing.T) {
simpleGraph := loadGraph("../../data/testdata.nq", t)
for _, test := range testQueries {
if test.tag == "" {
test.tag = TopResultTag
}
got := runQueryGetTag(simpleGraph, test.query, test.tag)
sort.Strings(got)
sort.Strings(test.expect)
t.Log("testing", test.message)
i... | explode_data.jsonl/9624 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 189
} | [
2830,
3393,
64747,
40926,
1155,
353,
8840,
836,
8,
341,
1903,
6456,
11212,
1669,
2795,
11212,
36800,
691,
12697,
691,
1253,
80,
497,
259,
340,
2023,
8358,
1273,
1669,
2088,
1273,
55261,
341,
197,
743,
1273,
12399,
621,
1591,
341,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestPathRelativeToIncludeInvokedInCorrectPathFromChild(t *testing.T) {
t.Parallel()
appPath := path.Join(TEST_FIXTURE_RELATIVE_INCLUDE_CMD, "app")
stdout := bytes.Buffer{}
stderr := bytes.Buffer{}
err := runTerragruntCommand(t, fmt.Sprintf("terragrunt version --terragrunt-log-level trace --terragrunt-non-in... | explode_data.jsonl/10184 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
1820,
93347,
22283,
15174,
10823,
641,
33092,
1820,
3830,
3652,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
28236,
1820,
1669,
1815,
22363,
50320,
42635,
41486,
41207,
23215,
48081,
16344,
11,
330,
676,
5130,
6736,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestContainerStatsCollectionStopsIfContainerIsTerminal(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockDockerClient := mock_dockerapi.NewMockDockerClient(ctrl)
resolver := mock_resolver.NewMockContainerMetadataResolver(ctrl)
dockerID := "container1"
ctx, cancel := context.WithCancel(... | explode_data.jsonl/22613 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 372
} | [
2830,
3393,
4502,
16635,
6482,
623,
3721,
2679,
4502,
3872,
47890,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
741,
77333,
35,
13659,
2959,
1669,
7860,
814,
13659,
2068,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNewReadLogsCommandNoAttempts(t *testing.T) {
cmd := newReadLogsCommand()
cmd.WaitFileTimeout = 0
err := cmd.execute()
assert.ErrorIs(t, err, errNoAttemptsToOpenFile)
} | explode_data.jsonl/3424 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
3564,
4418,
51053,
4062,
2753,
81517,
1155,
353,
8840,
836,
8,
341,
25920,
1669,
501,
4418,
51053,
4062,
741,
25920,
28384,
1703,
7636,
284,
220,
15,
271,
9859,
1669,
5439,
7769,
741,
6948,
6141,
3872,
1155,
11,
1848,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestBoolColumnValue_AsString(t *testing.T) {
tests := []struct {
name string
b *BoolColumnValue
want string
wantErr bool
}{
{
name: "true",
b: NewBoolColumnValue(true).(*BoolColumnValue),
want: "true",
},
{
name: "false",
b: NewBoolColumnValue(false).(*BoolColumnVal... | explode_data.jsonl/73242 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 339
} | [
2830,
3393,
11233,
2933,
1130,
62741,
703,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
2233,
981,
353,
11233,
2933,
1130,
198,
197,
50780,
262,
914,
198,
197,
50780,
7747,
1807,
198,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestL(t *testing.T) {
buf := bytes.NewBuffer(nil)
replacer := Must(New(buf))
backup := defaultLogger
t.Cleanup(func() { defaultLogger = backup }) // nolint: paralleltest
defaultLogger = replacer // nolint: paralleltest
t.Run("success(Print)", func(t *testing.T) {
t.Cleanup(buf.Reset)
L().Print(DEFAUL... | explode_data.jsonl/71324 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 221
} | [
2830,
3393,
43,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
5820,
7121,
4095,
27907,
340,
17200,
90212,
1669,
15465,
35063,
10731,
4390,
197,
31371,
1669,
1638,
7395,
271,
3244,
727,
60639,
18552,
368,
314,
1638,
7395,
284,
15725,
6413,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSetupInvitedUser(t *testing.T) {
initAccessTest(t, "")
tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t)
defer createTempDirCallback()
setEnvCallBack := clientTestUtils.SetEnvWithCallbackAndAssert(t, coreutils.HomeDir, tempDirPath)
defer setEnvCallBack()
serverDetails ... | explode_data.jsonl/35684 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 355
} | [
2830,
3393,
21821,
15174,
1608,
1474,
1155,
353,
8840,
836,
8,
341,
28248,
6054,
2271,
1155,
11,
14676,
16280,
6184,
1820,
11,
1855,
12151,
6184,
7494,
1669,
6200,
23841,
7251,
12151,
6184,
2354,
7494,
3036,
8534,
1155,
340,
16867,
1855,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMultipleQueries(t *testing.T) {
// Importer
var buildContext = build.Default
buildContext.GOPATH = "testdata"
imp := importer.New(&importer.Config{Build: &buildContext})
// Oracle
filename := "testdata/src/main/multi.go"
o, err := oracle.New(imp, []string{filename}, nil, true)
if err != nil {
t.Fata... | explode_data.jsonl/19471 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 452
} | [
2830,
3393,
32089,
55261,
1155,
353,
8840,
836,
8,
341,
197,
322,
13213,
261,
198,
2405,
1936,
1972,
284,
1936,
13275,
198,
69371,
1972,
1224,
3067,
4827,
284,
330,
92425,
698,
197,
6664,
1669,
62561,
7121,
2099,
474,
261,
10753,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestContextError(t *testing.T) {
c, _ := CreateTestContext(httptest.NewRecorder())
assert.Empty(t, c.Errors)
firstErr := errors.New("first error")
c.Error(firstErr) // nolint: errcheck
assert.Len(t, c.Errors, 1)
assert.Equal(t, "Error #01: first error\n", c.Errors.String())
secondErr := errors.New("second... | explode_data.jsonl/26813 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 397
} | [
2830,
3393,
1972,
1454,
1155,
353,
8840,
836,
8,
341,
1444,
11,
716,
1669,
4230,
2271,
1972,
73392,
83,
70334,
7121,
47023,
2398,
6948,
11180,
1155,
11,
272,
61745,
692,
42190,
7747,
1669,
5975,
7121,
445,
3896,
1465,
1138,
1444,
6141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestFilterLine_FiltersEachLineThroughSuppliedFunction(t *testing.T) {
t.Parallel()
input := "hello\nworld"
want := "HELLO\nWORLD\n"
got, err := script.Echo(input).FilterLine(strings.ToUpper).String()
if err != nil {
t.Fatal(err)
}
if want != got {
t.Error(cmp.Diff(want, got))
}
} | explode_data.jsonl/51475 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
5632,
2460,
1400,
8612,
4854,
2460,
23857,
10048,
3440,
5152,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
22427,
1669,
330,
14990,
1699,
14615,
698,
50780,
1669,
330,
50712,
1593,
1699,
54,
24956,
1699,
698,
3174,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestVector(t *testing.T) {
if got, want := len(V()), 3; got != want {
t.Fatalf("length of a vector is wrong: got=%d, want=%d", got, want)
}
v := V(1, 2, 3)
v2 := V(2, 4, 6)
if !v.Add(v).Equals(v2) {
t.Errorf("addition failed: %v+%v != %v", v, v, v2)
}
if !v.Add(v).Sub(v2).Equals(ZeroV) {
t.Errorf("s... | explode_data.jsonl/47408 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
3781,
1155,
353,
8840,
836,
8,
341,
743,
2684,
11,
1366,
1669,
2422,
12410,
11858,
220,
18,
26,
2684,
961,
1366,
341,
197,
3244,
30762,
445,
4129,
315,
264,
4621,
374,
4969,
25,
2684,
7846,
67,
11,
1366,
7846,
67,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestDeleteGroupMember(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
group := th.CreateGroup()
groupMember, err := th.App.CreateOrRestoreGroupMember(group.Id, th.BasicUser.Id)
require.Nil(t, err)
require.NotNil(t, groupMember)
groupMember, err = th.App.DeleteGroupMember(groupMember.GroupId,... | explode_data.jsonl/37040 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
6435,
2808,
9366,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
44260,
1669,
270,
7251,
2808,
741,
44260,
9366,
11,
1848,
1669,
270,
5105,
7251,
2195,
56284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTailDosLineendings(t *testing.T) {
tmpfile, err := ioutil.TempFile("", "")
require.NoError(t, err)
defer os.Remove(tmpfile.Name())
_, err = tmpfile.WriteString("cpu usage_idle=100\r\ncpu2 usage_idle=200\r\n")
require.NoError(t, err)
tt := NewTail()
tt.FromBeginning = true
tt.Files = []string{tmpfile.N... | explode_data.jsonl/42345 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
44795,
84343,
2460,
408,
819,
1155,
353,
8840,
836,
8,
341,
20082,
1192,
11,
1848,
1669,
43144,
65009,
1703,
19814,
14676,
17957,
35699,
1155,
11,
1848,
340,
16867,
2643,
13270,
10368,
1192,
2967,
2398,
197,
6878,
1848,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_storePipelineSpec_metadata(t *testing.T) {
pipelinerunlabels := map[string]string{"lbl1": "value1", "lbl2": "value2"}
pipelinerunannotations := map[string]string{"io.annotation.1": "value1", "io.annotation.2": "value2"}
pipelinelabels := map[string]string{"lbl1": "another value", "lbl3": "value3"}
pipelin... | explode_data.jsonl/27323 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 495
} | [
2830,
3393,
14809,
34656,
8327,
22220,
1155,
353,
8840,
836,
8,
341,
3223,
81079,
10453,
359,
16873,
1669,
2415,
14032,
30953,
4913,
31998,
16,
788,
330,
957,
16,
497,
330,
31998,
17,
788,
330,
957,
17,
16707,
3223,
81079,
10453,
359,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestErrFileSize(t *testing.T) {
err := createTestPNG()
if err != nil {
t.Fatal(err)
}
defer deleteTestPNG()
// Create a new test request.
req, err := createRequest(testPNGName)
if err != nil {
t.Fatal(err)
}
req.Header.Set("Content-Length", "1025")
// Upload the image.
_, err = New("file", req, &... | explode_data.jsonl/69267 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
7747,
67649,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
1855,
2271,
59824,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
3698,
2271,
59824,
2822,
197,
322,
4230,
264,
501,
1273,
1681,
624,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestParseStoreDebugMatchersParam(t *testing.T) {
for i, tc := range []struct {
storeMatchers string
fail bool
result [][]*labels.Matcher
}{
{
storeMatchers: "123",
fail: true,
},
{
storeMatchers: "foo",
fail: false,
result: [][]*labels.Matcher{{... | explode_data.jsonl/72409 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 691
} | [
2830,
3393,
14463,
6093,
7939,
37862,
2001,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
17130,
1669,
2088,
3056,
1235,
341,
197,
57279,
37862,
914,
198,
197,
63052,
688,
1807,
198,
197,
9559,
286,
52931,
9,
16873,
76452,
198,
197,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestHistWalk_Close(t *testing.T) {
f := startHistwalkTest(t)
defer f.Cleanup()
f.TTYCtrl.Inject(term.K('[', ui.Ctrl))
f.TestTTY(t, "~> ", term.DotHere)
} | explode_data.jsonl/51734 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
63057,
48849,
68185,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
1191,
63057,
19059,
2271,
1155,
340,
16867,
282,
727,
60639,
2822,
1166,
836,
22098,
15001,
41046,
44654,
11352,
20582,
516,
7505,
727,
9599,
1171,
1166,
8787,
555... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestSupernodeBootstrappedAddCat(t *testing.T) {
// create 8 supernode-routing bootstrap nodes
// create 2 supernode-routing clients both bootstrapped to the bootstrap nodes
// let the bootstrap nodes share a single datastore
// add a large file on one node then cat the file from the other
conf := testutil.Lat... | explode_data.jsonl/4350 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
10048,
932,
534,
17919,
495,
5677,
2212,
26801,
1155,
353,
8840,
836,
8,
341,
197,
322,
1855,
220,
23,
38787,
534,
52156,
26925,
7798,
198,
197,
322,
1855,
220,
17,
38787,
534,
52156,
8239,
2176,
10459,
495,
5677,
311,
279... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestReversiAnz7(t *testing.T) {
r := NewReversiAnz()
r.SetAvg(1.1)
if r.GetAvg() != 1.1 {
t.Errorf("NG")
}
} | explode_data.jsonl/23030 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 66
} | [
2830,
3393,
693,
3004,
72,
2082,
89,
22,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
693,
3004,
72,
2082,
89,
741,
7000,
4202,
39447,
7,
16,
13,
16,
340,
743,
435,
2234,
39447,
368,
961,
220,
16,
13,
16,
341,
197,
3244,
1308... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestHandleTestsGet(t *testing.T) {
tests := []struct {
name string
wantCode int
wantBody string
tests config.Tests
}{
{
name: "Testing getting all tests, 1 test stored",
wantCode: http.StatusOK,
wantBody: `{"major_test":[{"name":"minor_test 1","args":{},"mustfail":false,"wait":0,"wa... | explode_data.jsonl/18691 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 589
} | [
2830,
3393,
6999,
18200,
1949,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
50780,
2078,
526,
198,
197,
50780,
5444,
914,
198,
197,
78216,
262,
2193,
37133,
198,
197,
59403,
197,
197,
515... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestOurConfig(t *testing.T) {
cm, example := ConfigMapsFromTestFile(t, logging.ConfigMapName())
if cfg, err := NewConfigFromConfigMap(cm); err != nil {
t.Errorf("Expected no errors. got: %v", err)
} else if cfg == nil {
t.Errorf("NewConfigFromConfigMap(actual) = %v, want non-nil", cfg)
}
if cfg, err := ... | explode_data.jsonl/37328 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 196
} | [
2830,
3393,
7981,
2648,
1155,
353,
8840,
836,
8,
341,
98316,
11,
3110,
1669,
5532,
36562,
3830,
2271,
1703,
1155,
11,
8392,
10753,
2227,
675,
12367,
743,
13286,
11,
1848,
1669,
1532,
2648,
3830,
2648,
2227,
51126,
1215,
1848,
961,
2092,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.