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 TestNormalize(t *testing.T) {
var (
doc Doc
tests = []struct {
name, apiResponse string
expected *blockatlas.Tx
}{
{"transfer", transferSrc, &transferDst},
{"token transfer", tokenTransferSrc, &tokenTransferDst},
{"contract call", contractCallSrc, &contractCallDst},
{"failed tra... | explode_data.jsonl/5196 | {
"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,
87824,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
59536,
256,
21709,
198,
197,
78216,
284,
3056,
1235,
341,
298,
11609,
11,
6330,
2582,
914,
198,
298,
42400,
688,
353,
4574,
266,
14493,
81362,
198,
197,
197,
59403,
298... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestClosedWakeUp(t *testing.T) {
events := &testClosedWakeUpServer{
tester: t,
BuiltinEventEngine: &BuiltinEventEngine{}, network: "tcp", addr: ":8888", protoAddr: "tcp://:8888",
clientClosed: make(chan struct{}),
serverClosed: make(chan struct{}),
wakeup: make(chan struct{}),
}
err... | explode_data.jsonl/52052 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
26884,
90748,
2324,
1155,
353,
8840,
836,
8,
341,
90873,
1669,
609,
1944,
26884,
90748,
2324,
5475,
515,
197,
18185,
261,
25,
1797,
259,
345,
197,
12791,
25628,
1556,
4571,
25,
609,
33,
25628,
1556,
4571,
22655,
3922,
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 TestFailureBadBinaryTags(t *testing.T) {
badTagESSpan, err := loadESSpanFixture(1)
require.NoError(t, err)
badTagESSpan.Tags = []KeyValue{
{
Key: "zzzz",
Value: "zzzz",
Type: "binary",
},
}
failingSpanTransformAnyMsg(t, &badTagESSpan)
} | explode_data.jsonl/5145 | {
"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,
21338,
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,
720... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLinuxConnReceiveInvalidSockaddr(t *testing.T) {
c, s := testLinuxConn(t, nil)
s.recvmsg.from = &unix.SockaddrInet4{}
_, got := c.Receive()
if want := errInvalidSockaddr; want != got {
t.Fatalf("unexpected error:\n- want: %v\n- got: %v", want, got)
}
} | explode_data.jsonl/33487 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
46324,
9701,
14742,
7928,
79812,
6214,
1155,
353,
8840,
836,
8,
341,
1444,
11,
274,
1669,
1273,
46324,
9701,
1155,
11,
2092,
692,
1903,
40433,
3236,
6387,
284,
609,
56646,
808,
1176,
6214,
641,
295,
19,
31483,
197,
6878,
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 TestMakeIDsFromAPIAssigneesToAdd(t *testing.T) {
IDs, err := MakeIDsFromAPIAssigneesToAdd("", []string{""})
assert.NoError(t, err)
assert.Equal(t, []int64{}, IDs)
IDs, err = MakeIDsFromAPIAssigneesToAdd("", []string{"none_existing_user"})
assert.Error(t, err)
IDs, err = MakeIDsFromAPIAssigneesToAdd("user1"... | explode_data.jsonl/42483 | {
"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,
8078,
30466,
3830,
7082,
28933,
5516,
52113,
1155,
353,
8840,
836,
8,
341,
29580,
82,
11,
1848,
1669,
7405,
30466,
3830,
7082,
28933,
5516,
52113,
19814,
3056,
917,
90,
3014,
3518,
6948,
35699,
1155,
11,
1848,
340,
6948,
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 TestPerCallLimit(t *testing.T) {
limiters := NewFakeLimiters()
m := PerCallLimit(1)
// Exceeds burst size.
err := m.RateLimit(context.Background(), 2)
spiretest.RequireGRPCStatus(t, err, codes.ResourceExhausted, "rate (2) exceeds burst size (1)")
// Within burst size.
require.NoError(t, m.RateLimit(conte... | explode_data.jsonl/5206 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
3889,
7220,
16527,
1155,
353,
8840,
836,
8,
341,
8810,
67645,
1669,
1532,
52317,
16527,
388,
2822,
2109,
1669,
3616,
7220,
16527,
7,
16,
692,
197,
322,
1374,
4635,
82,
20524,
1379,
624,
9859,
1669,
296,
2013,
349,
16527,
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 TestTimeoutHandlerRaceHeader(t *testing.T) {
defer afterTest(t)
delay204 := HandlerFunc(func(w ResponseWriter, r *Request) {
w.WriteHeader(204)
})
ts := httptest.NewServer(TimeoutHandler(delay204, time.Nanosecond, ""))
defer ts.Close()
var wg sync.WaitGroup
gate := make(chan bool, 50)
n := 500
if tes... | explode_data.jsonl/22424 | {
"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,
7636,
3050,
55991,
4047,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
692,
55174,
17,
15,
19,
1669,
19954,
9626,
18552,
3622,
5949,
6492,
11,
435,
353,
1900,
8,
341,
197,
6692,
69794,
7,
17,
15,
19,
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 TestCountEntries(t *testing.T) {
for _, tt := range []struct {
name string
count int32
resp *entryv1.CountEntriesResponse
code codes.Code
dsError error
err string
expectLogs []spiretest.LogEntry
}{
{
name: "0 entries",
count: 0,
resp: &entryv1.CountEntr... | explode_data.jsonl/65672 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1018
} | [
2830,
3393,
2507,
24533,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
18032,
414,
526,
18,
17,
198,
197,
34653,
981,
353,
4085,
85,
16,
6134,
24533,
2582,
198,
197,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRootMappingFsDirnames(t *testing.T) {
c := qt.New(t)
fs := NewBaseFileDecorator(afero.NewMemMapFs())
testfile := "myfile.txt"
c.Assert(fs.Mkdir("f1t", 0755), qt.IsNil)
c.Assert(fs.Mkdir("f2t", 0755), qt.IsNil)
c.Assert(fs.Mkdir("f3t", 0755), qt.IsNil)
c.Assert(afero.WriteFile(fs, filepath.Join("f2t", t... | explode_data.jsonl/13725 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 457
} | [
2830,
3393,
8439,
6807,
48300,
6184,
11400,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
38949,
7121,
1155,
340,
53584,
1669,
1532,
3978,
1703,
47951,
2877,
802,
78,
7121,
18816,
2227,
48300,
12367,
18185,
1192,
1669,
330,
94921,
3909,
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... | 1 |
func TestFromLoadersWithErrors(t *testing.T) {
c := FromLoaders([]BackingLoader{BackingLoaderFunc(func() (Reader, error) {
return nil, errors.New("nope")
})})
assert.Equal(t, 0, len(c.readers))
} | explode_data.jsonl/72635 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
3830,
5879,
388,
2354,
13877,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
5542,
5879,
388,
10556,
40332,
9181,
90,
40332,
9181,
9626,
18552,
368,
320,
5062,
11,
1465,
8,
341,
197,
853,
2092,
11,
5975,
7121,
445,
2152,
375,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidate_NoCircularFragmentSpreads_NoSpreadingItselfDeeply(t *testing.T) {
testutil.ExpectFailsRule(t, graphql.NoFragmentCyclesRule, `
fragment fragA on Dog { ...fragB }
fragment fragB on Dog { ...fragC }
fragment fragC on Dog { ...fragO }
fragment fragX on Dog { ...fragY }
fragm... | explode_data.jsonl/30375 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 364
} | [
2830,
3393,
17926,
36989,
82440,
9488,
6406,
30358,
36989,
6406,
6154,
2132,
721,
33464,
398,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
81893,
37,
6209,
11337,
1155,
11,
48865,
16766,
9488,
34,
15805,
11337,
11,
22074,
414,
12289,
8343,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStateLockNoPOL(t *testing.T) {
cs1, vss := randState(2)
vs2 := vss[1]
height, round := cs1.Height, cs1.Round
partSize := types.BlockPartSizeBytes
timeoutProposeCh := subscribe(cs1.eventBus, types.EventQueryTimeoutPropose)
timeoutWaitCh := subscribe(cs1.eventBus, types.EventQueryTimeoutWait)
voteCh := ... | explode_data.jsonl/81648 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2189
} | [
2830,
3393,
1397,
11989,
2753,
49303,
1155,
353,
8840,
836,
8,
341,
71899,
16,
11,
348,
778,
1669,
10382,
1397,
7,
17,
340,
5195,
82,
17,
1669,
348,
778,
58,
16,
921,
30500,
11,
4778,
1669,
10532,
16,
17743,
11,
10532,
16,
37646,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateConfig(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer th.TearDown()
Client := th.Client
cfg, resp := th.SystemAdminClient.GetConfig()
CheckNoError(t, resp)
_, resp = Client.UpdateConfig(cfg)
CheckForbiddenStatus(t, resp)
SiteName := th.App.Config().TeamSettings.SiteName
cf... | explode_data.jsonl/10679 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 607
} | [
2830,
3393,
4289,
2648,
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,
50286,
11,
9039,
1669,
270,
16620,
7210,
2959,
2234... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRstOnCloseWithUnreadDataFinConvertRst(t *testing.T) {
c := context.New(t, defaultMTU)
defer c.Cleanup()
c.CreateConnected(context.TestInitialSequenceNumber, 30000, -1 /* epRcvBuf */)
we, ch := waiter.NewChannelEntry(nil)
c.WQ.EventRegister(&we, waiter.ReadableEvents)
defer c.WQ.EventUnregister(&we)
e... | explode_data.jsonl/75951 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1073
} | [
2830,
3393,
49,
267,
1925,
7925,
2354,
1806,
878,
1043,
9134,
12012,
49,
267,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2266,
7121,
1155,
11,
1638,
8505,
52,
340,
16867,
272,
727,
60639,
2822,
1444,
7251,
21146,
5378,
8787,
6341,
1407... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRule(t *testing.T) {
if rule, err := Default.Rule(0, 284, "Proxy-Host"); err != nil {
t.Fatal(err)
} else if !rule.Required {
t.Errorf("Unexpected rule %#v", rule)
}
} | explode_data.jsonl/9076 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
11337,
1155,
353,
8840,
836,
8,
341,
743,
5912,
11,
1848,
1669,
7899,
63961,
7,
15,
11,
220,
17,
23,
19,
11,
330,
16219,
12,
9296,
5038,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
92,
770,
421,
753,
12937,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetUserNameContain(t *testing.T) {
var users []User
filter.
Contains("Farcha", "name", "AND").
ToSql().
Find(&users)
assert.Equal(t, 2, len(users))
filter.Clear()
} | explode_data.jsonl/80102 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
1949,
18856,
46522,
1155,
353,
8840,
836,
8,
341,
2405,
3847,
3056,
1474,
198,
50108,
624,
197,
197,
23805,
445,
37,
1113,
64,
497,
330,
606,
497,
330,
3976,
38609,
197,
197,
1249,
8269,
25829,
197,
197,
9885,
2099,
4218,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEmoji(t *testing.T) {
const input = `{"utf8":"Example emoji, KO: \ud83d\udd13, \ud83c\udfc3 ` +
`OK: \u2764\ufe0f "}`
value := Get(input, "utf8")
var s string
json.Unmarshal([]byte(value.Raw), &s)
if value.String() != s {
t.Fatalf("expected '%v', got '%v'", s, value.String())
}
} | explode_data.jsonl/43413 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
92731,
1155,
353,
8840,
836,
8,
341,
4777,
1946,
284,
1565,
4913,
4762,
23,
3252,
13314,
42365,
11,
37512,
25,
1124,
661,
23,
18,
67,
3770,
631,
16,
18,
11,
1124,
661,
23,
18,
66,
59,
661,
8316,
18,
1565,
3610,
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... | 2 |
func TestStrArray_PushAndPop(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
expect := []string{"0", "1", "2", "3"}
array := garray.NewStrArrayFrom(expect)
t.Assert(array.Slice(), expect)
v, ok := array.PopLeft()
t.Assert(v, "0")
t.Assert(ok, true)
v, ok = array.PopRight()
t.Assert(v, "3")
t.Assert(o... | explode_data.jsonl/53084 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 340
} | [
2830,
3393,
2580,
1857,
1088,
1116,
3036,
11598,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
24952,
1669,
3056,
917,
4913,
15,
497,
330,
16,
497,
330,
17,
497,
330,
18,
16707,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConn_DisconnectNotify_EOF(t *testing.T) {
c := jsonrpc2.NewConn(context.Background(), jsonrpc2.NewBufferedStream(&readWriteCloser{eof, eof}, jsonrpc2.VarintObjectCodec{}), nil)
select {
case <-c.DisconnectNotify():
case <-time.After(200 * time.Millisecond):
t.Fatal("no disconnect notification")
}
} | explode_data.jsonl/50184 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
9701,
45525,
6459,
28962,
89287,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2951,
29414,
17,
7121,
9701,
5378,
19047,
1507,
2951,
29414,
17,
7121,
4095,
291,
3027,
2099,
878,
7985,
51236,
799,
90,
77594,
11,
76760,
2137,
2951... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseFloat64(t *testing.T) {
if GOLANG_NUMBER_PARSING {
t.Skip()
}
for i := 0; i < len(atoftests); i++ {
test := &atoftests[i]
found_minus := false
if test.in[0] == '-' {
found_minus = true
}
succes, is_double, d, _ := parse_number_simd([]byte(fmt.Sprintf(`%s:`, test.in)), found_minus)
i... | explode_data.jsonl/74555 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 359
} | [
2830,
3393,
14463,
5442,
21,
19,
1155,
353,
8840,
836,
8,
1476,
743,
479,
1930,
5218,
19364,
1088,
17048,
1718,
341,
197,
3244,
57776,
741,
197,
630,
2023,
600,
1669,
220,
15,
26,
600,
366,
2422,
7,
4330,
723,
17966,
1215,
600,
1027... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetPortfolioByExchange(t *testing.T) {
newbase := Base{}
newbase.AddExchangeAddress("ANX", "LTC", 0.07)
newbase.AddExchangeAddress("Bitfinex", "LTC", 0.05)
newbase.AddAddress("someaddress", "LTC", PortfolioAddressPersonal, 0.03)
portfolio := GetPortfolio()
portfolio.SeedPortfolio(newbase)
value := portf... | explode_data.jsonl/33743 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 316
} | [
2830,
3393,
1949,
66675,
1359,
31564,
1155,
353,
8840,
836,
8,
341,
8638,
3152,
1669,
5351,
16094,
8638,
3152,
1904,
31564,
4286,
445,
1093,
55,
497,
330,
43,
7749,
497,
220,
15,
13,
15,
22,
340,
8638,
3152,
1904,
31564,
4286,
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 TestShouldAddResponseFilters(t *testing.T) {
configs, err := gzipParse(caddy.NewTestController("http", `gzip { min_length 654 }`))
if err != nil {
t.Errorf("Test expected no error but found: %v", err)
}
filters := 0
for _, config := range configs {
for _, filter := range config.ResponseFilters {
swit... | explode_data.jsonl/69623 | {
"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,
14996,
2212,
2582,
28351,
1155,
353,
8840,
836,
8,
341,
25873,
82,
11,
1848,
1669,
57795,
14463,
1337,
22478,
7121,
2271,
2051,
445,
1254,
497,
1565,
70996,
314,
1308,
5118,
220,
21,
20,
19,
335,
63,
4390,
743,
1848,
961,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIllegalSubstrings(t *testing.T) {
cases := []struct {
errorcase.Error
Name string
BucketName string
}{
{
Name: "Empty name is OK",
BucketName: "",
},
{
Name: "Standard name is OK",
BucketName: "foo",
},
{
Name: "Prefix 'goog' returns error",
BucketNam... | explode_data.jsonl/71159 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 242
} | [
2830,
3393,
33713,
3136,
18594,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
18290,
5638,
6141,
198,
197,
21297,
981,
914,
198,
197,
12791,
11152,
675,
914,
198,
197,
59403,
197,
197,
515,
298,
21297,
25,
981,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEcPointAddNeg(t *testing.T) {
curve := btcec.S256()
num := big.NewInt(-1)
p1, _ := NewScalarBaseMult(curve, num)
num.Abs(num)
p2, _ := NewScalarBaseMult(curve, num)
p3, err := p1.Add(p2)
if err != nil {
t.Errorf("EcPoint.Add failed: %v", err)
}
zero := make([]byte, 64)
if !bytes.Equal(zero, p3.... | explode_data.jsonl/75666 | {
"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,
50730,
2609,
2212,
47800,
1155,
353,
8840,
836,
8,
341,
33209,
586,
1669,
19592,
68955,
808,
17,
20,
21,
741,
22431,
1669,
2409,
7121,
1072,
4080,
16,
692,
3223,
16,
11,
716,
1669,
1532,
20639,
3978,
40404,
17591,
586,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestVerifyStructure(t *testing.T) {
key, err := GeneratePrivateKey(1024)
assert.Nil(t, err)
selfSigned, err := GetSelfSignedCertificate(1, 0, "", "", "", "test", key)
assert.Nil(t, err)
cert, err := PEMToCertificate(selfSigned)
assert.Nil(t, err)
s := TestStructure{
FieldA: 5,
FieldB: []byte{0x01, 0x0... | explode_data.jsonl/3522 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
32627,
22952,
1155,
353,
8840,
836,
8,
341,
23634,
11,
1848,
1669,
19813,
75981,
7,
16,
15,
17,
19,
340,
6948,
59678,
1155,
11,
1848,
692,
5200,
49312,
11,
1848,
1669,
2126,
12092,
49312,
33202,
7,
16,
11,
220,
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 TestIsPrecertificate(t *testing.T) {
var tests = []struct {
desc string
cert *x509.Certificate
wantPrecert bool
wantErr bool
}{
{
desc: "valid-precert",
cert: pemToCert(t, testonly.PrecertPEMValid),
wantPrecert: true,
},
{
desc: "valid-cert",
ce... | explode_data.jsonl/13638 | {
"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,
3872,
68833,
20962,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
41653,
286,
914,
198,
197,
1444,
529,
286,
353,
87,
20,
15,
24,
727,
20962,
198,
197,
50780,
68833,
529,
1807,
198,
197,
50780,
774... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsInt(t *testing.T) {
var v *Value
v = &Value{data: int(1)}
assert.True(t, v.IsInt())
v = &Value{data: []int{int(1)}}
assert.True(t, v.IsIntSlice())
} | explode_data.jsonl/23418 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
3872,
1072,
1155,
353,
8840,
836,
8,
1476,
2405,
348,
353,
1130,
271,
5195,
284,
609,
1130,
90,
691,
25,
526,
7,
16,
10569,
6948,
32443,
1155,
11,
348,
4506,
1072,
12367,
5195,
284,
609,
1130,
90,
691,
25,
3056,
396,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestGain(t *testing.T) {
signal, err := newInput("TestGain", 1, 16)
if err != nil {
t.Fatalf("error setting up test; %s", err)
}
for _, tc := range []struct {
desc string
ok bool
rfErr error // MockReadFile error.
spiValue int // Current SPI value.
gain uint
}{
// Supported valu... | explode_data.jsonl/34842 | {
"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,
58611,
1155,
353,
8840,
836,
8,
341,
81319,
11,
1848,
1669,
501,
2505,
445,
2271,
58611,
497,
220,
16,
11,
220,
16,
21,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
841,
6243,
705,
1273,
26,
1018,
82,
497,
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... | 7 |
func TestSubscribeGettingMatches(t *testing.T) {
cache := newSyncMapCache(t)
defer closeCache(t, cache)
// create a subscription
s, err := cache.NewSubscription("ITB-1101")
if err != nil {
t.Fatalf("failed to create subscription: %s", err)
}
defer s.Stop()
// set something on the cache that matches our pref... | explode_data.jsonl/35588 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 396
} | [
2830,
3393,
28573,
28655,
42470,
1155,
353,
8840,
836,
8,
341,
52680,
1669,
501,
12154,
2227,
8233,
1155,
340,
16867,
3265,
8233,
1155,
11,
6500,
692,
197,
322,
1855,
264,
15142,
198,
1903,
11,
1848,
1669,
6500,
7121,
33402,
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... | 7 |
func TestHealthCheck(t *testing.T) {
t.Parallel()
pint64 := func(x int64) *int64 { return &x }
pstring := func(x string) *string { return &x }
for _, tc := range []struct {
desc string
beConfig *backendconfig.BackendConfig
want *backendconfig.HealthCheckConfig
}{
{
desc: "override healthch... | explode_data.jsonl/60926 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1997
} | [
2830,
3393,
14542,
3973,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3223,
396,
21,
19,
1669,
2915,
2075,
526,
21,
19,
8,
353,
396,
21,
19,
314,
470,
609,
87,
456,
3223,
917,
1669,
2915,
2075,
914,
8,
353,
917,
314,
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 TestPreAuthorizeHappyPath(t *testing.T) {
runPreAuthorizeHandler(
t, nil, "/authorize",
regexp.MustCompile(`/authorize\z`),
&api.Response{},
200, 201)
} | explode_data.jsonl/2400 | {
"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,
4703,
37483,
32847,
1820,
1155,
353,
8840,
836,
8,
341,
56742,
4703,
37483,
3050,
1006,
197,
3244,
11,
2092,
11,
3521,
52022,
756,
197,
37013,
4580,
98626,
31813,
52022,
59,
89,
89746,
197,
197,
5,
2068,
12574,
38837,
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 |
func TestAdaptPipelineForCompatibility(t *testing.T) {
cases := []struct {
name string
esVersion *common.Version
content map[string]interface{}
expected map[string]interface{}
isErrExpected bool
}{
{
name: "ES < 6.7.0",
esVersion: common.MustNewVersion("6.6.0"),
conte... | explode_data.jsonl/61777 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1330
} | [
2830,
3393,
2589,
2689,
34656,
2461,
85880,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
78966,
5637,
257,
353,
5464,
35842,
198,
197,
27751,
981,
2415,
14032,
31344,
16094,
197,
42400... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoggerFromContext(t *testing.T) {
expected := NopLogger()
ctx := WithLoggerContext(context.Background(), expected)
actual := From(ctx)
assert.True(t, actual == expected, "unexpected logger instance from context")
} | explode_data.jsonl/66893 | {
"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,
7395,
3830,
1972,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
451,
453,
7395,
741,
20985,
1669,
3085,
7395,
1972,
5378,
19047,
1507,
3601,
340,
88814,
1669,
5542,
7502,
340,
6948,
32443,
1155,
11,
5042,
621,
3601,
11,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestBuildSuggestions(t *testing.T) {
tests := []struct {
in *reviewdog.Comment
want string
}{
{
in: &reviewdog.Comment{
ToolName: "tool-name",
Result: &filter.FilteredDiagnostic{
Diagnostic: &rdf.Diagnostic{
Message: "no suggestion",
},
},
},
want: "",
},
{
in:... | explode_data.jsonl/1734 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 788
} | [
2830,
3393,
11066,
98846,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
17430,
256,
353,
19417,
18457,
56730,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
515,
298,
17430,
25,
609,
19417,
18457,
56730,
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 TestPVCControlUpdatePVCFailed(t *testing.T) {
g := NewGomegaWithT(t)
tc := newTidbCluster()
pvc := newPVC(tc)
fakeClient, pvcLister, _, recorder := newFakeClientAndRecorder()
control := NewRealPVCControl(fakeClient, recorder, pvcLister)
fakeClient.AddReactor("update", "persistentvolumeclaims", func(action co... | explode_data.jsonl/66724 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
3393,
47,
11287,
3273,
4289,
47,
11287,
9408,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
340,
78255,
1669,
501,
51,
307,
65,
28678,
741,
3223,
7362,
1669,
501,
47,
11287,
44415,
340,
1166,
726,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSlashWithRedelegation(t *testing.T) {
app, ctx, addrDels, addrVals := bootstrapSlashTest(t, 10)
consAddr := sdk.ConsAddress(PKs[0].Address())
fraction := sdk.NewDecWithPrec(5, 1)
bondDenom := app.StakingKeeper.BondDenom(ctx)
// set a redelegation
rdTokens := sdk.TokensFromConsensusPower(6)
rd := types.... | explode_data.jsonl/25504 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2547
} | [
2830,
3393,
88004,
2354,
6033,
68,
87566,
1155,
353,
8840,
836,
8,
341,
28236,
11,
5635,
11,
10789,
35,
2010,
11,
10789,
52452,
1669,
26925,
88004,
2271,
1155,
11,
220,
16,
15,
340,
197,
6254,
13986,
1669,
45402,
94594,
4286,
5304,
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... | 1 |
func TestTraceExporter_WithShutdown(t *testing.T) {
shutdownCalled := false
shutdown := func(context.Context) error { shutdownCalled = true; return nil }
te, err := NewTraceExporter(fakeTraceExporterConfig, zap.NewNop(), newTraceDataPusher(nil), WithShutdown(shutdown))
assert.NotNil(t, te)
assert.NoError(t, err)
... | explode_data.jsonl/70314 | {
"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,
6550,
88025,
62,
2354,
62004,
1155,
353,
8840,
836,
8,
341,
36196,
18452,
20960,
1669,
895,
198,
36196,
18452,
1669,
2915,
5378,
9328,
8,
1465,
314,
23766,
20960,
284,
830,
26,
470,
2092,
555,
197,
665,
11,
1848,
1669,
153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnqueueIn(t *testing.T) {
pool := newTestPool(t)
ns := "work"
cleanKeyspace(ns, pool)
enqueuer := NewEnqueuer(ns, pool)
// Set to expired value to make sure we update the set of known jobs
enqueuer.knownJobs["wat"] = 4
job, err := enqueuer.EnqueueIn("wat", 300, Q{"a": 1, "b": "cool"})
assert.Nil(t, e... | explode_data.jsonl/40371 | {
"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,
1702,
4584,
641,
1155,
353,
8840,
836,
8,
341,
85273,
1669,
501,
2271,
10551,
1155,
340,
84041,
1669,
330,
1778,
698,
1444,
2675,
8850,
1306,
39417,
11,
7314,
340,
81848,
591,
8801,
1669,
1532,
1702,
591,
8801,
39417,
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 TestPrintIfErrorf_WithoutError(t *testing.T) {
t.Run("PrintIfErrorf_WithoutError", func(t *testing.T) {
result := captureStdout(func(w io.Writer) {
pterm.PrintOnErrorf("", nil)
})
testza.AssertZero(t, result)
})
} | explode_data.jsonl/49145 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
8994,
2679,
1454,
69,
62,
26040,
1454,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
8994,
2679,
1454,
69,
62,
26040,
1454,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
9559,
1669,
12322,
22748,
411,
18552,
3622,
6399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDuplicates(t *testing.T) {
b1 := blocks.NewBlock([]byte("1"))
b2 := blocks.NewBlock([]byte("2"))
n := New()
defer n.Shutdown()
ch := n.Subscribe(context.Background(), b1.Cid(), b2.Cid())
n.Publish(b1)
blockRecvd, ok := <-ch
if !ok {
t.Fail()
}
assertBlocksEqual(t, b1, blockRecvd)
n.Publish(b1) ... | explode_data.jsonl/8954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 201
} | [
2830,
3393,
76851,
1155,
353,
8840,
836,
8,
341,
2233,
16,
1669,
10010,
7121,
4713,
10556,
3782,
445,
16,
5455,
2233,
17,
1669,
10010,
7121,
4713,
10556,
3782,
445,
17,
28075,
9038,
1669,
1532,
741,
16867,
308,
10849,
18452,
741,
23049,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTaskUpdateKnownStatusToPendingWithEssentialContainerStopped(t *testing.T) {
testTask := &Task{
KnownStatusUnsafe: apitaskstatus.TaskStatusNone,
Containers: []*apicontainer.Container{
{
KnownStatusUnsafe: apicontainerstatus.ContainerCreated,
Essential: true,
},
{
KnownStatusUns... | explode_data.jsonl/37211 | {
"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,
6262,
4289,
48206,
2522,
1249,
32027,
2354,
37438,
2283,
4502,
59803,
1155,
353,
8840,
836,
8,
341,
18185,
6262,
1669,
609,
6262,
515,
197,
39340,
4169,
2522,
78770,
25,
1443,
275,
1073,
2829,
28258,
2522,
4064,
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... | 1 |
func TestSQLJobQueue_Integration_RepopulateNewJobs(t *testing.T) {
dbName := "state___reindex_queue___repopulate_jobs"
queue := initSQLTest(t, dbName)
// Empty to start
j, err := queue.ClaimAvailableJob()
assert.NoError(t, err)
assert.Nil(t, j)
// Populate indexers
populated, err := queue.PopulateJobs()
asse... | explode_data.jsonl/25317 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1247
} | [
2830,
3393,
6688,
12245,
7554,
32054,
17376,
50693,
47721,
3564,
40667,
1155,
353,
8840,
836,
8,
341,
20939,
675,
1669,
330,
2454,
5973,
265,
1252,
10841,
5973,
265,
47721,
37247,
698,
46993,
1669,
2930,
6688,
2271,
1155,
11,
75564,
692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCompare(t *testing.T) {
_, c := New(0, 3)
now := c.Now()
cmp := Compare(c, &now)
if cmp != 0 {
t.Fatal("Timestamps should be equal")
}
c.AddTicks(1)
cmp = Compare(c, &now)
if cmp < 1 {
t.Fatal("Original timestamp now must be higher than it's copy")
}
_, c1 := New(1, 3)
c1.AddTicks(1)
cmp = Comp... | explode_data.jsonl/76175 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 193
} | [
2830,
3393,
27374,
1155,
353,
8840,
836,
8,
341,
197,
6878,
272,
1669,
1532,
7,
15,
11,
220,
18,
340,
80922,
1669,
272,
13244,
741,
1444,
1307,
1669,
23768,
1337,
11,
609,
3328,
340,
743,
26089,
961,
220,
15,
341,
197,
3244,
26133,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestControllerWriter(t *testing.T) {
{
size := size
c := NewController(2 * 1024 * 1024)
defer c.Close()
b1 := new(bytes.Buffer)
b2 := new(bytes.Buffer)
w1 := c.Writer(b1)
w2 := c.Writer(b2)
wg := sync.WaitGroup{}
wg.Add(2)
go func() {
n, err := io.Copy(w1, bytes.NewReader(b))
assert.No... | explode_data.jsonl/72807 | {
"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,
2051,
6492,
1155,
353,
8840,
836,
8,
341,
197,
515,
197,
13832,
1669,
1379,
198,
197,
1444,
1669,
1532,
2051,
7,
17,
353,
220,
16,
15,
17,
19,
353,
220,
16,
15,
17,
19,
340,
197,
16867,
272,
10421,
2822,
197,
2233,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReleaseIPInIPAM(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
ecscniClient := NewClient(&Config{})
libcniClient := mock_libcni.NewMockCNI(ctrl)
ecscniClient.(*cniClient).libcni = libcniClient
libcniClient.EXPECT().DelNetwork(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil)
... | explode_data.jsonl/30401 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
16077,
3298,
641,
3298,
1402,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
197,
757,
2388,
7751,
2959,
1669,
1532,
2959,
2099,
2648,
37790,
197,
55576,
775... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNCIPNetNotReserved(t *testing.T) {
inputPath := "NCValidIPNet.pem"
expected := lint.Pass
out := test.TestLint("e_ext_nc_intersects_reserved_ip", inputPath)
if out.Status != expected {
t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status)
}
} | explode_data.jsonl/77522 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
9949,
3298,
6954,
2623,
53003,
1155,
353,
8840,
836,
8,
341,
22427,
1820,
1669,
330,
9949,
4088,
3298,
6954,
49373,
698,
42400,
1669,
57920,
87768,
198,
13967,
1669,
1273,
8787,
47556,
445,
68,
9927,
52382,
15318,
54429,
74913... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSpendJournalErrors(t *testing.T) {
t.Parallel()
tests := []struct {
name string
blockTxns []*wire.MsgTx
serialized []byte
errType error
}{
// Adapted from block 170 in main blockchain.
{
name: "Force assertion due to missing stxos",
blockTxns: []*wire.MsgTx{{ // Coinbase omitted.... | explode_data.jsonl/59829 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1000
} | [
2830,
3393,
50,
3740,
43494,
13877,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
47996,
31584,
4412,
220,
29838,
35531,
30365,
31584,
198,
197,
197,
75277,
3056,
378... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBeginOnReplica(t *testing.T) {
db, tsv := setupTabletServerTest(t, "")
defer tsv.StopService()
defer db.Close()
db.AddQueryPattern(".*", &sqltypes.Result{})
target := querypb.Target{TabletType: topodatapb.TabletType_REPLICA}
err := tsv.SetServingType(topodatapb.TabletType_REPLICA, time.Time{}, true, "")... | explode_data.jsonl/79980 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 392
} | [
2830,
3393,
11135,
1925,
18327,
15317,
1155,
353,
8840,
836,
8,
341,
20939,
11,
259,
3492,
1669,
6505,
2556,
83,
5475,
2271,
1155,
11,
14676,
16867,
259,
3492,
30213,
1860,
741,
16867,
2927,
10421,
2822,
20939,
1904,
2859,
15760,
445,
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 TestMarshalCustomMultiline(t *testing.T) {
type TypeA struct {
AttrA []int `toml:"int_slice" mltln:"true"`
}
config := TypeA{AttrA: []int{1, 2, 3}}
var buf bytes.Buffer
err := NewEncoder(&buf).ArraysWithOneElementPerLine(true).SetTagMultiline("mltln").Encode(config)
if err != nil {
t.Fatal(err)
}
expe... | explode_data.jsonl/46336 | {
"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,
55438,
10268,
40404,
26560,
1155,
353,
8840,
836,
8,
341,
13158,
3990,
32,
2036,
341,
197,
197,
13371,
32,
3056,
396,
1565,
37401,
75,
2974,
396,
26488,
1,
296,
4832,
2261,
2974,
1866,
8805,
197,
630,
25873,
1669,
3990,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCancelAllExchangeOrders(t *testing.T) {
b.SetDefaults()
TestSetup(t)
if areTestAPIKeysSet() && !canManipulateRealOrders {
t.Skip("API keys set, canManipulateRealOrders false, skipping test")
}
currencyPair := currency.NewPairWithDelimiter(currency.BTC.String(),
currency.USD.String(),
"-")
var or... | explode_data.jsonl/14547 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 341
} | [
2830,
3393,
9269,
2403,
31564,
24898,
1155,
353,
8840,
836,
8,
341,
2233,
4202,
16273,
741,
73866,
21821,
1155,
692,
743,
525,
2271,
7082,
8850,
1649,
368,
1009,
753,
4814,
92876,
6334,
12768,
24898,
341,
197,
3244,
57776,
445,
7082,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConvertTrace(t *testing.T) {
record := convertAndDrill(&entry.Entry{
TraceId: []byte{
0x48, 0x01, 0x40, 0xf3, 0xd7, 0x70, 0xa5, 0xae, 0x32, 0xf0, 0xa2, 0x2b, 0x6a, 0x81, 0x2c, 0xff,
},
SpanId: []byte{
0x32, 0xf0, 0xa2, 0x2b, 0x6a, 0x81, 0x2c, 0xff,
},
TraceFlags: []byte{
0x01,
}})
requi... | explode_data.jsonl/61131 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 388
} | [
2830,
3393,
12012,
6550,
1155,
353,
8840,
836,
8,
341,
71952,
1669,
5508,
3036,
8847,
483,
2099,
4085,
22330,
515,
197,
197,
6550,
764,
25,
3056,
3782,
515,
298,
197,
15,
87,
19,
23,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
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 TestAccKeycloakOpenidClientOptionalScopes_noImportNeeded(t *testing.T) {
realm := "terraform-realm-" + acctest.RandString(10)
client := "terraform-client-" + acctest.RandString(10)
clientScope := "terraform-client-scope-" + acctest.RandString(10)
clientScopes := append(preAssignedOptionalClientScopes, clientS... | explode_data.jsonl/31490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 509
} | [
2830,
3393,
14603,
1592,
88751,
5002,
307,
2959,
15309,
3326,
18523,
6536,
11511,
56706,
1155,
353,
8840,
836,
8,
341,
17200,
7673,
1669,
330,
61385,
5504,
7673,
27651,
488,
1613,
67880,
2013,
437,
703,
7,
16,
15,
340,
25291,
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 TestMainOutput(t *testing.T) {
var buf bytes.Buffer
out = &buf
main()
expected := `a:2
b:1
`
actual := buf.String()
assert.Equalf(t, expected, actual,
"Input does not match expected buffer output.")
} | explode_data.jsonl/18205 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
6202,
5097,
1155,
353,
8840,
836,
8,
341,
2405,
6607,
5820,
22622,
198,
13967,
284,
609,
5909,
271,
36641,
741,
42400,
1669,
1565,
64,
25,
17,
198,
65,
25,
16,
198,
3989,
88814,
1669,
6607,
6431,
2822,
6948,
12808,
69,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestRandomUUID(t *testing.T) {
m := make(map[string]bool)
for x := 1; x < 32; x++ {
uuid := NewRandom()
s := uuid.String()
if m[s] {
t.Errorf("NewRandom returned duplicated UUID %s", s)
}
m[s] = true
if v, _ := uuid.Version(); v != 4 {
t.Errorf("Random UUID of version %s", v)
}
if uuid.Vari... | explode_data.jsonl/31938 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
13999,
24754,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1281,
9147,
14032,
96436,
340,
2023,
856,
1669,
220,
16,
26,
856,
366,
220,
18,
17,
26,
856,
1027,
341,
197,
10676,
2423,
1669,
1532,
13999,
741,
197,
1903,
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... | 5 |
func TestDeadlineExceeded_ForMember(t *testing.T) {
expected := &discordgo.Member{User: &discordgo.User{Username: mockconstants.TestUser}}
mnr := &callbacks.DeadlineExceeded{Member: expected}
actual := mnr.ForMember()
err := deepEqual(actual, expected)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/56105 | {
"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,
83593,
840,
94206,
84368,
9366,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
609,
42579,
3346,
46404,
90,
1474,
25,
609,
42579,
3346,
7344,
90,
11115,
25,
7860,
15763,
8787,
1474,
11248,
2109,
19618,
1669,
609,
68311,
909,
314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStartAndWaitTimeout(t *testing.T) {
fakeRuntime := &mock.Runtime{}
fakeRuntime.StartStub = func(_ string, _ *ccintf.PeerConnection) error {
time.Sleep(time.Second)
return nil
}
launcher := &RuntimeLauncher{
Runtime: fakeRuntime,
Registry: NewHandlerRegistry(false),
StartupTimeout: 5... | explode_data.jsonl/58387 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 225
} | [
2830,
3393,
3479,
92812,
7636,
1155,
353,
8840,
836,
8,
341,
1166,
726,
15123,
1669,
609,
16712,
16706,
16094,
1166,
726,
15123,
12101,
33838,
284,
2915,
2490,
914,
11,
716,
353,
638,
396,
69,
1069,
34756,
4526,
8,
1465,
341,
197,
219... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewSearchResult(t *testing.T) {
assert := assert.New(t)
s1 := newSearchresult(SampleSearchResults[0])
assert.Equal(s1.name, "GoBook.pdf")
assert.Equal(s1.fullpath, SampleSearchResults[0])
s2 := newSearchresult(SampleSearchResults[1])
assert.Equal(s2.name, "Dive_into_Python3.pdf")
assert.Equal(s2.fullpat... | explode_data.jsonl/33979 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
3564,
5890,
2077,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
1903,
16,
1669,
501,
5890,
1382,
3759,
1516,
5890,
9801,
58,
15,
2546,
6948,
12808,
1141,
16,
2644,
11,
330,
10850,
7134,
15995,
1138,
6948... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBasicPolicy(t *testing.T) {
tests := map[string]struct {
Name string
Policy *Policy
Src addr.IA
Dst addr.IA
ExpPathNum int
}{
"Empty policy": {
Policy: &Policy{},
Src: xtest.MustParseIA("2-ff00:0:212"),
Dst: xtest.MustParseIA("2-ff00:0:211"),
... | explode_data.jsonl/19160 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 318
} | [
2830,
3393,
15944,
13825,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
21297,
981,
914,
198,
197,
10025,
8018,
257,
353,
13825,
198,
197,
7568,
1287,
286,
10789,
2447,
32,
198,
197,
10957,
267,
286,
1078... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChannelArbitratorCommitFailure(t *testing.T) {
testCases := []struct {
// closeType is the type of channel close we want ot test.
closeType channeldb.ClosureType
// sendEvent is a function that will send the event
// corresponding to this test's closeType to the passed
// ChannelArbitrator.
sen... | explode_data.jsonl/3699 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1533
} | [
2830,
3393,
9629,
6953,
4489,
81,
850,
33441,
17507,
1155,
353,
8840,
836,
8,
1476,
18185,
37302,
1669,
3056,
1235,
1476,
197,
197,
322,
3265,
929,
374,
279,
943,
315,
5496,
3265,
582,
1366,
14147,
1273,
624,
197,
27873,
929,
521,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListeners(t *testing.T) {
// Setup a connection manager with a couple of mock listeners that
// notify a channel when they receive mock connections.
receivedConns := make(chan net.Conn)
listener1 := newMockListener("127.0.0.1:8333")
listener2 := newMockListener("127.0.0.1:9333")
listeners := []net.Listen... | explode_data.jsonl/53954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 488
} | [
2830,
3393,
31570,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
264,
3633,
6645,
448,
264,
5625,
315,
7860,
23562,
429,
198,
197,
322,
15456,
264,
5496,
979,
807,
5258,
7860,
13234,
624,
17200,
8771,
1109,
4412,
1669,
1281,
35190,
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 TestEnqueueMultiple(t *testing.T) {
finite_tests.EnqueueMultiple(t, func(size int) interface {
goqueue.Owner
goqueue.Enqueuer
} {
return finite.New(size)
})
} | explode_data.jsonl/54507 | {
"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,
1702,
4584,
32089,
1155,
353,
8840,
836,
8,
341,
1166,
15856,
32509,
65625,
32089,
1155,
11,
2915,
6856,
526,
8,
3749,
341,
197,
30680,
4584,
49920,
198,
197,
30680,
4584,
22834,
591,
8801,
198,
197,
92,
341,
197,
853,
342... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImageRef_HasAlpha__False(t *testing.T) {
Startup(nil)
img, err := NewImageFromFile(resources + "png-24bit.png")
require.NoError(t, err)
defer img.Close()
assert.False(t, img.HasAlpha())
} | explode_data.jsonl/38820 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
1906,
3945,
2039,
300,
19384,
563,
4049,
1155,
353,
8840,
836,
8,
341,
197,
39076,
27907,
692,
39162,
11,
1848,
1669,
1532,
1906,
43633,
52607,
488,
330,
14066,
12,
17,
19,
4489,
3508,
1138,
17957,
35699,
1155,
11,
1848,
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 |
func TestCountClaimedOneTimeCodes(t *testing.T) {
db, mock, _ := sqlmock.New(sqlmock.QueryMatcherOption(sqlmock.QueryMatcherEqual))
defer db.Close()
row := sqlmock.NewRows([]string{"count"}).AddRow(100)
mock.ExpectQuery(`SELECT COUNT(*) FROM encryption_keys WHERE one_time_code IS NULL`).WillReturnRows(row)
expec... | explode_data.jsonl/64743 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
2507,
45544,
291,
3966,
1462,
20871,
1155,
353,
8840,
836,
8,
341,
20939,
11,
7860,
11,
716,
1669,
5704,
16712,
7121,
13148,
16712,
15685,
37554,
5341,
13148,
16712,
15685,
37554,
2993,
1171,
16867,
2927,
10421,
2822,
33967,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClose(t *testing.T) {
channel := ws.NewChannel()
go func() {
closed := <-channel.Closed
assert.True(t, closed, "channel closed stayed open")
}()
channel.Close()
} | explode_data.jsonl/48245 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 66
} | [
2830,
3393,
7925,
1155,
353,
8840,
836,
8,
341,
71550,
1669,
17624,
7121,
9629,
741,
30680,
2915,
368,
341,
197,
1444,
9259,
1669,
9119,
10119,
95163,
198,
197,
6948,
32443,
1155,
11,
7877,
11,
330,
10119,
7877,
19613,
1787,
1138,
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 |
func TestHandlerName(t *testing.T) {
cases := map[string]rpcID{
"": {},
"foo": {'f', 'o', 'o'},
"foobarbaz": {'f', 'o', 'o', 'b', 'a', 'r', 'b', 'a'},
}
for s, id := range cases {
if hid := handlerName(s); hid != id {
t.Errorf("handlerName mismatch: expected %v, got %v", id, hid)
}
}
} | explode_data.jsonl/74445 | {
"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,
3050,
675,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
2415,
14032,
60,
29414,
915,
515,
197,
197,
28796,
688,
14573,
197,
197,
1,
7975,
788,
981,
5360,
69,
516,
364,
78,
516,
364,
78,
11688,
197,
197,
1,
50267,
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... | 3 |
func TestSchedulerCreation(t *testing.T) {
client := clientsetfake.NewSimpleClientset()
informerFactory := informers.NewSharedInformerFactory(client, 0)
testSource := "testProvider"
eventBroadcaster := record.NewBroadcaster()
eventBroadcaster.StartLogging(t.Logf).Stop()
defaultBindTimeout := int64(30)
factory.... | explode_data.jsonl/41721 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 444
} | [
2830,
3393,
38878,
32701,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
2943,
746,
30570,
7121,
16374,
2959,
746,
741,
17430,
34527,
4153,
1669,
6051,
388,
7121,
16997,
641,
34527,
4153,
12805,
11,
220,
15,
692,
18185,
3608,
1669,
330,
194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue29513(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustQuery("select '123' union select cast(45678 as char);").Sort().Check(testkit.Rows("123", "45678"))
tk.MustQuery("select '123' union select cast(45678 as c... | explode_data.jsonl/65617 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 260
} | [
2830,
3393,
42006,
17,
24,
20,
16,
18,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDescribeBuildDuration(t *testing.T) {
type testBuild struct {
build *buildv1.Build
output string
}
// now a minute ago
now := metav1.Now()
minuteAgo := metav1.Unix(now.Rfc3339Copy().Time.Unix()-60, 0)
twoMinutesAgo := metav1.Unix(now.Rfc3339Copy().Time.Unix()-120, 0)
threeMinutesAgo := metav1.Unix... | explode_data.jsonl/6485 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1605
} | [
2830,
3393,
74785,
11066,
12945,
1155,
353,
8840,
836,
8,
341,
13158,
1273,
11066,
2036,
341,
197,
69371,
220,
353,
5834,
85,
16,
25212,
198,
197,
21170,
914,
198,
197,
630,
197,
322,
1431,
264,
9383,
4134,
198,
80922,
1669,
77520,
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... | 3 |
func TestExecForEach_ErrorsOnUnbalancedQuotes(t *testing.T) {
t.Parallel()
p := script.Echo("a\nb\nc\n").ExecForEach("echo \"{{.}}")
p.Wait()
if p.Error() == nil {
t.Error("want error with unbalanced quotes in command line")
}
} | explode_data.jsonl/51468 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
10216,
91392,
93623,
1087,
1925,
1806,
58402,
43780,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3223,
1669,
5316,
5142,
958,
445,
64,
1699,
65,
59,
1016,
1699,
1827,
10216,
91392,
445,
3047,
7245,
2979,
13,
3417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckPubKeyEncoding(t *testing.T) {
t.Parallel()
tests := []struct {
name string
key []byte
isValid bool
}{
{
name: "uncompressed ok",
key: decodeHex("0411db93e1dcdb8a016b49840f8c53bc1eb68" +
"a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf" +
"9744464f82e160bfa9b8b64f9d4c03f999b8... | explode_data.jsonl/24201 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 730
} | [
2830,
3393,
3973,
29162,
1592,
14690,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
23634,
257,
3056,
3782,
198,
197,
19907,
4088,
1807,
198,
197,
59403,
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... | 6 |
func TestInterfaceSet(t *testing.T) {
p := &Point{3, 4}
var s struct {
I interface{}
P interface {
Dist(int) int
}
}
sv := ValueOf(&s).Elem()
sv.Field(0).Set(ValueOf(p))
if q := s.I.(*Point); q != p {
t.Errorf("i: have %p want %p", q, p)
}
pv := sv.Field(1)
pv.Set(ValueOf(p))
if q := s.P.(*Point)... | explode_data.jsonl/29560 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
5051,
1649,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
609,
2609,
90,
18,
11,
220,
19,
630,
2405,
274,
2036,
341,
197,
24486,
3749,
16094,
197,
10025,
3749,
341,
298,
10957,
380,
1548,
8,
526,
198,
197,
197,
532,
197,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestFSMsgRemovedWhileBuffered(t *testing.T) {
// Test is irrelevant if no buffering used
if testFSDisableBufferWriters {
t.SkipNow()
}
cleanupFSDatastore(t)
defer cleanupFSDatastore(t)
fs := createDefaultFileStore(t)
defer fs.Close()
limits := DefaultStoreLimits
limits.MaxMsgs = 10
if err := fs.SetLi... | explode_data.jsonl/7771 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 278
} | [
2830,
3393,
8485,
6611,
42642,
7983,
4095,
291,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
374,
39715,
421,
902,
87139,
1483,
198,
743,
1273,
8485,
25479,
4095,
54,
31829,
341,
197,
3244,
57776,
7039,
741,
197,
532,
1444,
60639,
84... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBrokerV1Beta1DataPlaneIngress(t *testing.T) {
helpers.BrokerV1Beta1IngressDataPlaneTestHelper(context.Background(), t, brokerClass, brokerTestRunner, helpers.BrokerDataPlaneNamespaceSetupOption(context.Background(), brokerTestRunner.ComponentNamespace))
} | explode_data.jsonl/48643 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
65545,
53,
16,
64811,
16,
1043,
34570,
641,
2483,
1155,
353,
8840,
836,
8,
341,
197,
21723,
1785,
45985,
53,
16,
64811,
16,
641,
2483,
1043,
34570,
2271,
5511,
5378,
19047,
1507,
259,
11,
22316,
1957,
11,
22316,
2271,
1948... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPushRegistryTag(t *testing.T) {
r := spawnTestRegistrySession(t)
err := r.PushRegistryTag("foo42/bar", imageID, "stable", makeURL("/v1/"))
if err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/13110 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
16644,
15603,
5668,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
18042,
2271,
15603,
5283,
1155,
340,
9859,
1669,
435,
34981,
15603,
5668,
445,
7975,
19,
17,
49513,
497,
2168,
915,
11,
330,
27992,
497,
1281,
3144,
4283,
85,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadConfigFrom(t *testing.T) {
assert := assertlib.New(t)
appenv.SetDefaultEnvToTest() // to ensure it tries to find the config.test file
// create a temp config file
tmpDir := os.TempDir()
tmpFile, err := ioutil.TempFile(tmpDir, "config-*.yaml")
assert.NoError(err)
defer func() {
_ = os.Remove(tmpFi... | explode_data.jsonl/61933 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 563
} | [
2830,
3393,
5879,
2648,
3830,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
2740,
7121,
1155,
340,
28236,
3160,
4202,
3675,
14359,
1249,
2271,
368,
442,
311,
5978,
432,
16297,
311,
1477,
279,
2193,
5958,
1034,
271,
197,
322,
1855,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestACLReplication(t *testing.T) {
dir1, s1 := testServerWithConfig(t, func(c *Config) {
c.ACLDatacenter = "dc1"
c.ACLMasterToken = "root"
})
defer os.RemoveAll(dir1)
defer s1.Shutdown()
client := rpcClient(t, s1)
defer client.Close()
dir2, s2 := testServerWithConfig(t, func(c *Config) {
c.Datacenter... | explode_data.jsonl/34825 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1339
} | [
2830,
3393,
55393,
18327,
1693,
1155,
353,
8840,
836,
8,
341,
48532,
16,
11,
274,
16,
1669,
1273,
5475,
2354,
2648,
1155,
11,
2915,
1337,
353,
2648,
8,
341,
197,
1444,
875,
3140,
1043,
3057,
284,
330,
7628,
16,
698,
197,
1444,
875,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateProviders(t *testing.T) {
t.Run("test error from create new couchdb", func(t *testing.T) {
err := startOrbServices(&orbParameters{dbParameters: &dbParameters{databaseType: databaseTypeCouchDBOption}})
require.Error(t, err)
require.Contains(t, err.Error(), "failed to ping couchDB: url can't be blan... | explode_data.jsonl/57247 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 474
} | [
2830,
3393,
4021,
37351,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
1465,
504,
1855,
501,
26148,
1999,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
9859,
1669,
1191,
2195,
65,
11025,
2099,
29886,
9706,
90,
1999,
9706,
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 TestIntegrationTCPConnectUnknownDNS(t *testing.T) {
ctx := context.Background()
results := TCPConnect(ctx, TCPConnectConfig{
Address: "ooni.io:443",
DNSServerNetwork: "antani",
})
if !strings.HasSuffix(results.Error.Error(), "unsupported network value") {
t.Fatal("not the error that we expected"... | explode_data.jsonl/53546 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
52464,
49896,
14611,
13790,
61088,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
55497,
1669,
26656,
14611,
7502,
11,
26656,
14611,
2648,
515,
197,
98090,
25,
688,
330,
9009,
72,
4245,
25,
19,
19,
18,
756,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_getVMExtensionCannotReadCurrentSeqNo(t *testing.T) {
ctx := log.NewSyncLogger(log.NewLogfmtLogger(os.Stdout))
mm := createMockVMExtensionEnvironmentManager()
mm.getCurrentSequenceNumberError = errors.New("the current sequence number is beyond our comprehension")
ii, _ := GetInitializationInfo("yaba", "5.0... | explode_data.jsonl/18578 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
3062,
11187,
12049,
17444,
4418,
5405,
20183,
2753,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
1487,
7121,
12154,
7395,
12531,
7121,
2201,
12501,
7395,
9638,
83225,
1171,
2109,
76,
1669,
1855,
11571,
11187,
12049,
12723,
2043,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvalidResource(t *testing.T) {
client := &invalidResourceClient{}
stopCh := make(chan struct{})
defer close(stopCh)
tif := &duck.TypedInformerFactory{
Client: client,
Type: &duckv1alpha1.AddressableType{},
ResyncPeriod: 1 * time.Second,
StopChannel: stopCh,
}
_, _, got := tif.Ge... | explode_data.jsonl/51697 | {
"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,
7928,
4783,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
609,
11808,
4783,
2959,
16094,
62644,
1143,
1669,
1281,
35190,
2036,
37790,
16867,
3265,
60170,
1143,
692,
3244,
333,
1669,
609,
72970,
98152,
641,
34527,
4153,
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... | 2 |
func TestPromNullByteHandling(t *testing.T) {
cases := []struct {
input string
err string
}{
{
input: "null_byte_metric{a=\"abc\x00\"} 1",
err: "",
},
{
input: "a{b=\"\x00ss\"} 1\n",
err: "",
},
{
input: "a{b=\"\x00\"} 1\n",
err: "",
},
{
input: "a{b=\"\x00\"} 1\n",
e... | explode_data.jsonl/65246 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 527
} | [
2830,
3393,
35186,
3280,
7153,
38606,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
22427,
914,
198,
197,
9859,
256,
914,
198,
197,
59403,
197,
197,
515,
298,
22427,
25,
330,
2921,
19737,
41294,
90,
64,
4070,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTaskUpdate(t *testing.T) {
gd, err := startDispatcher(DefaultConfig())
assert.NoError(t, err)
defer gd.Close()
var (
expectedSessionID string
nodeID string
)
{
stream, err := gd.Clients[0].Session(context.Background(), &api.SessionRequest{})
assert.NoError(t, err)
defer stream.Close... | explode_data.jsonl/13855 | {
"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,
6262,
4289,
1155,
353,
8840,
836,
8,
341,
3174,
67,
11,
1848,
1669,
1191,
21839,
87874,
2648,
2398,
6948,
35699,
1155,
11,
1848,
340,
16867,
32630,
10421,
2822,
2405,
2399,
197,
42400,
5283,
915,
914,
198,
197,
20831,
915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChargeGet(t *testing.T) {
chargeParams := &stripe.ChargeParams{
Amount: 1001,
Currency: currency.USD,
Card: &stripe.CardParams{
Number: "378282246310005",
Month: "06",
Year: "20",
},
}
res, _ := New(chargeParams)
target, err := Get(res.ID, nil)
if err != nil {
t.Error(err)
}
... | explode_data.jsonl/73934 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 193
} | [
2830,
3393,
55363,
1949,
1155,
353,
8840,
836,
8,
341,
7450,
709,
4870,
1669,
609,
61233,
6353,
2744,
4870,
515,
197,
197,
10093,
25,
256,
220,
16,
15,
15,
16,
345,
197,
6258,
5088,
25,
11413,
13,
26749,
345,
197,
197,
5770,
25,
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... | 3 |
func TestWatchFile(t *testing.T) {
if runtime.GOOS == "linux" {
// TODO(bep) FIX ME
t.Skip("Skip test on Linux ...")
}
t.Run("file content changed", func(t *testing.T) {
// given a `config.yaml` file being watched
v, configFile, cleanup := newViperWithConfigFile(t)
defer cleanup()
_, err := os.Stat(conf... | explode_data.jsonl/9925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 763
} | [
2830,
3393,
14247,
1703,
1155,
353,
8840,
836,
8,
341,
743,
15592,
97574,
3126,
621,
330,
14210,
1,
341,
197,
197,
322,
5343,
1883,
747,
8,
20151,
16292,
198,
197,
3244,
57776,
445,
35134,
1273,
389,
14340,
2503,
1138,
197,
630,
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 TestFilesFile(t *testing.T) {
// want := "Awesome File Content."
got := fakeWriteCloser{}
err := stubWorker.fileFetch(defaultConf.Items[0], &got)
if err == nil {
t.Errorf("Unexpected success when opening %s from filesystem", defaultConf.Items[0].Source.String())
}
// if !cmp.Equal(want, got.String()) {
//... | explode_data.jsonl/10362 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
10809,
1703,
1155,
353,
8840,
836,
8,
341,
197,
322,
1366,
1669,
330,
26899,
2887,
8883,
10040,
3174,
354,
1669,
12418,
7985,
51236,
799,
16094,
9859,
1669,
13633,
21936,
9715,
20714,
18978,
15578,
12054,
58,
15,
1125,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestKustomizeUnsetOverride(t *testing.T) {
Given(t).
Path("kustomize").
When().
Create().
AppSet("--namesuffix", "-suf").
Then().
And(func(app *Application) {
assert.Contains(t, app.Spec.Source.Kustomize.NameSuffix, "-suf")
}).
When().
AppUnSet("--namesuffix").
Then().
And(func(app *Appli... | explode_data.jsonl/37138 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 358
} | [
2830,
3393,
42,
1450,
551,
1806,
746,
2177,
1155,
353,
8840,
836,
8,
341,
9600,
2071,
1155,
4292,
197,
69640,
445,
74,
1450,
551,
38609,
197,
197,
4498,
25829,
197,
75569,
25829,
197,
59557,
1649,
21549,
11400,
13554,
497,
6523,
82,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestQueryShardsByOrgWhenAppsAuthIsEnabledOnly(t *testing.T) {
t.Parallel()
testCases := []struct {
name string
usesGitHubAppsAuth bool
prs map[string][]PullRequest
expectedNumberOfApiCalls int
}{
{
name: "Apps auth is used, one call per ... | explode_data.jsonl/42802 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 817
} | [
2830,
3393,
2859,
2016,
2347,
1359,
42437,
4498,
53602,
5087,
3872,
5462,
7308,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
3824,
914,
198,
197,
197,
4776,
75615,
53602,
5087,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCopyChunkStreamInvalid(t *testing.T) {
var r io.Reader
var c chan []*string
var err error
r = strings.NewReader("oops")
c = make(chan []*string, 1)
err = copyChunkStream(r, c)
if err == nil {
t.Fatalf("should fail to retrieve data. err: %v", err)
}
r = strings.NewReader(`[["foo"], ["bar"]]`)
c = ... | explode_data.jsonl/23256 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 258
} | [
2830,
3393,
12106,
28304,
3027,
7928,
1155,
353,
8840,
836,
8,
341,
2405,
435,
6399,
47431,
198,
2405,
272,
26023,
29838,
917,
198,
2405,
1848,
1465,
271,
7000,
284,
9069,
68587,
445,
64562,
1138,
1444,
284,
1281,
35190,
29838,
917,
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... | 4 |
func TestPullerRetries(t *testing.T) {
// Scenario: p1 pulls from p2, p3, p4 and p5.
// Only p3 considers p1 to be eligible to receive the data.
// The rest consider p1 as not eligible.
gn := &gossipNetwork{}
factoryMock1 := &mocks.CollectionAccessFactory{}
accessPolicyMock1 := &mocks.CollectionAccessPolicy{}
Se... | explode_data.jsonl/53266 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1773
} | [
2830,
3393,
36068,
261,
12020,
4019,
1155,
353,
8840,
836,
8,
341,
197,
322,
58663,
25,
281,
16,
33045,
504,
281,
17,
11,
281,
18,
11,
281,
19,
323,
281,
20,
624,
197,
322,
8278,
281,
18,
31138,
281,
16,
311,
387,
17013,
311,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoveOrgUser(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
testSuccess := func(orgID, userID int64) {
org := AssertExistsAndLoadBean(t, &User{ID: orgID}).(*User)
expectedNumMembers := org.NumMembers
if BeanExists(t, &OrgUser{OrgID: orgID, UID: userID}) {
expectedNumMembers--
}
assert... | explode_data.jsonl/71071 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
13021,
42437,
1474,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
2271,
5988,
2398,
18185,
7188,
1669,
2915,
36246,
915,
11,
35204,
526,
21,
19,
8,
341,
197,
87625,
1669,
5319,
15575,
3036,
5879,
10437,
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 TestScalarBls12377G1Add(t *testing.T) {
bls12377G1 := BLS12377G1()
nine := bls12377G1.Scalar.New(9)
six := bls12377G1.Scalar.New(6)
fifteen := nine.Add(six)
require.NotNil(t, fifteen)
expected := bls12377G1.Scalar.New(15)
require.Equal(t, expected.Cmp(fifteen), 0)
n := new(big.Int).Set(bls12377modulus)
n.... | explode_data.jsonl/15755 | {
"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,
20639,
33,
4730,
16,
17,
18,
22,
22,
38,
16,
2212,
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,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestExpandPublicReleaseAddressInput(t *testing.T) {
rd := schema.TestResourceDataRaw(t, newSchema(), map[string]interface{}{
"ip_type": false,
"public_ip": "192.0.2.1",
})
rd.SetId("192.0.2.1")
tests := []struct {
name string
args *schema.ResourceData
want *computing.ReleaseAddressInput
}{
{
... | explode_data.jsonl/35519 | {
"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,
38946,
12676,
16077,
4286,
2505,
1155,
353,
8840,
836,
8,
341,
92356,
1669,
10802,
8787,
4783,
1043,
20015,
1155,
11,
501,
8632,
1507,
2415,
14032,
31344,
67066,
197,
197,
1,
573,
1819,
788,
256,
895,
345,
197,
197,
1,
888... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQueueEach(t *testing.T) {
q := nonEmptyQueue()
i := 1
q.Each(func(item int) {
if item != i {
t.Errorf("got %v, want %v", item, i)
}
i++
})
} | explode_data.jsonl/52732 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
7554,
4854,
1155,
353,
8840,
836,
8,
341,
18534,
1669,
2477,
3522,
7554,
2822,
8230,
1669,
220,
16,
198,
18534,
13,
4854,
18552,
5393,
526,
8,
341,
197,
743,
1509,
961,
600,
341,
298,
3244,
13080,
445,
22390,
1018,
85,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUserUsageStatistics_None(t *testing.T) {
db := setupForTest(t)
want := &types.UserUsageStatistics{
UserID: 42,
}
got, err := GetByUserID(context.Background(), db, 42)
if err != nil {
t.Fatal(err)
}
if !reflect.DeepEqual(want, got) {
t.Fatalf("got %+v != %+v", got, want)
}
} | explode_data.jsonl/66473 | {
"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,
1474,
14783,
38599,
52523,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
6505,
2461,
2271,
1155,
692,
50780,
1669,
609,
9242,
7344,
14783,
38599,
515,
197,
31672,
915,
25,
220,
19,
17,
345,
197,
532,
3174,
354,
11,
1848,
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... | 3 |
func TestBidderSyncAllowedVendorException(t *testing.T) {
noPurposeOrVendorConsentAndPubRestrictsP1 := "CPF_61ePF_61eFxAAAENAiCAAAAAAAAAAAAAAQAAAAAAAAAAIIACACA"
noPurposeOrVendorConsentAndPubRestrictsNone := "CPF_61ePF_61eFxAAAENAiCAAAAAAAAAAAAAACEAAAAA"
testDefs := []struct {
description string
p1Vend... | explode_data.jsonl/31104 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1176
} | [
2830,
3393,
65452,
1107,
12154,
35382,
44691,
1354,
1155,
353,
8840,
836,
8,
341,
72104,
74033,
2195,
44691,
15220,
306,
3036,
29162,
50360,
29995,
47,
16,
1669,
330,
73830,
62,
21,
16,
68,
19701,
62,
21,
16,
68,
81856,
50107,
953,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestContextLockTargets(t *testing.T) {
t.Parallel()
authContext := &Context{
Identity: BuiltinRole{
Role: types.RoleNode,
ClusterName: "cluster",
Identity: tlsca.Identity{
Username: "node.cluster",
Groups: []string{"role1", "role2"},
},
},
UnmappedIdentity: WrapIdentity(tlsca.I... | explode_data.jsonl/10802 | {
"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,
1972,
11989,
49030,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
78011,
1972,
1669,
609,
1972,
515,
197,
197,
18558,
25,
425,
25628,
9030,
515,
298,
197,
9030,
25,
286,
4494,
35955,
1955,
345,
298,
197,
28678,
675... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestActivityService_GetRepositorySubscription_true(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
mux.HandleFunc("/repos/o/r/subscription", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{"subscribed":true}`)
})
ctx := context.Background()
su... | explode_data.jsonl/50050 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 415
} | [
2830,
3393,
4052,
1860,
13614,
4624,
33402,
16082,
1155,
353,
8840,
836,
8,
341,
25291,
11,
59807,
11,
8358,
49304,
1669,
6505,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
68354,
20271,
7382,
14,
34404,
497,
2915,
3622,
1758,
37508,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigureVolumesAndMounts(t *testing.T) {
env := Environment{
Integration: &v1alpha1.Integration{
ObjectMeta: metav1.ObjectMeta{
Name: TestDeploymentName,
Namespace: "ns",
},
Spec: v1alpha1.IntegrationSpec{
Resources: []v1alpha1.ResourceSpec{
{
DataSpec: v1alpha1.DataSpe... | explode_data.jsonl/54529 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2208
} | [
2830,
3393,
28560,
96325,
3036,
16284,
82,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
11586,
515,
197,
197,
52464,
25,
609,
85,
16,
7141,
16,
7371,
17376,
515,
298,
23816,
12175,
25,
77520,
16,
80222,
515,
571,
21297,
25,
414,
3393,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDockerConfigEntryJSONDecode(t *testing.T) {
tests := []struct {
input []byte
expect DockerConfigEntry
fail bool
}{
// simple case, just decode the fields
{
input: []byte(`{"username": "foo", "password": "bar", "email": "foo@example.com"}`),
expect: DockerConfigEntry{
Username... | explode_data.jsonl/40711 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 844
} | [
2830,
3393,
35,
13659,
2648,
5874,
5370,
32564,
1155,
353,
8840,
836,
8,
972,
78216,
1669,
3056,
1235,
972,
197,
22427,
220,
3056,
3782,
319,
197,
24952,
40549,
2648,
5874,
319,
197,
63052,
256,
1807,
319,
197,
92,
1666,
197,
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 TestDescribeLoadBalancerOnGet(t *testing.T) {
awsServices := newMockedFakeAWSServices(TestClusterId)
c, _ := newAWSCloud(strings.NewReader("[global]"), awsServices)
awsServices.elb.(*MockedFakeELB).expectDescribeLoadBalancers("aid")
c.GetLoadBalancer(context.TODO(), TestClusterName, &v1.Service{ObjectMeta: me... | explode_data.jsonl/29218 | {
"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,
74785,
5879,
93825,
1925,
1949,
1155,
353,
8840,
836,
8,
341,
197,
8635,
11025,
1669,
501,
11571,
291,
52317,
14419,
1220,
2161,
31159,
28678,
764,
340,
1444,
11,
716,
1669,
501,
14419,
3540,
52178,
51442,
68587,
10937,
9752,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.