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 TestUseCaseBatch(t *testing.T) {
cancel, wg, router := command.NewSUT(t, []string{test.EnvNoSecurity}, []string{})
batch.UseCaseTest(t, router)
cancel()
wg.Wait()
} | explode_data.jsonl/79500 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 72
} | [
2830,
3393,
10253,
4207,
21074,
1155,
353,
8840,
836,
8,
341,
84441,
11,
63581,
11,
9273,
1669,
3210,
7121,
50,
1381,
1155,
11,
3056,
917,
90,
1944,
81214,
2753,
15352,
2137,
3056,
917,
37790,
2233,
754,
9046,
4207,
2271,
1155,
11,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestListCapture(t *testing.T) {
t.Parallel()
ctrl := gomock.NewController(t)
mo := mock_owner.NewMockOwner(ctrl)
cp := capture.NewCapture4Test(mo)
router := newRouter(cp, newStatusProvider())
// test list processor succeeded
api := testCase{url: "/api/v1/captures", method: "GET"}
w := httptest.NewRecorder(... | explode_data.jsonl/75121 | {
"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,
852,
27429,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
2109,
78,
1669,
7860,
29027,
7121,
11571,
13801,
62100,
340,
52018,
1669,
12322,
7121,
27429,
19,
2271,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClientConn_Ping(t *testing.T) {
l, err := coapNet.NewListenUDP("udp", "")
require.NoError(t, err)
defer l.Close()
var wg sync.WaitGroup
defer wg.Wait()
s := udp.NewServer()
defer s.Stop()
wg.Add(1)
go func() {
defer wg.Done()
err := s.Serve(l)
require.NoError(t, err)
}()
cc, err := udp.Dial... | explode_data.jsonl/72016 | {
"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,
2959,
9701,
1088,
287,
1155,
353,
8840,
836,
8,
341,
8810,
11,
1848,
1669,
1062,
391,
6954,
7121,
38714,
41648,
445,
31101,
497,
14676,
17957,
35699,
1155,
11,
1848,
340,
16867,
326,
10421,
741,
2405,
63581,
12811,
28384,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKSMMetricsSuppression(t *testing.T) {
suppressedPattern, _ := regexp.Compile("kube_.*_annotations")
err := framework.Poll(5*time.Second, time.Minute, func() error {
client := f.PrometheusK8sClient
b, err := client.PrometheusLabel("__name__")
if err != nil {
return err
}
response, err := gab... | explode_data.jsonl/79596 | {
"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,
40449,
8035,
13468,
10048,
4011,
1155,
353,
8840,
836,
8,
1476,
1903,
454,
14318,
15760,
11,
716,
1669,
41877,
89323,
445,
97717,
62,
4908,
62,
39626,
5130,
9859,
1669,
12626,
1069,
965,
7,
20,
77053,
32435,
11,
882,
75770,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOnlyReadBodyOnDemand(t *testing.T) {
resetTest()
req, err := http.NewRequest("GET", s.server.URL+"/infinite", nil)
if err != nil {
t.Fatal(err)
}
resp, err := s.client.Do(req) // This shouldn't hang forever.
if err != nil {
t.Fatal(err)
}
buf := make([]byte, 10) // Only partially read the body.
_... | explode_data.jsonl/77614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
7308,
4418,
5444,
1925,
81027,
1155,
353,
8840,
836,
8,
341,
70343,
2271,
2822,
24395,
11,
1848,
1669,
1758,
75274,
445,
3806,
497,
274,
12638,
20893,
27569,
258,
25722,
497,
2092,
340,
743,
1848,
961,
2092,
341,
197,
3244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestRootExeValidate(t *testing.T) {
valExeTest(t, []*valTestData{
{sdl: `{ artist(name: "A" name: "B") { name }}`, expect: "duplicate argument name to artist"},
{sdl: `{ title @go }`, expect: "directive @go can not be applied to title, a FIELD"},
{sdl: `{ ...frag @go } fragment frag on Query { title }`,
... | explode_data.jsonl/48193 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 430
} | [
2830,
3393,
8439,
840,
68,
17926,
1155,
353,
8840,
836,
8,
341,
19302,
840,
68,
2271,
1155,
11,
29838,
831,
83920,
515,
197,
197,
84386,
8736,
25,
53692,
10049,
3153,
25,
330,
32,
1,
829,
25,
330,
33,
899,
314,
829,
3869,
7808,
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 TestDynMerge_NoUpdateOnTTL0Changes(t *testing.T) {
updateOld := []*endpoint.Endpoint{
{
DNSName: "name1",
Targets: endpoint.Targets{"target1"},
RecordTTL: endpoint.TTL(1),
RecordType: endpoint.RecordTypeA,
},
{
DNSName: "name2",
Targets: endpoint.Targets{"target2"},
RecordT... | explode_data.jsonl/9808 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 368
} | [
2830,
3393,
95709,
52096,
36989,
4289,
1925,
51,
13470,
15,
11317,
1155,
353,
8840,
836,
8,
341,
27175,
18284,
1669,
29838,
32540,
90409,
515,
197,
197,
515,
298,
10957,
2448,
675,
25,
262,
330,
606,
16,
756,
298,
197,
49030,
25,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDeviceTokenReturnsErrorIfSendingFails(t *testing.T) {
sender := mocks.NewSender()
sender.SetError(fmt.Errorf("this is an error"))
_, err := WaitForUserCompletion(sender, deviceCode())
if err == nil || !strings.Contains(err.Error(), errTokenSendingFails) {
t.Fatalf("adal: failed to get correct error expe... | explode_data.jsonl/27502 | {
"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,
6985,
3323,
16446,
1454,
2679,
49282,
37,
6209,
1155,
353,
8840,
836,
8,
341,
1903,
1659,
1669,
68909,
7121,
20381,
741,
1903,
1659,
4202,
1454,
28197,
13080,
445,
574,
374,
458,
1465,
28075,
197,
6878,
1848,
1669,
37601,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSocketTransport(t *testing.T) {
expect := ttesting.NewExpect(t)
// Create endpoint
if tio.FileExists(sockFile) {
os.Remove(sockFile)
}
socket, err := net.Listen("unix", sockFile)
expect.NoError(err)
handler := mockHandler{
expect: expect,
}
defer socket.Close()
go http.Serve(socket, handler)
... | explode_data.jsonl/64413 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 247
} | [
2830,
3393,
10286,
27560,
1155,
353,
8840,
836,
8,
341,
24952,
1669,
259,
8840,
7121,
17536,
1155,
692,
197,
322,
4230,
14887,
271,
743,
259,
815,
8576,
15575,
30850,
1703,
8,
341,
197,
25078,
13270,
30850,
1703,
340,
197,
630,
58279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHoard_Get(t *testing.T) {
firstCalled := false
secondCalled := false
h := Make(ExpiresNever)
result := h.Get("key", func() (interface{}, *Expiration) {
firstCalled = true
return "first", ExpiresNever
})
assert.Equal(t, result, "first")
assert.True(t, firstCalled)
result = h.Get("key", func() (i... | explode_data.jsonl/82498 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 178
} | [
2830,
3393,
39,
33386,
13614,
1155,
353,
8840,
836,
8,
1476,
42190,
20960,
1669,
895,
198,
197,
5569,
20960,
1669,
895,
198,
9598,
1669,
7405,
7,
65331,
26155,
692,
9559,
1669,
305,
2234,
445,
792,
497,
2915,
368,
320,
4970,
22655,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTopDownAggregates(t *testing.T) {
tests := []struct {
note string
rules []string
expected interface{}
}{
{"count", []string{`p[x] { count(a, x) }`}, "[4]"},
{"count virtual", []string{`p[x] { count([y | q[y]], x) }`, `q[x] { x = a[_] }`}, "[4]"},
{"count keys", []string{`p[x] { count(b, x... | explode_data.jsonl/25208 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 989
} | [
2830,
3393,
5366,
4454,
9042,
7998,
973,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
9038,
1272,
257,
914,
198,
197,
7000,
2425,
262,
3056,
917,
198,
197,
42400,
3749,
16094,
197,
59403,
197,
197,
4913,
1830,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetVirtDriveName(t *testing.T) {
tests := []struct {
index int
expectedDrive string
}{
{0, "vda"},
{25, "vdz"},
{27, "vdab"},
{704, "vdaac"},
{18277, "vdzzz"},
}
for _, test := range tests {
driveName, err := GetVirtDriveName(test.index)
if err != nil {
t.Fatal(err)
}
if d... | explode_data.jsonl/8212 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
1949,
53,
2106,
32457,
675,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
26327,
260,
526,
198,
197,
42400,
32457,
914,
198,
197,
59403,
197,
197,
90,
15,
11,
330,
85,
3235,
7115,
197,
197,
90,
17,
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 TestInstallRelease_ReuseName(t *testing.T) {
c := helm.NewContext()
rs := rsFixture()
rel := releaseStub()
rel.Info.Status.Code = release.Status_DELETED
rs.env.Releases.Create(rel)
req := &services.InstallReleaseRequest{
Chart: chartStub(),
ReuseName: true,
Name: rel.Name,
}
res, err := rs.... | explode_data.jsonl/45613 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
24690,
16077,
62,
38081,
675,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
33765,
7121,
1972,
741,
41231,
1669,
10036,
18930,
741,
197,
3748,
1669,
4879,
33838,
741,
197,
3748,
20132,
10538,
20274,
284,
4879,
10538,
85921,
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... | 5 |
func TestValidateGuestUser(t *testing.T) {
auth := NewAuthenticator(gTestBucket, nil)
user, err := auth.NewUser("", "", nil)
assert.True(t, user != nil)
assert.True(t, err == nil)
} | explode_data.jsonl/31547 | {
"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,
17926,
37804,
1474,
1155,
353,
8840,
836,
8,
341,
78011,
1669,
1532,
5087,
61393,
3268,
2271,
36018,
11,
2092,
340,
19060,
11,
1848,
1669,
4166,
7121,
1474,
19814,
7342,
2092,
340,
6948,
32443,
1155,
11,
1196,
961,
2092,
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 |
func TestGetChecksResultRecordError(t *testing.T) {
db := helpers.SetupTestDatabase(t)
mockAra := new(araMocks.AraService)
rList := &ara.RecordList{
Count: 3,
Results: []*ara.RecordListResult{
&ara.RecordListResult{
ID: 1,
Playbook: 1,
Key: "results",
Type: "json",
},
},
... | explode_data.jsonl/67832 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 330
} | [
2830,
3393,
1949,
49820,
2077,
6471,
1454,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
30187,
39820,
2271,
5988,
1155,
692,
77333,
32,
956,
1669,
501,
7,
5059,
72577,
875,
956,
1860,
692,
7000,
852,
1669,
609,
5059,
49959,
852,
515,
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 TestParamsParsingErrorSilentFailure(t *testing.T) {
// See also TestParamParsingErrorSilentFailure
var req = URL(":wrong-schema")
var got = req.Params()
if got != nil {
t.Errorf("Params should be null, got %v instead", got)
}
} | explode_data.jsonl/24760 | {
"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,
4870,
68839,
1454,
27571,
306,
17507,
1155,
353,
8840,
836,
8,
341,
197,
322,
3496,
1083,
3393,
2001,
68839,
1454,
27571,
306,
17507,
198,
2405,
4232,
284,
5548,
18893,
34870,
79684,
1138,
2405,
2684,
284,
4232,
58268,
2822,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPrincipalOUWrongOU(t *testing.T) {
msp1, err := setup("testdata/idemix/MSP1OU1", "MSP1OU1")
assert.NoError(t, err)
id1, err := getDefaultSigner(msp1)
assert.NoError(t, err)
ou := &msp.OrganizationUnit{
OrganizationalUnitIdentifier: "DifferentOU",
MspIdentifier: id1.GetMSPIdentifier(),... | explode_data.jsonl/46043 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 314
} | [
2830,
3393,
31771,
11922,
29185,
11922,
1155,
353,
8840,
836,
8,
341,
47691,
79,
16,
11,
1848,
1669,
6505,
445,
92425,
38146,
336,
941,
10270,
4592,
16,
11922,
16,
497,
330,
44,
4592,
16,
11922,
16,
1138,
6948,
35699,
1155,
11,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetNamespaceRoleAnnotation(t *testing.T) {
var parseTests = []struct {
test string
annotation string
expected []string
}{
{
test: "Empty string",
annotation: "",
expected: []string{},
},
{
test: "Malformed string",
annotation: "something maleformed here",
e... | explode_data.jsonl/15569 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 429
} | [
2830,
3393,
1949,
22699,
9030,
19711,
1155,
353,
8840,
836,
8,
341,
2405,
4715,
18200,
284,
3056,
1235,
341,
197,
18185,
981,
914,
198,
197,
197,
24674,
914,
198,
197,
42400,
256,
3056,
917,
198,
197,
59403,
197,
197,
515,
298,
18185,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMain(t *testing.T) {
// If setup fails stop the test
if passed := t.Run("setup", setup); !passed {
t.FailNow()
}
t.Run("Extender", testExtender)
t.Run("HealthMonitor", testHealthMonitor)
t.Run("Snapshot", testSnapshot)
t.Run("CmdExecutor", asyncPodCommandTest)
t.Run("Migration", testMigration)
} | explode_data.jsonl/58844 | {
"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,
6202,
1155,
353,
8840,
836,
8,
341,
197,
322,
1416,
6505,
14525,
2936,
279,
1273,
198,
743,
5823,
1669,
259,
16708,
445,
15188,
497,
6505,
1215,
753,
35422,
341,
197,
3244,
57243,
7039,
741,
197,
532,
3244,
16708,
445,
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... | 2 |
func TestSpecOptionChoice(t *testing.T) {
var f, g *bool
init := func(c *Cmd) {
f = c.BoolOpt("f", false, "")
g = c.BoolOpt("g", false, "")
}
spec := "-f|-g"
okCmd(t, spec, init, []string{"-f"})
require.True(t, *f)
require.False(t, *g)
okCmd(t, spec, init, []string{"-g"})
require.False(t, *f)
require.Tr... | explode_data.jsonl/23925 | {
"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,
8327,
5341,
24728,
1155,
353,
8840,
836,
8,
341,
2405,
282,
11,
342,
353,
2641,
198,
28248,
1669,
2915,
1337,
353,
15613,
8,
341,
197,
1166,
284,
272,
52497,
21367,
445,
69,
497,
895,
11,
14676,
197,
3174,
284,
272,
5249... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStream_PulsarMsgStream_SearchResult(t *testing.T) {
pulsarAddress, _ := Params.Load("_PulsarAddress")
c := funcutil.RandomString(8)
producerChannels := []string{c}
consumerChannels := []string{c}
consumerSubName := funcutil.RandomString(8)
msgPack := MsgPack{}
msgPack.Msgs = append(msgPack.Msgs, getTsMs... | explode_data.jsonl/55289 | {
"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,
3027,
1088,
14295,
277,
6611,
3027,
65913,
2077,
1155,
353,
8840,
836,
8,
341,
3223,
14295,
277,
4286,
11,
716,
1669,
34352,
13969,
16975,
47,
14295,
277,
4286,
1138,
1444,
1669,
2915,
1314,
26709,
703,
7,
23,
340,
197,
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... | 2 |
func TestEmbeddedStruct(t *testing.T) {
callErr, funcErr, assert, callBuffer, funcBuffer := testOpenAPITypeWriter(t, `
package foo
// Nested is used as embedded struct field
type Nested struct {
// A simple string
String string
}
// Blah demonstrate a struct with embedded struct field.
type Blah struct {
// An... | explode_data.jsonl/3344 | {
"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,
83466,
9422,
1155,
353,
8840,
836,
8,
341,
67288,
7747,
11,
2915,
7747,
11,
2060,
11,
1618,
4095,
11,
2915,
4095,
1669,
1273,
5002,
7082,
929,
6492,
1155,
11,
22074,
1722,
15229,
271,
322,
71742,
374,
1483,
438,
22864,
203... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFloat32Zero(t *testing.T) {
assert := assert.New(t)
var verr error
var val float32 = 0.0
verr = Float32(&val).Zero()()
assert.Nil(verr)
verr = Float32(nil).Zero()()
assert.NotNil(verr)
assert.Nil(ErrValue(verr))
assert.Equal(ErrFloat32Zero, ErrCause(verr))
val = 5.0
verr = Float32(&val).Zero()()
... | explode_data.jsonl/11548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
5442,
18,
17,
17999,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
2405,
71467,
1465,
198,
2405,
1044,
2224,
18,
17,
284,
220,
15,
13,
15,
198,
197,
423,
81,
284,
13001,
18,
17,
2099,
831,
568,
17999... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOcAttrsToInternal(t *testing.T) {
attrs := ocAttrsToInternal(nil)
assert.EqualValues(t, data.NewAttributes(nil, 0), attrs)
ocAttrs := &octrace.Span_Attributes{}
attrs = ocAttrsToInternal(ocAttrs)
assert.EqualValues(t, data.NewAttributes(data.AttributesMap{}, 0), attrs)
ocAttrs = &octrace.Span_Attribute... | explode_data.jsonl/8737 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 715
} | [
2830,
3393,
46,
66,
53671,
1249,
11569,
1155,
353,
8840,
836,
8,
341,
197,
20468,
1669,
17796,
53671,
1249,
11569,
27907,
340,
6948,
12808,
6227,
1155,
11,
821,
7121,
10516,
27907,
11,
220,
15,
701,
16204,
692,
197,
509,
53671,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestService_Start(t *testing.T) {
// Given
g := NewGomegaWithT(t)
svc := service.New("localhost:8080")
ctx, cancel := context.WithCancel(context.TODO())
// When
var err error
wait := sync.WaitGroup{}
wait.Add(1)
go func() {
err = svc.Start(ctx)
wait.Done()
}()
cancel()
wait.Wait()
// Then
g.Exp... | explode_data.jsonl/37765 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
1860,
38056,
1155,
353,
8840,
836,
8,
341,
197,
322,
16246,
198,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
340,
1903,
7362,
1669,
2473,
7121,
445,
8301,
25,
23,
15,
23,
15,
1138,
20985,
11,
9121,
1669,
2266,
26124,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDLOCreateMissingSegmentsInList(t *testing.T) {
ctx := context.Background()
c, rollback := makeConnectionWithContainer(t)
defer rollback()
if srv == nil {
t.Skipf("This test only runs with the fake swift server as it's needed to simulate eventual consistency problems.")
return
}
listURL := "/v1/AUTH... | explode_data.jsonl/12726 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 695
} | [
2830,
3393,
35,
1593,
4021,
25080,
64813,
641,
852,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
11,
60414,
1669,
1281,
4526,
2354,
4502,
1155,
340,
16867,
60414,
2822,
743,
43578,
621,
2092,
341,
197,
3244,
57776,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGitLabProviderEmailDomainValid(t *testing.T) {
b := testGitLabBackend()
defer b.Close()
bURL, _ := url.Parse(b.URL)
p := testGitLabProvider(bURL.Host)
p.AllowUnverifiedEmail = true
p.EmailDomains = []string{"bar.com"}
session := &sessions.SessionState{AccessToken: "gitlab_access_token"}
email, err :=... | explode_data.jsonl/12898 | {
"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,
46562,
29046,
5179,
4781,
13636,
4088,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
1273,
46562,
29046,
29699,
741,
16867,
293,
10421,
2822,
2233,
3144,
11,
716,
1669,
2515,
8937,
1883,
20893,
340,
3223,
1669,
1273,
46562,
29046,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDialContext(t *testing.T) {
resolved := []struct {
addresses []string
host string
}{
{
addresses: []string{"216.239.32.59:443"},
host: "dns.google.com",
},
{
addresses: []string{"176.103.130.130:855", "176.103.130.130:853"},
host: "dns.adguard.com",
},
{
addresses:... | explode_data.jsonl/19775 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 319
} | [
2830,
3393,
35,
530,
1972,
1155,
353,
8840,
836,
8,
341,
10202,
8731,
1669,
3056,
1235,
341,
197,
197,
53789,
3056,
917,
198,
197,
63104,
414,
914,
198,
197,
59403,
197,
197,
515,
298,
197,
53789,
25,
3056,
917,
4913,
17,
16,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEth_GetFilterChanges_NoTopics(t *testing.T) {
rpcRes := call(t, "eth_blockNumber", []string{})
var res hexutil.Uint64
err := res.UnmarshalJSON(rpcRes.Result)
require.NoError(t, err)
param := make([]map[string]interface{}, 1)
param[0] = make(map[string]interface{})
param[0]["topics"] = []string{}
para... | explode_data.jsonl/857 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 319
} | [
2830,
3393,
65390,
13614,
5632,
11317,
36989,
45003,
1155,
353,
8840,
836,
8,
341,
7000,
3992,
1061,
1669,
1618,
1155,
11,
330,
769,
7113,
2833,
497,
3056,
917,
6257,
692,
2405,
592,
12371,
1314,
71869,
21,
19,
198,
9859,
1669,
592,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInsightStore_StampRecording(t *testing.T) {
timescale, cleanup := insightsdbtesting.TimescaleDB(t)
defer cleanup()
now := time.Date(2020, 1, 5, 0, 0, 0, 0, time.UTC).Truncate(time.Microsecond)
ctx := context.Background()
store := NewInsightStore(timescale)
store.Now = func() time.Time {
return now
}
... | explode_data.jsonl/33315 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 491
} | [
2830,
3393,
15474,
491,
6093,
62,
20906,
52856,
1155,
353,
8840,
836,
8,
341,
3244,
1733,
2246,
11,
21290,
1669,
25709,
1999,
8840,
836,
1733,
2246,
3506,
1155,
340,
16867,
21290,
741,
80922,
1669,
882,
8518,
7,
17,
15,
17,
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 TestNodeGetCapabilities(t *testing.T) {
d := NewFakeDriver()
capType := &csi.NodeServiceCapability_Rpc{
Rpc: &csi.NodeServiceCapability_RPC{
Type: csi.NodeServiceCapability_RPC_STAGE_UNSTAGE_VOLUME,
},
}
capList := []*csi.NodeServiceCapability{{
Type: capType,
}}
d.NSCap = capList
// Test valid req... | explode_data.jsonl/36850 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 214
} | [
2830,
3393,
1955,
1949,
55315,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
1532,
52317,
11349,
741,
1444,
391,
929,
1669,
609,
63229,
21714,
1860,
63746,
2568,
3992,
515,
197,
11143,
3992,
25,
609,
63229,
21714,
1860,
63746,
76022,
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... | 1 |
func TestEncodePeerMhash(t *testing.T) {
pub := ed25519.PublicKey{
0x1c,
0xff,
0xcf,
0x5d,
0xd4,
0xa2,
0x1d,
0x26,
0xef,
0xab,
0x55,
0xdd,
0x86,
0x46,
0xcd,
0x1d,
0x93,
0x46,
0x27,
0x18,
0xfd,
0x85,
0xb4,
0xe8,
0xb7,
0x21,
0x71,
0x5c,
0xfe,
0x36,
0xdb,
0x... | explode_data.jsonl/12913 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 337
} | [
2830,
3393,
32535,
30888,
44,
8296,
1155,
353,
8840,
836,
8,
341,
62529,
1669,
1578,
17,
20,
20,
16,
24,
49139,
1592,
515,
197,
197,
15,
87,
16,
66,
345,
197,
197,
15,
9020,
345,
197,
197,
15,
55649,
345,
197,
197,
15,
87,
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... | 2 |
func TestParam(t *testing.T) {
paramCode := "123456"
paramFields := "f1;f2;f3"
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Form.Get("code") != paramCode {
t.Errorf("Expected 'code' == %s; got %v", paramCode, r.Form.Get("code"))
}
if r.Form.Get("fields") !=... | explode_data.jsonl/25466 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 221
} | [
2830,
3393,
2001,
1155,
353,
8840,
836,
8,
341,
36037,
2078,
1669,
330,
16,
17,
18,
19,
20,
21,
698,
36037,
8941,
1669,
330,
69,
16,
26,
69,
17,
26,
69,
18,
1837,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigDescriptorValidateConfig(t *testing.T) {
cases := []struct {
name string
typ string
config interface{}
wantErr bool
}{
{
name: "bad configuration object",
typ: "policy",
config: nil,
wantErr: true,
},
{
name: "undeclared kind",
typ: "special-type",... | explode_data.jsonl/56887 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 525
} | [
2830,
3393,
2648,
11709,
17926,
2648,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
25314,
257,
914,
198,
197,
25873,
220,
3749,
16094,
197,
50780,
7747,
1807,
198,
197,
59403,
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 TestClearRepository(t *testing.T) {
mockRepoName := "mockRepoName"
mockAwsError := awserr.New("someErrorCode", "some error", nil)
mockError := errors.New("some error")
mockRepoNotFoundError := awserr.New("RepositoryNotFoundException", "some error", nil)
mockDigest := "mockDigest"
mockImageID := ecr.ImageIden... | explode_data.jsonl/31316 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1030
} | [
2830,
3393,
14008,
4624,
1155,
353,
8840,
836,
8,
341,
77333,
25243,
675,
1669,
330,
16712,
25243,
675,
698,
77333,
47359,
1454,
1669,
31521,
615,
7121,
445,
14689,
30748,
497,
330,
14689,
1465,
497,
2092,
340,
77333,
1454,
1669,
5975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoginCookies(t *testing.T) {
t.Run("should return cookies with X-Requested-With header", func(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
th.Client.HTTPHeader[model.HeaderRequestedWith] = model.HeaderRequestedWithXML
user, resp, _ := th.Client.Login(th.BasicUser.Email, th.BasicUse... | explode_data.jsonl/47542 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1807
} | [
2830,
3393,
6231,
50672,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5445,
470,
8279,
448,
1599,
89109,
83156,
4247,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
197,
16867,
270,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestHasNeighbors(t *testing.T) {
tests := []struct {
name string
step *Step
selector *sql.Selector
wantQuery string
}{
{
name: "O2O/1type",
// A nodes sql.Table; linked-list (next->prev). The "prev"
// node holds association pointer. The neighbors query
// here checks if a node "... | explode_data.jsonl/41703 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2410
} | [
2830,
3393,
10281,
58086,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
77093,
414,
353,
8304,
198,
197,
197,
8925,
220,
353,
3544,
14752,
269,
198,
197,
50780,
2859,
914,
198,
197,
59403,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestShowErrors(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
cc := &clientConn{
alloc: arena.NewAllocator(1024),
chunkAlloc: chunk.NewAllocator(),
pkt: &packetIO{
bufWriter: bufio.NewWriter(bytes.NewBuffer(nil)),
},
}
ctx := context.Background()
tk := testkit.NewTes... | explode_data.jsonl/73157 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 335
} | [
2830,
3393,
7812,
13877,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
741,
63517,
1669,
609,
2972,
9701,
515,
197,
197,
4742,
25,
414,
24902,
7121,
42730,
7,
16,
15,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestConstPropAndPPDWithCache(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
orgEnable := core.PreparedPlanCacheEnabled()
defer core.SetPreparedPlanCache(orgEnable)
core.SetPreparedPlanCache(true)
se, err := session.CreateSession4TestWithOpt(store, &session.Opt{
PreparedPlanCache: ... | explode_data.jsonl/5511 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1486
} | [
2830,
3393,
19167,
2008,
3036,
4406,
35,
2354,
8233,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
741,
87625,
11084,
1669,
6200,
28770,
7212,
20485,
8233,
5462,
741,
16867,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_registrarDomainNameserverListCmd_Args(t *testing.T) {
t.Run("ValidArgs_NoError", func(t *testing.T) {
err := registrarDomainNameserverListCmd(nil).Args(nil, []string{"testdomain1.co.uk"})
assert.Nil(t, err)
})
t.Run("InvalidArgs_Error", func(t *testing.T) {
err := registrarDomainNameserverListCmd(n... | explode_data.jsonl/74651 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 167
} | [
2830,
3393,
4920,
34765,
13636,
7980,
2836,
852,
15613,
87581,
82,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
4088,
4117,
36989,
1454,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
9859,
1669,
61467,
13636,
7980,
2836,
852,
15613,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRPCMethodHelpGeneration(t *testing.T) {
needsGenerate := false
defer func() {
if needsGenerate && !t.Failed() {
t.Error("Generated help texts are out of date: run 'go generate'")
return
}
if t.Failed() {
t.Log("Regenerate help texts with 'go generate' after fixing")
}
}()
for i := range ... | explode_data.jsonl/16666 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 404
} | [
2830,
3393,
29528,
3523,
12689,
37138,
1155,
353,
8840,
836,
8,
341,
197,
55245,
31115,
1669,
895,
271,
16867,
2915,
368,
341,
197,
743,
3880,
31115,
1009,
753,
83,
991,
5687,
368,
341,
298,
3244,
6141,
445,
15741,
1492,
21984,
525,
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... | 4 |
func TestContainerLabelToMetricLabels(t *testing.T) {
stats := statsJSON(t)
containers := containerJSON(t)
config := &Config{
ContainerLabelsToMetricLabels: map[string]string{
"my.specified.docker.label": "my.docker.to.metric.label",
"other.specified.docker.label": "my.other.docker.to.metric.label",
},
... | explode_data.jsonl/4112 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 262
} | [
2830,
3393,
4502,
2476,
1249,
54310,
23674,
1155,
353,
8840,
836,
8,
341,
79659,
1669,
10472,
5370,
1155,
340,
197,
39399,
1669,
5476,
5370,
1155,
340,
25873,
1669,
609,
2648,
515,
197,
197,
4502,
23674,
1249,
54310,
23674,
25,
2415,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvokeMove(t *testing.T) {
stub := initContract(t)
positionID := int32(1)
mark := tttPb.Mark_X
r, err := newMoveArgsBuilder("001", positionID, mark).
invoke(stub)
if err != nil {
t.Fatal(err.Error())
}
if r.GetStatus() != shim.OK {
t.Logf("Could not invoke move function, error: %s", r.GetMessage... | explode_data.jsonl/67447 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 248
} | [
2830,
3393,
17604,
9860,
1155,
353,
8840,
836,
8,
1476,
18388,
392,
1669,
2930,
14067,
1155,
340,
35739,
915,
1669,
526,
18,
17,
7,
16,
340,
2109,
838,
1669,
259,
5566,
47,
65,
75888,
6859,
271,
7000,
11,
1848,
1669,
501,
9860,
4117... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVoidBuiltins(t *testing.T) {
// Void builtins are used in test cases.
RegisterBuiltin(&Builtin{
Name: "fake_void_builtin",
Decl: types.NewFunction(
types.Args(types.N),
nil,
),
})
tests := []struct {
query string
wantErr bool
}{
{"fake_void_builtin(1)", false},
{"fake_void_builtin(... | explode_data.jsonl/14564 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 302
} | [
2830,
3393,
35882,
54300,
1330,
1155,
353,
8840,
836,
8,
1476,
197,
322,
19193,
5798,
1330,
525,
1483,
304,
1273,
5048,
624,
79096,
33,
25628,
2099,
33,
25628,
515,
197,
21297,
25,
330,
30570,
37775,
73829,
756,
197,
197,
21629,
25,
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... | 6 |
func TestIDGen(t *testing.T) {
inst := NewIDInstance(41, 12, 10, 9)
var wg sync.WaitGroup
wg.Add(100)
results := make(chan int64, 10000)
for i := 0; i < 100; i++ {
go func() {
for i := 0; i < 100; i++ {
id := inst.NextID()
// t.Logf("id: %b \t %x \t %d", id, id, id)
results <- id
}
... | explode_data.jsonl/21350 | {
"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,
915,
9967,
1155,
353,
8840,
836,
8,
972,
88656,
1669,
1532,
915,
2523,
7,
19,
16,
11,
220,
16,
17,
11,
220,
16,
15,
11,
220,
24,
1218,
2405,
63581,
12811,
28384,
2808,
319,
72079,
1904,
7,
16,
15,
15,
1218,
55497,
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... | 2 |
func TestShouldReturnStatusFailed(t *testing.T) {
findStepStatusByServiceRequestIDMock = func(serviceRequestId uuid.UUID) (statuses []*models.StepsStatus, err error) {
step1Time := time.Date(2020, time.April, 07, 16, 32, 00, 00, time.UTC)
statuses = make([]*models.StepsStatus, 4)
statuses[0] = &models.StepsStat... | explode_data.jsonl/42475 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 733
} | [
2830,
3393,
14996,
5598,
2522,
9408,
1155,
353,
8840,
836,
8,
341,
80603,
8304,
2522,
1359,
1860,
1900,
915,
11571,
284,
2915,
21656,
61774,
16040,
39636,
8,
320,
65353,
29838,
6507,
7758,
7124,
2522,
11,
1848,
1465,
8,
341,
197,
77093,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPaymentMerge(t *testing.T) {
itest(t, func(ctx context.Context, guest, host *Starlightd) {
steps := append(channelCreationSteps(guest, host, 0, 0, channelFundingAmount), hostChannelPayGuestSteps(guest, host, paymentAmount)...)
// Create channel and do one payment
var channelID string
for _, s := rang... | explode_data.jsonl/26090 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 450
} | [
2830,
3393,
20188,
52096,
1155,
353,
8840,
836,
8,
341,
23374,
477,
1155,
11,
2915,
7502,
2266,
9328,
11,
8640,
11,
3468,
353,
12699,
4145,
67,
8,
341,
197,
18388,
7124,
1669,
8737,
25923,
32701,
33951,
3268,
3045,
11,
3468,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestSubstr(t *testing.T) {
data := []bool{b0, b1, b0, b1, b0, b1, b1, b0}
tests := []struct {
start int
end int
expected []bool
}{
{
0,
8,
[]bool{b0, b1, b0, b1, b0, b1, b1, b0},
},
{
0,
0,
[]bool{},
},
{
0,
1,
[]bool{b0},
},
{
2,
4,
[]bool{b0, b1... | explode_data.jsonl/67090 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 337
} | [
2830,
3393,
3136,
495,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
3056,
2641,
90,
65,
15,
11,
293,
16,
11,
293,
15,
11,
293,
16,
11,
293,
15,
11,
293,
16,
11,
293,
16,
11,
293,
15,
630,
78216,
1669,
3056,
1235,
341,
197,
21375,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDatabaseAssignShardSet(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
d, mapCh, _ := newTestDatabase(t, ctrl, Bootstrapped)
defer func() {
close(mapCh)
}()
var ns []*MockdatabaseNamespace
ns = append(ns, dbAddNewMockNamespace(ctrl, d, "testns1"))
ns = append(ns, dbAddNewMockNam... | explode_data.jsonl/46532 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 356
} | [
2830,
3393,
5988,
28933,
2016,
567,
1649,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
2698,
11,
2415,
1143,
11,
716,
1669,
501,
2271,
5988,
1155,
11,
23743,
11,
150... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResolvConfHost(t *testing.T) {
if !testutils.IsRunningInContainer() {
defer testutils.SetupTestOSContext(t)()
}
tmpResolvConf := []byte("search localhost.net\nnameserver 127.0.0.1\nnameserver 2001:4860:4860::8888\n")
//take a copy of resolv.conf for restoring after test completes
resolvConfSystem, err... | explode_data.jsonl/6372 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 764
} | [
2830,
3393,
1061,
35315,
15578,
9296,
1155,
353,
8840,
836,
8,
341,
743,
753,
1944,
6031,
4506,
18990,
641,
4502,
368,
341,
197,
16867,
1273,
6031,
39820,
2271,
3126,
1972,
1155,
8,
741,
197,
630,
20082,
1061,
35315,
15578,
1669,
3056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestKafkaClient_decodeAndSendOffset_ErrorValue(t *testing.T) {
module := fixtureModule()
module.Configure("test", "consumer.test")
offsetKey := offsetKey{
Group: "testgroup",
Topic: "testtopic",
Partition: 11,
}
valueBuf := bytes.NewBuffer([]byte("\x00\x00\x00\x00\x00\x00\x00\x00\x20\xb4\x00\x0... | explode_data.jsonl/34274 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
42,
21883,
2959,
15227,
3036,
11505,
6446,
28651,
1130,
1155,
353,
8840,
836,
8,
341,
54020,
1669,
12507,
3332,
741,
54020,
78281,
445,
1944,
497,
330,
46764,
5958,
5130,
40668,
1592,
1669,
4347,
1592,
515,
197,
197,
2808,
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 TestKeyGen(t *testing.T) {
var bits int
flag.IntVar(&bits, "b", 1024, "密码默认长度1024")
err := KeyGen(bits, "public.pem", "private.pem")
if err != nil {
t.Error("KeyGen error" + err.Error())
}
} | explode_data.jsonl/68807 | {
"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,
1592,
9967,
1155,
353,
8840,
836,
8,
341,
2405,
9472,
526,
198,
30589,
7371,
3962,
2099,
11516,
11,
330,
65,
497,
220,
16,
15,
17,
19,
11,
330,
32867,
47363,
98402,
16,
15,
17,
19,
1138,
9859,
1669,
5309,
9967,
68901,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestString(t *testing.T) {
tt := T.NewT(t)
tree := buildTestTree()
const referenceString = "1 -> [2 -> [4 -> [7 8]] 3 -> [5 -> [9 10] 6]]"
tt.AssertEquals(referenceString, String(tree), "string representation of tree")
} | explode_data.jsonl/20562 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 85
} | [
2830,
3393,
703,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
350,
7121,
51,
1155,
340,
51968,
1669,
1936,
2271,
6533,
741,
4777,
5785,
703,
284,
330,
16,
1464,
508,
17,
1464,
508,
19,
1464,
508,
22,
220,
23,
5053,
220,
18,
1464,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRuntimeHooks(t *testing.T) {
ctx := context.Background()
client := enttest.Open(t, "sqlite3", "file:ent?mode=memory&cache=shared&_fk=1", enttest.WithOptions(ent.Log(t.Log)), enttest.WithMigrateOptions(migrate.WithGlobalUniqueID(true)))
defer client.Close()
var calls int
client.Use(func(next ent.Mutator) e... | explode_data.jsonl/36045 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 303
} | [
2830,
3393,
15123,
67769,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
25291,
1669,
1197,
1944,
12953,
1155,
11,
330,
37042,
18,
497,
330,
1192,
25,
306,
30,
8516,
28,
17269,
5,
9360,
28,
6100,
85047,
41718,
28,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParticipantRound1RepeatCall(t *testing.T) {
p1, err := NewParticipant(1, 2, testGenerator, curves.NewK256Scalar(), 2)
require.NoError(t, err)
_, _, err = p1.Round1(nil)
require.NoError(t, err)
_, _, err = p1.Round1(nil)
require.Error(t, err)
} | explode_data.jsonl/77860 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
67504,
27497,
16,
38718,
7220,
1155,
353,
8840,
836,
8,
341,
3223,
16,
11,
1848,
1669,
1532,
67504,
7,
16,
11,
220,
17,
11,
1273,
12561,
11,
35933,
7121,
42,
17,
20,
21,
20639,
1507,
220,
17,
340,
17957,
35699,
1155,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestConfigSelect_Job(t *testing.T) {
appName := "myapp"
testCases := map[string]struct {
setupMocks func(m configSelectMocks)
wantErr error
want string
}{
"with no jobs": {
setupMocks: func(m configSelectMocks) {
m.workloadLister.
EXPECT().
ListJobs(gomock.Eq(appName)).
Re... | explode_data.jsonl/44894 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1496
} | [
2830,
3393,
2648,
3379,
10598,
674,
1155,
353,
8840,
836,
8,
341,
28236,
675,
1669,
330,
2408,
676,
698,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
84571,
72577,
2915,
1255,
2193,
3379,
72577,
340,
197,
50780,
7747,
262,
1465,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateGateway(t *testing.T) {
tests := []struct {
name string
in proto.Message
out string
}{
{"empty", &networking.Gateway{}, "server"},
{"invalid message", &networking.Server{}, "cannot cast"},
{"happy domain",
&networking.Gateway{
Servers: []*networking.Server{{
Hosts: []string... | explode_data.jsonl/56905 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 925
} | [
2830,
3393,
17926,
40709,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
17430,
256,
18433,
8472,
198,
197,
13967,
220,
914,
198,
197,
59403,
197,
197,
4913,
3194,
497,
609,
17511,
287,
1224,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestValidate_oneof(t *testing.T) {
assert := assert.New(t)
type Model struct {
SP *string `validate:"oneof=a b c"`
S string `validate:"oneof=a b c"`
I int `validate:"oneof=1 2 3"`
U uint `validate:"oneof=1 2 3"`
B bool `validate:"oneof=true"`
F float64 `validate:"oneof=1 2.5 3"`
}
... | explode_data.jsonl/17256 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 518
} | [
2830,
3393,
17926,
11667,
1055,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
13158,
4903,
2036,
341,
197,
96174,
353,
917,
1565,
7067,
2974,
603,
1055,
24239,
293,
272,
8805,
197,
7568,
220,
914,
220,
1565,
7067,
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 TestTransformFieldFiltering(t *testing.T) {
schema := []byte(`
syntax = "proto3";
package my.app;
message A {
int64 field_int64 = 1;
}
message B {
A field_a = 1;
}
message C {
repeated B field_b = 1;
string field_str = 2;
}
`)
input := new(bytes.Buffer)
input.Write(schema)
out... | explode_data.jsonl/2080 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 333
} | [
2830,
3393,
8963,
1877,
5632,
287,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
1669,
3056,
3782,
61528,
197,
1903,
13662,
284,
330,
15110,
18,
876,
197,
197,
1722,
847,
1601,
401,
197,
24753,
362,
341,
298,
2084,
21,
19,
2070,
4042,
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 TestStore(t *testing.T) {
m := New()
// Make sure we implement the interface.
var _ storage.Store = m
assertSame := func(label string, a, b interface{}) {
if !reflect.DeepEqual(a, b) {
t.Errorf("failed equality for %s", label)
}
}
assertSame("project", StubProject, m.Project)
assertSame("worker", S... | explode_data.jsonl/27969 | {
"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,
6093,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
2822,
197,
322,
7405,
2704,
582,
4211,
279,
3749,
624,
2405,
716,
5819,
38047,
284,
296,
271,
6948,
19198,
1669,
2915,
13345,
914,
11,
264,
11,
293,
3749,
28875,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestFromStrpairMap(t *testing.T) {
t.Parallel()
Convey(`FromStrpairMap`, t, func() {
m := strpair.Map{}
m.Add("k1", "v1")
m.Add("k2", "v1")
m.Add("k2", "v2")
So(FromStrpairMap(m), ShouldResembleProto, StringPairs(
"k1", "v1",
"k2", "v1",
"k2", "v2",
))
})
} | explode_data.jsonl/32600 | {
"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,
3830,
2580,
12670,
2227,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
93070,
5617,
5809,
3830,
2580,
12670,
2227,
7808,
259,
11,
2915,
368,
341,
197,
2109,
1669,
607,
12670,
10104,
16094,
197,
2109,
1904,
445,
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 TestDeleteRequest(t *testing.T) {
setupServer()
defer teardownServer()
setupDefaultMux(`"body"`)
req := URL("http://example.com/url")
if err := req.Delete(); err != nil {
t.Error(err)
}
assertTextualBody(t, `"body"`, req.Response.Body)
assertMethod(t, "DELETE", req.Request.Method)
} | explode_data.jsonl/24743 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
6435,
1900,
1155,
353,
8840,
836,
8,
341,
84571,
5475,
741,
16867,
49304,
5475,
741,
84571,
3675,
44,
2200,
5809,
1,
2599,
39917,
692,
24395,
1669,
5548,
445,
1254,
1110,
8687,
905,
57254,
5130,
743,
1848,
1669,
4232,
18872,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateInitiator(t *testing.T) {
t.Parallel()
store, cleanup := cltest.NewStore(t)
defer cleanup()
startAt := time.Now()
endAt := startAt.Add(time.Second)
job := cltest.NewJob()
job.StartAt = cltest.NullableTime(startAt)
job.EndAt = cltest.NullableTime(endAt)
tests := []struct {
name string
... | explode_data.jsonl/75332 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 641
} | [
2830,
3393,
17926,
3803,
36122,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
57279,
11,
21290,
1669,
1185,
1944,
7121,
6093,
1155,
340,
16867,
21290,
2822,
21375,
1655,
1669,
882,
13244,
741,
6246,
1655,
1669,
1191,
1655,
1904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPathSpecificRoots(t *testing.T) {
ctx := context.New(option.WithPathOverrides(option.PathOverrides{
"/proc": "/host-proc",
"/sys": "/host-sys",
}))
paths := linuxpath.New(ctx)
path := paths.ProcCpuinfo
expectedPath := "/host-proc/cpuinfo"
if path != expectedPath {
t.Fatalf("Expected path.ProcCpu... | explode_data.jsonl/1955 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 218
} | [
2830,
3393,
1820,
47514,
8439,
82,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
7121,
30631,
26124,
1820,
80010,
30631,
17474,
80010,
515,
197,
197,
3115,
15782,
788,
3521,
3790,
9838,
66,
756,
197,
197,
3115,
7791,
788,
220,
3521,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStandardPlugins(t *testing.T) {
numStandardPlugins := 31 // importing caddyhttp plugs in this many plugins
s := caddy.DescribePlugins()
if got, want := strings.Count(s, "\n"), numStandardPlugins+5; got != want {
t.Errorf("Expected all standard plugins to be plugged in, got:\n%s", s)
}
} | explode_data.jsonl/9159 | {
"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,
19781,
45378,
1155,
353,
8840,
836,
8,
341,
22431,
19781,
45378,
1669,
220,
18,
16,
442,
49895,
272,
22478,
1254,
62534,
304,
419,
1657,
17215,
198,
1903,
1669,
272,
22478,
23548,
3114,
45378,
741,
743,
2684,
11,
1366,
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... | 2 |
func TestNewOrder(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test, either api keys or manipulaterealorders isnt set correctly")
}
_, err := b.NewOrder(BTCAUD, 100, 1, limit, bid, 0, 0, "", true, "", "")
if err != nil {
t.Error(err)
}
_, err = b.NewOrde... | explode_data.jsonl/33152 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 244
} | [
2830,
3393,
3564,
4431,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
1369,
753,
4814,
92876,
6334,
12768,
24898,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
11,
2987,
6330,
6894,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContainsDuplicates(t *testing.T) {
duplicateItem, hasDuplicate := ContainsDuplicates(&[]string{"a", "a"})
assert.Equal(t, "a", duplicateItem)
assert.True(t, hasDuplicate)
duplicateItem, hasDuplicate = ContainsDuplicates(&[]string{"a", "b"})
assert.Equal(t, "", duplicateItem)
assert.False(t, hasDuplicate... | explode_data.jsonl/43867 | {
"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,
23805,
76851,
1155,
353,
8840,
836,
8,
341,
2698,
14070,
1234,
11,
702,
53979,
1669,
30811,
76851,
2099,
1294,
917,
4913,
64,
497,
330,
64,
23625,
6948,
12808,
1155,
11,
330,
64,
497,
22513,
1234,
340,
6948,
32443,
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... | 1 |
func TestConstrainedPrefAttachmentSelectSkipNodes(t *testing.T) {
t.Parallel()
prand.Seed(time.Now().Unix())
const (
minChanSize = 0
maxChanSize = btcutil.Amount(btcutil.SatoshiPerBitcoin)
chanLimit = 3
threshold = 0.5
)
for _, graph := range chanGraphs {
success := t.Run(graph.name, func(t1 *test... | explode_data.jsonl/28785 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 989
} | [
2830,
3393,
1109,
57727,
29978,
33569,
3379,
35134,
12288,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
25653,
437,
5732,
291,
9730,
13244,
1005,
55832,
12367,
4777,
2399,
197,
25320,
46019,
1695,
284,
220,
15,
198,
197,
22543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateLien(t *testing.T) {
for _, tt := range []struct {
name string
state types.AccountState
newLien int64
wantFail bool
}{
{
name: "empty zero",
state: emptyState,
newLien: 0,
},
{
name: "empty some",
state: emptyState,
newLien: 123,
wantFail: true,
... | explode_data.jsonl/40991 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1114
} | [
2830,
3393,
4289,
43,
3591,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
24291,
262,
4494,
30877,
1397,
198,
197,
8638,
43,
3591,
220,
526,
21,
19,
198,
197,
50780,
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... | 5 |
func TestAdding(t *testing.T) {
mn := New(context.Background())
var peers []peer.ID
for i := 0; i < 3; i++ {
id := tnet.RandIdentityOrFatal(t)
a := tnet.RandLocalTCPAddress()
h, err := mn.AddPeer(id.PrivateKey(), a)
if err != nil {
t.Fatal(err)
}
peers = append(peers, h.ID())
}
p1 := peers[0]
p... | explode_data.jsonl/10780 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 685
} | [
2830,
3393,
32308,
1155,
353,
8840,
836,
8,
341,
2109,
77,
1669,
1532,
5378,
19047,
12367,
2405,
25029,
3056,
16537,
9910,
198,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
18,
26,
600,
1027,
341,
197,
15710,
1669,
259,
4711,
2013,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_DeployHandler_Execution_Errors_DeployLambdaError(t *testing.T) {
release := MockRelease()
awsc := MockAwsClients(release)
awsc.Lambda.UpdateFunctionCodeError = fmt.Errorf("AWSLambdaError")
state_machine := createTestStateMachine(t, awsc)
exec, err := state_machine.Execute(release)
assert.Error(t, err... | explode_data.jsonl/62305 | {
"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,
90680,
1989,
3050,
62,
20294,
93623,
1087,
90680,
1989,
58266,
1454,
1155,
353,
8840,
836,
8,
341,
17200,
1623,
1669,
14563,
16077,
741,
197,
672,
2388,
1669,
14563,
47359,
47174,
5801,
1623,
340,
197,
672,
2388,
1214,
5698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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(t *testing.T) {
t.Parallel()
test := func(t *testing.T, in slog.SinkEntry, exp string) {
act := entryhuman.Fmt(ioutil.Discard, in)
assert.Equal(t, "entry", exp, act)
}
t.Run("basic", func(t *testing.T) {
t.Parallel()
test(t, slog.SinkEntry{
Message: "wowowow\tizi",
Time: kt,
Le... | explode_data.jsonl/36369 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1051
} | [
2830,
3393,
5874,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18185,
1669,
2915,
1155,
353,
8840,
836,
11,
304,
34949,
808,
766,
5874,
11,
1343,
914,
8,
341,
197,
92699,
1669,
4343,
25312,
991,
2501,
1956,
30158,
909,
47560... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildEgressRouteConfiguration(t *testing.T) {
testCases := []struct {
name string
portSpecificRouteConfigs map[int][]*trafficpolicy.EgressHTTPRouteConfig
expectedRouteConfigs []*xds_route.RouteConfiguration
}{
{
name: "multiple route configs per port",
portSpecificRouteC... | explode_data.jsonl/75526 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 4302
} | [
2830,
3393,
11066,
36,
2483,
4899,
7688,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
3824,
914,
198,
197,
52257,
47514,
4899,
84905,
2415,
18640,
45725,
9,
53987,
34790,
5142,
2483,
9230,
4899,
2648,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFlushManagerNamespaceFlushTimesNoNeedFlush(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
fm, ns1, _, _ := newMultipleFlushManagerNeedsFlush(t, ctrl)
now := time.Now()
ns1.EXPECT().NeedsFlush(gomock.Any(), gomock.Any()).Return(false, nil).AnyTimes()
flushTimes, err := fm.namespaceF... | explode_data.jsonl/82131 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 157
} | [
2830,
3393,
46874,
2043,
22699,
46874,
18889,
2753,
23657,
46874,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
1166,
76,
11,
12268,
16,
11,
8358,
716,
1669,
501,
32089... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRead_ReadAndWriteDurationTimeoutConfig(t *testing.T) {
defaults := NewEnvBucket()
defaults.Setenv("read_timeout", "10s")
defaults.Setenv("write_timeout", "60s")
readConfig := types.ReadConfig{}
config := readConfig.Read(defaults)
if (config.ReadTimeout) != time.Duration(10)*time.Second {
t.Logf("Read... | explode_data.jsonl/37423 | {
"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,
4418,
38381,
3036,
7985,
12945,
7636,
2648,
1155,
353,
8840,
836,
8,
341,
11940,
82,
1669,
1532,
14359,
36018,
741,
11940,
82,
4202,
3160,
445,
878,
20537,
497,
330,
16,
15,
82,
1138,
11940,
82,
4202,
3160,
445,
4934,
2053... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMattermostInit(t *testing.T) {
s := &Mattermost{}
expectedError := fmt.Errorf(mattermostErrMsg, "Missing Mattermost channel, url or username")
var Tests = []struct {
mattermost config.Mattermost
err error
}{
{config.Mattermost{Url: "foo", Channel: "bar", Username: "username"}, nil},
{config... | explode_data.jsonl/75714 | {
"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,
44,
1650,
3562,
3803,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
609,
44,
1650,
3562,
16094,
42400,
1454,
1669,
8879,
13080,
1255,
1650,
3562,
75449,
11,
330,
25080,
33364,
3562,
5496,
11,
2515,
476,
5934,
5130,
2405,
20150,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConvertObjToStringNormalPrint(t *testing.T) {
var expected = "{Value1:42 Value2:true Value3:Moin}"
var expected2 = "+Inf"
var exampleObj = Example{
Value1: 42,
Value2: true,
Value3: "Moin",
}
var objString = convertJsonObjectToString(exampleObj, false)
if !strings.Contains(objString, expected) {... | explode_data.jsonl/3661 | {
"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,
12012,
5261,
5870,
12206,
8994,
1155,
353,
8840,
836,
8,
341,
2405,
3601,
284,
13868,
1130,
16,
25,
19,
17,
5162,
17,
18251,
5162,
18,
65207,
1961,
11195,
2405,
3601,
17,
284,
6630,
19433,
1837,
2405,
3110,
5261,
284,
1338... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateIdentity(t *testing.T) {
set := newStatefulSet(3)
pod := newStatefulSetPod(set, 1)
if !identityMatches(set, pod) {
t.Error("Newly created Pod has a bad identity")
}
pod.Namespace = ""
if identityMatches(set, pod) {
t.Error("identity matches for a Pod with the wrong namespace")
}
updateIdentit... | explode_data.jsonl/68370 | {
"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,
4289,
18558,
1155,
353,
8840,
836,
8,
341,
8196,
1669,
36848,
1262,
1649,
7,
18,
340,
3223,
347,
1669,
36848,
1262,
1649,
23527,
14171,
11,
220,
16,
340,
743,
753,
16912,
42470,
14171,
11,
7509,
8,
341,
197,
3244,
6141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func Test_IntPtrProvide(t *testing.T) {
c := NewLidi(Settings{})
a := rand.Int()
err := c.Provide(&a)
if err != nil {
t.Error(err)
}
err = c.InvokeFunction(func(b *int) {
if &a != b {
t.Fatal("Not equal")
}
})
if err != nil {
t.Error(err)
}
c = NewLidi(Settings{})
a = rand.Int()
err = c.Provide(... | explode_data.jsonl/40201 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 268
} | [
2830,
3393,
32054,
5348,
60424,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
43,
12278,
57395,
37790,
11323,
1669,
10382,
7371,
741,
9859,
1669,
272,
7763,
19448,
2099,
64,
340,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
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... | 2 |
func TestDecode(t *testing.T) {
testCases := []struct {
desc string
rootName string
pairs map[string]string
expected *sample
}{
{
desc: "simple case",
rootName: "traefik",
pairs: map[string]string{
"traefik/fielda": "bar",
"traefik/fieldb": "1",
"traefik/fieldc"... | explode_data.jsonl/27749 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1188
} | [
2830,
3393,
32564,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
257,
914,
198,
197,
33698,
675,
914,
198,
197,
3223,
4720,
262,
2415,
14032,
30953,
198,
197,
42400,
353,
13611,
198,
197,
59403,
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... | 1 |
func TestCreateFleetAndGameServerAllocate(t *testing.T) {
t.Parallel()
fixtures := []apis.SchedulingStrategy{apis.Packed, apis.Distributed}
for _, strategy := range fixtures {
strategy := strategy
t.Run(string(strategy), func(t *testing.T) {
t.Parallel()
fleets := framework.AgonesClient.AgonesV1().Fleet... | explode_data.jsonl/63306 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 448
} | [
2830,
3393,
4021,
37,
18973,
3036,
4868,
5475,
75380,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1166,
941,
18513,
1669,
3056,
13725,
808,
44356,
19816,
90,
13725,
1069,
11191,
11,
97723,
909,
25146,
630,
2023,
8358,
8282,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadConfig(t *testing.T) {
factories, err := componenttest.NopFactories()
assert.NoError(t, err)
factory := NewFactory()
factories.Processors[factory.Type()] = factory
cfg, err := configtest.LoadConfigAndValidate(path.Join(".", "testdata", "tail_sampling_config.yaml"), factories)
require.Nil(t, err)
r... | explode_data.jsonl/8408 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 598
} | [
2830,
3393,
5879,
2648,
1155,
353,
8840,
836,
8,
341,
1166,
52893,
11,
1848,
1669,
3692,
1944,
2067,
453,
17417,
2433,
741,
6948,
35699,
1155,
11,
1848,
692,
1166,
2919,
1669,
1532,
4153,
741,
1166,
52893,
29012,
1087,
58,
21618,
10184,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStorageMetal3MachineSpec(t *testing.T) {
key := types.NamespacedName{
Name: "foo",
Namespace: "default",
}
created := &Metal3Machine{
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Namespace: "default",
},
Spec: Metal3MachineSpec{
UserData: &corev1.SecretReference{
Name: "foo"... | explode_data.jsonl/50910 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 452
} | [
2830,
3393,
5793,
65661,
18,
21605,
8327,
1155,
353,
8840,
836,
8,
341,
23634,
1669,
4494,
98932,
68552,
675,
515,
197,
21297,
25,
414,
330,
7975,
756,
197,
90823,
25,
330,
2258,
756,
197,
630,
197,
7120,
1669,
609,
65661,
18,
21605,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateValidateTokenUsages(t *testing.T) {
var tests = []struct {
u []string
f *field.Path
expected bool
}{
{[]string{}, nil, true}, // supported (no usages)
{[]string{"signing", "authentication"}, nil, true}, // supported
{[]string{"something else"}, nil... | explode_data.jsonl/39219 | {
"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,
17926,
17926,
3323,
3558,
1134,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
10676,
286,
3056,
917,
198,
197,
1166,
286,
353,
2566,
17474,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
90,
1294,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDeviceByID(t *testing.T) {
client, _, device, err := test.NewClientServer()
if err != nil {
t.Fatal(err)
}
assert := assert.New(t)
device2, err := client.GetDeviceByID(device.ID)
assert.NoError(err)
assert.EqualValues(device, device2)
} | explode_data.jsonl/34115 | {
"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,
1949,
6985,
60572,
1155,
353,
8840,
836,
8,
341,
25291,
11,
8358,
3671,
11,
1848,
1669,
1273,
7121,
2959,
5475,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
6948,
1669,
2060,
7121,
1155,
692,
5471... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJolokia2_TagRenaming(t *testing.T) {
config := `
[jolokia2_agent]
default_tag_prefix = "DEFAULT_PREFIX_"
urls = ["%s"]
[[jolokia2_agent.metric]]
name = "default_tag_prefix"
mbean = "default_tag_prefix:biz=baz,fiz=faz"
tag_keys = ["biz", "fiz"]
[[jolokia2_agent.metric]]
name = "cu... | explode_data.jsonl/5356 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 642
} | [
2830,
3393,
41,
337,
27552,
17,
78040,
34625,
6469,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
22074,
197,
3809,
337,
27552,
17,
25730,
921,
197,
11940,
9372,
13974,
284,
330,
17285,
18519,
62,
698,
197,
19320,
82,
284,
4383,
4,
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 |
func TestFirestoreCreateDocument(t *testing.T) {
var name string = "name3373707"
var expectedResponse = &firestorepb.Document{
Name: name,
}
mockFirestore.err = nil
mockFirestore.reqs = nil
mockFirestore.resps = append(mockFirestore.resps[:0], expectedResponse)
var formattedParent string = fmt.Sprintf("proj... | explode_data.jsonl/27374 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 441
} | [
2830,
3393,
48513,
4021,
7524,
1155,
353,
8840,
836,
8,
341,
2405,
829,
914,
284,
330,
606,
18,
18,
22,
18,
22,
15,
22,
698,
2405,
3601,
2582,
284,
609,
10796,
4314,
16650,
26256,
515,
197,
21297,
25,
829,
345,
197,
630,
77333,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplicationContext_CircleAutowire(t *testing.T) {
// 直接创建的 Object 直接发生循环依赖是没有关系的。
c := gs.New()
c.Object(new(CircleA))
c.Object(new(CircleB))
c.Object(new(CircleC))
err := c.Refresh()
assert.Nil(t, err)
} | explode_data.jsonl/17418 | {
"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,
19736,
920,
7074,
32,
9616,
554,
1155,
353,
8840,
836,
8,
341,
197,
322,
74866,
112,
29077,
50377,
9370,
3002,
74866,
112,
29077,
99726,
101353,
105537,
107934,
100145,
9370,
8997,
1444,
1669,
28081,
7121,
741,
1444,
8348,
175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMetablockSignWithRSA(t *testing.T) {
var mb Metablock
if err := mb.Load("demo.layout"); err != nil {
t.Errorf("Cannot parse template file: %s", err)
}
invalidKey := Key{
KeyID: "test",
KeyIDHashAlgorithms: nil,
KeyType: "rsa",
KeyVal: KeyVal{},
Scheme: ... | explode_data.jsonl/51769 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
34673,
370,
1023,
7264,
2354,
73564,
1155,
353,
8840,
836,
8,
341,
2405,
10016,
6212,
370,
1023,
198,
743,
1848,
1669,
10016,
13969,
445,
25762,
7619,
5038,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
17444,
4715,
3811,
103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFindInstanceByNodeNameExcludesTerminatedInstances(t *testing.T) {
awsServices := NewFakeAWSServices()
nodeName := types.NodeName("my-dns.internal")
var tag ec2.Tag
tag.Key = aws.String(TagNameKubernetesClusterLegacy)
tag.Value = aws.String(TestClusterId)
tags := []*ec2.Tag{&tag}
var runningInstance e... | explode_data.jsonl/12854 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 481
} | [
2830,
3393,
9885,
2523,
1359,
1955,
675,
840,
7396,
21209,
51199,
42725,
1155,
353,
8840,
836,
8,
341,
197,
8635,
11025,
1669,
1532,
52317,
14419,
1220,
2161,
2822,
20831,
675,
1669,
4494,
21714,
675,
445,
2408,
1737,
4412,
18264,
5130,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAsyncCreateError(t *testing.T) {
ch := make(chan struct{})
storage := SimpleRESTStorage{
injectedFunction: func(obj runtime.Object) (runtime.Object, error) {
<-ch
return nil, apierrs.NewAlreadyExists("foo", "bar")
},
}
selfLinker := &setTestSelfLinker{
t: t,
id: "bar",
ex... | explode_data.jsonl/71504 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 734
} | [
2830,
3393,
6525,
4021,
1454,
1155,
353,
8840,
836,
8,
341,
23049,
1669,
1281,
35190,
2036,
37790,
197,
16172,
1669,
8993,
38307,
5793,
515,
197,
17430,
28303,
5152,
25,
2915,
6779,
15592,
8348,
8,
320,
22255,
8348,
11,
1465,
8,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_TX_GetScan(t *testing.T) {
table := createInitTable()
defer dropTable(table)
gtest.C(t, func(t *gtest.T) {
tx, err := db.Begin()
if err != nil {
gtest.Error(err)
}
type User struct {
Id int
Passport string
Password string
NickName string
CreateTime gtime.Time
}
... | explode_data.jsonl/41319 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1252
} | [
2830,
3393,
18819,
13614,
26570,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
1855,
3803,
2556,
741,
16867,
5943,
2556,
15761,
692,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
46237,
11,
1848,
1669,
2927,
28467,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefaultOptionValues(t *testing.T) {
var args struct {
A int `default:"123"`
B *int `default:"123"`
C string `default:"abc"`
D *string `default:"abc"`
E float64 `default:"1.23"`
F *float64 `default:"1.23"`
G bool `default:"true"`
H *bool `default:"true"`
}
err := parse("-... | explode_data.jsonl/13079 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 298
} | [
2830,
3393,
3675,
5341,
6227,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
22985,
526,
414,
1565,
2258,
2974,
16,
17,
18,
8805,
197,
12791,
353,
396,
257,
1565,
2258,
2974,
16,
17,
18,
8805,
197,
6258,
914,
256,
1565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogger_JSON(t *testing.T) {
t.Run("json formatting", func(t *testing.T) {
var buf bytes.Buffer
logger := New(&LoggerOptions{
Name: "test",
Output: &buf,
JSONFormat: true,
})
logger.Info("this is test", "who", "programmer", "why", "testing is fun")
b := buf.Bytes()
var raw map... | explode_data.jsonl/22707 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2094
} | [
2830,
3393,
7395,
25356,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
2236,
36566,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
2405,
6607,
5820,
22622,
198,
197,
17060,
1669,
1532,
2099,
7395,
3798,
515,
298,
21297,
25,
981,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestStaticFunc_Starts_with(t *testing.T) {
final1, _ := start.Eval("TIBCO Web Integrator", "TIBCO")
assert.Equal(t, true, final1)
final2, _ := start.Eval("网路 Integrator", "网路")
assert.Equal(t, true, final2)
final3, _ := start.Eval("TIBCO 网路 Integrator", "网路")
assert.Equal(t, false, final3)
} | explode_data.jsonl/53391 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 147
} | [
2830,
3393,
11690,
9626,
38056,
82,
6615,
1155,
353,
8840,
836,
8,
341,
14213,
16,
11,
716,
1669,
1191,
5142,
831,
445,
51,
3256,
8281,
4895,
29001,
850,
497,
330,
51,
3256,
8281,
1138,
6948,
12808,
1155,
11,
830,
11,
1590,
16,
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... | 1 |
func TestACLReplication_IsACLReplicationEnabled(t *testing.T) {
// ACLs not enabled.
dir1, s1 := testServerWithConfig(t, func(c *Config) {
c.ACLDatacenter = ""
})
defer os.RemoveAll(dir1)
defer s1.Shutdown()
if s1.IsACLReplicationEnabled() {
t.Fatalf("should not be enabled")
}
// ACLs enabled but not repli... | explode_data.jsonl/34824 | {
"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,
55393,
18327,
1693,
31879,
55393,
18327,
1693,
5462,
1155,
353,
8840,
836,
8,
341,
197,
322,
43461,
82,
537,
8970,
624,
48532,
16,
11,
274,
16,
1669,
1273,
5475,
2354,
2648,
1155,
11,
2915,
1337,
353,
2648,
8,
341,
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 TestBadStreamSend(t *testing.T) {
m := &erroneousSendMockD{recvVal: makeSeek(systemChainID, &ab.SeekInfo{Start: seekNewest, Stop: seekNewest, Behavior: ab.SeekInfo_BLOCK_UNTIL_READY})}
ds := initializeDeliverHandler()
assert.Error(t, ds.Handle(m), "Should catch unexpected stream error")
} | explode_data.jsonl/36270 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
17082,
3027,
11505,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
609,
615,
603,
782,
11505,
11571,
35,
90,
33977,
2208,
25,
1281,
39350,
46006,
18837,
915,
11,
609,
370,
76465,
1731,
90,
3479,
25,
5931,
3564,
477,
11,
14215,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ObjectTracker_Unexpected_Does_Not_Prevent_Satisfied(t *testing.T) {
g := gomega.NewWithT(t)
ot := newObjTracker(schema.GroupVersionKind{}, nil)
ct := makeCT("test-ct")
ot.Observe(ct)
g.Expect(ot.Satisfied()).NotTo(gomega.BeTrue(), "unpopulated tracker should not be satisfied")
// ** Do not expect the... | explode_data.jsonl/52327 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 171
} | [
2830,
3393,
27839,
31133,
62,
29430,
1557,
7072,
60816,
79561,
684,
1098,
46265,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
2354,
51,
1155,
340,
197,
354,
1669,
74259,
31133,
42735,
5407,
5637,
10629,
22655,
2092,
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... | 1 |
func TestSokuonD(t *testing.T) {
const want = "ddajjizzuddeddo"
for _, v := range []string{"っだっぢっづっでっど", "ッダッヂッヅッデッド"} {
got, err := KanaToRomaji(v)
assert.Equal(t, want, got)
assert.Nil(t, err)
}
} | explode_data.jsonl/11348 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
50,
16493,
263,
35,
1155,
353,
8840,
836,
8,
341,
4777,
1366,
284,
330,
631,
1630,
73,
8759,
85792,
2982,
1837,
2023,
8358,
348,
1669,
2088,
3056,
917,
4913,
41791,
35685,
125388,
95,
41791,
125301,
41791,
16161,
41791,
6654... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetHash(t *testing.T) {
table := []struct {
s string
h uint32
}{
{"test1", 2569220284},
{"random data", 1626193638},
{"excel", 1973829744},
{"One More...12345!", 2258028052},
}
for _, x := range table {
h := GetHash(x.s)
if h != x.h {
t.Errorf("Hash was incorrect, got: %d, want: %d.", h,... | explode_data.jsonl/81012 | {
"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,
6370,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
3056,
1235,
341,
197,
1903,
914,
198,
197,
9598,
2622,
18,
17,
198,
197,
59403,
197,
197,
4913,
1944,
16,
497,
220,
17,
20,
21,
24,
17,
17,
15,
17,
23,
19,
1583,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.