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 TestClient_Init(t *testing.T) {
tests := []struct {
name string
cfg config.Metadata
wantErr bool
}{
{
name: "init",
cfg: config.Metadata{
Name: "http-target",
Kind: "",
Properties: map[string]string{
"auth_type": "basic",
"username": "username",
... | explode_data.jsonl/48295 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1070
} | [
2830,
3393,
2959,
15644,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
50286,
257,
2193,
46475,
198,
197,
50780,
7747,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
2327,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPerimeter(t *testing.T) {
rectangle := Rectangle{10.0, 10.0}
got := Perimeter(rectangle)
want := 40.0
if got != want {
t.Errorf("got %.2f want %.2f", got, want)
}
} | explode_data.jsonl/60535 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
3889,
25334,
1155,
353,
8840,
836,
8,
220,
341,
197,
55316,
1669,
19280,
90,
16,
15,
13,
15,
11,
220,
16,
15,
13,
15,
532,
3174,
354,
1669,
3616,
25334,
30354,
4044,
340,
50780,
1669,
220,
19,
15,
13,
15,
271,
743,
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 TestUAllAccountOrders(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() {
t.Skip("skipping test: api keys not set")
}
_, err := b.UAllAccountOrders(context.Background(), currency.EMPTYPAIR, 0, 0, time.Time{}, time.Time{})
if err != nil {
t.Error(err)
}
_, err = b.UAllAccountOrders(context.Background(... | explode_data.jsonl/76579 | {
"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,
52,
2403,
7365,
24898,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
25,
6330,
6894,
537,
738,
1138,
197,
532,
197,
6878,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJsonSamples(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)
}
adapterstest.RunJSONBidderTest(t, "tappxtest", bidder)
} | explode_data.jsonl/51703 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 114
} | [
2830,
3393,
5014,
39571,
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... | 2 |
func TestNewDNSProvider(t *testing.T) {
testCases := []struct {
desc string
envVars map[string]string
expected string
}{
{
desc: "success",
envVars: map[string]string{
EnvAPIUser: "123",
EnvAPIPassword: "456",
},
},
{
desc: "missing credentials",
envVars: map[string]string{... | explode_data.jsonl/34728 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 599
} | [
2830,
3393,
3564,
61088,
5179,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
257,
914,
198,
197,
57538,
28305,
220,
2415,
14032,
30953,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
515,
298,
41653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakeString(t *testing.T) {
tests := []struct{ in, out string }{
{"und", "und"},
{"und", "und-CW"},
{"nl", "nl-NL"},
{"de-1901", "nl-1901"},
{"de-1901", "de-Arab-1901"},
{"x-a-b", "de-Arab-x-a-b"},
{"x-a-b", "x-a-b"},
}
for i, tt := range tests {
id, _ := Parse(tt.in)
mod, _ := Parse(tt.out... | explode_data.jsonl/27913 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 381
} | [
2830,
3393,
8078,
703,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
90,
304,
11,
700,
914,
335,
515,
197,
197,
4913,
1241,
497,
330,
1241,
7115,
197,
197,
4913,
1241,
497,
330,
1241,
7658,
54,
7115,
197,
197,
4913,
15643,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTokenAuth200Status(t *testing.T) {
var (
baseTransport = &http.Transport{}
gun data.GUN = "test"
)
s := httptest.NewServer(http.HandlerFunc(NotAuthorizedTestHandler))
defer s.Close()
auth, err := tokenAuth(s.URL, baseTransport, gun, readOnly)
require.NoError(t, err)
require.NotNi... | explode_data.jsonl/77487 | {
"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,
3323,
5087,
17,
15,
15,
2522,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
24195,
27560,
688,
284,
609,
1254,
87669,
16094,
197,
3174,
359,
1843,
821,
1224,
1861,
284,
330,
1944,
698,
197,
340,
1903,
1669,
54320,
70334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultiRemove(t *testing.T) {
err := Mkdir(dirs, 0755)
if err != nil {
panic(err)
}
if !Exists(dirs) {
t.Error("Multi Remove test failed!")
}
err = Remove(dirs)
if err != nil {
panic(err)
}
if Exists(dirs) {
t.Error("Multi Remove test failed!")
}
} | explode_data.jsonl/34165 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 123
} | [
2830,
3393,
20358,
13021,
1155,
353,
8840,
836,
8,
1476,
9859,
1669,
386,
12438,
14161,
82,
11,
220,
15,
22,
20,
20,
340,
743,
1848,
961,
2092,
341,
197,
30764,
3964,
340,
197,
532,
743,
753,
15575,
14161,
82,
8,
341,
197,
3244,
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 TestServeMembersFails(t *testing.T) {
tests := []struct {
method string
wcode int
}{
{
"POST",
http.StatusMethodNotAllowed,
},
{
"DELETE",
http.StatusMethodNotAllowed,
},
{
"BAD",
http.StatusMethodNotAllowed,
},
}
for i, tt := range tests {
rw := httptest.NewRecorder()
h ... | explode_data.jsonl/566 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 245
} | [
2830,
3393,
60421,
24371,
37,
6209,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
42257,
914,
198,
197,
6692,
1851,
220,
526,
198,
197,
59403,
197,
197,
515,
298,
197,
1,
2946,
756,
298,
28080,
10538,
3523,
97634,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMaxHeap(t *testing.T) {
for _, tt := range heapTests {
t.Run(tt.name, func(t *testing.T) {
capacity := tt.capacity
h := NewFloatHeap(true, capacity)
assert.Equal(t, capacity, h.Cap())
_, seen := h.Peek()
assert.False(t, seen)
for i, v := range tt.values {
h.Push(v, i)
if capacity ... | explode_data.jsonl/68386 | {
"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,
5974,
27909,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
17364,
18200,
341,
197,
3244,
16708,
47152,
2644,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
1444,
391,
4018,
1669,
17853,
59168,
198,
298,
9598,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestABCIValidatorUpdateZero(t *testing.T) {
validator := newValidator(t, valAddr1, pk1)
abciVal := validator.ABCIValidatorUpdateZero()
pk, err := validator.TmConsPublicKey()
require.NoError(t, err)
require.Equal(t, pk, abciVal.PubKey)
require.Equal(t, int64(0), abciVal.Power)
} | explode_data.jsonl/2325 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
1867,
11237,
14256,
4289,
17999,
1155,
353,
8840,
836,
8,
341,
197,
16112,
1669,
501,
14256,
1155,
11,
1044,
13986,
16,
11,
22458,
16,
340,
197,
370,
5855,
2208,
1669,
22935,
875,
4897,
40,
14256,
4289,
17999,
741,
3223,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetTrustPinningErrors(t *testing.T) {
setUp(t)
invalidTrustPinConfig := tempDirWithConfig(t, `{
"trust_pinning": {
"certs": {
"repo3": [60, "abc", [1, 2, 3]]
}
}
}`)
defer os.RemoveAll(invalidTrustPinConfig)
tc := &tufCommander{
// returns a nil pointer
configGetter: func()... | explode_data.jsonl/77497 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 614
} | [
2830,
3393,
1949,
45548,
47,
19770,
13877,
1155,
353,
8840,
836,
8,
341,
8196,
2324,
1155,
340,
197,
11808,
45548,
19861,
2648,
1669,
2730,
6184,
2354,
2648,
1155,
11,
1565,
515,
197,
197,
1,
56655,
620,
19770,
788,
341,
6449,
330,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseCacheControl(t *testing.T) {
resetTest()
h := http.Header{}
for range parseCacheControl(h) {
t.Fatal("cacheControl should be empty")
}
h.Set("cache-control", "no-cache")
{
cc := parseCacheControl(h)
if _, ok := cc["foo"]; ok {
t.Error(`Value "foo" shouldn't exist`)
}
noCache, ok := cc[... | explode_data.jsonl/77627 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 388
} | [
2830,
3393,
14463,
8233,
3273,
1155,
353,
8840,
836,
8,
341,
70343,
2271,
741,
9598,
1669,
1758,
15753,
16094,
2023,
2088,
4715,
8233,
3273,
3203,
8,
341,
197,
3244,
26133,
445,
9360,
3273,
1265,
387,
4287,
1138,
197,
630,
9598,
4202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParallelPropagateChannelStatuses(t *testing.T) {
tests := []struct {
name string
ichannel *duckv1alpha1.Channelable
channels []*duckv1alpha1.Channelable
want corev1.ConditionStatus
}{{
name: "ingress false, empty",
ichannel: getChannelable(false),
channels: []*duckv1alpha1.Channelab... | explode_data.jsonl/29238 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 763
} | [
2830,
3393,
16547,
2008,
46836,
9629,
2522,
288,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
197,
713,
2594,
353,
72970,
85,
16,
7141,
16,
38716,
480,
198,
197,
23049,
6680,
29838,
72970... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRSAPSSSaltLengthCompatibility(t *testing.T) {
// Fails token verify, if salt length is auto.
ps256SaltLengthEqualsHash := &jwt.SigningMethodRSAPSS{
SigningMethodRSA: jwt.SigningMethodPS256.SigningMethodRSA,
Options: &rsa.PSSOptions{
SaltLength: rsa.PSSSaltLengthEqualsHash,
},
}
// Behaves as befo... | explode_data.jsonl/10574 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 482
} | [
2830,
3393,
11451,
2537,
1220,
47318,
4373,
85880,
1155,
353,
8840,
836,
8,
341,
197,
322,
434,
6209,
3950,
10146,
11,
421,
12021,
3084,
374,
3233,
624,
35009,
17,
20,
21,
47318,
4373,
4315,
6370,
1669,
609,
41592,
41152,
287,
3523,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStorageKey_Hex(t *testing.T) {
assertEncodeToHex(t, []encodeToHexAssert{
{NewStorageKey([]byte{0, 0, 0}), "0x000000"},
{NewStorageKey([]byte{171, 18, 52}), "0xab1234"},
{NewStorageKey([]byte{0, 1}), "0x0001"},
{NewStorageKey([]byte{18, 52, 86}), "0x123456"},
})
} | explode_data.jsonl/3064 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
5793,
1592,
2039,
327,
1155,
353,
8840,
836,
8,
341,
6948,
32535,
1249,
20335,
1155,
11,
3056,
6180,
1249,
20335,
8534,
515,
197,
197,
90,
3564,
5793,
1592,
10556,
3782,
90,
15,
11,
220,
15,
11,
220,
15,
38842,
330,
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 TestExpiredReset(t *testing.T) {
MockMode = true
timer := NewTimer(5 * time.Second)
done := make(chan struct{})
go func() {
<-timer.C()
done <- struct{}{}
}()
Elapse(5 * time.Second)
<-done
timer.Reset(3 * time.Second)
go func() {
<-timer.C()
done <- struct{}{}
}()
Elapse(2 * time.Second)
s... | explode_data.jsonl/68931 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 291
} | [
2830,
3393,
54349,
14828,
1155,
353,
8840,
836,
8,
341,
9209,
1176,
3636,
284,
830,
198,
51534,
1669,
1532,
10105,
7,
20,
353,
882,
32435,
340,
40495,
1669,
1281,
35190,
2036,
6257,
692,
30680,
2915,
368,
341,
197,
197,
45342,
19278,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOverrideAndroidAppDependency(t *testing.T) {
ctx, _ := testJava(t, `
android_app {
name: "foo",
srcs: ["a.java"],
sdk_version: "current",
}
override_android_app {
name: "bar",
base: "foo",
package_name: "org.dandroid.bp",
}
android_test {
name: "baz",
srcs: ["b.java"],
i... | explode_data.jsonl/58498 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 518
} | [
2830,
3393,
2177,
21831,
2164,
36387,
1155,
353,
8840,
836,
8,
341,
20985,
11,
716,
1669,
1273,
15041,
1155,
11,
22074,
197,
197,
5954,
8191,
341,
298,
11609,
25,
330,
7975,
756,
298,
41144,
82,
25,
4383,
64,
10848,
8097,
298,
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... | 3 |
func TestReconcile(t *testing.T) {
table := TableTest{{
Name: "bad workqueue key",
Key: "too/many/parts",
SkipNamespaceValidation: true,
}, {
Name: "key not found",
Key: "foo/not-found",
SkipNamespaceValidation: true,
}, {
Na... | explode_data.jsonl/53668 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2042
} | [
2830,
3393,
693,
40446,
457,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
6633,
2271,
90,
515,
197,
21297,
25,
503,
330,
13855,
975,
4584,
1376,
756,
197,
55242,
25,
3824,
330,
36127,
14,
34576,
4322,
7038,
756,
197,
7568,
13389,
22699,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteOrderByClientID(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test, either api keys or canManipulateRealOrders isnt set correctly")
}
_, err := f.DeleteOrderByClientID(context.Background(), "clientID123")
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/15194 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 116
} | [
2830,
3393,
6435,
34605,
2959,
915,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
1369,
753,
4814,
92876,
6334,
12768,
24898,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
11,
2987,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAcceptAfterCloseFails(t *testing.T) {
l, err := ListenPipe(testPipeName, nil)
if err != nil {
t.Fatal(err)
}
l.Close()
_, err = l.Accept()
if err != ErrPipeListenerClosed {
t.Fatalf("expected ErrPipeListenerClosed, got %v", err)
}
} | explode_data.jsonl/11429 | {
"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,
16646,
6025,
7925,
37,
6209,
1155,
353,
8840,
836,
8,
341,
8810,
11,
1848,
1669,
32149,
34077,
8623,
34077,
675,
11,
2092,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
8810,
10421,
741,
197,
6878,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAnswerMatches(t *testing.T) {
prf := NewForwardProbe("example.org")
if !prf.AnswerMatches(prf.Answer()) {
t.Error("Forward Answer doesn't match self", prf.Answer())
}
prr, _ := newReverse("192.0.2.44/24")
if !prr.AnswerMatches(prr.Answer()) {
t.Error("Reverse Answer doesn't match self", prr.Answer())
... | explode_data.jsonl/14931 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 462
} | [
2830,
3393,
16141,
42470,
1155,
353,
8840,
836,
8,
341,
25653,
69,
1669,
1532,
25925,
81426,
445,
8687,
2659,
1138,
743,
753,
649,
69,
8624,
3559,
42470,
24974,
69,
8624,
3559,
2140,
341,
197,
3244,
6141,
445,
25925,
21806,
3171,
944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestFetch(t *testing.T) {
const path = "testdata/"
type testcase struct {
source, execName string
}
for _, tc := range []testcase{
{path + "go.crc32.cpu", ""},
{path + "go.nomappings.crash", "/bin/gotest.exe"},
{"http://localhost/profile?file=cppbench.cpu", ""},
} {
p, _, _, err := grabProfile(&sou... | explode_data.jsonl/36297 | {
"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,
20714,
1155,
353,
8840,
836,
8,
341,
4777,
1815,
284,
330,
92425,
29555,
13158,
70080,
2036,
341,
197,
47418,
11,
3883,
675,
914,
198,
197,
630,
2023,
8358,
17130,
1669,
2088,
3056,
1944,
5638,
515,
197,
197,
90,
2343,
488... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBQSerializationStateChecks(t *testing.T) {
for _, tc := range []struct {
state aggregationState
wantErr bool
}{
{defaultState, false},
{merged, true},
{serialized, false},
{resultReturned, true},
} {
lower, upper := -5.0, 5.0
bq := getNoiselessBQ(t, lower, upper)
bq.state = tc.state
i... | explode_data.jsonl/80646 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
33,
48,
35865,
1397,
49820,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
24291,
256,
51629,
1397,
198,
197,
50780,
7747,
1807,
198,
197,
59403,
197,
197,
90,
2258,
1397,
11,
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... | 3 |
func TestPlayerFlashed_FlashDuration_Over(t *testing.T) {
pl := newPlayer(128 * 3)
pl.FlashDuration = 1.9
pl.FlashTick = 128
assert.False(t, pl.IsBlinded(), "Should not be flashed")
} | explode_data.jsonl/12165 | {
"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,
4476,
3882,
13571,
1400,
24686,
12945,
62,
1918,
1155,
353,
8840,
836,
8,
341,
72213,
1669,
501,
4476,
7,
16,
17,
23,
353,
220,
18,
692,
72213,
991,
24686,
12945,
284,
220,
16,
13,
24,
198,
72213,
991,
24686,
22213,
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... | 1 |
func TestEncodeAndDecode(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
t.Assert(gurl.Encode(urlStr), urlEncode)
res, err := gurl.Decode(urlEncode)
if err != nil {
t.Errorf("decode failed. %v", err)
return
}
t.Assert(res, urlStr)
})
} | explode_data.jsonl/52548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
32535,
3036,
32564,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
3244,
11711,
3268,
1085,
50217,
6522,
2580,
701,
2515,
32535,
692,
197,
10202,
11,
1848,
1669,
342,
108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_SalesReports_Filter_IsValid(t *testing.T) {
filter := &SalesReportsFilter{}
date, _ := time.Parse("2006-01-02", "2020-05-05")
filter.Daily().TypeSales().SubTypeSummary().Version10().SetReportDate(date)
err := filter.IsValid()
assert.Nil(t, err)
} | explode_data.jsonl/60789 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
1098,
3831,
23748,
68935,
31879,
4088,
1155,
353,
8840,
836,
8,
341,
50108,
1669,
609,
35418,
23748,
5632,
16094,
44086,
11,
716,
1669,
882,
8937,
445,
17,
15,
15,
21,
12,
15,
16,
12,
15,
17,
497,
330,
17,
15,
17,
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 TestPartialCached(t *testing.T) {
b := newTestSitesBuilder(t)
b.WithTemplatesAdded(
"index.html", `
{{ $key1 := (dict "a" "av" ) }}
{{ $key2 := (dict "a" "av2" ) }}
Partial cached1: {{ partialCached "p1" "input1" $key1 }}
Partial cached2: {{ partialCached "p1" "input2" $key1 }}
Partial cached3: {{ partialCach... | explode_data.jsonl/60658 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 226
} | [
2830,
3393,
37314,
70293,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
501,
2271,
93690,
3297,
1155,
692,
2233,
26124,
51195,
19337,
1006,
197,
197,
1,
1252,
2564,
497,
22074,
2979,
400,
792,
16,
1669,
320,
8477,
330,
64,
1,
330,
402,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTimestampToTime(t *testing.T) {
time, err := TimestampStrToTime("522675441.31045401")
wantErr := false
if (err != nil) != wantErr {
t.Errorf("TimestampStrToTime() wantErr: %v, got: %v", wantErr, err)
}
want := []int{
2017,
7,
25,
11,
37,
21,
}
got := []int{
time.Year(),
int(time.Month(... | explode_data.jsonl/12516 | {
"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,
20812,
1249,
1462,
1155,
353,
8840,
836,
8,
341,
21957,
11,
1848,
1669,
32758,
2580,
1249,
1462,
445,
20,
17,
17,
21,
22,
20,
19,
19,
16,
13,
18,
16,
15,
19,
20,
19,
15,
16,
1138,
50780,
7747,
1669,
895,
198,
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 TestCurveImpl(t *testing.T) {
pool := new(bnPool)
g := &curvePoint{
pool.Get().SetInt64(1),
pool.Get().SetInt64(-2),
pool.Get().SetInt64(1),
pool.Get().SetInt64(0),
}
x := pool.Get().SetInt64(32498273234)
X := newCurvePoint(pool).Mul(g, x, pool)
y := pool.Get().SetInt64(98732423523)
Y := newCurve... | explode_data.jsonl/52896 | {
"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,
31325,
9673,
1155,
353,
8840,
836,
8,
341,
85273,
1669,
501,
1883,
77,
10551,
692,
3174,
1669,
609,
50051,
2609,
515,
197,
85273,
2234,
1005,
1649,
1072,
21,
19,
7,
16,
1326,
197,
85273,
2234,
1005,
1649,
1072,
21,
19,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestInputService16ProtocolTestStructurePayloadCase1(t *testing.T) {
sess := session.New()
svc := NewInputService16ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
input := &InputService16TestShapeInputShape{
Foo: &InputService16TestShapeFooShape{
Baz: aws.String("bar"),
},
}
req, _... | explode_data.jsonl/46487 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 286
} | [
2830,
3393,
2505,
1860,
16,
21,
20689,
2271,
22952,
29683,
4207,
16,
1155,
353,
8840,
836,
8,
341,
1903,
433,
1669,
3797,
7121,
741,
1903,
7362,
1669,
1532,
2505,
1860,
16,
21,
20689,
2271,
57223,
11,
609,
8635,
10753,
90,
27380,
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 TestInvalidCommitSigError(t *testing.T) {
t.Parallel()
// First, we'll make a channel between Alice and Bob.
aliceChannel, bobChannel, cleanUp, err := CreateTestChannels()
if err != nil {
t.Fatalf("unable to create test channels: %v", err)
}
defer cleanUp()
// With the channel established, we'll now sen... | explode_data.jsonl/46445 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 494
} | [
2830,
3393,
7928,
33441,
47246,
1454,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
5512,
11,
582,
3278,
1281,
264,
5496,
1948,
29405,
323,
14261,
624,
197,
63195,
9629,
11,
35192,
9629,
11,
4240,
2324,
11,
1848,
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... | 7 |
func TestSelectStatement_RewriteRegexConditions(t *testing.T) {
var tests = []struct {
in string
out string
}{
{in: `SELECT value FROM cpu`, out: `SELECT value FROM cpu`},
{in: `SELECT value FROM cpu WHERE host='server-1'`, out: `SELECT value FROM cpu WHERE host='server-1'`},
{in: `SELECT value FROM cpu WH... | explode_data.jsonl/28567 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1728
} | [
2830,
3393,
3379,
8636,
2568,
365,
1247,
32464,
35435,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
17430,
220,
914,
198,
197,
13967,
914,
198,
197,
59403,
197,
197,
90,
258,
25,
1565,
4858,
897,
4295,
17319,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDatetimerfc1123Wrapper(t *testing.T) {
now := time.Now()
dtw := Datetimerfc1123Wrapper{
Field: azcore.NullValue(&time.Time{}).(*time.Time),
Now: &now,
}
b, err := json.Marshal(dtw)
if err != nil {
t.Fatal(err)
}
var dtw2 Datetimerfc1123Wrapper
if err = json.Unmarshal(b, &dtw2); err != nil {
t... | explode_data.jsonl/61691 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 241
} | [
2830,
3393,
45696,
295,
3134,
8316,
16,
16,
17,
18,
11542,
1155,
353,
8840,
836,
8,
341,
80922,
1669,
882,
13244,
741,
2698,
15560,
1669,
21631,
295,
3134,
8316,
16,
16,
17,
18,
11542,
515,
197,
94478,
25,
12376,
2153,
23979,
1130,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSubjectInformational(t *testing.T) {
testCases := []struct {
name string
inputPath string
result lint.LintStatus
}{
{
name: "simple all legal",
inputPath: "legalChar.pem",
result: lint.Pass,
},
{
name: "subject with metadata only",
inputPath: "illegalChar.pem",... | explode_data.jsonl/34621 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 287
} | [
2830,
3393,
13019,
14873,
278,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
22427,
1820,
914,
198,
197,
9559,
262,
57920,
1214,
396,
2522,
198,
197,
59403,
197,
197,
515,
298,
1160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestForEachMethodsMap(t *testing.T) {
for k, v := range MethodsMap {
t.Log(k.String())
for k1, v1 := range v {
t.Log("\r", k1.String(), v1)
}
}
} | explode_data.jsonl/4104 | {
"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,
91392,
17856,
2227,
1155,
353,
8840,
836,
8,
341,
2023,
595,
11,
348,
1669,
2088,
18801,
2227,
341,
197,
3244,
5247,
5969,
6431,
2398,
197,
2023,
595,
16,
11,
348,
16,
1669,
2088,
348,
341,
298,
3244,
5247,
4921,
81,
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
] | 3 |
func TestLoadJSONUnpacked(t *testing.T) {
repo, cleanup := repository.TestRepository(t)
defer cleanup()
if rtest.BenchArchiveDirectory == "" {
t.Skip("benchdir not set, skipping")
}
// archive a snapshot
sn := restic.Snapshot{}
sn.Hostname = "foobar"
sn.Username = "test!"
id, err := repo.SaveJSONUnpacked(... | explode_data.jsonl/71940 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 242
} | [
2830,
3393,
5879,
5370,
1806,
50321,
1155,
353,
8840,
836,
8,
341,
17200,
5368,
11,
21290,
1669,
12542,
8787,
4624,
1155,
340,
16867,
21290,
2822,
743,
435,
1944,
1785,
19762,
42502,
9310,
621,
1591,
341,
197,
3244,
57776,
445,
27024,
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 TestGetImageStreams(t *testing.T) {
type args struct {
name string
namespace string
}
tests := []struct {
name string
args args
want []imagev1.ImageStream
wantErr bool
}{
{
name: "case 1: testing a valid imagestream",
args: args{
name: "ruby",
namespace: "testin... | explode_data.jsonl/65160 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1041
} | [
2830,
3393,
1949,
1906,
73576,
1155,
353,
8840,
836,
8,
1476,
13158,
2827,
2036,
341,
197,
11609,
414,
914,
198,
197,
56623,
914,
198,
197,
630,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
198,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewPgpSigner(t *testing.T) {
tcs := []struct {
name string
privateKey []byte
expectedErr bool
}{
{
name: "valid private key",
privateKey: []byte(gpgPrivateKey),
expectedErr: false,
},
{
name: "invalid private key",
privateKey: []byte("invalid-private-key"),
... | explode_data.jsonl/48094 | {
"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,
3564,
47,
21888,
7264,
261,
1155,
353,
8840,
836,
8,
341,
3244,
4837,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
2455,
1592,
220,
3056,
3782,
198,
197,
42400,
7747,
1807,
198,
197,
59403,
197,
197,
515,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestBasicLookupd(t *testing.T) {
opts := NewOptions()
opts.Logger = newTestLogger(t)
tcpAddr, httpAddr, nsqlookupd := mustStartLookupd(opts)
defer nsqlookupd.Exit()
topics := nsqlookupd.DB.FindRegistrations("topic", "*", "*")
equal(t, len(topics), 0)
topicName := "connectmsg"
conn := mustConnectLookupd(... | explode_data.jsonl/12598 | {
"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,
15944,
34247,
67,
1155,
353,
8840,
836,
8,
341,
64734,
1669,
1532,
3798,
741,
64734,
12750,
284,
501,
2271,
7395,
1155,
340,
3244,
4672,
13986,
11,
1758,
13986,
11,
12268,
80,
21020,
67,
1669,
1969,
3479,
34247,
67,
30885,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCanGetBoxFileLocationForCurrent(t *testing.T) {
assert := assert.New(t)
bh := BoxHandler{}
boxes := []SimpleBox{SimpleBox{Boxname: "dev", Username: "benphegan", Provider: "virtualbox", Version: "2.0", Location: "/tmp/benphegan-VAGRANTSLASH-dev__2.0__virtualbox.box"},
SimpleBox{Boxname: "dev", Username: "b... | explode_data.jsonl/51589 | {
"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,
6713,
1949,
1611,
1703,
4707,
2461,
5405,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
2233,
71,
1669,
8261,
3050,
16094,
197,
22204,
1669,
3056,
16374,
1611,
90,
16374,
1611,
90,
1611,
606,
25,
330,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewHealthChecker(t *testing.T) {
c := &Cluster{spec: cephv1.ClusterSpec{HealthCheck: cephv1.CephClusterHealthCheckSpec{}}}
time10s, _ := time.ParseDuration("10s")
c10s := &Cluster{spec: cephv1.ClusterSpec{HealthCheck: cephv1.CephClusterHealthCheckSpec{DaemonHealth: cephv1.DaemonHealthSpec{Monitor: cephv1.He... | explode_data.jsonl/36577 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 353
} | [
2830,
3393,
3564,
14542,
35188,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
609,
28678,
90,
9535,
25,
272,
23544,
85,
16,
72883,
8327,
90,
14542,
3973,
25,
272,
23544,
85,
16,
727,
23544,
28678,
14542,
3973,
8327,
90,
3417,
532,
21957,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRatSign(t *testing.T) {
zero := NewRat(0, 1)
for _, a := range setStringTests {
x, ok := new(Rat).SetString(a.in)
if !ok {
continue
}
s := x.Sign()
e := x.Cmp(zero)
if s != e {
t.Errorf("got %d; want %d for z = %v", s, e, &x)
}
}
} | explode_data.jsonl/35069 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
49,
266,
7264,
1155,
353,
8840,
836,
8,
341,
197,
14154,
1669,
1532,
49,
266,
7,
15,
11,
220,
16,
340,
2023,
8358,
264,
1669,
2088,
738,
703,
18200,
341,
197,
10225,
11,
5394,
1669,
501,
2785,
266,
568,
1649,
703,
2877... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigPath(t *testing.T) {
os.Unsetenv(xdg.ConfigHomeEnvVar)
expected := filepath.Join(homedir.HomeDir(), "Library", "Preferences", appName, testFile)
if lazy.configPath(testFile) != expected {
t.Errorf("expected '%s', got '%s'", expected, lazy.configPath(testFile))
}
os.Setenv(xdg.ConfigHomeEnvVar, ... | explode_data.jsonl/26076 | {
"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,
2648,
1820,
1155,
353,
8840,
836,
8,
341,
25078,
10616,
746,
3160,
2075,
35138,
10753,
7623,
14359,
3962,
692,
42400,
1669,
26054,
22363,
3203,
24139,
404,
59965,
6184,
1507,
330,
16915,
497,
330,
14306,
497,
67819,
11,
1273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExpand(t *testing.T) {
var expressions = []struct {
params map[string]string
input string
output string
}{
// text-only
{
params: map[string]string{},
input: "abcdEFGH28ij",
output: "abcdEFGH28ij",
},
// length
{
params: map[string]string{"var01": "abcdEFGH28ij"},
input: "${... | explode_data.jsonl/18983 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2393
} | [
2830,
3393,
38946,
1155,
353,
8840,
836,
8,
341,
2405,
23393,
284,
3056,
1235,
341,
197,
25856,
2415,
14032,
30953,
198,
197,
22427,
220,
914,
198,
197,
21170,
914,
198,
197,
59403,
197,
197,
322,
1467,
15382,
198,
197,
197,
515,
298,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBQNoInput(t *testing.T) {
lower, upper := -5.0, 5.0
bq := getNoiselessBQ(t, lower, upper)
got, err := bq.Result(0.5)
if err != nil {
t.Fatalf("Couldn't compute dp result for rank=0.5: %v", err)
}
want := 0.0 // When there are no inputs, we linearly interpolate.
if !ApproxEqual(got, want) {
t.Errorf(... | explode_data.jsonl/80633 | {
"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,
33,
48,
2753,
2505,
1155,
353,
8840,
836,
8,
341,
8810,
1202,
11,
8416,
1669,
481,
20,
13,
15,
11,
220,
20,
13,
15,
198,
2233,
80,
1669,
633,
61819,
1717,
33,
48,
1155,
11,
4722,
11,
8416,
340,
3174,
354,
11,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSketchSeriesListMarshal(t *testing.T) {
sl := make(SketchSeriesList, 2)
for i := range sl {
sl[i] = Makeseries(i)
}
b, err := sl.Marshal()
if err != nil {
t.Fatal(err)
}
pl := new(gogen.SketchPayload)
if err := pl.Unmarshal(b); err != nil {
t.Fatal(err)
}
require.Len(t, pl.Sketches, len(sl)... | explode_data.jsonl/34959 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 414
} | [
2830,
3393,
75288,
25544,
852,
55438,
1155,
353,
8840,
836,
8,
341,
78626,
1669,
1281,
3759,
74,
2995,
25544,
852,
11,
220,
17,
692,
2023,
600,
1669,
2088,
1739,
341,
197,
78626,
989,
60,
284,
36870,
4699,
1956,
340,
197,
630,
2233,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSummary(t *testing.T) {
v115 := semver.MustParse("1.15.0")
var tests = []struct {
desc string
SummaryOpts
registryVersion *semver.Version
expectedMetricCount int
expectedHelp string
}{
{
desc: "Test non deprecated",
SummaryOpts: SummaryOpts{
Namespace: "namespace",
... | explode_data.jsonl/34969 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1217
} | [
2830,
3393,
19237,
1155,
353,
8840,
836,
8,
341,
5195,
16,
16,
20,
1669,
5234,
423,
50463,
14463,
445,
16,
13,
16,
20,
13,
15,
1138,
2405,
7032,
284,
3056,
1235,
341,
197,
41653,
914,
198,
197,
7568,
372,
1534,
43451,
198,
197,
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... | 9 |
func TestArtifactRepositoryRef_String(t *testing.T) {
var l *ArtifactRepositoryRef
assert.Equal(t, "nil", l.String())
assert.Equal(t, "#", (&ArtifactRepositoryRef{}).String())
assert.Equal(t, "my-cm#my-key", (&ArtifactRepositoryRef{ConfigMap: "my-cm", Key: "my-key"}).String())
} | explode_data.jsonl/26032 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
85578,
4624,
3945,
31777,
1155,
353,
8840,
836,
8,
341,
2405,
326,
353,
85578,
4624,
3945,
198,
6948,
12808,
1155,
11,
330,
8385,
497,
326,
6431,
2398,
6948,
12808,
1155,
11,
5869,
497,
15899,
85578,
4624,
3945,
6257,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBloomCachedChan(t *testing.T) {
assert := assert.New(t)
c := NewBloomCachedChan()
c.Send("1.2.3.4", "80")
assert.Equal(1, len(c.Recv()))
c.Send("5.6.7.8", "80")
assert.Equal(2, len(c.Recv()))
// filtered by bloom
c.Send("5.6.7.8", "80")
assert.Equal(2, len(c.Recv()))
} | explode_data.jsonl/76416 | {
"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,
33,
18474,
70293,
46019,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
1444,
1669,
1532,
33,
18474,
70293,
46019,
741,
1444,
20176,
445,
16,
13,
17,
13,
18,
13,
19,
497,
330,
23,
15,
1138,
6948,
12808,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTxOrmRollbackUnlessCommit(t *testing.T) {
o := NewOrm()
var tag Tag
// test not commited and call RollbackUnlessCommit
to, err := o.Begin()
assert.Nil(t, err)
tag.Name = "rollback unless commit"
rows, err := to.Insert(&tag)
assert.Nil(t, err)
assert.True(t, rows > 0)
err = to.RollbackUnlessCommit()
... | explode_data.jsonl/18155 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 361
} | [
2830,
3393,
31584,
80405,
32355,
1419,
35587,
33441,
1155,
353,
8840,
836,
8,
341,
22229,
1669,
1532,
80405,
741,
2405,
4772,
12353,
271,
197,
322,
1273,
537,
1063,
1608,
323,
1618,
14686,
1419,
35587,
33441,
198,
31709,
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 TestCreateReadDeleteUpdate(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
t.Parallel()
sf := newTestFile()
update := sf.createDeleteUpdate()
// Read update
path := readDeleteUpdate(update)
// Compare values
if path != sf.siaFilePath {
t.Error("paths doesn't match")
}
} | explode_data.jsonl/14690 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
4021,
4418,
6435,
4289,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
7039,
741,
197,
532,
3244,
41288,
7957,
2822,
53024,
1669,
501,
2271,
1703,
741,
27175,
1669,
13124,
2520,
6435,
4289,
741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseVar(t *testing.T) {
for _, tt := range []struct {
in string
expectedIndex int
expectedDefault string
}{
{"$13", 13, ""},
{"${0}", 0, ""},
{"${2}", 2, ""},
{"${1:fn}", 1, "fn"},
{"${10:someUrl}", 10, "someUrl"},
} {
t.Run(tt.in, func(t *testing.T) {
i, dv, err := pars... | explode_data.jsonl/40127 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 298
} | [
2830,
3393,
14463,
3962,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
17430,
1060,
914,
198,
197,
42400,
1552,
256,
526,
198,
197,
42400,
3675,
914,
198,
197,
59403,
197,
197,
4913,
3,
16,
18,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestSendDBMultipart(t *testing.T) {
tempDir, err := ioutil.TempDir("", "")
if err != nil {
t.Fatalf("unexpected error creating temp dir: %s", err)
}
defer os.RemoveAll(tempDir)
const maxPayloadSizeBytes = 1000
var fullContents []byte
for i := 0; i < maxPayloadSizeBytes/10*5; i++ {
fullContents = appen... | explode_data.jsonl/21436 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 807
} | [
2830,
3393,
11505,
3506,
44,
18204,
1155,
353,
8840,
836,
8,
341,
16280,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
14676,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
53859,
1465,
6825,
2730,
5419,
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... | 6 |
func TestGetDurationOption(t *testing.T) {
for _, tc := range []struct {
name string
envName string
exportEnv map[string]string
option string
options map[string]interface{}
defaultValue time.Duration
expectedDuration time.Duration
expectedError bool... | explode_data.jsonl/63537 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1486
} | [
2830,
3393,
1949,
12945,
5341,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
11609,
1797,
914,
198,
197,
57538,
675,
688,
914,
198,
197,
59440,
14359,
286,
2415,
14032,
30953,
198,
197,
80845,
1843,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRun(t *testing.T) {
tests := []struct{
Values []idiom_string.Type
Expected string
}{
{
Values: []idiom_string.Type{},
Expected: "",
},
{
Values: []idiom_string.Type{
idiom_string.Something(""),
},
Expected: "",
},
{
Values: []idiom_string.Type{
idiom_string.Somethi... | explode_data.jsonl/48640 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1875
} | [
2830,
3393,
6727,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
515,
197,
197,
6227,
3056,
12278,
316,
3904,
10184,
198,
197,
197,
18896,
914,
198,
197,
59403,
197,
197,
515,
298,
197,
6227,
25,
3056,
12278,
316,
3904,
10184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestObserver(t *testing.T) {
var s Subject
v := s.Set(1)
if v.Value.(int) != 1 {
t.Fatal("required", 1)
}
v2, v2n := s.Set(2), v.Next()
if v2 != v2n {
t.Fatalf("%v != %v", v2, v2n)
}
var wg sync.WaitGroup
threes := make([]int, 8)
for i := range threes {
i := i
wg.Add(1)
go func() {
threes... | explode_data.jsonl/81190 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 488
} | [
2830,
3393,
17151,
1155,
353,
8840,
836,
8,
341,
2405,
274,
17450,
198,
5195,
1669,
274,
4202,
7,
16,
692,
743,
348,
6167,
12832,
396,
8,
961,
220,
16,
341,
197,
3244,
26133,
445,
6279,
497,
220,
16,
340,
197,
630,
5195,
17,
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 TestStorage(t *testing.T) {
cls := newMockCluster()
store := newStorage(cls)
store.put("prefix_1", "1")
store.put("prefix_2", "2")
val, err := store.get("prefix_1")
if err != nil || *val != "1" {
t.Errorf("get wrong val")
}
valmap, err := store.getPrefix("prefix", false)
if err != nil || !reflect.DeepEq... | explode_data.jsonl/82205 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 319
} | [
2830,
3393,
5793,
1155,
353,
8840,
836,
8,
341,
197,
18074,
1669,
501,
11571,
28678,
741,
57279,
1669,
501,
5793,
20398,
340,
57279,
3597,
445,
11849,
62,
16,
497,
330,
16,
1138,
57279,
3597,
445,
11849,
62,
17,
497,
330,
17,
1138,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestKpt_ExcludeKptFn(t *testing.T) {
// A declarative fn.
testFn1 := []byte(`apiVersion: v1
data:
annotation_name: k1
annotation_value: v1
kind: ConfigMap
metadata:
annotations:
config.kubernetes.io/function: fake`)
// A declarative fn which has `local-config` annotation specified.
testFn2 := []byte(... | explode_data.jsonl/9528 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 966
} | [
2830,
3393,
42,
417,
62531,
857,
42,
417,
24911,
1155,
353,
8840,
836,
8,
341,
197,
322,
362,
9445,
1388,
5168,
624,
18185,
24911,
16,
1669,
3056,
3782,
5809,
2068,
5637,
25,
348,
16,
198,
691,
510,
220,
21223,
1269,
25,
595,
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 TestResolve(t *testing.T) {
dispatcher := &clientmocks.MockDispatcher{}
ctx := mocks.NewMockContext(mockmsp.NewMockSigningIdentity("test", org1MSP))
config := &mocks.MockConfig{}
config.SetCustomChannelConfig(channelID, &fab.ChannelEndpointConfig{
Policies: fab.ChannelPolicies{
EventService: fab.EventServ... | explode_data.jsonl/1508 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
56808,
1155,
353,
8840,
836,
8,
341,
60072,
261,
1669,
609,
2972,
16712,
82,
24664,
21839,
16094,
20985,
1669,
68909,
7121,
11571,
1972,
30389,
92545,
7121,
11571,
93358,
18558,
445,
1944,
497,
1240,
16,
44,
4592,
1171,
25873,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceEmitterCrashing(t *testing.T) {
if dipper.Logger == nil {
f, _ := os.OpenFile(os.DevNull, os.O_APPEND, 0o777)
defer f.Close()
dipper.GetLogger("test service", "DEBUG", f, f)
}
svc := &Service{
name: "testsvc",
driverRuntimes: map[string]*driver.Runtime{
"driver:d1": {
State: driver.... | explode_data.jsonl/12390 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 956
} | [
2830,
3393,
1860,
21971,
16001,
19049,
1155,
353,
8840,
836,
8,
341,
743,
23604,
712,
12750,
621,
2092,
341,
197,
1166,
11,
716,
1669,
2643,
12953,
1703,
9638,
77611,
3280,
11,
2643,
8382,
65851,
11,
220,
15,
78,
22,
22,
22,
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 TestGetUser(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc("/users/test_user", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{ "type": "t", "name": "n", "created_at": "2011-03-19T15:42:22Z", "updated_at": "2012-06-14T00:14:27Z", "logo": "l", "_id": 1, "displa... | explode_data.jsonl/62969 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 429
} | [
2830,
3393,
1949,
1474,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
741,
2109,
2200,
63623,
4283,
4218,
12697,
3317,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
18185,
3523,
1155,
11,
435,
11,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInputService14ProtocolTestTimestampValuesCase2(t *testing.T) {
sess := session.New()
svc := NewInputService14ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
input := &InputService14TestShapeInputShape{
TimeArgInHeader: aws.Time(time.Unix(1422172800, 0)),
}
req, _ := svc.InputServi... | explode_data.jsonl/8025 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 235
} | [
2830,
3393,
2505,
1860,
16,
19,
20689,
2271,
20812,
6227,
4207,
17,
1155,
353,
8840,
836,
8,
341,
1903,
433,
1669,
3797,
7121,
741,
1903,
7362,
1669,
1532,
2505,
1860,
16,
19,
20689,
2271,
57223,
11,
609,
8635,
10753,
90,
27380,
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 TestSaveConfigFile(t *testing.T) {
c, err := NewContainer(ContainerName)
if err != nil {
t.Errorf(err.Error())
}
if err := c.SaveConfigFile(c.ConfigFileName()); err != nil {
t.Errorf(err.Error())
}
} | explode_data.jsonl/2770 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 85
} | [
2830,
3393,
8784,
2648,
1703,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
1532,
4502,
75145,
675,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
3964,
6141,
2398,
197,
630,
743,
1848,
1669,
272,
13599,
2648,
1703,
1337,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExportFile(t *testing.T) {
// This used to trigger the log.Fatal in loadFromExportData.
// See go.dev/issue/45584.
cfg := new(packages.Config)
cfg.Mode = packages.NeedTypes
packages.Load(cfg, "fmt")
} | explode_data.jsonl/52479 | {
"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,
16894,
1703,
1155,
353,
8840,
836,
8,
341,
197,
322,
1096,
1483,
311,
8183,
279,
1487,
26133,
304,
2795,
3830,
16894,
1043,
624,
197,
322,
3496,
728,
21523,
14,
11159,
14,
19,
20,
20,
23,
19,
624,
50286,
1669,
501,
1295,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMinimumNArgs(t *testing.T) {
tests := []struct {
name string
args []string
wantErr bool
}{
{
name: "no args",
args: []string{},
wantErr: true,
},
{
name: "with less args",
args: []string{"a"},
wantErr: true,
},
{
name: "with valid args",
args: [... | explode_data.jsonl/59321 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 398
} | [
2830,
3393,
28695,
45,
4117,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
3056,
917,
198,
197,
50780,
7747,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
262,
330,
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 TestProjectResourceHandler_GetProjectResource(t *testing.T) {
type fields struct {
ProjectResourceManager *handler_mock.IResourceManagerMock
}
tests := []struct {
name string
fields fields
request *http.Request
wantParams *models.GetResourceParams
wantResult *models.GetResourceResponse
... | explode_data.jsonl/7380 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1550
} | [
2830,
3393,
7849,
4783,
3050,
13614,
7849,
4783,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
7849,
32498,
353,
17905,
34134,
2447,
32498,
11571,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
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 TestPessimisticTxnWithDDLAddDropColumn(t *testing.T) {
store, clean := createMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk2 := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk2.MustExec("use test")
tk.MustExec("drop table if exists t1")
tk.MustExec("create table t1 (c1 in... | explode_data.jsonl/12490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 463
} | [
2830,
3393,
47,
66733,
4532,
31584,
77,
2354,
58781,
2212,
19871,
2933,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1855,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIsFolder(t *testing.T) {
t.Parallel()
tests := []struct {
give string
want bool
}{
{
give: "/",
want: true,
},
{
give: "a/",
want: true,
},
{
give: "a/b/",
want: true,
},
{
give: "",
want: false,
},
{
give: "a",
want: false,
},
{
give: "a/b",
wa... | explode_data.jsonl/81326 | {
"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,
3872,
13682,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
3174,
533,
914,
198,
197,
50780,
1807,
198,
197,
59403,
197,
197,
515,
298,
3174,
533,
25,
3521,
756,
298,
50780,
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 TestIssue37978(t *testing.T) {
runner.Run(t, exampleProgram, func(t *testing.T, env *Env) {
// Create a new workspace-level directory and empty file.
env.CreateBuffer("c/c.go", "")
// Write the file contents with a missing import.
env.EditBuffer("c/c.go", fake.Edit{
Text: `package c
const a = http.Me... | explode_data.jsonl/38905 | {
"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,
42006,
18,
22,
24,
22,
23,
1155,
353,
8840,
836,
8,
341,
197,
41736,
16708,
1155,
11,
3110,
10690,
11,
2915,
1155,
353,
8840,
836,
11,
6105,
353,
14359,
8,
341,
197,
197,
322,
4230,
264,
501,
27514,
11591,
6220,
323,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDisplaySettingsIsValidCustomUrlSchemes(t *testing.T) {
tests := []struct {
name string
value []string
valid bool
}{
{
name: "empty",
value: []string{},
valid: true,
},
{
name: "custom protocol",
value: []string{"steam"},
valid: true,
},
{
name: "multiple custom protoc... | explode_data.jsonl/50697 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 721
} | [
2830,
3393,
7020,
6086,
55470,
10268,
2864,
50,
66346,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
16309,
3056,
917,
198,
197,
56322,
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... | 5 |
func TestMerge(t *testing.T) {
tests := []struct {
obj runtime.Object
fragment string
expected runtime.Object
expectErr bool
}{
{
obj: &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
},
},
fragment: fmt.Sprintf(`{ "apiVersion": "%s" }`, "v1"),
expected: &corev1.Pod{... | explode_data.jsonl/38770 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1440
} | [
2830,
3393,
52096,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
22671,
981,
15592,
8348,
198,
197,
1166,
6017,
220,
914,
198,
197,
42400,
220,
15592,
8348,
198,
197,
24952,
7747,
1807,
198,
197,
59403,
197,
197,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRedis_SetBit(t *testing.T) {
runOnRedis(t, func(client *Redis) {
err := NewRedis(client.Addr, "").SetBit("key", 1, 1)
assert.NotNil(t, err)
err = client.SetBit("key", 1, 1)
assert.Nil(t, err)
})
} | explode_data.jsonl/39171 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 103
} | [
2830,
3393,
48137,
14812,
8344,
1155,
353,
8840,
836,
8,
341,
56742,
1925,
48137,
1155,
11,
2915,
12805,
353,
48137,
8,
341,
197,
9859,
1669,
1532,
48137,
12805,
93626,
11,
35229,
1649,
8344,
445,
792,
497,
220,
16,
11,
220,
16,
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 TestNonDuplicateNaNDatapointsCausesAmendError(t *testing.T) {
db, delete := openTestDB(t, nil)
defer func() {
testutil.Ok(t, db.Close())
delete()
}()
app := db.Appender()
_, err := app.Add(labels.Labels{}, 0, math.Float64frombits(0x7ff0000000000001))
testutil.Ok(t, err)
testutil.Ok(t, app.Commit())
ap... | explode_data.jsonl/64367 | {
"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,
8121,
53979,
16193,
8065,
266,
391,
14399,
22571,
4776,
6091,
408,
1454,
1155,
353,
8840,
836,
8,
341,
20939,
11,
3698,
1669,
1787,
2271,
3506,
1155,
11,
2092,
340,
16867,
2915,
368,
341,
197,
18185,
1314,
54282,
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 TestTimedMetricListFlushConsumingAndCollectingTimedMetrics(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
var (
errTestFlush = errors.New("foo")
cutoverNanos = int64(0)
cutoffNanos = int64(math.MaxInt64)
count int
flushLock sync.Mutex
flushed []aggregated.Chunke... | explode_data.jsonl/43592 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2364
} | [
2830,
3393,
20217,
291,
54310,
852,
46874,
41966,
287,
3036,
47504,
287,
20217,
291,
27328,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
2405,
2399,
197,
9859,
2271,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNotifySemaphoreConfigUpdate(t *testing.T) {
assert := assert.New(t)
wf := unmarshalWF(wfWithSema)
wf1 := wf.DeepCopy()
wf1.Name = "one"
wf2 := wf.DeepCopy()
wf2.Name = "two"
wf2.Spec.Synchronization = nil
cancel, controller := newController(wf, wf1, wf2)
defer cancel()
cm := apiv1.ConfigMap{ObjectM... | explode_data.jsonl/2871 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 311
} | [
2830,
3393,
28962,
74614,
2648,
4289,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
6692,
69,
1669,
650,
27121,
32131,
3622,
69,
2354,
50,
9176,
340,
6692,
69,
16,
1669,
41248,
55602,
12106,
741,
6692,
69,
16,
2967,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_PrivateEndpointConnection_Status_Domain_SubResourceEmbedded_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
t.Parallel()
parameters := gopter.DefaultTestParameters()
parameters.MaxSize = 10
properties := gopter.NewProperties(parameters)
properties.Property(
"Round trip of PrivateEndpointConnec... | explode_data.jsonl/39621 | {
"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,
43830,
27380,
4526,
36449,
1557,
3121,
36359,
4783,
83466,
62,
4498,
77521,
78967,
98054,
2848,
4756,
2121,
2993,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
67543,
1669,
728,
73137,
13275,
2271,
9706,
741,
67543,
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 TestBoolIndividual(t *testing.T) {
ind1 := NewBoolIndividual([]bool{true, true, true}, NewFitness([]float64{-1.0}))
ind2 := NewBoolIndividual([]bool{false, true, false}, NewFitness([]float64{-1.0}))
ind3 := NewBoolIndividual([]bool{true, true, true}, NewFitness([]float64{-1.0}))
ind4 := ind1.Clone().(Individua... | explode_data.jsonl/30421 | {
"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,
11233,
43159,
1155,
353,
8840,
836,
8,
341,
197,
484,
16,
1669,
1532,
11233,
43159,
10556,
2641,
90,
1866,
11,
830,
11,
830,
2137,
1532,
74863,
10556,
3649,
21,
19,
19999,
16,
13,
15,
44194,
197,
484,
17,
1669,
1532,
112... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSubtract(t *testing.T) {
toFloat64 := func(n interface{}) float64 {
switch v := n.(type) {
case int:
return float64(v)
case int8:
return float64(v)
case int16:
return float64(v)
case int32:
return float64(v)
case int64:
return float64(v)
case float32:
return float64(v)
case f... | explode_data.jsonl/14316 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 327
} | [
2830,
3393,
3136,
2144,
1155,
353,
8840,
836,
8,
341,
31709,
5442,
21,
19,
1669,
2915,
1445,
3749,
28875,
2224,
21,
19,
341,
197,
8961,
348,
1669,
308,
12832,
1313,
8,
341,
197,
2722,
526,
510,
298,
853,
2224,
21,
19,
3747,
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... | 8 |
func TestBindWithDelimiter_invalidType(t *testing.T) {
c := createTestContext("/search?param=1¶m=100", nil, nil)
b := QueryParamsBinder(c)
var dest []BindUnmarshaler
err := b.BindWithDelimiter("param", &dest, ",").BindError()
assert.Equal(t, []BindUnmarshaler(nil), dest)
assert.EqualError(t, err, "code=400, ... | explode_data.jsonl/82561 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
9950,
2354,
91098,
31433,
929,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1855,
2271,
1972,
4283,
1836,
30,
903,
28,
16,
5,
903,
28,
16,
15,
15,
497,
2092,
11,
2092,
340,
2233,
1669,
11361,
4870,
44055,
1337,
692,
2405,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApiV2GetDevices(t *testing.T) {
t.Parallel()
// enforce specific field naming in errors returned by API
updateRestErrorFieldName()
devs := []model.Device{
{
Id: "id1",
PubKey: "pubkey",
Status: model.DevStatusPending,
},
{
Id: "id2",
PubKey: "pubkey2",
Status: model.DevSta... | explode_data.jsonl/634 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1157
} | [
2830,
3393,
6563,
53,
17,
1949,
40835,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
28162,
3151,
2070,
34948,
304,
5975,
5927,
553,
5333,
198,
27175,
12416,
1454,
51241,
2822,
27302,
82,
1669,
3056,
2528,
43995,
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... | 1 |
func TestGetQuerySnippetGETBody(t *testing.T) {
q := "SELECT column FROM table"
body := bytes.NewBufferString(q)
req, err := http.NewRequest("GET", "", body)
checkErr(t, err)
query := getQuerySnippet(req)
if query != q {
t.Fatalf("got: %q; expected: %q", query, q)
}
} | explode_data.jsonl/31700 | {
"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,
1949,
2859,
87852,
3806,
5444,
1155,
353,
8840,
836,
8,
341,
18534,
1669,
330,
4858,
3250,
4295,
1965,
698,
35402,
1669,
5820,
7121,
4095,
703,
10583,
340,
24395,
11,
1848,
1669,
1758,
75274,
445,
3806,
497,
7342,
2487,
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 TestRolesAssignToGroupOnProject(t *testing.T) {
clients.RequireAdmin(t)
client, err := clients.NewIdentityV3Client()
th.AssertNoErr(t, err)
project, err := CreateProject(t, client, nil)
th.AssertNoErr(t, err)
defer DeleteProject(t, client, project.ID)
roleCreateOpts := roles.CreateOpts{
DomainID: "defa... | explode_data.jsonl/57732 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 762
} | [
2830,
3393,
25116,
28933,
1249,
2808,
1925,
7849,
1155,
353,
8840,
836,
8,
341,
197,
31869,
81288,
7210,
1155,
692,
25291,
11,
1848,
1669,
8239,
7121,
18558,
53,
18,
2959,
741,
70479,
11711,
2753,
7747,
1155,
11,
1848,
692,
72470,
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 Test(t *testing.T) {
lib.AssertCorrect(t, solution.Part1(), 1212510616)
lib.AssertCorrect(t, solution.Part2(), 171265123)
} | explode_data.jsonl/74076 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 52
} | [
2830,
3393,
1155,
353,
8840,
836,
8,
341,
93459,
11711,
33092,
1155,
11,
6291,
52250,
16,
1507,
220,
16,
17,
16,
17,
20,
16,
15,
21,
16,
21,
340,
93459,
11711,
33092,
1155,
11,
6291,
52250,
17,
1507,
220,
16,
22,
16,
17,
21,
20,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestGetPaddedDisplayStrings(t *testing.T) {
type scenario struct {
stringArrays [][]string
padWidths []int
expected []string
}
scenarios := []scenario{
{
[][]string{{"a", "b"}, {"c", "d"}},
[]int{1},
[]string{"a b", "c d"},
},
}
for _, s := range scenarios {
assert.EqualValues(t,... | explode_data.jsonl/11578 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 171
} | [
2830,
3393,
1949,
47,
16828,
7020,
20859,
1155,
353,
8840,
836,
8,
341,
13158,
15048,
2036,
341,
197,
11357,
22182,
52931,
917,
198,
197,
3223,
329,
3327,
82,
262,
3056,
396,
198,
197,
42400,
257,
3056,
917,
198,
197,
630,
29928,
6049... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrintStorageClass(t *testing.T) {
policyDelte := api.PersistentVolumeReclaimDelete
policyRetain := api.PersistentVolumeReclaimRetain
bindModeImmediate := storage.VolumeBindingImmediate
bindModeWait := storage.VolumeBindingWaitForFirstConsumer
tests := []struct {
sc storage.StorageClass
expected ... | explode_data.jsonl/21631 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1473
} | [
2830,
3393,
8994,
5793,
1957,
1155,
353,
8840,
836,
8,
341,
3223,
8018,
16532,
665,
1669,
6330,
61655,
18902,
693,
7859,
6435,
198,
3223,
8018,
12020,
466,
1669,
6330,
61655,
18902,
693,
7859,
12020,
466,
198,
2233,
484,
3636,
52734,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestValidateAndBuildNodeBIdKeySuccess(t *testing.T) {
nodeType := "ENB"
plmnId := "bbbb"
nbId := "cccc"
delimiter := ":"
key, err := ValidateAndBuildNodeBIdKey(nodeType, plmnId, nbId)
if err != nil{
t.Errorf("#utils_test.TestValidateAndBuildNodeBIdKey - failed to validate key parameter")
}
assert.Contain... | explode_data.jsonl/33037 | {
"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,
17926,
3036,
11066,
1955,
33,
764,
1592,
7188,
1155,
353,
8840,
836,
8,
341,
20831,
929,
1669,
330,
953,
33,
698,
72213,
21775,
764,
1669,
330,
87609,
698,
9038,
65,
764,
1669,
330,
55597,
698,
69509,
17700,
1669,
13022,
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 TestInvalidInt64(t *testing.T) {
os.Setenv("INT64", "AAA")
defer os.Clearenv()
cfg := Config{}
assert.EqualError(t, Parse(&cfg), "env: parse error on field \"Int64\" of type \"int64\": strconv.ParseInt: parsing \"AAA\": invalid syntax")
} | explode_data.jsonl/78766 | {
"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,
7928,
1072,
21,
19,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
3221,
21,
19,
497,
330,
50107,
1138,
16867,
2643,
727,
273,
9151,
85,
2822,
50286,
1669,
5532,
16094,
6948,
12808,
1454,
1155,
11,
14775,
2099,
1407... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateIamRoleGlob(t *testing.T) {
t.Parallel()
cases := []struct {
account voyager.Account
serviceName voyager.ServiceName
want string
}{
{
account: voyager.Account("12345"),
serviceName: "test-svc",
want: "arn:aws:iam::12345:role/rps-test-svc-*",
},
}
for i, c ... | explode_data.jsonl/4286 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 219
} | [
2830,
3393,
31115,
40,
309,
9030,
38,
1684,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
2264,
1669,
3056,
1235,
341,
197,
86866,
257,
23063,
1409,
30877,
198,
197,
52934,
675,
23063,
1409,
13860,
675,
198,
197,
50780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestColumnSchemaDiff(t *testing.T) {
cases := []struct {
name string
old, new *ColumnSchema
requiresManualChange bool
}{
{
"type change",
mkCol("foo", TextColumn, false, false, nil),
mkCol("foo", SmallIntColumn, false, false, nil),
true,
},
{
"pk change",
... | explode_data.jsonl/19116 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 765
} | [
2830,
3393,
2933,
8632,
21751,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
338,
914,
198,
197,
61828,
11,
501,
1797,
353,
2933,
8632,
198,
197,
197,
41375,
52092,
4072,
1807,
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... | 3 |
func Test_TX_BatchInsert(t *testing.T) {
table := createTable()
defer dropTable(table)
gtest.C(t, func(t *gtest.T) {
tx, err := db.Begin()
if err != nil {
gtest.Error(err)
}
if _, err := tx.BatchInsert(table, g.List{
{
"id": 2,
"passport": "t",
"password": "25d55ad283aa400af... | explode_data.jsonl/41307 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 432
} | [
2830,
3393,
18819,
1668,
754,
13780,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
1855,
2556,
741,
16867,
5943,
2556,
15761,
692,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
46237,
11,
1848,
1669,
2927,
28467,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestParseAtlantisURL(t *testing.T) {
cases := []struct {
In string
ExpErr string
ExpURL string
}{
// Valid URLs should work.
{
In: "https://example.com",
ExpURL: "https://example.com",
},
{
In: "http://example.com",
ExpURL: "http://example.com",
},
{
In: "http://e... | explode_data.jsonl/15319 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 764
} | [
2830,
3393,
14463,
46250,
37866,
3144,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
70167,
257,
914,
198,
197,
197,
8033,
7747,
914,
198,
197,
197,
8033,
3144,
914,
198,
197,
59403,
197,
197,
322,
7818,
35006,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEmptyCallFunctionDef(t *testing.T) {
tc := requireTestCase(t, `def foo$`)
_, err := requireCompletionsOrError(t, tc, EmptyCalls{})
require.Error(t, err, "empty call should not be emitted for function definition")
// should emit for function call within function definition
tc = requireTestCase(t, `import ... | explode_data.jsonl/56044 | {
"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,
3522,
7220,
5152,
2620,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
1373,
16458,
1155,
11,
1565,
750,
15229,
3,
24183,
197,
6878,
1848,
1669,
1373,
1092,
10819,
908,
2195,
1454,
1155,
11,
17130,
11,
22228,
55292,
37790,
17957... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScannerDisabled(t *testing.T) {
defer leaktest.AfterTest(t)()
const count = 3
ranges := newTestRangeSet(count, t)
q := &testQueue{}
mc := hlc.NewManualClock(123)
clock := hlc.NewClock(mc.UnixNano, time.Nanosecond)
s := newReplicaScanner(makeAmbCtx(), clock, 1*time.Millisecond, 0, 0, ranges)
s.AddQueues... | explode_data.jsonl/78120 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 561
} | [
2830,
3393,
31002,
25907,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
4777,
1760,
284,
220,
18,
198,
7000,
5520,
1669,
501,
2271,
6046,
1649,
11512,
11,
259,
340,
18534,
1669,
609,
1944,
7554,
16094,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCount(t *testing.T) {
catalogStore, err := store.Open("catalog_agg", store.DefaultOptions())
require.NoError(t, err)
defer os.RemoveAll("catalog_agg")
dataStore, err := store.Open("sqldata_agg", store.DefaultOptions())
require.NoError(t, err)
defer os.RemoveAll("sqldata_agg")
engine, err := NewEngine(... | explode_data.jsonl/64077 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 708
} | [
2830,
3393,
2507,
1155,
353,
8840,
836,
8,
341,
1444,
7750,
6093,
11,
1848,
1669,
3553,
12953,
445,
26539,
83534,
497,
3553,
13275,
3798,
2398,
17957,
35699,
1155,
11,
1848,
340,
16867,
2643,
84427,
445,
26539,
83534,
5130,
8924,
6093,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTryPub(t *testing.T) {
ps := New(1)
defer ps.Shutdown()
ch := ps.Sub("t1")
ps.TryPub("hi", "t1")
ps.TryPub("there", "t1")
<-ch
extraMsg := false
select {
case <-ch:
extraMsg = true
default:
}
if extraMsg {
t.Fatal("Extra message was found in channel")
}
} | explode_data.jsonl/44260 | {
"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,
21453,
29162,
1155,
353,
8840,
836,
8,
341,
35009,
1669,
1532,
7,
16,
340,
16867,
4726,
10849,
18452,
2822,
23049,
1669,
4726,
12391,
445,
83,
16,
1138,
35009,
19824,
29162,
445,
6023,
497,
330,
83,
16,
1138,
35009,
19824,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHTTPGetMachineInfo(t *testing.T) {
mspec := &cadvisorapi.MachineInfo{
NumCores: 4,
MemoryCapacity: 2048,
}
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
err := json.NewEncoder(w).Encode(mspec)
if err != nil {
t.Fatal(err)
}
}))
defer ts.Close()... | explode_data.jsonl/53980 | {
"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,
9230,
1949,
21605,
1731,
1155,
353,
8840,
836,
8,
341,
47691,
992,
1669,
609,
34455,
38012,
2068,
1321,
3814,
1731,
515,
197,
197,
4651,
34,
4589,
25,
981,
220,
19,
345,
197,
9209,
4731,
29392,
25,
220,
17,
15,
19,
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... | 2 |
func TestCertificatesHandler(t *testing.T) {
t.Parallel()
call := func(s signing.Signer) (*signing.PublicCertificates, error) {
r := router.New()
InstallHandlers(r, withSigner(s))
ts := httptest.NewServer(r)
// Note: there are two contexts. One for outter /certificates call
// (this one), and another for /... | explode_data.jsonl/4597 | {
"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,
97140,
3050,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
67288,
1669,
2915,
1141,
15971,
41152,
261,
8,
4609,
7752,
287,
49139,
97140,
11,
1465,
8,
341,
197,
7000,
1669,
9273,
7121,
741,
197,
197,
24690,
39949,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPushQueue(t *testing.T) {
connection, err := OpenConnection("push", "tcp", "localhost:6379", 1, nil)
assert.NoError(t, err)
queue1, err := connection.OpenQueue("queue1")
assert.NoError(t, err)
queue2, err := connection.OpenQueue("queue2")
assert.NoError(t, err)
queue1.SetPushQueue(queue2)
assert.Equal(... | explode_data.jsonl/44668 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 607
} | [
2830,
3393,
16644,
7554,
1155,
353,
8840,
836,
8,
341,
54590,
11,
1848,
1669,
5264,
4526,
445,
9077,
497,
330,
27161,
497,
330,
8301,
25,
21,
18,
22,
24,
497,
220,
16,
11,
2092,
340,
6948,
35699,
1155,
11,
1848,
340,
46993,
16,
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 TestClientSubscribesTwice(t *testing.T) {
s := pubsub.NewServer()
s.SetLogger(log.TestingLogger())
s.Start()
defer s.Stop()
ctx := context.Background()
q := query.MustParse("tm.events.type='NewBlock'")
subscription1, err := s.Subscribe(ctx, clientID, q)
require.NoError(t, err)
err = s.PublishWithEvents(... | explode_data.jsonl/22058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 289
} | [
2830,
3393,
2959,
3136,
11592,
9433,
22816,
558,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
6675,
1966,
7121,
5475,
741,
1903,
4202,
7395,
12531,
8787,
287,
7395,
2398,
1903,
12101,
741,
16867,
274,
30213,
2822,
20985,
1669,
2266,
19047,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.