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 TestBasicAuth(t *testing.T) {
expected := "hello"
background := httptest.NewServer(ConstantHanlder(expected))
defer background.Close()
proxy := goproxy.NewProxyHttpServer()
proxy.OnRequest().Do(auth.Basic("my_realm", func(user, passwd string) bool {
return user == "user" && passwd == "open sesame"
}))
cli... | explode_data.jsonl/43782 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 490
} | [
2830,
3393,
15944,
5087,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
330,
14990,
698,
30738,
1669,
54320,
70334,
7121,
5475,
50989,
73125,
76869,
15253,
1171,
16867,
4004,
10421,
741,
197,
22803,
1669,
342,
45926,
4130,
7121,
16219,
2905,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCommitsUniqueToBranch(t *testing.T) {
t.Parallel()
ctx := actor.WithActor(context.Background(), &actor.Actor{
UID: 1,
})
db := database.NewMockDB()
gitCommands := append([]string{"git checkout -b my-branch"}, getGitCommandsWithFiles("file1", "file2")...)
gitCommands = append(gitCommands, getGitCommands... | explode_data.jsonl/8528 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 876
} | [
2830,
3393,
17977,
1199,
22811,
1249,
18197,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
12089,
26124,
18870,
5378,
19047,
1507,
609,
5621,
76094,
515,
197,
197,
6463,
25,
220,
16,
345,
197,
3518,
20939,
1669,
462... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_newEnv(t *testing.T) {
assert.Equal(t, &argoappv1.Env{
&argoappv1.EnvEntry{Name: "ARGOCD_APP_NAME", Value: "my-app-name"},
&argoappv1.EnvEntry{Name: "ARGOCD_APP_NAMESPACE", Value: "my-namespace"},
&argoappv1.EnvEntry{Name: "ARGOCD_APP_REVISION", Value: "my-revision"},
&argoappv1.EnvEntry{Name: "ARGOC... | explode_data.jsonl/5695 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 410
} | [
2830,
3393,
5921,
14359,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
1155,
11,
609,
12088,
676,
85,
16,
81214,
515,
197,
197,
5,
12088,
676,
85,
16,
81214,
5874,
63121,
25,
330,
7581,
46,
6484,
16410,
4708,
497,
5162,
25,
330,
2408,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSnapshotMigration(t *testing.T) {
t.Run("testSnapshot", testSnapshot)
t.Run("testSnapshotRestore", testSnapshotRestore)
t.Run("testMigration", testMigration)
t.Run("testWebhook", testWebhook)
} | explode_data.jsonl/39816 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 76
} | [
2830,
3393,
15009,
20168,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
15009,
497,
1273,
15009,
340,
3244,
16708,
445,
1944,
15009,
56284,
497,
1273,
15009,
56284,
340,
3244,
16708,
445,
1944,
20168,
497,
1273,
20168,
340,
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 |
func TestSnapshotCacheFetch(t *testing.T) {
c := cache.NewSnapshotCache(true, group{}, logger{t: t})
if err := c.SetSnapshot(key, snapshot); err != nil {
t.Fatal(err)
}
for _, typ := range testTypes {
t.Run(typ, func(t *testing.T) {
resp, err := c.Fetch(context.Background(), discovery.DiscoveryRequest{TypeU... | explode_data.jsonl/6681 | {
"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,
15009,
8233,
20714,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
6500,
7121,
15009,
8233,
3715,
11,
1874,
22655,
5925,
90,
83,
25,
259,
3518,
743,
1848,
1669,
272,
4202,
15009,
4857,
11,
16295,
1215,
1848,
961,
2092,
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... | 4 |
func TestPickGenerator(t *testing.T) {
// pick from file
g, err := NewPickFromFileGenerator("/non/existant.file")
CheckTrue(t, err != nil, "Should return an error when reading from non existant file")
CheckTrue(t, g == nil, "Should return a nil generator when reading from non existant file")
// pick from values
v... | explode_data.jsonl/12229 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 304
} | [
2830,
3393,
36953,
12561,
1155,
353,
8840,
836,
8,
341,
197,
322,
3735,
504,
1034,
198,
3174,
11,
1848,
1669,
1532,
36953,
43633,
12561,
4283,
6280,
25815,
11202,
9715,
1138,
69472,
2514,
1155,
11,
1848,
961,
2092,
11,
330,
14996,
470,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSplit(t *testing.T) {
t.Parallel()
output := &bytes.Buffer{}
stack := []cards.Card{
{Rank: cards.Six, Suit: cards.Heart},
{Rank: cards.Six, Suit: cards.Club},
{Rank: cards.Nine, Suit: cards.Spade},
{Rank: cards.Four, Suit: cards.Diamond},
}
deck := cards.Deck{
Cards: stack,
}
g, err := blac... | explode_data.jsonl/5933 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 725
} | [
2830,
3393,
20193,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
21170,
1669,
609,
9651,
22622,
31483,
48227,
1669,
3056,
25024,
48613,
515,
197,
197,
90,
22550,
25,
7411,
808,
941,
11,
32611,
25,
7411,
13,
45384,
1583,
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 TestWorkload_Run(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
w, err := NewWorkload(
Config{Conninfo: db.TestConninfo, Jobs: 2, Rate: 2},
log.NewDefaultLogger("error"),
)
assert.NoError(t, err)
err = w.Run(ctx)
assert.Nil(t, err)
} | explode_data.jsonl/66581 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
6776,
1078,
84158,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
220,
17,
77053,
32435,
340,
16867,
9121,
2822,
6692,
11,
1848,
1669,
1532,
6776,
1078,
1006,
197,
66156,
90,
9701,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLazyUploadingTaskReader_Happy(t *testing.T) {
ttm := &core.TaskTemplate{}
ctx := context.TODO()
tr := &mocks.TaskReader{}
tr.OnRead(ctx).Return(ttm, nil)
rawStore, err := storage.NewInMemoryRawStore(nil, promutils.NewTestScope())
assert.NoError(t, err)
protoStore := storage.NewDefaultProtobufStore(raw... | explode_data.jsonl/2658 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
39766,
2324,
10628,
6262,
5062,
2039,
11144,
1155,
353,
8840,
836,
8,
341,
3244,
13730,
1669,
609,
2153,
28258,
7275,
31483,
20985,
1669,
2266,
90988,
741,
25583,
1669,
609,
16712,
82,
28258,
5062,
16094,
25583,
8071,
4418,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCode(t *testing.T) {
input := CreateTestInput(t)
t.Run("deploy contract testCheck", func(t *testing.T) {
ctx := input.Ctx
cvmk := input.CvmKeeper
bytecode, err := hex.DecodeString(Hello55BytecodeString)
require.Nil(t, err)
addr, err := crypto.AddressFromBytes(Addrs[0].Bytes())
require.Nil(t, err... | explode_data.jsonl/14838 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 327
} | [
2830,
3393,
2078,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
4230,
2271,
2505,
1155,
692,
3244,
16708,
445,
35794,
5116,
1273,
3973,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
20985,
1669,
1946,
727,
3998,
198,
197,
1444,
7338,
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 TestLeaveTeam(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
th.CheckCommand(t, "team", "remove", th.BasicTeam.Name, th.BasicUser.Email)
profiles := th.Client.Must(th.Client.GetUsersInTeam(th.BasicTeam.Id, 0, 1000, "")).([]*model.User)
found := false
for _, user := range profiles {
if us... | explode_data.jsonl/65274 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
21833,
14597,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
70479,
10600,
4062,
1155,
11,
330,
9196,
497,
330,
5399,
497,
270,
48868,
14597,
2967,
11,
270,
48868,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStructPtrSetField(t *testing.T) {
foo := &contact{
Name: "bill",
}
_, err := starlight.Eval([]byte(`foo.Name = "mary"`), map[string]interface{}{"foo": foo}, nil)
if err != nil {
t.Fatal(err)
}
expected := "mary"
if foo.Name != expected {
t.Fatalf("expected %q, but was %q", expected, foo.Name)
}
... | explode_data.jsonl/47068 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 135
} | [
2830,
3393,
9422,
5348,
1649,
1877,
1155,
353,
8840,
836,
8,
341,
197,
7975,
1669,
609,
6287,
515,
197,
21297,
25,
330,
29642,
756,
197,
630,
197,
6878,
1848,
1669,
6774,
4145,
5142,
831,
10556,
3782,
5809,
7975,
2967,
284,
330,
1534,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequiredPtr(t *testing.T) {
type Test struct {
Bool *bool `validate:"required"`
}
validate := New()
f := false
test := Test{
Bool: &f,
}
err := validate.Struct(test)
Equal(t, err, nil)
tr := true
test.Bool = &tr
err = validate.Struct(test)
Equal(t, err, nil)
test.Bool = nil
err = va... | explode_data.jsonl/77344 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 741
} | [
2830,
3393,
8164,
5348,
1155,
353,
8840,
836,
8,
1476,
13158,
3393,
2036,
341,
197,
197,
11233,
353,
2641,
1565,
7067,
2974,
6279,
8805,
197,
630,
197,
7067,
1669,
1532,
2822,
1166,
1669,
895,
271,
18185,
1669,
3393,
515,
197,
197,
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 TestNewGetStateResponse(t *testing.T) {
assert := assert.New(t)
pubnub.Config.UUID = "my-custom-uuid"
jsonBytes := []byte(`{"status": 200, "message": "OK", "payload": {"k": "v"}, "uuid": "my-custom-uuid", "channel": "my-channel", "service": "Presence"}`)
res, _, err := newGetStateResponse(jsonBytes, fakeRes... | explode_data.jsonl/32490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 198
} | [
2830,
3393,
3564,
1949,
1397,
2582,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
62529,
77,
392,
10753,
39636,
284,
330,
2408,
36898,
12,
17128,
1837,
30847,
7078,
1669,
3056,
3782,
5809,
4913,
2829,
788,
220,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestWaitForInclusion(t *testing.T) {
ctx := context.Background()
tree := proto.Clone(stestonly.LogTree).(*trillian.Tree)
env, client := clientEnvForTest(ctx, t, tree)
tree.TreeId = client.LogID
defer env.Close()
for _, test := range []struct {
desc string
leaf []byte
client trill... | explode_data.jsonl/54603 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 617
} | [
2830,
3393,
14190,
2461,
641,
8957,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
51968,
1669,
18433,
64463,
5895,
477,
3243,
5247,
6533,
568,
4071,
376,
64721,
43640,
340,
57538,
11,
2943,
1669,
2943,
14359,
2461,
2271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestConcurrentProcessRangeRequest(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
wg := &sync.WaitGroup{}
requestIDs := new(sync.Map)
ch1 := make(chan *cdcpb.ChangeDataEvent, 10)
srv1 := newMockChangeDataService(t, ch1)
srv1.recvLoop = func(server cdcpb.ChangeData_EventFeedServer) {
... | explode_data.jsonl/32885 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1485
} | [
2830,
3393,
1109,
3231,
7423,
6046,
1900,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
72079,
1669,
609,
12996,
28384,
2808,
31483,
23555,
30466,
1669,
501,
97233,
10104,
340,
23049,
16,
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 TestOrderedNodesSlice(t *testing.T) {
for _, test := range orderedNodesTests {
it := iterator.NewOrderedNodes(test.nodes)
for i := 0; i < 2; i++ {
got := it.NodeSlice()
want := test.nodes
if !reflect.DeepEqual(got, want) {
t.Errorf("unexpected iterator output for round %d: got:%#v want:%#v", i, g... | explode_data.jsonl/31423 | {
"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,
54384,
12288,
33236,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
11457,
12288,
18200,
341,
197,
23374,
1669,
15091,
7121,
54384,
12288,
8623,
21697,
340,
197,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestEndsWith(t *testing.T) {
cs := []struct {
w bool
s string
b string
}{
{true, "", ""},
{true, "foobar", ""},
{false, "", "f"},
{true, "foobar", "bar"},
{true, "一二三四五", "四五"},
{false, "f", "oo"},
{false, "一", "一二三四五"},
{false, "foobar", "oo"},
{false, "一二三四五", "二"},
}
for i, c := r... | explode_data.jsonl/80915 | {
"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,
3727,
16056,
1155,
353,
8840,
836,
8,
341,
71899,
1669,
3056,
1235,
341,
197,
6692,
1807,
198,
197,
1903,
914,
198,
197,
2233,
914,
198,
197,
59403,
197,
197,
90,
1866,
11,
7342,
77496,
197,
197,
90,
1866,
11,
330,
50267... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseStepDuration(t *testing.T) {
tests := []struct {
markup string
dur time.Duration
}{
{`<p><span class="c9">Duration: 1:30</span></p>`, 2 * time.Minute},
{`<p><span class="c9">Duration: 1:30 </span></p>`, 2 * time.Minute},
{`<p><span class="c9">Duration: 1:30</span> </p>`, 2 * time.Minute},
... | explode_data.jsonl/41567 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 477
} | [
2830,
3393,
14463,
8304,
12945,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
2109,
838,
454,
914,
198,
197,
2698,
324,
262,
882,
33795,
198,
197,
59403,
197,
197,
90,
63,
27,
79,
1784,
1480,
536,
428,
66,
24,
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 TestFilterCaching(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
d := setupDHT(ctx, t, true)
remote, _ := manet.FromIP(net.IPv4(8, 8, 8, 8))
if PrivateRoutingTableFilter(d, []network.Conn{&mockConn{
local: d.Host().Peerstore().PeerInfo(d.Host().ID()),
remote: peer... | explode_data.jsonl/58595 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 223
} | [
2830,
3393,
5632,
34,
11829,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
741,
2698,
1669,
6505,
35,
2545,
7502,
11,
259,
11,
830,
692,
197,
18147,
11,
716,
1669,
883,
295,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadGistFiles(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mock := mocks.NewMockGithubGists(ctrl)
ctx := context.Background()
gistID := "1"
conn := Connection{ctx: ctx,
client: mock,
gistID: gistID}
//error getting the list of gists
mock.EXPECT().Get(ctx, gistID).Return(ni... | explode_data.jsonl/63183 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 609
} | [
2830,
3393,
5879,
38,
380,
10809,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
741,
77333,
1669,
68909,
7121,
11571,
78717,
38,
1671,
62100,
340,
20985,
1669,
2266,
19047,
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 TestBaseIdentity_GetHandSize(t *testing.T) {
i := getTestBaseIdentity()
aehs := i.GetHandSize()
if aehs != TestAltEgoHandSize {
t.Errorf("While isHero is false, hand size should equal alter ego hand size. Expected: %d, got %d", TestAltEgoHandSize, aehs)
}
i.ChangeForm()
hhs := i.GetHandSize()
if hhs !=... | explode_data.jsonl/55786 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 177
} | [
2830,
3393,
3978,
18558,
13614,
2314,
1695,
1155,
353,
8840,
836,
8,
341,
8230,
1669,
633,
2271,
3978,
18558,
2822,
11323,
2636,
82,
1669,
600,
2234,
2314,
1695,
741,
743,
264,
2636,
82,
961,
3393,
26017,
36,
3346,
2314,
1695,
341,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestKeySigning(t *testing.T) {
for i := 0; i < 5; i++ {
keypair := GenerateNewKeypair()
data := helpers.ArrayOfBytes(i, 'a')
hash := helpers.SHA256(data)
signature, err := keypair.Sign(hash)
if err != nil {
t.Error("base58 error")
} else if !SignatureVerify(keypair.Public, signature, hash) {
... | explode_data.jsonl/69320 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 155
} | [
2830,
3393,
1592,
93358,
1155,
353,
8840,
836,
8,
1476,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
20,
26,
600,
1027,
341,
197,
23634,
12670,
1669,
19813,
3564,
6608,
1082,
1310,
2822,
197,
8924,
1669,
30187,
8114,
2124,
7078,
1956,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoopbackAndMatchPredicate(t *testing.T) {
// Test split and shadow routes are used:
// the backend set in the split route should serve the request issued by the client
// the backend set in the shadow route should serve the request issued by the teeLoopback
// the backend set in the original route should n... | explode_data.jsonl/79419 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 528
} | [
2830,
3393,
14620,
1419,
3036,
8331,
36329,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
6718,
323,
12455,
11291,
525,
1483,
510,
197,
322,
279,
19163,
738,
304,
279,
6718,
6021,
1265,
8683,
279,
1681,
10897,
553,
279,
2943,
198,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestOpenIDConnectProviderID(t *testing.T) {
cases := []struct {
Input string
Valid bool
}{
{
// empty
Input: "",
Valid: false,
},
{
// missing SubscriptionId
Input: "/",
Valid: false,
},
{
// missing value for SubscriptionId
Input: "/subscriptions/",
Valid: false,
},... | explode_data.jsonl/29092 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 855
} | [
2830,
3393,
5002,
915,
14611,
5179,
915,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
66588,
914,
198,
197,
197,
4088,
1807,
198,
197,
92,
4257,
197,
197,
515,
298,
197,
322,
4287,
198,
298,
66588,
25,
8324,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInsertSetID(t *testing.T) {
e := newTestInsert()
newID := "oaijnifo"
e.SetID(newID)
if e.StatementID != newID {
t.Errorf("Expected: %v\nGot: %v\n", newID, e.StatementID)
}
} | explode_data.jsonl/67935 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
13780,
1649,
915,
1155,
353,
8840,
836,
8,
972,
7727,
1669,
501,
2271,
13780,
3568,
8638,
915,
1669,
330,
78,
2143,
93808,
31497,
5031,
7727,
4202,
915,
1755,
915,
1218,
743,
384,
70215,
915,
961,
501,
915,
972,
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... | 2 |
func TestMarathonSDRemoveApp(t *testing.T) {
ch, md := newTestDiscovery(func(url string) (*AppList, error) {
return marathonTestAppList(marathonValidLabel, 1), nil
})
go func() {
up1 := (<-ch)[0]
up2 := (<-ch)[0]
if up2.Source != up1.Source {
t.Fatalf("Source is different: %s", up2)
if len(up2.Targets... | explode_data.jsonl/65405 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 309
} | [
2830,
3393,
12061,
23941,
5491,
13021,
2164,
1155,
353,
8840,
836,
8,
341,
23049,
11,
10688,
1669,
501,
2271,
67400,
18552,
6522,
914,
8,
4609,
2164,
852,
11,
1465,
8,
341,
197,
853,
44696,
2271,
2164,
852,
1255,
277,
23941,
4088,
247... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAgent_Self_ACLDeny(t *testing.T) {
t.Parallel()
a := NewTestAgent(t.Name(), TestACLConfig())
defer a.Shutdown()
t.Run("no token", func(t *testing.T) {
req, _ := http.NewRequest("GET", "/v1/agent/self", nil)
if _, err := a.srv.AgentSelf(nil, req); !acl.IsErrPermissionDenied(err) {
t.Fatalf("err: %v"... | explode_data.jsonl/33595 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 369
} | [
2830,
3393,
16810,
1098,
490,
97627,
23619,
88,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
1669,
1532,
2271,
16810,
1155,
2967,
1507,
3393,
55393,
2648,
2398,
16867,
264,
10849,
18452,
2822,
3244,
16708,
445,
2152,
3950,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccPipelineNotificationStageBasic(t *testing.T) {
var pipelineRef client.Pipeline
var stages []client.Stage
pipeName := fmt.Sprintf("tf-acc-test-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum))
completeText := "complete!"
newCompleteText := completeText + "-new"
pipelineResourceName := "s... | explode_data.jsonl/29891 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1058
} | [
2830,
3393,
14603,
34656,
11196,
19398,
15944,
1155,
353,
8840,
836,
8,
341,
2405,
15301,
3945,
2943,
1069,
8790,
198,
2405,
17628,
3056,
2972,
69873,
198,
197,
13768,
675,
1669,
8879,
17305,
445,
8935,
12,
4475,
16839,
11069,
82,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLockUnchangedRowKey(t *testing.T) {
store, clean := createMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk2 := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk2.MustExec("use test")
tk.MustExec("drop table if exists unchanged")
tk.MustExec("create table unchanged (id in... | explode_data.jsonl/12460 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 363
} | [
2830,
3393,
11989,
1806,
17353,
3102,
1592,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1855,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHMAC(t *testing.T) {
t.Log(hash.HMAC("md5", "123456", "0"))
t.Log(hash.HMAC("sha1", "123456", "0"))
t.Log(hash.HMAC("sha256", "123456", "0"))
t.Log(hash.HMAC("sha512", "123456", "0"))
} | explode_data.jsonl/70159 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
3393,
39,
25788,
1155,
353,
8840,
836,
8,
341,
3244,
5247,
27580,
3839,
25788,
445,
2277,
20,
497,
330,
16,
17,
18,
19,
20,
21,
497,
330,
15,
5455,
3244,
5247,
27580,
3839,
25788,
445,
15247,
16,
497,
330,
16,
17,
18,
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 TestEnvironment(t *testing.T) {
os.Setenv("AZURE_SDK_GO_LOGGING", "all")
defer os.Unsetenv("AZURE_SDK_GO_LOGGING")
initLogging()
if log.lst == nil {
t.Fatal("unexpected nil listener")
}
} | explode_data.jsonl/62216 | {
"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,
12723,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
23563,
4521,
84197,
39622,
8419,
49437,
497,
330,
541,
1138,
16867,
2643,
10616,
746,
3160,
445,
23563,
4521,
84197,
39622,
8419,
49437,
1138,
28248,
34575,
741,
743... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestAddVolumeWithTMRNonONTAPNAS(t *testing.T) {
// Add a single backend of fake
// create volume with relationship annotation added
// witness failure
const (
backendName = "addRecoveryBackend"
scName = "addRecoveryBackendSC"
fullVolumeName = "addRecoveryVolumeFull"
txOnlyVolumeName = ... | explode_data.jsonl/62727 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 312
} | [
2830,
3393,
2212,
18902,
2354,
51,
18446,
8121,
10232,
2537,
34496,
1155,
353,
8840,
836,
8,
341,
197,
322,
2691,
264,
3175,
19163,
315,
12418,
198,
197,
322,
1855,
8123,
448,
5025,
21223,
3694,
198,
197,
322,
11298,
7901,
198,
4777,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateFromPassword_DefaultCost(t *testing.T) {
t.Parallel()
key := NewEncryptionKey()
password := []byte("password")
// Test that work factor is at least the default cost, even if a smaller
// value is passsed.
encryptedPassword, err := GenerateFromPassword(password, 10, key)
if err != nil {
t.Fat... | explode_data.jsonl/54123 | {
"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,
31115,
3830,
4876,
60336,
14940,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
23634,
1669,
1532,
79239,
1592,
741,
58199,
1669,
3056,
3782,
445,
3833,
5130,
197,
322,
3393,
429,
975,
8168,
374,
518,
3245,
279,
1638... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateObjectMetaTrimsTrailingSlash(t *testing.T) {
errs := ValidateObjectMeta(&api.ObjectMeta{Name: "test", GenerateName: "foo-"}, false, NameIsDNSSubdomain)
if len(errs) != 0 {
t.Fatalf("unexpected errors: %v", errs)
}
} | explode_data.jsonl/62781 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
17926,
1190,
12175,
1282,
5742,
1282,
14277,
88004,
1155,
353,
8840,
836,
8,
341,
9859,
82,
1669,
23282,
1190,
12175,
2099,
2068,
80222,
63121,
25,
330,
1944,
497,
19813,
675,
25,
330,
7975,
12,
14345,
895,
11,
3988,
3872,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInterpretEnumConstructor(t *testing.T) {
t.Parallel()
inter := parseCheckAndInterpret(t, `
enum E: Int64 {
case a
case b
}
let res = [
E(rawValue: 0)! == E.a,
E(rawValue: 1)! == E.b,
E(rawValue: -1) == nil,
E(rawValue: 2) == nil... | explode_data.jsonl/63666 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 345
} | [
2830,
3393,
3306,
8043,
10766,
13288,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
58915,
1669,
4715,
3973,
3036,
3306,
8043,
1155,
11,
22074,
414,
7618,
468,
25,
1333,
21,
19,
341,
688,
1142,
264,
198,
688,
1142,
293,
198,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFactoryVerifyChequebook(t *testing.T) {
factoryAddress := common.HexToAddress("0xabcd")
chequebookAddress := common.HexToAddress("0xefff")
factory := chequebook.NewFactory(
backendmock.New(),
transactionmock.New(
transactionmock.WithABICall(
&factoryABI,
common.Hex2Bytes("00000000000000000000... | explode_data.jsonl/50290 | {
"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,
4153,
32627,
26843,
591,
2190,
1155,
353,
8840,
836,
8,
341,
1166,
2919,
4286,
1669,
4185,
91538,
1249,
4286,
445,
15,
52616,
4385,
1138,
197,
1528,
591,
2190,
4286,
1669,
4185,
91538,
1249,
4286,
445,
15,
87,
6445,
69,
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 TestEndOfMonth(t *testing.T) {
res := EndOfMonth(testDate)
str := Date(res, "Y-m-d H:i:s")
require.Equal(t, "2020-03-31 23:59:59", str)
} | explode_data.jsonl/45317 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 69
} | [
2830,
3393,
3727,
59646,
1155,
353,
8840,
836,
8,
341,
10202,
1669,
3972,
59646,
8623,
1916,
340,
11355,
1669,
2631,
4590,
11,
330,
56,
1448,
1737,
472,
14665,
14495,
1138,
17957,
12808,
1155,
11,
330,
17,
15,
17,
15,
12,
15,
18,
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 |
func TestPointer(t *testing.T) {
{
var v, r *int
vv := 250
v = &vv
if err := encdec(v, &r, func(code byte) bool {
return code == def.Uint8
}); err != nil {
t.Error(err)
}
}
{
var v, r *int
d, err := msgpack.Marshal(v)
if err != nil {
t.Error(err)
}
if d[0] != def.Nil {
t.Error("code... | explode_data.jsonl/64220 | {
"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,
9084,
1155,
353,
8840,
836,
8,
341,
197,
515,
197,
2405,
348,
11,
435,
353,
396,
198,
197,
5195,
85,
1669,
220,
17,
20,
15,
198,
197,
5195,
284,
609,
33075,
198,
197,
743,
1848,
1669,
3209,
8169,
3747,
11,
609,
81,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAuthenticate(t *testing.T) {
primaryCluster := "Kubernetes"
remoteCluster := "remote"
invlidToken := "invalid-token"
testCases := map[string]struct {
remoteCluster bool
metadata metadata.MD
token string
jwtPolicy string
expectedID string
expectedErrMsg string
}{
"No... | explode_data.jsonl/33191 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1850
} | [
2830,
3393,
99087,
1155,
353,
8840,
836,
8,
341,
197,
6545,
28678,
1669,
330,
42,
29827,
698,
197,
18147,
28678,
1669,
330,
18147,
698,
197,
14057,
61206,
3323,
1669,
330,
11808,
34841,
1837,
18185,
37302,
1669,
2415,
14032,
60,
1235,
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 TestCanManageReposIndependently(t *testing.T) {
t.Parallel()
pathA := testRepoPath("a", t)
pathB := testRepoPath("b", t)
t.Log("initialize two repos")
assert.Nil(Init(pathA, &config.Config{Datastore: config.DefaultDatastoreConfig()}), t, "a", "should initialize successfully")
assert.Nil(Init(pathB, &config.... | explode_data.jsonl/24174 | {
"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,
6713,
33076,
693,
966,
63399,
4402,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
26781,
32,
1669,
1273,
25243,
1820,
445,
64,
497,
259,
340,
26781,
33,
1669,
1273,
25243,
1820,
445,
65,
497,
259,
692,
3244,
5247,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestZcoinDecodeToString(t *testing.T) {
script1 := "76a9142a10f88e30768d2712665c279922b9621ce58bc788ac"
script2 := "a914f010b17a9189e0f2737d71ae9790359eb5bbc13787"
tests := []TestcaseDecode{
{
name: "P2PKH",
input: script1,
output: "a4YtT82mWWxHZhLmdx7e5aroW92dqJoRs3",
},
{
name: "P2SH",... | explode_data.jsonl/9961 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 249
} | [
2830,
3393,
57,
7160,
32564,
5870,
1155,
353,
8840,
836,
8,
341,
86956,
16,
1669,
330,
22,
21,
64,
24,
16,
19,
17,
64,
16,
15,
69,
23,
23,
68,
18,
15,
22,
21,
23,
67,
17,
22,
16,
17,
21,
21,
20,
66,
17,
22,
24,
24,
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 TestUserStoreGetRecentlyActiveUsersForTeam(t *testing.T) {
Setup()
u1 := &model.User{}
u1.Email = model.NewId()
Must(store.User().Save(u1))
Must(store.Status().SaveOrUpdate(&model.Status{UserId: u1.Id, Status: model.STATUS_ONLINE, Manual: false, LastActivityAt: model.GetMillis(), ActiveChannel: ""}))
tid :=... | explode_data.jsonl/5108 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
1474,
6093,
1949,
45137,
5728,
7137,
2461,
14597,
1155,
353,
8840,
836,
8,
341,
197,
21821,
2822,
10676,
16,
1669,
609,
2528,
7344,
16094,
10676,
16,
24066,
284,
1614,
7121,
764,
741,
9209,
590,
31200,
7344,
1005,
8784,
8154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCallWrapper(t *testing.T) {
var called bool
id := "test.1"
service := "test.service"
endpoint := "Test.Endpoint"
address := "10.1.10.1:8080"
wrap := func(cf CallFunc) CallFunc {
return func(ctx context.Context, node *registry.Node, req Request, rsp interface{}, opts CallOptions) error {
called = tr... | explode_data.jsonl/70453 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 519
} | [
2830,
3393,
7220,
11542,
1155,
353,
8840,
836,
8,
341,
2405,
2598,
1807,
198,
15710,
1669,
330,
1944,
13,
16,
698,
52934,
1669,
330,
1944,
5736,
698,
6246,
2768,
1669,
330,
2271,
90409,
698,
63202,
1669,
330,
16,
15,
13,
16,
13,
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... | 4 |
func TestConsumerGroupHandler(t *testing.T) {
views := MetricViews()
view.Register(views...)
defer view.Unregister(views...)
c := consumerGroupHandler{
unmarshaller: &otlpProtoUnmarshaller{},
logger: zap.NewNop(),
ready: make(chan bool),
nextConsumer: consumertest.NewTracesNop(),
}
testSess... | explode_data.jsonl/2061 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 502
} | [
2830,
3393,
29968,
2808,
3050,
1155,
353,
8840,
836,
8,
341,
197,
5072,
1669,
52458,
23217,
741,
36867,
19983,
7,
5072,
31218,
16867,
1651,
10616,
6343,
7,
5072,
61827,
1444,
1669,
11502,
2808,
3050,
515,
197,
20479,
52541,
25,
609,
354... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseLayout(t *testing.T) {
for _, th := range testParseFormat {
l, err := parseFormat(th.in)
if th.err {
assert.NotEqual(t, nil, err)
} else {
assert.Equal(t, nil, err)
assert.Equal(t, th.out, l, "for in=%v", th.in)
}
}
} | explode_data.jsonl/32329 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
14463,
2175,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
270,
1669,
2088,
1273,
14463,
4061,
341,
197,
8810,
11,
1848,
1669,
4715,
4061,
24365,
1858,
340,
197,
743,
270,
18441,
341,
298,
6948,
15000,
2993,
1155,
11,
2092,
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 TestGetCgroupStats(t *testing.T) {
const (
cgroupName = "test-cgroup-name"
containerInfoSeed = 1000
updateStats = false
)
var (
mockCadvisor = new(cadvisortest.Mock)
mockPodManager = new(kubepodtest.MockManager)
mockRuntimeCache = new(kubecontainertest.MockRuntimeCache)
assert ... | explode_data.jsonl/3067 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 458
} | [
2830,
3393,
1949,
34,
4074,
16635,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
1444,
90631,
286,
284,
330,
1944,
1786,
4074,
11494,
698,
197,
53290,
1731,
41471,
284,
220,
16,
15,
15,
15,
198,
197,
27175,
16635,
981,
284,
895,
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 TestTableOfContents(t *testing.T) {
cfg, fs := newTestCfg()
writeSource(t, fs, filepath.Join("content", "tocpage.md"), pageWithToC)
s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{SkipRender: true})
require.Len(t, s.RegularPages(), 1)
p := s.RegularPages()[0]
checkPageContent(t, p, "\n... | explode_data.jsonl/60616 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 660
} | [
2830,
3393,
2556,
2124,
14803,
1155,
353,
8840,
836,
8,
1476,
50286,
11,
8619,
1669,
501,
2271,
42467,
2822,
24945,
3608,
1155,
11,
8619,
11,
26054,
22363,
445,
1796,
497,
330,
54780,
2893,
21324,
3975,
2150,
2354,
1249,
34,
692,
1903,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_SetClone(t *testing.T) {
a := NewSet()
a.Add(1)
a.Add(2)
b := a.Clone()
if !a.Equal(b) {
t.Error("Clones should be equal")
}
a.Add(3)
if a.Equal(b) {
t.Error("a contains one more element, they should not be equal")
}
c := a.Clone()
c.Remove(1)
if a.Equal(c) {
t.Error("C contains one ele... | explode_data.jsonl/200 | {
"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,
14812,
37677,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
1532,
1649,
741,
11323,
1904,
7,
16,
340,
11323,
1904,
7,
17,
692,
2233,
1669,
264,
64463,
2822,
743,
753,
64,
12808,
1883,
8,
341,
197,
3244,
6141,
445,
5066,
315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefaultIDToUUIDIfNotSet(t *testing.T) {
testCases := map[string]struct {
event cloudevents.Event
}{
"nil context": {
event: cloudevents.Event{},
},
"v0.1 empty": {
event: cloudevents.Event{
Context: &cloudevents.EventContextV01{},
},
},
"v0.2 empty": {
event: cloudevents.Event{
... | explode_data.jsonl/21837 | {
"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,
3675,
915,
1249,
24754,
2679,
2623,
1649,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
28302,
1185,
283,
450,
47664,
6904,
198,
197,
59403,
197,
197,
79925,
2266,
788,
341,
298,
28302,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUTF16BytesToStringOffset(t *testing.T) {
in := bytes.Join([][]byte{toUTF16Bytes("one"), toUTF16Bytes("two"), toUTF16Bytes("three")}, []byte{0, 0})
output, offset, err := UTF16BytesToString(in)
if err != nil {
t.Fatal(err)
}
assert.Equal(t, "one", output)
assert.Equal(t, 8, offset)
in = in[offset:]
... | explode_data.jsonl/32604 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 265
} | [
2830,
3393,
8561,
16,
21,
7078,
5870,
6446,
1155,
353,
8840,
836,
8,
341,
17430,
1669,
5820,
22363,
10556,
1294,
3782,
90,
983,
8561,
16,
21,
7078,
445,
603,
3975,
311,
8561,
16,
21,
7078,
445,
19789,
3975,
311,
8561,
16,
21,
7078,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResourceMetrics_InstrumentationLibraryMetrics(t *testing.T) {
ms := NewResourceMetrics()
ms.InitEmpty()
assert.EqualValues(t, NewInstrumentationLibraryMetricsSlice(), ms.InstrumentationLibraryMetrics())
fillTestInstrumentationLibraryMetricsSlice(ms.InstrumentationLibraryMetrics())
testValInstrumentationLi... | explode_data.jsonl/19496 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
4783,
27328,
25972,
19474,
367,
16915,
27328,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
4783,
27328,
741,
47691,
26849,
3522,
741,
6948,
12808,
6227,
1155,
11,
1532,
56324,
367,
16915,
27328,
33236,
1507,
9829,
5337,
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 TestVerifyInvalidTokenWindowAndInvalidAud(t *testing.T) {
tokenIsValidWindow, errTokenPayload := VerifyToken(tokenTest, &testLocalSessionsBadAudChunk, nil)
if tokenIsValidWindow {
t.Fail()
t.Logf("token aud chunk is not valid but still passed")
}
if errTokenPayload != nil {
t.Fail()
t.Logf(errTokenPayl... | explode_data.jsonl/11056 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 121
} | [
2830,
3393,
32627,
7928,
3323,
4267,
3036,
7928,
52949,
1155,
353,
8840,
836,
8,
341,
43947,
55470,
4267,
11,
1848,
3323,
29683,
1669,
25429,
3323,
13274,
2271,
11,
609,
1944,
7319,
59062,
17082,
52949,
28304,
11,
2092,
340,
743,
3950,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeliverTx(t *testing.T) {
// set up an app
app, closer, err := SetupApp()
// closer may need to be run, even when error in later stage
if closer != nil {
defer closer()
}
require.NoError(t, err)
key := "my-special-key"
value := "top-secret-data!!"
tx := NewTx(key, value)
txBytes := tx.GetSignBytes... | explode_data.jsonl/14340 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 357
} | [
2830,
3393,
16532,
1524,
31584,
1155,
353,
8840,
836,
8,
341,
197,
322,
738,
705,
458,
906,
198,
28236,
11,
12128,
11,
1848,
1669,
18626,
2164,
741,
197,
322,
12128,
1231,
1184,
311,
387,
1598,
11,
1496,
979,
1465,
304,
2937,
6430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReceiveBufferAutoTuningApplicationLimited(t *testing.T) {
const mtu = 1500
const mss = mtu - header.IPv4MinimumSize - header.TCPMinimumSize
c := context.New(t, mtu)
defer c.Cleanup()
stk := c.Stack()
// Set lower limits for auto-tuning tests. This is required because the
// test stops the worker which... | explode_data.jsonl/22340 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1351
} | [
2830,
3393,
14742,
4095,
13253,
51,
37202,
4988,
74477,
1155,
353,
8840,
836,
8,
341,
4777,
11965,
84,
284,
220,
16,
20,
15,
15,
198,
4777,
296,
778,
284,
11965,
84,
481,
4247,
46917,
85,
19,
28695,
1695,
481,
4247,
836,
7123,
28695... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStream_GetKind(t *testing.T) {
t.Run("test", func(t *testing.T) {
assert := base.NewAssert(t)
for i := 0; i < 1000; i++ {
v := NewStream()
kind := uint8(rand.Uint32())
v.SetKind(kind)
assert(v.GetKind()).Equals(kind)
v.Release()
}
})
} | explode_data.jsonl/21161 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 128
} | [
2830,
3393,
3027,
13614,
10629,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6948,
1669,
2331,
7121,
8534,
1155,
340,
197,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetFileContentTypeBIN(t *testing.T) {
file := `../testdata/files/test9`
fileType, err := GetFileContentType(file)
if err != nil {
t.Log("Error -> ", err)
t.Fail()
}
if fileType != "elf/binary" {
t.Log(fileType)
t.Fail()
}
} | explode_data.jsonl/24013 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 107
} | [
2830,
3393,
1949,
1703,
29504,
58531,
1155,
353,
8840,
836,
8,
341,
17661,
1669,
1565,
1244,
92425,
33220,
12697,
24,
3989,
17661,
929,
11,
1848,
1669,
2126,
1703,
29504,
4866,
340,
743,
1848,
961,
2092,
341,
197,
3244,
5247,
445,
1454,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFindPort(t *testing.T) {
testCases := []struct {
name string
containers []v1.Container
port intstr.IntOrString
expected int
pass bool
}{{
name: "valid int, no ports",
containers: []v1.Container{{}},
port: intstr.FromInt(93),
expected: 93,
pass: true... | explode_data.jsonl/32832 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2020
} | [
2830,
3393,
9885,
7084,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
197,
39399,
3056,
85,
16,
33672,
198,
197,
52257,
981,
526,
495,
7371,
2195,
703,
198,
197,
42400,
256,
526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCorrectMethodPackage(t *testing.T) {
skipSpecialPlatforms(t)
// This package only handles gc export data.
if runtime.Compiler != "gc" {
t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler)
}
imports := make(map[string]*types.Package)
fset := token.NewFileSet()
_, err := Impor... | explode_data.jsonl/30565 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 276
} | [
2830,
3393,
33092,
3523,
13100,
1155,
353,
8840,
836,
8,
341,
1903,
13389,
20366,
87268,
1155,
692,
197,
322,
1096,
6328,
1172,
13469,
22122,
7485,
821,
624,
743,
15592,
35952,
961,
330,
20669,
1,
341,
197,
3244,
57776,
69,
445,
20669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUser_String(t *testing.T) {
v := User{
Login: String(""),
ID: Int64(0),
NodeID: String(""),
AvatarURL: String(""),
HTMLURL: String(""),
GravatarID: String(""),
Name: String(""),
... | explode_data.jsonl/33297 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1264
} | [
2830,
3393,
1474,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
2657,
515,
197,
197,
6231,
25,
4293,
923,
445,
4461,
197,
29580,
25,
2549,
1333,
21,
19,
7,
15,
1326,
197,
30217,
915,
25,
1698,
923,
445,
4461,
197,
197,
24845,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGenreService_List(t *testing.T) {
f, err := ioutil.ReadFile(testGenreList)
if err != nil {
t.Fatal(err)
}
init := make([]*Genre, 0)
err = json.Unmarshal(f, &init)
if err != nil {
t.Fatal(err)
}
var tests = []struct {
name string
file string
ids []int
opts []Option... | explode_data.jsonl/41085 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 606
} | [
2830,
3393,
37525,
1860,
27104,
1155,
353,
8840,
836,
8,
341,
1166,
11,
1848,
1669,
43144,
78976,
8623,
37525,
852,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
28248,
1669,
1281,
85288,
37525,
11,
220,
15,
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... | 4 |
func TestObjectRemainsGround(t *testing.T) {
tests := []struct {
key string
value string
ground bool
}{
{`"a"`, `"value1"`, true},
{`"b"`, `"value2"`, true},
{`"a"`, `x`, false},
{`"a"`, `"value1"`, true},
{`"b"`, `y`, false},
{`"c"`, `value3`, false},
}
obj := NewObject()
for i, tc := rang... | explode_data.jsonl/2914 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 227
} | [
2830,
3393,
1190,
6590,
1735,
30714,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
23634,
262,
914,
198,
197,
16309,
220,
914,
198,
197,
197,
1951,
1807,
198,
197,
59403,
197,
197,
90,
63,
1,
64,
1,
7808,
53305,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoveAllPushNotificationsBuildQuery(t *testing.T) {
assert := assert.New(t)
opts := &removeAllPushChannelsForDeviceOpts{
DeviceIDForPush: "deviceId",
PushType: PNPushTypeAPNS,
pubnub: pubnub,
}
u, err := opts.buildQuery()
assert.Equal("apns", u.Get("type"))
assert.Nil(err)
} | explode_data.jsonl/51098 | {
"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,
13021,
2403,
16644,
34736,
11066,
2859,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
64734,
1669,
609,
5399,
2403,
16644,
35925,
2461,
6985,
43451,
515,
197,
197,
6985,
915,
2461,
16644,
25,
330,
94202,
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... | 1 |
func TestFF3(t *testing.T) {
fmt.Println(FF3(123, 10))
fmt.Println(FF3("123", 10))
fmt.Println(FF3("A0", 16))
ret, err := FF3(123, 10, "048e82ab0ab7c27afd1c76b7d39e4a1a62a21ef663522811790c88fe4e890db5", "ded666507c90c790")
if err != nil {
t.Errorf(err.Error())
}
if ret != "103" {
t.Errorf("wrong result: %s",... | explode_data.jsonl/68752 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
1748,
18,
1155,
353,
8840,
836,
8,
341,
11009,
12419,
7,
1748,
18,
7,
16,
17,
18,
11,
220,
16,
15,
1171,
11009,
12419,
7,
1748,
18,
445,
16,
17,
18,
497,
220,
16,
15,
1171,
11009,
12419,
7,
1748,
18,
445,
32,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestHourRetention(t *testing.T) {
secs, err := RetentionSeconds("1h")
if err != nil {
t.Errorf("Unable to calculate retention")
}
if secs != uint32(60*60) {
t.Errorf("Incorrect retention")
}
} | explode_data.jsonl/74565 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 83
} | [
2830,
3393,
30254,
86329,
1155,
353,
8840,
836,
8,
341,
197,
53281,
11,
1848,
1669,
10392,
2939,
15343,
445,
16,
71,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
17075,
311,
11047,
37131,
1138,
197,
630,
743,
49749,
961,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnvVars(t *testing.T) {
assert := assert.New(t)
envVars := []string{"foo=bar", "TERM=xterm", "HOME=/home/foo", "TERM=\"bar\"", "foo=\"\""}
expectecVcEnvVars := []types.EnvVar{
{
Var: "foo",
Value: "bar",
},
{
Var: "TERM",
Value: "xterm",
},
{
Var: "HOME",
Value: "/home/foo"... | explode_data.jsonl/44035 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 284
} | [
2830,
3393,
14359,
28305,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
57538,
28305,
1669,
3056,
917,
4913,
7975,
28,
2257,
497,
330,
49349,
25387,
4991,
497,
330,
27546,
23286,
5117,
60555,
497,
330,
49349,
4070,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewCmdErrors(t *testing.T) {
t.Parallel()
tests := []struct {
name string
method string
args []interface{}
err btcjson.Error
}{
{
name: "unregistered command",
method: "boguscommand",
args: []interface{}{},
err: btcjson.Error{ErrorCode: btcjson.ErrUnregisteredMethod},
... | explode_data.jsonl/5032 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 610
} | [
2830,
3393,
3564,
15613,
13877,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
42257,
914,
198,
197,
31215,
256,
3056,
4970,
16094,
197,
9859,
262,
86037,
2236,
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... | 4 |
func TestCreateUrl(t *testing.T) {
url := createUrl("Python")
correctUrl := "https://raw.githubusercontent.com/dvcs/gitignore/master/templates/Python.gitignore"
if url != correctUrl {
t.Errorf("createUrl(%s) was incorrect. Got: %s, want: %s", "Python", url, correctUrl)
}
} | explode_data.jsonl/7959 | {
"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,
4021,
2864,
1155,
353,
8840,
836,
8,
341,
19320,
1669,
1855,
2864,
445,
30280,
1138,
1444,
27034,
2864,
1669,
330,
2428,
1110,
1041,
50927,
905,
3446,
85,
4837,
60590,
13130,
23303,
38941,
14,
30280,
32799,
13130,
698,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestIsEqualExceptOpsRunner(t *testing.T) {
reader := setup(t)
cfg, _ := ReadCRSpecFromFile(reader)
cfg2 := cfg.Spec.DeepCopy()
cfg.Spec.OpsRunner = &OpsRunner{}
cfg2.OpsRunner = &OpsRunner{}
if isEqual := cfg.Spec.IsEqualExceptOpsRunner(cfg2); isEqual != true {
t.Fail()
}
// change gitops
cfg.Spec.Op... | explode_data.jsonl/60736 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 343
} | [
2830,
3393,
3872,
2993,
58015,
38904,
19486,
1155,
353,
8840,
836,
8,
341,
61477,
1669,
6505,
1155,
340,
50286,
11,
716,
1669,
4457,
8973,
8327,
43633,
21987,
340,
50286,
17,
1669,
13286,
36473,
55602,
12106,
2822,
50286,
36473,
8382,
169... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIteratorsAndNextResultOrderA(t *testing.T) {
ctx := context.TODO()
qs, _, _ := makeTestStore(simpleGraph)
fixed := iterator.NewFixed()
qsv, err := qs.ValueOf(quad.Raw("C"))
require.NoError(t, err)
fixed.Add(qsv)
fixed2 := iterator.NewFixed()
qsv, err = qs.ValueOf(quad.Raw("follows"))
require.NoError... | explode_data.jsonl/79101 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 584
} | [
2830,
3393,
8537,
2973,
3036,
5847,
2077,
4431,
32,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
90988,
741,
18534,
82,
11,
8358,
716,
1669,
1281,
2271,
6093,
1141,
6456,
11212,
692,
1166,
3286,
1669,
15091,
7121,
13520,
741,
18534,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetMyTeamsUnread(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
if result, err := th.BasicClient.GetMyTeamsUnread(""); err != nil {
t.Fatal(err)
} else {
members := result.Data.([]*model.TeamUnread)
if len(members) == 0 {
t.Fatal("should have results")
}
}
if result, err := th... | explode_data.jsonl/48517 | {
"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,
1949,
5050,
60669,
1806,
878,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
743,
1102,
11,
1848,
1669,
270,
48868,
2959,
2234,
5050,
60669,
1806,
878,
97918,
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... | 5 |
func TestTokens(t *testing.T) {
var tokenTests = []struct {
js string
expected []TokenType
}{
{" \t\v\f\u00A0\uFEFF\u2000", TTs{}}, // WhitespaceToken
{"\n\r\r\n\u2028\u2029", TTs{LineTerminatorToken}},
{"5.2 .04 0x0F 5e99", TTs{NumericToken, NumericToken, NumericToken, NumericToken}},
{"a = 'string... | explode_data.jsonl/12033 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2114
} | [
2830,
3393,
29300,
1155,
353,
8840,
836,
8,
341,
2405,
3950,
18200,
284,
3056,
1235,
341,
197,
95636,
981,
914,
198,
197,
42400,
3056,
75611,
198,
197,
59403,
197,
197,
4913,
1124,
83,
72659,
64526,
3770,
15,
15,
32,
15,
3770,
11419,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSanitizeMessagesBindVars(t *testing.T) {
config := tabletenv.NewDefaultConfig()
config.TerseErrors = true
config.SanitizeLogMessages = true
tsv := NewTabletServer("TabletServerTest", config, memorytopo.NewServer(""), &topodatapb.TabletAlias{})
tl := newTestLogger()
defer tl.Close()
sqlErr := mysql.NewS... | explode_data.jsonl/80018 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 374
} | [
2830,
3393,
23729,
26310,
15820,
9950,
28305,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
1965,
1960,
85,
7121,
3675,
2648,
741,
25873,
836,
261,
325,
13877,
284,
830,
198,
25873,
808,
58652,
2201,
15820,
284,
830,
198,
57441,
85,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestNextMax32768(t *testing.T) {
f, err := os.OpenFile("./testdata/random/nextmax-32768.txt", os.O_RDONLY, os.ModePerm)
require.NoError(t, err)
defer f.Close()
r := MakePRNGSequence(32768)
sc := bufio.NewScanner(f)
for sc.Scan() {
line := sc.Text()
expected, err := strconv.Atoi(line)
require.NoError(... | explode_data.jsonl/32636 | {
"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,
5847,
5974,
18,
17,
22,
21,
23,
1155,
353,
8840,
836,
8,
341,
1166,
11,
1848,
1669,
2643,
12953,
1703,
13988,
92425,
79442,
14,
3600,
2810,
12,
18,
17,
22,
21,
23,
3909,
497,
2643,
8382,
66104,
11,
2643,
42852,
81245,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewBooleanFromString(t *testing.T) {
var testCases = []struct {
input string
expected Boolean
}{
{"true", Boolean(true)},
{"yes", Boolean(true)},
{"on", Boolean(true)},
{"false", Boolean(false)},
{"no", Boolean(false)},
{"off", Boolean(false)},
}
for _, tc := range testCases {
t.Run(f... | explode_data.jsonl/4132 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
3564,
6890,
44491,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
37302,
284,
3056,
1235,
341,
197,
22427,
262,
914,
198,
197,
42400,
6992,
198,
197,
59403,
197,
197,
4913,
1866,
497,
6992,
3715,
39781,
197,
197,
4913,
9693,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPeerOnErrFuncCalledDueToExpiration(t *testing.T) {
params := &BpPeerParams{timeout: 2 * time.Millisecond}
var (
numErrFuncCalls int // number of calls to the onErr function
lastErr error // last generated error
peerTestMtx sync.Mutex // modifications of ^^ variables are also do... | explode_data.jsonl/35426 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 348
} | [
2830,
3393,
30888,
1925,
7747,
9626,
20960,
33060,
1249,
66301,
1155,
353,
8840,
836,
8,
1476,
25856,
1669,
609,
33,
79,
30888,
4870,
90,
14150,
25,
220,
17,
353,
882,
71482,
532,
2405,
2399,
197,
22431,
7747,
9626,
55292,
526,
286,
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 TestLogLevel(t *testing.T) {
verifyLevelsNoError := func(expected Level, levels ...string) {
for _, level := range levels {
actual, err := ParseLevel(level)
require.NoError(t, err, "not supposed to fail while parsing level string [%s]", level)
require.Equal(t, expected, actual)
}
}
verifyLevelsNo... | explode_data.jsonl/79297 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 224
} | [
2830,
3393,
72676,
1155,
353,
8840,
836,
8,
1476,
93587,
46991,
2753,
1454,
1669,
2915,
15253,
9395,
11,
5866,
2503,
917,
8,
341,
197,
2023,
8358,
2188,
1669,
2088,
5866,
341,
298,
88814,
11,
1848,
1669,
14775,
4449,
23669,
340,
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... | 2 |
func TestGetRepository(t *testing.T) {
t.Parallel()
for _, tt := range getDefaultBranchTests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
a := assert.New(t)
s := &svc{graphQL: &tt.v4}
repo, err := s.GetRepository(context.Background(),
&RemoteRef{
RepoOwner: "owner",
RepoN... | explode_data.jsonl/10372 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
1949,
4624,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2023,
8358,
17853,
1669,
2088,
69106,
18197,
18200,
341,
197,
3244,
83,
1669,
17853,
198,
197,
3244,
16708,
47152,
2644,
11,
2915,
1155,
353,
8840,
836,
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... | 2 |
func TestRenamePrivateIdentifiersNoBundle(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
class Foo {
#foo
foo = class {
#foo
#foo2
#bar
}
get #bar() {}
set #bar(x) {}
}
class Bar {
#foo
foo = class {... | explode_data.jsonl/38535 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 294
} | [
2830,
3393,
88757,
16787,
28301,
11836,
2753,
8409,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
4085,
2857,
788,
22074,
571,
15487,
334... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOutOfCluster(t *testing.T) {
verifyKubeConfigVolume := func(ctr apiv1.Container, volName, mountPath string) {
for _, vol := range ctr.VolumeMounts {
if vol.Name == volName && vol.MountPath == mountPath {
for _, arg := range ctr.Args {
if arg == fmt.Sprintf("--kubeconfig=%s", mountPath) {
r... | explode_data.jsonl/75385 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 960
} | [
2830,
3393,
31731,
28678,
1155,
353,
8840,
836,
8,
341,
93587,
42,
3760,
2648,
18902,
1669,
2915,
7,
10597,
1443,
344,
16,
33672,
11,
4400,
675,
11,
6470,
1820,
914,
8,
341,
197,
2023,
8358,
4400,
1669,
2088,
50638,
79106,
16284,
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... | 6 |
func TestPackfileObjectReturnsObjectWithDeltaBaseReference(t *testing.T) {
const original = "Hello!\n"
compressed, _ := compress(original)
delta, _ := compress(string([]byte{
0x07, // Source size: 7.
0x0e, // Destination size: 14.
0x91, // (1001 0001) (copy, smask=0001, omask=0001)
0x00, // (0000 0000) (of... | explode_data.jsonl/30629 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 867
} | [
2830,
3393,
30684,
1192,
1190,
16446,
1190,
2354,
20277,
3978,
8856,
1155,
353,
8840,
836,
8,
341,
4777,
4024,
284,
330,
9707,
14771,
77,
698,
32810,
14318,
11,
716,
1669,
24611,
39809,
692,
85435,
11,
716,
1669,
24611,
3609,
10556,
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... | 1 |
func TestExcludePrefixesFullOverlap(t *testing.T) {
pool, err := prefixpool.New("10.20.0.0/24")
require.Nil(t, err)
excludedPrefix := []string{"10.20.1.0/16"}
_, err = pool.ExcludePrefixes(excludedPrefix)
require.Equal(t, "IPAM: The available address pool is empty, probably intersected by excludedPrefix", err.Er... | explode_data.jsonl/45823 | {
"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,
95239,
14335,
288,
9432,
82171,
1155,
353,
8840,
836,
8,
341,
85273,
11,
1848,
1669,
9252,
10285,
7121,
445,
16,
15,
13,
17,
15,
13,
15,
13,
15,
14,
17,
19,
1138,
17957,
59678,
1155,
11,
1848,
340,
8122,
10181,
14335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHeadBroadcaster_Subscribe(t *testing.T) {
t.Parallel()
g := gomega.NewWithT(t)
cfg := cltest.NewTestGeneralConfig(t)
var d time.Duration = 0
cfg.Overrides.GlobalEvmHeadTrackerSamplingInterval = &d
evmCfg := evmtest.NewChainScopedConfig(t, cfg)
db := pgtest.NewSqlxDB(t)
logger := logger.TestLogger(t)
... | explode_data.jsonl/19966 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 812
} | [
2830,
3393,
12346,
68324,
32020,
36359,
6273,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3174,
1669,
342,
32696,
7121,
2354,
51,
1155,
692,
50286,
1669,
1185,
1944,
7121,
2271,
15415,
2648,
1155,
340,
2405,
294,
882,
33795,
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 TestTagDefault6(t *testing.T) {
assert.NoError(t, PrepareEngine())
type DefaultStruct6 struct {
Id int64
IsMan bool `xorm:"default(true)"`
}
assertSync(t, new(DefaultStruct6))
tables, err := testEngine.DBMetas()
assert.NoError(t, err)
var defaultVal string
var isDefaultExist bool
tableName := t... | explode_data.jsonl/19215 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 294
} | [
2830,
3393,
5668,
3675,
21,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
4571,
12367,
13158,
7899,
9422,
21,
2036,
341,
197,
67211,
262,
526,
21,
19,
198,
197,
197,
3872,
1658,
1807,
1565,
87,
493,
2974,
2258,
3715,
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 TestHandshakeServerSNIGetCertificateNotFound(t *testing.T) {
config := testConfig.Clone()
config.GetCertificate = func(clientHello *ClientHelloInfo) (*Certificate, error) {
return nil, nil
}
test := &serverTest{
name: "SNI-GetCertificateNotFound",
command: []string{"openssl", "s_client", "-no_ticket"... | explode_data.jsonl/36342 | {
"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,
2314,
29661,
5475,
18966,
1914,
295,
33202,
10372,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
1273,
2648,
64463,
2822,
25873,
2234,
33202,
284,
2915,
12805,
9707,
353,
2959,
9707,
1731,
8,
4609,
33202,
11,
1465,
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 TestCachedConnExec(t *testing.T) {
r, clean, err := redistest.CreateRedis()
assert.Nil(t, err)
defer clean()
var conn trackedConn
c := NewNodeConn(&conn, r, cache.WithExpiry(time.Second*10))
_, err = c.ExecNoCache("delete from user_table where id='kevin'")
assert.Nil(t, err)
assert.True(t, conn.execValue)... | explode_data.jsonl/64132 | {
"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,
70293,
9701,
10216,
1155,
353,
8840,
836,
8,
341,
7000,
11,
4240,
11,
1848,
1669,
2518,
380,
477,
7251,
48137,
741,
6948,
59678,
1155,
11,
1848,
340,
16867,
4240,
2822,
2405,
4534,
33056,
9701,
198,
1444,
1669,
1532,
1955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_CreateTable_Migration(t *testing.T) {
argsss := []string{"add", "ct", "test123", "first:int", "second:string"}
fileName, mm, _ := generateMigration(argsss)
expectedString := `{"id":"` + getID(fileName) + `","up":{"createTable":[{"tableName":"test123","columns":[{"fieldname":"first","datatype":"int"},{"fiel... | explode_data.jsonl/22631 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
34325,
2556,
1245,
5033,
1155,
353,
8840,
836,
8,
341,
47903,
84160,
1669,
3056,
917,
4913,
718,
497,
330,
302,
497,
330,
1944,
16,
17,
18,
497,
330,
3896,
14337,
497,
330,
5569,
22423,
16707,
17661,
675,
11,
9465,
11,
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... | 1 |
func TestReconcileServiceInstanceNonExistentClusterServicePlanK8SName(t *testing.T) {
_, fakeCatalogClient, fakeClusterServiceBrokerClient, testController, sharedInformers := newTestController(t, noFakeActions())
sharedInformers.ClusterServiceBrokers().Informer().GetStore().Add(getTestClusterServiceBroker())
shared... | explode_data.jsonl/58132 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 635
} | [
2830,
3393,
693,
40446,
457,
1860,
2523,
8121,
840,
18128,
28678,
1860,
20485,
42,
23,
50,
675,
1155,
353,
8840,
836,
8,
341,
197,
6878,
12418,
41606,
2959,
11,
12418,
28678,
1860,
65545,
2959,
11,
1273,
2051,
11,
6094,
37891,
388,
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 TestIsMasterNode(t *testing.T) {
if isMasterNode(&v1.Node{}) {
t.Errorf("Empty node should not be master!")
}
if isMasterNode(&v1.Node{
ObjectMeta: meta.ObjectMeta{
Labels: map[string]string{
nodeLabelRole: "worker",
},
},
}) {
t.Errorf("Node labelled 'worker' should not be master!")
}
if !... | explode_data.jsonl/7450 | {
"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,
3872,
18041,
1955,
1155,
353,
8840,
836,
8,
341,
743,
374,
18041,
1955,
2099,
85,
16,
21714,
28875,
341,
197,
3244,
13080,
445,
3522,
2436,
1265,
537,
387,
7341,
22988,
197,
532,
743,
374,
18041,
1955,
2099,
85,
16,
21714,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTabletServerStreamExecute(t *testing.T) {
db, tsv := setupTabletServerTest(t, "")
defer tsv.StopService()
defer db.Close()
executeSQL := "select * from test_table limit 1000"
executeSQLResult := &sqltypes.Result{
Fields: []*querypb.Field{
{Type: sqltypes.VarBinary},
},
Rows: [][]sqltypes.Value{
... | explode_data.jsonl/80001 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 280
} | [
2830,
3393,
2556,
83,
5475,
3027,
17174,
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,
8122,
3068,
6688,
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 TestUpdateDocuments1(t *testing.T) {
ctx := context.Background()
c := createClientFromEnv(t, true)
db := ensureDatabase(ctx, c, "document_test", nil, t)
col := ensureCollection(ctx, db, "documents_test", nil, t)
docs := []UserDoc{
UserDoc{
"Piere",
23,
},
UserDoc{
"Otto",
43,
},
}
metas,... | explode_data.jsonl/49554 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 523
} | [
2830,
3393,
4289,
27143,
16,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
1669,
1855,
2959,
3830,
14359,
1155,
11,
830,
340,
20939,
1669,
5978,
5988,
7502,
11,
272,
11,
330,
6062,
4452,
497,
2092,
11,
259,
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... | 7 |
func TestGetVolumeName(t *testing.T) {
tmpDir, plug := getPersistentPlugin(t)
defer os.RemoveAll(tmpDir)
volName, err := plug.GetVolumeName(getTestVolume(false, tmpDir, false, nil))
if err != nil {
t.Errorf("Failed to get volume name: %v", err)
}
if volName != testPVName {
t.Errorf("Expected volume name %q, ... | explode_data.jsonl/14253 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
1949,
18902,
675,
1155,
353,
8840,
836,
8,
341,
20082,
6184,
11,
19633,
1669,
633,
53194,
11546,
1155,
340,
16867,
2643,
84427,
10368,
6184,
692,
5195,
337,
675,
11,
1848,
1669,
19633,
2234,
18902,
675,
5433,
2271,
18902,
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... | 3 |
func TestElasticsearchVersion(t *testing.T) {
client, err := NewClient()
if err != nil {
t.Fatal(err)
}
version, err := client.ElasticsearchVersion(DefaultURL)
if err != nil {
t.Fatal(err)
}
if version == "" {
t.Errorf("expected a version number, got: %q", version)
}
} | explode_data.jsonl/38015 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 111
} | [
2830,
3393,
36,
51179,
1836,
5637,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
1532,
2959,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
74954,
11,
1848,
1669,
2943,
5142,
51179,
1836,
5637,
87874,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestDispenser_NextArg(t *testing.T) {
input := `dir1 arg1
dir2 arg2 arg3
dir3`
d := NewDispenser("Testfile", strings.NewReader(input))
assertNext := func(shouldLoad bool, expectedVal string, expectedCursor int) {
if d.Next() != shouldLoad {
t.Errorf("Next(): Should load token but got false inste... | explode_data.jsonl/6571 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 606
} | [
2830,
3393,
63771,
59444,
1604,
427,
2735,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
1565,
3741,
16,
1392,
16,
198,
11869,
5419,
17,
1392,
17,
1392,
18,
198,
11869,
5419,
18,
3989,
2698,
1669,
1532,
63771,
59444,
445,
2271,
1192,
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... | 4 |
func Test_Issue38211(t *testing.T) {
testenv.NeedsGo1Point(t, 14)
const ardanLabs = `
-- go.mod --
module mod.com
go 1.14
-- main.go --
package main
import "github.com/ardanlabs/conf"
func main() {
_ = conf.ErrHelpWanted
}
`
withOptions(
WithProxyFiles(ardanLabsProxy),
).run(t, ardanLabs, func(t *testing.T, e... | explode_data.jsonl/38921 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 754
} | [
2830,
3393,
7959,
83890,
18,
23,
17,
16,
16,
1155,
353,
8840,
836,
8,
341,
18185,
3160,
2067,
68,
6767,
10850,
16,
2609,
1155,
11,
220,
16,
19,
340,
4777,
796,
35155,
43,
3435,
284,
22074,
313,
728,
10929,
39514,
4352,
1463,
905,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapStore_Load(t *testing.T) {
t.Parallel()
store := mapstore.New()
store.Save(buildStorageItem(1))
store.Save(buildStorageItem(2))
store.Save(buildStorageItem(3))
tt := []struct {
testName string
givenShortId string
expectErr error
expectItem storage.Item
}{
{
testName: "fir... | explode_data.jsonl/37894 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 544
} | [
2830,
3393,
2227,
6093,
19553,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
57279,
1669,
2415,
4314,
7121,
2822,
57279,
13599,
43333,
5793,
1234,
7,
16,
1171,
57279,
13599,
43333,
5793,
1234,
7,
17,
1171,
57279,
13599,
43333,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSpanError_Typed(t *testing.T) {
assert := assert.New(t)
tracer := newTracer(withTransport(newDefaultTransport()))
span := tracer.newRootSpan("pylons.request", "pylons", "/")
// check the error is set in the default meta
err := &boomError{}
span.SetTag(ext.Error, err)
assert.Equal(int32(1), span.Error)
... | explode_data.jsonl/42849 | {
"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,
12485,
1454,
1139,
32501,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
25583,
9584,
1669,
501,
1282,
9584,
16980,
27560,
1755,
3675,
27560,
12145,
197,
1480,
1669,
64306,
4618,
8439,
12485,
445,
3288,
75,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSugarAddCallerFail(t *testing.T) {
errBuf := &ztest.Buffer{}
withSugar(t, DebugLevel, opts(AddCaller(), AddCallerSkip(1e3), ErrorOutput(errBuf)), func(log *SugaredLogger, logs *observer.ObservedLogs) {
log.Info("Failure.")
assert.Regexp(
t,
`Logger.check error: failed to get caller`,
errBuf.Stri... | explode_data.jsonl/5029 | {
"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,
83414,
2212,
58735,
19524,
1155,
353,
8840,
836,
8,
341,
9859,
15064,
1669,
609,
89,
1944,
22622,
16094,
46948,
83414,
1155,
11,
11091,
4449,
11,
12185,
7,
2212,
58735,
1507,
2691,
58735,
35134,
7,
16,
68,
18,
701,
4600,
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 TestStashStashEntryCmdObj(t *testing.T) {
type scenario struct {
testName string
index int
contextSize int
expected string
}
scenarios := []scenario{
{
testName: "Default case",
index: 5,
contextSize: 3,
expected: "git stash show -p --stat --color=always --unified=... | explode_data.jsonl/41419 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 371
} | [
2830,
3393,
623,
988,
623,
988,
5874,
15613,
5261,
1155,
353,
8840,
836,
8,
341,
13158,
15048,
2036,
341,
197,
18185,
675,
262,
914,
198,
197,
26327,
981,
526,
198,
197,
28413,
1695,
526,
198,
197,
42400,
262,
914,
198,
197,
630,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNorm(t *testing.T) {
t.Parallel()
s := []float64{-1, -3.4, 5, -6}
val := Norm(s, math.Inf(1))
truth := 6.0
if math.Abs(val-truth) > EqTolerance {
t.Errorf("Doesn't match for inf norm. %v expected, %v found", truth, val)
}
// http://www.wolframalpha.com/input/?i=%28%28-1%29%5E2+%2B++%28-3.4%29%5E2+%2B+... | explode_data.jsonl/1234 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 591
} | [
2830,
3393,
24993,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
1903,
1669,
3056,
3649,
21,
19,
19999,
16,
11,
481,
18,
13,
19,
11,
220,
20,
11,
481,
21,
532,
19302,
1669,
20317,
1141,
11,
6888,
33521,
7,
16,
1171,
25583,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.