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 TestNewWallet(t *testing.T) {
skipIfShort(t)
w, done := setupWallet(t)
defer done()
var err error
address, err := w.NewWallet(ctx, "bls")
if err != nil {
t.Fatalf("failed to create new wallet: %v", err)
}
if len(address) < 1 {
t.Fatal("received empty address from NewWallet")
}
} | explode_data.jsonl/49705 | {
"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,
3564,
38259,
1155,
353,
8840,
836,
8,
341,
1903,
13389,
2679,
12472,
1155,
340,
6692,
11,
2814,
1669,
6505,
38259,
1155,
340,
16867,
2814,
2822,
2405,
1848,
1465,
198,
63202,
11,
1848,
1669,
289,
7121,
38259,
7502,
11,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestChannelListNoChannelsFound(t *testing.T) {
cClient := v1beta1.NewMockKnChannelsClient(t)
cRecorder := cClient.Recorder()
cRecorder.ListChannel(nil, nil)
out, err := executeChannelCommand(cClient, "list")
assert.NilError(t, err)
assert.Check(t, util.ContainsAll(out, "No channels found"))
cRecorder.Valida... | explode_data.jsonl/67289 | {
"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,
9629,
852,
2753,
35925,
6650,
1155,
353,
8840,
836,
8,
341,
1444,
2959,
1669,
348,
16,
19127,
16,
7121,
11571,
36253,
35925,
2959,
1155,
340,
1444,
47023,
1669,
272,
2959,
20610,
1358,
741,
1444,
47023,
5814,
9629,
27907,
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 TestNotifications(t *testing.T) {
blocks, err := loadBlocks("blk_0_to_4.dat.bz2")
if err != nil {
t.Fatalf("Error loading file: %v\n", err)
}
// Create a new database and chain instance to run tests against.
chain, teardownFunc, err := chainSetup("notifications",
&chaincfg.MainNetParams)
if err != nil {... | explode_data.jsonl/37082 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 360
} | [
2830,
3393,
34736,
1155,
353,
8840,
836,
8,
341,
2233,
34936,
11,
1848,
1669,
2795,
29804,
445,
34989,
62,
15,
2346,
62,
19,
9915,
81374,
17,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
1454,
8277,
1034,
25,
1018,
85,
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 TestResolveRepositoryName(t *testing.T) {
_, _, err := ResolveRepositoryName("https://github.com/docker/docker")
assertEqual(t, err, ErrInvalidRepositoryName, "Expected error invalid repo name")
ep, repo, err := ResolveRepositoryName("fooo/bar")
if err != nil {
t.Fatal(err)
}
assertEqual(t, ep, IndexServer... | explode_data.jsonl/78262 | {
"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,
56808,
4624,
675,
1155,
353,
8840,
836,
8,
341,
197,
6878,
8358,
1848,
1669,
47302,
4624,
675,
445,
2428,
1110,
5204,
905,
61764,
61764,
1138,
6948,
2993,
1155,
11,
1848,
11,
15495,
7928,
4624,
675,
11,
330,
18896,
1465,
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... | 4 |
func TestGetNbrEntriesNilEntry(t *testing.T) {
svr := &NDPServer{}
svr.InitGlobalDS()
initServerBasic()
nextIdx, count, runTimeEntries := svr.GetNeighborEntries(0, TEST_NBR_ENTRIES)
if nextIdx != 0 || count != 0 || runTimeEntries != nil {
t.Error("Failed to return 0 entries")
}
svr.DeInitGlobalDS()
} | explode_data.jsonl/38851 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
1949,
45,
1323,
24533,
19064,
5874,
1155,
353,
8840,
836,
8,
341,
1903,
18920,
1669,
609,
8065,
5012,
2836,
16094,
1903,
18920,
26849,
11646,
5936,
741,
28248,
5475,
15944,
741,
28144,
11420,
11,
1760,
11,
1598,
1462,
24533,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAppConfigDefaulterHandle(t *testing.T) {
decoder := decoder()
defaulter := &AppConfigWebhook{}
defaulter.InjectDecoder(decoder)
req := admission.Request{}
req.Object = runtime.RawExtension{Raw: readYaml2Json(t, "hello-conf.yaml")}
res := defaulter.Handle(context.TODO(), req)
assert.True(t, res.Allowed)
... | explode_data.jsonl/33954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
2164,
2648,
2620,
4943,
465,
6999,
1155,
353,
8840,
836,
8,
341,
197,
48110,
1669,
24551,
741,
7452,
4943,
465,
1669,
609,
2164,
2648,
5981,
20873,
16094,
7452,
4943,
465,
41046,
20732,
35712,
4316,
340,
24395,
1669,
25293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInit_MTU(t *testing.T) {
var fakeCmds []fakeexec.FakeCommandAction
{
// modprobe br-netfilter
fCmd := fakeexec.FakeCmd{
CombinedOutputScript: []fakeexec.FakeAction{
func() ([]byte, []byte, error) {
return make([]byte, 0), nil, nil
},
},
}
fakeCmds = append(fakeCmds, func(cmd string... | explode_data.jsonl/4478 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 515
} | [
2830,
3393,
3803,
49047,
52,
1155,
353,
8840,
836,
8,
341,
2405,
12418,
15613,
82,
3056,
30570,
11748,
991,
726,
4062,
2512,
198,
197,
515,
197,
197,
322,
1463,
52329,
1411,
66496,
5315,
198,
197,
1166,
15613,
1669,
12418,
11748,
991,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInterfaceIndirect(t *testing.T) {
Register(&interfaceIndirectTestT{})
b := new(bytes.Buffer)
w := []interfaceIndirectTestI{&interfaceIndirectTestT{}}
err := NewEncoder(b).Encode(w)
if err != nil {
t.Fatal("encode error:", err)
}
var r []interfaceIndirectTestI
err = NewDecoder(b).Decode(&r)
if err !... | explode_data.jsonl/43394 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
5051,
1425,
1226,
1155,
353,
8840,
836,
8,
341,
79096,
2099,
4970,
1425,
1226,
2271,
51,
37790,
2233,
1669,
501,
23158,
22622,
340,
6692,
1669,
3056,
4970,
1425,
1226,
2271,
40,
90,
5,
4970,
1425,
1226,
2271,
51,
6257,
532... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestInterfaceMethods(t *testing.T) {
gopClTest(t, `package main
func foo(v ...interface { Bar() }) {
}
func main() {
}`, `package main
func foo(v ...interface {
Bar()
}) {
}
func main() {
}
`)
} | explode_data.jsonl/73691 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 81
} | [
2830,
3393,
5051,
17856,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
1565,
1722,
1887,
271,
2830,
15229,
3747,
2503,
4970,
314,
4716,
368,
6413,
341,
630,
2830,
1887,
368,
341,
28350,
1565,
1722,
1887,
271,
2830,
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 |
func TestDMLQueryWithoutWhereClause(t *testing.T) {
config := tabletenv.NewDefaultConfig()
config.HotRowProtection.Mode = tabletenv.Enable
config.HotRowProtection.MaxConcurrency = 1
config.TxPool.Size = 2
db, tsv := setupTabletServerTestCustom(t, config, "")
defer tsv.StopService()
defer db.Close()
target := q... | explode_data.jsonl/80004 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
35,
2668,
2859,
26040,
9064,
28482,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
1965,
1960,
85,
7121,
3675,
2648,
741,
25873,
3839,
354,
3102,
78998,
42852,
284,
1965,
1960,
85,
32287,
198,
25873,
3839,
354,
3102,
78998,
1453... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMarch(t *testing.T) {
for _, test := range []struct {
what string
fileSrcOnly []string
dirSrcOnly []string
fileDstOnly []string
dirDstOnly []string
fileMatch []string
dirMatch []string
}{
{
what: "source only",
fileSrcOnly: []string{"test", "test2", "test3", "sub di... | explode_data.jsonl/54650 | {
"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,
27523,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
3056,
1235,
341,
197,
197,
12555,
286,
914,
198,
197,
17661,
20360,
7308,
3056,
917,
198,
197,
48532,
20360,
7308,
220,
3056,
917,
198,
197,
17661,
54600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClusterAdminDeleteEmptyTopic(t *testing.T) {
seedBroker := NewMockBroker(t, 1)
defer seedBroker.Close()
seedBroker.SetHandlerByMap(map[string]MockResponse{
"MetadataRequest": NewMockMetadataResponse(t).
SetController(seedBroker.BrokerID()).
SetBroker(seedBroker.Addr(), seedBroker.BrokerID()),
"De... | explode_data.jsonl/40782 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 266
} | [
2830,
3393,
28678,
7210,
6435,
3522,
26406,
1155,
353,
8840,
836,
8,
341,
197,
22602,
65545,
1669,
1532,
11571,
65545,
1155,
11,
220,
16,
340,
16867,
10320,
65545,
10421,
2822,
197,
22602,
65545,
4202,
3050,
1359,
2227,
9147,
14032,
60,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestDataEvent(t *testing.T) {
var (
tag = "tag"
data = "{}"
e, err = unmarshal([]string{
fmt.Sprintf("tag: %s", tag),
fmt.Sprintf(`data: {"tag": "%s", "data": %s}`, tag, data),
})
)
if err != nil {
t.Errorf("Unexpected failure while unmarshaling valid EventsResponse")
}
cond := e.Type ==... | explode_data.jsonl/78028 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
93200,
1556,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
60439,
262,
284,
330,
4578,
698,
197,
8924,
256,
284,
35503,
698,
197,
7727,
11,
1848,
284,
650,
27121,
10556,
917,
515,
298,
11009,
17305,
445,
4578,
25,
1018,
82,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestCheckMandatoryS3Fields(t *testing.T) {
cfg := model.FileSettings{}
err := CheckMandatoryS3Fields(&cfg)
if err == nil || err.Message != "api.admin.test_s3.missing_s3_bucket" {
t.Fatal("should've failed with missing s3 bucket")
}
cfg.AmazonS3Bucket = model.NewString("test-mm")
err = CheckMandatoryS3Fie... | explode_data.jsonl/15378 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 231
} | [
2830,
3393,
3973,
44,
62088,
50,
18,
8941,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
1614,
8576,
6086,
31483,
9859,
1669,
4248,
44,
62088,
50,
18,
8941,
2099,
14072,
340,
743,
1848,
621,
2092,
1369,
1848,
8472,
961,
330,
2068,
18203,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMetricGroupData_toSummaryPointEquivalence(t *testing.T) {
type scrape struct {
at int64
value float64
metric string
}
tests := []struct {
name string
labels labels.Labels
scrapes []*scrape
}{
{
name: "summary",
labels: labels.Labels{{Name: "a", Value: "A"}, {Name: "quantile",... | explode_data.jsonl/19396 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1254
} | [
2830,
3393,
54310,
2808,
1043,
2346,
19237,
2609,
24509,
88790,
1155,
353,
8840,
836,
8,
341,
13158,
57128,
2036,
341,
197,
35447,
257,
526,
21,
19,
198,
197,
16309,
220,
2224,
21,
19,
198,
197,
2109,
16340,
914,
198,
197,
532,
78216,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrevMonth(t *testing.T) {
tests := []struct{ Input, Want time.Time }{
{New(2006, 1, 1), New(2005, 12, 1)},
{New(2006, 12, 4), New(2006, 11, 1)},
{New(2006, 3, 4), New(2006, 2, 1)},
{New(2016, 2, 29), New(2016, 1, 1)}, // leap year
{New(2015, 2, 28), New(2015, 1, 1)}, // non leap year
}
for i, tc :... | explode_data.jsonl/49083 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
33528,
11318,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
90,
5571,
11,
23252,
882,
16299,
335,
515,
197,
197,
90,
3564,
7,
17,
15,
15,
21,
11,
220,
16,
11,
220,
16,
701,
1532,
7,
17,
15,
15,
20,
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... | 3 |
func TestPlayer_Money(t *testing.T) {
pl := playerWithProperty("m_iAccount", st.PropertyValue{IntVal: 800})
assert.Equal(t, 800, pl.Money())
} | explode_data.jsonl/12192 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 53
} | [
2830,
3393,
4476,
1245,
2534,
1155,
353,
8840,
836,
8,
341,
72213,
1669,
2781,
2354,
3052,
445,
76,
5318,
7365,
497,
357,
15727,
1130,
90,
1072,
2208,
25,
220,
23,
15,
15,
8824,
6948,
12808,
1155,
11,
220,
23,
15,
15,
11,
625,
132... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSortTags(t *testing.T) {
a := assert.New(t, false)
// type=default
tags := []*Tag{
{
Title: "1",
Posts: []*Post{{}, {}, {}},
},
{
Title: "2",
Posts: []*Post{{}, {}},
},
}
sortTags(tags, loader.TagOrderTypeDefault, loader.OrderAsc)
a.Equal(tags[0].Title, "1").Equal(tags[1].Title, "2"... | explode_data.jsonl/35906 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 301
} | [
2830,
3393,
10231,
15930,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
11,
895,
692,
197,
322,
943,
92628,
198,
3244,
2032,
1669,
29838,
5668,
515,
197,
197,
515,
298,
92233,
25,
330,
16,
756,
298,
197,
19631,
25,
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 TestPrivateActivityNoVisibleForUserItself(t *testing.T) {
defer prepareTestEnv(t)()
testPrivateActivityDoSomethingForActionEntries(t)
session := loginUser(t, privateActivityTestUser)
visible := testPrivateActivityHelperHasVisibleActivitiesFromSession(t, session)
assert.True(t, visible, "user should have vis... | explode_data.jsonl/51646 | {
"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,
16787,
4052,
2753,
5715,
2461,
1474,
2132,
721,
1155,
353,
8840,
836,
8,
341,
16867,
10549,
2271,
14359,
1155,
8,
741,
18185,
16787,
4052,
5404,
23087,
2461,
2512,
24533,
1155,
692,
25054,
1669,
87169,
1155,
11,
869,
4052,
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 TestDeadlineExceeded_Unwrap(t *testing.T) {
mnr := &callbacks.DeadlineExceeded{}
unwrappedErr := mnr.Unwrap()
if unwrappedErr != nil {
t.Errorf(
"Unexpected wrapped error. Got %s, Expected: nil",
unwrappedErr,
)
}
} | explode_data.jsonl/56102 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
83593,
840,
94206,
40687,
10097,
1155,
353,
8840,
836,
8,
341,
2109,
19618,
1669,
609,
68311,
909,
3149,
1056,
840,
94206,
31483,
20479,
75704,
7747,
1669,
296,
19618,
10616,
10097,
2822,
743,
15025,
56289,
7747,
961,
2092,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestParse(t *testing.T) {
code := `(+ (* 1 1) (f "xx" "yy"))`
ats, _ := Parse(code)
except := `(+ (* 1 1) (f "xx" "yy"))`
if fmt.Sprintf("%v", ats) != except {
t.Error("Parse Error")
t.Log("ats: ", ats, "except: ", except)
}
} | explode_data.jsonl/14416 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 115
} | [
2830,
3393,
14463,
1155,
353,
8840,
836,
8,
341,
43343,
1669,
1565,
40938,
4609,
220,
16,
220,
16,
8,
320,
69,
330,
4146,
1,
330,
4807,
2761,
3989,
197,
1862,
11,
716,
1669,
14775,
15842,
340,
34599,
1669,
1565,
40938,
4609,
220,
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 TestUndelay(t *testing.T) {
c := context.New(t, defaultMTU)
defer c.Cleanup()
c.CreateConnected(context.TestInitialSequenceNumber, 30000, -1 /* epRcvBuf */)
c.EP.SocketOptions().SetDelayOption(true)
allData := [][]byte{{0}, {1, 2, 3}}
for i, data := range allData {
var r bytes.Reader
r.Reset(data)
i... | explode_data.jsonl/75965 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 865
} | [
2830,
3393,
19957,
6895,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2266,
7121,
1155,
11,
1638,
8505,
52,
340,
16867,
272,
727,
60639,
2822,
1444,
7251,
21146,
5378,
8787,
6341,
14076,
2833,
11,
220,
18,
15,
15,
15,
15,
11,
481,
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... | 5 |
func TestParseCfg(t *testing.T) {
dataDir := t.TempDir()
cmd := new(cobra.Command)
o := newOptions()
o.addFlags(cmd)
require.Nil(t, cmd.ParseFlags([]string{
"--addr", "127.5.5.1:8833",
"--advertise-addr", "127.5.5.1:7777",
"--log-file", "/root/cdc.log",
"--log-level", "debug",
"--data-dir", dataDir,
"... | explode_data.jsonl/41633 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1611
} | [
2830,
3393,
14463,
42467,
1155,
353,
8840,
836,
8,
341,
8924,
6184,
1669,
259,
65009,
6184,
741,
25920,
1669,
501,
1337,
28856,
12714,
340,
22229,
1669,
501,
3798,
741,
22229,
1364,
9195,
14160,
692,
17957,
59678,
1155,
11,
5439,
8937,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEntity_WriteTo_convert(t *testing.T) {
var h Header
h.Set("Content-Type", "text/plain; charset=utf-8")
h.Set("Content-Transfer-Encoding", "base64")
r := strings.NewReader("Qm9uam91ciDDoCB0b3Vz")
e, _ := New(h, r)
e.Header.Set("Content-Transfer-Encoding", "quoted-printable")
var b bytes.Buffer
if err ... | explode_data.jsonl/30553 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 305
} | [
2830,
3393,
3030,
31825,
1249,
34910,
1155,
353,
8840,
836,
8,
341,
2405,
305,
12104,
198,
9598,
4202,
445,
2762,
10804,
497,
330,
1318,
36971,
26,
11617,
22264,
12,
23,
1138,
9598,
4202,
445,
2762,
12,
21970,
67358,
497,
330,
3152,
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... | 3 |
func TestSamplingPolicyTypicalPath(t *testing.T) {
const maxSize = 100
const decisionWaitSeconds = 5
// For this test explicitly control the timer calls and batcher, and set a mock
// sampling policy evaluator.
msp := new(consumertest.TracesSink)
mpe := &mockPolicyEvaluator{}
mtt := &manualTTicker{}
tsp := &tai... | explode_data.jsonl/31673 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 787
} | [
2830,
3393,
98622,
13825,
12834,
938,
1820,
1155,
353,
8840,
836,
8,
341,
4777,
61935,
284,
220,
16,
15,
15,
198,
4777,
5480,
14190,
15343,
284,
220,
20,
198,
197,
322,
1752,
419,
1273,
20975,
2524,
279,
9021,
6738,
323,
7162,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResolveConstIntWithIdentWithNilObj(t *testing.T) {
expr := ast.Ident{}
_, err := resolveConstInt(&expr)
if err == nil {
t.Error("should have received error because expr.Obj == nil")
}
} | explode_data.jsonl/33716 | {
"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,
56808,
19167,
1072,
2354,
28301,
2354,
19064,
5261,
1155,
353,
8840,
836,
8,
341,
8122,
649,
1669,
11763,
6444,
306,
16094,
197,
6878,
1848,
1669,
8830,
19167,
1072,
2099,
9413,
340,
743,
1848,
621,
2092,
341,
197,
3244,
614... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetReminderTrack(t *testing.T) {
testActorsRuntime := newTestActorsRuntime()
actorType, actorID := getTestActorTypeAndID()
err := testActorsRuntime.updateReminderTrack(actorType, actorID)
assert.Nil(t, err)
} | explode_data.jsonl/12875 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
1649,
95359,
15667,
1155,
353,
8840,
836,
8,
341,
18185,
2414,
1087,
15123,
1669,
501,
2271,
2414,
1087,
15123,
741,
93410,
929,
11,
12089,
915,
1669,
633,
2271,
18870,
929,
3036,
915,
741,
9859,
1669,
1273,
2414,
1087,
1512... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckConstraintBuilder_Build(t *testing.T) {
ctx := context.Background()
semaCtx := tree.MakeSemaContext()
// Trick to get the init() for the builtins package to run.
_ = builtins.AllBuiltinNames
database := tree.Name("foo")
table := tree.Name("bar")
tn := tree.MakeTableName(database, table)
desc :=... | explode_data.jsonl/31241 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1606
} | [
2830,
3393,
3973,
17890,
3297,
96686,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
84686,
1728,
23684,
1669,
4916,
50133,
50,
9176,
1972,
2822,
197,
322,
69225,
311,
633,
279,
2930,
368,
369,
279,
5798,
1330,
6328,
311,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateVolumeSpec_Valid_File_VolumeMounts(t *testing.T) {
// create dswp
mode := v1.PersistentVolumeFilesystem
pv := &v1.PersistentVolume{
ObjectMeta: metav1.ObjectMeta{
Name: "dswp-test-volume-name",
},
Spec: v1.PersistentVolumeSpec{
ClaimRef: &v1.ObjectReference{Namespace: "ns", Name: "file-b... | explode_data.jsonl/45754 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 522
} | [
2830,
3393,
4021,
18902,
8327,
97279,
34061,
2334,
4661,
16284,
82,
1155,
353,
8840,
836,
8,
341,
197,
322,
1855,
294,
2280,
79,
198,
60247,
1669,
348,
16,
61655,
18902,
1703,
8948,
198,
3223,
85,
1669,
609,
85,
16,
61655,
18902,
515,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestChangeSetSorted(t *testing.T) {
old := mkSchema(
mkTable("table2"),
mkTable(
"table1",
mkCol("foo", SerialColumn, false, false, mkRef("table2", "bar", false)),
),
mkTable("table3"),
)
new := mkSchema(
mkTable("table3"),
mkTable("table4"),
mkTable(
"table5",
mkCol("foo", SerialColum... | explode_data.jsonl/19120 | {
"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,
4072,
1649,
51051,
1155,
353,
8840,
836,
8,
341,
61828,
1669,
23789,
8632,
1006,
197,
2109,
74,
2556,
445,
2005,
17,
4461,
197,
2109,
74,
2556,
1006,
298,
197,
1,
2005,
16,
756,
298,
2109,
74,
6127,
445,
7975,
497,
11215... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCombinedIndex(t *testing.T) {
builder1 := InMemoryBuilder(3)
builder2 := InMemoryBuilder(3)
split := 3
for i := 0; i < split; i ++ {
v := vectorTests[i]
builder1.AddWord(v.word, NewVector(v.vec))
}
for i := split; i < len(vectorTests); i ++ {
v := vectorTests[i]
builder2.AddWord(... | explode_data.jsonl/10279 | {
"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,
94268,
1552,
1155,
353,
8840,
836,
8,
341,
220,
7363,
16,
1669,
758,
10642,
3297,
7,
18,
340,
220,
7363,
17,
1669,
758,
10642,
3297,
7,
18,
692,
220,
6718,
1669,
220,
18,
271,
220,
369,
600,
1669,
220,
15,
26,
600,
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 TestContainsSyncResource(t *testing.T) {
var (
blankUnstructured unstructured.Unstructured
blankResource argoappv1.SyncOperationResource
helloResource = argoappv1.SyncOperationResource{Name: "hello"}
)
tables := []struct {
u *unstructured.Unstructured
rr []argoappv1.SyncOperationR... | explode_data.jsonl/49986 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 313
} | [
2830,
3393,
23805,
12154,
4783,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
197,
10189,
1806,
51143,
650,
51143,
10616,
51143,
198,
197,
197,
10189,
4783,
257,
1392,
78,
676,
85,
16,
92183,
8432,
4783,
198,
197,
9598,
4791,
4783,
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... | 3 |
func TestForwardResponseStream(t *testing.T) {
type msg struct {
pb proto.Message
err error
}
tests := []struct {
name string
msgs []msg
statusCode int
responseBody bool
}{{
name: "encoding",
msgs: []msg{
{&pb.SimpleMessage{Id: "One"}, nil},
{&pb.SimpleMessage{Id: "Two"}, ni... | explode_data.jsonl/13712 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1692
} | [
2830,
3393,
25925,
2582,
3027,
1155,
353,
8840,
836,
8,
341,
13158,
3750,
2036,
341,
197,
3223,
65,
220,
18433,
8472,
198,
197,
9859,
1465,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
21169,
82,
260,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMiddleware(t *testing.T) {
tests := map[string]struct {
handlerID string
config middleware.Config
req func() *http.Request
mock func(m *mmetrics.Recorder)
handler func() http.Handler
expRespCode int
expRespBody string
}{
"A default HTTP middleware should call the rec... | explode_data.jsonl/72886 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 883
} | [
2830,
3393,
24684,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
53326,
915,
256,
914,
198,
197,
25873,
414,
29679,
10753,
198,
197,
24395,
260,
2915,
368,
353,
1254,
9659,
198,
197,
77333,
286,
2915,
125... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsValidReturnErrorIfRelativeFiles(t *testing.T) {
yamlWithFiles := `
kernel:
image: linuxkit/kernel:4.9.69
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
files:
- path: /etc/issue
source: "/some/path/in/the/server"
trust:
org:
- linuxkit`
c, parseErr := moby.NewConfig([]byte(yamlWithFi... | explode_data.jsonl/59569 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 164
} | [
2830,
3393,
55470,
5598,
1454,
2679,
28442,
10809,
1155,
353,
8840,
836,
8,
341,
14522,
9467,
2354,
10809,
1669,
22074,
23248,
510,
220,
2168,
25,
36245,
8226,
58343,
25,
19,
13,
24,
13,
21,
24,
198,
220,
94106,
25,
330,
5354,
24000,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTokenExpired(t *testing.T) {
px, idp, _ := newTestProxyService(nil)
token := newTestToken(idp.getLocation())
cs := []struct {
Expire time.Duration
OK bool
}{
{
Expire: time.Duration(1 * time.Hour),
OK: true,
},
{
Expire: time.Duration(-5 * time.Hour),
},
}
for i, x := range c... | explode_data.jsonl/12649 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 338
} | [
2830,
3393,
3323,
54349,
1155,
353,
8840,
836,
8,
341,
197,
1767,
11,
877,
79,
11,
716,
1669,
501,
2271,
16219,
1860,
27907,
340,
43947,
1669,
501,
2271,
3323,
3724,
79,
51228,
2398,
71899,
1669,
3056,
1235,
341,
197,
197,
8033,
554,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWriteTableMeta(t *testing.T) {
t.Parallel()
dir := t.TempDir()
config := defaultConfigForTest(t)
config.OutputDirPath = dir
writer, clean := createTestWriter(config, t)
defer clean()
err := writer.WriteTableMeta("test", "t", "CREATE TABLE t (a INT)")
require.NoError(t, err)
p := path.Join(dir, "te... | explode_data.jsonl/36786 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
7985,
2556,
12175,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
48532,
1669,
259,
65009,
6184,
2822,
25873,
1669,
1638,
2648,
2461,
2271,
1155,
340,
25873,
34246,
6184,
1820,
284,
5419,
271,
38959,
11,
4240,
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 TestOrderingKeyFromBlock(t *testing.T) {
v := OrderingKeyFromBlock(0x1122334455667788, false)
assert.EqualValues(t, KinVersion_KIN4, v[0])
assert.Equal(t, uint64(0x1122334455667788), binary.BigEndian.Uint64(v[1:]))
for i := 0; i < 8; i++ {
assert.EqualValues(t, 0, v[9+i])
}
v = OrderingKeyFromBlock(0x1122... | explode_data.jsonl/11688 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 338
} | [
2830,
3393,
4431,
287,
1592,
3830,
4713,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
68621,
1592,
3830,
4713,
7,
15,
87,
16,
16,
17,
17,
18,
18,
19,
19,
20,
20,
21,
21,
22,
22,
23,
23,
11,
895,
340,
6948,
12808,
6227,
1155,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestPrometheusEtcdRulesFiltered(t *testing.T) {
enabled := false
c := NewDefaultConfig()
c.EtcdConfig.Enabled = &enabled
f := NewFactory("openshift-monitoring", c)
r, err := f.PrometheusK8sRules()
if err != nil {
t.Fatal(err)
}
for _, g := range r.Spec.Groups {
if g.Name == "etcd" {
t.Fatal("etcd ... | explode_data.jsonl/68663 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 152
} | [
2830,
3393,
35186,
39705,
31860,
4385,
26008,
67310,
1155,
353,
8840,
836,
8,
341,
197,
15868,
1669,
895,
198,
1444,
1669,
1532,
3675,
2648,
741,
1444,
5142,
83,
4385,
2648,
13690,
284,
609,
15868,
198,
1166,
1669,
1532,
4153,
445,
2417... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBotError(t *testing.T) {
plugin := Plugin{
Repo: Repo{
Name: "go-hello",
Namespace: "appleboy",
},
Commit: Commit{
Sha: "e7c4f0a63ceeb42a39ac7806f7b51f3f0d204fd2",
Author: "Bo-Yi Wu",
Branch: "master",
Message: "update travis by drone plugin",
},
Build: Build{
Number:... | explode_data.jsonl/17931 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 307
} | [
2830,
3393,
23502,
1454,
1155,
353,
8840,
836,
8,
341,
197,
9138,
1669,
21245,
515,
197,
197,
25243,
25,
71509,
515,
298,
21297,
25,
414,
330,
3346,
2832,
4791,
756,
298,
90823,
25,
330,
22377,
17184,
756,
197,
197,
1583,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestKustomizeSSHRemoteBase(t *testing.T) {
Given(t).
// not the best test, as we should have two remote repos both with the same SSH private key
SSHInsecureRepoURLAdded(true).
RepoURLType(fixture.RepoURLTypeSSH).
Path("ssh-kustomize-base").
When().
Create().
Sync().
Then().
Expect(OperationPhase... | explode_data.jsonl/37133 | {
"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,
42,
1450,
551,
62419,
24703,
3978,
1155,
353,
8840,
836,
8,
341,
9600,
2071,
1155,
4292,
197,
197,
322,
537,
279,
1850,
1273,
11,
438,
582,
1265,
614,
1378,
8699,
45774,
2176,
448,
279,
1852,
40463,
869,
1376,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMaxHeapify(t *testing.T) {
var heap = []int{0, 10, 5, 20, 4, 3, 1, 15}
want := []int{0, 20, 5, 15, 4, 3, 1, 10}
MaxHeapify(&heap, len(heap)-1, 1)
if !reflect.DeepEqual(want, heap) {
t.Errorf("wanted heap %v got %v", want, heap)
}
} | explode_data.jsonl/22503 | {
"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,
5974,
27909,
1437,
1155,
353,
8840,
836,
8,
341,
2405,
17364,
284,
3056,
396,
90,
15,
11,
220,
16,
15,
11,
220,
20,
11,
220,
17,
15,
11,
220,
19,
11,
220,
18,
11,
220,
16,
11,
220,
16,
20,
630,
50780,
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 TestSetPhotoPrimary(t *testing.T) {
assert.Equal(t, false, entity.FileFixturesExampleXMP.FilePrimary)
err := SetPhotoPrimary("pt9jtdre2lvl0yh7", "ft2es49whhbnlqdn")
if err != nil {
t.Fatal(err)
}
//TODO How to assert
//assert.Equal(t, true, entity.FileFixturesExampleXMP.FilePrimary)
} | explode_data.jsonl/71302 | {
"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,
1649,
10463,
15972,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
1155,
11,
895,
11,
5387,
8576,
25958,
18513,
13314,
55,
5781,
8576,
15972,
692,
9859,
1669,
2573,
10463,
15972,
445,
417,
24,
73,
1296,
265,
17,
58160,
15,
738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_ReadAll(t *testing.T) {
t.Parallel()
ctx := context.Background()
um, err := NewUnmarshaller(sample{}, csv.NewReader(strings.NewReader(csvContents)))
require.NoError(t, err)
out, err := um.ReadAll(ctx, StopOnError)
require.NoError(t, err)
switch samples := out.(type) {
case []sample:
assert.Len(t... | explode_data.jsonl/78439 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 461
} | [
2830,
3393,
38381,
2403,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20985,
1669,
2266,
19047,
2822,
197,
372,
11,
1848,
1669,
1532,
87690,
32968,
22655,
13147,
68587,
51442,
68587,
41583,
14803,
5929,
17957,
35699,
1155,
11,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNewIoBufferString(t *testing.T) {
for i := 0; i < 1024; i++ {
s := randString(i)
b := NewIoBufferString(s)
if b.String() != s {
t.Errorf("Expect %s but got %s", s, b.String())
}
}
} | explode_data.jsonl/24046 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
3564,
42799,
4095,
703,
1155,
353,
8840,
836,
8,
341,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
17,
19,
26,
600,
1027,
341,
197,
1903,
1669,
10382,
703,
1956,
340,
197,
2233,
1669,
1532,
42799,
4095,
703,
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 TestSignatureButNoPublicKey(t *testing.T) {
t.Parallel()
fName := "TestSignatureButNoPublicKey"
defer cleanup(fName)
writeOldFile(fName, t)
err := Apply(bytes.NewReader(newFile), Options{
TargetPath: fName,
Signature: signec(ecdsaPrivateKey, newFile, t),
})
if err == nil {
t.Fatalf("Allowed an upda... | explode_data.jsonl/73992 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
25088,
3983,
2753,
61822,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1166,
675,
1669,
330,
2271,
25088,
3983,
2753,
61822,
698,
16867,
21290,
955,
675,
340,
24945,
18284,
1703,
955,
675,
11,
259,
692,
9859,
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 TestHandleInboundResponse(t *testing.T) {
prov := getProvider(t)
ctx := getContext(t, &prov, kms.ED25519Type, kms.X25519ECDHKWType, transport.MediaTypeRFC0019EncryptedEnvelope)
_, encKey := newSigningAndEncryptionDIDKeys(t, ctx)
_, err := createMockInvitation(encKey, ctx)
require.NoError(t, err)
t.Run("han... | explode_data.jsonl/2106 | {
"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,
6999,
641,
10891,
2582,
1155,
353,
8840,
836,
8,
341,
197,
42947,
1669,
633,
5179,
1155,
340,
20985,
1669,
66175,
1155,
11,
609,
42947,
11,
96677,
13,
1479,
17,
20,
20,
16,
24,
929,
11,
96677,
4338,
17,
20,
20,
16,
24,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateAssetTxSyntacticVerifyInvalidDenomination(t *testing.T) {
tx, c, ctx := validCreateAssetTx(t)
tx.Denomination = byte(33)
if err := tx.SyntacticVerify(ctx, c, assetID, 0, 0, 1); err == nil {
t.Fatal("CreateAssetTx should have failed syntactic verification due to denomination too large")
}
} | explode_data.jsonl/73232 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
4021,
16604,
31584,
34667,
406,
23170,
32627,
7928,
23619,
80380,
1155,
353,
8840,
836,
8,
341,
46237,
11,
272,
11,
5635,
1669,
2697,
4021,
16604,
31584,
1155,
692,
46237,
909,
268,
80380,
284,
4922,
7,
18,
18,
340,
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,
1... | 2 |
func TestArtifactLocation_Key(t *testing.T) {
t.Run("Nil", func(t *testing.T) {
var l *ArtifactLocation
assert.False(t, l.HasKey())
_, err := l.GetKey()
assert.Error(t, err, "cannot get nil")
err = l.SetKey("my-file")
assert.Error(t, err, "cannot set nil")
})
t.Run("Empty", func(t *testing.T) {
// unli... | explode_data.jsonl/26029 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1162
} | [
2830,
3393,
85578,
4707,
35253,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
19064,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
2405,
326,
353,
85578,
4707,
198,
197,
6948,
50757,
1155,
11,
326,
88088,
2398,
197,
197,
6878,
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 TestServeFileFromCWD(t *testing.T) {
defer afterTest(t)
ts := httptest.NewServer(HandlerFunc(func(w ResponseWriter, r *Request) {
ServeFile(w, r, "fs_test.go")
}))
defer ts.Close()
r, err := Get(ts.URL)
if err != nil {
t.Fatal(err)
}
r.Body.Close()
if r.StatusCode != 200 {
t.Fatalf("expected 200 OK,... | explode_data.jsonl/48233 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
60421,
1703,
3830,
34,
17563,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
340,
57441,
1669,
54320,
70334,
7121,
5475,
7,
3050,
9626,
18552,
3622,
5949,
6492,
11,
435,
353,
1900,
8,
341,
197,
7568,
5852,
1703,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrepFetchForRollback(t *testing.T) {
pp := NewTxPreparedPool(2)
conn := &TxConnection{}
pp.Put(conn, "aa")
got := pp.FetchForRollback("bb")
if got != nil {
t.Errorf("Get(bb): %v, want nil", got)
}
got = pp.FetchForRollback("aa")
if got != conn {
t.Errorf("pp.Get(aa): %p, want %p", got, conn)
}
go... | explode_data.jsonl/36821 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 187
} | [
2830,
3393,
4703,
79,
20714,
2461,
32355,
1419,
1155,
353,
8840,
836,
8,
341,
65729,
1669,
1532,
31584,
4703,
7212,
10551,
7,
17,
340,
32917,
1669,
609,
31584,
4526,
16094,
65729,
39825,
20571,
11,
330,
5305,
1138,
3174,
354,
1669,
1182... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExportMetricsOp(t *testing.T) {
doneFn, err := obsreporttest.SetupRecordedMetricsTest()
require.NoError(t, err)
defer doneFn()
set := componenttest.NewNopExporterCreateSettings()
sr := new(oteltest.SpanRecorder)
set.TracerProvider = oteltest.NewTracerProvider(oteltest.WithSpanRecorder(sr))
parentCtx, ... | explode_data.jsonl/9549 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 760
} | [
2830,
3393,
16894,
27328,
7125,
1155,
353,
8840,
836,
8,
341,
40495,
24911,
11,
1848,
1669,
7448,
11736,
1944,
39820,
6471,
291,
27328,
2271,
741,
17957,
35699,
1155,
11,
1848,
340,
16867,
2814,
24911,
2822,
8196,
1669,
3692,
1944,
7121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestSpanPropertiesFilter(t *testing.T) {
cases := []struct {
Desc string
Trace *TraceData
Decision Decision
}{
{
Desc: "fully matching",
Trace: newTraceAttrs("foobar", 1000*time.Microsecond, 100),
Decision: Sampled,
},
{
Desc: "nonmatching operation name",
Trace: n... | explode_data.jsonl/79888 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 453
} | [
2830,
3393,
12485,
7903,
5632,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
10957,
3300,
257,
914,
198,
197,
197,
6550,
262,
353,
6550,
1043,
198,
197,
197,
74846,
40425,
198,
197,
59403,
197,
197,
515,
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... | 1 |
func TestVersionValidation(t *testing.T) {
type subcase struct {
name string
smcp *maistrav1.ServiceMeshControlPlane
configure func(smcp *maistrav1.ServiceMeshControlPlane)
allowed bool
}
cases := []struct {
name string
cases []subcase
}{
{
name: "v1.0",
// all these tests should b... | explode_data.jsonl/20792 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2151
} | [
2830,
3393,
5637,
13799,
1155,
353,
8840,
836,
8,
341,
13158,
1186,
5638,
2036,
341,
197,
11609,
414,
914,
198,
197,
72023,
4672,
414,
353,
1728,
3758,
402,
16,
13860,
14194,
3273,
34570,
198,
197,
197,
21002,
2915,
55280,
4672,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReplaceHook_CreateHook(t *testing.T) {
controller := gomock.NewController(t)
defer controller.Finish()
hooks := []*scm.Hook{}
hookInput := &scm.HookInput{
Target: "https://drone.company.com/hook",
}
remote := mockscm.NewMockRepositoryService(controller)
remote.EXPECT().ListHooks(gomock.Any(), "octoc... | explode_data.jsonl/40650 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
23107,
31679,
34325,
31679,
1155,
353,
8840,
836,
8,
341,
61615,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
6461,
991,
18176,
2822,
9598,
14685,
1669,
29838,
2388,
76,
3839,
1941,
16094,
9598,
1941,
2505,
1669,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMultithreading(t *testing.T) {
// Setup a router that needs to read the routing table essentially on every access to
// stress threading a bit more.
num := 0
table := &db.RoutingTable{Readers: []string{"rd1", "rd2"}, Writers: []string{"wr"}, TimeToLive: 1}
pool := &poolFake{
borrow: func(names []string... | explode_data.jsonl/40048 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 533
} | [
2830,
3393,
40404,
410,
6154,
1155,
353,
8840,
836,
8,
1476,
197,
322,
18626,
264,
9273,
429,
3880,
311,
1349,
279,
29058,
1965,
15791,
389,
1449,
2615,
311,
198,
197,
322,
8464,
30159,
264,
2699,
803,
624,
22431,
1669,
220,
15,
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 TestGetMe(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
ruser, _, err := th.Client.GetMe("")
require.NoError(t, err)
require.Equal(t, th.BasicUser.Id, ruser.Id)
th.Client.Logout()
_, resp, err := th.Client.GetMe("")
require.Error(t, err)
CheckUnauthorizedStatus(t, resp)
} | explode_data.jsonl/47485 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
1949,
7823,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
7000,
872,
11,
8358,
1848,
1669,
270,
11716,
2234,
7823,
31764,
17957,
35699,
1155,
11,
1848,
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 Test_SetNetworkConfig_Deep(t *testing.T) {
t.Skip() // Were causing intermittent errors on travis TODO Find root cause
test := test.NewTest(
rsm.NewProtocol(),
test.WithReplicas(1),
test.WithPartitions(1),
test.WithDebugLogs())
testify.NoError(t, test.Start())
defer test.Stop()
atomixClient, err := ... | explode_data.jsonl/41401 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1131
} | [
2830,
3393,
14812,
12320,
2648,
24597,
747,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
368,
442,
38970,
14381,
74468,
5975,
389,
10137,
285,
5343,
7379,
3704,
5240,
271,
18185,
1669,
1273,
7121,
2271,
1006,
197,
7000,
3563,
7121,
20689,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMarkConversation(t *testing.T) {
once.Do(startServer)
api := New("testing-token", OptionAPIURL("http://"+serverAddr+"/"))
err := api.MarkConversation("CXXXXXXXX", "1401383885.000061")
if err != nil {
t.Errorf("Unexpected error: %s", err)
return
}
} | explode_data.jsonl/78555 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
8949,
60313,
1155,
353,
8840,
836,
8,
341,
197,
13184,
33596,
10639,
5475,
340,
54299,
1669,
1532,
445,
8840,
34841,
497,
6959,
7082,
3144,
445,
1254,
1110,
5572,
4030,
13986,
27569,
5455,
9859,
1669,
6330,
75888,
60313,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDSNParser(t *testing.T) {
var cfg *config
var err error
var res string
for i, tst := range testDSNs {
cfg, err = parseDSN(tst.in)
if err != nil {
t.Error(err.Error())
}
// pointer not static
cfg.tls = nil
res = fmt.Sprintf("%+v", cfg)
if res != fmt.Sprintf(tst.out, tst.loc) {
t.Error... | explode_data.jsonl/71457 | {
"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,
5936,
45,
6570,
1155,
353,
8840,
836,
8,
341,
2405,
13286,
353,
1676,
198,
2405,
1848,
1465,
198,
2405,
592,
914,
271,
2023,
600,
11,
71707,
1669,
2088,
1273,
5936,
47360,
341,
197,
50286,
11,
1848,
284,
4715,
5936,
45,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrescalingPreventDelete(t *testing.T) {
stackPrescalingTimeout := 5
t.Parallel()
stacksetName := "stackset-prevent-delete"
factory := NewTestStacksetSpecFactory(stacksetName).StackGC(1, 15).Ingress().Replicas(3)
// create stackset with first version
firstVersion := "v1"
fullFirstStack := fmt.Sprintf("%... | explode_data.jsonl/4348 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1067
} | [
2830,
3393,
14367,
81552,
4703,
684,
6435,
1155,
353,
8840,
836,
8,
341,
48227,
14367,
81552,
7636,
1669,
220,
20,
198,
3244,
41288,
7957,
741,
48227,
40730,
1669,
330,
7693,
746,
21334,
684,
40904,
698,
1166,
2919,
1669,
1532,
2271,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestUpdateClusterIndex(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec(`use test`)
tk.Session().GetSessionVars().EnableClusteredIndex = variable.ClusteredIndexDefModeOn
tk.MustExec(`drop table if exists t`)
tk.MustExec(`create table t... | explode_data.jsonl/76265 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1405
} | [
2830,
3393,
4289,
28678,
1552,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50463,
10216,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSolution(t *testing.T) {
t.Parallel()
type in struct {
q, h, s, d, n int
}
tests := []struct {
in in
want int
}{
{in: in{q: 20, h: 30, s: 70, d: 90, n: 3}, want: 150},
{in: in{q: 10000, h: 1000, s: 100, d: 10, n: 1}, want: 100},
{in: in{q: 10, h: 100, s: 1000, d: 10000, n: 1}, want: 40},
}
... | explode_data.jsonl/76126 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 320
} | [
2830,
3393,
36842,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
13158,
304,
2036,
341,
197,
18534,
11,
305,
11,
274,
11,
294,
11,
308,
526,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
17430,
256,
304,
198,
197,
50780,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNonExistentCommandLineFile(t *testing.T) {
loadingRules := ClientConfigLoadingRules{
ExplicitPath: "bogus_file",
}
_, err := loadingRules.Load()
if err == nil {
t.Fatalf("Expected error for missing command-line file, got none")
}
if !strings.Contains(err.Error(), "bogus_file") {
t.Fatalf("Expected... | explode_data.jsonl/67846 | {
"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,
8121,
840,
18128,
71885,
1703,
1155,
353,
8840,
836,
8,
341,
197,
10628,
26008,
1669,
8423,
2648,
8578,
26008,
515,
197,
197,
98923,
1820,
25,
330,
65,
538,
355,
2458,
756,
197,
630,
197,
6878,
1848,
1669,
8277,
26008,
139... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestText_MinSize(t *testing.T) {
text := NewText("Test", color.RGBA{0, 0, 0, 0xff})
min := text.MinSize()
assert.True(t, min.Width > 0)
assert.True(t, min.Height > 0)
text = NewText("Test2", color.RGBA{0, 0, 0, 0xff})
min2 := text.MinSize()
assert.True(t, min2.Width > min.Width)
} | explode_data.jsonl/5954 | {
"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,
1178,
62122,
1695,
1155,
353,
8840,
836,
8,
341,
15425,
1669,
1532,
1178,
445,
2271,
497,
1894,
80114,
32,
90,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
9020,
3518,
25320,
1669,
1467,
17070,
1695,
2822,
6948,
32443,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProxy(t *testing.T) {
// Setup
t1 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "target 1")
}))
defer t1.Close()
url1, _ := url.Parse(t1.URL)
t2 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "t... | explode_data.jsonl/41286 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1291
} | [
2830,
3393,
16219,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
198,
3244,
16,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
11009,
991,
1350,
3622,
11,
330,
5657,
220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUnmarshal_WithUnmarshalerRec(t *testing.T) {
type testStruct struct {
String testUnmarshalerRecString
Struct testUnmarshalerRecStruct
Arraytable []testStruct
}
var v testStruct
err := Unmarshal(loadTestData("unmarshal-unmarshalerrec.toml"), &v)
if err != nil {
t.Fatal("Unexpected error:", ... | explode_data.jsonl/52964 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 296
} | [
2830,
3393,
1806,
27121,
62,
2354,
1806,
27121,
261,
3820,
1155,
353,
8840,
836,
8,
341,
13158,
1273,
9422,
2036,
341,
197,
4980,
257,
1273,
1806,
27121,
261,
3820,
703,
198,
197,
197,
9422,
257,
1273,
1806,
27121,
261,
3820,
9422,
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 TestCCInfoFSPeerInstance(t *testing.T) {
ccname := "bar"
ccver := "1.0"
ccpath := "github.com/hyperledger/fabric/examples/chaincode/go/example02/cmd"
//CC数据尚不在缓存中
_, err := GetChaincodeFromFS(ccname, ccver)
assert.Error(t, err)
//创建要放置的DEP规范
ds, err := getDepSpec(ccname, ccpath, ccver, [][]byte{[]byte("ini... | explode_data.jsonl/10595 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 386
} | [
2830,
3393,
3706,
1731,
37,
4592,
34756,
2523,
1155,
353,
8840,
836,
8,
341,
63517,
606,
1669,
330,
2257,
698,
63517,
423,
1669,
330,
16,
13,
15,
698,
63517,
2343,
1669,
330,
5204,
905,
7530,
39252,
50704,
6663,
28897,
67020,
14,
8819... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStickyLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) {
client1 := &net.TCPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 0}
client2 := &net.TCPAddr{IP: net.IPv4(127, 0, 0, 2), Port: 0}
client3 := &net.TCPAddr{IP: net.IPv4(127, 0, 0, 3), Port: 0}
loadBalancer := NewLoadBalancerRR()
service := proxy.... | explode_data.jsonl/66182 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1040
} | [
2830,
3393,
623,
18964,
5879,
21190,
6776,
16056,
32089,
80786,
3036,
37091,
1155,
353,
8840,
836,
8,
341,
25291,
16,
1669,
609,
4711,
836,
7123,
13986,
90,
3298,
25,
4179,
46917,
85,
19,
7,
16,
17,
22,
11,
220,
15,
11,
220,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestAddOrRemoveExternalMonitor(t *testing.T) {
var changed bool
var err error
// populate fake monmap
fakeResp := client.MonStatusResponse{Quorum: []int{0}}
fakeResp.MonMap.Mons = []client.MonMapEntry{
{
Name: "a",
},
}
fakeResp.MonMap.Mons[0].PublicAddr = "172.17.0.4:3300"
// populate fake Clust... | explode_data.jsonl/36575 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 605
} | [
2830,
3393,
2212,
2195,
13021,
25913,
30098,
1155,
353,
8840,
836,
8,
341,
2405,
5497,
1807,
198,
2405,
1848,
1465,
271,
197,
322,
30446,
12418,
1615,
2186,
198,
1166,
726,
36555,
1669,
2943,
52211,
2522,
2582,
90,
2183,
33006,
25,
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... | 1 |
func TestNotSameHash(t *testing.T) {
hasher1, err := DefaultFactory.GetHasher(SHA256)
if err != nil {
t.Fatal("Unable to retrieve SHA256 Hasher")
}
hasher2, err := DefaultFactory.GetHasher(SHA256)
if err != nil {
t.Fatal("Unable to retrieve SHA256 Hasher")
}
h12345 := "dd712114fb283417de4da3512e17486adbda... | explode_data.jsonl/42624 | {
"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,
2623,
19198,
6370,
1155,
353,
8840,
836,
8,
1476,
50333,
261,
16,
11,
1848,
1669,
7899,
4153,
2234,
6370,
261,
3759,
17020,
17,
20,
21,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
445,
17075,
311,
17179,
21721,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestClusterAdminDeleteRecords(t *testing.T) {
topicName := "my_topic"
seedBroker := NewMockBroker(t, 1)
defer seedBroker.Close()
seedBroker.SetHandlerByMap(map[string]MockResponse{
"MetadataRequest": NewMockMetadataResponse(t).
SetController(seedBroker.BrokerID()).
SetBroker(seedBroker.Addr(), seedBro... | explode_data.jsonl/40790 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 437
} | [
2830,
3393,
28678,
7210,
6435,
25876,
1155,
353,
8840,
836,
8,
341,
3244,
24810,
675,
1669,
330,
2408,
31414,
698,
197,
22602,
65545,
1669,
1532,
11571,
65545,
1155,
11,
220,
16,
340,
16867,
10320,
65545,
10421,
2822,
197,
22602,
65545,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetLocalAddress(t *testing.T) {
e := &ConnectedEndpoint{path: "foo"}
want := tcpip.FullAddress{Addr: tcpip.Address("foo")}
if got, err := e.GetLocalAddress(); err != nil || got != want {
t.Errorf("Got %#v.GetLocalAddress() = %#v, %v, want = %#v, %v", e, got, err, want, nil)
}
} | explode_data.jsonl/257 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
1949,
7319,
4286,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
609,
21146,
27380,
90,
2343,
25,
330,
7975,
16707,
50780,
1669,
28051,
573,
32038,
4286,
90,
13986,
25,
28051,
573,
26979,
445,
7975,
42132,
743,
2684,
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... | 3 |
func TestContextGetStringSlice(t *testing.T) {
c, _ := CreateTestContext(httptest.NewRecorder())
c.Set("slice", []string{"foo"})
assert.Equal(t, []string{"foo"}, c.GetStringSlice("slice"))
} | explode_data.jsonl/26753 | {
"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,
1972,
48905,
33236,
1155,
353,
8840,
836,
8,
341,
1444,
11,
716,
1669,
4230,
2271,
1972,
73392,
83,
70334,
7121,
47023,
2398,
1444,
4202,
445,
24963,
497,
3056,
917,
4913,
7975,
23625,
6948,
12808,
1155,
11,
3056,
917,
4913,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGet_fileDecompressorExt(t *testing.T) {
dst := tempDir(t)
u := testModule("basic-tgz")
if err := Get(dst, u); err != nil {
t.Fatalf("err: %s", err)
}
mainPath := filepath.Join(dst, "main.tf")
if _, err := os.Stat(mainPath); err != nil {
t.Fatalf("err: %s", err)
}
} | explode_data.jsonl/808 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 129
} | [
2830,
3393,
1949,
2458,
4900,
316,
56220,
6756,
1155,
353,
8840,
836,
8,
341,
52051,
1669,
2730,
6184,
1155,
340,
10676,
1669,
1273,
3332,
445,
22342,
2385,
46589,
5130,
743,
1848,
1669,
2126,
30260,
11,
575,
1215,
1848,
961,
2092,
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... | 3 |
func TestCacheMountLockedRefs(t *testing.T) {
t.Parallel()
ctx := namespaces.WithNamespace(context.Background(), "buildkit-test")
tmpdir, err := ioutil.TempDir("", "cachemanager")
require.NoError(t, err)
defer os.RemoveAll(tmpdir)
snapshotter, err := native.NewSnapshotter(filepath.Join(tmpdir, "snapshots"))
re... | explode_data.jsonl/50741 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 638
} | [
2830,
3393,
8233,
16284,
49010,
82807,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
58091,
26124,
22699,
5378,
19047,
1507,
330,
5834,
8226,
16839,
5130,
20082,
3741,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestConvergence(t *testing.T) {
// scenario:
// {boot peer: [peer list]}
// {d1: d2, d3, d4}
// {d5: d6, d7, d8}
// {d9: d10, d11, d12}
// connect all boot peers with d13
// take down d13
// ensure still full membership
instances := []*gossipInstance{}
for _, i := range []int{1, 5, 9} {
bootPort := 461... | explode_data.jsonl/62268 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 407
} | [
2830,
3393,
1109,
80748,
1155,
353,
8840,
836,
8,
341,
197,
322,
15048,
510,
197,
322,
314,
4619,
14397,
25,
508,
16537,
1140,
23439,
197,
322,
314,
67,
16,
25,
294,
17,
11,
294,
18,
11,
294,
19,
532,
197,
322,
314,
67,
20,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_swapRuleV3_getSwapInOffset(t *testing.T) {
type args struct {
lenCommitteesAfterSwapOut int
lenSubstitutes int
maxCommitteeSize int
numberOfSlashingValidators int
lenCommitteesBeforeSwapOut int
}
tests := []struct {
name string
s *swapRuleV3
... | explode_data.jsonl/62412 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2061
} | [
2830,
3393,
40991,
11337,
53,
18,
3062,
46179,
641,
6446,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
33111,
33441,
29800,
6025,
46179,
2662,
220,
526,
198,
197,
33111,
3136,
3696,
2095,
1797,
526,
198,
197,
22543,
33441,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExifEditor_SetDirty(t *testing.T) {
je, _ := NewExifEditorEmpty(false)
if je.IsDirty() {
t.Errorf("Expected editor to not be dirty")
}
je.SetDirty()
if !je.IsDirty() {
t.Errorf("Expected editor to be dirty")
}
} | explode_data.jsonl/79882 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
840,
333,
9410,
14812,
36485,
1155,
353,
8840,
836,
8,
341,
197,
3756,
11,
716,
1669,
1532,
840,
333,
9410,
3522,
3576,
340,
743,
4759,
4506,
36485,
368,
341,
197,
3244,
13080,
445,
18896,
6440,
311,
537,
387,
18595,
1138,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContainsProjectId(t *testing.T) {
endpointContains := []string{"https://as.eu-de.otc.t-systems.com/autoscaling-api/v1/f9842224f84e44f99c2878eddc7f9ef5",
"https://elb.t-systems.com/rds/v1.0/c9842224f84e44f99c2878eddc7f9ef5/",
"https://elb.eu-de.otc.t-systems.com/v1.1/c9842224f84e44f99c2878eddc7f9ef5",
"h... | explode_data.jsonl/82340 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 619
} | [
2830,
3393,
23805,
7849,
764,
1155,
353,
8840,
836,
8,
341,
6246,
2768,
23805,
1669,
3056,
917,
4913,
2428,
1110,
300,
35003,
6810,
79361,
66,
734,
36648,
82,
905,
14,
79301,
81552,
23904,
5457,
16,
6663,
24,
23,
19,
17,
17,
17,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestBuilder_LangFrom(t *testing.T) {
tests := []struct {
Name, Lang string
Expected language.Tag
}{
{
Name: "success creating language",
Lang: "en",
Expected: language.Make("en"),
},
{
Name: "empty language and empty tag",
Lang: "",
Expected: language.Tag{},
},
{... | explode_data.jsonl/75867 | {
"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,
3297,
2351,
524,
3830,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
21297,
11,
22463,
914,
198,
197,
197,
18896,
256,
4128,
23676,
198,
197,
59403,
197,
197,
515,
298,
21297,
25,
257,
330,
5630,
6825,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestData(t *testing.T) {
compose.EnsureUp(t, "logstash")
config := logstash.GetConfig("node_stats")
f := mbtest.NewReportingMetricSetV2(t, config)
err := mbtest.WriteEventsReporterV2(f, t, "")
if err != nil {
t.Fatal("write", err)
}
} | explode_data.jsonl/54992 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 107
} | [
2830,
93200,
1155,
353,
8840,
836,
8,
341,
32810,
2900,
22834,
19098,
2324,
1155,
11,
330,
839,
49771,
5130,
25873,
1669,
1487,
49771,
2234,
2648,
445,
3509,
15381,
1138,
1166,
1669,
10016,
1944,
7121,
70131,
54310,
1649,
53,
17,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestClientTimeoutKillsConn_BeforeHeaders(t *testing.T) {
setParallel(t)
defer afterTest(t)
inHandler := make(chan net.Conn, 1)
handlerReadReturned := make(chan bool, 1)
cst := newClientServerTest(t, h1Mode, HandlerFunc(func(w ResponseWriter, r *Request) {
conn, _, err := w.(Hijacker).Hijack()
if err != ni... | explode_data.jsonl/14176 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 487
} | [
2830,
3393,
2959,
7636,
42,
3305,
9701,
1668,
4642,
10574,
1155,
353,
8840,
836,
8,
341,
8196,
16547,
1155,
340,
16867,
1283,
2271,
1155,
340,
17430,
3050,
1669,
1281,
35190,
4179,
50422,
11,
220,
16,
340,
53326,
4418,
84804,
1669,
1281... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvalidRMIDToString(t *testing.T) {
rmidNotAllocatedProperly := replicationGroupMessageID{}
str := rmidNotAllocatedProperly.String()
if str != "" {
t.Error("got unexpected string: " + str)
}
} | explode_data.jsonl/72230 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 74
} | [
2830,
3393,
7928,
23652,
915,
5870,
1155,
353,
8840,
836,
8,
341,
7000,
16106,
2623,
25154,
657,
1336,
712,
398,
1669,
47791,
2808,
2052,
915,
16094,
11355,
1669,
435,
16106,
2623,
25154,
657,
1336,
712,
398,
6431,
741,
743,
607,
961,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestDPAReconciler_populateAWSRegistrySecret(t *testing.T) {
tests := []struct {
name string
bsl *velerov1.BackupStorageLocation
registrySecret *corev1.Secret
awsSecret *corev1.Secret
dpa *oadpv1alpha1.DataProtectionApplication
wantErr bool
}{
{
name: ... | explode_data.jsonl/45549 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1377
} | [
2830,
3393,
35,
8041,
693,
40446,
5769,
17061,
6334,
36136,
15603,
19773,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
93801,
75,
310,
353,
889,
261,
859,
16,
8864,
454,
5793,
4707,
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... | 4 |
func TestRemoveQuad(t *testing.T) {
ctx := context.TODO()
qs, w, _ := makeTestStore(simpleGraph)
err := w.RemoveQuad(quad.Make(
"E",
"follows",
"F",
nil,
))
if err != nil {
t.Error("Couldn't remove quad", err)
}
fixed := iterator.NewFixed()
qsv, err := qs.ValueOf(quad.Raw("E"))
require.NoError(t, ... | explode_data.jsonl/79103 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 320
} | [
2830,
3393,
13021,
43474,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
90988,
741,
18534,
82,
11,
289,
11,
716,
1669,
1281,
2271,
6093,
1141,
6456,
11212,
692,
9859,
1669,
289,
13270,
43474,
7,
31610,
50133,
1006,
197,
197,
77199,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMacd(t *testing.T) {
data := []float64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60}
fast, slow, signal := talib.Macd(dat... | explode_data.jsonl/51212 | {
"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,
19552,
67,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
3056,
3649,
21,
19,
90,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
11,
220,
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 TestCreate(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
th.Mux.HandleFunc("/v2.0/fw/firewalls", func(w http.ResponseWriter, r *http.Request) {
th.TestMethod(t, r, "POST")
th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
th.TestHeader(t, r, "Content-Type", "application/json")
th.TestHeader(t,... | explode_data.jsonl/36153 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 701
} | [
2830,
3393,
4021,
1155,
353,
8840,
836,
8,
341,
70479,
39820,
9230,
741,
16867,
270,
94849,
37496,
9230,
2822,
70479,
1321,
2200,
63623,
4283,
85,
17,
13,
15,
60193,
53010,
86296,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFormatWithdrawPermissions(t *testing.T) {
h.SetDefaults()
expectedResult := exchange.AutoWithdrawCryptoWithSetupText + " & " + exchange.NoFiatWithdrawalsText
withdrawPermissions := h.FormatWithdrawPermissions()
if withdrawPermissions != expectedResult {
t.Errorf("Expected: %s, Received: %s", expectedRe... | explode_data.jsonl/24344 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
4061,
92261,
23851,
1155,
353,
8840,
836,
8,
341,
9598,
4202,
16273,
741,
42400,
2077,
1669,
9289,
6477,
92261,
58288,
2354,
21821,
1178,
488,
330,
609,
330,
488,
9289,
16766,
37,
10358,
92261,
1127,
1178,
271,
46948,
7633,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQuickQueuePoll(t *testing.T) {
q := NewQuickQueue()
q.Add(5)
q.Add("hello")
val1, ok := q.Poll().(int)
assert.True(t, ok)
assert.Equal(t, 5, val1)
val2, ok := q.Poll().(string)
assert.True(t, ok)
assert.Equal(t, "hello", val2)
val3 := q.Poll()
assert.Nil(t, val3)
} | explode_data.jsonl/42915 | {
"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,
24318,
7554,
49207,
1155,
353,
8840,
836,
8,
341,
18534,
1669,
1532,
24318,
7554,
2822,
18534,
1904,
7,
20,
340,
18534,
1904,
445,
14990,
1138,
19302,
16,
11,
5394,
1669,
2804,
1069,
965,
1005,
7,
396,
340,
6948,
32443,
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 TestParseErrPosix(t *testing.T) {
t.Parallel()
p := NewParser(KeepComments(true), Variant(LangPOSIX))
i := 0
for _, c := range shellTests {
want := c.common
if c.posix != nil {
want = c.posix
}
if want == nil {
continue
}
t.Run(fmt.Sprintf("%03d", i), checkError(p, c.in, want.(string)))
i++... | explode_data.jsonl/55122 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 151
} | [
2830,
3393,
14463,
7747,
4859,
941,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3223,
1669,
1532,
6570,
7,
19434,
17373,
3715,
701,
39292,
4957,
524,
17456,
5396,
1171,
8230,
1669,
220,
15,
198,
2023,
8358,
272,
1669,
2088,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestReconcileInfrastructureCluster(t *testing.T) {
g := NewWithT(t)
clusterInfrastructure1 := builder.InfrastructureCluster(metav1.NamespaceDefault, "infrastructure-cluster1").
WithSpecFields(map[string]interface{}{"spec.template.spec.fakeSetting": true}).
Build()
clusterInfrastructure2 := builder.Infrastr... | explode_data.jsonl/11658 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1497
} | [
2830,
3393,
693,
40446,
457,
97838,
28678,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
2354,
51,
1155,
692,
197,
18855,
97838,
16,
1669,
7363,
40435,
28678,
1255,
295,
402,
16,
46011,
3675,
11,
330,
13573,
10314,
93208,
16,
38609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTryDequeueAndAbortCommitQueueVersion(t *testing.T) {
assert.NoError(t, db.ClearCollections(patch.Collection, VersionCollection, task.Collection, build.Collection, commitqueue.Collection))
v := &Version{
Id: "my-version",
Status: evergreen.VersionStarted,
}
p := &patch.Patch{
Version: v.Id,
Git... | explode_data.jsonl/60434 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1063
} | [
2830,
3393,
21453,
1912,
4584,
3036,
85891,
33441,
7554,
5637,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
2927,
13524,
52730,
91940,
28629,
11,
6079,
6482,
11,
3383,
28629,
11,
1936,
28629,
11,
5266,
4584,
28629,
4390,
5195,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBasicPutValid(t *testing.T) {
client := newBasicClient()
result, err := client.PutValid(context.Background(), Basic{
ID: to.Int32Ptr(2),
Name: to.StringPtr("abc"),
Color: CMYKColorsMagenta.ToPtr(),
}, nil)
if err != nil {
t.Fatalf("PutValid: %v", err)
}
if s := result.RawResponse.StatusCode; ... | explode_data.jsonl/15338 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
15944,
19103,
4088,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
15944,
2959,
741,
9559,
11,
1848,
1669,
2943,
39825,
4088,
5378,
19047,
1507,
14625,
515,
197,
29580,
25,
262,
311,
7371,
18,
17,
5348,
7,
17,
1326,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestAssessMetricStatusNoMeasurements(t *testing.T) {
// no measurements yet taken
metric := v1alpha1.Metric{
Name: "success-rate",
}
result := v1alpha1.MetricResult{
Measurements: nil,
}
assert.Equal(t, v1alpha1.AnalysisPhasePending, assessMetricStatus(metric, result, false))
assert.Equal(t, v1alpha1.An... | explode_data.jsonl/75816 | {
"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,
5615,
433,
54310,
2522,
2753,
32236,
1368,
1155,
353,
8840,
836,
8,
341,
197,
322,
902,
21595,
3602,
4429,
198,
2109,
16340,
1669,
348,
16,
7141,
16,
1321,
16340,
515,
197,
21297,
25,
330,
5630,
43026,
756,
197,
532,
9559,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNamespaceUpdate(t *testing.T) {
c, _ := newTestClient(t)
namespaceAddAndUpdateTest(t, c, func(obj interface{}) {
// first argument (old namespace) is not used right now
c.handleNamespaceUpdate(&api_v1.Namespace{}, obj)
})
} | explode_data.jsonl/56846 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 86
} | [
2830,
3393,
22699,
4289,
1155,
353,
8840,
836,
8,
341,
1444,
11,
716,
1669,
501,
2271,
2959,
1155,
340,
56623,
2212,
56365,
2271,
1155,
11,
272,
11,
2915,
6779,
3749,
28875,
341,
197,
197,
322,
1156,
5693,
320,
813,
4473,
8,
374,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBlkioStatsNoFilesBFQDebug(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode.")
}
testCases := []blkioStatFailureTestCase{
{
desc: "missing blkio.bfq.io_service_bytes_recursive file",
filename: "blkio.bfq.io_service_bytes_recursive",
},
{
desc: "missing blkio.b... | explode_data.jsonl/45839 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 755
} | [
2830,
3393,
4923,
74,
815,
16635,
2753,
10809,
19883,
88191,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
304,
2805,
3856,
13053,
197,
532,
18185,
37302,
1669,
3056,
34989,
815,
1587... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInsertAbsent(t *testing.T) {
m := NewSharedMap()
elephant := Animal{"elephant"}
monkey := Animal{"monkey"}
m.LoadOrStore("elephant", elephant)
if ok := m.LoadOrStore("elephant", monkey); ok {
t.Error("map set a new value even the entry is already present")
}
} | explode_data.jsonl/77831 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
13780,
80251,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
16997,
2227,
741,
7727,
273,
26924,
1669,
21292,
4913,
10068,
26924,
16707,
197,
96016,
1669,
21292,
4913,
96016,
63159,
2109,
13969,
2195,
6093,
445,
10068,
26924,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestYouonInvalid(t *testing.T) {
const want = "yōon cannot be the first character in a kana block"
input := []string{
"ゃき", "ゅき", "ょき", "ぁき", "ぃき", "ぅき", "ぇき", "ぉき", "ゎき",
"ャキ", "ュキ", "ョキ", "ァキ", "ィキ", "ゥキ", "ェキ", "ォキ", "ヮキ",
}
for _, v := range input {
got, err := KanaToRomaji(v)
assert.Empty(t, got... | explode_data.jsonl/11310 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 189
} | [
2830,
3393,
2610,
263,
7928,
1155,
353,
8840,
836,
8,
341,
4777,
1366,
284,
330,
88,
55661,
263,
4157,
387,
279,
1156,
3668,
304,
264,
595,
3362,
2504,
1837,
22427,
1669,
3056,
917,
515,
197,
197,
1,
124234,
49734,
497,
330,
138218,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGitGetter_tag(t *testing.T) {
if !testHasGit {
t.Log("git not found, skipping")
t.Skip()
}
g := new(GitGetter)
dst := tempDir(t)
repo := testGitRepo(t, "tag")
repo.commitFile("tag.txt", "tag")
repo.git("tag", "v1.0")
q := repo.url.Query()
q.Add("ref", "v1.0")
repo.url.RawQuery = q.Encode()
i... | explode_data.jsonl/39696 | {
"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,
46562,
31485,
9372,
1155,
353,
8840,
836,
8,
341,
743,
753,
1944,
10281,
46562,
341,
197,
3244,
5247,
445,
12882,
537,
1730,
11,
42659,
1138,
197,
3244,
57776,
741,
197,
630,
3174,
1669,
501,
6699,
275,
31485,
340,
52051,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.