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 TestApplyComponentCreateSuccess(t *testing.T) {
// resolve empty policy
empty := newTestData(t, builder.NewPolicyBuilder())
actualState := empty.resolution()
// resolve full policy
desired := newTestData(t, makePolicyBuilder())
// apply changes
applier := NewEngineApply(
desired.policy(),
desired.reso... | explode_data.jsonl/74187 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 310
} | [
2830,
3393,
28497,
2189,
4021,
7188,
1155,
353,
8840,
836,
8,
341,
197,
322,
8830,
4287,
4842,
198,
197,
3194,
1669,
501,
83920,
1155,
11,
7363,
7121,
13825,
3297,
2398,
88814,
1397,
1669,
4287,
86431,
2822,
197,
322,
8830,
2480,
4842,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnauthorizedSeek(t *testing.T) {
mm := newMockMultichainManager()
for i := 1; i < ledgerSize; i++ {
l := mm.chains[systemChainID].ledger
l.Append(ledger.CreateNextBlock(l, []*cb.Envelope{&cb.Envelope{Payload: []byte(fmt.Sprintf("%d", i))}}, ""))
}
mm.chains[systemChainID].policyManager.Policy.Err = fmt... | explode_data.jsonl/36260 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 339
} | [
2830,
3393,
51181,
39350,
1155,
353,
8840,
836,
8,
341,
2109,
76,
1669,
501,
11571,
40404,
713,
466,
2043,
741,
2023,
600,
1669,
220,
16,
26,
600,
366,
46933,
1695,
26,
600,
1027,
341,
197,
8810,
1669,
9465,
5329,
1735,
58,
8948,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestMulti(t *testing.T) {
connection, err := OpenConnection("multi-conn", "tcp", "localhost:6379", 1, nil)
assert.NoError(t, err)
queue, err := connection.OpenQueue("multi-q")
assert.NoError(t, err)
_, err = queue.PurgeReady()
assert.NoError(t, err)
for i := 0; i < 20; i++ {
err := queue.Publish(fmt.Spri... | explode_data.jsonl/44665 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 925
} | [
2830,
3393,
20358,
1155,
353,
8840,
836,
8,
341,
54590,
11,
1848,
1669,
5264,
4526,
445,
26268,
12,
5148,
497,
330,
27161,
497,
330,
8301,
25,
21,
18,
22,
24,
497,
220,
16,
11,
2092,
340,
6948,
35699,
1155,
11,
1848,
340,
46993,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMemory_Configure(t *testing.T) {
config := `{"trust_domain":"example.com", "ttl":"1h", "key_size":2048}`
pluginConfig := &spi.ConfigureRequest{
Configuration: config,
}
m := &memoryPlugin{
mtx: &sync.RWMutex{},
}
resp, err := m.Configure(pluginConfig)
assert.Nil(t, err)
assert.Equal(t, &spi.Config... | explode_data.jsonl/73850 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
10642,
15100,
17781,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
1565,
4913,
56655,
20111,
3252,
8687,
905,
497,
330,
62858,
3252,
16,
71,
497,
330,
792,
2368,
788,
17,
15,
19,
23,
31257,
197,
9138,
2648,
1669,
609,
39157,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKVPutAtMostOnce(t *testing.T) {
defer testutil.AfterTest(t)
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 1})
defer clus.Terminate(t)
if _, err := clus.Client(0).Put(context.TODO(), "k", "1"); err != nil {
t.Fatal(err)
}
for i := 0; i < 10; i++ {
clus.Members[0].DropConnectio... | explode_data.jsonl/16414 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 369
} | [
2830,
3393,
42,
13378,
332,
1655,
13319,
12522,
1155,
353,
8840,
836,
8,
341,
16867,
1273,
1314,
36892,
2271,
1155,
340,
197,
4163,
1669,
17590,
7121,
28678,
53,
18,
1155,
11,
609,
60168,
72883,
2648,
90,
1695,
25,
220,
16,
3518,
1686... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClient_Do(t *testing.T) {
t.Parallel()
cases := []struct {
name string
request *http.Request
Option []Option
}{
{
"normal",
func() *http.Request { r, _ := http.NewRequest("GET", "https://example.com/", nil); return r }(),
[]Option{},
},
{
"large request",
func() *http.Request ... | explode_data.jsonl/29963 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 556
} | [
2830,
3393,
2959,
93481,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
23555,
353,
1254,
9659,
198,
197,
197,
5341,
220,
3056,
5341,
198,
197,
59403,
197,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGoMagic(t *testing.T) {
now, _ := time.Parse(time.RFC3339, "2017-02-01T16:06:19+08:00")
tests := []struct {
data string
exp string
}{
{
data: "select x@(MM)@(DD) from dbtable@(hh)-@(mm)",
exp: "select x0201 from dbtable16-06",
},
{
data: "select x@(M)@(D) from dbtable@(h)-@(m)",
exp:... | explode_data.jsonl/61888 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 316
} | [
2830,
3393,
10850,
43538,
1155,
353,
8840,
836,
8,
341,
80922,
11,
716,
1669,
882,
8937,
9730,
2013,
6754,
18,
18,
18,
24,
11,
330,
17,
15,
16,
22,
12,
15,
17,
12,
15,
16,
51,
16,
21,
25,
15,
21,
25,
16,
24,
10,
15,
23,
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 TestParseCertificateWithRSAESOAEPPublicKey(t *testing.T) {
wantKey := &rsa.PublicKey{
E: 65537,
N: bigFromHexString("8e7983105063a3f1c2e77d7c8b4f411db9c76f11366ccbb11757001fa51805bbbf68b6dccd9ad28a82c6a831e1591f06181c2e328c261cf9a14ff1704dc3261cc16da751760141969330a75b3fc5ae185ac76d636a97a339838bd042aa7c5999f... | explode_data.jsonl/67990 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 609
} | [
2830,
3393,
14463,
33202,
2354,
73564,
1570,
46,
13669,
4406,
475,
1592,
1155,
353,
8840,
836,
8,
341,
50780,
1592,
1669,
609,
60869,
49139,
1592,
515,
197,
22784,
25,
220,
21,
20,
20,
18,
22,
345,
197,
18317,
25,
2409,
3830,
49137,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestArgs(t *testing.T) {
c := testConfig(t)
fun := c.Fun("entry",
Bloc("entry",
Valu("a", OpConst64, c.config.Types.Int64, 14, nil),
Valu("b", OpConst64, c.config.Types.Int64, 26, nil),
Valu("sum", OpAdd64, c.config.Types.Int64, 0, nil, "a", "b"),
Valu("mem", OpInitMem, types.TypeMem, 0, nil),
G... | explode_data.jsonl/66552 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
4117,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1273,
2648,
1155,
340,
90126,
1669,
272,
991,
359,
445,
4085,
756,
197,
12791,
1074,
445,
4085,
756,
298,
197,
2208,
84,
445,
64,
497,
10672,
19167,
21,
19,
11,
272,
5423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWalk(t *testing.T) {
// The root of the walk must be a name with an actual basename, not just ".".
// Walk uses Lstat to obtain the name of the root, and Lstat on platforms
// other than Plan 9 reports the name "." instead of the actual base name of
// the directory. (See https://golang.org/issue/42115.)
... | explode_data.jsonl/56052 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1441
} | [
2830,
3393,
48849,
1155,
353,
8840,
836,
8,
341,
197,
322,
576,
3704,
315,
279,
4227,
1969,
387,
264,
829,
448,
458,
5042,
38196,
11,
537,
1101,
22760,
624,
197,
322,
12554,
5711,
444,
9878,
311,
6851,
279,
829,
315,
279,
3704,
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 TestRest_DeleteMe(t *testing.T) {
ts, srv, teardown := startupT(t)
defer teardown()
client := http.Client{}
req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("%s/api/v1/deleteme?site=remark42", ts.URL), nil)
assert.NoError(t, err)
req.Header.Add("X-JWT", devToken)
resp, err := client.Do(req)
assert... | explode_data.jsonl/37404 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 489
} | [
2830,
3393,
12416,
57418,
7823,
1155,
353,
8840,
836,
8,
341,
57441,
11,
43578,
11,
49304,
1669,
20567,
51,
1155,
340,
16867,
49304,
2822,
25291,
1669,
1758,
11716,
16094,
24395,
11,
1848,
1669,
1758,
75274,
19886,
20798,
4133,
11,
8879,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBhattacharyya(t *testing.T) {
for i, test := range []struct {
p []float64
q []float64
res float64
}{
{
p: []float64{0.5, 0.1, 0.3, 0.1},
q: []float64{0.1, 0.4, 0.25, 0.25},
res: 0.15597338718671386,
},
{
p: []float64{0.4, 0.6, 0.0},
q: []float64{0.2, 0.2, 0.6},
res: ... | explode_data.jsonl/1773 | {
"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,
33,
71,
16330,
658,
7755,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1273,
1669,
2088,
3056,
1235,
341,
197,
3223,
256,
3056,
3649,
21,
19,
198,
197,
18534,
256,
3056,
3649,
21,
19,
198,
197,
10202,
2224,
21,
19,
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 TestSplitCodec(t *testing.T) {
assert.NotPanics(t, func() {
q := new(query)
q.Begin = []byte("ABC")
id := q.Encode()
assert.Equal(t, []byte{0x3, 0x41, 0x42, 0x43, 0x0, 0x0}, id)
out, err := decodeQuery(id)
assert.NoError(t, err)
assert.Equal(t, []byte("ABC"), out.Begin)
})
} | explode_data.jsonl/74842 | {
"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,
20193,
36913,
1155,
353,
8840,
836,
8,
341,
6948,
15000,
35693,
1211,
1155,
11,
2915,
368,
341,
197,
18534,
1669,
501,
10741,
340,
197,
18534,
28467,
284,
3056,
3782,
445,
25411,
5130,
197,
15710,
1669,
2804,
50217,
741,
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 TestGetProfileRefreshSettings(t *testing.T) {
cfg := verifyGetCfg
refresh, interval := getProfileRefreshSettings(cfg)
assert.Equal(t, true, refresh)
assert.Equal(t, 5*time.Minute, interval)
cfg.RefreshInterval = schema.ProfileRefreshDisabled
refresh, interval = getProfileRefreshSettings(cfg)
assert.Equ... | explode_data.jsonl/20208 | {
"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,
1949,
8526,
14567,
6086,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
10146,
1949,
42467,
271,
197,
17168,
11,
9873,
1669,
633,
8526,
14567,
6086,
28272,
692,
6948,
12808,
1155,
11,
830,
11,
10408,
340,
6948,
12808,
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 |
func TestSampler(t *testing.T) {
for _, lvl := range []Level{DebugLevel, InfoLevel, WarnLevel, ErrorLevel, DPanicLevel, PanicLevel, FatalLevel} {
sampler, logs := fakeSampler(DebugLevel, time.Minute, 2, 3)
// Ensure that counts aren't shared between levels.
probeLevel := DebugLevel
if lvl == DebugLevel {
p... | explode_data.jsonl/39112 | {
"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,
66048,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
46129,
1669,
2088,
3056,
4449,
90,
7939,
4449,
11,
13074,
4449,
11,
67746,
4449,
11,
4600,
4449,
11,
31757,
31270,
4449,
11,
83740,
4449,
11,
65629,
4449,
92,
341,
197,
1903... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func Test_procSubscribePush_pushSupport(t *testing.T) {
chain, mock33 := createBlockChainWithFalgSet(t, false, false)
defer mock33.Close()
subscribe := new(types.PushSubscribeReq)
err := chain.procSubscribePush(subscribe)
assert.Equal(t, types.ErrPushNotSupport, err)
} | explode_data.jsonl/61710 | {
"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,
24436,
28573,
16644,
14218,
7916,
1155,
353,
8840,
836,
8,
341,
197,
8819,
11,
7860,
18,
18,
1669,
1855,
4713,
18837,
2354,
37,
23881,
1649,
1155,
11,
895,
11,
895,
340,
16867,
7860,
18,
18,
10421,
741,
28624,
6273,
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 TestFindIssueByIDOtherErr(t *testing.T) {
i := domain.Issue{
ID: 1,
Title: "test-title",
Description: "test-description",
Status: 1,
ProjectID: 1,
}
cucm, iucm, lucm, pucm, m := prepareMocksAndRUC()
iucm.On("FindByID", i.ID).Return(i, errors.New("test error"))
c, _ := prepar... | explode_data.jsonl/60169 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
9885,
42006,
60572,
11409,
7747,
1155,
353,
8840,
836,
8,
341,
8230,
1669,
7947,
2447,
83890,
515,
197,
29580,
25,
688,
220,
16,
345,
197,
92233,
25,
981,
330,
1944,
8816,
756,
197,
47414,
25,
330,
1944,
42830,
756,
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 TestAttrsAppendLD(t *testing.T) {
c := setupTest([]string{"append", "attrs", "--host", "orion-ld", "--id", "urn:ngsi-ld:Product:010", "--data", "{\"specialOffer\":{\"value\": true}}", "--context", "[\"http://context\"]"})
reqRes := helper.MockHTTPReqRes{}
reqRes.Res.StatusCode = http.StatusNoContent
reqRes.Re... | explode_data.jsonl/33065 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
53671,
23877,
12335,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
6505,
2271,
10556,
917,
4913,
5090,
497,
330,
20468,
497,
14482,
3790,
497,
330,
269,
290,
12,
507,
497,
14482,
307,
497,
330,
399,
25,
968,
6321,
12,
507,
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 TestCheckCSRFToken(t *testing.T) {
t.Run("should allow a POST request with a valid CSRF token header", func(t *testing.T) {
th := SetupWithStoreMock(t)
defer th.TearDown()
h := &Handler{
RequireSession: true,
TrustRequester: false,
}
token := "token"
tokenLocation := app.TokenLocationCookie
... | explode_data.jsonl/11787 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2518
} | [
2830,
3393,
3973,
6412,
17612,
3323,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5445,
2138,
264,
12869,
1681,
448,
264,
2697,
78595,
3950,
4247,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
70479,
1669,
18626,
2354,
6093,
11571,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJsonEncodable(t *testing.T) {
var s customJsonEncodable
vm := New()
vm.Set("s", &s)
ret, err := vm.RunString("JSON.stringify(s)")
if err != nil {
t.Fatal(err)
}
if !ret.StrictEquals(vm.ToValue("\"Test\"")) {
t.Fatalf("Expected \"Test\", got: %v", ret)
}
} | explode_data.jsonl/10489 | {
"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,
5014,
7408,
69129,
1155,
353,
8840,
836,
8,
341,
2405,
274,
2526,
5014,
7408,
69129,
271,
54879,
1669,
1532,
741,
54879,
4202,
445,
82,
497,
609,
82,
692,
11262,
11,
1848,
1669,
10995,
16708,
703,
445,
5370,
10052,
1141,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestACL_CloneDestroy(t *testing.T) {
if CONSUL_ROOT == "" {
t.SkipNow()
}
c := makeClient(t)
c.config.Token = CONSUL_ROOT
acl := c.ACL()
id, wm, err := acl.Clone(CONSUL_ROOT, nil)
if err != nil {
t.Fatalf("err: %v", err)
}
if wm.RequestTime == 0 {
t.Fatalf("bad: %v", wm)
}
if id == "" {
t.Fat... | explode_data.jsonl/44593 | {
"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,
55393,
85110,
603,
14245,
1155,
353,
8840,
836,
8,
341,
743,
72906,
1094,
16197,
621,
1591,
341,
197,
3244,
57776,
7039,
741,
197,
532,
1444,
1669,
1281,
2959,
1155,
340,
1444,
5423,
32277,
284,
72906,
1094,
16197,
198,
1132... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestThrottler_CreateStoreRecord(t *testing.T) {
throttleID, throttlePeriod, store := setup()
store.On("Get", throttleID).Return("", false, time.Millisecond*10, nil)
store.On("Set", throttleID, "1", throttlePeriod).Return(true, nil)
subject := throttles.NewThrottler(store)
result, duration, err := subject.Ca... | explode_data.jsonl/70680 | {
"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,
1001,
46689,
1536,
34325,
6093,
6471,
1155,
353,
8840,
836,
8,
341,
70479,
27535,
915,
11,
42166,
23750,
11,
3553,
1669,
6505,
2822,
57279,
8071,
445,
1949,
497,
42166,
915,
568,
5598,
19814,
895,
11,
882,
71482,
9,
16,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSet(t *testing.T) {
w := httptest.NewRecorder()
recordRequest := NewResponseRecorder(w)
reader := strings.NewReader(`{"username": "dennis"}`)
request, err := http.NewRequest("POST", "http://localhost", reader)
if err != nil {
t.Fatalf("Request Formation Failed: %s\n", err.Error())
}
repl := NewReplac... | explode_data.jsonl/29032 | {
"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,
1649,
1155,
353,
8840,
836,
8,
341,
6692,
1669,
54320,
70334,
7121,
47023,
741,
71952,
1900,
1669,
1532,
2582,
47023,
3622,
340,
61477,
1669,
9069,
68587,
5809,
4913,
5113,
788,
330,
67,
16156,
1,
5541,
692,
23555,
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... | 6 |
func TestGenerateModel_WithCustomTag(t *testing.T) {
specDoc, err := loads.Spec("../fixtures/codegen/todolist.models.yml")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
k := "WithCustomTag"
schema := definitions[k]
opts := opts()
genModel, err := makeGenDefinition(k, "models", schema, specDo... | explode_data.jsonl/2504 | {
"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,
31115,
1712,
62,
2354,
10268,
5668,
1155,
353,
8840,
836,
8,
341,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
46928,
4370,
5523,
347,
34675,
8235,
33936,
1138,
17957,
35699,
1155,
11,
1848,
692,
7452,
4054,
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 TestListRecipientTransferSchedules(t *testing.T) {
client := testutil.NewFixedClient(t)
var schds omise.ScheduleList
client.MustDo(&schds, &ListRecipientTransferSchedules{
RecipientID: "recp_test_50894vc13y8z4v51iuc",
})
r.Len(t, schds.Data, 1)
r.Equal(t, "schd_57zhl296uxc7yiun6xx", schds.Data[0].ID)
r.... | explode_data.jsonl/19942 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 178
} | [
2830,
3393,
852,
74432,
21970,
50,
49613,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
1273,
1314,
7121,
13520,
2959,
1155,
340,
2405,
5699,
5356,
7861,
1064,
87081,
852,
198,
25291,
50463,
5404,
2099,
21062,
5356,
11,
609,
852,
74432,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestProjectDownloadChunk_overdriveStatus(t *testing.T) {
t.Parallel()
now := time.Now()
pcws := new(projectChunkWorkerSet)
pcws.staticErasureCoder = modules.NewRSCodeDefault()
pdc := new(projectDownloadChunk)
pdc.workerSet = pcws
pdc.availablePieces = [][]*pieceDownload{
{
{expectedCompleteTime: now... | explode_data.jsonl/32996 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 555
} | [
2830,
3393,
7849,
11377,
28304,
15431,
31967,
2522,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
80922,
1669,
882,
13244,
2822,
82013,
8915,
1669,
501,
21168,
28304,
21936,
1649,
340,
82013,
8915,
26181,
19462,
3970,
35290,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientCertificateCredential_GetTokenInvalidCredentials(t *testing.T) {
srv, close := mock.NewTLSServer()
defer close()
srv.SetResponse(mock.WithStatusCode(http.StatusUnauthorized))
options := ClientCertificateCredentialOptions{}
options.AuthorityHost = srv.URL()
options.HTTPClient = srv
cred, err := New... | explode_data.jsonl/26258 | {
"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,
2959,
33202,
48265,
13614,
3323,
7928,
27025,
1155,
353,
8840,
836,
8,
341,
1903,
10553,
11,
3265,
1669,
7860,
7121,
13470,
1220,
2836,
741,
16867,
3265,
741,
1903,
10553,
4202,
2582,
30389,
26124,
15872,
19886,
10538,
51181,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRestoreRealIP(t *testing.T) {
h := func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(r.RemoteAddr))
}
handler := RestoreRealIP(http.HandlerFunc(h))
rr := httptest.NewRecorder()
r := httptest.NewRequest(http.MethodGet, "/", nil)
r.RemoteAddr = "8.8.8.8"
r.Header.Set("CF-Connecting-IP", "1.... | explode_data.jsonl/44436 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
56284,
12768,
3298,
1155,
353,
8840,
836,
8,
341,
9598,
1669,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6692,
4073,
10556,
3782,
2601,
51434,
13986,
1171,
197,
532,
53326,
1669,
43820,
12768,
3298,
1988... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreate(t *testing.T) {
wantRandom := "i-want-random-data-not-this-special-string"
type args struct {
ctx context.Context
mg resource.Managed
}
type want struct {
mg resource.Managed
cre managed.ExternalCreation
err error
}
cases := map[string]struct {
handler http.Handler
kube client... | explode_data.jsonl/69614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1907
} | [
2830,
3393,
4021,
1155,
353,
8840,
836,
8,
341,
50780,
13999,
1669,
330,
72,
2630,
517,
91675,
13945,
29169,
60191,
92248,
30881,
1837,
13158,
2827,
2036,
341,
197,
20985,
2266,
9328,
198,
197,
2109,
70,
220,
5101,
29902,
3279,
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... | 4 |
func TestListNeverRateLimiter(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
vmListErr := &retry.Error{
RawError: fmt.Errorf("azure cloud provider rate limited(%s) for operation %q", "read", "VMList"),
Retriable: true,
}
armClient := mockarmclient.NewMockInterface(ctrl)
vmClient := get... | explode_data.jsonl/16692 | {
"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,
852,
26155,
11564,
43,
17700,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
54879,
852,
7747,
1669,
609,
44848,
6141,
515,
197,
11143,
672,
1454,
25,
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 TestFindListenerByName(t *testing.T) {
setup()
defer tearDown()
addrStr := "127.0.0.1:8083"
name := "listener4"
cfg := baseListenerConfig(addrStr, name)
if ln := GetListenerAdapterInstance().FindListenerByName(testServerName, name); ln != nil {
t.Fatal("find listener name failed, expected not found")
}
... | explode_data.jsonl/9409 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 204
} | [
2830,
3393,
9885,
2743,
16898,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
32825,
2822,
53183,
2580,
1669,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
23,
15,
23,
18,
698,
11609,
1669,
330,
35039,
19,
698,
50286,
1669,
2331,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseURL(t *testing.T) {
src := `http://username:password@hostname:9090/path?arg=value#anchor`
expect := map[string]string{
"scheme": "http",
"host": "hostname",
"port": "9090",
"user": "username",
"pass": "password",
"path": "/path",
"query": "arg=value",
"fragment":... | explode_data.jsonl/52551 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 405
} | [
2830,
3393,
14463,
3144,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
1565,
1254,
1110,
5113,
25,
3833,
31,
27806,
25,
24,
15,
24,
15,
50976,
30,
858,
46538,
2,
17109,
3989,
24952,
1669,
2415,
14032,
30953,
515,
197,
197,
40787,
8058,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLiveUpdateLocalContainerFallBackOn(t *testing.T) {
f := newBDFixture(t, k8s.EnvDockerDesktop, container.RuntimeDocker)
defer f.TearDown()
lu := assembleLiveUpdate(SanchoSyncSteps(f), SanchoRunSteps, true, []string{"a.txt"}, f)
tCase := testCase{
manifest: manifestbuilder.New(f, "sancho").
WithK8sYAML... | explode_data.jsonl/35174 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 376
} | [
2830,
3393,
20324,
4289,
7319,
4502,
49772,
3707,
1925,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
33,
5262,
12735,
1155,
11,
595,
23,
82,
81214,
35,
13659,
23597,
11,
5476,
16706,
35,
13659,
340,
16867,
282,
836,
682,
4454,
2822,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOptionalTokensToBeTokens(t *testing.T) {
var tok *token.Token
Implements(t, tok, &Optional{})
var forward *token.ForwardToken
Implements(t, forward, &Optional{})
} | explode_data.jsonl/53289 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
15309,
29300,
1249,
3430,
29300,
1155,
353,
8840,
836,
8,
341,
2405,
9628,
353,
5839,
32277,
271,
197,
1427,
4674,
1155,
11,
9628,
11,
609,
15309,
6257,
692,
2405,
4637,
353,
5839,
26676,
1606,
3323,
271,
197,
1427,
4674,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestColumnPruning(t *testing.T) {
var (
input []string
output []map[int][]string
)
planSuiteUnexportedData.GetTestCases(t, &input, &output)
s := createPlannerSuite()
ctx := context.Background()
for i, tt := range input {
comment := fmt.Sprintf("case:%v sql:\"%s\"", i, tt)
stmt, err := s.p.ParseOneS... | explode_data.jsonl/50215 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 304
} | [
2830,
3393,
2933,
3533,
37202,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
22427,
220,
3056,
917,
198,
197,
21170,
3056,
2186,
18640,
45725,
917,
198,
197,
340,
197,
10393,
28000,
1806,
1533,
291,
1043,
2234,
2271,
37302,
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 |
func TestSelectFilter(t *testing.T) {
if testing.Short() {
t.Skip()
}
engine.se.Reload(context.Background())
execStatements(t, []string{
"create table t1(id1 int, id2 int, val varbinary(128), primary key(id1))",
})
defer execStatements(t, []string{
"drop table t1",
})
engine.se.Reload(context.Background(... | explode_data.jsonl/10414 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 506
} | [
2830,
3393,
3379,
5632,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
532,
80118,
4523,
38939,
2731,
5378,
19047,
12367,
67328,
93122,
1155,
11,
3056,
917,
515,
197,
197,
1,
3182,
1965,
259,
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 TestGettingAuthToken(t *testing.T) {
if !h.ConfigExists(cnfgPath) {
t.Skip("No auth config provided")
}
err := h.CheckAuth(
&AuthCnfg{},
cnfgPath,
[]string{"SiteURL"},
)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/31318 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
28655,
84708,
1155,
353,
8840,
836,
8,
341,
743,
753,
71,
10753,
15575,
92456,
4817,
1820,
8,
341,
197,
3244,
57776,
445,
2753,
4166,
2193,
3897,
1138,
197,
532,
9859,
1669,
305,
10600,
5087,
1006,
197,
197,
5,
5087,
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... | 3 |
func TestNoServiceNaming(t *testing.T) {
testutils.WithTestServer(t, nil, func(t testing.TB, ts *testutils.TestServer) {
ctx, cancel := NewContext(time.Second)
defer cancel()
_, _, _, err := raw.Call(ctx, ts.Server(), ts.HostPort(), "", "Echo", []byte("Headers"), []byte("Body"))
assert.Equal(t, ErrNoServiceNa... | explode_data.jsonl/78183 | {
"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,
2753,
1860,
85410,
1155,
353,
8840,
836,
8,
341,
18185,
6031,
26124,
2271,
5475,
1155,
11,
2092,
11,
2915,
1155,
7497,
836,
33,
11,
10591,
353,
1944,
6031,
8787,
5475,
8,
341,
197,
20985,
11,
9121,
1669,
1532,
1972,
9730,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTopLevelAwaitIIFE(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
await foo;
for await (foo of bar) ;
`,
},
entryPaths: []string{"/entry.js"},
options: config.Options{
Mode: config.ModeBundle,
OutputFormat: config.FormatIIF... | explode_data.jsonl/38566 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
5366,
4449,
37352,
40,
39677,
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,
34436,
15229,
280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransportAutomaticHTTP2_DialerAndTLSConfigSupportsHTTP2AndTLSConfig(t *testing.T) {
testTransportAutoHTTP(t, &Transport{
ForceAttemptHTTP2: true,
TLSClientConfig: new(tls.Config),
}, true)
} | explode_data.jsonl/14144 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
27560,
62790,
9230,
17,
1557,
530,
261,
3036,
45439,
2648,
7916,
82,
9230,
17,
3036,
45439,
2648,
1155,
353,
8840,
836,
8,
341,
18185,
27560,
13253,
9230,
1155,
11,
609,
27560,
515,
197,
197,
18573,
47052,
9230,
17,
25,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFSRecoverWithoutIndexFiles(t *testing.T) {
cleanupFSDatastore(t)
defer cleanupFSDatastore(t)
fs := createDefaultFileStore(t)
defer fs.Close()
limits := testDefaultStoreLimits
limits.MaxMsgs = 8
if err := fs.SetLimits(&limits); err != nil {
t.Fatalf("Unexpected error setting limits: %v", err)
}
to... | explode_data.jsonl/7764 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 530
} | [
2830,
3393,
8485,
693,
3688,
26040,
1552,
10809,
1155,
353,
8840,
836,
8,
341,
1444,
60639,
8485,
1043,
4314,
1155,
340,
16867,
21290,
8485,
1043,
4314,
1155,
692,
53584,
1669,
1855,
3675,
1703,
6093,
1155,
340,
16867,
8619,
10421,
2822,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestDeleteHost(t *testing.T) {
RegisterMockDriver(t)
api := tests.NewMockAPI(t)
if _, err := createHost(api, defaultMachineConfig); err != nil {
t.Errorf("createHost failed: %v", err)
}
if err := DeleteHost(api); err != nil {
t.Fatalf("Unexpected error deleting host: %v", err)
}
} | explode_data.jsonl/4187 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
6435,
9296,
1155,
353,
8840,
836,
8,
341,
79096,
11571,
11349,
1155,
340,
54299,
1669,
7032,
7121,
11571,
7082,
1155,
340,
743,
8358,
1848,
1669,
1855,
9296,
24827,
11,
1638,
21605,
2648,
1215,
1848,
961,
2092,
341,
197,
324... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultipleOfferAnswer(t *testing.T) {
firstPeerConn, err := NewPeerConnection(Configuration{})
if err != nil {
t.Errorf("New PeerConnection: got error: %v", err)
}
if _, err = firstPeerConn.CreateOffer(nil); err != nil {
t.Errorf("First Offer: got error: %v", err)
}
if _, err = firstPeerConn.CreateOff... | explode_data.jsonl/8649 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 331
} | [
2830,
3393,
32089,
39462,
16141,
1155,
353,
8840,
836,
8,
341,
42190,
30888,
9701,
11,
1848,
1669,
1532,
30888,
4526,
45443,
37790,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
3564,
45147,
4526,
25,
2684,
1465,
25,
1018,
85,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNetIPCollect(t *testing.T) {
t.Log("Testing Collect")
zerolog.SetGlobalLevel(zerolog.Disabled)
c, err := NewNetIPCollector("")
if err != nil {
t.Fatalf("expected NO error, got (%s)", err)
}
if err := c.Collect(context.Background()); err != nil {
t.Fatalf("expected NO error, got (%s)", err)
}
me... | explode_data.jsonl/36365 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
6954,
3298,
47504,
1155,
353,
8840,
836,
8,
341,
3244,
5247,
445,
16451,
20513,
5130,
197,
7070,
1609,
4202,
11646,
4449,
7,
7070,
1609,
89576,
692,
1444,
11,
1848,
1669,
1532,
6954,
3298,
53694,
31764,
743,
1848,
961,
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... | 5 |
func TestInfoServerNameIsSettable(t *testing.T) {
opts := DefaultOptions()
opts.Port = 4222
opts.ClientAdvertise = "nats.example.com"
opts.ServerName = "test_server_name"
s := New(opts)
defer s.Shutdown()
if s.info.Name != "test_server_name" {
t.Fatalf("server info hostname is incorrect, got: '%v' expected: '... | explode_data.jsonl/3603 | {
"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,
1731,
5475,
675,
3872,
1649,
2005,
1155,
353,
8840,
836,
8,
341,
64734,
1669,
7899,
3798,
741,
64734,
43013,
284,
220,
19,
17,
17,
17,
198,
64734,
11716,
2589,
67787,
284,
330,
77,
1862,
7724,
905,
698,
64734,
22997,
675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDefaultRequestPrefix(t *testing.T) {
t.Parallel()
var idGen = &request.ID{}
finalCH := mw.ChainFunc(func(w http.ResponseWriter, r *http.Request) {
id := w.Header().Get(request.HeaderIDKeyName)
assert.Contains(t, id, "/")
}, idGen.With())
const regex = ".+/[A-Za-z0-9]+-[0-9]+"
matchr := regexp.Must... | explode_data.jsonl/39365 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 339
} | [
2830,
3393,
3675,
1900,
14335,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
2405,
877,
9967,
284,
609,
2035,
9910,
31483,
14213,
2149,
1669,
52810,
98269,
9626,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGitGetter_GetFile(t *testing.T) {
if !testHasGit {
t.Log("git not found, skipping")
t.Skip()
}
g := new(GitGetter)
dst := tempFile(t)
repo := testGitRepo(t, "file")
repo.commitFile("file.txt", "hello")
// Download the file
repo.url.Path = filepath.Join(repo.url.Path, "file.txt")
if err := g.Get... | explode_data.jsonl/39697 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 230
} | [
2830,
3393,
46562,
31485,
13614,
1703,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResourcePermissionsDelete(t *testing.T) {
d, err := qa.ResourceFixture{
Fixtures: []qa.HTTPFixture{
{
Method: http.MethodGet,
Resource: "/api/2.0/permissions/clusters/abc",
Response: ObjectACL{
ObjectID: "/clusters/abc",
ObjectType: "clusters",
AccessControlList: []AccessCo... | explode_data.jsonl/50873 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 542
} | [
2830,
3393,
4783,
23851,
6435,
1155,
353,
8840,
836,
8,
341,
2698,
11,
1848,
1669,
88496,
20766,
18930,
515,
197,
12727,
941,
18513,
25,
3056,
15445,
27358,
18930,
515,
298,
197,
515,
571,
84589,
25,
256,
1758,
20798,
1949,
345,
571,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_CLG_Input_KnownInputSequence(t *testing.T) {
newCLG := MustNew()
newCtx := context.MustNew()
newStorageCollection := testMustNewStorageCollection(t)
// Create record for the test input.
informationID := "123"
newInput := "test input"
informationIDKey := fmt.Sprintf("information-sequence:%s:information... | explode_data.jsonl/52849 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 309
} | [
2830,
3393,
6843,
38,
48653,
10102,
4169,
2505,
14076,
1155,
353,
8840,
836,
8,
341,
8638,
3140,
38,
1669,
15465,
3564,
741,
8638,
23684,
1669,
2266,
50463,
3564,
741,
8638,
5793,
6482,
1669,
1273,
31776,
3564,
5793,
6482,
1155,
692,
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 TestRadarSearchMissingKeywordNameAndType(t *testing.T) {
c, _ := NewClient(WithAPIKey(apiKey))
r := &RadarSearchRequest{
Location: &LatLng{1, 2},
Radius: 1000,
}
_, err := c.RadarSearch(context.Background(), r)
if err == nil {
t.Errorf("Error expected: maps: Keyword, Name and Type are missing")
}
... | explode_data.jsonl/76307 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 167
} | [
2830,
3393,
49,
36080,
5890,
25080,
34481,
675,
3036,
929,
1155,
353,
8840,
836,
8,
341,
1444,
11,
716,
1669,
1532,
2959,
7,
2354,
7082,
1592,
24827,
1592,
1171,
7000,
1669,
609,
49,
36080,
5890,
1900,
515,
197,
197,
4707,
25,
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... | 3 |
func Test_WorkspaceFeatures_Status_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
t.Parallel()
parameters := gopter.DefaultTestParameters()
parameters.MaxSize = 10
properties := gopter.NewProperties(parameters)
properties.Property(
"Round trip from WorkspaceFeatures_Status to WorkspaceFeatures_Sta... | explode_data.jsonl/43372 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
87471,
8746,
21336,
36449,
62,
4498,
7903,
61941,
2568,
795,
21884,
1690,
26040,
39838,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
67543,
1669,
728,
73137,
13275,
2271,
9706,
741,
67543,
14535,
1695,
284,
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... | 1 |
func TestRecover_sendRecoverEmail(t *testing.T) {
t.Parallel()
r, _, _ := testSetup()
mailer := mocks.NewMockMailer()
r.EmailSubjectPrefix = "foo "
r.RootURL = "bar"
r.Mailer = mailer
r.sendRecoverEmail(r.NewContext(), "a@b.c", "abc=")
if len(mailer.Last.To) != 1 {
t.Error("Expected 1 to email")
}
if mai... | explode_data.jsonl/61500 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 333
} | [
2830,
3393,
693,
3688,
13565,
693,
3688,
4781,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
7000,
11,
8358,
716,
1669,
1273,
21821,
2822,
2109,
38782,
1669,
68909,
7121,
11571,
47608,
741,
7000,
24066,
13019,
14335,
284,
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... | 6 |
func Test_Router_DomainControllerRest(t *testing.T) {
p := ports.PopRand()
s := g.Server(p)
d := s.Domain("localhost, local")
d.BindControllerRest("/", new(DomainControllerRest))
s.SetPort(p)
s.SetDumpRouteMap(false)
s.Start()
defer s.Shutdown()
// 等待启动完成
time.Sleep(time.Second)
gtest.Case(t, func() {
cli... | explode_data.jsonl/24933 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 955
} | [
2830,
3393,
2568,
2676,
1557,
3121,
2051,
12416,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
20325,
47424,
56124,
741,
1903,
1669,
342,
22997,
1295,
340,
2698,
1669,
274,
20442,
445,
8301,
11,
2205,
1138,
2698,
32451,
2051,
12416,
35460,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAWSGetSecretPreviousVersion(t *testing.T) {
mockAwsSecretManager := &mockAWSSecretManagerClient{
secretData: &secretsmanager.GetSecretValueOutput{
SecretString: aws.String("test-secret"),
VersionStages: []*string{aws.String("AWSPREVIOUS")},
},
}
secretValueInput := &secretsmanager.GetSecretValueI... | explode_data.jsonl/74986 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 232
} | [
2830,
3393,
36136,
1949,
19773,
21291,
5637,
1155,
353,
8840,
836,
8,
341,
77333,
47359,
19773,
2043,
1669,
609,
16712,
14419,
1220,
50856,
2043,
2959,
515,
197,
197,
20474,
1043,
25,
609,
325,
52710,
13297,
2234,
19773,
1130,
5097,
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... | 2 |
func TestRenderTemplate(t *testing.T) {
slb := NewSLB(&SLBOpts{NgxCfg: "fixture/nginx.conf", SvcCfg: "fixture/svc.yaml"})
slb.readConf()
text := slb.getNginxConf() + defaultTmpl
tmpl, err := template.New("ngxConf").Parse(text)
if err != nil {
logrus.Fatalf("new template error: %+v", err)
}
var buf bytes.Buff... | explode_data.jsonl/16639 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 220
} | [
2830,
3393,
6750,
7275,
1155,
353,
8840,
836,
8,
341,
1903,
21123,
1669,
1532,
7984,
33,
2099,
7984,
4677,
12754,
90,
20897,
12125,
4817,
25,
330,
59612,
69261,
13937,
497,
328,
7362,
42467,
25,
330,
59612,
2687,
7362,
33406,
23625,
190... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMyPoGo_GetStringLength(t *testing.T) {
dataContext := ast.NewDataContext()
pogo := &MyPoGo{}
err := dataContext.Add("Pogo", pogo)
if err != nil {
t.Fatal(err)
}
lib := ast.NewKnowledgeLibrary()
ruleBuilder := builder.NewRuleBuilder(lib)
err = ruleBuilder.BuildRuleFromResource("Test", "0.1.1", pkg.Ne... | explode_data.jsonl/81840 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 230
} | [
2830,
3393,
5050,
32904,
10850,
13614,
44421,
1155,
353,
8840,
836,
8,
341,
8924,
1972,
1669,
11763,
7121,
81137,
741,
3223,
23500,
1669,
609,
5050,
32904,
10850,
16094,
9859,
1669,
821,
1972,
1904,
445,
47,
23500,
497,
281,
23500,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestVindexHexTypes(t *testing.T) {
defer cluster.PanicHandler(t)
ctx := context.Background()
conn, err := mysql.Connect(ctx, &vtParams)
require.Nil(t, err)
defer conn.Close()
utils.Exec(t, conn, "INSERT INTO thex (id, field) VALUES "+
"(0x01,1), "+
"(x'a5',2), "+
"(0x48656c6c6f20476f7068657221,3), "+
... | explode_data.jsonl/4243 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 340
} | [
2830,
3393,
53,
1252,
20335,
4173,
1155,
353,
8840,
836,
8,
341,
16867,
10652,
1069,
31270,
3050,
1155,
340,
20985,
1669,
2266,
19047,
741,
32917,
11,
1848,
1669,
10564,
43851,
7502,
11,
609,
9708,
4870,
340,
17957,
59678,
1155,
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 TestSafeTransferFromParameters(t *testing.T) {
// succeeds no data param
opts := &SafeTransferOptions{
Sender: senderT,
Recipient: recipientT,
TokenID: tokenIDT,
}
params, err := SafeTransferFromParameters(opts)
assert.NoError(t, err)
assert.Equal(t, "0x42842e0e000000000000000000000000000000000000... | explode_data.jsonl/58638 | {
"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,
25663,
21970,
3830,
9706,
1155,
353,
8840,
836,
8,
341,
197,
322,
50081,
902,
821,
1685,
198,
64734,
1669,
609,
25663,
21970,
3798,
515,
197,
7568,
1659,
25,
262,
4646,
51,
345,
197,
197,
74432,
25,
21713,
51,
345,
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 TestEntry_CursorColumn_Wrap(t *testing.T) {
entry := widget.NewMultiLineEntry()
entry.SetText("a\nb")
assert.Equal(t, 0, entry.CursorRow)
assert.Equal(t, 0, entry.CursorColumn)
// go to end of line
right := &fyne.KeyEvent{Name: fyne.KeyRight}
entry.TypedKey(right)
assert.Equal(t, 0, entry.CursorRow)
asse... | explode_data.jsonl/12316 | {
"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,
5874,
920,
3823,
2933,
2763,
4611,
1155,
353,
8840,
836,
8,
341,
48344,
1669,
9086,
7121,
20358,
2460,
5874,
741,
48344,
92259,
445,
64,
1699,
65,
1138,
6948,
12808,
1155,
11,
220,
15,
11,
4343,
29929,
3102,
340,
6948,
128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFrameToSeriesSlice(t *testing.T) {
tests := []struct {
name string
frame *data.Frame
seriesSlice legacydata.DataTimeSeriesSlice
Err require.ErrorAssertionFunc
}{
{
name: "a wide series",
frame: data.NewFrame("",
data.NewField("Time", nil, []time.Time{
time.Date(2... | explode_data.jsonl/32631 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1724
} | [
2830,
3393,
4369,
1249,
25544,
33236,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
34465,
981,
353,
691,
36434,
198,
197,
197,
19880,
33236,
19588,
691,
3336,
1462,
25544,
33236,
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... | 2 |
func TestGocloak_ListAddRemoveDefaultClientScopes(t *testing.T) {
t.Parallel()
cfg := GetConfig(t)
client := NewClientWithDebug(t)
token := GetAdminToken(t, client)
defer ClearRealmCache(t, client)
scope := ClientScope{
Protocol: "openid-connect",
ClientScopeAttributes: &ClientScopeAttributes{
IncludeInTo... | explode_data.jsonl/79526 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 570
} | [
2830,
3393,
38,
509,
385,
585,
27104,
2212,
13021,
3675,
2959,
3326,
18523,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50286,
1669,
2126,
2648,
1155,
340,
25291,
1669,
1532,
2959,
2354,
7939,
1155,
340,
43947,
1669,
2126,
721... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResourcesGroupInfo(t *testing.T) {
testCases := []struct {
discoveryErr error
resourceErr error
resourcesLists []*metav1.APIResourceList
expectedGroupCount int
expectedErr error
}{
{
discoveryErr: sgerrors.ErrNotFound,
expectedErr: sgerrors.ErrNotFound,
},
{
... | explode_data.jsonl/2002 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 718
} | [
2830,
3393,
11277,
2808,
1731,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
34597,
7449,
7747,
981,
1465,
198,
197,
50346,
7747,
286,
1465,
198,
197,
10202,
2360,
37848,
257,
29838,
4059,
402,
16,
24922,
4783,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue103(t *testing.T) {
d, err := NewDocumentFromReader(strings.NewReader("<html><title>Scientists Stored These Images in DNA—Then Flawlessly Retrieved Them</title></html>"))
if err != nil {
t.Error(err)
}
text := d.Find("title").Text()
for i, r := range text {
t.Logf("%d: %d - %q\n", i, r, string(r)... | explode_data.jsonl/56750 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
42006,
16,
15,
18,
1155,
353,
8840,
836,
8,
341,
2698,
11,
1848,
1669,
1532,
7524,
3830,
5062,
51442,
68587,
9639,
1551,
1784,
2102,
29,
71226,
93785,
4220,
11779,
304,
15552,
2293,
12209,
2988,
672,
15740,
57791,
47938,
522... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewImage(t *testing.T) {
buf := strings.NewReader(strings.Repeat("0", MaxImageFileSize+1))
_, err := NewImage(buf)
assert.ErrorIs(t, err, ErrImageTooLarge)
} | explode_data.jsonl/57566 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
3564,
1906,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
9069,
68587,
51442,
2817,
10979,
445,
15,
497,
7487,
1906,
67649,
10,
16,
1171,
197,
6878,
1848,
1669,
1532,
1906,
10731,
692,
6948,
6141,
3872,
1155,
11,
1848,
11,
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 |
func TestStreamAbort(t *testing.T) {
// Scenarios: node 1 is connected to node 2 in 2 channels,
// and the consumer of the communication calls receive.
// The two sub-scenarios happen:
// 1) The server certificate of node 2 changes in the first channel
// 2) Node 2 is evicted from the membership of the first chann... | explode_data.jsonl/39834 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 454
} | [
2830,
3393,
3027,
85891,
1155,
353,
8840,
836,
8,
341,
197,
322,
2463,
60494,
25,
2436,
220,
16,
374,
8433,
311,
2436,
220,
17,
304,
220,
17,
11744,
345,
197,
322,
323,
279,
11502,
315,
279,
10535,
6738,
5258,
624,
197,
322,
576,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProcesses_EnforceTTL(t *testing.T) {
p := &processes{maxLen: 10}
cfg, repo, _ := testcfg.BuildWithRepo(t)
cutoff := time.Now()
key0 := mustCreateKey(t, "0", repo)
value0, cancel := mustCreateCacheable(t, cfg, repo)
p.Add(key0, value0, cutoff.Add(-time.Hour), cancel)
key1 := mustCreateKey(t, "1", rep... | explode_data.jsonl/81952 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 489
} | [
2830,
3393,
92727,
62,
1702,
8833,
51,
13470,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
609,
4630,
288,
90,
2810,
11271,
25,
220,
16,
15,
630,
50286,
11,
15867,
11,
716,
1669,
1273,
14072,
25212,
2354,
25243,
1155,
692,
1444,
27440,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewSource(t *testing.T) {
if tr := os.Getenv("TRAVIS"); len(tr) > 0 {
return
}
conf := config.NewConfig()
conf.Load(NewSource())
if mongodbHost := conf.Get("mongodb", "host").String("localhost"); mongodbHost != "127.0.0.1" {
t.Errorf("expected %v and got %v", "127.0.0.1", mongodbHost)
}
if confi... | explode_data.jsonl/18357 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
3564,
3608,
1155,
353,
8840,
836,
8,
341,
743,
489,
1669,
2643,
64883,
445,
2378,
98716,
5038,
2422,
7624,
8,
861,
220,
15,
341,
197,
853,
198,
197,
630,
67850,
1669,
2193,
7121,
2648,
2822,
67850,
13969,
35063,
3608,
1236... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteSubteamAdmin(t *testing.T) {
tc, owner, admin, _, root, sub := memberSetupSubteam(t)
defer tc.Cleanup()
assertRole(tc, root, owner.Username, keybase1.TeamRole_OWNER)
assertRole(tc, root, admin.Username, keybase1.TeamRole_ADMIN)
_, err := AddMember(context.TODO(), tc.G, sub, admin.Username, keybase... | explode_data.jsonl/26469 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 467
} | [
2830,
3393,
6435,
3136,
9196,
7210,
1155,
353,
8840,
836,
8,
341,
78255,
11,
6372,
11,
3986,
11,
8358,
3704,
11,
1186,
1669,
4462,
21821,
3136,
9196,
1155,
340,
16867,
17130,
727,
60639,
2822,
6948,
9030,
44415,
11,
3704,
11,
6372,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestBuildInfoLabels(t *testing.T) {
type args struct {
obj *metav1.ObjectMeta
}
tests := []struct {
name string
args args
want []string
want1 []string
}{
{
name: "empty labels map",
args: args{
obj: &metav1.ObjectMeta{
Labels: nil,
},
},
want: []string{},
want1: []st... | explode_data.jsonl/47256 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 474
} | [
2830,
3393,
11066,
1731,
23674,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
22671,
353,
4059,
402,
16,
80222,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
31215,
220,
2827,
198,
197,
5078... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWordCountWithIsCJKLanguageFalse(t *testing.T) {
t.Parallel()
settings := map[string]interface{}{
"hasCJKLanguage": true,
}
assertFunc := func(t *testing.T, ext string, pages page.Pages) {
p := pages[0]
if p.WordCount() != 75 {
t.Fatalf("[%s] incorrect word count for content '%s'. expected %v, got... | explode_data.jsonl/60625 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
10879,
2507,
2354,
3872,
89349,
13806,
4049,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
62930,
1669,
2415,
14032,
31344,
67066,
197,
197,
1,
4648,
89349,
13806,
788,
830,
345,
197,
630,
6948,
9626,
1669,
2915,
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... | 3 |
func TestNewSignalsForwarderWaitWindows(t *testing.T) {
t.Parallel()
expectedWait := 5
terragruntOptions := options.NewTerragruntOptionsForTest("")
cmd := exec.Command(`..\testdata\test_sigint_wait.bat`, strconv.Itoa(expectedWait))
cmdChannel := make(chan error)
runChannel := make(chan error)
signalChannel :... | explode_data.jsonl/5180 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 383
} | [
2830,
3393,
3564,
96659,
25925,
261,
14190,
13164,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
42400,
14190,
1669,
220,
20,
271,
197,
465,
4101,
81,
3850,
3798,
1669,
2606,
7121,
51402,
68305,
3850,
3798,
2461,
2271,
31764,
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 TestIndexEditorUniqueMultipleNil(t *testing.T) {
format := types.Format_Default
db, err := dbfactory.MemFactory{}.CreateDB(context.Background(), format, nil, nil)
require.NoError(t, err)
colColl := schema.NewColCollection(
schema.NewColumn("pk", 0, types.IntKind, true),
schema.NewColumn("v1", 1, types.IntK... | explode_data.jsonl/27207 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 632
} | [
2830,
3393,
1552,
9410,
22811,
32089,
19064,
1155,
353,
8840,
836,
8,
341,
59416,
1669,
4494,
9978,
60336,
198,
20939,
11,
1848,
1669,
2927,
21618,
1321,
336,
4153,
46391,
4021,
3506,
5378,
19047,
1507,
3561,
11,
2092,
11,
2092,
340,
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 TestSBKeyTypeUnmarshalJSON(t *testing.T) {
var kt sbKeyType
testInvalidJSONInput(t, &kt)
// Valid values.
for _, v := range []sbKeyType{
SBKeyTypeGPGKeys,
SBKeyTypeSignedByGPGKeys,
SBKeyTypeX509Certificates,
SBKeyTypeSignedByX509CAs,
} {
kt = sbKeyType("")
err := json.Unmarshal([]byte(`"`+string... | explode_data.jsonl/36507 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 260
} | [
2830,
3393,
16680,
97964,
1806,
27121,
5370,
1155,
353,
8840,
836,
8,
341,
2405,
18541,
7898,
97964,
271,
18185,
7928,
5370,
2505,
1155,
11,
609,
5840,
692,
197,
322,
7818,
2750,
624,
2023,
8358,
348,
1669,
2088,
3056,
16892,
97964,
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... | 2 |
func TestStream_GetPriority(t *testing.T) {
t.Run("test", func(t *testing.T) {
assert := base.NewAssert(t)
for i := 0; i < 1000; i++ {
v := NewStream()
priority := uint8(rand.Uint32())
v.SetPriority(priority)
assert(v.GetPriority()).Equals(priority)
v.Release()
}
})
} | explode_data.jsonl/21163 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
3027,
13614,
20555,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6948,
1669,
2331,
7121,
8534,
1155,
340,
197,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestValidEnvironment(t *testing.T) {
config, err := loadYAML(`
version: "3"
services:
dict-env:
image: busybox
environment:
FOO: "1"
BAR: 2
BAZ: 2.5
QUUX:
list-env:
image: busybox
environment:
- FOO=1
- BAR=2
- BAZ=2.5
- QUUX=
`)
assert.NoError(... | explode_data.jsonl/16388 | {
"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,
4088,
12723,
1155,
353,
8840,
836,
8,
341,
25873,
11,
1848,
1669,
2795,
56,
31102,
61528,
4366,
25,
330,
18,
698,
12779,
510,
220,
6451,
67462,
510,
262,
2168,
25,
13028,
2011,
198,
262,
4573,
510,
414,
434,
19499,
25,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDutchNationalFlagWithoutPivot(t *testing.T) {
colors := []Color{
Blue,
Red,
Red,
Blue,
White,
Red,
White,
}
DutchNationalFlagWithoutPivot(colors)
expected := []Color{
Red,
Red,
Red,
White,
White,
Blue,
Blue,
}
for i, e := range colors {
assert.Equal(t, expected[i], e)
}
... | explode_data.jsonl/12219 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
35,
14061,
30812,
12135,
26040,
47,
16084,
1155,
353,
8840,
836,
8,
341,
21481,
82,
1669,
3056,
1636,
515,
197,
197,
10331,
345,
197,
197,
6033,
345,
197,
197,
6033,
345,
197,
197,
10331,
345,
197,
197,
14075,
345,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDuplicateGlobal(t *testing.T) {
if globalV4 == nil {
t.Skip("no globalV4 addresses configured")
return
}
var trA Transport
var trB Transport
listenerA, err := trA.Listen(globalV4)
if err != nil {
t.Fatal(err)
}
defer listenerA.Close()
listenerB1, err := trB.Listen(globalV4)
if err != nil {
... | explode_data.jsonl/3803 | {
"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,
53979,
11646,
1155,
353,
8840,
836,
8,
341,
743,
3644,
53,
19,
621,
2092,
341,
197,
3244,
57776,
445,
2152,
3644,
53,
19,
14230,
19755,
1138,
197,
853,
198,
197,
630,
2405,
489,
32,
16742,
198,
2405,
489,
33,
16742,
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... | 6 |
func TestFeatureSpecForStandAlone(t *testing.T) {
testCases := []struct {
name string
confFile string
featureName Feature
featureEnabled bool
}{
{
name: "Feature is enabled",
confFile: "./testdata/feature_config.yaml",
featureName: Feature("Actor.Reentrancy"),
... | explode_data.jsonl/9033 | {
"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,
13859,
8327,
2461,
48733,
2101,
603,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
67850,
1703,
981,
914,
198,
197,
1166,
15208,
675,
262,
19998,
198,
197,
1166,
15208,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOrderingServiceConnFailure(t *testing.T) {
testOrderingServiceConnFailure(t, blockDelivererConsumerWithRecv)
testOrderingServiceConnFailure(t, blockDelivererConsumerWithSend)
assert.Equal(t, 0, connNumber)
} | explode_data.jsonl/38311 | {
"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,
4431,
287,
1860,
9701,
17507,
1155,
353,
8840,
836,
8,
341,
18185,
4431,
287,
1860,
9701,
17507,
1155,
11,
2504,
16532,
1524,
261,
29968,
2354,
63483,
340,
18185,
4431,
287,
1860,
9701,
17507,
1155,
11,
2504,
16532,
1524,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestValidateSchema(t *testing.T) {
for _, test := range []struct {
name string
format string
fileDecl string
finalOutput *transform.Decl
err string
}{
{
name: "format not supported",
format: "mp3",
fileDecl: "",
finalOutput: nil,
err: "sche... | explode_data.jsonl/47478 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1700
} | [
2830,
3393,
17926,
8632,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
59416,
414,
914,
198,
197,
17661,
21629,
262,
914,
198,
197,
14213,
5097,
353,
4701,
8934,
564,
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... | 2 |
func TestFilters_building(t *testing.T) {
filterTest(
t,
`
tables:
buildings:
fields:
- name: id
type: id
- key: building
name: building
type: string
filters:
reject:
building: ["no","none"]
require_regexp:
'addr:housenumber': '^\d+[a-zA-Z,]*$'
... | explode_data.jsonl/25613 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1138
} | [
2830,
3393,
28351,
82397,
1155,
353,
8840,
836,
8,
1476,
50108,
2271,
1006,
197,
3244,
345,
197,
197,
3989,
32110,
510,
220,
13702,
510,
262,
5043,
510,
262,
481,
829,
25,
877,
198,
414,
943,
25,
877,
198,
262,
481,
1376,
25,
4752,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakeLocations(t *testing.T) {
db, mock, err := sqlmock.New()
if err != nil {
t.Fatalf("an error '%s' was not expected when opening a stub database connection", err)
}
defer db.Close()
cdn := "mycdn"
mock.ExpectBegin()
expectedEdgeLocs, expectedRouterLocs := ExpectedMakeLocations()
MockMakeLocations... | explode_data.jsonl/25152 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 400
} | [
2830,
3393,
8078,
43037,
1155,
353,
8840,
836,
8,
341,
20939,
11,
7860,
11,
1848,
1669,
5704,
16712,
7121,
741,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
276,
1465,
7677,
82,
6,
572,
537,
3601,
979,
8568,
264,
13633,
4625,
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... | 6 |
func TestPowN(t *testing.T) {
st := []struct {
name string
x float64
n int
exp float64
}{
{"x=0", 0.0, 123, 0.0},
{"x=1", 1, 1234, 1},
{"n is 2^-31", 2.0, math.MinInt32, 0.0},
{"testcase1", 2.0, 10, 1024.0},
}
for _, tt := range st {
t.Run(tt.name, func(t *testing.T) {
out := powN(tt.x, ... | explode_data.jsonl/44787 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 265
} | [
2830,
3393,
66584,
45,
1155,
353,
8840,
836,
8,
341,
18388,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
10225,
262,
2224,
21,
19,
198,
197,
9038,
262,
526,
198,
197,
48558,
220,
2224,
21,
19,
198,
197,
59403,
197,
197,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestInteg_00_DescribeAgents(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-west-2")
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.DescribeAgentsInput{}
_, err :=... | explode_data.jsonl/39721 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 184
} | [
2830,
3393,
1072,
791,
62,
15,
15,
98054,
3114,
91804,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
24911,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
220,
20,
77053,
32435,
340,
16867,
9121,
24911,
2822,
1903,
433,
1669,
17590,
20674... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestError_ResultString(t *testing.T) {
var herr Error
// happy path: transaction_failed with the appropriate extra fields
herr.Problem.Type = "transaction_failed"
herr.Problem.Extras = make(map[string]interface{})
herr.Problem.Extras["result_xdr"] = "AAAAAAAAAMj/////AAAAAgAAAAAAAAAA/////wAAAAAAAAAAAAAAAAAAAA... | explode_data.jsonl/12139 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 328
} | [
2830,
3393,
1454,
49596,
703,
1155,
353,
8840,
836,
8,
341,
2405,
54739,
4600,
271,
197,
322,
6247,
1815,
25,
7745,
35060,
448,
279,
8311,
4960,
5043,
198,
9598,
615,
7763,
10121,
10184,
284,
330,
13528,
35060,
698,
9598,
615,
7763,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSendMessage(t *testing.T) {
obj := New()
logEvent := logevent.LogEvent{}
err := obj.SendMessage(logEvent)
if err == nil {
t.Error("expected error from SendMessage() but got nil")
}
err = obj.OpenSvc()
if err != nil {
t.Errorf("OpenSvc() returned unexpected error %v", err)
}
defer obj.CloseSvc()
... | explode_data.jsonl/71385 | {
"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,
80863,
1155,
353,
8840,
836,
8,
341,
22671,
1669,
1532,
741,
6725,
1556,
1669,
1487,
3087,
5247,
1556,
31483,
9859,
1669,
2839,
66330,
12531,
1556,
340,
743,
1848,
621,
2092,
341,
197,
3244,
6141,
445,
7325,
1465,
504,
62292... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntArray_Join(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []int{0, 1, 2, 3, 4, 5, 6}
array1 := garray.NewIntArrayFrom(a1)
t.Assert(array1.Join("."), "0.1.2.3.4.5.6")
})
} | explode_data.jsonl/47613 | {
"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,
95338,
10598,
1961,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11323,
16,
1669,
3056,
396,
90,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
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... | 1 |
func TestParam(t *testing.T) {
type Test struct {
String string `r:"ltrim=#$_"`
}
set := New()
set.SetTagName("r")
set.Register("ltrim", func(ctx context.Context, t *Transformer, value reflect.Value, param string) error {
value.SetString(strings.TrimLeft(value.String(), param))
return nil
})
tt := Test{... | explode_data.jsonl/43622 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
2001,
1155,
353,
8840,
836,
8,
1476,
13158,
3393,
2036,
341,
197,
4980,
914,
1565,
81,
2974,
75,
10666,
45131,
6401,
8805,
197,
630,
8196,
1669,
1532,
741,
8196,
4202,
22616,
445,
81,
1138,
8196,
19983,
445,
75,
10666,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCommissionValidate(t *testing.T) {
testCases := []struct {
input types.Commission
expectErr bool
}{
// invalid commission; max rate < 0%
{types.NewCommission(sdk.ZeroDec(), sdk.MustNewDecFromStr("-1.00"), sdk.ZeroDec()), true},
// invalid commission; max rate > 100%
{types.NewCommission(sdk.Z... | explode_data.jsonl/72075 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 479
} | [
2830,
3393,
73750,
17926,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
22427,
257,
4494,
2961,
2728,
198,
197,
24952,
7747,
1807,
198,
197,
59403,
197,
197,
322,
8318,
12123,
26,
1932,
4379,
366,
220,
15,
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... | 2 |
func TestCallBackHandle(t *testing.T) {
nw := nacosWatcher{
nr: &nacosRegistry{},
exit: make(chan bool),
next: make(chan *registry.Result, 10),
services: make(map[string][]*registry.Service),
cacheServices: make(map[string][]model.SubscribeService),
}
//Create action
t.Ru... | explode_data.jsonl/47999 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1133
} | [
2830,
3393,
67273,
6999,
1155,
353,
8840,
836,
8,
341,
9038,
86,
1669,
308,
41647,
47248,
515,
197,
9038,
81,
25,
310,
609,
77,
41647,
15603,
38837,
197,
14519,
25,
688,
1281,
35190,
1807,
1326,
197,
28144,
25,
688,
1281,
35190,
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... | 3 |
func TestServerPreferredResourcesRetries(t *testing.T) {
stable := metav1.APIResourceList{
GroupVersion: "v1",
APIResources: []metav1.APIResource{
{Name: "pods", Namespaced: true, Kind: "Pod"},
},
}
beta := metav1.APIResourceList{
GroupVersion: "extensions/v1",
APIResources: []metav1.APIResource{
{Na... | explode_data.jsonl/19757 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1143
} | [
2830,
3393,
5475,
22482,
11277,
12020,
4019,
1155,
353,
8840,
836,
8,
341,
18388,
480,
1669,
77520,
16,
24922,
4783,
852,
515,
197,
197,
2808,
5637,
25,
330,
85,
16,
756,
197,
197,
7082,
11277,
25,
3056,
4059,
402,
16,
24922,
4783,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJsonMarshalBadAdvertise(t *testing.T) {
s := zktest.New()
z, ch, _ := s.Connect()
b := zkplus.NewBuilder().PathPrefix("/test").Connector(&zkplus.StaticConnector{C: z, Ch: ch})
d1, _ := New(BuilderConnector(b), "TestAdvertise1", &Config{})
e := errors.New("nope")
d1.jsonMarshal = func(v interface{}) ([]b... | explode_data.jsonl/46863 | {
"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,
5014,
55438,
17082,
2589,
67787,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
94528,
1944,
7121,
741,
20832,
11,
521,
11,
716,
1669,
274,
43851,
741,
2233,
1669,
94528,
7138,
7121,
3297,
1005,
1820,
14335,
4283,
1944,
1827,
359... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDiscardStatsMove(t *testing.T) {
dir, err := ioutil.TempDir("", "badger-test")
require.NoError(t, err)
ops := getTestOptions(dir)
ops.ValueLogMaxEntries = 1
db, err := Open(ops)
require.NoError(t, err)
stat := make(map[uint32]int64, ops.ValueThreshold+10)
for i := uint32(0); i < uint32(ops.ValueThresh... | explode_data.jsonl/39104 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 786
} | [
2830,
3393,
23477,
567,
16635,
9860,
1155,
353,
8840,
836,
8,
341,
48532,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
13855,
1389,
16839,
1138,
17957,
35699,
1155,
11,
1848,
340,
197,
3721,
1669,
633,
2271,
3798,
14161,
340,
197,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_JavaScript_Partial(t *testing.T) {
const tmpl = "let a = 1;\n<%= partial(\"part.js\") %>"
const part = "alert('Hi <%= name %>!');"
r := require.New(t)
e := NewEngine()
box := e.TemplatesBox
r.NoError(box.AddString(jsTemplate, tmpl))
r.NoError(box.AddString("_part.js", part))
h := e.JavaScript(jsTe... | explode_data.jsonl/44614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 217
} | [
2830,
3393,
10598,
2907,
5910,
1088,
20894,
1155,
353,
8840,
836,
8,
341,
4777,
79839,
284,
330,
1149,
264,
284,
220,
16,
17882,
77,
27,
35205,
7130,
36014,
4480,
2857,
62705,
1018,
19134,
4777,
949,
284,
330,
5083,
492,
13048,
90194,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultistoreSnapshot_Checksum(t *testing.T) {
// Chunks from different nodes must fit together, so all nodes must produce identical chunks.
// This checksum test makes sure that the byte stream remains identical. If the test fails
// without having changed the data (e.g. because the Protobuf or zlib encoding ... | explode_data.jsonl/44874 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 676
} | [
2830,
3393,
40404,
380,
460,
15009,
28188,
1242,
1155,
353,
8840,
836,
8,
341,
197,
322,
910,
15296,
504,
2155,
7798,
1969,
4946,
3786,
11,
773,
678,
7798,
1969,
8193,
19516,
26757,
624,
197,
322,
1096,
32529,
1273,
3643,
2704,
429,
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 TestRedis_BitOpNot(t *testing.T) {
runOnRedis(t, func(client *Redis) {
err := client.Set("key1", "\u0000")
assert.Nil(t, err)
_, err = NewRedis(client.Addr, "").BitOpNot("destKey", "key1")
assert.NotNil(t, err)
val, err := client.BitOpNot("destKey", "key1")
assert.Nil(t, err)
assert.Equal(t, int64(1... | explode_data.jsonl/39175 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
48137,
1668,
275,
7125,
2623,
1155,
353,
8840,
836,
8,
341,
56742,
1925,
48137,
1155,
11,
2915,
12805,
353,
48137,
8,
341,
197,
9859,
1669,
2943,
4202,
445,
792,
16,
497,
2917,
84,
15,
15,
15,
15,
1138,
197,
6948,
59678,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBaseChunkSeries(t *testing.T) {
type refdSeries struct {
lset labels.Labels
chunks []chunks.Meta
ref uint64
}
cases := []struct {
series []refdSeries
// Postings should be in the sorted order of the the series
postings []uint64
expIdxs []int
}{
{
series: []refdSeries{
{
lse... | explode_data.jsonl/68061 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1112
} | [
2830,
3393,
3978,
28304,
25544,
1155,
353,
8840,
836,
8,
341,
13158,
2053,
67,
25544,
2036,
341,
197,
8810,
746,
256,
9201,
4679,
82,
198,
197,
23049,
15296,
3056,
84263,
58806,
271,
197,
59504,
2622,
21,
19,
198,
197,
630,
1444,
2264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCmd(t *testing.T) {
ctrl := gomock.NewController(assert.Tracing(t))
defer ctrl.Finish()
mockUpdaterFromFlags := rotor.NewMockUpdaterFromFlags(ctrl)
cmd := Cmd(mockUpdaterFromFlags)
cmd.Flags.Parse([]string{})
r := cmd.Runner.(*consulRunner)
assert.SameInstance(t, r.updaterFlags, mockUpdaterFromFlags)... | explode_data.jsonl/71902 | {
"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,
15613,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
75846,
8240,
4527,
1155,
1171,
16867,
23743,
991,
18176,
2822,
77333,
79854,
3830,
9195,
1669,
62025,
7121,
11571,
79854,
3830,
9195,
62100,
692,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHeadTracker_ResubscribeOnSubscriptionError(t *testing.T) {
t.Parallel()
g := gomega.NewGomegaWithT(t)
store, cleanup := cltest.NewStore(t)
defer cleanup()
logger := store.Config.CreateProductionLogger()
ethClient := new(mocks.Client)
sub := new(mocks.Subscription)
store.EthClient = ethClient
chchHe... | explode_data.jsonl/9097 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 555
} | [
2830,
3393,
12346,
31133,
92815,
392,
6273,
1925,
33402,
1454,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
692,
57279,
11,
21290,
1669,
1185,
1944,
7121,
6093,
1155,
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... | 1 |
func TestUnmarshalNestedAnonymousStructs(t *testing.T) {
type Nested struct {
Value string `toml:"nested_field"`
}
type Deep struct {
Nested
}
type Document struct {
Deep
Value string `toml:"own_field"`
}
var doc Document
err := Unmarshal([]byte(`nested_field = "nested value"`+"\n"+`own_field = "own v... | explode_data.jsonl/46354 | {
"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,
1806,
27121,
71986,
32684,
9422,
82,
1155,
353,
8840,
836,
8,
341,
13158,
71742,
2036,
341,
197,
47399,
914,
1565,
37401,
75,
2974,
59271,
5013,
8805,
197,
532,
13158,
18183,
2036,
341,
197,
18317,
9980,
198,
197,
532,
13158... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.