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 TestHashIncrby(t *testing.T) {
s, err := Run()
ok(t, err)
defer s.Close()
c, err := proto.Dial(s.Addr())
ok(t, err)
defer c.Close()
// New key
must1(t, c, "HINCRBY", "hash", "field", "1")
// Existing key
mustDo(t, c,
"HINCRBY", "hash", "field", "100",
proto.Int(101),
)
// Minus works.
mustDo(t,... | explode_data.jsonl/11377 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 440
} | [
2830,
3393,
6370,
641,
5082,
1694,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
6452,
741,
59268,
1155,
11,
1848,
340,
16867,
274,
10421,
741,
1444,
11,
1848,
1669,
18433,
98462,
1141,
93626,
2398,
59268,
1155,
11,
1848,
340,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFSThrash(t *testing.T) {
files := make(map[string][]byte)
if testing.Short() {
t.SkipNow()
}
_, mnt := setupIpnsTest(t, nil)
defer mnt.Close()
base := mnt.Dir + "/local"
dirs := []string{base}
dirlock := sync.RWMutex{}
filelock := sync.Mutex{}
ndirWorkers := 2
nfileWorkers := 2
ndirs := 100
... | explode_data.jsonl/77472 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 806
} | [
2830,
3393,
37,
784,
4079,
988,
1155,
353,
8840,
836,
8,
341,
74075,
1669,
1281,
9147,
14032,
45725,
3782,
692,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
7039,
741,
197,
532,
197,
6878,
296,
406,
1669,
6505,
23378,
4412,
2271,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAcceptReject(t *testing.T) {
rs := NewRuleSet([]Rule{AcceptRule, RejectRule})
result, rule := rs.Apply(&cb.Envelope{})
if result != Accept {
t.Fatalf("Should have accepted")
}
if rule != AcceptRule {
t.Fatalf("Accepted but not for the right rule")
}
} | explode_data.jsonl/11103 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
16646,
78413,
1155,
353,
8840,
836,
8,
341,
41231,
1669,
1532,
11337,
1649,
10556,
11337,
90,
16646,
11337,
11,
87293,
11337,
3518,
9559,
11,
5912,
1669,
10036,
36051,
2099,
7221,
22834,
18853,
37790,
743,
1102,
961,
20829,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGocloak_UserAttributeContains(t *testing.T) {
t.Parallel()
attributes := map[string][]string{}
attributes["foo"] = []string{"bar", "alice", "bob", "roflcopter"}
attributes["bar"] = []string{"baz"}
client := NewClientWithDebug(t)
ok := client.UserAttributeContains(attributes, "foo", "alice")
FailIf(t, ... | explode_data.jsonl/79515 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
38,
509,
385,
585,
31339,
3907,
23805,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
12340,
1669,
2415,
14032,
45725,
917,
16094,
197,
12340,
1183,
7975,
1341,
284,
3056,
917,
4913,
2257,
497,
330,
63195,
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... | 1 |
func TestSkipContentSha256Cksum(t *testing.T) {
testCases := []struct {
inputHeaderKey string
inputHeaderValue string
inputQueryKey string
inputQueryValue string
expectedResult bool
}{
// Test case - 1.
// Test case with "X-Amz-Content-Sha256" header set to empty value.
{"X-Amz-Content-Sha256", ... | explode_data.jsonl/81625 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 646
} | [
2830,
3393,
35134,
2762,
62316,
17,
20,
21,
34,
74,
1242,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
22427,
4047,
1592,
256,
914,
198,
197,
22427,
97721,
914,
271,
197,
22427,
2859,
1592,
256,
914,
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... | 6 |
func TestFailServe(t *testing.T) {
lis := bufconn.Listen(0)
lis.Close()
core, logs := observer.New(zap.NewAtomicLevelAt(zapcore.ErrorLevel))
var wg sync.WaitGroup
wg.Add(1)
startServer(grpc.NewServer(), lis, zap.New(core), func(e error) {
assert.Equal(t, 1, len(logs.All()))
assert.Equal(t, "Could not launch g... | explode_data.jsonl/15623 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
19524,
60421,
1155,
353,
8840,
836,
8,
341,
8810,
285,
1669,
6607,
5148,
68334,
7,
15,
340,
8810,
285,
10421,
741,
71882,
11,
18422,
1669,
22067,
7121,
13174,
391,
7121,
65857,
4449,
1655,
13174,
391,
2153,
6141,
4449,
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 TestLimitRangeUpdate(t *testing.T) {
ns := api.NamespaceDefault
limitRange := &api.LimitRange{
ObjectMeta: api.ObjectMeta{
Name: "abc",
ResourceVersion: "1",
},
Spec: api.LimitRangeSpec{
Limits: []api.LimitRangeItem{
{
Type: api.LimitTypePod,
Max: api.ResourceList{
a... | explode_data.jsonl/69630 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 374
} | [
2830,
3393,
16527,
6046,
4289,
1155,
353,
8840,
836,
8,
341,
84041,
1669,
6330,
46011,
3675,
198,
8810,
2353,
6046,
1669,
609,
2068,
1214,
2353,
6046,
515,
197,
23816,
12175,
25,
6330,
80222,
515,
298,
21297,
25,
310,
330,
13683,
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... | 1 |
func TestConfigParsing(t *testing.T) {
for _, profile := range []string{
genesisconfig.SampleInsecureSoloProfile,
genesisconfig.SampleSingleMSPSoloProfile,
genesisconfig.SampleSingleMSPSoloV11Profile,
genesisconfig.SampleDevModeSoloProfile,
genesisconfig.SampleInsecureKafkaProfile,
genesisconfig.SampleSing... | explode_data.jsonl/78124 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 298
} | [
2830,
3393,
2648,
68839,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
5526,
1669,
2088,
3056,
917,
515,
197,
82281,
13774,
1676,
76266,
641,
25132,
89299,
8526,
345,
197,
82281,
13774,
1676,
76266,
10888,
44,
4592,
89299,
8526,
345,
197,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewAPIToken(t *testing.T) {
readonlyRoot, err := NewAPIToken("0", "/", true)
if err != nil {
t.Fatal("Got error generating token: ", err)
}
if readonlyRoot.Write != true {
t.Fatal("Expected write token in return")
}
if readonlyRoot.Resource != "/" {
t.Fatal("Expected root token")
}
if readonlyRoo... | explode_data.jsonl/45709 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 353
} | [
2830,
3393,
3564,
2537,
952,
1679,
1155,
353,
8840,
836,
8,
341,
197,
22569,
8439,
11,
1848,
1669,
1532,
2537,
952,
1679,
445,
15,
497,
64657,
830,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
445,
32462,
1465,
23163,
3950,
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... | 8 |
func TestOffset(t *testing.T) {
var posts []*Post
qs := dORM.QueryTable("post")
num, err := qs.Limit(1).Offset(2).All(&posts)
throwFail(t, err)
throwFail(t, AssertIs(num, 1))
num, err = qs.Offset(2).All(&posts)
throwFail(t, err)
throwFail(t, AssertIs(num, 2))
} | explode_data.jsonl/18132 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
6446,
1155,
353,
8840,
836,
8,
341,
2405,
7999,
29838,
4133,
198,
18534,
82,
1669,
294,
4365,
15685,
2556,
445,
2203,
1138,
22431,
11,
1848,
1669,
32421,
1214,
2353,
7,
16,
568,
6446,
7,
17,
568,
2403,
2099,
12664,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTmpfsDevShmNoDupMount(t *testing.T) {
c := &container.Container{
ShmPath: "foobar", // non-empty, for c.IpcMounts() to work
HostConfig: &containertypes.HostConfig{
IpcMode: containertypes.IpcMode("shareable"), // default mode
// --tmpfs /dev/shm:rw,exec,size=NNN
Tmpfs: map[string]string{
"/de... | explode_data.jsonl/51542 | {
"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,
35986,
3848,
14592,
2016,
76,
2753,
85713,
16284,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
609,
3586,
33672,
515,
197,
197,
2016,
76,
1820,
25,
330,
50267,
497,
442,
2477,
39433,
11,
369,
272,
2447,
3992,
16284,
82,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_PutGetDeleteWithPrefix(t *testing.T) {
endpoint := os.Getenv("ETCD_ENDPOINT")
if endpoint == "" {
t.Error("not found env ETCD_ENDPOINT or ETCD_ENDPOINT is empty string")
return
}
fmt.Printf("endpoint=[%s]\n", endpoint)
Init(endpoint)
defer Close()
for i := range make([]int, 3) {
err := Put(fmt... | explode_data.jsonl/27603 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 282
} | [
2830,
3393,
1088,
332,
1949,
6435,
2354,
14335,
1155,
353,
8840,
836,
8,
341,
6246,
2768,
1669,
2643,
64883,
445,
1348,
6484,
48756,
1138,
743,
14887,
621,
1591,
341,
197,
3244,
6141,
445,
1921,
1730,
6105,
17768,
6484,
48756,
476,
1776... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateZipfGenerator(t *testing.T) {
defer leaktest.AfterTest(t)()
for _, gen := range gens {
rng := rand.New(rand.NewSource(timeutil.Now().UnixNano()))
_, err := NewZipfGenerator(rng, gen.iMin, gen.iMax, gen.theta, false)
if err != nil {
t.Fatal(err)
}
}
} | explode_data.jsonl/54583 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
4021,
31047,
69,
12561,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
2023,
8358,
4081,
1669,
2088,
46004,
341,
197,
7000,
968,
1669,
10382,
7121,
37595,
7121,
3608,
9730,
1314,
13244,
1005,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStructLevelInvalidError(t *testing.T) {
validate := New()
validate.RegisterStructValidation(StructLevelInvalidError, StructLevelInvalidErr{})
var test StructLevelInvalidErr
err := validate.Struct(test)
NotEqual(t, err, nil)
errs, ok := err.(ValidationErrors)
Equal(t, ok, true)
fe := errs[0]
Equal... | explode_data.jsonl/77215 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 245
} | [
2830,
3393,
9422,
4449,
7928,
1454,
1155,
353,
8840,
836,
8,
1476,
197,
7067,
1669,
1532,
741,
197,
7067,
19983,
9422,
13799,
7,
9422,
4449,
7928,
1454,
11,
16139,
4449,
7928,
7747,
6257,
692,
2405,
1273,
16139,
4449,
7928,
7747,
271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEscapeMarkdownOne(t *testing.T) {
provider := [][]string{
{"user", "user"},
{"user_name", `user\_name`},
{"user_name_long", `user\_name\_long`},
{`user\_name\_escaped`, `user\_name\_escaped`},
}
for _, testCase := range provider {
assert.Equal(t, testCase[1], escapeMarkdownOne(testCase[0]))
}
} | explode_data.jsonl/17934 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
48124,
68005,
3966,
1155,
353,
8840,
836,
8,
341,
197,
19979,
1669,
52931,
917,
515,
197,
197,
4913,
872,
497,
330,
872,
7115,
197,
197,
4913,
872,
1269,
497,
1565,
872,
75738,
606,
63,
1583,
197,
197,
4913,
872,
1269,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProwJobToPod_setsTerminationGracePeriodSeconds(t *testing.T) {
testCases := []struct {
name string
prowjob *prowapi.ProwJob
expectedTerminationGracePeriodSeconds int64
}{
{
name: "GracePeriodSeconds from decoration config",
prowjob:... | explode_data.jsonl/79315 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 781
} | [
2830,
3393,
47,
651,
12245,
1249,
23527,
21289,
21209,
32096,
86543,
23750,
15343,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
6656,
914,
198,
197,
3223,
651,
8799,
7561,
353,
79,
651,
2068,
1069,
651,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPRG(t *testing.T) {
mod := big.NewInt(3123130983042421)
ns := 13
leader := 3
gen := NewGenPRG(ns, leader)
v := big.NewInt(123131)
shares := gen.Share(mod, v)
res := new(big.Int)
for i := 0; i < ns; i++ {
res.Add(res, shares[i])
}
res.Mod(res, mod)
if res.Cmp(v) != 0 {
t.Fail()
}
for i := 0... | explode_data.jsonl/8679 | {
"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,
6480,
38,
1155,
353,
8840,
836,
8,
341,
42228,
1669,
2409,
7121,
1072,
7,
18,
16,
17,
18,
16,
18,
15,
24,
23,
18,
15,
19,
17,
19,
17,
16,
692,
84041,
1669,
220,
16,
18,
198,
197,
37391,
1669,
220,
18,
198,
82281,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetPersistentVolumeDetail(t *testing.T) {
cases := []struct {
name string
persistentVolume *api.PersistentVolume
expected *PersistentVolumeDetail
}{
{
"foo",
&api.PersistentVolume{
ObjectMeta: metaV1.ObjectMeta{Name: "foo"},
Spec: api.PersistentVolumeSpec{
Persi... | explode_data.jsonl/54241 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 839
} | [
2830,
3393,
1949,
53194,
18902,
10649,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
1797,
914,
198,
197,
3223,
13931,
18902,
353,
2068,
61655,
18902,
198,
197,
42400,
260,
353,
53194,
18902,
10649,
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... | 4 |
func TestRouterTimeout(t *testing.T) {
// Create a timeout manager
maxTimeout := 25 * time.Millisecond
tm := timeout.Manager{}
err := tm.Initialize(&timer.AdaptiveTimeoutConfig{
InitialTimeout: 10 * time.Millisecond,
MinimumTimeout: 10 * time.Millisecond,
MaximumTimeout: maxTimeout,
TimeoutCoeff... | explode_data.jsonl/3079 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1057
} | [
2830,
3393,
9523,
7636,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
264,
9632,
6645,
198,
22543,
7636,
1669,
220,
17,
20,
353,
882,
71482,
198,
3244,
76,
1669,
9632,
58298,
16094,
9859,
1669,
17333,
45829,
2099,
19278,
17865,
27781,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExpiration(t *testing.T) {
nodeNum := 5
bootPeers := []string{bootPeer(2611), bootPeer(2612)}
instances := []*gossipInstance{}
inst := createDiscoveryInstance(2611, "d1", bootPeers)
instances = append(instances, inst)
inst = createDiscoveryInstance(2612, "d2", bootPeers)
instances = append(instances, ... | explode_data.jsonl/62264 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 375
} | [
2830,
3393,
66301,
1155,
353,
8840,
836,
8,
341,
20831,
4651,
1669,
220,
20,
198,
197,
4619,
10197,
388,
1669,
3056,
917,
90,
4619,
30888,
7,
17,
21,
16,
16,
701,
10459,
30888,
7,
17,
21,
16,
17,
10569,
197,
47825,
1669,
29838,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPatternAlbumsToEntries(t *testing.T) {
f := newTestLister(t)
ctx := context.Background()
_, err := albumsToEntries(ctx, f, false, "potato/", "sub")
assert.Equal(t, fs.ErrorDirNotFound, err)
f.albums.add(&api.Album{
ID: "1",
Title: "sub/one",
})
entries, err := albumsToEntries(ctx, f, false, "p... | explode_data.jsonl/24372 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 424
} | [
2830,
3393,
15760,
32378,
82,
1249,
24533,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
2271,
852,
261,
1155,
340,
20985,
1669,
2266,
19047,
2822,
197,
6878,
1848,
1669,
27685,
1249,
24533,
7502,
11,
282,
11,
895,
11,
330,
19099,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServicecheckQsIDs(t *testing.T) {
convey.Convey("checkQsIDs", t, func() {
ok, err := s.checkQsIDs(context.Background(), []int64{}, 0, []int64{}, 0)
convey.So(err, convey.ShouldBeNil)
convey.So(ok, convey.ShouldNotBeNil)
})
} | explode_data.jsonl/21128 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
1860,
2028,
48,
82,
30466,
1155,
353,
8840,
836,
8,
341,
37203,
5617,
4801,
5617,
445,
2028,
48,
82,
30466,
497,
259,
11,
2915,
368,
341,
197,
59268,
11,
1848,
1669,
274,
9093,
48,
82,
30466,
5378,
19047,
1507,
3056,
396... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPCollection_sizeReset(t *testing.T) {
// Check the initial values after resetting.
var pcol PCollection
pcol.resetSize()
snap := pcol.snapshot()
checkPCollectionSizeSample(t, snap, 0, 0, math.MaxInt64, math.MinInt64)
} | explode_data.jsonl/34966 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 83
} | [
2830,
3393,
4872,
1908,
2368,
14828,
1155,
353,
8840,
836,
8,
341,
197,
322,
4248,
279,
2856,
2750,
1283,
78028,
624,
2405,
281,
2074,
393,
6482,
198,
3223,
2074,
13857,
1695,
741,
1903,
6861,
1669,
281,
2074,
52677,
741,
25157,
4872,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBackTrace(t *testing.T) {
l, b := newBufferedRevelLog()
log.Logger = l
log.Error("an error")
_, file, line, _ := runtime.Caller(0)
mustContain := fmt.Sprintf("%s:%d", filepath.Base(file), line-1)
actual := b.String()
if ok := strings.Contains(actual, mustContain); !ok {
t.Errorf("Log output mismatch ... | explode_data.jsonl/3456 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
3707,
6550,
1155,
353,
8840,
836,
8,
341,
8810,
11,
293,
1669,
501,
4095,
291,
693,
889,
2201,
741,
6725,
12750,
284,
326,
198,
6725,
6141,
445,
276,
1465,
1138,
197,
6878,
1034,
11,
1555,
11,
716,
1669,
15592,
727,
1395... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDockerLBPort(t *testing.T) {
clusterName := "clusterName"
wantPort := "test:port"
clusterLBName := fmt.Sprintf("%s-lb", clusterName)
ctx := context.Background()
mockCtrl := gomock.NewController(t)
executable := mockexecutables.NewMockExecutable(mockCtrl)
executable.EXPECT().Execute(ctx, []string{"p... | explode_data.jsonl/6801 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 217
} | [
2830,
3393,
1949,
35,
13659,
34068,
7084,
1155,
353,
8840,
836,
8,
341,
197,
18855,
675,
1669,
330,
18855,
675,
698,
50780,
7084,
1669,
330,
1944,
25,
403,
698,
197,
18855,
34068,
675,
1669,
8879,
17305,
4430,
82,
2852,
65,
497,
10652... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_validateMultisigThreshold(t *testing.T) {
type args struct {
k int
nKeys int
}
tests := []struct {
name string
args args
wantErr bool
}{
{"zeros", args{0, 0}, true},
{"1-0", args{1, 0}, true},
{"1-1", args{1, 1}, false},
{"1-2", args{1, 1}, false},
{"1-2", args{2, 1}, true},
... | explode_data.jsonl/13881 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 288
} | [
2830,
3393,
42681,
40404,
285,
343,
37841,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
16463,
257,
526,
198,
197,
9038,
8850,
526,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImagePull(t *testing.T) {
client, err := newClient(t, address)
if err != nil {
t.Fatal(err)
}
defer client.Close()
ctx, cancel := testContext()
defer cancel()
_, err = client.Pull(ctx, testImage, WithPlatform(platforms.Default()))
if err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/37732 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 114
} | [
2830,
3393,
1906,
36068,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
501,
2959,
1155,
11,
2621,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
2943,
10421,
2822,
20985,
11,
9121,
1669,
1273,
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 TestBadConfigs(t *testing.T) {
for _, ee := range expectedErrors {
_, err := LoadFile("testdata/" + ee.filename)
require.Error(t, err, "%s", ee.filename)
require.Contains(t, err.Error(), ee.errMsg,
"Expected error for %s to contain %q but got: %s", ee.filename, ee.errMsg, err)
}
} | explode_data.jsonl/81278 | {
"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,
17082,
84905,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
36343,
1669,
2088,
3601,
13877,
341,
197,
197,
6878,
1848,
1669,
8893,
1703,
445,
92425,
11225,
488,
36343,
30882,
340,
197,
17957,
6141,
1155,
11,
1848,
11,
5962,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDomainSuffix(t *testing.T) {
//Test cases
cases := map[string]string{
"http://google.com": "com",
"http://google.com/ding?true": "com",
"google.com/?ding=false": "com",
"google.com?ding=false": "com",
"nonexist.***": "",
"google.com": "com",
... | explode_data.jsonl/30832 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 381
} | [
2830,
3393,
13636,
40177,
1155,
353,
8840,
836,
8,
341,
197,
322,
2271,
5048,
198,
1444,
2264,
1669,
2415,
14032,
30953,
515,
197,
197,
76932,
1110,
17485,
905,
788,
1843,
330,
874,
756,
197,
197,
76932,
1110,
17485,
905,
3446,
287,
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... | 3 |
func TestRest_UserAllData(t *testing.T) {
ts, srv, teardown := startupT(t)
defer teardown()
// write 3 comments
user := store.User{ID: "dev", Name: "user name 1"}
c1 := store.Comment{User: user, Text: "test test #1", Locator: store.Locator{SiteID: "remark42",
URL: "https://radio-t.com/blah1"}, Timestamp: time.D... | explode_data.jsonl/37402 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1014
} | [
2830,
3393,
12416,
31339,
2403,
1043,
1155,
353,
8840,
836,
8,
341,
57441,
11,
43578,
11,
49304,
1669,
20567,
51,
1155,
340,
16867,
49304,
2822,
197,
322,
3270,
220,
18,
6042,
198,
19060,
1669,
3553,
7344,
90,
915,
25,
330,
3583,
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... | 1 |
func TestFormatterReset(test *testing.T) {
f := formatter.New()
assert.Equal(test, "z", f.SetPlaceholder("z").GetPlaceholder())
assert.Equal(test, "[", f.SetDelimiters("[", "]").GetLeftDelimiter())
assert.NotEmpty(test, f.AddFunction("f", func() {}).GetFunctions())
assert.Equal(test, f, f.Reset())
assert.Equal(... | explode_data.jsonl/39735 | {
"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,
14183,
14828,
8623,
353,
8840,
836,
8,
341,
1166,
1669,
24814,
7121,
2822,
6948,
12808,
8623,
11,
330,
89,
497,
282,
4202,
48305,
445,
89,
1827,
1949,
48305,
2398,
6948,
12808,
8623,
11,
10545,
497,
282,
4202,
16532,
67645,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccAlicloudOssBucketObject_source(t *testing.T) {
tmpFile, err := ioutil.TempFile("", "tf-oss-object-test-acc-source")
if err != nil {
t.Fatal(err)
}
defer os.Remove(tmpFile.Name())
// first write some data to the tempfile just so it's not 0 bytes.
err = ioutil.WriteFile(tmpFile.Name(), []byte("{anyth... | explode_data.jsonl/1526 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 519
} | [
2830,
3393,
14603,
32,
415,
52178,
46,
778,
36018,
1190,
10347,
1155,
353,
8840,
836,
8,
341,
20082,
1703,
11,
1848,
1669,
43144,
65009,
1703,
19814,
330,
8935,
12,
3662,
40432,
16839,
12,
4475,
30774,
1138,
743,
1848,
961,
2092,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Bubble(t *testing.T) {
array := []int{10,50,60,1,29,95,02,6,025,4521,020,4515,2,5,15,24,65,6,1,051,10,24,45,1,4,51,42}
list := Bubble(array)
t.Logf("%+v",list)
} | explode_data.jsonl/14877 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
1668,
14600,
1155,
353,
8840,
836,
8,
220,
341,
11923,
1669,
3056,
396,
90,
16,
15,
11,
20,
15,
11,
21,
15,
11,
16,
11,
17,
24,
11,
24,
20,
11,
15,
17,
11,
21,
11,
15,
17,
20,
11,
19,
20,
17,
16,
11,
15,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFailureBadLogs(t *testing.T) {
badLogsESSpan, err := loadESSpanFixture(1)
require.NoError(t, err)
badLogsESSpan.Logs = []Log{
{
Timestamp: 0,
Fields: []KeyValue{
{
Key: "sneh",
Value: "",
Type: "badType",
},
},
},
}
failingSpanTransform(t, &badLogsESSpan, "not a vali... | explode_data.jsonl/5146 | {
"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,
17507,
17082,
51053,
1155,
353,
8840,
836,
8,
341,
2233,
329,
51053,
9996,
848,
11,
1848,
1669,
2795,
9996,
848,
18930,
7,
16,
340,
17957,
35699,
1155,
11,
1848,
340,
2233,
329,
51053,
9996,
848,
5247,
82,
284,
3056,
2201,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseGrowth_ExponentialGrowth(t *testing.T) {
// Valid linear growth
g, err := tester.ParseGrowth("^10")
require.NoError(t, err)
assert.IsType(t, new(tester.ExponentialGrowth), g)
assert.Equal(t, 10, g.(*tester.ExponentialGrowth).Precision)
// Invalid value
_, err = tester.ParseGrowth("^abcdef")
asse... | explode_data.jsonl/66521 | {
"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,
14463,
38,
19089,
62531,
59825,
38,
19089,
1155,
353,
8840,
836,
8,
341,
197,
322,
7818,
13482,
6513,
198,
3174,
11,
1848,
1669,
37111,
8937,
38,
19089,
48654,
16,
15,
1138,
17957,
35699,
1155,
11,
1848,
692,
6948,
4506,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestColorMApply(t *testing.T) {
mono := ebiten.ColorM{}
mono.ChangeHSV(0, 0, 1)
shiny := ebiten.ColorM{}
shiny.Translate(1, 1, 1, 0)
shift := ebiten.ColorM{}
shift.Translate(0.5, 0.5, 0.5, 0.5)
cases := []struct {
ColorM ebiten.ColorM
In color.Color
Out color.Color
Delta uint32
}{
{
... | explode_data.jsonl/48454 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 794
} | [
2830,
3393,
1636,
44,
28497,
1155,
353,
8840,
836,
8,
341,
197,
56401,
1669,
384,
4489,
268,
6669,
44,
16094,
197,
56401,
39348,
98930,
7,
15,
11,
220,
15,
11,
220,
16,
692,
36196,
6441,
1669,
384,
4489,
268,
6669,
44,
16094,
36196,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMemory_SignCsrErrorParsingTTL(t *testing.T) {
m := populateCert(t)
config := configuration{
TrustDomain: "localhost",
KeySize: 2048,
TTL: "abc",
CertSubject: certSubjectConfig{
Country: []string{"US"},
Organization: []string{"SPIFFE"},
CommonName: "",
}}
pluginConfig,... | explode_data.jsonl/73863 | {
"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,
10642,
1098,
622,
34,
15094,
1454,
68839,
51,
13470,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
30446,
36934,
1155,
692,
25873,
1669,
6546,
515,
197,
197,
45548,
13636,
25,
330,
8301,
756,
197,
55242,
1695,
25,
257,
220,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsStringly(t *testing.T) {
testCases := []struct {
a interface{}
ok bool
val string
}{
{Foo{}, true, fooStr},
{10, false, ""},
{"string", true, "string"},
{Bar{}, true, barStr},
}
for _, tc := range testCases {
tc := tc
t.Run("Attr", func(t *testing.T) {
t.Parallel()
ok, val := ... | explode_data.jsonl/81599 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 251
} | [
2830,
3393,
3872,
703,
398,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11323,
256,
3749,
16094,
197,
59268,
220,
1807,
198,
197,
19302,
914,
198,
197,
59403,
197,
197,
90,
40923,
22655,
830,
11,
15229,
258... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDate(t *testing.T) {
require := require.New(t)
now := time.Now()
v, err := Date.Convert(now)
require.Nil(err)
require.Equal(now.Format(DateLayout), v.(time.Time).Format(DateLayout))
v, err = Date.Convert(now.Format(DateLayout))
require.Nil(err)
require.Equal(
now.Format(DateLayout),
v.(time.Time)... | explode_data.jsonl/54303 | {
"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,
1916,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
692,
80922,
1669,
882,
13244,
741,
5195,
11,
1848,
1669,
2631,
36179,
32263,
340,
17957,
59678,
3964,
340,
17957,
12808,
32263,
9978,
19987,
2175,
701,
348,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHTTPClientFailureDelete400(t *testing.T) {
client := newHTTPClientFailureClient()
result, err := client.Delete400(context.Background(), nil)
if err == nil {
t.Fatalf("Expected an error but did not receive one")
}
if !reflect.ValueOf(result).IsZero() {
t.Fatalf("Expected a nil result")
}
} | explode_data.jsonl/54915 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
9230,
2959,
17507,
6435,
19,
15,
15,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
9230,
2959,
17507,
2959,
741,
9559,
11,
1848,
1669,
2943,
18872,
19,
15,
15,
5378,
19047,
1507,
2092,
340,
743,
1848,
621,
2092,
341,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFilterVMs(t *testing.T) {
vms := []vmDetails{
vmDetails{Zone: "us-central-1", Name: "app-central-as72"},
vmDetails{Zone: "us-west-1", Name: "db-west-09as"},
vmDetails{Zone: "eu-west-1", Name: "something-central-a7m2"},
}
filtered := filterVMs(vms, "app")
expectedVMs := []vmDetails{
vmDetails{Zone... | explode_data.jsonl/13298 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
5632,
11187,
82,
1155,
353,
8840,
836,
8,
341,
5195,
1011,
1669,
3056,
7338,
7799,
515,
197,
54879,
7799,
90,
15363,
25,
330,
355,
84081,
12,
16,
497,
3988,
25,
330,
676,
84081,
32434,
22,
17,
7115,
197,
54879,
7799,
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... | 1 |
func TestCheckInvalidOptionalChainingNonOptional(t *testing.T) {
_, err := ParseAndCheck(t, `
struct Test {
let x: Int
init(x: Int) {
self.x = x
}
}
let test = Test(x: 1)
let x = test?.x
`)
errs := ExpectCheckerErrors(t, err, 1)
assert.IsTy... | explode_data.jsonl/34975 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
3973,
7928,
15309,
1143,
2056,
8121,
15309,
1155,
353,
8840,
836,
8,
1476,
197,
6878,
1848,
1669,
14775,
3036,
3973,
1155,
11,
22074,
414,
2036,
3393,
341,
688,
1077,
856,
25,
1333,
271,
688,
2930,
2075,
25,
1333,
8,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTerragruntGenerateAttr(t *testing.T) {
t.Parallel()
generateTestCase := filepath.Join(TEST_FIXTURE_CODEGEN_PATH, "generate-attr")
cleanupTerraformFolder(t, generateTestCase)
cleanupTerragruntFolder(t, generateTestCase)
text := "test-terragrunt-generate-attr-hello-world"
stdout, _, err := runTerragrunt... | explode_data.jsonl/10159 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 209
} | [
2830,
3393,
51402,
68305,
3850,
31115,
13371,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3174,
13220,
16458,
1669,
26054,
22363,
50320,
42635,
41486,
10020,
11085,
7944,
11,
330,
19366,
12,
2991,
1138,
1444,
60639,
51,
13886,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseConfig(t *testing.T) {
tests := []struct {
name string
js string
want *LBConfig
wantErr bool
}{
{
name: "empty json",
js: "",
want: nil,
wantErr: true,
},
{
name: "OK with one discovery mechanism",
js: testJSONConfig1,
want: &LBConfig{
Disco... | explode_data.jsonl/52608 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1461
} | [
2830,
3393,
14463,
2648,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
95636,
414,
914,
198,
197,
50780,
262,
353,
34068,
2648,
198,
197,
50780,
7747,
1807,
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 TestExecCommand(t *testing.T) {
if filter := flag.Lookup("test.run").Value.String(); filter != "ExecCommand" {
t.Skip("use -run ExecCommand to execute a command via the test executable")
}
rootCmd.SetArgs(flag.Args())
require.NoError(t, rootCmd.Execute())
} | explode_data.jsonl/43715 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
10216,
4062,
1155,
353,
8840,
836,
8,
341,
743,
4051,
1669,
5181,
79261,
445,
1944,
7634,
1827,
1130,
6431,
2129,
4051,
961,
330,
10216,
4062,
1,
341,
197,
3244,
57776,
445,
810,
481,
6108,
10290,
4062,
311,
9026,
264,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestV1ProtocolMessages(t *testing.T) {
c1, c2, err := netPipe()
if err != nil {
t.Fatalf("netPipe: %v", err)
}
defer c1.Close()
defer c2.Close()
c := NewClient(c1)
go ServeAgent(NewKeyring(), c2)
testV1ProtocolMessages(t, c.(*client))
} | explode_data.jsonl/68409 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
53,
16,
20689,
15820,
1155,
353,
8840,
836,
8,
341,
1444,
16,
11,
272,
17,
11,
1848,
1669,
4179,
34077,
741,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
4711,
34077,
25,
1018,
85,
497,
1848,
340,
197,
532,
16867,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetPrefedTopologyParams(t *testing.T) {
testCases := []struct {
testCaseName string
requestTopology []*csi.Topology
expectedOutput map[string]string
expectedError error
}{
{
testCaseName: "Valid preferred topology params",
requestTopology: []*csi.Topology{{Segments: map[string]string{
... | explode_data.jsonl/51263 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 445
} | [
2830,
3393,
1949,
29978,
291,
60954,
4870,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
18185,
4207,
675,
262,
914,
198,
197,
23555,
60954,
29838,
63229,
17557,
2449,
198,
197,
42400,
5097,
220,
2415,
14032,
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... | 2 |
func TestMacServiceImpl_FindMac(t *testing.T) {
a := assert.New(t)
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockMpr := database.NewMockMacRepository(ctrl)
expected := make(model.Macs, 1)
expected[0] = model.Mac{Name: "MacBook Pro"}
{
// success
ipi := NewMacServiceImpl(mockMpr)
if ipi == nil {
... | explode_data.jsonl/55035 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 348
} | [
2830,
3393,
19552,
50603,
95245,
19552,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
340,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
741,
77333,
44,
649,
1669,
4625,
7121,
11571,
19552,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoOp_ExecuteOutbound(t *testing.T) {
followup, _, err := (&noOp{}).ExecuteOutbound(nil, &metaData{})
require.Error(t, err)
require.Nil(t, followup)
} | explode_data.jsonl/66236 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 68
} | [
2830,
3393,
2753,
7125,
83453,
2662,
10891,
1155,
353,
8840,
836,
8,
341,
1166,
1544,
454,
11,
8358,
1848,
1669,
15899,
2152,
7125,
6257,
568,
17174,
2662,
10891,
27907,
11,
609,
5490,
1043,
37790,
17957,
6141,
1155,
11,
1848,
340,
1795... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconcilePVC(t *testing.T) {
log := logrus.NewEntry(logrus.StandardLogger())
tests := []struct {
name string
kubernetescli kubernetes.Interface
want []corev1.PersistentVolumeClaim
}{
{
name: "Should delete the prometheus PVCs",
kubernetescli: fake.NewSimpleClientset(&corev1.P... | explode_data.jsonl/67190 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1233
} | [
2830,
3393,
693,
40446,
457,
47,
11287,
1155,
353,
8840,
836,
8,
341,
6725,
1669,
1487,
20341,
7121,
5874,
12531,
20341,
53615,
7395,
2398,
78216,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
16463,
29827,
19521,
595,
29827,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPageRank(t *testing.T) {
for i, test := range pageRankTests {
g := concrete.NewDirectedGraph()
for u, e := range test.g {
// Add nodes that are not defined by an edge.
if !g.Has(concrete.Node(u)) {
g.AddNode(concrete.Node(u))
}
for v := range e {
g.SetEdge(concrete.Edge{F: concrete.Nod... | explode_data.jsonl/28816 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 327
} | [
2830,
3393,
2665,
22550,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1273,
1669,
2088,
2150,
22550,
18200,
341,
197,
3174,
1669,
14175,
7121,
92669,
11212,
741,
197,
2023,
575,
11,
384,
1669,
2088,
1273,
1302,
341,
298,
197,
322,
269... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadJsonConfigWrongType(t *testing.T) {
config,err:=loadJsonConfig("app_config.go")
test.NotNil(t,err)
test.Nil(t,config)
test.StartWith(t,"Load Json Config fail",err.Error())
} | explode_data.jsonl/50971 | {
"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,
5879,
5014,
2648,
29185,
929,
1155,
353,
8840,
836,
8,
341,
25873,
77911,
14209,
1078,
5014,
2648,
445,
676,
5332,
18002,
1138,
18185,
93882,
1155,
77911,
340,
18185,
59678,
1155,
11,
1676,
692,
18185,
12101,
2354,
1155,
1335,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadFromString(t *testing.T) {
p, err := LoadFromString(testOk)
if err != nil {
t.Error(err)
t.Fail()
return
}
assert.NotNil(t, p)
assert.Equal(t, 2, p.ModelVersion)
assert.NotNil(t, p.Content)
assert.Equal(t, "Sheep_1", p.Content.Name)
assert.Equal(t, 3, p.Content.Fps)
assert.NotNil(t, p.Conten... | explode_data.jsonl/30010 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
5879,
44491,
1155,
353,
8840,
836,
8,
341,
3223,
11,
1848,
1669,
8893,
44491,
8623,
11578,
340,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
3244,
57243,
741,
197,
853,
198,
197,
532,
6948,
93882,
1155,
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... | 2 |
func TestWeightedAcquire(t *testing.T) {
t.Parallel()
ctx := context.Background()
sem := semaphore.NewWeighted(2)
tryAcquire := func(n int64) bool {
ctx, cancel := context.WithTimeout(ctx, 10*time.Millisecond)
defer cancel()
return sem.Acquire(ctx, n) == nil
}
tries := []bool{}
sem.Acquire(ctx, 1)
tries... | explode_data.jsonl/56019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 286
} | [
2830,
3393,
8295,
291,
11654,
984,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20985,
1669,
2266,
19047,
741,
89527,
1669,
55918,
7121,
8295,
291,
7,
17,
340,
6799,
11654,
984,
1669,
2915,
1445,
526,
21,
19,
8,
1807,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExpiredProof(t *testing.T) {
seed, _ := SeedFromString("65fd6c247d843cd80827a7a24cf01e1fbb697bd9e255fa259b745be24fe5bdce944c02b24d3a86b2c6460111f2876a88")
pub, _ := crypto.PublicKeyFromString("7002d6264285782be3ea70f231b123330ace6c6dc0b70a80fef4271e9379da2c60f63554e99bbf55877744c218e09a183368703ad432cc0a4b73... | explode_data.jsonl/47753 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 475
} | [
2830,
3393,
54349,
31076,
1155,
353,
8840,
836,
8,
341,
197,
22602,
11,
716,
1669,
35822,
44491,
445,
21,
20,
6902,
21,
66,
17,
19,
22,
67,
23,
19,
18,
4385,
23,
15,
23,
17,
22,
64,
22,
64,
17,
19,
9792,
15,
16,
68,
16,
69,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChangefeedBasics(t *testing.T) {
defer leaktest.AfterTest(t)()
testFn := func(t *testing.T, db *gosql.DB, f cdctest.TestFeedFactory) {
sqlDB := sqlutils.MakeSQLRunner(db)
sqlDB.Exec(t, `CREATE TABLE foo (a INT PRIMARY KEY, b STRING)`)
sqlDB.Exec(t, `INSERT INTO foo VALUES (0, 'initial')`)
sqlDB.Exec... | explode_data.jsonl/7032 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 618
} | [
2830,
3393,
1143,
524,
823,
12051,
33603,
1211,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
18185,
24911,
1669,
2915,
1155,
353,
8840,
836,
11,
2927,
353,
34073,
1470,
22537,
11,
282,
15307,
67880,
8787... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGameServerAllocationPreferredSelection(t *testing.T) {
t.Parallel()
fleets := framework.AgonesClient.AgonesV1().Fleets(defaultNs)
gameServers := framework.AgonesClient.AgonesV1().GameServers(defaultNs)
label := map[string]string{"role": t.Name()}
preferred := defaultFleet(defaultNs)
preferred.ObjectMet... | explode_data.jsonl/63310 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1309
} | [
2830,
3393,
4868,
5475,
78316,
22482,
11177,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1166,
273,
1415,
1669,
12626,
49850,
3154,
2959,
49850,
3154,
53,
16,
1005,
37,
273,
1415,
18978,
47360,
340,
30677,
78139,
1669,
12626,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeflateInflateString(t *testing.T) {
t.Parallel()
if testing.Short() && testenv.Builder() == "" {
t.Skip("skipping in short mode")
}
for _, test := range deflateInflateStringTests {
gold, err := ioutil.ReadFile(test.filename)
if err != nil {
t.Error(err)
}
testToFromWithLimit(t, gold, test.lab... | explode_data.jsonl/81408 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
2620,
5075,
641,
16716,
703,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
7497,
55958,
368,
1009,
1273,
3160,
15641,
368,
621,
1591,
341,
197,
3244,
57776,
445,
4886,
5654,
304,
2805,
3856,
1138,
197,
532,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTRaft_AddLog(t *testing.T) {
ta := require.New(t)
id := int64(1)
tr := NewTRaft(id, map[int64]string{id: "123"})
tr.AddLog(NewCmdI64("set", "x", 1))
ta.Equal("[<000#001:000{set(x, 1)}-0:1→0>]", RecordsShortStr(tr.Logs))
tr.AddLog(NewCmdI64("set", "y", 1))
ta.Equal(join(
"[<000#001:000{set(x, 1)}-0... | explode_data.jsonl/17383 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 616
} | [
2830,
3393,
2378,
64,
723,
21346,
2201,
1155,
353,
8840,
836,
8,
1476,
197,
2565,
1669,
1373,
7121,
1155,
692,
15710,
1669,
526,
21,
19,
7,
16,
340,
25583,
1669,
1532,
2378,
64,
723,
3724,
11,
2415,
18640,
21,
19,
30953,
61761,
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... | 3 |
func TestPropagateConflict(t *testing.T) {
tests := []struct {
name string
forest string
// inNamespace contains the namespaces we are creating the objects in
inNamespace string
// noPropagation contains the namespaces where the objects would have a noneSelector
noPropogation string
allow bool
... | explode_data.jsonl/11113 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 987
} | [
2830,
3393,
2008,
46836,
57974,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
1166,
41419,
914,
198,
197,
197,
322,
304,
22699,
5610,
279,
58091,
582,
525,
6825,
279,
6171,
304,
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... | 4 |
func TestGetRandomJSON(t *testing.T) {
ctx := context.Background()
t.Run("database query succeeded", func(t *testing.T) {
db := &tests.DBMock{}
db.On("QueryRow", ctx, getRandomPkgsDBQ).Return([]byte("dataJSON"), nil)
m := NewManager(db)
dataJSON, err := m.GetRandomJSON(ctx)
assert.NoError(t, err)
assert... | explode_data.jsonl/74681 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 296
} | [
2830,
3393,
1949,
13999,
5370,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
3244,
16708,
445,
12216,
3239,
25331,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
20939,
1669,
609,
23841,
22537,
11571,
16094,
197,
20939,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDisconnectAPI(t *testing.T) {
node := nodeWithMemoryEngine()
ruleConfig := rule.DefaultConfig
ruleContainer := rule.NewContainer(ruleConfig)
api := NewExecutor(node, ruleContainer, "test")
resp := api.Disconnect(context.Background(), &DisconnectRequest{})
require.Equal(t, ErrorBadRequest, resp.Error)
r... | explode_data.jsonl/48465 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
60651,
7082,
1155,
353,
8840,
836,
8,
341,
20831,
1669,
2436,
2354,
10642,
4571,
741,
7000,
1111,
2648,
1669,
5912,
13275,
2648,
198,
7000,
1111,
4502,
1669,
5912,
7121,
4502,
34944,
2648,
692,
54299,
1669,
1532,
25255,
6958,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateToken(t *testing.T) {
type args struct {
signingKey []byte
user string
expiresInSeconds int
}
tests := []struct {
name string
args args
want string
wantErr bool
}{
{
name: "default",
args: args{
signingKey: []byte("abcdefg"),
user: ... | explode_data.jsonl/80895 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 469
} | [
2830,
3393,
4021,
3323,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
69054,
287,
1592,
981,
3056,
3782,
198,
197,
19060,
1797,
914,
198,
197,
8122,
18968,
96236,
526,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
116... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPollServiceInstanceClusterServiceBrokerTemporaryError(t *testing.T) {
fakeKubeClient, fakeCatalogClient, fakeClusterServiceBrokerClient, testController, sharedInformers := newTestController(t, fakeosb.FakeClientConfiguration{
PollLastOperationReaction: &fakeosb.PollLastOperationReaction{
Error: osb.HTTPS... | explode_data.jsonl/58166 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 742
} | [
2830,
3393,
49207,
1860,
2523,
28678,
1860,
65545,
59362,
1454,
1155,
353,
8840,
836,
8,
341,
1166,
726,
42,
3760,
2959,
11,
12418,
41606,
2959,
11,
12418,
28678,
1860,
65545,
2959,
11,
1273,
2051,
11,
6094,
37891,
388,
1669,
501,
2271,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBackupRestoreSequence(t *testing.T) {
defer leaktest.AfterTest(t)()
const numAccounts = 1
_, _, origDB, dir, cleanupFn := BackupRestoreTestSetup(t, singleNode, numAccounts, InitNone)
defer cleanupFn()
args := base.TestServerArgs{ExternalIODir: dir}
backupLoc := LocalFoo
origDB.Exec(t, `CREATE SEQUENCE... | explode_data.jsonl/57616 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1327
} | [
2830,
3393,
56245,
56284,
14076,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
4777,
1629,
41369,
284,
220,
16,
198,
197,
6878,
8358,
2713,
3506,
11,
5419,
11,
21290,
24911,
1669,
43438,
56284,
2271,
21821... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatConvert(t *testing.T) {
src := NewMatWithSize(100, 100, MatTypeCV32F)
dst := NewMat()
src.ConvertTo(&dst, MatTypeCV16S)
if dst.Empty() {
t.Error("TestConvert dst should not be empty.")
}
} | explode_data.jsonl/81697 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 86
} | [
2830,
3393,
11575,
12012,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
1532,
11575,
2354,
1695,
7,
16,
15,
15,
11,
220,
16,
15,
15,
11,
6867,
929,
19589,
18,
17,
37,
340,
52051,
1669,
1532,
11575,
741,
41144,
36179,
1249,
2099,
15658,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileGetFile(t *testing.T) {
path, tearDown := setupConfigFile(t, minimalConfig)
defer tearDown()
fs, err := config.NewFileStore(path, true)
require.NoError(t, err)
defer fs.Close()
t.Run("get empty filename", func(t *testing.T) {
_, err := fs.GetFile("")
require.Error(t, err)
})
t.Run("get non-e... | explode_data.jsonl/32385 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 628
} | [
2830,
3393,
1703,
1949,
1703,
1155,
353,
8840,
836,
8,
341,
26781,
11,
32825,
1669,
6505,
2648,
1703,
1155,
11,
17377,
2648,
340,
16867,
32825,
2822,
53584,
11,
1848,
1669,
2193,
7121,
1703,
6093,
5581,
11,
830,
340,
17957,
35699,
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 TestExecuteTimeout(t *testing.T) {
_, cs, cleanup, err := initMockPeer("testchannel")
assert.NoError(t, err)
defer cleanup()
tests := []struct {
executeTimeout time.Duration
installTimeout time.Duration
namespace string
command string
expectedTimeout time.Duration
}{
{
executeT... | explode_data.jsonl/58391 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 823
} | [
2830,
3393,
17174,
7636,
1155,
353,
8840,
836,
8,
341,
197,
6878,
10532,
11,
21290,
11,
1848,
1669,
2930,
11571,
30888,
445,
1944,
10119,
1138,
6948,
35699,
1155,
11,
1848,
340,
16867,
21290,
2822,
78216,
1669,
3056,
1235,
341,
197,
812... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewSpear(t *testing.T) {
_, err := NewSpear("", "", false, identifier.DatastoreAllocate{}, validator.New())
require.Error(t, err)
_, err = NewSpear("+", "test", false, identifier.DatastoreAllocate{}, validator.New())
require.Error(t, err)
ss, err := NewSpear("", "test", false, identifier.DatastoreAllocate... | explode_data.jsonl/13756 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
3564,
50,
8015,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
1532,
50,
8015,
19814,
7342,
895,
11,
12816,
3336,
4314,
75380,
22655,
22935,
7121,
2398,
17957,
6141,
1155,
11,
1848,
340,
197,
6878,
1848,
284,
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... | 1 |
func TestValidatePipelineResults_Failure(t *testing.T) {
tests := []struct {
name string
results []PipelineResult
}{{
name: "invalid pipeline result reference",
results: []PipelineResult{{
Name: "my-pipeline-result",
Description: "this is my pipeline result",
Value: "$(tasks.a-task.re... | explode_data.jsonl/26536 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
17926,
34656,
9801,
1400,
9373,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
55497,
3056,
34656,
2077,
198,
197,
15170,
515,
197,
11609,
25,
330,
11808,
15301,
1102,
5785,
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 Test_nodeImages(t *testing.T) {
node := testutil.CreateNode("node-1")
node.Status.Images = []corev1.ContainerImage{
{
Names: []string{"a"},
SizeBytes: 10,
},
{
Names: []string{"b-1", "b-2"},
SizeBytes: 10,
},
}
got, err := nodeImages(node)
require.NoError(t, err)
expected := co... | explode_data.jsonl/13603 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 274
} | [
2830,
3393,
5084,
14228,
1155,
353,
8840,
836,
8,
1476,
20831,
1669,
1273,
1314,
7251,
1955,
445,
3509,
12,
16,
1138,
20831,
10538,
47188,
284,
3056,
98645,
16,
33672,
1906,
515,
197,
197,
515,
298,
197,
7980,
25,
257,
3056,
917,
4913... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMiddlewareFail(t *testing.T) {
logbuf := bytes.NewBuffer(nil)
logger := log.New(logbuf, "", 0)
router := chi.NewRouter()
type Data struct {
ID uuid.UUID `path:"id"`
Name string `json:"name"`
Part string `query:"part"`
Priority uint8 `json:"priority"`
Null string `js... | explode_data.jsonl/2852 | {
"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,
24684,
19524,
1155,
353,
8840,
836,
8,
341,
6725,
5909,
1669,
5820,
7121,
4095,
27907,
340,
17060,
1669,
1487,
7121,
12531,
5909,
11,
7342,
220,
15,
340,
67009,
1669,
25798,
7121,
9523,
741,
13158,
2885,
2036,
341,
197,
2958... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCounterThreadSafe(t *testing.T) {
var mutex sync.Mutex
counter := 0
for i := 0; i < 5000; i++ {
go func() {
defer func() {
mutex.Unlock()
}()
mutex.Lock()
counter++
}()
}
time.Sleep(1 * time.Second)
t.Logf("counter = %d", counter)
} | explode_data.jsonl/34246 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
14099,
6855,
25663,
1155,
353,
8840,
836,
8,
341,
2405,
30863,
12811,
99014,
198,
58261,
1669,
220,
15,
198,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
20,
15,
15,
15,
26,
600,
1027,
341,
197,
30680,
2915,
368,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBucketThrottle(t *testing.T) {
t.Parallel()
b := NewBucket(50, 50*time.Millisecond)
defer b.Close()
closec := make(chan struct{})
errc := make(chan error, 1)
fill := func() {
for {
select {
case <-closec:
return
default:
if _, err := b.FillThrottle(func(remaining int64) (int64, erro... | explode_data.jsonl/74398 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 328
} | [
2830,
3393,
36018,
1001,
27535,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
2233,
1669,
1532,
36018,
7,
20,
15,
11,
220,
20,
15,
77053,
71482,
340,
16867,
293,
10421,
2822,
27873,
66,
1669,
1281,
35190,
2036,
37790,
9859,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVSphereLogin(t *testing.T) {
cfg, cleanup := configFromEnvOrSim()
defer cleanup()
// Create vSphere configuration object
vs, err := newControllerNode(cfg)
if err != nil {
t.Fatalf("Failed to construct/authenticate vSphere: %s", err)
}
// Create context
ctx, cancel := context.WithCancel(context.Back... | explode_data.jsonl/65367 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 238
} | [
2830,
3393,
26050,
8023,
6231,
1155,
353,
8840,
836,
8,
341,
50286,
11,
21290,
1669,
2193,
3830,
14359,
2195,
14027,
741,
16867,
21290,
2822,
197,
322,
4230,
348,
42959,
6546,
1633,
198,
5195,
82,
11,
1848,
1669,
501,
2051,
1955,
28272,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRewriteReplaceCustom(t *testing.T) {
content := `<img src="http://example.org/logo.svg"><img src="https://example.org/article/picture.svg">`
expected := `<img src="http://example.org/logo.svg"><img src="https://example.org/article/picture.png">`
output := Rewriter("https://example.org/article", content, `re... | explode_data.jsonl/21490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 157
} | [
2830,
3393,
58465,
1247,
23107,
10268,
1155,
353,
8840,
836,
8,
341,
27751,
1669,
30586,
1892,
2286,
428,
1254,
1110,
8687,
2659,
28547,
15228,
3088,
1892,
2286,
428,
2428,
1110,
8687,
2659,
38181,
4322,
3826,
15228,
755,
3989,
42400,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSignalFirstLoad(t *testing.T) {
t.Run("disabled", func(t *testing.T) {
dc := testdataclient.New([]*eskip.Route{{}})
l := loggingtest.New()
defer l.Close()
rt := routing.New(routing.Options{
FilterRegistry: builtin.MakeRegistry(),
DataClients: []routing.DataClient{dc},
PollTimeout: 12 ... | explode_data.jsonl/58588 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1156
} | [
2830,
3393,
26810,
5338,
5879,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
11978,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
87249,
1669,
1273,
691,
2972,
7121,
85288,
288,
13389,
58004,
2979,
3417,
692,
197,
8810,
1669,
8392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrintPodDisruptionBudgetList(t *testing.T) {
minAvailable := intstr.FromInt(22)
maxUnavailable := intstr.FromInt(11)
pdbList := policy.PodDisruptionBudgetList{
Items: []policy.PodDisruptionBudget{
{
ObjectMeta: metav1.ObjectMeta{
Namespace: "ns1",
Name: "pdb1",
... | explode_data.jsonl/21615 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 678
} | [
2830,
3393,
8994,
23527,
4839,
14123,
62901,
852,
1155,
353,
8840,
836,
8,
341,
25320,
16485,
1669,
526,
495,
11439,
1072,
7,
17,
17,
340,
22543,
92928,
1669,
526,
495,
11439,
1072,
7,
16,
16,
692,
3223,
1999,
852,
1669,
4842,
88823,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEngine_DeleteBucket_Predicate(t *testing.T) {
engine := NewDefaultEngine()
defer engine.Close()
engine.MustOpen()
p := func(m, f string, kvs ...string) models.Point {
tags := map[string]string{models.FieldKeyTagKey: f, models.MeasurementTagKey: m}
for i := 0; i < len(kvs)-1; i += 2 {
tags[kvs[i]] =... | explode_data.jsonl/5987 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1171
} | [
2830,
3393,
4571,
57418,
36018,
1088,
16874,
1155,
353,
8840,
836,
8,
341,
80118,
1669,
1532,
3675,
4571,
741,
16867,
4712,
10421,
741,
80118,
50463,
5002,
2822,
3223,
1669,
2915,
1255,
11,
282,
914,
11,
595,
11562,
2503,
917,
8,
4119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTracesRequest(t *testing.T) {
mr := newTracesRequest(context.Background(), testdata.GenerateTraceDataOneSpan(), nil)
traceErr := consumererror.NewTraces(errors.New("some error"), testdata.GenerateTraceDataEmpty())
assert.EqualValues(t, newTracesRequest(context.Background(), testdata.GenerateTraceDataEmpty(... | explode_data.jsonl/70304 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 114
} | [
2830,
3393,
1282,
2434,
1900,
1155,
353,
8840,
836,
8,
341,
2109,
81,
1669,
501,
1282,
2434,
1900,
5378,
19047,
1507,
1273,
691,
57582,
6550,
1043,
3966,
12485,
1507,
2092,
692,
65058,
7747,
1669,
11502,
841,
7121,
1282,
2434,
38881,
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... | 1 |
func Test_GetObjectJsonWithStack(t *testing.T) {
u := User{4, "name4", 34}
json := GetObjectJsonWithStack("", u)
t.Log(json)
json = GetObjectJsonWithStack("u", u)
t.Log(json)
} | explode_data.jsonl/67097 | {
"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,
13614,
1190,
5014,
2354,
4336,
1155,
353,
8840,
836,
8,
341,
10676,
1669,
2657,
90,
19,
11,
330,
606,
19,
497,
220,
18,
19,
532,
30847,
1669,
2126,
1190,
5014,
2354,
4336,
19814,
575,
340,
3244,
5247,
9304,
340,
30847,
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 |
func TestNewKubeConfig(t *testing.T) {
tests := []struct {
shouldPanic bool
name string
expectedPathContains string
expectedErrorContains string
src kubeconfig.KubeSourceFunc
options []kubeconfig.Option
}{
{
name: "write to temp file",
sr... | explode_data.jsonl/31795 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1734
} | [
2830,
3393,
3564,
42,
3760,
2648,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
197,
5445,
47,
31270,
1843,
1807,
198,
197,
11609,
1698,
914,
198,
197,
42400,
1820,
23805,
220,
914,
198,
197,
42400,
1454,
23805,
914... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMeasurerExperimentNameVersion(t *testing.T) {
measurer := tlstool.NewExperimentMeasurer(tlstool.Config{})
if measurer.ExperimentName() != "tlstool" {
t.Fatal("unexpected ExperimentName")
}
if measurer.ExperimentVersion() != "0.1.0" {
t.Fatal("unexpected ExperimentVersion")
}
} | explode_data.jsonl/4136 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
7823,
56294,
77780,
675,
5637,
1155,
353,
8840,
836,
8,
341,
49294,
56294,
1669,
29796,
267,
1749,
7121,
77780,
7823,
56294,
1155,
36687,
1749,
10753,
37790,
743,
6893,
7733,
5121,
14329,
675,
368,
961,
330,
11544,
267,
1749,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshalFromFile(t *testing.T) {
t.Parallel()
conf := config{}
b := NewConfigReaderBuilder()
reader := b.WithFs(afero.NewOsFs()).WithConfigFile("testdata/config.yaml").Build()
err := reader.Unmarshal(&conf)
require.Nil(t, err)
assert.Equal(t, "https://foo.example.com", conf.Gencode.Downstream.Foo.Serv... | explode_data.jsonl/53792 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
1806,
27121,
43633,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
67850,
1669,
2193,
16094,
2233,
1669,
1532,
2648,
5062,
3297,
741,
61477,
1669,
293,
26124,
48300,
2877,
802,
78,
7121,
28867,
48300,
6011,
2354,
2648,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEmptyStorageURIPrefixOK(t *testing.T) {
g := gomega.NewGomegaWithT(t)
isvc := makeTestInferenceService()
isvc.Spec.Default.Predictor.Tensorflow.StorageURI = ""
g.Expect(isvc.validate(c)).Should(gomega.Succeed())
} | explode_data.jsonl/1480 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
3522,
5793,
1511,
3298,
5060,
3925,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
340,
19907,
7362,
1669,
1281,
2271,
641,
2202,
1860,
741,
19907,
7362,
36473,
13275,
1069,
8861,
269,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetCertificate_ForceRSA(t *testing.T) {
man := &Manager{
Prompt: AcceptTOS,
Cache: newMemCache(t),
ForceRSA: true,
}
defer man.stopRenew()
hello := clientHelloInfo(exampleDomain, true)
testGetCertificate(t, man, exampleDomain, hello)
// ForceRSA was deprecated and is now ignored.
cert, err :... | explode_data.jsonl/65046 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 219
} | [
2830,
3393,
1949,
33202,
1400,
16316,
73564,
1155,
353,
8840,
836,
8,
341,
197,
1515,
1669,
609,
2043,
515,
197,
10025,
14749,
25,
256,
20829,
51,
3126,
345,
197,
6258,
1777,
25,
262,
501,
18816,
8233,
1155,
1326,
197,
197,
18573,
735... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCachedPartitions(t *testing.T) {
seedBroker := NewMockBroker(t, 1)
replicas := []int32{3, 1, 5}
isr := []int32{5, 1}
metadataResponse := new(MetadataResponse)
metadataResponse.AddBroker("localhost:12345", 2)
metadataResponse.AddTopicPartition("my_topic", 0, 2, replicas, isr, []int32{}, ErrNoError)
met... | explode_data.jsonl/54397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 444
} | [
2830,
3393,
70293,
5800,
5930,
1155,
353,
8840,
836,
8,
341,
197,
22602,
65545,
1669,
1532,
11571,
65545,
1155,
11,
220,
16,
692,
73731,
52210,
1669,
3056,
396,
18,
17,
90,
18,
11,
220,
16,
11,
220,
20,
532,
19907,
81,
1669,
3056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateConfigForTop2Bottom2(t *testing.T) {
cfg := Config{
Nickname: "ExampleStrategyTop2Bottom2",
Goal: "To demonstrate a complex strategy using exchange level funding and simultaneous processing of data signals",
StrategySettings: StrategySettings{
Name: top2bottom2.Nam... | explode_data.jsonl/58415 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1768
} | [
2830,
3393,
31115,
2648,
2461,
5366,
17,
11279,
17,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
5532,
515,
197,
18317,
41052,
25,
330,
13314,
19816,
5366,
17,
11279,
17,
756,
197,
9600,
78,
278,
25,
257,
330,
1249,
19869,
264,
6351,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseRule(t *testing.T) {
// Mostly test we can parse rules with unused features
rules := []string{
"||bing.com/fd/ls/$~ping",
"||bing.com/fd/ls/$websocket",
}
for _, rule := range rules {
_, err := ParseRule(rule)
if err != nil {
t.Fatalf("failed to parse rule: %s: %s", rule, err)
}
}
} | explode_data.jsonl/81623 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
14463,
11337,
1155,
353,
8840,
836,
8,
341,
197,
322,
63185,
1273,
582,
646,
4715,
5601,
448,
20006,
4419,
198,
7000,
2425,
1669,
3056,
917,
515,
197,
197,
1,
8484,
7132,
905,
6663,
67,
14,
4730,
10749,
93,
9989,
756,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNamespaceErr(t *testing.T) {
env := New()
// Tell kube to load config from a file that doesn't exist. The exact error
// doesn't matter, this was just the simplest way to force an error to
// occur. Users of this package are not able to do this, but the resulting
// behavior is the same as if any other e... | explode_data.jsonl/48269 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
22699,
7747,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
1532,
2822,
197,
322,
24647,
80958,
311,
2795,
2193,
504,
264,
1034,
429,
3171,
944,
3000,
13,
576,
4734,
1465,
198,
197,
322,
3171,
944,
4925,
11,
419,
572,
1101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_CacheMatcher_GetAllResponses_WillReturnErrorIfCacheIsNil(t *testing.T) {
RegisterTestingT(t)
unit := matching.CacheMatcher{}
_, err := unit.GetAllResponses()
Expect(err).ToNot(BeNil())
Expect(err.Error()).To(Equal("No cache set"))
} | explode_data.jsonl/13679 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
920,
1777,
37554,
13614,
2403,
70743,
2763,
483,
5598,
1454,
2679,
8233,
3872,
19064,
1155,
353,
8840,
836,
8,
341,
79096,
16451,
51,
1155,
340,
81189,
1669,
12579,
46130,
37554,
31483,
197,
6878,
1848,
1669,
4982,
45732,
7074... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCancelOrder(t *testing.T) {
t.Parallel()
_, err := b.CancelOrder(1337)
if err == nil {
t.Error("Test Failed - CancelOrder() error")
}
} | explode_data.jsonl/79947 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 62
} | [
2830,
3393,
9269,
4431,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
6878,
1848,
1669,
293,
36491,
4431,
7,
16,
18,
18,
22,
340,
743,
1848,
621,
2092,
341,
197,
3244,
6141,
445,
2271,
21379,
481,
23542,
4431,
368,
146... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildVariableDependencies(t *testing.T) {
testSuite := []struct {
title string
variables map[string]*v1.DashboardVariable
result map[string][]string
}{
{
title: "no variable, not dep",
variables: nil,
result: map[string][]string{},
},
{
title: "constant variable, no dep"... | explode_data.jsonl/34530 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2202
} | [
2830,
3393,
11066,
7827,
48303,
1155,
353,
8840,
836,
8,
341,
18185,
28000,
1669,
3056,
1235,
341,
197,
24751,
257,
914,
198,
197,
2405,
2156,
82,
2415,
14032,
8465,
85,
16,
909,
7349,
7827,
198,
197,
9559,
262,
2415,
14032,
45725,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKeyspaceStringParser(t *testing.T) {
tsts := []struct {
db string
stats string
keysTotal, keysEx, avgTTL float64
ok bool
}{
{db: "xxx", stats: "", ok: false},
{db: "xxx", stats: "keys=1,expires=0,avg_ttl=0", ok: false},
{db: "db0... | explode_data.jsonl/46984 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 604
} | [
2830,
3393,
8850,
1306,
703,
6570,
1155,
353,
8840,
836,
8,
341,
3244,
36279,
1669,
3056,
1235,
341,
197,
20939,
664,
914,
198,
197,
79659,
3824,
914,
198,
197,
80112,
7595,
11,
6894,
840,
11,
19712,
51,
13470,
2224,
21,
19,
198,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTranslationKey(t *testing.T) {
t.Parallel()
assert := require.New(t)
cfg, fs := newTestCfg()
writeSource(t, fs, filepath.Join("content", filepath.FromSlash("sect/simple.no.md")), "---\ntitle: \"A1\"\ntranslationKey: \"k1\"\n---\nContent\n")
writeSource(t, fs, filepath.Join("content", filepath.FromSlash("... | explode_data.jsonl/60628 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 298
} | [
2830,
3393,
24412,
1592,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
6948,
1669,
1373,
7121,
1155,
340,
50286,
11,
8619,
1669,
501,
2271,
42467,
2822,
24945,
3608,
1155,
11,
8619,
11,
26054,
22363,
445,
1796,
497,
26054,
11439... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEtcdGetPodDifferentNamespace(t *testing.T) {
fakeClient := tools.NewFakeEtcdClient(t)
ctx1 := api.NewDefaultContext()
ctx2 := api.WithNamespace(api.NewContext(), "other")
key1, _ := makePodKey(ctx1, "foo")
key2, _ := makePodKey(ctx2, "foo")
fakeClient.Set(key1, runtime.EncodeOrDie(latest.Codec, &api.P... | explode_data.jsonl/8137 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 445
} | [
2830,
3393,
31860,
4385,
1949,
23527,
69123,
22699,
1155,
353,
8840,
836,
8,
341,
1166,
726,
2959,
1669,
7375,
7121,
52317,
31860,
4385,
2959,
1155,
692,
20985,
16,
1669,
6330,
7121,
3675,
1972,
741,
20985,
17,
1669,
6330,
26124,
22699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckVersioningIsEnabled(t *testing.T) {
tests := []struct {
name string
input s3.S3
expected bool
}{
{
name: "S3 bucket versioning disabled",
input: s3.S3{
Metadata: types.NewTestMetadata(),
Buckets: []s3.Bucket{
{
Metadata: types.NewTestMetadata(),
Versioning: ... | explode_data.jsonl/25536 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 642
} | [
2830,
3393,
3973,
5637,
287,
3872,
5462,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
22427,
262,
274,
18,
808,
18,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
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... | 5 |
func TestQuery(t *testing.T) {
// Various basic query test cases following the same pattern
cases := []struct {
name string
input []TestData
query string
expected []TestData
expectedCode int
headers map[string]string
method string
}{
{
name: "Basic insert a... | explode_data.jsonl/8991 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2087
} | [
2830,
3393,
2859,
1155,
353,
8840,
836,
8,
341,
197,
322,
39641,
6770,
3239,
1273,
5048,
2701,
279,
1852,
5383,
198,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
22427,
286,
3056,
83920,
198,
197,
27274,
286,
914... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccKeycloakOpenidClient_redirectUrisValidation(t *testing.T) {
realmName := "terraform-" + acctest.RandString(10)
clientId := "terraform-" + acctest.RandString(10)
accessType := randomStringInSlice([]string{"PUBLIC", "CONFIDENTIAL"})
resource.Test(t, resource.TestCase{
ProviderFactories: testAccProvider... | explode_data.jsonl/52135 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 366
} | [
2830,
3393,
14603,
1592,
88751,
5002,
307,
2959,
30043,
52,
5963,
13799,
1155,
353,
8840,
836,
8,
341,
17200,
7673,
675,
1669,
330,
61385,
27651,
488,
1613,
67880,
2013,
437,
703,
7,
16,
15,
340,
25291,
764,
1669,
330,
61385,
27651,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildPreserveOwnership(t *testing.T) {
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.40"), "broken in earlier versions")
ctx := context.Background()
dockerfile, err := ioutil.ReadFile("testdata/Dockerfile.testBuildPreserveOwnership... | explode_data.jsonl/82589 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 420
} | [
2830,
3393,
11066,
14367,
5852,
77166,
1155,
353,
8840,
836,
8,
341,
1903,
13389,
32901,
1155,
11,
1273,
14359,
909,
64,
7291,
1731,
13,
4233,
499,
621,
330,
27077,
497,
330,
81019,
1138,
1903,
13389,
32901,
1155,
11,
10795,
1214,
433,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.