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 TestGetOrderbook(t *testing.T) {
t.Parallel()
_, err := b.GetOrderbook("BTC", "AUD")
if err != nil {
t.Error("Test failed - GetOrderbook() error", err)
}
} | explode_data.jsonl/48988 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 67
} | [
2830,
3393,
1949,
4431,
2190,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
293,
2234,
4431,
2190,
445,
59118,
497,
330,
61278,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
445,
2271,
4641,
481,
212... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidCIDR(t *testing.T) {
var tests = []validationTest{
{
value: "0.0.0.0/0",
shouldErr: false,
},
{
value: "1.1.1.1/32",
shouldErr: false,
},
{
value: "192.168.0.0/16",
shouldErr: false,
},
{
value: "255.255.255.255/1",
shouldErr: false,
},
{
value... | explode_data.jsonl/77930 | {
"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,
4088,
54146,
49,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
12284,
2271,
515,
197,
197,
515,
298,
16309,
25,
257,
330,
15,
13,
15,
13,
15,
13,
15,
14,
15,
756,
298,
197,
5445,
7747,
25,
895,
345,
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 TestSwitch(t *testing.T) {
files := []int{1, 2, 3}
for i, _ := range files {
switch {
case i == 0:
log.Println("json")
case i == 1:
log.Println("html")
case i == 2:
log.Println("pdf")
default:
log.Println("error")
}
}
} | explode_data.jsonl/67075 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
16837,
1155,
353,
8840,
836,
8,
972,
74075,
1669,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
2570,
2023,
600,
11,
716,
1669,
2088,
3542,
972,
197,
8961,
972,
197,
2722,
600,
621,
220,
15,
2834,
298,
6725,
12419,
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... | 5 |
func TestSANEmptyName(t *testing.T) {
inputPath := "SANEmptyName.pem"
expected := lint.Error
out := test.TestLint("e_ext_san_empty_name", inputPath)
if out.Status != expected {
t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status)
}
} | explode_data.jsonl/75679 | {
"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,
68691,
3522,
675,
1155,
353,
8840,
836,
8,
341,
22427,
1820,
1669,
330,
68691,
3522,
675,
49373,
698,
42400,
1669,
57920,
6141,
198,
13967,
1669,
1273,
8787,
47556,
445,
68,
9927,
87866,
15124,
1269,
497,
1946,
1820,
340,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateChannelRoles(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer th.TearDown()
Client := th.Client
const CHANNEL_ADMIN = "channel_admin channel_user"
const CHANNEL_MEMBER = "channel_user"
// User 1 creates a channel, making them channel admin by default.
channel := th.CreatePublicC... | explode_data.jsonl/65665 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 868
} | [
2830,
3393,
4289,
9629,
25116,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
1005,
3803,
2320,
7210,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
271,
4777,
58756,
30460,
284,
330,
10119,
12207,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBSTree_LevelOrderTraverse(t *testing.T) {
assert := internal.NewAssert(t, "TestBSTree_LevelOrderTraverse")
bstree := NewBSTree(6, &intComparator{})
bstree.InsertNode(7)
bstree.InsertNode(5)
bstree.InsertNode(2)
bstree.InsertNode(4)
bstree.Print()
acturl := bstree.LevelOrderTraverse()
t.Log(acturl)... | explode_data.jsonl/41663 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
61006,
765,
78861,
4431,
1282,
22439,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
5306,
7121,
8534,
1155,
11,
330,
2271,
61006,
765,
78861,
4431,
1282,
22439,
5130,
2233,
267,
765,
1669,
1532,
61006,
765,
7,
21,
11,
609,
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 TestRecoverEvaluatorError(t *testing.T) {
ev := &evaluator{logger: log.NewNopLogger()}
var err error
e := errors.New("custom error")
defer func() {
require.EqualError(t, err, e.Error())
}()
defer ev.recover(nil, &err)
panic(e)
} | explode_data.jsonl/35558 | {
"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,
693,
3688,
89042,
1454,
1155,
353,
8840,
836,
8,
341,
74837,
1669,
609,
14170,
45162,
90,
9786,
25,
1487,
7121,
45,
453,
7395,
23509,
2405,
1848,
1465,
271,
7727,
1669,
5975,
7121,
445,
9163,
1465,
5130,
16867,
2915,
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 TestPatchDevice(t *testing.T) {
expectedRequestId := ExampleUUID
dic := mockDic()
dbClientMock := &dbMock.DBClient{}
testReq := buildTestUpdateDeviceRequest()
dsModels := models.Device{
Id: *testReq.Device.Id,
Name: *testReq.Device.Name,
Description: *testReq.Device.Description,... | explode_data.jsonl/9305 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2436
} | [
2830,
3393,
43622,
6985,
1155,
353,
8840,
836,
8,
341,
42400,
61774,
1669,
13383,
24754,
198,
2698,
292,
1669,
7860,
44545,
741,
20939,
2959,
11571,
1669,
609,
1999,
11571,
22537,
2959,
16094,
18185,
27234,
1669,
1936,
2271,
4289,
6985,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckAlphaNumericOrUTF8Present(t *testing.T) {
testCases := []struct {
name string
input string
result bool
}{
{
name: "ascii lowercase",
input: "aa",
result: true,
},
{
name: "ascii uppercase",
input: "AA",
result: true,
},
{
name: "ascii numbers",
input: ... | explode_data.jsonl/34622 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 710
} | [
2830,
3393,
3973,
19384,
36296,
2195,
8561,
23,
21195,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
22427,
220,
914,
198,
197,
9559,
1807,
198,
197,
59403,
197,
197,
515,
298,
1160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConsulUpdateGetSvcsErr(t *testing.T) {
err := errors.New("asonteuh")
testConsulGetClustersCase{err, nil, nil}.run(t)
testConsulGetClustersCase{}.run(t)
} | explode_data.jsonl/71883 | {
"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,
15220,
360,
4289,
1949,
50,
85,
4837,
7747,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
5975,
7121,
445,
300,
52277,
12540,
1138,
18185,
15220,
360,
1949,
94992,
4207,
90,
615,
11,
2092,
11,
2092,
7810,
6108,
1155,
340,
1818... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRetryDoNoAttempts(t *testing.T) {
t.Parallel()
r := New(
WithMaxAttempts(0),
)
assert.Error(t, r.Do(context.Background(), func(context.Context) error {
return nil
}))
} | explode_data.jsonl/82059 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
51560,
5404,
2753,
81517,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
7000,
1669,
1532,
1006,
197,
197,
2354,
5974,
81517,
7,
15,
1326,
197,
692,
6948,
6141,
1155,
11,
435,
33596,
5378,
19047,
1507,
2915,
5378,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoIPAddressesInSNI(t *testing.T) {
for _, ipLiteral := range []string{"1.2.3.4", "::1"} {
c, s := net.Pipe()
go func() {
client := Client(c, &Config{ServerName: ipLiteral})
client.Handshake()
}()
var header [5]byte
if _, err := io.ReadFull(s, header[:]); err != nil {
t.Fatal(err)
}
re... | explode_data.jsonl/19958 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 283
} | [
2830,
3393,
2753,
3298,
52290,
641,
50,
14912,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
5997,
17350,
1669,
2088,
3056,
917,
4913,
16,
13,
17,
13,
18,
13,
19,
497,
70154,
16,
9207,
341,
197,
1444,
11,
274,
1669,
4179,
1069,
3444,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLastReparentTooRecent_Buffering(t *testing.T) {
resetVariables()
flag.Set("enable_buffer", "true")
// Enable the buffer (no explicit whitelist i.e. it applies to everything).
defer resetFlagsForTesting()
now := time.Now()
b := newWithNow(func() time.Time { return now })
// Simulate that the old master... | explode_data.jsonl/55857 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 777
} | [
2830,
3393,
5842,
693,
3765,
31246,
25140,
55040,
287,
1155,
353,
8840,
836,
8,
341,
70343,
22678,
2822,
30589,
4202,
445,
12552,
7776,
497,
330,
1866,
1138,
197,
322,
18567,
279,
4147,
320,
2152,
11464,
67727,
600,
1734,
13,
432,
16790... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBind(t *testing.T) {
table := []struct {
binding *v1.Binding
}{
{binding: &v1.Binding{
ObjectMeta: metav1.ObjectMeta{
Namespace: metav1.NamespaceDefault,
Name: "foo",
},
Target: v1.ObjectReference{
Name: "foohost.kubernetes.mydomain.com",
},
}},
}
for _, item := range ta... | explode_data.jsonl/13325 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 427
} | [
2830,
3393,
9950,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
3056,
1235,
341,
197,
2233,
3961,
353,
85,
16,
36022,
198,
197,
59403,
197,
197,
90,
31036,
25,
609,
85,
16,
36022,
515,
298,
23816,
12175,
25,
77520,
16,
80222,
515,
571,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnvVarValue(t *testing.T) {
d, err := ioutil.TempDir("", "secrets")
assert.NoError(t, err)
defer os.RemoveAll(d)
secretsManager := createSecrets(t, d)
tests := []struct {
name string
envVar v1.EnvVar
options CtrSpecGenOptions
succeed bool
expected string
}{
{
"ConfigMapExists",
... | explode_data.jsonl/2873 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2600
} | [
2830,
3393,
14359,
3962,
1130,
1155,
353,
8840,
836,
8,
341,
2698,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
325,
52710,
1138,
6948,
35699,
1155,
11,
1848,
340,
16867,
2643,
84427,
1500,
340,
84686,
52710,
2043,
1669,
1855,
19773,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMissingAuthenticatorForLoginHandler(t *testing.T) {
authMiddleware, err := New(&GinJWTMiddleware{
Realm: "test zone",
Key: key,
Timeout: time.Hour,
MaxRefresh: time.Hour * 24,
})
assert.NoError(t, err)
handler := ginHandler(authMiddleware)
r := gofight.New()
r.POST("/login").
... | explode_data.jsonl/64434 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 268
} | [
2830,
3393,
25080,
5087,
61393,
2461,
6231,
3050,
1155,
353,
8840,
836,
8,
1476,
78011,
24684,
11,
1848,
1669,
1532,
2099,
38,
258,
55172,
24684,
515,
197,
197,
64290,
25,
414,
330,
1944,
10143,
756,
197,
55242,
25,
286,
1376,
345,
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... | 1 |
func TestRightArrow(t *testing.T) {
d1 := initDrawing(Point{90, 90}, Point{160, 90})
c1 := Connector{0, 1}
d1 = AddConnector(d1, c1)
expectedP1 := Point{110, 100}
expectedP2 := Point{139, 100}
expectedSlope := 0.0
actualP1 := connectorP1(d1, c1)
actualP2 := connectorP2(d1, c1)
actualSlope := connectorSlope... | explode_data.jsonl/54942 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 276
} | [
2830,
3393,
5979,
25914,
1155,
353,
8840,
836,
8,
1476,
2698,
16,
1669,
2930,
37437,
32737,
90,
24,
15,
11,
220,
24,
15,
2137,
5126,
90,
16,
21,
15,
11,
220,
24,
15,
8824,
1444,
16,
1669,
54814,
90,
15,
11,
220,
16,
532,
2698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResolveReference(t *testing.T) {
mustParse := func(url string) *URL {
u, err := Parse(url)
if err != nil {
t.Fatalf("Parse(%q) got err %v", url, err)
}
return u
}
opaque := &URL{Scheme: "scheme", Opaque: "opaque"}
for _, test := range resolveReferenceTests {
base := mustParse(test.base)
rel ... | explode_data.jsonl/71726 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 703
} | [
2830,
3393,
56808,
8856,
1155,
353,
8840,
836,
8,
341,
2109,
590,
14463,
1669,
2915,
6522,
914,
8,
353,
3144,
341,
197,
10676,
11,
1848,
1669,
14775,
6522,
340,
197,
743,
1848,
961,
2092,
341,
298,
3244,
30762,
445,
14463,
15238,
80,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJsonEncodeIndent(t *testing.T) {
testOnce.Do(testInitAll)
v := TestSimplish{
Ii: -794,
Ss: `A Man is
after the new line
after new line and tab
`,
}
v2 := v
v.Mm = make(map[string]*TestSimplish)
for i := 0; i < len(v.Ar); i++ {
v3 := v2
v3.Ii += (i * 4)
v3.Ss = fmt.Sprintf("%d - %s", v3.Ii, v3.... | explode_data.jsonl/21002 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1219
} | [
2830,
3393,
5014,
32535,
42729,
1155,
353,
8840,
836,
8,
341,
18185,
12522,
33596,
8623,
3803,
2403,
340,
5195,
1669,
3393,
50,
6383,
812,
515,
197,
24486,
72,
25,
481,
22,
24,
19,
345,
197,
7568,
82,
25,
1565,
32,
2363,
374,
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 TestBzip2Decompressor(t *testing.T) {
cases := []TestDecompressCase{
{
"single.bz2",
false,
false,
nil,
"d3b07384d113edec49eaa6238ad5ff00",
nil,
},
{
"single.bz2",
true,
true,
nil,
"",
nil,
},
}
for i, tc := range cases {
cases[i].Input = filepath.Join("./testdata... | explode_data.jsonl/74746 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
33,
9964,
17,
4900,
316,
56220,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
2271,
4900,
316,
1873,
4207,
515,
197,
197,
515,
298,
197,
1,
15338,
81374,
17,
756,
298,
36012,
345,
298,
36012,
345,
298,
84131,
345... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestString_Len(t *testing.T) {
tests := []struct {
name string
e String
want int
}{
{name: "", e: String{""}, want: 0},
{name: "", e: String{"abc"}, want: 3},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.e.Len(); got != tt.want {
t.Errorf("String.Len() = %... | explode_data.jsonl/34776 | {
"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,
703,
2351,
268,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
7727,
262,
923,
198,
197,
50780,
526,
198,
197,
59403,
197,
197,
47006,
25,
7342,
384,
25,
923,
90,
3014,
2137,
1366,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValueError_Error(t *testing.T) {
type fields struct {
message string
}
tests := []struct {
name string
fields fields
want string
}{
{"", fields{"error"}, "ValueError: error"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
e := NewValueError(Message(tt.fields.message)... | explode_data.jsonl/22610 | {
"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,
1130,
1454,
28651,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
24753,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
55276,
5043,
198,
197,
50780,
256,
914,
198,
197,
59403... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStructArg(t *testing.T) {
type padded struct {
B string
C int32
}
var (
gotA padded
gotB uint32
wantA = padded{"3", 4}
wantB = uint32(5)
)
f := func(a padded, b uint32) {
gotA, gotB = a, b
}
ValueOf(f).Call([]Value{ValueOf(wantA), ValueOf(wantB)})
if gotA != wantA || gotB != wantB {
t... | explode_data.jsonl/29582 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 187
} | [
2830,
3393,
9422,
2735,
1155,
353,
8840,
836,
8,
341,
13158,
43868,
2036,
341,
197,
12791,
914,
198,
197,
6258,
526,
18,
17,
198,
197,
532,
2405,
2399,
197,
3174,
354,
32,
220,
43868,
198,
197,
3174,
354,
33,
220,
2622,
18,
17,
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... | 1 |
func TestGetSecretReference(t *testing.T) {
testcases := map[string]struct {
params map[string]string
snapContentName string
snapshot *crdv1.VolumeSnapshot
expectRef *v1.SecretReference
expectErr bool
}{
"no params": {
params: nil,
expectRef: nil,
},
"empty err": {... | explode_data.jsonl/10882 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1408
} | [
2830,
3393,
1949,
19773,
8856,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
2415,
14032,
60,
1235,
341,
197,
25856,
688,
2415,
14032,
30953,
198,
197,
1903,
6861,
2762,
675,
914,
198,
197,
1903,
9601,
286,
353,
5082,
37261,
16,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSamplingMultiplePolicies(t *testing.T) {
const maxSize = 100
const decisionWaitSeconds = 5
// For this test explicitly control the timer calls and batcher, and set a mock
// sampling policy evaluator.
msp := new(consumertest.TracesSink)
mpe1 := &mockPolicyEvaluator{}
mpe2 := &mockPolicyEvaluator{}
mtt ... | explode_data.jsonl/31674 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 947
} | [
2830,
3393,
98622,
32089,
47,
42038,
1155,
353,
8840,
836,
8,
341,
4777,
61935,
284,
220,
16,
15,
15,
198,
4777,
5480,
14190,
15343,
284,
220,
20,
198,
197,
322,
1752,
419,
1273,
20975,
2524,
279,
9021,
6738,
323,
7162,
261,
11,
323... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSelectWithUnionAll(t *testing.T) {
executor, sbc1, sbc2, _ := createLegacyExecutorEnv()
executor.normalize = true
sql := "select id from user where id in (1, 2, 3) union all select id from user where id in (1, 2, 3)"
bv, _ := sqltypes.BuildBindVariable([]int64{1, 2, 3})
bv1, _ := sqltypes.BuildBindVariabl... | explode_data.jsonl/67435 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 719
} | [
2830,
3393,
3379,
2354,
32658,
2403,
1155,
353,
8840,
836,
8,
341,
67328,
4831,
11,
7898,
66,
16,
11,
7898,
66,
17,
11,
716,
1669,
1855,
77415,
25255,
14359,
741,
67328,
4831,
44657,
284,
830,
198,
30633,
1669,
330,
1742,
877,
504,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDNSProvider_PresentFailed(t *testing.T) {
provider, mux := setupTest(t)
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, http.MethodGet, r.Method, "method")
_, err := fmt.Fprintf(w, `{"data":"record_already_exists_remove_first","result":"error"}`)
if err != nil {
... | explode_data.jsonl/52235 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 210
} | [
2830,
3393,
61088,
5179,
1088,
2695,
9408,
1155,
353,
8840,
836,
8,
341,
197,
19979,
11,
59807,
1669,
6505,
2271,
1155,
692,
2109,
2200,
63623,
35460,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6948,
12808,
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... | 2 |
func TestMustGather(t *testing.T) {
expErr := errors.New("failed to gather")
g := prometheus.GathererFunc(func() ([]*dto.MetricFamily, error) {
return nil, expErr
})
ft := new(fakeT)
_ = promtest.MustGather(ft, g)
if !ft.failed {
t.Fatal("MustGather should have failed but didn't")
}
logged := ft.logBuf.Str... | explode_data.jsonl/49061 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 362
} | [
2830,
3393,
31776,
38,
1856,
1155,
353,
8840,
836,
8,
341,
48558,
7747,
1669,
5975,
7121,
445,
16091,
311,
9567,
1138,
3174,
1669,
2706,
39705,
1224,
1856,
261,
9626,
18552,
368,
34923,
9,
58978,
1321,
16340,
15192,
11,
1465,
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 TestAllocCancelDoesntStarve(t *testing.T) {
sem := semaphore.NewWeighted(10)
// Block off a portion of the semaphore so that Acquire(_, 10) can eventually succeed.
sem.Acquire(context.Background(), 1)
// In the background, Acquire(_, 10).
ctx, cancel := context.WithCancel(context.Background())
defer cancel... | explode_data.jsonl/56022 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 277
} | [
2830,
3393,
25154,
9269,
21468,
406,
12699,
586,
1155,
353,
8840,
836,
8,
341,
89527,
1669,
55918,
7121,
8295,
291,
7,
16,
15,
692,
197,
322,
8362,
1007,
264,
13348,
315,
279,
55918,
773,
429,
6381,
984,
41117,
220,
16,
15,
8,
646,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParallelBlockValidation(t *testing.T) {
viper.Set("peer.fileSystemPath", "/tmp/fabric/txvalidatortest")
ledgermgmt.InitializeTestEnv()
defer ledgermgmt.CleanupTestEnv()
gb, _ := test.MakeGenesisBlock("TestLedger")
gbHash := protoutil.BlockHeaderHash(gb.Header)
ledger, _ := ledgermgmt.CreateLedger(gb)
d... | explode_data.jsonl/5162 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 162
} | [
2830,
3393,
16547,
4713,
13799,
1155,
353,
8840,
836,
8,
341,
5195,
12858,
4202,
445,
16537,
9715,
2320,
1820,
497,
3521,
5173,
6663,
28897,
14,
3998,
1891,
266,
371,
477,
1138,
197,
50704,
12311,
2501,
45829,
2271,
14359,
741,
16867,
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 TestInteg_00_ListPipelines(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
cfg := integration.ConfigWithDefaultRegion("us-west-2")
svc := codepipeline.New(cfg)
params := &codepipeline.ListPipelinesInput{}
req := svc.ListPipelinesRequest(params)
re... | explode_data.jsonl/4927 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
1072,
791,
62,
15,
15,
27104,
47,
93997,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
24911,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
220,
20,
77053,
32435,
340,
16867,
9121,
24911,
2822,
50286,
1669,
17590,
10753,
2354... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrDisallowedFields(t *testing.T) {
expected := cli.FieldErrors{
&field.Error{
Type: field.ErrorTypeForbidden,
Field: rifftesting.TestField,
BadValue: "",
Detail: "",
},
}
actual := cli.ErrDisallowedFields(rifftesting.TestField, "")
if diff := cmp.Diff(expected, actual); diff != "... | explode_data.jsonl/13216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 162
} | [
2830,
3393,
7747,
4839,
20967,
8941,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
21348,
17087,
13877,
515,
197,
197,
5,
2566,
6141,
515,
298,
27725,
25,
257,
2070,
6141,
929,
69115,
345,
298,
94478,
25,
262,
36924,
723,
59855,
8787,
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... | 2 |
func TestNullArray(t *testing.T) {
n := len(Get(`{"data":null}`, "data").Array())
if n != 0 {
t.Fatalf("expected '%v', got '%v'", 0, n)
}
n = len(Get(`{}`, "data").Array())
if n != 0 {
t.Fatalf("expected '%v', got '%v'", 0, n)
}
n = len(Get(`{"data":[]}`, "data").Array())
if n != 0 {
t.Fatalf("expected '%... | explode_data.jsonl/43448 | {
"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,
3280,
1857,
1155,
353,
8840,
836,
8,
341,
9038,
1669,
2422,
24460,
5809,
4913,
691,
788,
2921,
28350,
330,
691,
1827,
1857,
2398,
743,
308,
961,
220,
15,
341,
197,
3244,
30762,
445,
7325,
7677,
85,
516,
2684,
7677,
85,
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... | 5 |
func Test_RandomString(t *testing.T) {
tcases := []int{1, 8, 13, 96, 512, 1024}
for _, tc := range tcases {
rnd := certutil.RandomString(tc)
assert.Equal(t, tc, len(rnd))
assert.NotContains(t, rnd, "=")
assert.NotContains(t, rnd, "/")
}
} | explode_data.jsonl/55779 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
2568,
2206,
703,
1155,
353,
8840,
836,
8,
341,
3244,
23910,
1669,
3056,
396,
90,
16,
11,
220,
23,
11,
220,
16,
18,
11,
220,
24,
21,
11,
220,
20,
16,
17,
11,
220,
16,
15,
17,
19,
532,
2023,
8358,
17130,
1669,
2088,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDetermineFeePerKw(t *testing.T) {
t.Parallel()
defaultFee := chainfee.SatPerKWeight(999)
relayFee := chainfee.SatPerKWeight(300)
feeEstimator := newMockFeeEstimator(defaultFee, relayFee)
// We'll populate two items in the internal map which is used to query
// a fee based on a confirmation target: the... | explode_data.jsonl/78819 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 843
} | [
2830,
3393,
35,
24308,
41941,
3889,
42,
86,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
11940,
41941,
1669,
8781,
30017,
808,
266,
3889,
42,
8295,
7,
24,
24,
24,
340,
197,
90891,
41941,
1669,
8781,
30017,
808,
266,
3889,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetTrustLineFlags(t *testing.T) {
asset := CreditAsset{"ABCD", "GAEJJMDDCRYF752PKIJICUVL7MROJBNXDV2ZB455T7BAFHU2LCLSE2LW"}
source := "GBUKBCG5VLRKAVYAIREJRUJHOKLIADZJOICRW43WVJCLES52BDOTCQZU"
trustor := "GCCOBXW2XQNUSL467IEILE6MMCNRR66SSVL4YQADUNYYNUVREF3FIV2Z"
for _, testcase := range []struct {
name st... | explode_data.jsonl/57467 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1144
} | [
2830,
3393,
1649,
45548,
2460,
9195,
1155,
353,
8840,
836,
8,
341,
197,
9852,
1669,
16267,
16604,
4913,
1867,
6484,
497,
330,
38,
13669,
63391,
44,
4103,
35462,
37,
22,
20,
17,
22242,
76686,
1317,
22246,
43,
22,
44,
1285,
41,
15594,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetOrderbook(t *testing.T) {
_, err := h.GetOrderbook("BTCUSD", 50)
if err != nil {
t.Error("Test faild - HitBTC GetOrderbook() error", err)
}
} | explode_data.jsonl/9481 | {
"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,
1949,
4431,
2190,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
305,
2234,
4431,
2190,
445,
59118,
26749,
497,
220,
20,
15,
340,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
445,
2271,
3690,
67,
481,
15882,
59118,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDel(t *testing.T) {
s, err := Run()
ok(t, err)
defer s.Close()
c, err := proto.Dial(s.Addr())
ok(t, err)
defer c.Close()
t.Run("simple", func(t *testing.T) {
s.Set("foo", "bar")
s.HSet("aap", "noot", "mies")
s.Set("one", "two")
s.SetTTL("one", time.Second*1234)
s.Set("three", "four")
mustDo... | explode_data.jsonl/44814 | {
"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,
16532,
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,
16867,
272,
10421,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExpirePod(t *testing.T) {
// Enable volumesOnNodeForBalancing to do balanced resource allocation
utilfeature.DefaultFeatureGate.Set(fmt.Sprintf("%s=true", features.BalanceAttachedNodeVolumes))
nodeName := "node"
testPods := []*v1.Pod{
makeBasePod(t, nodeName, "test-1", "100m", "500", "", []v1.ContainerPo... | explode_data.jsonl/19643 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 847
} | [
2830,
3393,
8033,
554,
23527,
1155,
353,
8840,
836,
8,
341,
197,
322,
18567,
26282,
1925,
1955,
2461,
37889,
8974,
311,
653,
23831,
5101,
23757,
198,
79138,
12753,
13275,
13859,
42318,
4202,
28197,
17305,
4430,
82,
11265,
497,
4419,
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... | 4 |
func TestParseNamedStats(t *testing.T) {
t.Parallel()
s := &IllumosNfsServer{
Fields: []string{"read", "write", "remove", "create"},
NfsVersions: []string{"v4"},
}
testData := helpers.FromFixture("nfs--0--rfsproccnt_v4.kstat")
fields := parseNamedStats(s, testData)
require.Equal(
t,
fields,
map[... | explode_data.jsonl/45328 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 206
} | [
2830,
3393,
14463,
15810,
16635,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1903,
1669,
609,
40,
5448,
436,
45,
3848,
5475,
515,
197,
197,
8941,
25,
414,
3056,
917,
4913,
878,
497,
330,
4934,
497,
330,
5399,
497,
330,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFunctionality(t *testing.T) {
var w Websocket
if w.FormatFunctionality() != NoWebsocketSupportText {
t.Fatalf("Test Failed - FormatFunctionality error expected %s but received %s",
NoWebsocketSupportText, w.FormatFunctionality())
}
w.Functionality = 1 << 31
if w.FormatFunctionality() != UnknownWeb... | explode_data.jsonl/29307 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 227
} | [
2830,
3393,
5152,
2719,
1155,
353,
8840,
836,
8,
341,
2405,
289,
4895,
9556,
271,
743,
289,
9978,
5152,
2719,
368,
961,
2308,
5981,
9556,
7916,
1178,
341,
197,
3244,
30762,
445,
2271,
21379,
481,
15042,
5152,
2719,
1465,
3601,
1018,
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... | 5 |
func TestGCPOpts_Run(t *testing.T) {
ctrl := gomock.NewController(t)
mockStore := mocks.NewMockGCPPeeringConnectionCreator(ctrl)
defer ctrl.Finish()
opts := &GCPOpts{
store: mockStore,
network: "test",
}
t.Run("container exists", func(t *testing.T) {
containers := []mongodbatlas.Container{
{
ID: ... | explode_data.jsonl/1543 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 597
} | [
2830,
3393,
22863,
2045,
12754,
84158,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
77333,
6093,
1669,
68909,
7121,
11571,
38,
15855,
68,
4671,
4526,
31865,
62100,
340,
16867,
23743,
991,
18176,
2822,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVarAfterMain2(t *testing.T) {
gopClTest(t, `
package main
func main() {
println(i)
}
var i = 100
`, `package main
import fmt "fmt"
func main() {
fmt.Println(i)
}
var i = 100
`)
} | explode_data.jsonl/73598 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 89
} | [
2830,
3393,
3962,
6025,
6202,
17,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
22074,
1722,
1887,
271,
2830,
1887,
368,
341,
81168,
1956,
340,
630,
947,
600,
284,
220,
16,
15,
15,
198,
7808,
1565,
1722,
1887,
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 TestCopyWithTarInvalidSrc(t *testing.T) {
tempFolder, err := os.MkdirTemp("", "docker-archive-test")
if err != nil {
t.Fatal(nil)
}
destFolder := filepath.Join(tempFolder, "dest")
invalidSrc := filepath.Join(tempFolder, "doesnotexists")
err = os.MkdirAll(destFolder, 0740)
if err != nil {
t.Fatal(err)
}... | explode_data.jsonl/79241 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 184
} | [
2830,
3393,
12106,
2354,
62733,
7928,
20360,
1155,
353,
8840,
836,
8,
341,
16280,
13682,
11,
1848,
1669,
2643,
1321,
12438,
12151,
19814,
330,
28648,
95100,
16839,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
27907,
340,
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... | 4 |
func TestGetSeenInboundMessages(t *testing.T) {
maxWait := 5 * time.Second
s := NewTestServer()
go s.Start()
api := slack.New("ABCDEFG", slack.OptionAPIURL(s.GetAPIURL()))
rtm := api.NewRTM()
go rtm.ManageConnection()
rtm.SendMessage(&slack.OutgoingMessage{
Channel: "foo",
Text: "should see this inbound ... | explode_data.jsonl/7549 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
1949,
85675,
641,
10891,
15820,
1155,
353,
8840,
836,
8,
341,
22543,
14190,
1669,
220,
20,
353,
882,
32435,
198,
1903,
1669,
1532,
2271,
5475,
741,
30680,
274,
12101,
2822,
54299,
1669,
45619,
7121,
445,
67004,
497,
45619,
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... | 3 |
func TestPause(t *testing.T) {
ss, cmdr, sm, done := setup(t, "test-pause")
pause := func() {
if err := cmdr.Send("test-pause", PauseMessage()); err != nil {
t.Fatalf("Error sending pause command to test-pause: %v", err)
}
newstate := <-ss.Stored
if newstate.State.Code != Paused {
t.Fatalf("Expected pa... | explode_data.jsonl/23106 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 725
} | [
2830,
3393,
28391,
1155,
353,
8840,
836,
8,
341,
34472,
11,
5439,
81,
11,
1525,
11,
2814,
1669,
6505,
1155,
11,
330,
1944,
2268,
3454,
5130,
3223,
3454,
1669,
2915,
368,
341,
197,
743,
1848,
1669,
5439,
81,
20176,
445,
1944,
2268,
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... | 7 |
func TestReconcileProbeError(t *testing.T) {
theError := errors.New("this is the error")
table := TableTest{{
Name: "first reconcile basic ingress",
Key: "ns/name",
WantErr: true,
Objects: append([]runtime.Object{
ing("name", "ns", withBasicSpec, withContour),
}, servicesAndEndpoints...),
WantC... | explode_data.jsonl/72442 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 702
} | [
2830,
3393,
693,
40446,
457,
81426,
1454,
1155,
353,
8840,
836,
8,
341,
32088,
1454,
1669,
5975,
7121,
445,
574,
374,
279,
1465,
5130,
26481,
1669,
6633,
2271,
90,
515,
197,
21297,
25,
262,
330,
3896,
63408,
6770,
78559,
756,
197,
552... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewConfigNoAuthType(t *testing.T) {
os.Setenv("AVP_TYPE", "vault")
viper := viper.New()
_, err := config.New(viper, &config.Options{})
expectedError := "Must provide a supported Authentication Type"
if err.Error() != expectedError {
t.Errorf("expected error %s to be thrown, got %s", expectedError, err)... | explode_data.jsonl/54093 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 127
} | [
2830,
3393,
3564,
2648,
2753,
5087,
929,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
8093,
47,
4189,
497,
330,
82983,
1138,
5195,
12858,
1669,
95132,
7121,
741,
197,
6878,
1848,
1669,
2193,
7121,
3747,
12858,
11,
609,
1676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerShutdown(t *testing.T) {
const ncalls = 5
var (
ctx = context.Background()
server = mustServer(t)(NewServer())
addr, listener = newTestListener(t)
shutdownStarted = make(chan struct{})
shutdownFinished = make(chan struct{})
h... | explode_data.jsonl/41078 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 924
} | [
2830,
3393,
5475,
62004,
1155,
353,
8840,
836,
8,
341,
4777,
25126,
5583,
284,
220,
20,
198,
2405,
2399,
197,
20985,
2549,
284,
2266,
19047,
741,
197,
41057,
4293,
284,
1969,
5475,
1155,
2376,
3564,
5475,
2398,
197,
53183,
11,
11446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtractNotNullCols(t *testing.T) {
st := cluster.MakeTestingClusterSettings()
evalCtx := tree.MakeTestingEvalContext(st)
testData := []struct {
c string
e []opt.ColumnID
}{
{ // 0
c: "/1: [/2 - ]",
e: []opt.ColumnID{1},
},
{ // 1
c: "/1: [ - /2]",
e: []opt.ColumnID{},
},
{ // 2
... | explode_data.jsonl/59312 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1022
} | [
2830,
3393,
28959,
11005,
37567,
1155,
353,
8840,
836,
8,
341,
18388,
1669,
10652,
50133,
16451,
28678,
6086,
741,
93413,
23684,
1669,
4916,
50133,
16451,
54469,
1972,
5895,
692,
18185,
1043,
1669,
3056,
1235,
341,
197,
1444,
914,
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... | 2 |
func TestAccStateChangeRollback(t *testing.T) {
cleanAndPrepare()
randVar := rand.New(rand.NewSource(time.Now().Unix()))
var testSize uint32
testSize = 1000
var accs []*protocol.AccTx
//Store accs that are to be changed and rolled back in a accTx slice
nullAddress := [64]byte{}
loopMax := int(randVar.Uint32... | explode_data.jsonl/41097 | {
"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,
14603,
1397,
4072,
32355,
1419,
1155,
353,
8840,
836,
8,
341,
1444,
2675,
3036,
50590,
2822,
7000,
437,
3962,
1669,
10382,
7121,
37595,
7121,
3608,
9730,
13244,
1005,
55832,
49962,
2405,
1273,
1695,
2622,
18,
17,
198,
18185,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandler(t *testing.T) {
c, _ := newTestClient()
_, w, r, _, _ := tu.NewTestInstance("", c.DefaultPathConfigs, 200, "{}", nil, "rpc", "/health", "debug")
c.Handler(w, r)
if r.Header.Get("Test") == "" {
t.Error("expected non-empty header")
}
} | explode_data.jsonl/22514 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
3050,
1155,
353,
8840,
836,
8,
341,
1444,
11,
716,
1669,
501,
2271,
2959,
741,
197,
6878,
289,
11,
435,
11,
8358,
716,
1669,
9765,
7121,
2271,
2523,
19814,
272,
13275,
1820,
84905,
11,
220,
17,
15,
15,
11,
35503,
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... | 2 |
func TestExecuteInstall(t *testing.T) {
scc := New(NewMockProvider(), mockAclProvider)
assert.NotNil(t, scc)
stub := shim.NewMockStub("lscc", scc)
res := stub.MockInit("1", nil)
assert.Equal(t, int32(shim.OK), res.Status, res.Message)
err := scc.executeInstall(stub, []byte("barf"))
assert.Error(t, err)
} | explode_data.jsonl/46563 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
17174,
24690,
1155,
353,
8840,
836,
8,
341,
1903,
638,
1669,
1532,
35063,
11571,
5179,
1507,
7860,
32,
564,
5179,
340,
6948,
93882,
1155,
11,
274,
638,
340,
18388,
392,
1669,
62132,
7121,
11571,
33838,
445,
4730,
638,
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 TestRuntimeBreakpoint(t *testing.T) {
withTestProcess("testruntimebreakpoint", t, func(p *proc.Target, fixture protest.Fixture) {
err := p.Continue()
if err != nil {
t.Fatal(err)
}
regs, err := p.CurrentThread().Registers()
assertNoError(err, t, "Registers")
pc := regs.PC()
f, l, _ := p.BinInfo()... | explode_data.jsonl/56211 | {
"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,
15123,
22524,
2768,
1155,
353,
8840,
836,
8,
341,
46948,
2271,
7423,
445,
1944,
22255,
8960,
2768,
497,
259,
11,
2915,
1295,
353,
15782,
35016,
11,
12507,
8665,
991,
12735,
8,
341,
197,
9859,
1669,
281,
2451,
6232,
741,
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 TestFilterTracing(t *testing.T) {
for _, tc := range []struct {
name string
operation string
filters []string
params *OpenTracingParams
expectLogs string
}{
{
name: "enable log filter events",
operation: "request_filters",
filters: []string{"f1", "f2"},
params: ... | explode_data.jsonl/50652 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 697
} | [
2830,
3393,
5632,
1282,
4527,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
197,
9262,
220,
914,
198,
197,
1166,
8612,
262,
3056,
917,
198,
197,
25856,
257,
353,
5002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBrokerInitializeConditions(t *testing.T) {
tests := []struct {
name string
bs *BrokerStatus
want *BrokerStatus
}{{
name: "empty",
bs: &BrokerStatus{},
want: &BrokerStatus{
Status: duckv1.Status{
Conditions: []apis.Condition{{
Type: BrokerConditionAddressable,
Status: corev1... | explode_data.jsonl/46025 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1075
} | [
2830,
3393,
65545,
9928,
35435,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
93801,
256,
353,
65545,
2522,
198,
197,
50780,
353,
65545,
2522,
198,
197,
15170,
515,
197,
11609,
25,
330,
3194,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetContainerInfoForMirrorPods(t *testing.T) {
// pods contain one static and one mirror pod with the same name but
// different UIDs.
pods := []*api.Pod{
{
ObjectMeta: api.ObjectMeta{
UID: "1234",
Name: "qux",
Namespace: "ns",
Annotations: map[string]string{
kubetypes.Co... | explode_data.jsonl/43340 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 835
} | [
2830,
3393,
1949,
4502,
1731,
2461,
54216,
23527,
82,
1155,
353,
8840,
836,
8,
341,
197,
322,
54587,
6644,
825,
1099,
323,
825,
17846,
7509,
448,
279,
1852,
829,
714,
198,
197,
322,
2155,
547,
30466,
624,
3223,
29697,
1669,
29838,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSelectHost(t *testing.T) {
scheduler := genericScheduler{}
tests := []struct {
name string
list framework.NodeScoreList
possibleHosts sets.String
expectsErr bool
}{
{
name: "unique properly ordered scores",
list: []framework.NodeScore{
{Name: "machine1.1", Score: 1},... | explode_data.jsonl/2388 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 847
} | [
2830,
3393,
3379,
9296,
1155,
353,
8840,
836,
8,
341,
1903,
15222,
1669,
13954,
38878,
16094,
78216,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
14440,
688,
12626,
21714,
10570,
852,
198,
197,
197,
10031,
9296,
82,
7289,
6431... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCambpellTime(t *testing.T) {
for _, test := range timeTest {
mytime, err := time.Parse(time.RFC3339, test.in)
if err != nil {
log.Fatal(err)
}
year_rtm, day_rtm, hourminute := CampbellTime(mytime)
assert.Equal(t, test.year_rtm, year_rtm)
assert.Equal(t, test.day_rtm, day_rtm)
assert.Equal(t, ... | explode_data.jsonl/10751 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
91496,
37522,
1462,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
882,
2271,
341,
197,
13624,
1678,
11,
1848,
1669,
882,
8937,
9730,
2013,
6754,
18,
18,
18,
24,
11,
1273,
1858,
340,
197,
743,
1848,
961,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFuncDecodeArgs(t *testing.T) {
t.Parallel()
tests := []struct {
Func core.Func
Input []byte
Args []interface{}
WantArgs []interface{}
}{
{
Func: MustNewFunc("test(address)", ""),
Input: B("0xffffffff000000000000000000000000000000000000000000000000000000000000c0fe"),
Arg... | explode_data.jsonl/68055 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1412
} | [
2830,
3393,
9626,
32564,
4117,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
197,
9626,
257,
6200,
69845,
198,
197,
66588,
262,
3056,
3782,
198,
197,
197,
4117,
257,
3056,
4970,
16094,
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 TestGiveUp(t *testing.T) {
ctx := createSweeperTestContext(t)
resultChan0, err := ctx.sweeper.SweepInput(
spendableInputs[0], defaultFeePref,
)
if err != nil {
t.Fatal(err)
}
ctx.tick()
// We expect a sweep to be published at height 100 (mockChainIOHeight).
ctx.receiveTx()
// Because of MaxSweepAt... | explode_data.jsonl/34232 | {
"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,
35127,
2324,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
1855,
50,
896,
10436,
2271,
1972,
1155,
692,
9559,
46019,
15,
11,
1848,
1669,
5635,
514,
896,
10436,
808,
48542,
2505,
1006,
197,
1903,
3740,
480,
31946,
58,
15,
1125... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeployKEDA(t *testing.T) {
out, err := ExecuteCommandWithDir("make deploy", "..")
require.NoErrorf(t, err, "error deploying KEDA - %s", err)
t.Log(string(out))
t.Log("KEDA deployed successfully using 'make deploy' command")
} | explode_data.jsonl/1939 | {
"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,
69464,
42,
86761,
1155,
353,
8840,
836,
8,
341,
13967,
11,
1848,
1669,
20848,
4062,
2354,
6184,
445,
6927,
10517,
497,
32213,
1138,
17957,
35699,
69,
1155,
11,
1848,
11,
330,
841,
60317,
730,
86761,
481,
1018,
82,
497,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPositionalPointer(t *testing.T) {
var args struct {
Input string `arg:"positional"`
Output []*string `arg:"positional"`
}
err := parse("foo bar baz", &args)
require.NoError(t, err)
assert.Equal(t, "foo", args.Input)
bar := "bar"
baz := "baz"
assert.Equal(t, []*string{&bar, &baz}, args.Output)
} | explode_data.jsonl/13001 | {
"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,
3812,
278,
9084,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
66588,
220,
914,
262,
1565,
858,
2974,
966,
3005,
8805,
197,
80487,
29838,
917,
1565,
858,
2974,
966,
3005,
8805,
197,
532,
9859,
1669,
4715,
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 TestValidateV1Beta1MissingCharts(t *testing.T) {
manifest := `---
apiVersion: manifests/v1beta1
metadata:
name: test-manifest
spec: {}
`
_, err := Validate(manifest)
if err == nil || !strings.Contains(err.Error(), "manifest validation errors") {
t.Errorf("Didn't get expected error from manifest.TestValidate... | explode_data.jsonl/80477 | {
"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,
17926,
53,
16,
64811,
16,
25080,
64878,
1155,
353,
8840,
836,
8,
341,
197,
42315,
1669,
1565,
10952,
2068,
5637,
25,
83232,
5457,
16,
19127,
16,
198,
17637,
510,
220,
829,
25,
1273,
20477,
6962,
198,
9535,
25,
5613,
3989,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNamespaceIndexHighConcurrentQueriesWithTimeouts(t *testing.T) {
testNamespaceIndexHighConcurrentQueries(t,
testNamespaceIndexHighConcurrentQueriesOptions{
withTimeouts: true,
})
} | explode_data.jsonl/34831 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 65
} | [
2830,
3393,
22699,
1552,
11976,
1109,
3231,
55261,
2354,
7636,
82,
1155,
353,
8840,
836,
8,
341,
18185,
22699,
1552,
11976,
1109,
3231,
55261,
1155,
345,
197,
18185,
22699,
1552,
11976,
1109,
3231,
55261,
3798,
515,
298,
46948,
7636,
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 |
func TestValidateServerPort(t *testing.T) {
tests := []struct {
name string
in *networking.Port
out string
}{
{"empty", &networking.Port{}, "invalid protocol"},
{"empty", &networking.Port{}, "port name"},
{"happy",
&networking.Port{
Protocol: "http",
Number: 1,
Name: "Henry",
},... | explode_data.jsonl/56907 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 580
} | [
2830,
3393,
17926,
5475,
7084,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
17430,
256,
353,
17511,
287,
43013,
198,
197,
13967,
220,
914,
198,
197,
59403,
197,
197,
4913,
3194,
497,
609,
1751... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrorStringRepresentation(t *testing.T) {
e := Error{
Type: ErrorThrottling,
Exception: "ThrottlingException",
AmazonRawType: "dynamodb#ThrottlingBlah",
Message: "FooBar",
}
assert.Equal(t, "dynago.Error(ErrorThrottling): ThrottlingException: FooBar", e.Error())
e.Exception = ""
... | explode_data.jsonl/68121 | {
"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,
1454,
703,
55903,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
4600,
515,
197,
27725,
25,
688,
4600,
1001,
46689,
2718,
345,
197,
197,
1354,
25,
257,
330,
1001,
46689,
2718,
1354,
756,
197,
197,
25863,
20015,
929,
25,
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... | 1 |
func TestAlloc(t *testing.T) {
s := NewScope()
items := []ScopeItem{{550, 250}, {900, 600}, {10, 80}, {100, 400}}
size := uint64(0)
for _, v := range items {
s.Insert(v.Address, v.Size)
size += v.Size
}
//{10, 80}, {100, 400}, {550, 250}, {900, 600},
items = []ScopeItem{{10, 85}, {100, 400}, {550, 250}, {9... | explode_data.jsonl/17764 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 301
} | [
2830,
3393,
25154,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1532,
10803,
741,
46413,
1669,
3056,
10803,
1234,
2979,
20,
20,
15,
11,
220,
17,
20,
15,
2137,
314,
24,
15,
15,
11,
220,
21,
15,
15,
2137,
314,
16,
15,
11,
220,
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... | 2 |
func TestCreateChain(t *testing.T) {
domain, err := makeTrivialDomain()
if err != nil {
log.Fatal(err)
}
tmpDir, err := ioutil.TempDir("", domainPath)
if err != nil {
log.Fatal(err)
}
st, err := tao.NewSoftTao(tmpDir, []byte("xxx"))
if err != nil {
t.Fatal(err)
}
numServers := 2
servers := make([]con... | explode_data.jsonl/24100 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 453
} | [
2830,
3393,
4021,
18837,
1155,
353,
8840,
836,
8,
341,
2698,
3121,
11,
1848,
1669,
1281,
1282,
26658,
13636,
741,
743,
1848,
961,
2092,
341,
197,
6725,
26133,
3964,
340,
197,
630,
20082,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_hcsTask_DeleteExec_InitExecID_2ndExec_ExitedState_Success(t *testing.T) {
lt, init, second := setupTestHcsTask(t)
// put the init exec into the exited state
_ = init.Kill(context.TODO(), 0xf)
// put the 2nd exec into the exited state
_ = second.Kill(context.TODO(), 0xf)
// try to delete the init exec
... | explode_data.jsonl/56383 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 185
} | [
2830,
3393,
1523,
4837,
6262,
57418,
10216,
15644,
10216,
915,
62,
17,
303,
10216,
62531,
1608,
1397,
87161,
1155,
353,
8840,
836,
8,
341,
197,
4832,
11,
2930,
11,
2086,
1669,
6505,
2271,
39,
4837,
6262,
1155,
692,
197,
322,
2182,
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 TestStorageLast(t *testing.T) {
storage := Init(driver.NewMemory())
const name = "angry-bird"
// Set up storage with test releases.
setup := func() {
// release records
rls0 := ReleaseTestData{Name: name, Version: 1, Status: rspb.Status_SUPERSEDED}.ToRelease()
rls1 := ReleaseTestData{Name: name, Versio... | explode_data.jsonl/35131 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 446
} | [
2830,
3393,
5793,
5842,
1155,
353,
8840,
836,
8,
341,
197,
16172,
1669,
15690,
24032,
7121,
10642,
12367,
4777,
829,
284,
330,
524,
884,
1455,
2603,
1837,
197,
322,
2573,
705,
5819,
448,
1273,
19232,
624,
84571,
1669,
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 Test_UpdateSecrets_DoesNotAddVolumeIfRequestSecretsIsNil(t *testing.T) {
request := requests.CreateFunctionRequest{
Service: "testfunc",
Secrets: nil,
}
existingSecrets := map[string]*apiv1.Secret{
"pullsecret": {Type: apiv1.SecretTypeDockercfg},
"testsecret": {Type: apiv1.SecretTypeOpaque, Data: map[st... | explode_data.jsonl/57940 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 317
} | [
2830,
3393,
47393,
19773,
82,
1557,
7072,
2623,
2212,
18902,
2679,
1900,
19773,
82,
3872,
19064,
1155,
353,
8840,
836,
8,
341,
23555,
1669,
7388,
7251,
5152,
1900,
515,
197,
91619,
25,
330,
1944,
2830,
756,
197,
7568,
50856,
82,
25,
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... | 2 |
func TestPEXReactorReceive(t *testing.T) {
r, book := createReactor(&PEXReactorConfig{})
defer teardownReactor(book)
peer := p2p.CreateRandomPeer(false)
// we have to send a request to receive responses
r.RequestAddrs(peer)
size := book.Size()
addrs := []*p2p.NetAddress{peer.NodeInfo().NetAddress()}
msg := c... | explode_data.jsonl/6126 | {
"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,
1740,
55,
693,
5621,
14742,
1155,
353,
8840,
836,
8,
341,
7000,
11,
2311,
1669,
1855,
693,
5621,
2099,
1740,
55,
693,
5621,
2648,
37790,
16867,
49304,
693,
5621,
33130,
692,
197,
16537,
1669,
281,
17,
79,
7251,
13999,
3088... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInt32_IsSuperset(t *testing.T) {
testcases := []struct {
name string
s Int32
t Int32
expect bool
}{
{
name: "test Int32 IsSuperset, s is empty",
s: Int32{},
t: map[int32]struct{}{2: {}, 9: {}, 4: {}},
expect: false,
},
{
name: "test Int32 IsSuperset, s i... | explode_data.jsonl/62336 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 828
} | [
2830,
3393,
1072,
18,
17,
31879,
10048,
44146,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
1903,
414,
1333,
18,
17,
198,
197,
3244,
414,
1333,
18,
17,
198,
197,
24952,
1807,
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... | 3 |
func TestCaffe(t *testing.T) {
checkNet := func(t *testing.T, net Net) {
img := IMRead("images/space_shuttle.jpg", IMReadColor)
if img.Empty() {
t.Error("Invalid Mat in Caffe test")
}
defer img.Close()
blob := BlobFromImage(img, 1.0, image.Pt(224, 224), NewScalar(104, 117, 123, 0), false, false)
if blo... | explode_data.jsonl/31265 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 879
} | [
2830,
3393,
34,
37780,
1155,
353,
8840,
836,
8,
341,
25157,
6954,
1669,
2915,
1155,
353,
8840,
836,
11,
4179,
9374,
8,
341,
197,
39162,
1669,
6517,
4418,
445,
3642,
2687,
1306,
3712,
98243,
4819,
497,
6517,
4418,
1636,
340,
197,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakeEmailPrimary(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
email := &EmailAddress{
Email: "user567890@example.com",
}
err := MakeEmailPrimary(email)
assert.Error(t, err)
assert.EqualError(t, err, ErrEmailAddressNotExist{Email: email.Email}.Error())
email = &EmailAddress{
Em... | explode_data.jsonl/67890 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 315
} | [
2830,
3393,
8078,
4781,
15972,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
19905,
28770,
3380,
2271,
5988,
12367,
57549,
1669,
609,
79986,
515,
197,
197,
4781,
25,
330,
872,
20,
21,
22,
23,
24,
15,
35487,
905,
756,
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... | 1 |
func TestSessionsController_Destroy(t *testing.T) {
t.Parallel()
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start())
correctSession := sessions.NewSession()
q := pg.NewQ(app.GetSqlxDB(), app.GetLogger(), app.GetConfig())
mustInsertSession(t, q, &correctSession)
config := app.GetConfig()... | explode_data.jsonl/12810 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 442
} | [
2830,
3393,
59062,
2051,
79266,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
28236,
1669,
1185,
1944,
7121,
4988,
36,
11187,
25907,
1155,
340,
17957,
35699,
1155,
11,
906,
12101,
12367,
1444,
27034,
5283,
1669,
15704,
7121,
5283... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMarkEnd(t *testing.T) {
assert := assert.New(t)
assert.NoError(db.ClearCollections(task.Collection, build.Collection, VersionCollection),
"Error clearing collections")
displayName := "testName"
userName := "testUser"
b := &build.Build{
Id: "buildtest",
Status: evergreen.BuildStarted,
Versio... | explode_data.jsonl/60431 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1128
} | [
2830,
3393,
8949,
3727,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
6948,
35699,
9791,
13524,
52730,
17483,
28629,
11,
1936,
28629,
11,
6079,
6482,
1326,
197,
197,
1,
1454,
32750,
15302,
5130,
31271,
675,
1669,
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... | 1 |
func TestGC_TrackDeletedLayers(t *testing.T) {
require.NoError(t, testutil.TruncateAllTables(suite.db))
// disable other triggers that also insert on gc_blob_review_queue so that they don't interfere with this test
enable, err := testutil.GCTrackBlobUploadsTrigger.Disable(suite.db)
require.NoError(t, err)
defer e... | explode_data.jsonl/48567 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 645
} | [
2830,
3393,
22863,
21038,
473,
26039,
40235,
1155,
353,
8840,
836,
8,
341,
17957,
35699,
1155,
11,
1273,
1314,
8240,
26900,
2403,
21670,
89516,
7076,
4390,
197,
322,
11156,
1008,
30754,
429,
1083,
5656,
389,
22122,
45908,
38661,
10841,
77... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfirmBlocks_67_33_4(t *testing.T) {
testConfirmBlocks(t, []pos.Weight{11, 11, 11, 67}, 3)
} | explode_data.jsonl/41397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 45
} | [
2830,
3393,
16728,
29804,
62,
21,
22,
62,
18,
18,
62,
19,
1155,
353,
8840,
836,
8,
341,
18185,
16728,
29804,
1155,
11,
3056,
966,
73791,
90,
16,
16,
11,
220,
16,
16,
11,
220,
16,
16,
11,
220,
21,
22,
2137,
220,
18,
340,
92
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServer_Response_Automatic100Continue(t *testing.T) {
const msg = "foo"
const reply = "bar"
testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
if v := r.Header.Get("Expect"); v != "" {
t.Errorf("Expect header = %q; want empty", v)
}
buf := make([]byte, len(msg))
// This rea... | explode_data.jsonl/71673 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 866
} | [
2830,
3393,
5475,
65873,
1566,
332,
13487,
16,
15,
15,
23526,
1155,
353,
8840,
836,
8,
341,
4777,
3750,
284,
330,
7975,
698,
4777,
9851,
284,
330,
2257,
698,
18185,
5475,
2582,
1155,
11,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestObserverExcludesImagesIntegration(t *testing.T) {
c := container.New(t)
c.StartImage("docker.io/library/nginx:1.17", container.WithPortReady(80))
config := NewFactory().CreateDefaultConfig().(*Config)
config.ExcludedImages = []string{"*nginx*"}
mn := &mockNotifier{endpointsMap: map[observer.EndpointID]o... | explode_data.jsonl/32813 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 216
} | [
2830,
3393,
17151,
840,
7396,
14228,
52464,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
5476,
7121,
1155,
340,
1444,
12101,
1906,
445,
28648,
4245,
45446,
69261,
25,
16,
13,
16,
22,
497,
5476,
26124,
7084,
19202,
7,
23,
15,
4390,
25873,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRecursiveMapType(t *testing.T) {
type recursiveMap map[string]recursiveMap
r1 := recursiveMap{"A": recursiveMap{"B": nil, "C": nil}, "D": nil}
r2 := make(recursiveMap)
if err := encAndDec(r1, &r2); err != nil {
t.Error(err)
}
} | explode_data.jsonl/43389 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
3393,
78542,
2227,
929,
1155,
353,
8840,
836,
8,
341,
13158,
30819,
2227,
2415,
14032,
60,
49512,
2227,
198,
7000,
16,
1669,
30819,
2227,
4913,
32,
788,
30819,
2227,
4913,
33,
788,
2092,
11,
330,
34,
788,
2092,
2137,
330,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKubeStateMetrics(t *testing.T) {
c, err := NewConfigFromString(``)
if err != nil {
t.Fatal(err)
}
c.SetImages(map[string]string{
"kube-state-metrics": "docker.io/openshift/origin-kube-state-metrics:latest",
"kube-rbac-proxy": "docker.io/openshift/origin-kube-rbac-proxy:latest",
})
f := NewFacto... | explode_data.jsonl/68661 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 367
} | [
2830,
3393,
42,
3760,
1397,
27328,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
1532,
2648,
44491,
5809,
24183,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
1444,
4202,
14228,
9147,
14032,
30953,
515,
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 TestEtcdDeleteService(t *testing.T) {
ctx := api.NewDefaultContext()
fakeClient := tools.NewFakeEtcdClient(t)
registry := NewTestEtcdRegistry(fakeClient)
err := registry.DeleteService(ctx, "foo")
if err != nil {
t.Errorf("unexpected error: %v", err)
}
if len(fakeClient.DeletedKeys) != 2 {
t.Errorf("Exp... | explode_data.jsonl/8170 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 271
} | [
2830,
3393,
31860,
4385,
6435,
1860,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6330,
7121,
3675,
1972,
741,
1166,
726,
2959,
1669,
7375,
7121,
52317,
31860,
4385,
2959,
1155,
340,
197,
29172,
1669,
1532,
2271,
31860,
4385,
15603,
74138,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScanForKeys(t *testing.T) {
numKeys := 1000
fixtures := []keyFixture{}
// Make 1000 keys that match
for i := 0; i < numKeys; i++ {
key := fmt.Sprintf("get_keys_test_shouldmatch_%v", i)
fixtures = append(fixtures, newKeyFixture("SET", key, "Woohoo!"))
}
// And 1000 that don't
for i := 0; i < numKey... | explode_data.jsonl/46988 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 518
} | [
2830,
3393,
26570,
2461,
8850,
1155,
353,
8840,
836,
8,
341,
22431,
8850,
1669,
220,
16,
15,
15,
15,
198,
1166,
941,
18513,
1669,
3056,
792,
18930,
31483,
197,
322,
7405,
220,
16,
15,
15,
15,
6894,
429,
2432,
198,
2023,
600,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIamRolesLoadingFromDifferentModules(t *testing.T) {
t.Parallel()
cleanupTerraformFolder(t, TEST_FIXTURE_IAM_ROLES_MULTIPLE_MODULES)
// Execution outputs to be verified
stdout := bytes.Buffer{}
stderr := bytes.Buffer{}
// Invoke terragrunt and verify used IAM roles for each dependency
err := runTerrag... | explode_data.jsonl/10176 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 479
} | [
2830,
3393,
40,
309,
25116,
8578,
3830,
69123,
28201,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
60639,
51,
13886,
627,
13682,
1155,
11,
13602,
42635,
41486,
7959,
1402,
8302,
14017,
29207,
52819,
95742,
692,
197,
322,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMemberAddEmailBulk(t *testing.T) {
tc, _, name := memberSetup(t)
defer tc.Cleanup()
blob := "u1@keybase.io, u2@keybase.io\nu3@keybase.io,u4@keybase.io, u5@keybase.io,u6@keybase.io, u7@keybase.io\n\n\nFull Name <fullname@keybase.io>, Someone Else <someone@keybase.io>,u8@keybase.io\n\nXXXXXXXXXXXX"
res, er... | explode_data.jsonl/13525 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 463
} | [
2830,
3393,
9366,
2212,
4781,
88194,
1155,
353,
8840,
836,
8,
341,
78255,
11,
8358,
829,
1669,
4462,
21821,
1155,
340,
16867,
17130,
727,
60639,
2822,
2233,
1684,
1669,
330,
84,
16,
31,
792,
3152,
4245,
11,
575,
17,
31,
792,
3152,
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... | 5 |
func TestTaskRunSpec_Validate(t *testing.T) {
tests := []struct {
name string
spec v1beta1.TaskRunSpec
}{{
name: "taskspec without a taskRef",
spec: v1beta1.TaskRunSpec{
TaskSpec: &v1beta1.TaskSpec{
Steps: []v1beta1.Step{{Container: corev1.Container{
Name: "mystep",
Image: "myimage",
}}}... | explode_data.jsonl/82030 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 709
} | [
2830,
3393,
6262,
6727,
8327,
62,
17926,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
98100,
348,
16,
19127,
16,
28258,
6727,
8327,
198,
197,
15170,
515,
197,
11609,
25,
330,
24760,
992,
2041,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTearDown(t *testing.T) {
f := newFixture(t)
defer f.teardown()
t1 := time.Unix(1, 0)
f.resource("foo", "foo.sh", t1)
f.resource("bar", "bar.sh", t1)
f.step()
f.c.TearDown(f.ctx)
f.fe.RequireNoKnownProcess(t, "foo.sh")
f.fe.RequireNoKnownProcess(t, "bar.sh")
} | explode_data.jsonl/53810 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
51,
682,
4454,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
340,
16867,
282,
31853,
37496,
2822,
3244,
16,
1669,
882,
10616,
941,
7,
16,
11,
220,
15,
340,
1166,
24013,
445,
7975,
497,
330,
7975,
2395,
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 TestAbsURLify(t *testing.T) {
t.Parallel()
sources := []source.ByteSource{
{Name: filepath.FromSlash("sect/doc1.html"), Content: []byte("<!doctype html><html><head></head><body><a href=\"#frag1\">link</a></body></html>")},
{Name: filepath.FromSlash("blue/doc2.html"), Content: []byte("---\nf: t\n---\n<!doctyp... | explode_data.jsonl/40672 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 640
} | [
2830,
3393,
27778,
3144,
1437,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
1903,
2360,
1669,
3056,
2427,
32119,
3608,
515,
197,
197,
63121,
25,
26054,
11439,
88004,
445,
9687,
39510,
16,
2564,
3975,
8883,
25,
3056,
3782,
9639,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildResolvers(t *testing.T) {
ipOne := net.ParseIP("192.0.0.1")
ipTwo := net.ParseIP("2001:db8:1234:0000:0000:0000:0000:0000")
ipList := []net.IP{ipOne, ipTwo}
invalidType := &ingress.Ingress{}
expected := ""
actual := buildResolvers(invalidType, false)
// Invalid Type for []net.IP
if expected != ac... | explode_data.jsonl/80589 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 385
} | [
2830,
3393,
11066,
1061,
39435,
1155,
353,
8840,
836,
8,
341,
46531,
3966,
1669,
4179,
8937,
3298,
445,
16,
24,
17,
13,
15,
13,
15,
13,
16,
1138,
46531,
11613,
1669,
4179,
8937,
3298,
445,
17,
15,
15,
16,
25,
1999,
23,
25,
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... | 5 |
func TestPatchOptionReturnsNotFound(t *testing.T) {
t.Parallel()
Convey("Given a Dataset API instance with a mocked data store that fails to update dimension node ID due to DimensionNodeNotFound error", t, func() {
w := httptest.NewRecorder()
mockedDataStore, isLocked := storeMockWithLock(true)
mockedDataStor... | explode_data.jsonl/20826 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 687
} | [
2830,
3393,
43622,
5341,
16446,
10372,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
93070,
5617,
445,
22043,
264,
39183,
5333,
2867,
448,
264,
46149,
821,
3553,
429,
14525,
311,
2647,
12871,
2436,
3034,
4152,
311,
27923,
1955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMemory_GenerateCsr(t *testing.T) {
m, err := NewWithDefault()
require.NoError(t, err)
generateCsrResp, err := m.GenerateCsr(&ca.GenerateCsrRequest{})
require.NoError(t, err)
assert.NotEmpty(t, generateCsrResp.Csr)
} | explode_data.jsonl/73854 | {
"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,
10642,
2646,
13220,
34,
15094,
1155,
353,
8840,
836,
8,
341,
2109,
11,
1848,
1669,
1532,
2354,
3675,
741,
17957,
35699,
1155,
11,
1848,
692,
3174,
13220,
34,
15094,
36555,
11,
1848,
1669,
296,
57582,
34,
15094,
2099,
924,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeliverServiceServiceUnavailable(t *testing.T) {
orgEndpointDisableInterval := comm.EndpointDisableInterval
comm.EndpointDisableInterval = time.Millisecond * 1500
defer func() { comm.EndpointDisableInterval = orgEndpointDisableInterval }()
defer ensureNoGoroutineLeak(t)()
// Scenario: bring up 2 ordering ... | explode_data.jsonl/10580 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1488
} | [
2830,
3393,
16532,
1524,
1860,
1860,
92928,
1155,
353,
8840,
836,
8,
341,
87625,
27380,
25479,
10256,
1669,
1063,
90409,
25479,
10256,
198,
197,
3621,
90409,
25479,
10256,
284,
882,
71482,
353,
220,
16,
20,
15,
15,
198,
16867,
2915,
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 TestAssertXML(t *testing.T) {
cases := []struct {
e, a string
asserts bool
container struct {
XMLName xml.Name `xml:"OperationRequest"`
NS string `xml:"xmlns,attr"`
RecursiveStruct struct {
RecursiveMap struct {
Entries []struct {
XMLName xml.Name `xml:"... | explode_data.jsonl/6220 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 682
} | [
2830,
3393,
8534,
10609,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
7727,
11,
264,
414,
914,
198,
197,
6948,
82,
256,
1807,
198,
197,
53290,
2036,
341,
298,
197,
10609,
675,
260,
8396,
2967,
1565,
6455,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTimer_AfterFuncWithAfterFuncFinishedCallback(t *testing.T) {
i := int32(0)
testCount := int32(2000)
testTimer(testCount, func(timer *s_timer.Timer, index int32, finish chan int64) {
defer func() {
finish <- 0
}()
time1 := time.Now().UnixNano()
resultChan := make(chan int64, 1)
timer.AfterFuncWi... | explode_data.jsonl/7628 | {
"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,
10105,
1566,
1046,
9626,
2354,
6025,
9626,
24890,
7494,
1155,
353,
8840,
836,
8,
341,
8230,
1669,
526,
18,
17,
7,
15,
340,
18185,
2507,
1669,
526,
18,
17,
7,
17,
15,
15,
15,
340,
18185,
10105,
8623,
2507,
11,
2915,
428... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrepareForGroupByMultiItems(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 int, b int, c int , index idx(a));")
tk.MustExec("insert into t values(1,2,... | explode_data.jsonl/5524 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 479
} | [
2830,
3393,
50590,
2461,
2808,
1359,
20358,
4353,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
741,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
692,
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... | 1 |
func TestHyphenInMultiOption(t *testing.T) {
var args struct {
Foo []string
Bar int
}
err := parse("--foo --- x - y --bar 3", &args)
require.NoError(t, err)
assert.Equal(t, []string{"---", "x", "-", "y"}, args.Foo)
assert.Equal(t, 3, args.Bar)
} | explode_data.jsonl/13069 | {
"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,
30816,
14769,
641,
20358,
5341,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
12727,
2624,
3056,
917,
198,
197,
197,
3428,
526,
198,
197,
532,
9859,
1669,
4715,
21549,
7975,
12448,
856,
481,
379,
1177,
2257,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildConditions(t *testing.T) {
rev := &Build{}
foo := &BuildCondition{
Type: "Foo",
Status: "True",
}
bar := &BuildCondition{
Type: "Bar",
Status: "True",
}
// Add a new condition.
rev.Status.SetCondition(foo)
if len(rev.Status.Conditions) != 1 {
t.Fatalf("Unexpected Condition length; ... | explode_data.jsonl/15626 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 410
} | [
2830,
3393,
11066,
35435,
1155,
353,
8840,
836,
8,
341,
197,
7282,
1669,
609,
11066,
16094,
197,
7975,
1669,
609,
11066,
10547,
515,
197,
27725,
25,
256,
330,
40923,
756,
197,
58321,
25,
330,
2514,
756,
197,
532,
90709,
1669,
609,
110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.