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 Test_isFullHouse(t *testing.T) {
type args struct {
hand deck.Hand
}
tests := []struct {
name string
args args
want bool
}{
{
name: "Should be a full house",
args: args{deck.Hand{
deck.Card{IsRoyal: true, RoyalType: deck.Royal("king")},
deck.Card{IsRoyal: true, RoyalType: deck.Royal("ki... | explode_data.jsonl/7188 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 550
} | [
2830,
3393,
6892,
9432,
28607,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
9598,
437,
9530,
35308,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
1807,
198,
197,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSnapshotCache(t *testing.T) {
c := cache.NewSnapshotCache(true, group{}, logger{t: t})
if _, err := c.GetSnapshot(key); err == nil {
t.Errorf("unexpected snapshot found for key %q", key)
}
if err := c.SetSnapshot(key, snapshot); err != nil {
t.Fatal(err)
}
snap, err := c.GetSnapshot(key)
if err !... | explode_data.jsonl/6680 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 532
} | [
2830,
3393,
15009,
8233,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
6500,
7121,
15009,
8233,
3715,
11,
1874,
22655,
5925,
90,
83,
25,
259,
8824,
743,
8358,
1848,
1669,
272,
2234,
15009,
4857,
1215,
1848,
621,
2092,
341,
197,
3244,
1308... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func Test_Auto_HTML_Create_Redirect(t *testing.T) {
r := require.New(t)
app := buffalo.New(buffalo.Options{})
app.POST("/cars", func(c buffalo.Context) error {
return c.Render(201, render.Auto(c, Car{
ID: 1,
Name: "Honda",
}))
})
w := willie.New(app)
res := w.HTML("/cars").Post(nil)
r.Equal("/cars/... | explode_data.jsonl/2626 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 164
} | [
2830,
3393,
1566,
1535,
56726,
34325,
92940,
1226,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1373,
7121,
1155,
692,
28236,
1669,
81355,
7121,
39729,
12529,
22179,
37790,
28236,
14721,
4283,
50708,
497,
2915,
1337,
81355,
9328,
8,
1465,
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... | 1 |
func TestVarStringOverflowErrors(t *testing.T) {
pver := ProtocolVersion
tests := []struct {
buf []byte // Wire encoding
pver uint32 // Protocol version for wire encoding
err error // Expected error
}{
{[]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
pver, &MessageError{}},
{[]byte{0xf... | explode_data.jsonl/15302 | {
"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,
3962,
703,
42124,
13877,
1155,
353,
8840,
836,
8,
341,
3223,
423,
1669,
24572,
5637,
271,
78216,
1669,
3056,
1235,
341,
197,
26398,
220,
3056,
3782,
442,
19378,
11170,
198,
197,
3223,
423,
2622,
18,
17,
442,
24572,
2319,
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 TestTo_bash(t *testing.T) {
tables := []struct {
input interface{}
expect string
}{
{"pipo", "'pipo'"},
{"i''i", "'i'\\'''\\''i'"},
{123, "123"},
{nil, ""},
{"", "''"},
{[]string{"pipo", "molo"}, "('pipo' 'molo')"},
{true, "true"},
... | explode_data.jsonl/35249 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 290
} | [
2830,
3393,
1249,
880,
988,
1155,
353,
8840,
836,
8,
341,
262,
12632,
1669,
3056,
1235,
341,
286,
1946,
3749,
16094,
286,
1720,
914,
198,
262,
335,
515,
286,
5212,
79,
6943,
497,
7178,
79,
6943,
6,
7115,
286,
5212,
72,
4605,
72,
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... | 3 |
func TestExtrinsicPayload_Sign(t *testing.T) {
sig, err := examplaryExtrinsicPayload.Sign(signature.TestKeyringPairAlice)
assert.NoError(t, err)
// verify sig
b, err := EncodeToBytes(examplaryExtrinsicPayload)
assert.NoError(t, err)
ok, err := signature.Verify(b, sig[:], HexEncodeToString(signature.TestKeyringPa... | explode_data.jsonl/65318 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 155
} | [
2830,
3393,
840,
45002,
29683,
1098,
622,
1155,
353,
8840,
836,
8,
341,
84841,
11,
1848,
1669,
7006,
500,
658,
840,
45002,
29683,
41152,
92650,
8787,
1592,
12640,
12443,
61686,
340,
6948,
35699,
1155,
11,
1848,
692,
197,
322,
10146,
836... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFakeMapEntryProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMapEntry{}
if err... | explode_data.jsonl/14885 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 495
} | [
2830,
3393,
52317,
2227,
5874,
31549,
1155,
353,
8840,
836,
8,
341,
197,
22602,
1669,
882,
13244,
1005,
55832,
83819,
741,
3223,
46288,
1669,
6888,
33864,
7121,
37270,
33864,
7121,
3608,
44163,
1171,
3223,
1669,
1532,
11598,
7757,
52317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadInvalidMap(t *testing.T) {
testutils.TestFiles(t, "testdata/invalid_map-*.elf", func(t *testing.T, file string) {
_, err := LoadCollectionSpec(file)
t.Log(err)
if err == nil {
t.Fatal("Loading an invalid map should fail")
}
})
} | explode_data.jsonl/27740 | {
"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,
5879,
7928,
2227,
1155,
353,
8840,
836,
8,
341,
18185,
6031,
8787,
10809,
1155,
11,
330,
92425,
14,
11808,
5376,
12,
19922,
490,
497,
2915,
1155,
353,
8840,
836,
11,
1034,
914,
8,
341,
197,
197,
6878,
1848,
1669,
8893,
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 TestU128_Hex(t *testing.T) {
assertEncodeToHex(t, []encodeToHexAssert{
{NewU128(*big.NewInt(29)), "0x1d000000000000000000000000000000"},
})
} | explode_data.jsonl/18420 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
52,
16,
17,
23,
2039,
327,
1155,
353,
8840,
836,
8,
341,
6948,
32535,
1249,
20335,
1155,
11,
3056,
6180,
1249,
20335,
8534,
515,
197,
197,
90,
3564,
52,
16,
17,
23,
4071,
16154,
7121,
1072,
7,
17,
24,
5731,
330,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestValidateProxyAddress(t *testing.T) {
addresses := map[string]bool{
"istio-pilot:80": true,
"istio-pilot": false,
"isti..:80": false,
"10.0.0.100:9090": true,
"10.0.0.100": false,
"istio-pilot:port": false,
"istio-pilot:100000": false,
"[200... | explode_data.jsonl/56894 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 351
} | [
2830,
3393,
17926,
16219,
4286,
1155,
353,
8840,
836,
8,
341,
197,
53789,
1669,
2415,
14032,
96436,
515,
197,
197,
1,
380,
815,
2268,
23958,
25,
23,
15,
788,
286,
830,
345,
197,
197,
1,
380,
815,
2268,
23958,
788,
1843,
895,
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... | 3 |
func TestDatabase_UserFromLibrary(t *testing.T) {
// setup types
u := new(library.User)
u.SetID(1)
u.SetName("octocat")
u.SetToken("superSecretToken")
u.SetHash("superSecretHash")
u.SetFavorites([]string{"github/octocat"})
u.SetActive(true)
u.SetAdmin(false)
want := testUser()
// run test
got := UserFrom... | explode_data.jsonl/9475 | {
"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,
5988,
31339,
3830,
16915,
1155,
353,
8840,
836,
8,
341,
197,
322,
6505,
4494,
198,
10676,
1669,
501,
93299,
7344,
692,
10676,
4202,
915,
7,
16,
340,
10676,
4202,
675,
445,
41692,
509,
266,
1138,
10676,
4202,
3323,
445,
952... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCanvasSet(t *testing.T) {
c := NewCanvas()
c.Set(0, 0)
c.Set(0, 1)
c.Set(0, 2)
c.Set(0, 3)
c.Set(1, 3)
c.Set(2, 3)
c.Set(3, 3)
c.Set(4, 3)
c.Set(5, 3)
spew.Dump(c)
} | explode_data.jsonl/8633 | {
"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,
18226,
1649,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
18226,
741,
1444,
4202,
7,
15,
11,
220,
15,
340,
1444,
4202,
7,
15,
11,
220,
16,
340,
1444,
4202,
7,
15,
11,
220,
17,
340,
1444,
4202,
7,
15,
11,
220,
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... | 1 |
func TestLoadBalancerExternalServiceModeSelection(t *testing.T) {
testLoadBalancerServiceDefaultModeSelection(t, false)
testLoadBalancerServiceAutoModeSelection(t, false)
testLoadBalancerServicesSpecifiedSelection(t, false)
testLoadBalancerMaxRulesServices(t, false)
testLoadBalancerServiceAutoModeDeleteSelection(t... | explode_data.jsonl/50385 | {
"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,
5879,
93825,
25913,
1860,
3636,
11177,
1155,
353,
8840,
836,
8,
341,
18185,
5879,
93825,
1860,
3675,
3636,
11177,
1155,
11,
895,
340,
18185,
5879,
93825,
1860,
13253,
3636,
11177,
1155,
11,
895,
340,
18185,
5879,
93825,
11025,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetSubscriptionAttributesHandler_POST_Success(t *testing.T) {
// Create a request to pass to our handler. We don't have any query parameters for now, so we'll
// pass 'nil' as the third parameter.
req, err := http.NewRequest("POST", "/", nil)
if err != nil {
t.Fatal(err)
}
topicName := "testing"
topi... | explode_data.jsonl/76508 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 613
} | [
2830,
3393,
1949,
33402,
10516,
3050,
20506,
87161,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
264,
1681,
311,
1494,
311,
1039,
7013,
13,
1205,
1513,
944,
614,
894,
3239,
5029,
369,
1431,
11,
773,
582,
3278,
198,
197,
322,
1494,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFleetGateway(t *testing.T) {
agentInfo := &testAgentInfo{}
settings := &fleetGatewaySettings{
Duration: 5 * time.Second,
Backoff: backoffSettings{Init: 1 * time.Second, Max: 5 * time.Second},
}
t.Run("send no event and receive no action", withGateway(agentInfo, settings, func(
t *testing.T,
gatew... | explode_data.jsonl/80447 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2248
} | [
2830,
3393,
37,
18973,
40709,
1155,
353,
8840,
836,
8,
341,
197,
8092,
1731,
1669,
609,
1944,
16810,
1731,
16094,
62930,
1669,
609,
72698,
40709,
6086,
515,
197,
10957,
2017,
25,
220,
20,
353,
882,
32435,
345,
197,
197,
3707,
1847,
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... | 1 |
func TestOptimisticConflicts(t *testing.T) {
store, clean := createMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk2 := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk2.MustExec("use test")
tk.MustExec("drop table if exists conflict")
tk.MustExec("create table conflict (id int ... | explode_data.jsonl/12461 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 633
} | [
2830,
3393,
21367,
318,
4532,
15578,
56445,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1855,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
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... | 1 |
func TestMapBuckets(t *testing.T) {
// Test that maps of different sizes have the right number of buckets.
// Non-escaping maps with small buckets (like map[int]int) never
// have a nil bucket pointer due to starting with preallocated buckets
// on the stack. Escaping maps start with a non-nil bucket pointer if
//... | explode_data.jsonl/19925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1808
} | [
2830,
3393,
2227,
33,
38551,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
429,
14043,
315,
2155,
12282,
614,
279,
1290,
1372,
315,
42112,
624,
197,
322,
11581,
12,
42480,
14043,
448,
2613,
42112,
320,
4803,
2415,
18640,
63025,
8,
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... | 9 |
func TestConfigUseContext(t *testing.T) {
settings := &environment.AirshipCTLSettings{Config: testutil.DummyConfig()}
cmdTests := []*testutil.CmdTest{
{
Name: "config-use-context",
CmdLine: "dummy_context",
Cmd: cmd.NewUseContextCommand(settings),
},
{
Name: "config-use-context-no-args",
... | explode_data.jsonl/43214 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 300
} | [
2830,
3393,
2648,
10253,
1972,
1155,
353,
8840,
836,
8,
341,
62930,
1669,
609,
23294,
875,
404,
5270,
23871,
6086,
90,
2648,
25,
1273,
1314,
909,
8574,
2648,
23509,
25920,
18200,
1669,
29838,
1944,
1314,
64512,
2271,
515,
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... | 2 |
func TestInMemoryChannelIsReady(t *testing.T) {
tests := []struct {
name string
markServiceReady bool
markChannelServiceReady bool
setAddress bool
markEndpointsReady bool
wantReady bool
dispatcherStatus *appsv1.DeploymentStatus
}{{
name:... | explode_data.jsonl/22197 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1366
} | [
2830,
3393,
641,
10642,
9629,
3872,
19202,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
503,
914,
198,
197,
2109,
838,
1860,
19202,
286,
1807,
198,
197,
2109,
838,
9629,
1860,
19202,
1807,
198,
197,
8196,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStandardMetricListID(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
resolution := 10 * time.Second
opts := testOptions(ctrl)
listID := standardMetricListID{resolution: resolution}
l, err := newStandardMetricList(testShard, listID, opts)
require.NoError(t, err)
expectedListID := m... | explode_data.jsonl/43585 | {
"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,
19781,
54310,
852,
915,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
10202,
3214,
1669,
220,
16,
15,
353,
882,
32435,
198,
64734,
1669,
1273,
3798,
62100,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLength(t *testing.T) {
u := Vec3{3, 4, -2}
v := Vec3{15, -2, 0}
assert.Equal(t, math.Sqrt(u.X*u.X+u.Y*u.Y+u.Z*u.Z), Length(u))
assert.Equal(t, math.Sqrt(v.X*v.X+v.Y*v.Y+v.Z*v.Z), Length(v))
assert.Equal(t, 1.0, Length(UnitVector(u)))
assert.Equal(t, 1.0, Length(UnitVector(v)))
u = Vec3{0, 5, 0}
v = ... | explode_data.jsonl/33713 | {
"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,
4373,
1155,
353,
8840,
836,
8,
341,
10676,
1669,
11312,
18,
90,
18,
11,
220,
19,
11,
481,
17,
532,
5195,
1669,
11312,
18,
90,
16,
20,
11,
481,
17,
11,
220,
15,
630,
6948,
12808,
1155,
11,
6888,
70815,
8154,
4338,
591... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuild(t *testing.T) {
color.Disable(true)
defer color.Disable(false)
rand.Seed(time.Now().UTC().UnixNano())
spec.Run(t, "build", testBuild, spec.Report(report.Terminal{}))
} | explode_data.jsonl/21234 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 73
} | [
2830,
3393,
11066,
1155,
353,
8840,
836,
8,
341,
21481,
10166,
480,
3715,
340,
16867,
1894,
10166,
480,
3576,
340,
7000,
437,
5732,
291,
9730,
13244,
1005,
21183,
1005,
55832,
83819,
2398,
98100,
16708,
1155,
11,
330,
5834,
497,
1273,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDFS(t *testing.T) {
g := map[int][]int{
1: {2, 3},
2: {4, 5},
3: {6, 7},
6: {2},
}
t1 := newTestTraversal(g)
stopped := DFS(t1, t1.Iter, 1)
if stopped {
t.Fatalf("Did not expect traversal to stop")
}
expected := []int{1, 3, 7, 6, 2, 5, 4}
if !reflect.DeepEqual(expected, t1.ordered) {
t.... | explode_data.jsonl/30657 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 191
} | [
2830,
3393,
62266,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
2415,
18640,
45725,
396,
515,
197,
197,
16,
25,
314,
17,
11,
220,
18,
1583,
197,
197,
17,
25,
314,
19,
11,
220,
20,
1583,
197,
197,
18,
25,
314,
21,
11,
220,
22,
158... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEncrypt(t *testing.T){
fmt.Println("Test Encrypt ***")
key := ReadFile("./keyfile")
secret := Base64Decode(key)
data := []byte("this is a test from Go")
encResult, err := Encrypt(data, secret)
fmt.Println("encResult:", key)
fmt.Println("encResult:", encResult)
if err != nil {
fmt.Println("enc err", e... | explode_data.jsonl/37322 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
61520,
1155,
353,
8840,
836,
1264,
11009,
12419,
445,
2271,
55459,
17160,
1138,
23634,
1669,
4457,
1703,
13988,
792,
1192,
1138,
197,
20474,
1669,
5351,
21,
19,
32564,
4857,
340,
8924,
1669,
3056,
3782,
445,
574,
374,
264,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResource_payload(t *testing.T) {
type fields struct {
session session.ServiceFormatter
}
type args struct {
haltOnError bool
requesters []Subrequester
}
tests := []struct {
name string
fields fields
args args
want *bytes.Reader
wantErr bool
}{
{
name: "success",
field... | explode_data.jsonl/19626 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 498
} | [
2830,
3393,
4783,
32813,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
25054,
3797,
13860,
14183,
198,
197,
532,
13158,
2827,
2036,
341,
197,
9598,
3145,
74945,
1807,
198,
197,
23555,
388,
220,
3056,
3136,
2035,
261,
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... | 2 |
func TestAtLeast(t *testing.T) {
t.Parallel()
ctx, cancel := testAllocate(t, "js.html")
defer cancel()
var nodes []*cdp.Node
if err := Run(ctx, Nodes("//input", &nodes, AtLeast(3))); err != nil {
t.Fatalf("got error: %v", err)
}
if len(nodes) < 3 {
t.Errorf("expected to have at least 3 nodes: got %d", len(... | explode_data.jsonl/59462 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 143
} | [
2830,
3393,
1655,
81816,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20985,
11,
9121,
1669,
1273,
75380,
1155,
11,
330,
2519,
2564,
1138,
16867,
9121,
2822,
2405,
7798,
29838,
4385,
79,
21714,
198,
743,
1848,
1669,
6452,
7502... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetVolumeHandle(t *testing.T) {
pv := &v1.PersistentVolume{
Spec: v1.PersistentVolumeSpec{
PersistentVolumeSource: v1.PersistentVolumeSource{
CSI: &v1.CSIPersistentVolumeSource{
Driver: "myDriver",
VolumeHandle: "name",
ReadOnly: false,
},
},
},
}
validPV := pv.De... | explode_data.jsonl/42157 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 617
} | [
2830,
3393,
1949,
18902,
6999,
1155,
353,
8840,
836,
8,
341,
3223,
85,
1669,
609,
85,
16,
61655,
18902,
515,
197,
7568,
992,
25,
348,
16,
61655,
18902,
8327,
515,
298,
10025,
13931,
18902,
3608,
25,
348,
16,
61655,
18902,
3608,
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... | 8 |
func TestGetGroupSyncable(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
group := th.CreateGroup()
groupSyncable := &model.GroupSyncable{
GroupId: group.Id,
CanLeave: true,
AutoAdd: false,
SyncableId: th.BasicTeam.Id,
Type: model.GroupSyncableTypeTeam,
}
gs, err := th.App.... | explode_data.jsonl/37042 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 230
} | [
2830,
3393,
1949,
2808,
12154,
480,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
44260,
1669,
270,
7251,
2808,
741,
44260,
12154,
480,
1669,
609,
2528,
5407,
12154,
480,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefaultProcessor_RequestSignatures(t *testing.T) {
srv := &testingcommons.MockIdentityService{}
dp := DefaultProcessor(srv, nil, nil, cfg).(defaultProcessor)
ctxh := testingconfig.CreateAccountContext(t, cfg)
self, err := contextutil.Account(ctxh)
assert.NoError(t, err)
sr := utils.RandomSlice(32)
sig,... | explode_data.jsonl/57867 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 985
} | [
2830,
3393,
3675,
22946,
44024,
7264,
2789,
1155,
353,
8840,
836,
8,
341,
1903,
10553,
1669,
609,
8840,
52361,
24664,
18558,
1860,
16094,
55256,
1669,
7899,
22946,
1141,
10553,
11,
2092,
11,
2092,
11,
13286,
68615,
2258,
22946,
340,
20985... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCloseIdleConnections(t *testing.T) {
t.Parallel()
ln := fasthttputil.NewInmemoryListener()
s := &Server{
Handler: func(ctx *RequestCtx) {
},
}
go func() {
if err := s.Serve(ln); err != nil {
t.Error(err)
}
}()
c := &Client{
Dial: func(addr string) (net.Conn, error) {
return ln.Dial()
... | explode_data.jsonl/79328 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 397
} | [
2830,
3393,
7925,
41370,
54751,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
2261,
1669,
4937,
96336,
628,
321,
7121,
641,
17269,
2743,
2822,
1903,
1669,
609,
5475,
515,
197,
197,
3050,
25,
2915,
7502,
353,
1900,
23684,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEntry_DoubleTapped_AfterCol(t *testing.T) {
entry := widget.NewEntry()
entry.SetText("A\nB\n")
c := fyne.CurrentApp().Driver().CanvasForObject(entry)
test.Tap(entry)
assert.Equal(t, c.Focused(), entry)
testCharSize := theme.TextSize()
pos := fyne.NewPos(testCharSize, testCharSize*4) // tap below rows
... | explode_data.jsonl/57281 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 172
} | [
2830,
3393,
5874,
84390,
51,
5677,
1566,
1046,
6127,
1155,
353,
8840,
836,
8,
341,
48344,
1669,
9086,
7121,
5874,
741,
48344,
92259,
445,
32,
1699,
33,
1699,
1138,
1444,
1669,
51941,
811,
11517,
2164,
1005,
11349,
1005,
18226,
94604,
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... | 1 |
func TestPeerWithSubstitutedConfig_WithEmptySubstituteUrl(t *testing.T) {
_, fetchedConfig := testCommonConfigPeer(t, "peer0.org1.example.com", "peer4.org1.example3.com")
if fetchedConfig.URL != "peer0.org1.example.com:7051" {
t.Fatal("Fetched Config should have the same url")
}
if fetchedConfig.GRPCOptions["ss... | explode_data.jsonl/34082 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 177
} | [
2830,
3393,
30888,
2354,
3136,
3696,
2774,
2648,
62,
2354,
3522,
3136,
7660,
2864,
1155,
353,
8840,
836,
8,
341,
197,
6878,
41442,
2648,
1669,
1273,
10839,
2648,
30888,
1155,
11,
330,
16537,
15,
2659,
16,
7724,
905,
497,
330,
16537,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQuotingIfNecessary(t *testing.T) {
cases := map[string]string{
"foo": "foo",
"\"foo\"": "\"foo\"",
"foo bar": "\"foo bar\"",
"Allen, C.": "\"Allen, C.\"",
}
for input, expected := range cases {
if dot.QuoteIfNecessary(input) != expected {
t.Errorf("'%s' != '%s'", dot.QuoteIfNecessary... | explode_data.jsonl/405 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 161
} | [
2830,
3393,
2183,
11519,
2679,
45,
20122,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
2415,
14032,
30953,
515,
197,
197,
1,
7975,
788,
981,
330,
7975,
756,
197,
197,
1,
2105,
7975,
2105,
788,
256,
15898,
7975,
95901,
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... | 3 |
func TestLoggedIn_Hydra_Success_Log(t *testing.T) {
s, cfg, _, h, _, err := setupHydraTest(true)
if err != nil {
t.Fatalf("setupHydraTest() failed: %v", err)
}
logs, close := fakesdl.New()
defer close()
s.logger = logs.Client
serviceinfo.Project = "p1"
serviceinfo.Type = "t1"
serviceinfo.Name = "n1"
pname... | explode_data.jsonl/18497 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 615
} | [
2830,
3393,
28559,
2039,
88,
22248,
87161,
44083,
1155,
353,
8840,
836,
8,
341,
1903,
11,
13286,
11,
8358,
305,
11,
8358,
1848,
1669,
6505,
30816,
22248,
2271,
3715,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
15188,
30816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetIndexFromCache(t *testing.T) {
repoURL := "https://test.com"
data := []byte("foo")
index, sha := getIndexFromCache(repoURL, data)
if index != nil {
t.Error("Index should be empty since it's not in the cache yet")
}
fakeIndex := &repo.IndexFile{}
storeIndexInCache(repoURL, fakeIndex, sha)
index, _ ... | explode_data.jsonl/12751 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 158
} | [
2830,
3393,
1949,
1552,
3830,
8233,
1155,
353,
8840,
836,
8,
341,
17200,
5368,
3144,
1669,
330,
2428,
1110,
1944,
905,
698,
8924,
1669,
3056,
3782,
445,
7975,
1138,
26327,
11,
15870,
1669,
89771,
3830,
8233,
50608,
3144,
11,
821,
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... | 3 |
func Test_runShowCmd(t *testing.T) {
runningUnattended := isRunningUnattended()
cmd := ShowKeysCmd()
mockIn, _, _ := tests.ApplyMockIO(cmd)
require.EqualError(t, runShowCmd(cmd, []string{"invalid"}), "The specified item could not be found in the keyring")
require.EqualError(t, runShowCmd(cmd, []string{"invalid1", ... | explode_data.jsonl/45324 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1216
} | [
2830,
3393,
14007,
7812,
15613,
1155,
353,
8840,
836,
8,
341,
197,
27173,
1806,
84906,
1669,
374,
18990,
1806,
84906,
741,
25920,
1669,
6928,
8850,
15613,
741,
77333,
641,
11,
8358,
716,
1669,
7032,
36051,
11571,
3810,
14160,
340,
17957,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNew_Only48BitAddresses(t *testing.T) {
tc := []struct {
addr string
success bool
}{
{"00:00:5e:00:53:01", true},
{"02:00:5e:10:00:00:00:01", false},
{"00:00:00:00:fe:80:00:00:00:00:00:00:02:00:5e:10:00:00:00:01", false},
{"00-00-5e-00-53-01", true},
{"02-00-5e-10-00-00-00-01", false},
{"00... | explode_data.jsonl/8289 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 384
} | [
2830,
3393,
3564,
62,
7308,
19,
23,
8344,
52290,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
3056,
1235,
341,
197,
53183,
262,
914,
198,
197,
30553,
1807,
198,
197,
59403,
197,
197,
4913,
15,
15,
25,
15,
15,
25,
20,
68,
25,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCondBreakpoint(t *testing.T) {
skipOn(t, "broken", "freebsd")
protest.AllowRecording(t)
withTestProcess("parallel_next", t, func(p *proc.Target, fixture protest.Fixture) {
bp := setFileBreakpoint(p, t, fixture.Source, 9)
bp.UserBreaklet().Cond = &ast.BinaryExpr{
Op: token.EQL,
X: &ast.Ident{Name:... | explode_data.jsonl/56238 | {
"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,
49696,
22524,
2768,
1155,
353,
8840,
836,
8,
341,
1903,
13389,
1925,
1155,
11,
330,
48909,
497,
330,
10593,
51835,
1138,
197,
776,
1944,
29081,
52856,
1155,
340,
46948,
2271,
7423,
445,
46103,
11257,
497,
259,
11,
2915,
1295... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestToBytes(t *testing.T) {
type args struct {
lang string
s []string
}
tests := []struct {
name string
args args
want []byte
wantErr bool
}{
// these are the reverse of all of the tests above
{"a", args{"en", []string{"abandon", "amount", "mom"}}, []byte{0, 1, 2}, false},
{"b", a... | explode_data.jsonl/32824 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 762
} | [
2830,
3393,
1249,
7078,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
197,
5205,
914,
198,
197,
1903,
262,
3056,
917,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
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... | 3 |
func TestMemPipe(t *testing.T) {
a, b := memPipe()
if err := a.writePacket([]byte{42}); err != nil {
t.Fatalf("writePacket: %v", err)
}
if err := a.Close(); err != nil {
t.Fatal("Close: ", err)
}
p, err := b.readPacket()
if err != nil {
t.Fatal("readPacket: ", err)
... | explode_data.jsonl/62916 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
18816,
34077,
1155,
353,
8840,
836,
8,
341,
262,
264,
11,
293,
1669,
1833,
34077,
741,
262,
421,
1848,
1669,
264,
3836,
16679,
10556,
3782,
90,
19,
17,
14088,
1848,
961,
2092,
341,
286,
259,
30762,
445,
4934,
16679,
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... | 7 |
func TestNormalize(t *testing.T) {
t.Parallel()
assert.Equal(t, ".", Normalize(""))
assert.Equal(t, ".", Normalize("."))
assert.Equal(t, ".", Normalize("./."))
assert.Equal(t, "foo", Normalize("./foo"))
assert.Equal(t, "../foo", Normalize("../foo"))
assert.Equal(t, "../foo", Normalize("../foo"))
assert.Equal(t,... | explode_data.jsonl/11896 | {
"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,
87824,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
6948,
12808,
1155,
11,
68514,
68092,
73303,
6948,
12808,
1155,
11,
68514,
68092,
5680,
5455,
6948,
12808,
1155,
11,
68514,
68092,
13988,
13,
5455,
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... | 1 |
func TestValidateSpanType(t *testing.T) {
validateTransaction(t, func(tx *apm.Transaction) {
tx.StartSpan("name", strings.Repeat("x", 1025), nil).End()
})
} | explode_data.jsonl/787 | {
"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,
17926,
12485,
929,
1155,
353,
8840,
836,
8,
341,
197,
7067,
8070,
1155,
11,
2915,
27301,
353,
391,
76,
29284,
8,
341,
197,
46237,
12101,
12485,
445,
606,
497,
9069,
2817,
10979,
445,
87,
497,
220,
16,
15,
17,
20,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFailureBadIntTags(t *testing.T) {
badTagESSpan, err := loadESSpanFixture(1)
require.NoError(t, err)
badTagESSpan.Tags = []KeyValue{
{
Key: "meh",
Value: "meh",
Type: "int64",
},
}
failingSpanTransformAnyMsg(t, &badTagESSpan)
} | explode_data.jsonl/5143 | {
"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,
17507,
17082,
1072,
15930,
1155,
353,
8840,
836,
8,
341,
2233,
329,
5668,
9996,
848,
11,
1848,
1669,
2795,
9996,
848,
18930,
7,
16,
340,
17957,
35699,
1155,
11,
1848,
692,
2233,
329,
5668,
9996,
848,
73522,
284,
3056,
7208... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestActionLoadSetField(t *testing.T) {
var tests = []struct {
desc string
a Action
action string
err error
}{
{
desc: "set field both empty",
a: SetField("", ""),
err: errLoadSetFieldZero,
},
{
desc: "set field value empty",
a: SetField("", "arp_spa"),
err: errLo... | explode_data.jsonl/49516 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 714
} | [
2830,
3393,
2512,
5879,
1649,
1877,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
41653,
256,
914,
198,
197,
11323,
414,
5586,
198,
197,
38933,
914,
198,
197,
9859,
262,
1465,
198,
197,
59403,
197,
197,
515,
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... | 4 |
func Test_prepareResponse(t *testing.T) {
rsp := httptest.NewRecorder()
prepareResponse(rsp, json.TypeCharset)
assert.Equal(t, json.TypeCharset, rsp.Header().Get(encoding.ContentTypeHeader))
} | explode_data.jsonl/54959 | {
"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,
47460,
2582,
1155,
353,
8840,
836,
8,
341,
7000,
2154,
1669,
54320,
70334,
7121,
47023,
741,
197,
13609,
2582,
2601,
2154,
11,
2951,
10184,
78172,
340,
6948,
12808,
1155,
11,
2951,
10184,
78172,
11,
42160,
15753,
1005,
1949,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestM(t *testing.T) {
m := Money{}
if m.M != 0 {
t.Errorf("expected money amount to be %v, got %v", 0, m.M)
}
m = Money{-123, "EUR"}
if m.M != -123 {
t.Errorf("expected money amount to be %v, got %v", -123, m.M)
}
m = Money{123, "EUR"}
if m.M != 123 {
t.Errorf("expected money amount to be %v, got %... | explode_data.jsonl/61364 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 161
} | [
2830,
3393,
44,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
17633,
16094,
743,
296,
1321,
961,
220,
15,
341,
197,
3244,
13080,
445,
7325,
3220,
3311,
311,
387,
1018,
85,
11,
2684,
1018,
85,
497,
220,
15,
11,
296,
1321,
340,
197,
630... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatchIP(t *testing.T) {
// Check that pattern matching is working.
c := &Certificate{
DNSNames: []string{"*.foo.bar.baz"},
Subject: pkix.Name{
CommonName: "*.foo.bar.baz",
},
}
err := c.VerifyHostname("quux.foo.bar.baz")
if err != nil {
t.Fatalf("VerifyHostname(quux.foo.bar.baz): %v", err)
}
... | explode_data.jsonl/56545 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 480
} | [
2830,
3393,
8331,
3298,
1155,
353,
8840,
836,
8,
341,
197,
322,
4248,
429,
5383,
12579,
374,
3238,
624,
1444,
1669,
609,
33202,
515,
197,
10957,
2448,
7980,
25,
3056,
917,
4913,
19922,
7975,
22001,
948,
1370,
7115,
197,
197,
13019,
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... | 6 |
func TestClustersReplicationMinMaxNoRealloc(t *testing.T) {
ctx := context.Background()
if nClusters < 5 {
t.Skip("Need at least 5 peers")
}
clusters, mock := createClusters(t)
defer shutdownClusters(t, clusters, mock)
for _, c := range clusters {
c.config.ReplicationFactorMin = 1
c.config.ReplicationFacto... | explode_data.jsonl/66616 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 406
} | [
2830,
3393,
94992,
18327,
1693,
92304,
2753,
693,
4742,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
743,
308,
94992,
366,
220,
20,
341,
197,
3244,
57776,
445,
23657,
518,
3245,
220,
20,
25029,
1138,
197,
630,
39407,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBytes_EncodedLength(t *testing.T) {
assertEncodedLength(t, []encodedLengthAssert{
{NewBytes(MustHexDecodeString("0x00")), 2},
{NewBytes(MustHexDecodeString("0xab1234")), 4},
{NewBytes(MustHexDecodeString("0x0001")), 3},
})
} | explode_data.jsonl/70593 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 101
} | [
2830,
3393,
7078,
93529,
6737,
4373,
1155,
353,
8840,
836,
8,
341,
6948,
46795,
4373,
1155,
11,
3056,
19329,
4373,
8534,
515,
197,
197,
90,
3564,
7078,
3189,
590,
20335,
32564,
703,
445,
15,
87,
15,
15,
35674,
220,
17,
1583,
197,
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 TestStrArray_Chunk(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []string{"1", "2", "3", "4", "5"}
array1 := garray.NewStrArrayFrom(a1)
chunks := array1.Chunk(2)
t.Assert(len(chunks), 3)
t.Assert(chunks[0], []string{"1", "2"})
t.Assert(chunks[1], []string{"3", "4"})
t.Assert(chunks[2], []strin... | explode_data.jsonl/53093 | {
"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,
2580,
1857,
27588,
3122,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11323,
16,
1669,
3056,
917,
4913,
16,
497,
330,
17,
497,
330,
18,
497,
330,
19,
497,
330,
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... | 1 |
func Test_ElasticsearchTarget(t *testing.T) {
t.Run("Send with Annually Result", func(t *testing.T) {
callback := func(req *http.Request) {
if contentType := req.Header.Get("Content-Type"); contentType != "application/json; charset=utf-8" {
t.Errorf("Unexpected Content-Type: %s", contentType)
}
if agen... | explode_data.jsonl/38183 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1179
} | [
2830,
3393,
2089,
51179,
1836,
6397,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
11505,
448,
9305,
1832,
5714,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
43350,
1669,
2915,
6881,
353,
1254,
9659,
8,
341,
298,
743,
32103,
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... | 4 |
func TestResolveMapParamUnknown(t *testing.T) {
cxt := context.NewTestContext(t)
m := &Manifest{
Parameters: []ParameterDefinition{},
}
rm := NewRuntimeManifest(cxt.Context, ActionInstall, m)
s := &Step{
Data: map[string]interface{}{
"description": "a test step",
"Parameters": map[string]interface{}{
... | explode_data.jsonl/37709 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 226
} | [
2830,
3393,
56808,
2227,
2001,
13790,
1155,
353,
8840,
836,
8,
341,
1444,
2252,
1669,
2266,
7121,
2271,
1972,
1155,
340,
2109,
1669,
609,
38495,
515,
197,
197,
9706,
25,
3056,
4971,
10398,
38837,
197,
532,
70945,
1669,
1532,
15123,
3849... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerReloadTrigger(t *testing.T) {
f := newFixture(t)
store := f.server.store
ctx := context.Background()
txn := storage.NewTransactionOrDie(ctx, store, storage.WriteParams)
if err := store.UpsertPolicy(ctx, txn, "test", []byte("package test\np = 1")); err != nil {
panic(err)
}
if err := f.v1(http.Me... | explode_data.jsonl/79031 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
5475,
50035,
17939,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
340,
57279,
1669,
282,
12638,
16114,
198,
20985,
1669,
2266,
19047,
741,
3244,
42967,
1669,
5819,
7121,
8070,
2195,
18175,
7502,
11,
3553,
11,
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... | 5 |
func TestSmallTimeout(t *testing.T) {
conf := &Config{
Host: "127.0.0.1",
Port: 8500,
GossipInterval: 200 * time.Millisecond,
}
n := 3
cs := newN(t, n, conf)
defer cleanup(cs[1:])
check:
<-time.After(2 * conf.GossipInterval)
for _, c := range cs {
a := len(c.Alive(true))
if a != n... | explode_data.jsonl/22695 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 312
} | [
2830,
3393,
25307,
7636,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
609,
2648,
515,
197,
197,
9296,
25,
1843,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
756,
197,
98459,
25,
1843,
220,
23,
20,
15,
15,
345,
197,
9600,
41473,
10256,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccAppfwurlencodedformcontenttype_basic(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAppfwurlencodedformcontenttypeDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAc... | explode_data.jsonl/2083 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 313
} | [
2830,
3393,
14603,
2164,
20564,
1085,
19329,
627,
1796,
1313,
34729,
1155,
353,
8840,
836,
8,
341,
50346,
8787,
1155,
11,
5101,
31363,
515,
197,
197,
4703,
3973,
25,
257,
2915,
368,
314,
1273,
14603,
4703,
3973,
1155,
8,
1153,
197,
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 TestParse(t *testing.T) {
node := new(Node)
nodeConfig := config.NodeConfig{
Name: "node1",
DownAfterNoAlive: 100,
IdleConns: 16,
User: "hello",
Password: "world",
Master: "127.0.0.1:3307",
Slave: []string{
"192.168.1.12:3306@2",
"192.168.1.13:... | explode_data.jsonl/62471 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 406
} | [
2830,
3393,
14463,
1155,
353,
8840,
836,
8,
341,
20831,
1669,
501,
22078,
340,
20831,
2648,
1669,
2193,
21714,
2648,
515,
197,
21297,
25,
1797,
330,
3509,
16,
756,
197,
197,
4454,
6025,
2753,
32637,
25,
220,
16,
15,
15,
345,
197,
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... | 4 |
func TestGetModification(t *testing.T) {
visitor := createVisitor("test", nil)
// Test before sync
_, err := visitor.getModification("not_exists", true)
assert.NotEqual(t, nil, err, "Should raise an error as modifications are not synced")
// Test infos before sync
_, err = visitor.GetModificationInfo("not_exist... | explode_data.jsonl/12289 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 472
} | [
2830,
3393,
1949,
80795,
1155,
353,
8840,
836,
8,
341,
197,
39985,
1669,
1855,
16796,
445,
1944,
497,
2092,
692,
197,
322,
3393,
1573,
12811,
198,
197,
6878,
1848,
1669,
20181,
670,
80795,
445,
1921,
9766,
497,
830,
340,
6948,
15000,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOrthodoxEaster(t *testing.T) {
easter2019 := time.Date(2019, time.April, 28, 0, 0, 0, 0, time.UTC)
easter2020 := time.Date(2020, time.April, 19, 0, 0, 0, 0, time.UTC)
assert.Equal(t, easter2019, easter(2019, EasterOrthodox))
assert.Equal(t, easter2020, easter(2020, EasterOrthodox))
assert.NotEqual(t, eas... | explode_data.jsonl/66808 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 143
} | [
2830,
3393,
66537,
30062,
36,
2300,
1155,
353,
8840,
836,
8,
341,
7727,
2300,
17,
15,
16,
24,
1669,
882,
8518,
7,
17,
15,
16,
24,
11,
882,
875,
649,
321,
11,
220,
17,
23,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFileResolve(t *testing.T) {
set := NewHTMLSet("./testData/resolve")
RunJetTestWithSet(t, set, nil, nil, "simple", "", "simple")
RunJetTestWithSet(t, set, nil, nil, "simple.jet", "", "simple.jet")
RunJetTestWithSet(t, set, nil, nil, "extension", "", "extension.jet.html")
RunJetTestWithSet(t, set, nil, nil,... | explode_data.jsonl/22906 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 252
} | [
2830,
3393,
1703,
56808,
1155,
353,
8840,
836,
8,
341,
8196,
1669,
1532,
5835,
1649,
13988,
1944,
1043,
14,
17325,
1138,
85952,
35641,
2271,
2354,
1649,
1155,
11,
738,
11,
2092,
11,
2092,
11,
330,
22944,
497,
7342,
330,
22944,
1138,
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 TestStopperNumTasks(t *testing.T) {
s := stop.NewStopper()
var tasks []chan bool
for i := 0; i < 3; i++ {
c := make(chan bool)
tasks = append(tasks, c)
s.RunAsyncTask(func() {
// Wait for channel to close
<-c
})
tm := s.RunningTasks()
if numTypes, numTasks := len(tm), s.NumTasks(); numTypes !=... | explode_data.jsonl/2425 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 629
} | [
2830,
3393,
10674,
712,
4651,
25449,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
2936,
7121,
10674,
712,
741,
2405,
9079,
3056,
5658,
1807,
198,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
18,
26,
600,
1027,
341,
197,
1444,
1669,
128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_GetUidForWatchEntry(t *testing.T) {
untyped.TestHookSetPartitionDuration(time.Hour)
db, err := (&badgerwrap.MockFactory{}).Open(badger.DefaultOptions(""))
assert.Nil(t, err)
tables := typed.NewTableList(db)
ts, err := ptypes.TimestampProto(someWatchTime)
assert.Nil(t, err)
watchRec := typed.KubeWatch... | explode_data.jsonl/38958 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 462
} | [
2830,
3393,
13614,
33507,
2461,
14247,
5874,
1155,
353,
8840,
836,
8,
341,
20479,
44181,
8787,
31679,
1649,
49978,
12945,
9730,
73550,
340,
20939,
11,
1848,
1669,
15899,
13855,
1389,
10097,
24664,
4153,
6257,
568,
5002,
1883,
329,
1389,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigDefaultFileSettingsDirectory(t *testing.T) {
c1 := Config{}
c1.SetDefaults()
if *c1.FileSettings.Directory != "./data/" {
t.Fatal("FileSettings.Directory should default to './data/'")
}
} | explode_data.jsonl/50668 | {
"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,
2648,
3675,
1703,
6086,
9310,
1155,
353,
8840,
836,
8,
341,
1444,
16,
1669,
5532,
16094,
1444,
16,
4202,
16273,
2822,
743,
353,
66,
16,
8576,
6086,
54107,
961,
5924,
691,
11225,
341,
197,
3244,
26133,
445,
1703,
6086,
5410... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQuerier_Tail_QueryTimeoutConfigFlag(t *testing.T) {
request := logproto.TailRequest{
Query: "{type=\"test\"}",
DelayFor: 0,
Limit: 10,
Start: time.Now(),
}
store := newStoreMock()
store.On("SelectLogs", mock.Anything, mock.Anything).Return(mockStreamIterator(1, 2), nil)
queryClient := n... | explode_data.jsonl/5417 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 753
} | [
2830,
3393,
2183,
261,
1268,
1139,
604,
48042,
7636,
2648,
12135,
1155,
353,
8840,
836,
8,
341,
23555,
1669,
1487,
15110,
836,
604,
1900,
515,
197,
60362,
25,
262,
13868,
1313,
4070,
1944,
2105,
24375,
197,
10957,
6895,
2461,
25,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInsufficientCapacityNodeDaemonDoesNotLaunchPod(t *testing.T) {
for _, strategy := range updateStrategies() {
podSpec := resourcePodSpec("too-much-mem", "75M", "75m")
ds := newDaemonSet("foo")
ds.Spec.UpdateStrategy = *strategy
ds.Spec.Template.Spec = podSpec
manager, podControl, _, err := newTestCon... | explode_data.jsonl/50310 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 371
} | [
2830,
3393,
15474,
26683,
29392,
1955,
89177,
21468,
2623,
32067,
23527,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
8282,
1669,
2088,
2647,
2580,
69388,
368,
341,
197,
3223,
347,
8327,
1669,
5101,
23527,
8327,
445,
36127,
1448,
1387,
1448,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrorResponse(t *testing.T) {
s := `{
"status": 400,
"type": "urn:acme:error:xxx",
"detail": "text"
}`
res := &http.Response{
StatusCode: 400,
Status: "400 Bad Request",
Body: ioutil.NopCloser(strings.NewReader(s)),
Header: http.Header{"X-Foo": {"bar"}},
}
err := responseError(... | explode_data.jsonl/38186 | {
"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,
55901,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1565,
515,
197,
197,
1,
2829,
788,
220,
19,
15,
15,
345,
197,
197,
44470,
788,
330,
399,
25,
580,
2660,
69195,
25,
24048,
756,
197,
197,
1,
14585,
788,
330,
1318,
698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestArray_Iterator(t *testing.T) {
slice := g.Slice{"a", "b", "d", "c"}
array := garray.NewArrayFrom(slice)
gtest.C(t, func(t *gtest.T) {
array.Iterator(func(k int, v interface{}) bool {
t.Assert(v, slice[k])
return true
})
})
gtest.C(t, func(t *gtest.T) {
array.IteratorAsc(func(k int, v interface... | explode_data.jsonl/13917 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 471
} | [
2830,
3393,
1857,
7959,
465,
850,
1155,
353,
8840,
836,
8,
341,
1903,
4754,
1669,
342,
95495,
4913,
64,
497,
330,
65,
497,
330,
67,
497,
330,
66,
16707,
11923,
1669,
342,
1653,
7121,
1857,
3830,
75282,
340,
3174,
1944,
727,
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... | 1 |
func TestAttributes_FilterSpansByNameRegexp(t *testing.T) {
testCases := []testCase{
{
name: "apply_to_span_with_no_attrs",
serviceName: "svcB",
inputAttributes: map[string]pdata.AttributeValue{},
expectedAttributes: map[string]pdata.AttributeValue{
"attribute1": pdata.NewAttributeValu... | explode_data.jsonl/76283 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 900
} | [
2830,
3393,
10516,
68935,
6406,
596,
16898,
3477,
4580,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
66194,
515,
197,
197,
515,
298,
11609,
25,
310,
330,
10280,
2346,
37382,
6615,
6536,
39578,
756,
298,
52934,
675,
25,
257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRedisGet_Run(t *testing.T) {
testImage := container.CurrentStepImage(t)
serviceUrls := redistest.SetupRedis(t)
cases := []container.Test{
{
Name: "no params",
Image: testImage,
Envs: map[string]string{},
Args: []string{},
WantExitCode: step.ExitCodeFailure,
... | explode_data.jsonl/50744 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 956
} | [
2830,
3393,
48137,
1949,
84158,
1155,
353,
8840,
836,
8,
341,
18185,
1906,
1669,
5476,
11517,
8304,
1906,
1155,
340,
52934,
15638,
1669,
2518,
380,
477,
39820,
48137,
1155,
692,
1444,
2264,
1669,
3056,
3586,
8787,
515,
197,
197,
515,
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... | 2 |
func TestX12Encoder_encode(t *testing.T) {
enc := NewX12Encoder()
ctx, _ := NewEncoderContext("^")
ctx.SignalEncoderChange(HighLevelEncoder_X12_ENCODATION)
e := enc.encode(ctx)
if e == nil {
t.Fatalf("encode must be error")
}
ctx, _ = NewEncoderContext("AAA000000")
ctx.SignalEncoderChange(HighLevelEncoder_X... | explode_data.jsonl/49806 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 339
} | [
2830,
3393,
55,
16,
17,
19921,
11224,
1155,
353,
8840,
836,
8,
341,
197,
954,
1669,
1532,
55,
16,
17,
19921,
2822,
20985,
11,
716,
1669,
1532,
19921,
1972,
48654,
1138,
20985,
75669,
19921,
4072,
10896,
1090,
4449,
19921,
6859,
16,
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... | 6 |
func TestCreateOrStopIssueStopwatch(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
user2, err := GetUserByID(2)
assert.NoError(t, err)
user3, err := GetUserByID(3)
assert.NoError(t, err)
issue1, err := GetIssueByID(1)
assert.NoError(t, err)
issue2, err := GetIssueByID(2)
assert.NoError(t, err)
as... | explode_data.jsonl/55033 | {
"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,
4021,
2195,
10674,
42006,
10674,
14321,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
2271,
5988,
12367,
19060,
17,
11,
1848,
1669,
85937,
60572,
7,
17,
340,
6948,
35699,
1155,
11,
1848,
340,
19060,
18,
11,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReceiveTicket_InvalidWinProb(t *testing.T) {
sender, b, v, ts, faceValue, winProb, sig := newRecipientFixtureOrFatal(t)
r := newRecipientOrFatal(t, RandAddress(), b, v, ts, faceValue, winProb)
params := r.TicketParams(sender)
// Test invalid winProb
ticket := newTicket(sender, params, 0)
ticket.WinProb ... | explode_data.jsonl/44754 | {
"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,
14742,
34058,
62,
7928,
16970,
36980,
1155,
353,
8840,
836,
8,
341,
1903,
1659,
11,
293,
11,
348,
11,
10591,
11,
3579,
1130,
11,
3164,
36980,
11,
8366,
1669,
501,
74432,
18930,
2195,
62396,
1155,
340,
7000,
1669,
501,
7443... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTapeFix(t *testing.T) {
//stm: @CHAIN_SYNCER_LOAD_GENESIS_001, @CHAIN_SYNCER_FETCH_TIPSET_001,
//stm: @CHAIN_SYNCER_START_001, @CHAIN_SYNCER_SYNC_001, @BLOCKCHAIN_BEACON_VALIDATE_BLOCK_VALUES_01
//stm: @CHAIN_SYNCER_COLLECT_CHAIN_001, @CHAIN_SYNCER_COLLECT_HEADERS_001, @CHAIN_SYNCER_VALIDATE_TIPSET_001
//s... | explode_data.jsonl/70937 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 422
} | [
2830,
3393,
51,
2027,
25958,
1155,
353,
8840,
836,
8,
341,
197,
322,
24855,
25,
569,
90733,
39189,
640,
24042,
42362,
83366,
62,
15,
15,
16,
11,
569,
90733,
39189,
640,
57925,
1139,
3298,
5884,
62,
15,
15,
16,
345,
197,
322,
24855,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAutoRebalanceOnCaptureOnline(t *testing.T) {
// This test case tests the following scenario:
// 1. Capture-1 and Capture-2 are online.
// 2. Owner dispatches three tables to these two captures.
// 3. While the pending dispatches are in progress, Capture-3 goes online.
// 4. Capture-1 and Capture-2 finish ... | explode_data.jsonl/28512 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1859
} | [
2830,
3393,
13253,
693,
21571,
1925,
27429,
19598,
1155,
353,
8840,
836,
8,
341,
197,
322,
1096,
1273,
1142,
7032,
279,
2701,
15048,
510,
197,
322,
220,
16,
13,
39885,
12,
16,
323,
39885,
12,
17,
525,
2860,
624,
197,
322,
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 TestStoreMount(t *testing.T) {
db := dbm.NewMemDB()
store := NewStore(db)
key1 := types.NewKVStoreKey("store1")
key2 := types.NewKVStoreKey("store2")
dup1 := types.NewKVStoreKey("store1")
require.NotPanics(t, func() { store.MountStoreWithDB(key1, types.StoreTypeIAVL, db) })
require.NotPanics(t, func() { s... | explode_data.jsonl/21880 | {
"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,
6093,
16284,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
2927,
76,
7121,
18816,
3506,
741,
57279,
1669,
1532,
6093,
9791,
692,
23634,
16,
1669,
4494,
7121,
82707,
6093,
1592,
445,
4314,
16,
1138,
23634,
17,
1669,
4494,
7121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSelect_BinaryExpr_NilValues(t *testing.T) {
shardMapper := ShardMapper{
MapShardsFn: func(sources influxql.Sources, _ influxql.TimeRange) query.ShardGroup {
return &ShardGroup{
Fields: map[string]influxql.DataType{
"total": influxql.Float,
"value": influxql.Float,
},
CreateIteratorF... | explode_data.jsonl/39407 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1250
} | [
2830,
3393,
3379,
1668,
3287,
16041,
1604,
321,
6227,
1155,
353,
8840,
836,
8,
341,
36196,
567,
10989,
1669,
95366,
10989,
515,
197,
26873,
2016,
2347,
24911,
25,
2915,
1141,
2360,
52852,
1470,
808,
2360,
11,
716,
52852,
1470,
16299,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClosedTimestampCantServeBasedOnMaxTimestamp(t *testing.T) {
defer leaktest.AfterTest(t)()
if util.RaceEnabled {
// Limiting how long transactions can run does not work
// well with race unless we're extremely lenient, which
// drives up the test duration.
t.Skip("skipping under race")
}
ctx := co... | explode_data.jsonl/65033 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 546
} | [
2830,
3393,
26884,
20812,
34,
517,
60421,
28715,
1925,
5974,
20812,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
743,
4094,
2013,
578,
5462,
341,
197,
197,
322,
28008,
287,
1246,
1293,
14131,
646,
1598,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFormatterObject(test *testing.T) {
object := struct {
Value int
Message string
}{
Value: 2,
Message: "text",
}
formatted, err := formatter.Format("", object)
assert.NoError(test, err)
assert.Equal(test, "{2 text}", formatted)
formatted, err = formatter.Format(" ", object)
assert.NoError... | explode_data.jsonl/39798 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 141
} | [
2830,
3393,
14183,
1190,
8623,
353,
8840,
836,
8,
341,
35798,
1669,
2036,
341,
197,
47399,
256,
526,
198,
197,
46733,
914,
198,
197,
59403,
197,
47399,
25,
256,
220,
17,
345,
197,
46733,
25,
330,
1318,
756,
197,
630,
37410,
12127,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegistration(t *testing.T) {
mockUserRepo := new(mocks.UserRepository)
mockUser := model.User{
FullName: "Mr. Test",
Email: "mrtest@example.com",
Hash: "super_password",
IsActive: 1,
UpdatedAt: time.Now().UTC(),
}
t.Run("success", func(t *testing.T) {
tMockUser := mockUser
tMockU... | explode_data.jsonl/76994 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 484
} | [
2830,
3393,
23365,
1155,
353,
8840,
836,
8,
341,
77333,
1474,
25243,
1669,
501,
1255,
25183,
7344,
4624,
692,
77333,
1474,
1669,
1614,
7344,
515,
197,
197,
36217,
25,
220,
330,
12275,
13,
3393,
756,
197,
197,
4781,
25,
257,
330,
20946... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFullWindowReceive(t *testing.T) {
c := context.New(t, defaultMTU)
defer c.Cleanup()
opt := tcpip.ReceiveBufferSizeOption(10)
c.CreateConnected(789, 30000, &opt)
we, ch := waiter.NewChannelEntry(nil)
c.WQ.EventRegister(&we, waiter.EventIn)
defer c.WQ.EventUnregister(&we)
_, _, err := c.EP.Read(nil)
... | explode_data.jsonl/22287 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 717
} | [
2830,
3393,
9432,
4267,
14742,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2266,
7121,
1155,
11,
1638,
8505,
52,
340,
16867,
272,
727,
60639,
2822,
64838,
1669,
28051,
573,
86363,
52661,
5341,
7,
16,
15,
340,
1444,
7251,
21146,
7,
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... | 6 |
func TestIgnoresNonPodObject(t *testing.T) {
obj := &api.Namespace{}
attrs := admission.NewAttributesRecord(obj, nil, api.Kind("Pod").WithVersion("version"), "myns", "myname", api.Resource("pods").WithVersion("version"), "", admission.Create, false, nil)
err := NewServiceAccount().Admit(attrs)
if err != nil {
t.E... | explode_data.jsonl/61338 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
40,
70,
2152,
416,
8121,
23527,
1190,
1155,
353,
8840,
836,
8,
341,
22671,
1669,
609,
2068,
46011,
16094,
197,
20468,
1669,
25293,
7121,
10516,
6471,
6779,
11,
2092,
11,
6330,
54199,
445,
23527,
1827,
2354,
5637,
445,
4366,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHelmSet(t *testing.T) {
Given(t).
Path("helm").
When().
Create().
AppSet("--helm-set", "foo=bar", "--helm-set", "foo=baz", "--helm-set", "app=$ARGOCD_APP_NAME").
Then().
And(func(app *Application) {
assert.Equal(t, []HelmParameter{{Name: "foo", Value: "baz"}, {Name: "app", Value: "$ARGOCD_APP_N... | explode_data.jsonl/69405 | {
"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,
39,
23162,
1649,
1155,
353,
8840,
836,
8,
341,
9600,
2071,
1155,
4292,
197,
69640,
445,
51899,
38609,
197,
197,
4498,
25829,
197,
75569,
25829,
197,
59557,
1649,
21549,
51899,
24096,
497,
330,
7975,
28,
2257,
497,
14482,
518... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScalarBls12377G1Div(t *testing.T) {
bls12377G1 := BLS12377G1()
nine := bls12377G1.Scalar.New(9)
actual := nine.Div(nine)
require.Equal(t, actual.Cmp(bls12377G1.Scalar.New(1)), 0)
require.Equal(t, bls12377G1.Scalar.New(54).Div(nine).Cmp(bls12377G1.Scalar.New(6)), 0)
} | explode_data.jsonl/15758 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
20639,
33,
4730,
16,
17,
18,
22,
22,
38,
16,
12509,
1155,
353,
8840,
836,
8,
341,
96421,
82,
16,
17,
18,
22,
22,
38,
16,
1669,
425,
7268,
16,
17,
18,
22,
22,
38,
16,
741,
9038,
482,
1669,
1501,
82,
16,
17,
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... | 1 |
func TestGetEra(t *testing.T) {
//104 26
//4137894- 4138406
//88 2
//4138853- 4138917
era := GetEra(4138853)
fmt.Printf("%+v", era)
} | explode_data.jsonl/43218 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 71
} | [
2830,
3393,
1949,
36,
956,
1155,
353,
8840,
836,
8,
341,
197,
322,
16,
15,
19,
220,
17,
21,
198,
197,
322,
19,
16,
18,
22,
23,
24,
19,
12,
220,
19,
16,
18,
23,
19,
15,
21,
271,
197,
322,
23,
23,
220,
17,
198,
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,
1... | 1 |
func Test_Static_Folder_Forbidden(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
p, _ := ports.PopRand()
s := g.Server(p)
path := fmt.Sprintf(`%s/ghttp/static/test/%d`, gfile.TempDir(), p)
defer gfile.Remove(path)
gfile.PutContents(path+"/test.html", "test")
s.SetServerRoot(path)
s.SetPort(p)
s.Start()
... | explode_data.jsonl/40520 | {
"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,
27049,
1400,
2018,
84368,
22108,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
3223,
11,
716,
1669,
20325,
47424,
56124,
741,
197,
1903,
1669,
342,
22997,
1295,
340,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTidbClusterControllerEnqueueTidbCluster(t *testing.T) {
g := NewGomegaWithT(t)
tc := newTidbCluster()
tcc, _, _ := newFakeTidbClusterController()
tcc.enqueueTidbCluster(tc)
g.Expect(tcc.queue.Len()).To(Equal(1))
} | explode_data.jsonl/68172 | {
"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,
51,
307,
65,
28678,
2051,
1702,
4584,
51,
307,
65,
28678,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
340,
78255,
1669,
501,
51,
307,
65,
28678,
741,
3244,
638,
11,
8358,
716,
1669,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGatewayNameFromInstanceName(t *testing.T) {
actual := GatewayNameFromInstanceName("inst1")
expected := "inst1--gateway"
if diff := cmp.Diff(expected, actual); diff != "" {
t.Errorf("GatewayNameFromInstanceName (-expected, +actual)\n%v", diff)
}
} | explode_data.jsonl/54876 | {
"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,
40709,
675,
3830,
2523,
675,
1155,
353,
8840,
836,
8,
341,
88814,
1669,
39378,
675,
3830,
2523,
675,
445,
6308,
16,
1138,
42400,
1669,
330,
6308,
16,
313,
46473,
698,
743,
3638,
1669,
26089,
98063,
15253,
11,
5042,
1215,
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 TestGetUsersWithoutTeam(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer th.TearDown()
Client := th.Client
SystemAdminClient := th.SystemAdminClient
if _, resp := Client.GetUsersWithoutTeam(0, 100, ""); resp.Error == nil {
t.Fatal("should prevent non-admin user from getting users without a... | explode_data.jsonl/21538 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 517
} | [
2830,
3393,
1949,
7137,
26040,
14597,
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,
198,
5816,
7210,
2959,
1669,
270,
16620,
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... | 7 |
func TestSetLoadedConfigPath(t *testing.T) {
conf, cleanup := testutil.InitConfig(t)
defer cleanup(t)
testPath := "/tmp/loadedconfig"
assert.NotEqual(t, testPath, conf.LoadedConfigPath())
conf.SetLoadedConfigPath(testPath)
assert.Equal(t, testPath, conf.LoadedConfigPath())
} | explode_data.jsonl/57899 | {
"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,
1649,
22369,
2648,
1820,
1155,
353,
8840,
836,
8,
341,
67850,
11,
21290,
1669,
1273,
1314,
26849,
2648,
1155,
340,
16867,
21290,
1155,
692,
18185,
1820,
1669,
3521,
5173,
14,
15589,
1676,
1837,
6948,
15000,
2993,
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,
1... | 1 |
func TestApprovedBadPool(t *testing.T) {
em, cancel := newTestEventManager(t)
defer cancel()
mdi := em.database.(*databasemocks.Plugin)
mti := &tokenmocks.Plugin{}
approval := newApproval()
mdi.On("GetTokenPoolByProtocolID", em.ctx, "erc1155", "F1").Return(nil, nil)
err := em.TokensApproved(mti, approval)
as... | explode_data.jsonl/15921 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 164
} | [
2830,
3393,
59651,
17082,
10551,
1155,
353,
8840,
836,
8,
341,
66204,
11,
9121,
1669,
501,
2271,
83694,
1155,
340,
16867,
9121,
2822,
2109,
8579,
1669,
976,
15062,
41399,
67,
2096,
300,
336,
25183,
64378,
340,
2109,
10251,
1669,
609,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetOSLoginEnabled(t *testing.T) {
var tests = []struct {
md string
enable, twofactor bool
}{
{
md: `{"instance": {"attributes": {"enable-oslogin": "true", "enable-oslogin-2fa": "true"}}}`,
enable: true,
twofactor: true,
},
{
md: `{"project": {"attributes"... | explode_data.jsonl/7391 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 783
} | [
2830,
3393,
1949,
3126,
6231,
5462,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
84374,
394,
914,
198,
197,
197,
12552,
11,
4384,
1055,
5621,
1807,
198,
197,
59403,
197,
197,
515,
298,
84374,
25,
286,
1565,
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 TestAfterFunc(t *testing.T) {
assert.NotPanics(t, func() {
out := make(chan bool, 1)
mj, _ := AfterFunc(time.Millisecond*10, func() {
out <- true
}, nil)
v := <-out
assert.True(t, v)
mj.Cancel()
})
} | explode_data.jsonl/56059 | {
"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,
6025,
9626,
1155,
353,
8840,
836,
8,
341,
6948,
15000,
35693,
1211,
1155,
11,
2915,
368,
341,
197,
13967,
1669,
1281,
35190,
1807,
11,
220,
16,
340,
197,
2109,
73,
11,
716,
1669,
4636,
9626,
9730,
71482,
9,
16,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIssue53(t *testing.T) {
const data = "PRI * HTTP/2.0\r\n\r\nSM" +
"\r\n\r\n\x00\x00\x00\x01\ainfinfin\ad"
s := &http.Server{
ErrorLog: log.New(io.MultiWriter(stderrv(), twriter{t: t}), "", log.LstdFlags),
Handler: http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
w.Write([]byte("hell... | explode_data.jsonl/71692 | {
"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,
42006,
20,
18,
1155,
353,
8840,
836,
8,
341,
4777,
821,
284,
330,
57342,
353,
10130,
14,
17,
13,
15,
12016,
1699,
12016,
1699,
9501,
1,
3610,
197,
197,
11934,
81,
1699,
12016,
1699,
3462,
15,
15,
3462,
15,
15,
3462,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_SingleCommandWithLongFlagHelp(t *testing.T) {
out, err := test.ExecuteCommand(buildTestCmd(), "completion", "--help")
if err != nil {
assert.Error(t, err)
}
assert.NotContains(t, out, `Error:`)
assert.Contains(t, out, `Usage:`)
assert.NotContains(t, out, `Available Commands:`)
assert.Contains(t, ou... | explode_data.jsonl/59259 | {
"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,
1098,
2173,
4062,
2354,
6583,
12135,
12689,
1155,
353,
8840,
836,
8,
341,
13967,
11,
1848,
1669,
1273,
13827,
4062,
43333,
2271,
15613,
1507,
330,
43312,
497,
14482,
8653,
1138,
743,
1848,
961,
2092,
341,
197,
6948,
6141,
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 TestClusterServiceBrokerClient(t *testing.T) {
const name = "test-broker"
client, _, shutdownServer := getFreshApiserverAndClient(t, func() runtime.Object {
return &servicecatalog.ClusterServiceBroker{}
})
defer shutdownServer()
if err := testClusterServiceBrokerClient(client, name); err != nil {
t.Fatal(... | explode_data.jsonl/51879 | {
"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,
28678,
1860,
65545,
2959,
1155,
353,
8840,
836,
8,
341,
4777,
829,
284,
330,
1944,
1455,
45985,
698,
25291,
11,
8358,
23766,
5475,
1669,
633,
55653,
91121,
2836,
3036,
2959,
1155,
11,
2915,
368,
15592,
8348,
341,
197,
853,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestABCIRecorder(t *testing.T) {
assert, require := assert.New(t), require.New(t)
// This mock returns errors on everything but Query
m := mock.ABCIMock{
Info: mock.Call{Response: abci.ResponseInfo{
Data: "data",
Version: "v0.9.9",
}},
Query: mock.Call{Error: errors.New("query")},
Br... | explode_data.jsonl/19429 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 968
} | [
2830,
3393,
1867,
11237,
47023,
1155,
353,
8840,
836,
8,
341,
6948,
11,
1373,
1669,
2060,
7121,
1155,
701,
1373,
7121,
1155,
692,
197,
322,
1096,
7860,
4675,
5975,
389,
4297,
714,
11361,
198,
2109,
1669,
7860,
875,
4897,
1791,
1176,
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 TestOne(t *testing.T) {
var user User
qs := dORM.QueryTable("user")
err := qs.One(&user)
throwFail(t, err)
user = User{}
err = qs.OrderBy("Id").Limit(1).One(&user)
throwFailNow(t, err)
throwFail(t, AssertIs(user.UserName, "slene"))
throwFail(t, AssertNot(err, ErrMultiRows))
user = User{}
err = qs.Orde... | explode_data.jsonl/18135 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 240
} | [
2830,
3393,
3966,
1155,
353,
8840,
836,
8,
341,
2405,
1196,
2657,
198,
18534,
82,
1669,
294,
4365,
15685,
2556,
445,
872,
1138,
9859,
1669,
32421,
37067,
2099,
872,
340,
9581,
19524,
1155,
11,
1848,
692,
19060,
284,
2657,
16094,
9859,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEventRequestToUrl(t *testing.T) {
externalUrl := "http://localhost:8000"
tests := map[string]struct {
er *analytics.EventRequest
want string
}{
"one": {
er: &analytics.EventRequest{
Type: analytics.Imp,
BidID: "bidid",
AccountID: "accountId",
Bidder: "bidder",
Time... | explode_data.jsonl/147 | {
"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,
1556,
1900,
1249,
2864,
1155,
353,
8840,
836,
8,
341,
197,
20921,
2864,
1669,
330,
1254,
1110,
8301,
25,
23,
15,
15,
15,
698,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
261,
256,
353,
77652,
6904,
1900,
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... | 1 |
func TestUpdateDCAnnotations(t *testing.T) {
tests := []struct {
name string
dcName string
annotations map[string]string
existingDc appsv1.DeploymentConfig
wantErr bool
}{
{
name: "existing dc",
dcName: "nodejs",
annotations: map[string]string{
"app.kubernetes.io/url": ... | explode_data.jsonl/65148 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1392
} | [
2830,
3393,
4289,
5626,
21418,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
87249,
675,
414,
914,
198,
197,
197,
39626,
2415,
14032,
30953,
198,
197,
8122,
11083,
35,
66,
220,
906,
3492,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVerificationMethods(t *testing.T) {
assert := tdd.New(t)
// New DID with master key
id, err := NewIdentifierWithMode("bryk", "sample-network", ModeUUID)
assert.Nil(err, "new identifier")
assert.Nil(id.AddNewVerificationMethod("master", KeyTypeEd), "add key")
// Add verification methods
key := id.GetRe... | explode_data.jsonl/37747 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 502
} | [
2830,
3393,
62339,
17856,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
259,
631,
7121,
1155,
692,
197,
322,
1532,
59119,
448,
7341,
1376,
198,
15710,
11,
1848,
1669,
1532,
8714,
2354,
3636,
445,
65,
884,
74,
497,
330,
13611,
56732,
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 TestIssue_8(t *testing.T) {
notify := testNotify{}
event.On("*", ¬ify)
err, _ := event.Fire("test_notify", event.M{})
assert.Nil(t, err)
assert.True(t, isRun)
event.On("test_notify", ¬ify)
err, _ = event.Fire("test_notify", event.M{})
assert.Nil(t, err)
assert.True(t, isRun)
} | explode_data.jsonl/35464 | {
"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,
42006,
62,
23,
1155,
353,
8840,
836,
8,
341,
197,
21948,
1669,
1273,
28962,
31483,
28302,
8071,
29592,
497,
609,
21948,
340,
9859,
11,
716,
1669,
1538,
71305,
445,
1944,
36654,
497,
1538,
1321,
37790,
6948,
59678,
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... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.