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 TestCopyApplicationSource(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config)
RegisterFailHandler(Fail)
RunSpecs(t, "CopyApplicationSource Suite")
} | explode_data.jsonl/7154 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 66
} | [
2830,
3393,
12106,
4988,
3608,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
6546,
7121,
4624,
2354,
16273,
741,
8230,
16,
23,
77,
836,
284,
600,
16,
23,
77,
26849,
8754,
692,
79096,
19524,
3050,
7832,
604,
340,
85952,
8327,
82,
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 |
func TestChaincodeInvokeChaincode(t *testing.T) {
chainID := util.GetTestChainID()
lis, err := initPeer(chainID)
if err != nil {
t.Fail()
t.Logf("Error creating peer: %s", err)
}
defer finitPeer(lis, chainID)
err = chaincodeInvokeChaincode(t, chainID, "")
if err != nil {
t.Fail()
t.Logf("Failed chainc... | explode_data.jsonl/52836 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
18837,
1851,
17604,
18837,
1851,
1155,
353,
8840,
836,
8,
341,
197,
8819,
915,
1669,
4094,
2234,
2271,
18837,
915,
2822,
8810,
285,
11,
1848,
1669,
2930,
30888,
62591,
915,
340,
743,
1848,
961,
2092,
341,
197,
3244,
57243,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTicker_S3(t *testing.T) {
product := "btc_" + common.NativeToken
timeMap := GetTimes()
kline15s := []interface{}{}
kline1s := []interface{}{}
matches := prepareMatches(product, []float64{100.0}, []float64{2.0}, timeMap["now"])
fakeLatestTickers := &map[string]*types.Ticker{}
err := simpleCaseRunner(t, ... | explode_data.jsonl/37809 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 206
} | [
2830,
3393,
87278,
1098,
18,
1155,
353,
8840,
836,
8,
1476,
69288,
1669,
330,
92634,
18771,
488,
4185,
68624,
3323,
198,
21957,
2227,
1669,
2126,
18889,
741,
16463,
1056,
16,
20,
82,
1669,
3056,
4970,
6257,
16094,
16463,
1056,
16,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestImageManifest(t *testing.T) {
payload := []byte(``)
url := fmt.Sprintf("/images/%d/manifest", imageID)
req, _ := http.NewRequest("GET", url, bytes.NewBuffer(payload))
response := executeRequest(req)
checkResponseCode(t, http.StatusOK, response.Code)
m := objects.Seed{}
json.Unmarshal(response.Body.Byt... | explode_data.jsonl/19328 | {
"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,
1906,
38495,
1155,
353,
8840,
836,
8,
341,
76272,
1669,
3056,
3782,
5809,
24183,
19320,
1669,
8879,
17305,
4283,
3642,
12627,
67,
14,
42315,
497,
2168,
915,
340,
24395,
11,
716,
1669,
1758,
75274,
445,
3806,
497,
2515,
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 TestRunner__Processor_Timer_Expired(t *testing.T) {
t.Parallel()
repo := &RepositoryMock{}
r := New(repo, WithRetryDuration(20*time.Millisecond))
ctx := context.Background()
ctx, cancel := context.WithCancel(ctx)
repo.GetLastEventsFunc = func(ctx context.Context, limit uint64) ([]Event, error) {
return ... | explode_data.jsonl/21367 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
19486,
563,
22946,
64026,
62,
54349,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
17200,
5368,
1669,
609,
4624,
11571,
16094,
7000,
1669,
1532,
50608,
11,
3085,
51560,
12945,
7,
17,
15,
77053,
71482,
4390,
20985,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPodSpec(t *testing.T) {
volSize := resource.NewQuantity(100000.0, resource.BinarySI)
c := New(&clusterd.Context{Clientset: testop.New(1)}, "ns", "rook/rook:myversion", "", "", *volSize, rookalpha.Annotations{}, rookalpha.Placement{},
edgefsv1beta1.NetworkSpec{}, edgefsv1beta1.DashboardSpec{}, v1.ResourceRe... | explode_data.jsonl/4576 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 823
} | [
2830,
3393,
23527,
8327,
1155,
353,
8840,
836,
8,
341,
5195,
337,
1695,
1669,
5101,
7121,
17342,
7,
16,
15,
15,
15,
15,
15,
13,
15,
11,
5101,
49983,
13817,
340,
1444,
1669,
1532,
2099,
18855,
67,
9328,
90,
2959,
746,
25,
1273,
453... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEntry_Notify(t *testing.T) {
entry := widget.NewEntry()
changed := false
entry.OnChanged = func(string) {
changed = true
}
entry.SetText("Test")
assert.True(t, changed)
} | explode_data.jsonl/12330 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 70
} | [
2830,
3393,
5874,
1604,
37253,
1155,
353,
8840,
836,
8,
341,
48344,
1669,
9086,
7121,
5874,
741,
197,
17353,
1669,
895,
271,
48344,
8071,
5389,
284,
2915,
3609,
8,
341,
197,
197,
17353,
284,
830,
198,
197,
532,
48344,
92259,
445,
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 |
func TestControllerDeleteEventWithGoodController(t *testing.T) {
c, tc := makeController("apps/v1", "ReplicaSet")
c.Delete(simpleOwnedPod("unit", "test"))
validateSent(t, tc, sourcesv1beta1.ApiServerSourceDeleteRefEventType)
} | explode_data.jsonl/39271 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
2051,
6435,
1556,
2354,
15216,
2051,
1155,
353,
8840,
836,
8,
341,
1444,
11,
17130,
1669,
1281,
2051,
445,
27635,
5457,
16,
497,
330,
18327,
15317,
1649,
1138,
1444,
18872,
1141,
6456,
57641,
23527,
445,
3843,
497,
330,
1944... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAcceptGoodConfig(t *testing.T) {
mcm := &mockconfigtx.Manager{}
cf := NewFilter(mcm)
configGroup := cb.NewConfigGroup()
configGroup.Values["Foo"] = &cb.ConfigValue{}
configUpdateEnv := &cb.ConfigUpdateEnvelope{
ConfigUpdate: utils.MarshalOrPanic(configGroup),
}
configEnv := &cb.ConfigEnvelope{
LastU... | explode_data.jsonl/18641 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 529
} | [
2830,
3393,
16646,
15216,
2648,
1155,
353,
8840,
836,
8,
341,
2109,
6226,
1669,
609,
16712,
1676,
3998,
58298,
16094,
96989,
1669,
1532,
5632,
1255,
6226,
340,
25873,
2808,
1669,
9858,
7121,
2648,
2808,
741,
25873,
2808,
35145,
1183,
4092... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCacheBinary(t *testing.T) {
oldMinikubeHome := os.Getenv("MINIKUBE_HOME")
defer os.Setenv("MINIKUBE_HOME", oldMinikubeHome)
minikubeHome, err := ioutil.TempDir("/tmp", "")
if err != nil {
t.Fatalf("error during creating tmp dir: %v", err)
}
defer os.RemoveAll(minikubeHome)
noWritePermDir, err := iout... | explode_data.jsonl/64224 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1260
} | [
2830,
3393,
8233,
21338,
1155,
353,
8840,
836,
8,
341,
61828,
6217,
1579,
3760,
7623,
1669,
2643,
64883,
445,
16413,
28561,
42389,
28466,
1138,
16867,
2643,
4202,
3160,
445,
16413,
28561,
42389,
28466,
497,
2310,
6217,
1579,
3760,
7623,
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... | 5 |
func TestParseTopCodeBlock(t *testing.T) {
const markup = `
<table cellpadding="0" cellspacing="0"><tbody><tr>
<td colspan="1" rowspan="1">
<p><span class="code">start func() {<br>}</span><span class="code"></span></p>
<p><span class="code"></span></p>
<p><span class="code">func2() {<br>}</span><span class="co... | explode_data.jsonl/41568 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 593
} | [
2830,
3393,
14463,
5366,
2078,
4713,
1155,
353,
8840,
836,
8,
341,
4777,
40751,
284,
22074,
197,
20993,
29104,
428,
15,
1,
27081,
428,
15,
3088,
10095,
1784,
376,
397,
197,
6868,
16848,
428,
16,
1,
51288,
428,
16,
881,
197,
197,
792... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProvider_FetchUserPerms(t *testing.T) {
t.Run("nil account", func(t *testing.T) {
p := NewProvider("", mustURL(t, "https://github.com"), "admin_token", nil, 3*time.Hour, nil)
_, err := p.FetchUserPerms(context.Background(), nil)
want := "no account provided"
got := fmt.Sprintf("%v", err)
if got != w... | explode_data.jsonl/7241 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1311
} | [
2830,
3393,
5179,
1400,
2995,
1474,
3889,
1011,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
8385,
2692,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3223,
1669,
1532,
5179,
19814,
1969,
3144,
1155,
11,
330,
2428,
1110,
5204,
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... | 2 |
func TestSplitTrim(t *testing.T) {
for i, test := range []struct {
input string
output []string
sep string
}{
{"os,arch,cpu,caddy_version", []string{"os", "arch", "cpu", "caddy_version"}, ","},
{"os,arch,cpu,caddy_version,", []string{"os", "arch", "cpu", "caddy_version"}, ","},
{"os,,, arch, cpu, cadd... | explode_data.jsonl/16478 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 395
} | [
2830,
3393,
20193,
25656,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1273,
1669,
2088,
3056,
1235,
341,
197,
22427,
220,
914,
198,
197,
21170,
3056,
917,
198,
197,
197,
28036,
262,
914,
198,
197,
59403,
197,
197,
4913,
436,
11,
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... | 5 |
func TestAllPathsSourceTarget(t *testing.T) {
tests := []struct {
name string
graph [][]int
want [][]int
}{
{
"test 1",
[][]int{{4, 3, 1}, {3, 2, 4}, {3}, {4}, {}},
[][]int{{0, 4}, {0, 3, 4}, {0, 1, 3, 4}, {0, 1, 2, 3, 4}, {0, 1, 4}},
},
{
"test 2",
[][]int{{1}, {}},
[][]int{{0, 1}},
... | explode_data.jsonl/57948 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 436
} | [
2830,
3393,
2403,
26901,
3608,
6397,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
66616,
52931,
396,
198,
197,
50780,
220,
52931,
396,
198,
197,
59403,
197,
197,
515,
298,
197,
1,
1944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_UnsafeSetIsSuperset(t *testing.T) {
a := NewThreadUnsafeSet()
a.Add(9)
a.Add(5)
a.Add(2)
a.Add(1)
a.Add(11)
b := NewThreadUnsafeSet()
b.Add(5)
b.Add(2)
b.Add(11)
if !a.IsSuperset(b) {
t.Error("set a should be a superset of set b")
}
b.Add(42)
if a.IsSuperset(b) {
t.Error("set a should no... | explode_data.jsonl/188 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
40687,
18675,
1649,
3872,
10048,
44146,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
1532,
6855,
78770,
1649,
741,
11323,
1904,
7,
24,
340,
11323,
1904,
7,
20,
340,
11323,
1904,
7,
17,
340,
11323,
1904,
7,
16,
340,
11323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServer_Issue1746(t *testing.T) {
log.SetOutput(ioutil.Discard)
targetdir, err := ioutil.TempDir(".", "swagger_server")
if err != nil {
t.Fatalf("failed to create a test target directory: %v", err)
}
err = os.Chdir(targetdir)
if err != nil {
t.Fatalf("failed to create a test target directory: %v", err... | explode_data.jsonl/3793 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 389
} | [
2830,
3393,
5475,
7959,
83890,
16,
22,
19,
21,
1155,
353,
8840,
836,
8,
341,
6725,
4202,
5097,
1956,
30158,
909,
47560,
340,
28861,
3741,
11,
1848,
1669,
43144,
65009,
6184,
64217,
330,
74755,
12015,
1138,
743,
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,
1... | 3 |
func TestParseCommandLine1(t *testing.T) {
t.Run("simple", func(t *testing.T) {
g := NewWithT(t)
g.Expect(utils.ParseCommandLine("a b c")).To(Equal([]string{"a", "b", "c"}))
})
t.Run("spaces", func(t *testing.T) {
g := NewWithT(t)
g.Expect(utils.ParseCommandLine("a\\ b c")).To(Equal([]string{"a b", "c"}))
... | explode_data.jsonl/59869 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 302
} | [
2830,
3393,
14463,
71885,
16,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
22944,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3174,
1669,
1532,
2354,
51,
1155,
340,
197,
3174,
81893,
64166,
8937,
71885,
445,
64,
293,
272,
15197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconstructQuery(t *testing.T) {
type io struct {
Input transaction
Full bool
Output string
}
tests := []io{
{
Input: transaction{
resource: "test.col",
method: "find",
event: map[string]interface{}{
"numberToSkip": 3,
"numberToReturn": 2,
},
params: map[strin... | explode_data.jsonl/35543 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 471
} | [
2830,
3393,
693,
7596,
2859,
1155,
353,
8840,
836,
8,
341,
13158,
6399,
2036,
341,
197,
66588,
220,
7745,
198,
197,
197,
9432,
256,
1807,
198,
197,
80487,
914,
198,
197,
532,
78216,
1669,
3056,
815,
515,
197,
197,
515,
298,
66588,
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 TestContextExec(t *testing.T) {
t.Parallel()
ctx, _ := v8go.NewContext(nil)
_, _ = ctx.RunScript(`const add = (a, b) => a + b`, "add.js")
val, _ := ctx.RunScript(`add(3, 4)`, "main.js")
rtn := val.String()
if rtn != "7" {
t.Errorf("script returned an unexpected value: expected %q, got %q", "7", rtn)
}
_... | explode_data.jsonl/73930 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 264
} | [
2830,
3393,
1972,
10216,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
11,
716,
1669,
348,
23,
3346,
7121,
1972,
27907,
340,
197,
6878,
716,
284,
5635,
16708,
5910,
5809,
1024,
912,
284,
320,
64,
11,
293,
8,
589,
264,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestRootParseExecutableFail(t *testing.T) {
for _, src := range []string{
"{ title }",
"\xef\xbb\xbf{ title }",
"{artists{name, ...sung}} fragment sung on Artist {songs}",
"query Qq ( $a : Int! = 3 ) { title }",
`query Qq ($a: String = "x") { artist (name: $id ) }`,
`{ arty: artists (name: "x") { name... | explode_data.jsonl/48191 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 183
} | [
2830,
3393,
8439,
14463,
94772,
19524,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
2286,
1669,
2088,
3056,
917,
515,
197,
197,
14129,
2265,
335,
756,
197,
197,
11934,
47510,
3462,
6066,
3462,
13233,
90,
2265,
335,
756,
197,
197,
14129,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDispatchCheck_Failure(t *testing.T) {
h := &mockHandler{err: errors.New("you shall not pass")}
_, err := executeDispatchCheck(t, h)
if err == nil {
t.Fatal("expected error not found")
}
} | explode_data.jsonl/64994 | {
"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,
11283,
3973,
1400,
9373,
1155,
353,
8840,
836,
8,
341,
9598,
1669,
609,
16712,
3050,
90,
615,
25,
5975,
7121,
445,
9330,
4880,
537,
1494,
899,
630,
197,
6878,
1848,
1669,
9026,
11283,
3973,
1155,
11,
305,
340,
743,
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
] | 2 |
func TestCollectorIncr(t *testing.T) {
_ = redisMetric.Incr("1", "300")
_ = redisNoLabelsMetric.Incr()
_ = Get("/metrics", nil)
} | explode_data.jsonl/52687 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 60
} | [
2830,
3393,
53694,
641,
5082,
1155,
353,
8840,
836,
8,
341,
197,
62,
284,
20870,
54310,
5337,
5082,
445,
16,
497,
330,
18,
15,
15,
1138,
197,
62,
284,
20870,
2753,
23674,
54310,
5337,
5082,
741,
197,
62,
284,
2126,
4283,
43262,
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 |
func TestTimeout(t *testing.T) {
ctx := context.Background()
lastID.Set(0)
count.Set(0)
p := NewResourcePool(PoolFactory, 1, 1, time.Second)
defer p.Close()
r, err := p.Get(ctx)
if err != nil {
t.Fatal(err)
}
newctx, cancel := context.WithTimeout(ctx, 1*time.Millisecond)
_, err = p.Get(newctx)
cancel()
wa... | explode_data.jsonl/664 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
7636,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
33096,
915,
4202,
7,
15,
340,
18032,
4202,
7,
15,
340,
3223,
1669,
1532,
4783,
10551,
5304,
1749,
4153,
11,
220,
16,
11,
220,
16,
11,
882,
32435,
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... | 4 |
func TestReExportDefaultNoBundle(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
export {default as foo} from './foo'
export {default as bar} from './bar'
`,
},
entryPaths: []string{"/entry.js"},
options: config.Options{
AbsOutputFile: "/out.js"... | explode_data.jsonl/38552 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
693,
16894,
3675,
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,
59440,
314,
2258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImageAnnotatorSmoke(t *testing.T) {
if testing.Short() {
t.Skip("skipping smoke test in short mode")
}
ctx := context.Background()
ts := testutil.TokenSource(ctx, DefaultAuthScopes()...)
if ts == nil {
t.Skip("Integration tests skipped. See CONTRIBUTING.md for details")
}
projectId := testutil.Proj... | explode_data.jsonl/69076 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 422
} | [
2830,
3393,
1906,
2082,
1921,
850,
76880,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
16205,
1273,
304,
2805,
3856,
1138,
197,
532,
20985,
1669,
2266,
19047,
741,
57441,
1669,
1273,
1314,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInferFields(t *testing.T) {
type Thing struct {
Foo int `json:"foo"`
Bar bool
Poo time.Duration `json:"what,"`
Yes string
Buz time.Time
Float float64
}
fields := InferFields(reflect.TypeOf(&Thing{}))
assert.DeepEqual(t, fields, map[string]Type{
"foo": NumberType,
"Bar": BoolTy... | explode_data.jsonl/9196 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
641,
802,
8941,
1155,
353,
8840,
836,
8,
341,
13158,
37200,
2036,
341,
197,
12727,
2624,
256,
526,
1565,
2236,
2974,
7975,
8805,
197,
197,
3428,
256,
1807,
198,
197,
10025,
2624,
256,
882,
33795,
1565,
2236,
2974,
12555,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateLedgerFactory(t *testing.T) {
cleanup := configtest.SetDevFabricConfigPath(t)
defer cleanup()
testCases := []struct {
name string
ledgerType string
ledgerDir string
ledgerDirPrefix string
expectPanic bool
}{
{"RAM", "ram", "", "", false},
{"FilewithPathSet", "f... | explode_data.jsonl/23315 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 500
} | [
2830,
3393,
4021,
60850,
1389,
4153,
1155,
353,
8840,
836,
8,
341,
1444,
60639,
1669,
2193,
1944,
4202,
14592,
81731,
2648,
1820,
1155,
340,
16867,
21290,
741,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
197,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestFindAndAddNewPods_WithRescontructedVolume(t *testing.T) {
// create dswp
dswp, fakePodManager := prepareDswpWithVolume(t)
// create pod
fakeOuterVolumeName := "dswp-test-volume-name"
containers := []v1.Container{
{
VolumeMounts: []v1.VolumeMount{
{
Name: fakeOuterVolumeName,
Mount... | explode_data.jsonl/45744 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 746
} | [
2830,
3393,
9885,
3036,
2212,
3564,
23527,
82,
62,
2354,
1061,
8222,
667,
291,
18902,
1155,
353,
8840,
836,
8,
341,
197,
322,
1855,
294,
2280,
79,
198,
2698,
2280,
79,
11,
12418,
23527,
2043,
1669,
10549,
35,
2280,
79,
2354,
18902,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRob(t *testing.T) {
tests := [...]caseType{
{
input: []int{1, 2, 3, 1},
expected: 4,
},
{
input: []int{2, 7, 9, 3, 1},
expected: 12,
},
}
for _, tc := range tests {
output := rob(tc.input)
if output != tc.expected {
t.Fatalf("input: %v, output: %v, expected: %v", tc.input, o... | explode_data.jsonl/29680 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
14465,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
48179,
5638,
929,
515,
197,
197,
515,
298,
22427,
25,
262,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
16,
1583,
298,
42400,
25,
220,
19,
345,
197,
197,
158... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestAccessRequest(t *testing.T) {
ar := NewAccessRequest(nil)
ar.GrantTypes = Arguments{"foobar"}
ar.Client = &DefaultClient{}
ar.GrantScope("foo")
ar.SetRequestedAudience(Arguments{"foo", "foo", "bar"})
ar.SetRequestedScopes(Arguments{"foo", "foo", "bar"})
assert.True(t, ar.GetGrantedScopes().Has("foo"))
... | explode_data.jsonl/4227 | {
"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,
6054,
1900,
1155,
353,
8840,
836,
8,
341,
69340,
1669,
1532,
6054,
1900,
27907,
340,
69340,
1224,
34434,
4173,
284,
27702,
4913,
50267,
16707,
69340,
11716,
284,
609,
3675,
2959,
16094,
69340,
1224,
34434,
10803,
445,
7975,
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 TestReconcilePropagateLabelsPending(t *testing.T) {
names.TestingSeed()
ps := []*v1beta1.Pipeline{simpleHelloWorldPipeline}
prs := []*v1beta1.PipelineRun{{
ObjectMeta: metav1.ObjectMeta{
Name: "test-pipeline-run-with-labels",
Namespace: "foo",
Labels: map[string]string{
"PipelineRunLabel": ... | explode_data.jsonl/27300 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 602
} | [
2830,
3393,
693,
40446,
457,
2008,
46836,
23674,
32027,
1155,
353,
8840,
836,
8,
341,
93940,
8787,
287,
41471,
2822,
35009,
1669,
29838,
85,
16,
19127,
16,
1069,
8790,
90,
22944,
9707,
10134,
34656,
532,
25653,
82,
1669,
29838,
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... | 3 |
func TestUserEntityGetUniqueNOTEXIST(t *testing.T) {
resp := sendGet("http://localhost:8080/Search/User&q=NOTEXIST")
response := responseToString(resp)
compareResults(t, response, HyperText.CustomResponses["not-found-entity"])
} | explode_data.jsonl/59346 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
1474,
3030,
1949,
22811,
14065,
92827,
1155,
353,
8840,
836,
8,
341,
34653,
1669,
3624,
1949,
445,
1254,
1110,
8301,
25,
23,
15,
23,
15,
78893,
33511,
62735,
28,
14065,
92827,
1138,
21735,
1669,
2033,
5870,
20267,
340,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestDataPosString(t *testing.T) {
for _, tt := range []struct {
val DataPos
want string
}{
{
val: pktData,
want: "pkt_data",
},
{
val: base64Data,
want: "base64_data",
},
{
val: httpRequestLine,
want: "http_request_line",
},
} {
s := tt.val.String()
if s != tt.want {
... | explode_data.jsonl/59695 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 198
} | [
2830,
93200,
4859,
703,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
19302,
220,
2885,
4859,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
515,
298,
19302,
25,
220,
34654,
1043,
345,
298,
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... | 3 |
func TestServerReduceMemoryUsageSerial(t *testing.T) {
ln := fasthttputil.NewInmemoryListener()
s := &Server{
Handler: func(ctx *RequestCtx) {},
ReduceMemoryUsage: true,
}
ch := make(chan struct{})
go func() {
if err := s.Serve(ln); err != nil {
t.Fatalf("unexpected error: %s", err)
}
clos... | explode_data.jsonl/73280 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 234
} | [
2830,
3393,
5475,
50325,
10642,
14783,
5915,
1155,
353,
8840,
836,
8,
341,
197,
2261,
1669,
4937,
96336,
628,
321,
7121,
641,
17269,
2743,
2822,
1903,
1669,
609,
5475,
515,
197,
197,
3050,
25,
1843,
2915,
7502,
353,
1900,
23684,
8,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestServiceInGroup(t *testing.T) {
registry := newMockRegistry()
assert.True(t, ServiceInGroup(registry, "testGroup", "testService"))
assert.False(t, ServiceInGroup(registry, "testGroup", "testNoneExistService"))
discoverErrorRegistry := newDiscoverErrorRegistry()
assert.False(t, ServiceInGroup(discoverErrorR... | explode_data.jsonl/67631 | {
"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,
1860,
641,
2808,
1155,
353,
8840,
836,
8,
341,
197,
29172,
1669,
501,
11571,
15603,
741,
6948,
32443,
1155,
11,
5362,
641,
2808,
18390,
4944,
11,
330,
1944,
2808,
497,
330,
1944,
1860,
5455,
6948,
50757,
1155,
11,
5362,
64... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCustomParserBasicType(t *testing.T) {
type ConstT int32
type config struct {
Const ConstT `env:"CONST_VAL"`
}
exp := ConstT(123)
os.Setenv("CONST_VAL", fmt.Sprintf("%d", exp))
customParserFunc := func(v string) (interface{}, error) {
i, err := strconv.Atoi(v)
if err != nil {
return nil, err
... | explode_data.jsonl/7499 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 236
} | [
2830,
3393,
10268,
6570,
15944,
929,
1155,
353,
8840,
836,
8,
341,
13158,
24522,
51,
526,
18,
17,
271,
13158,
2193,
2036,
341,
197,
197,
19167,
24522,
51,
1565,
3160,
2974,
41795,
6096,
8805,
197,
630,
48558,
1669,
24522,
51,
7,
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 TestPluginScalarSerialize(t *testing.T) {
grpcClientMock, teardown := setupPluginDriverTests(t)
defer teardown(t)
plug := plugin.NewPlugin(plugin.Config{
Cmd: "fake-plugin-command",
})
defer plug.Close()
data := []struct {
in driver.ScalarSerializeInput
out driver.ScalarSerializeOutput
outErr ... | explode_data.jsonl/37055 | {
"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,
11546,
20639,
15680,
1155,
353,
8840,
836,
8,
341,
197,
56585,
2959,
11571,
11,
49304,
1669,
6505,
11546,
11349,
18200,
1155,
340,
16867,
49304,
1155,
340,
197,
47474,
1669,
9006,
7121,
11546,
46801,
10753,
515,
197,
6258,
227... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestKafkaClient_decodeGroupMetadata_Errors(t *testing.T) {
module := fixtureModule()
module.Configure("test", "consumer.test")
for _, values := range decodeGroupMetadataErrors {
// Should not timeout
module.decodeGroupMetadata(bytes.NewBuffer(values.KeyBytes), values.ValueBytes, zap.NewNop())
}
} | explode_data.jsonl/34276 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
42,
21883,
2959,
15227,
2808,
14610,
93623,
1087,
1155,
353,
8840,
836,
8,
341,
54020,
1669,
12507,
3332,
741,
54020,
78281,
445,
1944,
497,
330,
46764,
5958,
5130,
2023,
8358,
2750,
1669,
2088,
16895,
2808,
14610,
13877,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLex(t *testing.T) {
files, err := filepath.Glob("tests/lex/*.in")
if err != nil {
t.Errorf("unable to find test files: %s", err)
return
}
for _, fname := range files {
runLexTest(t, "tests/lex/", fname, strings.Replace(fname, "in", "out", -1))
}
} | explode_data.jsonl/25849 | {
"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,
47778,
1155,
353,
8840,
836,
8,
341,
74075,
11,
1848,
1669,
26054,
1224,
1684,
445,
23841,
14,
2571,
23540,
258,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
45928,
311,
1477,
1273,
3542,
25,
1018,
82,
497,
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 TestApplyArgs(t *testing.T) {
cmd := []string{"echo", "something", "$3", "else", "$1", "$3"}
args := []string{"a1", "a2"}
eres := []string{"echo", "something", "$3", "else", "a1", "$3"}
res, total := ApplyArguments(cmd, args)
assert.Equal(t, eres, res)
assert.Equal(t, total, 1)
args = []string{"a1", "a2", ... | explode_data.jsonl/80380 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 206
} | [
2830,
3393,
28497,
4117,
1155,
353,
8840,
836,
8,
341,
25920,
1669,
3056,
917,
4913,
3047,
497,
330,
33331,
497,
5201,
18,
497,
330,
1503,
497,
5201,
16,
497,
5201,
18,
16707,
31215,
1669,
3056,
917,
4913,
64,
16,
497,
330,
64,
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 TestRegisterTestStepDoesNotValidate(t *testing.T) {
pr := NewPluginRegistry()
err := pr.RegisterTestStep("AStep", NewAStep, []event.Name{event.Name("Event which does not validate")})
require.Error(t, err)
} | explode_data.jsonl/80904 | {
"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,
8690,
2271,
8304,
21468,
2623,
17926,
1155,
353,
8840,
836,
8,
341,
25653,
1669,
1532,
11546,
15603,
741,
9859,
1669,
548,
19983,
2271,
8304,
445,
32,
8304,
497,
1532,
32,
8304,
11,
3056,
3087,
2967,
90,
3087,
2967,
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 |
func TestUpper(t *testing.T) {
cases := []struct {
s interface{}
want string
isErr bool
}{
{"test", "TEST", false},
{template.HTML("UpPeR"), "UPPER", false},
{[]byte("bytes"), "BYTES", false},
}
for i, c := range cases {
res, err := upper(c.s)
if (err != nil) != c.isErr {
t.Fatalf("[%d] une... | explode_data.jsonl/9237 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 234
} | [
2830,
3393,
14251,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
1903,
257,
3749,
16094,
197,
50780,
220,
914,
198,
197,
19907,
7747,
1807,
198,
197,
59403,
197,
197,
4913,
1944,
497,
330,
10033,
497,
895,
1583... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestFeeBumpUpgradesV0Transaction(t *testing.T) {
kp0 := newKeypair0()
sourceAccount := NewSimpleAccount(kp0.Address(), 1)
tx, err := NewTransaction(
TransactionParams{
SourceAccount: &sourceAccount,
IncrementSequenceNum: false,
Operations: []Operation{&Inflation{}},
BaseFee: ... | explode_data.jsonl/67674 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 759
} | [
2830,
3393,
41941,
33,
1510,
2324,
22340,
53,
15,
8070,
1155,
353,
8840,
836,
8,
341,
16463,
79,
15,
1669,
501,
6608,
1082,
1310,
15,
741,
47418,
7365,
1669,
1532,
16374,
7365,
5969,
79,
15,
26979,
1507,
220,
16,
692,
46237,
11,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_observability_PreStart(t *testing.T) {
type args struct {
ctx context.Context
}
type fields struct {
eg errgroup.Group
collector collector.Collector
tracer trace.Tracer
exporters []exporter.Exporter
profilers []profiler.Profiler
}
type want struct {
err error
}
type test struct ... | explode_data.jsonl/32268 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1132
} | [
2830,
3393,
62,
22764,
2897,
79561,
3479,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
20985,
2266,
9328,
198,
197,
532,
13158,
5043,
2036,
341,
197,
197,
791,
286,
1848,
4074,
5407,
198,
197,
1444,
24605,
269,
31953,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoSuchFileP8File(t *testing.T) {
token, err := token.AuthKeyFromFile("")
assert.Equal(t, errors.New("open : no such file or directory").Error(), err.Error())
assert.Nil(t, token)
} | explode_data.jsonl/74818 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 70
} | [
2830,
3393,
65531,
1703,
47,
23,
1703,
1155,
353,
8840,
836,
8,
341,
43947,
11,
1848,
1669,
3950,
25233,
1592,
43633,
31764,
6948,
12808,
1155,
11,
5975,
7121,
445,
2508,
549,
902,
1741,
1034,
476,
6220,
1827,
1454,
1507,
1848,
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 |
func TestVMDetailsToSurvey(t *testing.T) {
vms := []vmDetails{
vmDetails{Zone: "us-central-1", Name: "app-central-as72"},
vmDetails{Zone: "us-west-1", Name: "db-west-09as"},
vmDetails{Zone: "eu-west-1", Name: "something-central-a7m2"},
}
response := vmDetailsToSurvey(vms)
expected := []string{
"(us-centra... | explode_data.jsonl/13299 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
53,
6076,
2237,
1249,
68015,
1155,
353,
8840,
836,
8,
341,
5195,
1011,
1669,
3056,
7338,
7799,
515,
197,
54879,
7799,
90,
15363,
25,
330,
355,
84081,
12,
16,
497,
3988,
25,
330,
676,
84081,
32434,
22,
17,
7115,
197,
5487... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerHasGVK(t *testing.T) {
okClient := fakeDiscoveryClient{
results: map[string]metav1.APIResourceList{
"vegetables.k8s.io/v1": {APIResources: []metav1.APIResource{
{Kind: "Potato"},
{Kind: "Carrot"},
{Kind: "Lettuce"},
}},
"fruits.k8s.io/v1": {APIResources: []metav1.APIResource{
... | explode_data.jsonl/52104 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 928
} | [
2830,
3393,
5475,
10281,
39718,
42,
1155,
353,
8840,
836,
8,
341,
59268,
2959,
1669,
12418,
67400,
2959,
515,
197,
55497,
25,
2415,
14032,
60,
4059,
402,
16,
24922,
4783,
852,
515,
298,
197,
1,
82471,
4788,
5202,
23,
82,
4245,
5457,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRedisMetricsOnly(t *testing.T) {
for _, inc := range []bool{false, true} {
r := prometheus.NewRegistry()
ts := httptest.NewServer(promhttp.HandlerFor(r, promhttp.HandlerOpts{}))
_, err := NewRedisExporter(os.Getenv("TEST_REDIS_URI"), Options{Namespace: "test", Registry: r, RedisMetricsOnly: inc})
if e... | explode_data.jsonl/47008 | {
"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,
48137,
27328,
7308,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
3625,
1669,
2088,
3056,
2641,
90,
3849,
11,
830,
92,
341,
197,
7000,
1669,
2706,
39705,
7121,
15603,
741,
197,
57441,
1669,
54320,
70334,
7121,
5475,
83332,
1254,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPodLabelsAnnotations(t *testing.T) {
annotations := map[string]string{
"testannotation": "testvalue",
}
labels := map[string]string{
"testlabel": "testvalue",
}
sset, err := makeStatefulSet(&monitoringv1.Alertmanager{
ObjectMeta: metav1.ObjectMeta{},
Spec: monitoringv1.AlertmanagerSpec{
PodMeta... | explode_data.jsonl/37678 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 281
} | [
2830,
3393,
23527,
23674,
21418,
1155,
353,
8840,
836,
8,
341,
197,
39626,
1669,
2415,
14032,
30953,
515,
197,
197,
1,
1944,
24674,
788,
330,
1944,
957,
756,
197,
532,
95143,
1669,
2415,
14032,
30953,
515,
197,
197,
1,
1944,
1502,
788... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTsValue(t *testing.T) {
bidder, buildErr := Builder(openrtb_ext.BidderTappx, config.Adapter{
Endpoint: "http://{{.Host}}"})
if buildErr != nil {
t.Fatalf("Builder returned unexpected error %v", buildErr)
}
bidderTappx := bidder.(*TappxAdapter)
var test int
test = 0
var tappxExt openrtb_ext.ExtImp... | explode_data.jsonl/51705 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 322
} | [
2830,
3393,
52793,
1130,
1155,
353,
8840,
836,
8,
341,
2233,
307,
1107,
11,
1936,
7747,
1669,
20626,
30981,
3342,
65,
9927,
1785,
307,
1107,
51,
676,
87,
11,
2193,
34190,
515,
197,
197,
27380,
25,
330,
1254,
1110,
2979,
13,
9296,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSend(t *testing.T) {
webhookUrl := "https://hooks.slack.com/services/xxxx"
err := SendSlack(webhookUrl,
Payload{Text: "``` xiaohei```", Markdown: true})
fmt.Println(err)
} | explode_data.jsonl/76219 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
11505,
1155,
353,
8840,
836,
8,
341,
97250,
20873,
2864,
1669,
330,
2428,
1110,
38560,
25101,
473,
905,
22258,
14,
18516,
698,
9859,
1669,
11000,
7442,
473,
39769,
20873,
2864,
345,
197,
10025,
6989,
90,
1178,
25,
330,
73594... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetCertificate_nilPrompt(t *testing.T) {
man := &Manager{}
defer man.stopRenew()
url, finish := startACMEServerStub(t, getCertificateFromManager(man, true), "example.org")
defer finish()
man.Client = &acme.Client{DirectoryURL: url}
hello := clientHelloInfo("example.org", true)
if _, err := man.GetCertif... | explode_data.jsonl/65047 | {
"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,
1949,
33202,
36175,
54615,
1155,
353,
8840,
836,
8,
341,
197,
1515,
1669,
609,
2043,
16094,
16867,
883,
13227,
34625,
365,
741,
19320,
11,
6248,
1669,
1191,
1706,
87711,
2836,
33838,
1155,
11,
633,
33202,
3830,
2043,
60671,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPeerConnection_SetConfiguration(t *testing.T) {
// Note: These tests don't include ICEServer.Credential,
// ICEServer.CredentialType, or Certificates because those are not supported
// in the WASM bindings.
for _, test := range []struct {
name string
init func() (*PeerConnection, error)
config... | explode_data.jsonl/8644 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1365
} | [
2830,
3393,
30888,
4526,
14812,
7688,
1155,
353,
8840,
836,
8,
341,
197,
322,
7036,
25,
4220,
7032,
1513,
944,
2924,
19288,
1570,
2836,
727,
30320,
345,
197,
322,
19288,
1570,
2836,
727,
30320,
929,
11,
476,
15304,
24405,
1576,
1846,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRootRouteExists(t *testing.T) {
in := `
receivers:
- name: 'team-X-mails'
`
_, err := Load(in)
expected := "no routes provided"
if err == nil {
t.Fatalf("no error returned, expected:\n%q", expected)
}
if err.Error() != expected {
t.Errorf("\nexpected:\n%q\ngot:\n%q", expected, err.Error())
}
} | explode_data.jsonl/72901 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
8439,
4899,
15575,
1155,
353,
8840,
836,
8,
341,
17430,
1669,
22074,
53387,
1945,
510,
12,
829,
25,
364,
9196,
30550,
60220,
1248,
3989,
197,
6878,
1848,
1669,
8893,
5900,
692,
42400,
1669,
330,
2152,
11291,
3897,
1837,
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... | 3 |
func TestClock_AddOnceJob(t *testing.T) {
var (
randscope = 50 * 1000 * 1000 //随机范围
interval = time.Millisecond*100 + time.Duration(r.Intn(randscope))
myClock = Default().Reset()
jobFunc = func() {
//fmt.Println("任务事件")
}
)
//插入时间间隔≤0,应该不允许添加
if _, inserted := myClock.AddJobWithInterval(0, jobFun... | explode_data.jsonl/2016 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 387
} | [
2830,
3393,
26104,
21346,
12522,
12245,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
7000,
2844,
2417,
284,
220,
20,
15,
353,
220,
16,
15,
15,
15,
353,
220,
16,
15,
15,
15,
442,
107898,
101121,
198,
197,
2084,
6152,
220,
284,
88... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseProgression_Storex(t *testing.T) {
par := MustParseProgression("A (E F) =")
if got, want := par.Storex(), "progression('A (E F) =')"; got != want {
t.Errorf("got [%v] want [%v]", got, want)
}
} | explode_data.jsonl/60940 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
14463,
9496,
290,
92684,
87,
1155,
353,
8840,
836,
8,
341,
197,
1732,
1669,
15465,
14463,
9496,
290,
445,
32,
320,
36,
434,
8,
284,
1138,
743,
2684,
11,
1366,
1669,
1346,
38047,
87,
1507,
330,
14366,
290,
492,
32,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestString(t *testing.T) {
expectPrinted(t, "a:after { content: 'a\\\rb' }", "a:after {\n content: \"ab\";\n}\n")
expectPrinted(t, "a:after { content: 'a\\\nb' }", "a:after {\n content: \"ab\";\n}\n")
expectPrinted(t, "a:after { content: 'a\\\fb' }", "a:after {\n content: \"ab\";\n}\n")
expectPrinted(t, "a:... | explode_data.jsonl/32614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 592
} | [
2830,
3393,
703,
1155,
353,
8840,
836,
8,
341,
24952,
8994,
291,
1155,
11,
330,
64,
25,
10694,
314,
2213,
25,
364,
64,
81351,
10681,
6,
335,
497,
330,
64,
25,
10694,
28152,
77,
220,
2213,
25,
7245,
370,
2105,
17882,
77,
11035,
77,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateCertificateFilesMethods(t *testing.T) {
var tests = []struct {
setupFunc func(cfg *kubeadmapi.InitConfiguration) error
createFunc func(cfg *kubeadmapi.InitConfiguration) error
expectedFiles []string
externalEtcd bool
}{
{
createFunc: CreatePKIAssets,
expectedFiles: []string{
... | explode_data.jsonl/58628 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1190
} | [
2830,
3393,
4021,
33202,
10809,
17856,
1155,
353,
8840,
836,
8,
1476,
2405,
7032,
284,
3056,
1235,
341,
197,
84571,
9626,
257,
2915,
28272,
353,
74,
392,
3149,
76,
2068,
26849,
7688,
8,
1465,
198,
197,
39263,
9626,
262,
2915,
28272,
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 TestRecursive(test *testing.T) {
_, err := parseRDLString(`
type Node Struct {
Node left;
String value;
Node right (optional);
}
`)
if err == nil {
test.Errorf("recursive field must be optional")
}
_, err = parseRDLString(`
type Node Struct {
Node left (optional);
String value;
Node right (optio... | explode_data.jsonl/74348 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
78542,
8623,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
4715,
49,
16524,
703,
61528,
1313,
6018,
16139,
341,
220,
6018,
2115,
280,
220,
923,
897,
280,
220,
6018,
1290,
320,
12807,
317,
532,
24183,
743,
1848,
621,
2092,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEventAggregatorByReasonMessageFunc(t *testing.T) {
expectedPrefix := "(combined from similar events): "
event1 := makeEvent("end-of-world", "it was fun", makeObjectReference("Pod", "pod1", "other"))
actual := EventAggregatorByReasonMessageFunc(&event1)
if !strings.HasPrefix(actual, expectedPrefix) {
t.Er... | explode_data.jsonl/59127 | {
"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,
1556,
9042,
58131,
1359,
25139,
2052,
9626,
1155,
353,
8840,
836,
8,
341,
42400,
14335,
1669,
11993,
66307,
504,
4428,
4357,
1648,
6228,
28302,
16,
1669,
1281,
1556,
445,
408,
8668,
30084,
497,
330,
275,
572,
2464,
497,
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... | 2 |
func TestYesFilter_Type(t *testing.T) {
expected := YesInternalFilter.String()
var f YesFilter
actual := f.Type().String()
if actual != expected {
t.Errorf("Type() = %v, want %v", actual, expected)
}
} | explode_data.jsonl/25903 | {
"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,
9454,
5632,
13729,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
7414,
11569,
5632,
6431,
741,
2405,
282,
7414,
5632,
198,
88814,
1669,
282,
10184,
1005,
703,
741,
743,
5042,
961,
3601,
341,
197,
3244,
13080,
445,
929,
368,
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
] | 2 |
func TestNextConcurrent(t *testing.T) {
skipOn(t, "broken", "freebsd")
testcases := []nextTest{
{8, 9},
{9, 10},
{10, 11},
}
protest.AllowRecording(t)
withTestProcess("parallel_next", t, func(p *proc.Target, fixture protest.Fixture) {
bp := setFunctionBreakpoint(p, t, "main.sayhi")
assertNoError(p.Contin... | explode_data.jsonl/56206 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 525
} | [
2830,
3393,
5847,
1109,
3231,
1155,
353,
8840,
836,
8,
341,
1903,
13389,
1925,
1155,
11,
330,
48909,
497,
330,
10593,
51835,
1138,
18185,
23910,
1669,
3056,
3600,
2271,
515,
197,
197,
90,
23,
11,
220,
24,
1583,
197,
197,
90,
24,
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... | 5 |
func TestStartAcquisitionTail(t *testing.T) {
sources := []DataSource{
&MockTail{},
}
out := make(chan types.Event)
acquisTomb := tomb.Tomb{}
go func() {
if err := StartAcquisition(sources, out, &acquisTomb); err != nil {
t.Fatalf("unexpected error")
}
}()
count := 0
READLOOP:
for {
select {
case... | explode_data.jsonl/29482 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 274
} | [
2830,
3393,
3479,
11654,
17204,
44795,
1155,
353,
8840,
836,
8,
341,
1903,
2360,
1669,
3056,
17173,
515,
197,
197,
5,
11571,
44795,
38837,
197,
532,
13967,
1669,
1281,
35190,
4494,
6904,
340,
81200,
9202,
51,
2855,
1669,
43080,
836,
285... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigFindDefaultVersionError(t *testing.T) {
confFile := configfile(`{"firefox":{"default":""}}`)
defer os.Remove(confFile)
conf := config.NewConfig()
conf.Load(confFile, logConfPath)
_, _, ok := conf.Find("firefox", "")
AssertThat(t, ok, Is{false})
} | explode_data.jsonl/37921 | {
"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,
2648,
9885,
3675,
5637,
1454,
1155,
353,
8840,
836,
8,
341,
67850,
1703,
1669,
2193,
1192,
5809,
4913,
97912,
22317,
2258,
62366,
3417,
24183,
16867,
2643,
13270,
29879,
1703,
340,
67850,
1669,
2193,
7121,
2648,
741,
67850,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPackagerOnlyAdds(t *testing.T) {
t.Parallel()
db := makeFwdPkgDB(t, "")
shortChanID := lnwire.NewShortChanIDFromInt(1)
packager := channeldb.NewChannelPackager(shortChanID)
// To begin, there should be no forwarding packages on disk.
fwdPkgs := loadFwdPkgs(t, db, packager)
if len(fwdPkgs) != 0 {
t.... | explode_data.jsonl/75198 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1380
} | [
2830,
3393,
30684,
1409,
7308,
72111,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20939,
1669,
1281,
37,
6377,
47,
7351,
3506,
1155,
11,
85617,
47981,
46019,
915,
1669,
29390,
35531,
7121,
12472,
46019,
915,
3830,
1072,
7,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestShouldMountUFS(t *testing.T) {
type fields struct {
runtime *datav1alpha1.GooseFSRuntime
dataset *datav1alpha1.Dataset
name string
namespace string
Log logr.Logger
Client client.Client
}
tests := []struct {
name string
fields fields
wantShould bool
wantErr ... | explode_data.jsonl/70298 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 844
} | [
2830,
3393,
14996,
16284,
52,
8485,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
7000,
4466,
256,
353,
5911,
402,
16,
7141,
16,
1224,
13752,
8485,
15123,
198,
197,
2698,
8369,
256,
353,
5911,
402,
16,
7141,
16,
79356,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGameServerGetDevAddress(t *testing.T) {
devGs := &GameServer{
ObjectMeta: metav1.ObjectMeta{
Name: "dev-game",
Namespace: "default",
Annotations: map[string]string{DevAddressAnnotation: ipFixture},
},
Spec: GameServerSpec{
Ports: []GameServerPort{{HostPort: 7777, PortPolicy: Static}... | explode_data.jsonl/19638 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 362
} | [
2830,
3393,
4868,
5475,
1949,
14592,
4286,
1155,
353,
8840,
836,
8,
341,
27302,
81152,
1669,
609,
4868,
5475,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
286,
330,
3583,
19395,
756,
298,
90823,
25,
256,
330,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadInvalidTemplate(t *testing.T) {
// Invalid Template
template := map[string]interface{}{
"json": "invalid",
}
// Setup ES
client := estest.GetTestingElasticsearch(t)
if err := client.Connect(); err != nil {
t.Fatal(err)
}
templateName := "invalidtemplate"
loader := &Loader{
client: client,... | explode_data.jsonl/63862 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
5879,
7928,
7275,
1155,
353,
8840,
836,
8,
341,
197,
322,
13882,
14355,
198,
22832,
1669,
2415,
14032,
31344,
67066,
197,
197,
1,
2236,
788,
330,
11808,
756,
197,
630,
197,
322,
18626,
19287,
198,
25291,
1669,
1788,
477,
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 TestGlobalMemoryStatusEx(t *testing.T) {
ms, err := globalMemoryStatusEx()
if err != nil {
t.Fatal(err)
}
t.Logf("memory used %%: %d%%", ms.dwMemoryLoad)
t.Logf("total physical memory: %d", ms.ullTotalPhys)
t.Logf("avail physical memory: %d", ms.ullAvailPhys)
t.Logf("total virtual memory: %d", ms.ullTotal... | explode_data.jsonl/67704 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 197
} | [
2830,
3393,
11646,
10642,
2522,
840,
1155,
353,
8840,
836,
8,
341,
47691,
11,
1848,
1669,
3644,
10642,
2522,
840,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
3244,
98954,
445,
17269,
1483,
23277,
25,
1018,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAgent_RegisterService_ACLDeny(t *testing.T) {
t.Parallel()
a := NewTestAgent(t.Name(), TestACLConfig())
defer a.Shutdown()
args := &structs.ServiceDefinition{
Name: "test",
Tags: []string{"master"},
Port: 8000,
Check: structs.CheckType{
TTL: 15 * time.Second,
},
Checks: []*structs.CheckType... | explode_data.jsonl/33627 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 402
} | [
2830,
3393,
16810,
73124,
1860,
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,
31215,
1669,
609,
1235,
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... | 2 |
func TestEspData_Measurement(t *testing.T) {
ts := api.UnixTime(time.Now())
temp := float32(25)
humidity := float32(33.5)
pressure := float32(1015.1)
pm25 := float32(1.8)
pm10 := float32(14.5)
m := api.Measurement{
Timestamp: &ts,
Temperature: &temp,
Humidity: &humidity,
Pressure: &pressure,
P... | explode_data.jsonl/43005 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 392
} | [
2830,
3393,
76954,
1043,
1245,
68,
24359,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
6330,
10616,
941,
1462,
9730,
13244,
2398,
16280,
1669,
2224,
18,
17,
7,
17,
20,
340,
9598,
73926,
1669,
2224,
18,
17,
7,
18,
18,
13,
20,
340,
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 TestParseTime(t *testing.T) {
testCases := []struct {
value string
success bool
}{
// Parses 1 day successfully.
{
value: "1d",
success: true,
},
// Parses 1 week successfully.
{
value: "1w",
success: true,
},
// Parses 1 year successfully.
{
value: "1y",
success: tr... | explode_data.jsonl/76928 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 473
} | [
2830,
3393,
14463,
1462,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
16309,
256,
914,
198,
197,
30553,
1807,
198,
197,
59403,
197,
197,
322,
73430,
220,
16,
1899,
7790,
624,
197,
197,
515,
298,
16309,
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... | 8 |
func TestSwarmLeaveErrors(t *testing.T) {
testCases := []struct {
name string
args []string
swarmLeaveFunc func() error
expectedError string
}{
{
name: "too-many-args",
args: []string{"foo"},
expectedError: "accepts no argument(s)",
},
{
name: "leave-fa... | explode_data.jsonl/74066 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 337
} | [
2830,
3393,
13218,
2178,
21833,
13877,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
31215,
1843,
3056,
917,
198,
197,
77295,
2178,
21833,
9626,
2915,
368,
1465,
198,
197,
42400,
145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFormatterObjectNil(test *testing.T) {
var object *struct {
Foo int
}
formatted, err := formatter.New().Format("Message {p} {p} {p2}", 3, object, "object")
assert.Nil(test, object)
assert.NoError(test, err)
assert.Equal(test, "Message 3 <nil> object", formatted)
} | explode_data.jsonl/39742 | {
"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,
14183,
1190,
19064,
8623,
353,
8840,
836,
8,
341,
2405,
1633,
353,
1235,
341,
197,
12727,
2624,
526,
198,
197,
630,
37410,
12127,
11,
1848,
1669,
24814,
7121,
1005,
4061,
445,
2052,
314,
79,
92,
314,
79,
92,
314,
79,
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 TestDecodersReusable(t *testing.T) {
assert := assert.New(t)
testCases := []struct {
firstPayload io.Reader
secondPayload io.Reader
decoder ClientDecoder
}{
{firstPayload: getJSONPayload(), secondPayload: getJSONPayload(), decoder: newJSONDecoder()},
{firstPayload: getMsgpackPayload(), secondPa... | explode_data.jsonl/35761 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 547
} | [
2830,
3393,
4900,
52498,
35576,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
18185,
37302,
1669,
3056,
1235,
341,
197,
42190,
29683,
220,
6399,
47431,
198,
197,
197,
5569,
29683,
6399,
47431,
198,
197,
197,
48110,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEncodeInt(t *testing.T) {
for _, v := range []int{-1, 0, 1024 * 1024} {
s := strconv.Itoa(v)
resp := NewInt([]byte(s))
testEncodeAndCheck(t, resp, []byte(":"+s+"\r\n"))
}
} | explode_data.jsonl/48347 | {
"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,
32535,
1072,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
348,
1669,
2088,
3056,
396,
19999,
16,
11,
220,
15,
11,
220,
16,
15,
17,
19,
353,
220,
16,
15,
17,
19,
92,
341,
197,
1903,
1669,
33317,
64109,
3747,
340,
197,
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 TestSocketWriter_unix(t *testing.T) {
tmpdir, err := ioutil.TempDir("", "telegraf")
require.NoError(t, err)
defer os.RemoveAll(tmpdir)
sock := filepath.Join(tmpdir, "sw.TestSocketWriter_unix.sock")
listener, err := net.Listen("unix", sock)
require.NoError(t, err)
sw := newSocketWriter()
sw.Address = "uni... | explode_data.jsonl/34019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
10286,
6492,
80572,
1155,
353,
8840,
836,
8,
341,
20082,
3741,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
15410,
76039,
1138,
17957,
35699,
1155,
11,
1848,
340,
16867,
2643,
84427,
10368,
3741,
340,
85809,
1669,
26054,
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 TestInsertionSort(t *testing.T) {
var a0 = goutil.RandIntArray(10, 1000000)
// fmt.Println(a0)
InsertionSort(a0)
// fmt.Println(a0)
} | explode_data.jsonl/20289 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 65
} | [
2830,
3393,
13780,
290,
10231,
1155,
353,
8840,
836,
8,
341,
2405,
264,
15,
284,
342,
30158,
2013,
437,
95338,
7,
16,
15,
11,
220,
16,
15,
15,
15,
15,
15,
15,
692,
197,
322,
8879,
12419,
2877,
15,
340,
197,
13780,
290,
10231,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func Test_TableBorder_GetBorder(t *testing.T) {
config := ReadConfiguration(t)
client, ctx := PrepareTest(t, config)
remoteDataFolder := remoteBaseTestDataFolder + "/DocumentElements/Tables"
localFile := "DocumentElements/Tables/TablesGet.docx"
remoteFileName := "TestGetBorder.docx"
UploadNextF... | explode_data.jsonl/16254 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 399
} | [
2830,
3393,
42544,
10691,
13614,
10691,
1155,
353,
8840,
836,
8,
341,
262,
2193,
1669,
4457,
7688,
1155,
340,
262,
2943,
11,
5635,
1669,
31166,
2271,
1155,
11,
2193,
340,
262,
8699,
1043,
13682,
1669,
8699,
3978,
83920,
13682,
488,
3521... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPEXReactorRunning(t *testing.T) {
N := 3
switches := make([]*p2p.Switch, N)
// directory to store address books
dir, err := ioutil.TempDir("", "pex_reactor")
require.Nil(t, err)
defer os.RemoveAll(dir) // nolint: errcheck
books := make([]*addrBook, N)
logger := log.TestingLogger()
// create switche... | explode_data.jsonl/6125 | {
"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,
1740,
55,
693,
5621,
18990,
1155,
353,
8840,
836,
8,
341,
18317,
1669,
220,
18,
198,
8961,
288,
1669,
1281,
85288,
79,
17,
79,
808,
5539,
11,
451,
692,
197,
322,
6220,
311,
3553,
2621,
6467,
198,
48532,
11,
1848,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAcquireRenewLease(t *testing.T) {
f := newFixture(t)
defer f.Close()
attrs := &subnet.LeaseAttrs{
PublicIP: mustParseIP4("1.1.1.1"),
}
l, err := f.sm.AcquireLease(f.ctx, "_", attrs)
if err != nil {
t.Fatalf("AcquireLease failed: %v", err)
}
if !mustParseIP4Net(expectedNetwork).Contains(l.Subnet.... | explode_data.jsonl/69657 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 236
} | [
2830,
3393,
11654,
984,
34625,
365,
2304,
519,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
340,
16867,
282,
10421,
2822,
197,
20468,
1669,
609,
88636,
11824,
519,
53671,
515,
197,
73146,
3298,
25,
1969,
14463,
3298,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestAcme_Mux(t *testing.T) {
// uncomment to debug
logrus.SetLevel(logrus.DebugLevel)
a := New(nil)
a.challengesTokenToKey["token1"] = "auth1"
a.challengesHostToToken["domain1.example.com"] = "token1"
req, err := http.NewRequest(
"GET",
"http://domain1.example.com/.well-known/acme-challenge/token1",
... | explode_data.jsonl/70063 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1049
} | [
2830,
3393,
11654,
2660,
1245,
2200,
1155,
353,
8840,
836,
8,
341,
197,
322,
62073,
311,
7390,
198,
90822,
4202,
4449,
12531,
20341,
20345,
4449,
692,
11323,
1669,
1532,
27907,
340,
11323,
5329,
42370,
3323,
1249,
1592,
1183,
5839,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAccAWSDBInstance_iamAuth(t *testing.T) {
var v rds.DBInstance
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSDBInstanceDestroy,
Steps: []resource.TestStep{
{
Config: testAccCheckAWSDBIAMAuth(acctest... | explode_data.jsonl/33921 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 254
} | [
2830,
3393,
14603,
36136,
3506,
2523,
62,
4932,
5087,
1155,
353,
8840,
836,
8,
341,
2405,
348,
435,
5356,
22537,
2523,
271,
50346,
8787,
1155,
11,
5101,
31363,
515,
197,
197,
4703,
3973,
25,
257,
2915,
368,
314,
1273,
14603,
4703,
397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPushedMetricsToMetricsAndContext(t *testing.T) {
container := protos.PushedMetricsContainer{
NetworkId: "testNetwork",
Metrics: []*protos.PushedMetric{{
MetricName: "metricA",
Value: 10,
TimestampMS: 1234,
Labels: []*protos.LabelPair{{Name: "labelName", Value: "labelValue"}},
},
... | explode_data.jsonl/82513 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 332
} | [
2830,
3393,
16644,
291,
27328,
1249,
27328,
3036,
1972,
1155,
353,
8840,
836,
8,
341,
53290,
1669,
1724,
436,
34981,
291,
27328,
4502,
515,
197,
197,
12320,
764,
25,
330,
1944,
12320,
756,
197,
9209,
13468,
25,
29838,
4391,
436,
34981,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTopLevelReturnForbiddenImport(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
return
import 'foo'
`,
},
entryPaths: []string{"/entry.js"},
options: config.Options{
Mode: config.ModePassThrough,
AbsOutputFile: "/out.js",
},... | explode_data.jsonl/38509 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 199
} | [
2830,
3393,
5366,
4449,
5598,
69115,
11511,
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,
853,
198,
571,
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 TestRejectUnknownFields_allowUnknownNonCriticals(t *testing.T) {
tests := []struct {
name string
in proto.Message
allowUnknownNonCriticals bool
wantErr error
}{
{
name: "Field that's in the reserved range, should fail by default",
in: &te... | explode_data.jsonl/34605 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 751
} | [
2830,
3393,
78413,
13790,
8941,
55731,
13790,
8121,
42008,
82,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
3824,
914,
198,
197,
17430,
5180,
18433,
8472,
198,
197,
197,
7183,
13790,
8121,
42008,
82,
1807,
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... | 3 |
func TestPassNew(t *testing.T) {
PassNew(func(got interface{}) {
if newObj != got.(string) {
t.Errorf("PassNew() = %v, wanted %v", got, newObj)
}
})(oldObj, newObj)
} | explode_data.jsonl/45276 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
12187,
3564,
1155,
353,
8840,
836,
8,
341,
10025,
395,
3564,
18552,
3268,
354,
3749,
28875,
341,
197,
743,
74259,
961,
2684,
12832,
917,
8,
341,
298,
3244,
13080,
445,
12187,
3564,
368,
284,
1018,
85,
11,
4829,
1018,
85,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestParse_Errors(t *testing.T) {
for _, tt := range []struct {
tmpl string
good string
bad string
}{
// Second argument to derivative must be duration
{tmpl: `SELECT derivative(f, %s) FROM m`, good: "1h", bad: "true"},
} {
good := fmt.Sprintf(tt.tmpl, tt.good)
if _, err := influxql.ParseStatement... | explode_data.jsonl/28586 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 239
} | [
2830,
3393,
14463,
93623,
1087,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
3244,
54010,
914,
198,
197,
3174,
1386,
914,
198,
197,
2233,
329,
220,
914,
198,
197,
59403,
197,
197,
322,
10440,
5693... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPolicyDto_ApplicationJson(t *testing.T) {
var dto = serverguard.PolicyDto{RefuseResponse: `{\"success\": true, \"msg\": \"访问频繁\"}`}
if dto.RefuseResonseCanBeJson() {
t.Fatal("the refuseResponse can not be json")
}
dto.RefuseResponse = `{"success": true, "msg": "访问频繁"}`
if !dto.RefuseResonseCanBeJson() {... | explode_data.jsonl/1814 | {
"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,
13825,
14797,
96579,
5014,
1155,
353,
8840,
836,
8,
341,
2405,
28335,
284,
3538,
26098,
1069,
8018,
14797,
90,
3945,
810,
2582,
25,
53692,
2105,
5630,
11693,
830,
11,
7245,
3236,
11693,
7245,
104925,
106689,
2105,
44099,
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... | 3 |
func TestParseInt(t *testing.T) {
var tcs = []struct {
name string
input string
expected int
}{
{
name: tt.Name{
Given: "string",
When: "the value is valid",
Then: "return valid int",
}.Construct(),
input: "123",
expected: 123,
},
{
name: tt.Name{
Given: "string"... | explode_data.jsonl/9689 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 288
} | [
2830,
3393,
14463,
1072,
1155,
353,
8840,
836,
8,
341,
2405,
259,
4837,
284,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
22427,
262,
914,
198,
197,
42400,
526,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
17853,
2967,
515,
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 TestStartWithdrawal(t *testing.T) {
tearDown, pool, store := vp.TstCreatePoolAndTxStore(t)
defer tearDown()
mgr := pool.Manager()
masters := []*hdkeychain.ExtendedKey{
vp.TstCreateMasterKey(t, bytes.Repeat([]byte{0x00, 0x01}, 16)),
vp.TstCreateMasterKey(t, bytes.Repeat([]byte{0x02, 0x01}, 16)),
vp.TstCr... | explode_data.jsonl/82311 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1167
} | [
2830,
3393,
3479,
92261,
278,
1155,
353,
8840,
836,
8,
341,
197,
82892,
11,
7314,
11,
3553,
1669,
34823,
836,
267,
4021,
10551,
3036,
31584,
6093,
1155,
340,
16867,
32825,
741,
2109,
901,
1669,
7314,
58298,
2822,
2109,
14199,
1669,
2983... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEtcdUpdatePodNotScheduled(t *testing.T) {
ctx := api.NewDefaultContext()
fakeClient := tools.NewFakeEtcdClient(t)
fakeClient.TestIndex = true
key, _ := makePodKey(ctx, "foo")
fakeClient.Set(key, runtime.EncodeOrDie(latest.Codec, &api.Pod{
TypeMeta: api.TypeMeta{ID: "foo"},
}), 1)
registry := NewTest... | explode_data.jsonl/8147 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 358
} | [
2830,
3393,
31860,
4385,
4289,
23527,
2623,
88137,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6330,
7121,
3675,
1972,
741,
1166,
726,
2959,
1669,
7375,
7121,
52317,
31860,
4385,
2959,
1155,
340,
1166,
726,
2959,
8787,
1552,
284,
830,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshalSignedAttribute(t *testing.T) {
cert, err := createTestCertificate(x509.SHA512WithRSA)
if err != nil {
t.Fatal(err)
}
content := []byte("Hello World")
toBeSigned, err := NewSignedData(content)
if err != nil {
t.Fatalf("Cannot initialize signed data: %s", err)
}
oidTest := asn1.ObjectIdenti... | explode_data.jsonl/25098 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 421
} | [
2830,
3393,
1806,
27121,
49312,
3907,
1155,
353,
8840,
836,
8,
341,
1444,
529,
11,
1848,
1669,
1855,
2271,
33202,
2075,
20,
15,
24,
808,
17020,
20,
16,
17,
2354,
73564,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
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... | 8 |
func TestRequest_DangerousContext(t *testing.T) {
tests := []struct {
name string
request *alice.Request
want bool
}{
{
name: "",
request: getReq(0),
want: false,
}, {
name: "",
request: getReq(1),
want: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *... | explode_data.jsonl/18226 | {
"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,
1900,
1557,
4003,
782,
1972,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
23555,
353,
63195,
9659,
198,
197,
50780,
262,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
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... | 2 |
func TestPostNotificationGetSenderName(t *testing.T) {
th := Setup(t)
defer th.TearDown()
defaultChannel := &model.Channel{Type: model.CHANNEL_OPEN}
defaultPost := &model.Post{Props: model.StringInterface{}}
sender := &model.User{Id: model.NewId(), Username: "sender", FirstName: "Sender", LastName: "Sender", Nick... | explode_data.jsonl/28311 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 906
} | [
2830,
3393,
4133,
11196,
1949,
20381,
675,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
340,
16867,
270,
836,
682,
4454,
2822,
11940,
9629,
1669,
609,
2528,
38716,
90,
929,
25,
1614,
37465,
17901,
24070,
532,
11940,
4133,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetTargetsDirError(t *testing.T) {
testDir, err := initTestFiles(map[string]string{
"foo_benthos_test.yaml": `tests: [{}]`,
"bar.yaml": `foobar: {}`,
"bar_benthos_test.yaml": `tests: [{}]`,
})
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(testDir)
if _, err = test.GetTestTargets... | explode_data.jsonl/34065 | {
"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,
1949,
49030,
6184,
1454,
1155,
353,
8840,
836,
8,
341,
18185,
6184,
11,
1848,
1669,
2930,
2271,
10809,
9147,
14032,
30953,
515,
197,
197,
1,
7975,
880,
20684,
436,
4452,
33406,
788,
1565,
23841,
25,
508,
78134,
12892,
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 TestServer_Request_Post_Body_ContentLength_TooSmall(t *testing.T) {
testBodyContentsFail(t, 4, "sender tried to send more than declared Content-Length of 4 bytes",
func(st *serverTester) {
st.writeHeaders(HeadersFrameParam{
StreamID: 1, // clients send odd numbers
BlockFragment: st.encodeHeader(
... | explode_data.jsonl/71613 | {
"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,
5475,
44024,
66726,
1668,
1076,
78383,
4373,
1139,
2624,
25307,
1155,
353,
8840,
836,
8,
341,
18185,
5444,
14803,
19524,
1155,
11,
220,
19,
11,
330,
11644,
6679,
311,
3624,
803,
1091,
14275,
8883,
52493,
315,
220,
19,
5820,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRenderWithInvalidTemplate(t *testing.T) {
t.Parallel()
cfg, fs := newTestCfg()
writeSource(t, fs, filepath.Join("content", "foo.md"), "foo")
withTemplate := createWithTemplateFromNameValues("missing", templateMissingFunc)
s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg, WithTemplate: withTemplate... | explode_data.jsonl/40663 | {
"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,
6750,
2354,
7928,
7275,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50286,
11,
8619,
1669,
501,
2271,
42467,
2822,
24945,
3608,
1155,
11,
8619,
11,
26054,
22363,
445,
1796,
497,
330,
7975,
21324,
3975,
330,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDeleteCASTemplate(t *testing.T) {
sc := &v1_storage.StorageClass{}
sc.Annotations = make(map[string]string)
tests := map[string]struct {
scDeleteCASAnnotation string
scCASTypeAnnotation string
envJivaCAST string
envCStorCAST string
expectedCAST string
}{
"CAST a... | explode_data.jsonl/563 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 713
} | [
2830,
3393,
1949,
6435,
34163,
3708,
1155,
353,
8840,
836,
8,
341,
29928,
1669,
609,
85,
16,
23310,
43771,
1957,
16094,
29928,
91172,
284,
1281,
9147,
14032,
30953,
340,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
29928,
6435,
87516,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInitializeSessionTimers(t *testing.T) {
dir1, s1 := testServer(t)
defer os.RemoveAll(dir1)
defer s1.Shutdown()
testrpc.WaitForLeader(t, s1.RPC, "dc1")
state := s1.fsm.State()
if err := state.EnsureNode(1, &structs.Node{Node: "foo", Address: "127.0.0.1"}); err != nil {
t.Fatalf("err: %s", err)
}
ses... | explode_data.jsonl/35327 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 315
} | [
2830,
3393,
9928,
5283,
20217,
388,
1155,
353,
8840,
836,
8,
341,
48532,
16,
11,
274,
16,
1669,
1273,
5475,
1155,
340,
16867,
2643,
84427,
14161,
16,
340,
16867,
274,
16,
10849,
18452,
2822,
18185,
29414,
99153,
52621,
1155,
11,
274,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.