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 TestStrStrMap_UnmarshalValue(t *testing.T) {
type V struct {
Name string
Map *gmap.StrStrMap
}
// JSON
gtest.C(t, func(t *gtest.T) {
var v *V
err := gconv.Struct(map[string]interface{}{
"name": "john",
"map": []byte(`{"k1":"v1","k2":"v2"}`),
}, &v)
t.Assert(err, nil)
t.Assert(v.Name, "joh... | explode_data.jsonl/36018 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 420
} | [
2830,
3393,
2580,
2580,
2227,
40687,
27121,
1130,
1155,
353,
8840,
836,
8,
341,
13158,
647,
2036,
341,
197,
21297,
914,
198,
197,
26873,
220,
353,
70,
2186,
27318,
2580,
2227,
198,
197,
532,
197,
322,
4718,
198,
3174,
1944,
727,
1155,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewCSR(t *testing.T) {
kubeadmCert := KubeadmCertAPIServer
cfg := testutil.GetDefaultInternalConfig(t)
certConfig, err := kubeadmCert.GetConfig(cfg)
if err != nil {
t.Fatalf("couldn't get cert config: %v", err)
}
csr, _, err := NewCSR(&kubeadmCert, cfg)
if err != nil {
t.Errorf("invalid signature... | explode_data.jsonl/60270 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 364
} | [
2830,
3393,
3564,
70022,
1155,
353,
8840,
836,
8,
341,
16463,
392,
3149,
76,
36934,
1669,
62549,
3149,
76,
36934,
2537,
1637,
2836,
198,
50286,
1669,
1273,
1314,
2234,
3675,
11569,
2648,
1155,
692,
1444,
529,
2648,
11,
1848,
1669,
595,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTriInverse(t *testing.T) {
t.Parallel()
rnd := rand.New(rand.NewSource(1))
for _, kind := range []TriKind{Upper, Lower} {
for _, n := range []int{1, 3, 5, 9} {
data := make([]float64, n*n)
for i := range data {
data[i] = rnd.NormFloat64()
}
a := NewTriDense(n, kind, data)
var tr TriDens... | explode_data.jsonl/25861 | {
"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,
21884,
69179,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
7000,
303,
1669,
10382,
7121,
37595,
7121,
3608,
7,
16,
1171,
2023,
8358,
3093,
1669,
2088,
3056,
21884,
10629,
90,
14251,
11,
27536,
92,
341,
197,
2023,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSortingValue(t *testing.T) {
r := Response{name: "aaa", Star: 101, Watch: 102, Fork: 103, Issues: 104}
i := r.sortingValue(keyStar)
assert.Equal(t, i, 101)
i = r.sortingValue(keyWatch)
assert.Equal(t, i, 102)
i = r.sortingValue(keyFork)
assert.Equal(t, i, 103)
i = r.sortingValue(keyIssues)
assert.Equa... | explode_data.jsonl/46803 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
71681,
1130,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
5949,
47006,
25,
330,
32646,
497,
7679,
25,
220,
16,
15,
16,
11,
10357,
25,
220,
16,
15,
17,
11,
47850,
25,
220,
16,
15,
18,
11,
36443,
25,
220,
16,
15,
19,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewLifeCycleSysCC(t *testing.T) {
cryptoProvider, err := sw.NewDefaultSecurityLevelWithKeystore(sw.NewDummyKeyStore())
require.NoError(t, err)
scc := &SCC{
BuiltinSCCs: map[string]struct{}{"lscc": {}},
Support: &SupportImpl{GetMSPIDs: getMSPIDs},
ACLProvider: mockAclProvider,
GetM... | explode_data.jsonl/11796 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 365
} | [
2830,
3393,
3564,
25749,
44820,
32792,
3706,
1155,
353,
8840,
836,
8,
341,
1444,
9444,
5179,
11,
1848,
1669,
2021,
7121,
3675,
15352,
4449,
2354,
6608,
63373,
58902,
7121,
43344,
1592,
6093,
2398,
17957,
35699,
1155,
11,
1848,
340,
1903,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReceiveWithLongLivedCtx(t *testing.T) {
tt, err := obsreporttest.SetupTelemetry()
require.NoError(t, err)
t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) })
longLivedCtx, parentSpan := tt.TracerProvider.Tracer("test").Start(context.Background(), t.Name())
defer parentSpan.End()
... | explode_data.jsonl/57973 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 890
} | [
2830,
3393,
14742,
2354,
6583,
43,
2221,
23684,
1155,
353,
8840,
836,
8,
341,
3244,
83,
11,
1848,
1669,
7448,
11736,
1944,
39820,
6639,
35958,
741,
17957,
35699,
1155,
11,
1848,
340,
3244,
727,
60639,
18552,
368,
314,
1373,
35699,
1155,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseFilesWithData(t *testing.T) {
template, err := New("root").ParseFiles("testdata/tmpl1.tmpl", "testdata/tmpl2.tmpl")
if err != nil {
t.Fatalf("error parsing files: %v", err)
}
testExecute(templateFileExecTests, template, t)
} | explode_data.jsonl/71983 | {
"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,
14463,
10809,
80356,
1155,
353,
8840,
836,
8,
341,
22832,
11,
1848,
1669,
1532,
445,
2888,
1827,
14463,
10809,
445,
92425,
5523,
54010,
16,
33533,
500,
497,
330,
92425,
5523,
54010,
17,
33533,
500,
1138,
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... | 2 |
func TestSearch__fedachNameOnlySearchRequest(t *testing.T) {
u, _ := url.Parse("https://moov.io/fed/ach/search?name=Farmers")
req := readFEDSearchRequest(u)
if req.Name != "FARMERS" {
t.Errorf("req.Name=%s", req.Name)
}
if !req.nameOnly() {
t.Error("req is not name only")
}
} | explode_data.jsonl/71085 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
5890,
563,
51123,
610,
675,
7308,
5890,
1900,
1155,
353,
8840,
836,
8,
341,
10676,
11,
716,
1669,
2515,
8937,
445,
2428,
1110,
6355,
859,
4245,
6663,
291,
14,
610,
23167,
30,
606,
28,
70994,
388,
1138,
24395,
1669,
1349,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInitializeRemoteStorageDownloadIdentifierErrorOnGet(t *testing.T) {
require.NoError(t, os.MkdirAll("data", 0777))
defer os.RemoveAll("data")
s := DefaultServer()
injectedErr := errors.New("Injected error")
m := &remoteStorageMockingWrapper{
wrapped: memory.Open(),
fnGet: func(ctx context.Context, nam... | explode_data.jsonl/38338 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 221
} | [
2830,
3393,
9928,
24703,
5793,
11377,
8714,
1454,
1925,
1949,
1155,
353,
8840,
836,
8,
341,
17957,
35699,
1155,
11,
2643,
1321,
12438,
2403,
445,
691,
497,
220,
15,
22,
22,
22,
1171,
16867,
2643,
84427,
445,
691,
5130,
1903,
1669,
789... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRepoLoadingTemplates(t *testing.T) {
repo := NewRepository(nil)
err := repo.AddFile("simple", singleTemplate)
assert.NoError(t, err)
templ, err := repo.Get("simple")
assert.Nil(t, err)
var b bytes.Buffer
err = templ.Execute(&b, nil)
assert.Nil(t, err)
assert.Equal(t, "test", b.String())
} | explode_data.jsonl/49687 | {
"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,
25243,
8578,
51195,
1155,
353,
8840,
836,
8,
1476,
17200,
5368,
1669,
1532,
4624,
27907,
692,
9859,
1669,
15867,
1904,
1703,
445,
22944,
497,
3175,
7275,
340,
6948,
35699,
1155,
11,
1848,
692,
197,
74860,
11,
1848,
1669,
158... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSupportedDynamicResources(t *testing.T) {
tests := []struct {
testName string
resource v1alpha1.StepResource
expectedResult bool
}{
{
testName: "UnsupportedObject",
resource: v1alpha1.StepResource{
Kind: "UnsupportedKind",
},
expectedResult: false,
},
{
testName: "S... | explode_data.jsonl/37279 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 307
} | [
2830,
3393,
34636,
21752,
11277,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
18185,
675,
981,
914,
198,
197,
50346,
981,
348,
16,
7141,
16,
68402,
4783,
198,
197,
42400,
2077,
1807,
198,
197,
59403,
197,
197,
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 TestGetRedelegationsFromSrcValidator(t *testing.T) {
_, app, ctx := createTestInput()
addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0))
addrVals := simapp.ConvertAddrsToValAddrs(addrDels)
rd := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 0,
time.Unix(0, 0), sdk.NewInt(... | explode_data.jsonl/82051 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 396
} | [
2830,
3393,
1949,
6033,
68,
1937,
804,
3830,
20360,
14256,
1155,
353,
8840,
836,
8,
341,
197,
6878,
906,
11,
5635,
1669,
1855,
2271,
2505,
2822,
53183,
35,
2010,
1669,
1643,
676,
1904,
2271,
2212,
5428,
38311,
278,
11462,
11,
5635,
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 TestFileExists(t *testing.T) {
gitIgnoreFile := ".gitignore"
if _, err := fileExists(gitIgnoreFile); err == nil {
t.Errorf("fileExists(%s) was incorrect. Got: nil error, want: error file %s already exist", gitIgnoreFile, gitIgnoreFile)
}
} | explode_data.jsonl/7962 | {
"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,
1703,
15575,
1155,
353,
8840,
836,
8,
341,
90731,
12497,
1703,
1669,
5933,
12882,
13130,
698,
743,
8358,
1848,
1669,
1034,
15575,
3268,
275,
12497,
1703,
1215,
1848,
621,
2092,
341,
197,
3244,
13080,
445,
1192,
15575,
15238,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogDriverOptions(t *testing.T) {
taskEngine, done, _ := setupWithDefaultConfig(t)
defer done()
client, err := sdkClient.NewClientWithOpts(sdkClient.WithHost(endpoint),
sdkClient.WithVersion(sdkclientfactory.GetDefaultVersion().String()))
require.NoError(t, err, "Creating go docker client failed")
test... | explode_data.jsonl/39476 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 544
} | [
2830,
3393,
2201,
11349,
3798,
1155,
353,
8840,
836,
8,
341,
49115,
4571,
11,
2814,
11,
716,
1669,
6505,
2354,
3675,
2648,
1155,
340,
16867,
2814,
2822,
25291,
11,
1848,
1669,
45402,
2959,
7121,
2959,
2354,
43451,
1141,
7584,
2959,
2612... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMCP23017DriverCommandsWriteGPIOErrOLAT(t *testing.T) {
mcp, adaptor := initTestMCP23017DriverWithStubbedAdaptor(0)
gobottest.Assert(t, mcp.Start(), nil)
adaptor.i2cReadImpl = func(b []byte) (int, error) {
return len(b), nil
}
numCalls := 1
adaptor.i2cWriteImpl = func([]byte) (int, error) {
if numCall... | explode_data.jsonl/42318 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
44,
7123,
17,
18,
15,
16,
22,
11349,
30479,
7985,
26337,
7747,
1930,
828,
1155,
353,
8840,
836,
8,
341,
2109,
4672,
11,
91941,
1669,
2930,
2271,
44,
7123,
17,
18,
15,
16,
22,
11349,
2354,
33838,
2721,
2589,
32657,
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... | 1 |
func TestValidateEmptyAuthInfo(t *testing.T) {
config := clientcmdapi.NewConfig()
config.AuthInfos["error"] = &clientcmdapi.AuthInfo{}
test := configValidationTest{
config: config,
}
test.testAuthInfo("error", t)
test.testConfig(t)
} | explode_data.jsonl/13494 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
17926,
3522,
5087,
1731,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
2943,
8710,
2068,
7121,
2648,
741,
25873,
25233,
38059,
1183,
841,
1341,
284,
609,
2972,
8710,
2068,
25233,
1731,
16094,
18185,
1669,
2193,
13799,
2271,
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 |
func TestExtractStreamMetrics(t *testing.T) {
if os.Getenv("TEST_REDIS_URI") == "" {
t.Skipf("TEST_REDIS_URI not set - skipping")
}
addr := os.Getenv("TEST_REDIS_URI")
e, _ := NewRedisExporter(
addr,
Options{Namespace: "test", CheckSingleStreams: dbNumStrFull + "=" + TestStreamName},
)
c, err := redis.DialU... | explode_data.jsonl/47013 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 620
} | [
2830,
3393,
28959,
3027,
27328,
1155,
353,
8840,
836,
8,
341,
743,
2643,
64883,
445,
10033,
2192,
21202,
23116,
899,
621,
1591,
341,
197,
3244,
57776,
69,
445,
10033,
2192,
21202,
23116,
537,
738,
481,
42659,
1138,
197,
532,
53183,
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 TestTwoWildCardsMatching(t *testing.T) {
conf := config.NewConfig()
config.Set(conf)
assert := assert.New(t)
gwObject := data.AddServerToGateway(data.CreateServer([]string{"*"}, 80, "http", "http"),
data.CreateEmptyGateway("validgateway", "test", map[string]string{
"app": "real",
}))
// Another name... | explode_data.jsonl/54042 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 379
} | [
2830,
3393,
11613,
40603,
28448,
64430,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
2193,
7121,
2648,
741,
25873,
4202,
29879,
692,
6948,
1669,
2060,
7121,
1155,
692,
3174,
86,
1190,
1669,
821,
1904,
5475,
1249,
40709,
2592,
7251,
5475,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCombinedIterator(t *testing.T) {
testDBEnv := stateleveldb.NewTestVDBEnv(t)
defer testDBEnv.Cleanup()
db, err := testDBEnv.DBProvider.GetDBHandle("TestDB")
testutil.AssertNoError(t, err, "")
// populate db with initial data
batch := statedb.NewUpdateBatch()
batch.Put("ns", "key1", []byte("value1"), ve... | explode_data.jsonl/32420 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1543
} | [
2830,
3393,
94268,
11951,
1155,
353,
8840,
836,
8,
341,
18185,
3506,
14359,
1669,
1584,
3449,
783,
65,
7121,
2271,
53,
3506,
14359,
1155,
340,
16867,
1273,
3506,
14359,
727,
60639,
2822,
20939,
11,
1848,
1669,
1273,
3506,
14359,
22537,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDigiByteEncodeToBytes(t *testing.T) {
tests := []TestcaseEncode{
{
name: "P2PKH",
input: "DBfCffUdSbhqKZhjuvrJ6AgvJofT4E2kp4",
output: "76a91447825943ca6a936b177fdc7c9dc05251640169c288ac",
},
{
name: "P2SH",
input: "SUngTA1vaC2E62mbnc81Mdos3TcvZHwsVo",
output: "a91452356ed3d2d31e... | explode_data.jsonl/9958 | {
"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,
35,
29537,
7153,
32535,
1249,
7078,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
2271,
5638,
32535,
515,
197,
197,
515,
298,
11609,
25,
256,
330,
47,
17,
22242,
39,
756,
298,
22427,
25,
220,
330,
3506,
69,
34,
542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRetrieveEntity(t *testing.T) {
ts := httptest.NewServer(
http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
if strings.HasSuffix(r.URL.Path, "/v2") {
apiResourcesHandler(w, r)
} else {
if r.Header.Get("Accept") != "application/json" {
t.Fatal("Missing application/jso... | explode_data.jsonl/64658 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 605
} | [
2830,
3393,
87665,
3030,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
5475,
1006,
197,
28080,
89164,
1006,
298,
29244,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
571,
743,
9069,
16152,
40177,
2601,
20893,
174... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddTokensValidatorUnbonded(t *testing.T) {
validator := newValidator(t, valAddr1, pk1)
validator = validator.UpdateStatus(types.Unbonded)
validator, delShares := validator.AddTokensFromDel(sdk.NewInt(10))
assert.True(sdk.DecEq(t, sdk.NewDec(10), delShares))
assert.Equal(t, types.Unbonded, validator.Stat... | explode_data.jsonl/2330 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
2212,
29300,
14256,
1806,
64239,
291,
1155,
353,
8840,
836,
8,
1476,
197,
16112,
1669,
501,
14256,
1155,
11,
1044,
13986,
16,
11,
22458,
16,
340,
197,
16112,
284,
22935,
16689,
2522,
52613,
10616,
64239,
291,
340,
197,
16112... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServeMembersFails(t *testing.T) {
tests := []struct {
method string
wcode int
}{
{
"POST",
http.StatusMethodNotAllowed,
},
{
"PUT",
http.StatusMethodNotAllowed,
},
{
"DELETE",
http.StatusMethodNotAllowed,
},
{
"BAD",
http.StatusMethodNotAllowed,
},
}
for i, tt :... | explode_data.jsonl/74235 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
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... | 4 |
func TestWorldManager_CreateRo(t *testing.T) {
//roomMgr := NewRoomManager("testroom")
//fmt.Println(roomMgr)
//aoiMgr := NewAOIManager(0,500,5,0,500,5)
//fmt.Println(aoiMgr)
////WorldMgrObj.CreateRoom( "testroom", 1)
//WorldMgrObj.CreateRoom(roomMgr, 1)
//roomMgr2 := NewRoomManager("testroom2")
//
//WorldMgrO... | explode_data.jsonl/82627 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1010
} | [
2830,
3393,
10134,
2043,
34325,
38872,
1155,
353,
8840,
836,
8,
341,
197,
322,
2966,
25567,
1669,
1532,
14003,
2043,
445,
1944,
2966,
1138,
197,
322,
12501,
12419,
35850,
25567,
340,
197,
322,
3441,
72,
25567,
1669,
1532,
18746,
40,
204... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDropDatabase(t *testing.T) {
enginetest.TestScript(t, newDoltHarness(t), queries.ScriptTest{
Name: "Drop database engine tests for Dolt only",
SetUpScript: []string{
"CREATE DATABASE Test1db",
"CREATE DATABASE TEST2db",
},
Assertions: []queries.ScriptTestAssertion{
{
Query: "DROP DATAB... | explode_data.jsonl/38678 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 418
} | [
2830,
3393,
19871,
5988,
1155,
353,
8840,
836,
8,
341,
197,
826,
29876,
477,
8787,
5910,
1155,
11,
501,
35,
6181,
74248,
1155,
701,
19556,
52903,
2271,
515,
197,
21297,
25,
330,
19871,
4625,
4712,
7032,
369,
422,
6181,
1172,
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 TestFindImportRandRead(t *testing.T) {
withEmptyGoPath(func() {
file := filepath.Join(runtime.GOROOT(), "src/foo/x.go") // dummy
tests := []struct {
syms []string
want string
}{
{
syms: []string{"Read"},
want: "crypto/rand",
},
{
syms: []string{"Read", "NewZipf"},
want: "math/... | explode_data.jsonl/12427 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 422
} | [
2830,
3393,
9885,
11511,
56124,
4418,
1155,
353,
8840,
836,
8,
341,
46948,
3522,
10850,
1820,
18552,
368,
341,
197,
17661,
1669,
26054,
22363,
89467,
1224,
868,
53837,
1507,
330,
3548,
60555,
10776,
18002,
899,
442,
17292,
198,
197,
78216... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestMinDuration(t *testing.T) {
testCases := []struct {
testCase string
durations []time.Duration
expected time.Duration
}{
{
testCase: "empty slice",
expected: time.Duration(0),
},
{
testCase: "find min",
durations: []time.Duration{
time.Duration(1),
time.Duration(2),
time.... | explode_data.jsonl/31005 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 268
} | [
2830,
3393,
6217,
12945,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
18185,
4207,
220,
914,
198,
197,
2698,
21449,
3056,
1678,
33795,
198,
197,
42400,
220,
882,
33795,
198,
197,
59403,
197,
197,
515,
298,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestErrorBackend(t *testing.T) {
be := mem.New()
c, cleanup := TestNewCache(t)
defer cleanup()
h, data := randomData(5234142)
// save directly in backend
save(t, be, h, data)
testErr := errors.New("test error")
errBackend := loadErrorBackend{
Backend: be,
loadError: testErr,
}
loadTest := func... | explode_data.jsonl/62934 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 343
} | [
2830,
3393,
1454,
29699,
1155,
353,
8840,
836,
8,
341,
73142,
1669,
1833,
7121,
2822,
1444,
11,
21290,
1669,
3393,
3564,
8233,
1155,
340,
16867,
21290,
2822,
9598,
11,
821,
1669,
4194,
1043,
7,
20,
17,
18,
19,
16,
19,
17,
692,
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 TestScriptBuilderAddOp(t *testing.T) {
t.Parallel()
tests := []struct {
name string
opcodes []byte
expected []byte
}{
{
name: "push OP_0",
opcodes: []byte{OP_0},
expected: []byte{OP_0},
},
{
name: "push OP_1 OP_2",
opcodes: []byte{OP_1, OP_2},
expected: []byte{OP_1,... | explode_data.jsonl/66895 | {
"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,
5910,
3297,
2212,
7125,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
39703,
25814,
220,
3056,
3782,
198,
197,
42400,
3056,
3782,
198,
197,
59403,
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... | 8 |
func TestGetFile_checksum(t *testing.T) {
cases := []struct {
Append string
Err bool
}{
{
"",
false,
},
// MD5
{
"?checksum=md5:09f7e02f1290be211da707a266f153b3",
false,
},
{
"?checksum=md5:09f7e02f1290be211da707a266f153b4",
true,
},
// SHA1
{
"?checksum=sha1:1d22927192... | explode_data.jsonl/824 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 757
} | [
2830,
3393,
1949,
1703,
64038,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
197,
23877,
914,
198,
197,
197,
7747,
262,
1807,
198,
197,
59403,
197,
197,
515,
298,
197,
39680,
298,
36012,
345,
197,
197,
15766,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPatchConflicts(t *testing.T) {
s, clientSet, closeFn := setup(t)
defer closeFn()
ns := framework.CreateTestingNamespace("status-code", s, t)
defer framework.DeleteTestingNamespace(ns, s, t)
// Create the object we're going to conflict on
clientSet.CoreV1().Secrets(ns.Name).Create(&v1.Secret{
... | explode_data.jsonl/82639 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1115
} | [
2830,
3393,
43622,
15578,
56445,
1155,
353,
8840,
836,
8,
972,
1903,
11,
2943,
1649,
11,
3265,
24911,
1669,
6505,
1155,
1218,
16867,
3265,
24911,
18005,
84041,
1669,
12626,
7251,
16451,
22699,
445,
2829,
25261,
497,
274,
11,
259,
1218,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShuffle(t *testing.T) {
originalList := generateRandomIssues()
shuffledList := generateRandomIssues()
Shuffle(shuffledList, seed)
for i, _ := range originalList {
if originalList[i].Issue.Body == shuffledList[i].Issue.Body {
t.Error(
"LISTS HAVE NOT BEEN SHUFFLED",
"\n", "ORIGINAL:", original... | explode_data.jsonl/74259 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 163
} | [
2830,
3393,
2016,
13208,
1155,
353,
8840,
836,
8,
341,
197,
9889,
852,
1669,
6923,
13999,
85828,
741,
36196,
42335,
852,
1669,
6923,
13999,
85828,
741,
197,
2016,
13208,
23254,
42335,
852,
11,
10320,
692,
2023,
600,
11,
716,
1669,
2088,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestImportCardWithMultipleFaces(t *testing.T) {
cases := []struct {
name string
fixture io.Reader
want []card.Card
}{
{
name: "ImportMultipleCardsWithMultipleFaces",
fixture: fromFile(t, "testdata/card/multiple_cards_multiple_faces.json"),
want: []card.Card{
{
CardSetCode: "2ED... | explode_data.jsonl/37502 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1215
} | [
2830,
3393,
11511,
5770,
2354,
32089,
71940,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
1166,
12735,
6399,
47431,
198,
197,
50780,
262,
3056,
4951,
48613,
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 TestSuObjectEquals(t *testing.T) {
x := &SuObject{}
y := &SuObject{}
eq(t, x, y)
x.Add(One)
neq(t, x, y)
y.Add(One)
eq(t, x, y)
x.Set(SuInt(4), SuInt(6))
neq(t, x, y)
y.Set(SuInt(4), SuInt(7))
neq(t, x, y)
y.Set(SuInt(4), SuInt(6))
eq(t, x, y)
x.Set(SuInt(9), x) // recursive
neq(t, x, y)
y.Set(SuIn... | explode_data.jsonl/7118 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 271
} | [
2830,
3393,
36459,
1190,
4315,
1155,
353,
8840,
836,
8,
341,
10225,
1669,
609,
36459,
1190,
16094,
14522,
1669,
609,
36459,
1190,
16094,
7727,
80,
1155,
11,
856,
11,
379,
340,
10225,
1904,
7,
3966,
340,
197,
811,
80,
1155,
11,
856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSign(t *testing.T) {
pri := "0xf25ccbf8a1bb36594d5f63e9564ca4c5d965ccf8b418e8717f2f68b600cf6a34"
pub := "0xc4024ffd0b42495f49002b5da606512aee341c53e43a641b7d8efac8e29f6ed2d5c6449fe4343f41c5216a84ea9dd43e07daeeadb38556bb19527ce699394cd7"
priKey, err := LoadPrivateKey(pri)
if err != nil {
t.Error(err)
}
... | explode_data.jsonl/48739 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 419
} | [
2830,
3393,
7264,
1155,
353,
8840,
836,
8,
341,
3223,
461,
1669,
330,
15,
5848,
17,
20,
638,
13233,
23,
64,
16,
6066,
18,
21,
20,
24,
19,
67,
20,
69,
21,
18,
68,
24,
20,
21,
19,
924,
19,
66,
20,
67,
24,
21,
20,
638,
69,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvalidRetrieval(t *testing.T) {
tev, fl := initialize(t)
defer tev.tearDown()
it, num := fl.Iterator(&ab.SeekPosition{Type: &ab.SeekPosition_Specified{Specified: &ab.SeekSpecified{Number: 2}}})
assert.Equal(t, uint64(0), num, "Expected block number to be zero for invalid iterator")
_, status := it.Next... | explode_data.jsonl/35032 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 154
} | [
2830,
3393,
7928,
12020,
7231,
831,
1155,
353,
8840,
836,
8,
341,
197,
665,
85,
11,
1320,
1669,
9468,
1155,
340,
16867,
1013,
85,
31853,
59342,
2822,
23374,
11,
1629,
1669,
1320,
40846,
2099,
370,
76465,
3812,
90,
929,
25,
609,
370,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEmptyDisclosure(t *testing.T) {
// Disclosure request asking for an attribute value that the client doesn't have,
// and an empty conjunction as first option, which is always chosen by the test session handler
val := "client doesn't have this attr"
request := irma.NewDisclosureRequest()
request.Disclose =... | explode_data.jsonl/69989 | {
"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,
3522,
91065,
1155,
353,
8840,
836,
8,
341,
197,
322,
77254,
1681,
10161,
369,
458,
7035,
897,
429,
279,
2943,
3171,
944,
614,
345,
197,
322,
323,
458,
4287,
31446,
438,
1156,
2999,
11,
892,
374,
2677,
11882,
553,
279,
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 TestGetLocalPluginInMarketplace(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
samplePlugins := []*model.MarketplacePlugin{
{
BaseMarketplacePlugin: &model.BaseMarketplacePlugin{
HomepageURL: "https://example.com/mattermost/mattermost-plugin-nps",
IconData: "https://example.com/i... | explode_data.jsonl/27540 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2049
} | [
2830,
3393,
1949,
7319,
11546,
641,
38822,
2007,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
1903,
1516,
45378,
1669,
29838,
2528,
1321,
54560,
2007,
11546,
515,
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 TestHookNewRecordPre(t *testing.T) {
// Setup pi plugin
p, cleanup := newTestPiPlugin(t)
defer cleanup()
// Run tests
runProposalFormatTests(t, p.hookNewRecordPre)
} | explode_data.jsonl/4254 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 65
} | [
2830,
3393,
31679,
3564,
6471,
4703,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
8938,
9006,
198,
3223,
11,
21290,
1669,
501,
2271,
34767,
11546,
1155,
340,
16867,
21290,
2822,
197,
322,
6452,
7032,
198,
56742,
98637,
4061,
18200,
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 |
func TestAddToListItem(t *testing.T) {
l := NewList("A list")
if l.rootItem.desc != "A list" {
t.Fatalf("Expected root item description to be 'A list'. Got %v", l.rootItem.desc)
}
li1 := l.Add("First level item")
if len(l.rootItem.items) != 1 {
t.Fatalf("Expected length 1, got %d", len(l.rootItem.items))
}
l... | explode_data.jsonl/69495 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 272
} | [
2830,
3393,
2212,
15324,
1234,
1155,
353,
8840,
836,
8,
341,
8810,
1669,
1532,
852,
445,
32,
1140,
1138,
743,
326,
12576,
1234,
30514,
961,
330,
32,
1140,
1,
341,
197,
3244,
30762,
445,
18896,
3704,
1509,
4008,
311,
387,
364,
32,
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... | 6 |
func TestMax(t *testing.T) {
{
a := Bitmap{0x0, 0x0, 0x00000000000000f0}
v, ok := a.Max()
assert.True(t, ok)
assert.Equal(t, 64+64+7, int(v))
assert.False(t, a.Contains(v-4))
assert.True(t, a.Contains(v-3))
assert.True(t, a.Contains(v-2))
assert.True(t, a.Contains(v-1))
assert.True(t, a.Contains(v))... | explode_data.jsonl/39892 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 268
} | [
2830,
3393,
5974,
1155,
353,
8840,
836,
8,
341,
197,
515,
197,
11323,
1669,
17533,
90,
15,
87,
15,
11,
220,
15,
87,
15,
11,
220,
15,
87,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
69,
15,
532,
197,
5195,
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 TestLBAllocateFromCanaryWithNoMatchingServiceTierFails(t *testing.T) {
serverConfig := config.ServerConfig{
LoadBalance: config.LoadBalanceConfig{
ServiceTiers: []config.ServiceTier{
{
Name: serviceTier2Name,
UpstreamHosts: []string{upstreamRadiusHost2},
},
},
Canaries: []con... | explode_data.jsonl/12400 | {
"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,
34068,
75380,
3830,
6713,
658,
2354,
2753,
64430,
1860,
70684,
37,
6209,
1155,
353,
8840,
836,
8,
341,
41057,
2648,
1669,
2193,
22997,
2648,
515,
197,
197,
5879,
21190,
25,
2193,
13969,
21190,
2648,
515,
298,
91619,
51,
4813... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateSCMigrationRejection(t *testing.T) {
// given
suite := NewBrokerSuiteTest(t)
defer suite.TearDown()
id := "InstanceID-SCMigration"
resp := suite.CallAPI("PUT", fmt.Sprintf("oauth/cf-eu10/v2/service_instances/%s?accepts_incomplete=true&plan_id=7d55d31d-35ae-4438-bf13-6ffdfa107d9f&service_id=47c9dcbf... | explode_data.jsonl/8135 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 699
} | [
2830,
3393,
4289,
3540,
20168,
693,
7606,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
96572,
1669,
1532,
65545,
28000,
2271,
1155,
340,
16867,
16182,
836,
682,
4454,
741,
15710,
1669,
330,
2523,
915,
12,
3540,
20168,
1837,
34653,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFiles_Rename(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc("/v2/files/rename", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "POST")
testHeader(t, r, "Content-Type", "application/x-www-form-urlencoded")
fmt.Fprintln(w, `{"status":"OK"}`)
})
ctx := context.Background()
... | explode_data.jsonl/48318 | {
"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,
10809,
2568,
1840,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
85,
17,
33220,
10758,
606,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
18185,
3523,
1155,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetAccountID(t *testing.T) {
tt := test.Start(t)
defer tt.Finish()
action := makeTestAction()
aid := action.GetAccountID("4_asset_issuer")
tt.Assert.NoError(action.Err)
tt.Assert.Equal(
"GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H",
aid.Address(),
)
} | explode_data.jsonl/548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
1949,
7365,
915,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
1273,
12101,
1155,
340,
16867,
17853,
991,
18176,
741,
38933,
1669,
1281,
2271,
2512,
2822,
197,
3779,
1669,
1917,
2234,
7365,
915,
445,
19,
42299,
62,
66817,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestList(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
HandleListCDNFlavorsSuccessfully(t)
count := 0
err := List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
count++
actual, err := ExtractFlavors(page)
if err != nil {
t.Errorf("Failed to extract flavors: %v",... | explode_data.jsonl/7133 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 445
} | [
2830,
3393,
852,
1155,
353,
8840,
836,
8,
341,
70479,
39820,
9230,
741,
16867,
270,
94849,
37496,
9230,
2822,
197,
6999,
852,
6484,
45,
3882,
50485,
35959,
1155,
692,
18032,
1669,
220,
15,
271,
9859,
1669,
1759,
74138,
13860,
2959,
6011... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKubernetesMergeBlockingJobsMustHavePodQOSGuaranteed(t *testing.T) {
repo := "kubernetes/kubernetes"
jobs := c.AllStaticPresubmits([]string{repo})
sort.Slice(jobs, func(i, j int) bool {
return jobs[i].Name < jobs[j].Name
})
for _, job := range jobs {
// Only consider Pods that are merge-blocking
if j... | explode_data.jsonl/55583 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 224
} | [
2830,
3393,
42,
29827,
52096,
48266,
40667,
31776,
12116,
23527,
48,
3126,
16780,
277,
58250,
1155,
353,
8840,
836,
8,
341,
17200,
5368,
1669,
330,
74,
29827,
79587,
698,
12428,
5481,
1669,
272,
16764,
11690,
14367,
392,
44703,
10556,
917... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAltKeyring_Sign(t *testing.T) {
keyring, err := New(t.Name(), BackendTest, t.TempDir(), nil)
require.NoError(t, err)
uid := "jack"
_, _, err = keyring.NewMnemonic(uid, English, sdk.FullFundraiserPath, hd.Secp256k1)
require.NoError(t, err)
msg := []byte("some message")
sign, key, err := keyring.Sign(u... | explode_data.jsonl/73460 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
26017,
1592,
12640,
1098,
622,
1155,
353,
8840,
836,
8,
341,
23634,
12640,
11,
1848,
1669,
1532,
1155,
2967,
1507,
55260,
2271,
11,
259,
65009,
6184,
1507,
2092,
340,
17957,
35699,
1155,
11,
1848,
692,
197,
2423,
1669,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNodeAddresses(t *testing.T) {
// Note these instances have the same name
// (we test that this produces an error)
instances := make([]ec2.Instance, 2)
instances[0].PrivateDNSName = "instance1"
instances[0].PrivateIpAddress = "192.168.0.1"
instances[0].State.Name = "running"
instances[1].PrivateDNSName =... | explode_data.jsonl/65067 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 416
} | [
2830,
3393,
1955,
52290,
1155,
353,
8840,
836,
8,
341,
197,
322,
7036,
1493,
13121,
614,
279,
1852,
829,
198,
197,
322,
320,
896,
1273,
429,
419,
18644,
458,
1465,
340,
197,
47825,
1669,
1281,
10556,
757,
17,
12688,
11,
220,
17,
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... | 6 |
func TestPopulateSettingsMethod(t *testing.T) {
nreg := func(t *testing.T, conf *oidc.ConfigurationCollection) *driver.RegistryDefault {
c, reg := internal.NewFastRegistryWithMocks(t)
c.MustSet(config.ViperKeyDefaultIdentitySchemaURL, "file://stub/registration.schema.json")
c.MustSet(config.ViperKeyPublicBaseUR... | explode_data.jsonl/15853 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2523
} | [
2830,
3393,
11598,
6334,
6086,
3523,
1155,
353,
8840,
836,
8,
341,
9038,
1580,
1669,
2915,
1155,
353,
8840,
836,
11,
2335,
353,
588,
66,
17334,
6482,
8,
353,
12521,
89142,
3675,
341,
197,
1444,
11,
1217,
1669,
5306,
7121,
32174,
15603... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEscapingUrlInConfigurationFromUser(t *testing.T) {
inputDetails := config.ArtifactoryDetails{
Url: "http://localhost:8080/artifactory",
DistributionUrl: "http://localhost:8080/distribution",
User: "admin", Password: "password",
ApiKey: "", SshKeyPath: "", AccessToken: "",
Serv... | explode_data.jsonl/23163 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
36121,
14216,
2864,
641,
7688,
3830,
1474,
1155,
353,
8840,
836,
8,
341,
22427,
7799,
1669,
2193,
50064,
333,
2919,
7799,
515,
197,
197,
2864,
25,
1797,
330,
1254,
1110,
8301,
25,
23,
15,
23,
15,
55549,
333,
2919,
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,
1... | 1 |
func TestUnaligned(t *testing.T) {
const max = 8 // max offset (+1) to test
for _, c := range testVectors {
data := hexDecode(c.input)
input := make([]byte, len(data)+max)
output := make([]byte, len(data)+max)
for i := 0; i < max; i++ { // input offsets
for j := 0; j < max; j++ { // output offsets
s, _... | explode_data.jsonl/80523 | {
"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,
1806,
47142,
1155,
353,
8840,
836,
8,
341,
4777,
1932,
284,
220,
23,
442,
1932,
4347,
17973,
16,
8,
311,
1273,
198,
2023,
8358,
272,
1669,
2088,
1273,
84744,
341,
197,
8924,
1669,
12371,
32564,
1337,
10046,
340,
197,
22427... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFeatureDerivationNoColumnClause(t *testing.T) {
if os.Getenv("SQLFLOW_TEST_DB") != "" && os.Getenv("SQLFLOW_TEST_DB") != "mysql" {
t.Skip("skip TestFeatureDerivationNoColumnClause for tests not using mysql")
}
a := assert.New(t)
// Prepare feature derivation test table in MySQL.
db, err := NewDB("mysql:... | explode_data.jsonl/24028 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 416
} | [
2830,
3393,
13859,
22171,
39127,
2753,
2933,
28482,
1155,
353,
8840,
836,
8,
341,
743,
2643,
64883,
445,
6688,
46060,
11641,
16310,
899,
961,
1591,
1009,
2643,
64883,
445,
6688,
46060,
11641,
16310,
899,
961,
330,
12272,
1,
341,
197,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidTxProof(t *testing.T) {
cases := []struct {
txs Txs
}{
{Txs{{1, 4, 34, 87, 163, 1}}},
{Txs{{5, 56, 165, 2}, {4, 77}}},
{Txs{Tx("foo"), Tx("bar"), Tx("baz")}},
{makeTxs(20, 5)},
{makeTxs(7, 81)},
{makeTxs(61, 15)},
}
for h, tc := range cases {
txs := tc.txs
root := txs.Hash()
// ma... | explode_data.jsonl/57150 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 643
} | [
2830,
3393,
4088,
31584,
31076,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
3244,
18561,
350,
18561,
198,
197,
59403,
197,
197,
76025,
18561,
2979,
16,
11,
220,
19,
11,
220,
18,
19,
11,
220,
23,
22,
11,
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... | 4 |
func TestToEcode(t *testing.T) {
t.Run("input general grpc.Status", func(t *testing.T) {
gst := status.New(codes.Unknown, "unknown")
ec := ToEcode(gst)
assert.Equal(t, int(ecode.ServerErr), ec.Code())
assert.Equal(t, "-500", ec.Message())
assert.Len(t, ec.Details(), 0)
})
t.Run("input encode.Status", func... | explode_data.jsonl/58603 | {
"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,
1249,
36,
1851,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1355,
4586,
47900,
10538,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3174,
267,
1669,
2639,
7121,
1337,
2539,
69971,
11,
330,
16088,
1138,
197,
197,
757,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoSystemChain(t *testing.T) {
lf := ramledger.New(10)
consenters := make(map[string]consensus.Consenter)
consenters[conf.Orderer.OrdererType] = &mockConsenter{}
assert.Panics(t, func() { NewRegistrar(lf, consenters, mockCrypto()) }, "Should have panicked when starting without a system chain")
} | explode_data.jsonl/71397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
2753,
2320,
18837,
1155,
353,
8840,
836,
8,
341,
8810,
69,
1669,
17823,
50704,
7121,
7,
16,
15,
692,
197,
6254,
306,
388,
1669,
1281,
9147,
14032,
60,
6254,
13626,
94594,
1950,
340,
197,
6254,
306,
388,
58,
6135,
19664,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnflatten(t *testing.T) {
tts := []struct {
in string
out string
}{
{"json.key\t42", `{"key":42}`},
{"json[11]\t42", `[42]`},
{"json[\"11\"]\t42", `{"11":42}`},
{"json.k1.k2[11]\t42", `{"k1":{"k2":[42]}}`},
{"json.k1\t\"41\"\njson.k2\t42\njson.k3\t43", `{"k1":"41","k2":42,"k3":43}`},
{"json.... | explode_data.jsonl/22833 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 601
} | [
2830,
3393,
1806,
47066,
1155,
353,
8840,
836,
8,
341,
3244,
2576,
1669,
3056,
1235,
341,
197,
17430,
220,
914,
198,
197,
13967,
914,
198,
197,
59403,
197,
197,
4913,
2236,
4735,
4955,
19,
17,
497,
1565,
4913,
792,
788,
19,
17,
5541... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAll(t *testing.T) {
b := New(80)
if b.All() {
t.Error("All failed")
}
b.Set(10)
if b.All() {
t.Error("All failed")
}
b.SetAll()
if !b.All() {
t.Error("All failed")
}
b.Clear(17)
if b.All() {
t.Error("All failed")
}
} | explode_data.jsonl/73898 | {
"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,
2403,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
1532,
7,
23,
15,
692,
743,
293,
16764,
368,
341,
197,
3244,
6141,
445,
2403,
4641,
1138,
197,
630,
2233,
4202,
7,
16,
15,
692,
743,
293,
16764,
368,
341,
197,
3244,
6141,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func Test_SqlDatabaseContainerTrigger_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
t.Parallel()
parameters := gopter.DefaultTestParameters()
parameters.MaxSize = 10
properties := gopter.NewProperties(parameters)
properties.Property(
"Round trip of SqlDatabaseContainerTrigger via JSON returns original... | explode_data.jsonl/18742 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 154
} | [
2830,
3393,
1098,
1470,
5988,
4502,
17939,
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,
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... | 1 |
func TestGraphInstallTimeout(t *testing.T) {
fkc := fakeKubernetesClientset(t, DefaultK8sNamespace, testCharts)
cfg := fakeHelmConfiguration(t)
m := Manager{
LogF: t.Logf,
K8c: fkc,
HCfg: cfg,
}
ChartWaitPollInterval = 1 * time.Second
cb := func(c Chart) InstallCallbackAction {
if c.Name() != testCharts[... | explode_data.jsonl/69445 | {
"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,
11212,
24690,
7636,
1155,
353,
8840,
836,
8,
341,
1166,
31378,
1669,
12418,
42,
29827,
2959,
746,
1155,
11,
7899,
42,
23,
82,
22699,
11,
1273,
64878,
340,
50286,
1669,
12418,
39,
23162,
7688,
1155,
340,
2109,
1669,
10567,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFirstLine(t *testing.T) {
filename, err := fs.TempFilenameWithText(longFirstLine)
assert.Nil(t, err)
defer os.Remove(filename)
val, err := FirstLine(filename)
assert.Nil(t, err)
assert.Equal(t, longLine, val)
} | explode_data.jsonl/37833 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
5338,
2460,
1155,
353,
8840,
836,
8,
341,
66434,
11,
1848,
1669,
8619,
65009,
20759,
2354,
1178,
12628,
5338,
2460,
340,
6948,
59678,
1155,
11,
1848,
340,
16867,
2643,
13270,
10961,
692,
19302,
11,
1848,
1669,
5512,
2460,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOneOfValidation(t *testing.T) {
validate := New()
passSpecs := []struct {
f interface{}
t string
}{
{f: "red", t: "oneof=red green"},
{f: "green", t: "oneof=red green"},
{f: 5, t: "oneof=5 6"},
{f: 6, t: "oneof=5 6"},
{f: int8(6), t: "oneof=5 6"},
{f: int16(6), t: "oneof=5 6"},
{f: int32(... | explode_data.jsonl/77288 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 781
} | [
2830,
3393,
3966,
2124,
13799,
1155,
353,
8840,
836,
8,
341,
197,
7067,
1669,
1532,
2822,
41431,
8327,
82,
1669,
3056,
1235,
341,
197,
1166,
3749,
16094,
197,
3244,
914,
198,
197,
59403,
197,
197,
90,
69,
25,
330,
1151,
497,
259,
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 TestAuthzCheckAuthRequired(t *testing.T) {
t.Parallel()
checker := NewMiddleware()
check := func(ctx context.Context, req interface{}) (interface{}, error) {
return nil, fleet.NewAuthRequiredError("required")
}
check = checker.AuthzCheck()(check)
_, err := check(context.Background(), struct{}{})
assert... | explode_data.jsonl/24359 | {
"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,
5087,
89,
3973,
5087,
8164,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
25157,
261,
1669,
1532,
24684,
2822,
25157,
1669,
2915,
7502,
2266,
9328,
11,
4232,
3749,
28875,
320,
4970,
22655,
1465,
8,
341,
197,
853,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddOnlyHash(t *testing.T) {
is := is.New(t)
s := NewShell(shellUrl)
s.SetTimeout(1 * time.Second)
rand := randString(32)
mhash, err := s.Add(bytes.NewBufferString(rand), OnlyHash(true))
is.Nil(err)
_, err = s.Cat(mhash)
is.Err(err) // we expect an http timeout error because `cat` won't find the `ran... | explode_data.jsonl/61072 | {
"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,
2212,
7308,
6370,
1155,
353,
8840,
836,
8,
341,
19907,
1669,
374,
7121,
1155,
340,
1903,
1669,
1532,
25287,
93558,
2864,
340,
1903,
4202,
7636,
7,
16,
353,
882,
32435,
692,
7000,
437,
1669,
10382,
703,
7,
18,
17,
692,
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 TestTxOut_IsSpendable(t *testing.T) {
script := script.NewScriptRaw([]byte{
opcodes.OP_DUP,
opcodes.OP_HASH160,
0x14,
0x41, 0xc5, 0xda, 0x42, 0x2d,
0x1d, 0x3e, 0x6c, 0x06, 0xaf,
0xb1, 0x9c, 0xa6, 0x2d, 0x83,
0xb1, 0x57, 0xfc, 0x93, 0x55,
opcodes.OP_EQUALVERIFY,
opcodes.OP_CHECKSIG})
txout := Ne... | explode_data.jsonl/38883 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 240
} | [
2830,
3393,
31584,
2662,
31879,
50,
3740,
480,
1155,
353,
8840,
836,
8,
341,
86956,
1669,
5316,
7121,
5910,
20015,
10556,
3782,
515,
197,
39703,
25814,
81563,
1557,
3124,
345,
197,
39703,
25814,
81563,
32309,
16,
21,
15,
345,
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 TestMocker_ModifyWebhook(t *testing.T) {
t.Run("success", func(t *testing.T) {
m, s := NewSession(t)
data := api.ModifyWebhookData{Name: option.NewString("abc")}
expect := discord.Webhook{
ID: 456,
Name: "abc",
ChannelID: 456,
User: discord.User{ID: 789},
}
m.ModifyWebhoo... | explode_data.jsonl/49379 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 458
} | [
2830,
3393,
11571,
261,
71485,
1437,
5981,
20873,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5630,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
2109,
11,
274,
1669,
1532,
5283,
1155,
692,
197,
8924,
1669,
6330,
23127,
1437,
5981... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRootMetadataV2AddKeyGenerationKeylessUsers(t *testing.T) {
uid1 := keybase1.MakeTestUID(1)
uid2 := keybase1.MakeTestUID(2)
uid3 := keybase1.MakeTestUID(3)
updatedWriterKeys := UserDevicePublicKeys{
uid1: {},
uid2: {},
}
updatedReaderKeys := UserDevicePublicKeys{
uid3: {},
}
tlfID := tlf.FakeID... | explode_data.jsonl/8467 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 679
} | [
2830,
3393,
8439,
14610,
53,
17,
2212,
1592,
37138,
1592,
1717,
7137,
1155,
353,
8840,
836,
8,
341,
197,
2423,
16,
1669,
1376,
3152,
16,
50133,
2271,
6463,
7,
16,
340,
197,
2423,
17,
1669,
1376,
3152,
16,
50133,
2271,
6463,
7,
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 TestGetAptPackages(t *testing.T) {
testCases := []struct {
descrip string
path string
expected map[string]util.PackageInfo
err bool
}{
{
descrip: "no directory",
path: "testDirs/notThere",
expected: map[string]util.PackageInfo{},
err: true,
},
{
descrip: "no pack... | explode_data.jsonl/9606 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 472
} | [
2830,
3393,
1949,
32,
417,
69513,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
52912,
740,
79,
220,
914,
198,
197,
26781,
257,
914,
198,
197,
42400,
2415,
14032,
60,
1314,
49834,
1731,
198,
197,
9859,
414,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestManager_GetFlowList(t *testing.T) {
log.SetLevel(log.DebugLevel)
config := tpflow.Configs{FlowStorageDir: "./flows"}
man, err := NewManager(config)
if err != nil {
t.Error(err)
}
man.LoadAllFlowsFromStorage()
flows := man.GetFlowList()
t.Log(flows)
if len(flows) == 0 {
t.Error("List is empty.")
}... | explode_data.jsonl/28850 | {
"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,
2043,
13614,
18878,
852,
1155,
353,
8840,
836,
8,
341,
6725,
4202,
4449,
12531,
20345,
4449,
340,
25873,
1669,
18101,
4965,
10753,
82,
90,
18878,
5793,
6184,
25,
5924,
38140,
16707,
197,
1515,
11,
1848,
1669,
1532,
2043,
875... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateDeveloperHeaderNoTime(t *testing.T) {
testServer(func(s *core.Server) {
headers := make(map[string]string)
headers["X-Access-Token"] = "Z0FBQUFBQlJvMVAtdnNqS1c2dkNNVlRJSjF6Q2x4LW5YaElCRWVvZ00yRE1UaU9nc0huU0hMVUVYRGNoX2ZzUHBQczhZSk9yaTJXOHNpZWl6R21RSmp4SnlPSVJNTDF2TWc9PQ=="
res, err := testHTTPRequ... | explode_data.jsonl/42205 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 317
} | [
2830,
3393,
4021,
44911,
4047,
2753,
1462,
1155,
353,
8840,
836,
8,
341,
18185,
5475,
18552,
1141,
353,
2153,
22997,
8,
341,
197,
67378,
1669,
1281,
9147,
14032,
30953,
340,
197,
67378,
1183,
55,
12,
6054,
89022,
1341,
284,
330,
57,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFybrikApplicationWithInvalidAppInfo(t *testing.T) {
t.Parallel()
g := gomega.NewGomegaWithT(t)
// Set the logger to development mode for verbose logs.
logf.SetLogger(zap.New(zap.UseDevMode(true)))
namespaced := types.NamespacedName{
Name: "application-with-errors",
Namespace: "default",
}
fi... | explode_data.jsonl/45028 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 508
} | [
2830,
3393,
37,
84307,
20411,
4988,
2354,
7928,
2164,
1731,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
692,
197,
322,
2573,
279,
5925,
311,
4401,
3856,
369,
13694,
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... | 1 |
func TestFixSinkProtocol(t *testing.T) {
t.Parallel()
// Test fixing the protocol in the configuration.
configTestCases := []struct {
info *ChangeFeedInfo
expectedProtocol config.Protocol
}{
{
info: &ChangeFeedInfo{
SinkURI: "mysql://root:test@127.0.0.1:3306/",
Config: &config.ReplicaC... | explode_data.jsonl/10734 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1631
} | [
2830,
3393,
25958,
45094,
20689,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
3393,
35251,
279,
11507,
304,
279,
6546,
624,
25873,
2271,
37302,
1669,
3056,
1235,
341,
197,
27043,
1797,
353,
4072,
28916,
1731,
198,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRequest_SetParams(t *testing.T) {
testCases := []struct {
name string
success bool
request *Request
expected string
}{
{
name: "Set params : string",
success: true,
request: NewRequest().SetParams("test"),
expected: `{"jsonrpc": "2.0", "method": "", "params": "test"}`,
},
... | explode_data.jsonl/66300 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 943
} | [
2830,
3393,
1900,
14812,
4870,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
30553,
220,
1807,
198,
197,
23555,
220,
353,
1900,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
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 TestBuzzerDriverOnError(t *testing.T) {
a := newGpioTestAdaptor()
d := initTestBuzzerDriver(a)
a.TestAdaptorDigitalWrite(func(string, byte) (err error) {
return errors.New("write error")
})
gobottest.Assert(t, d.On(), errors.New("write error"))
} | explode_data.jsonl/5910 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
33,
91447,
11349,
74945,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
501,
38,
11917,
2271,
2589,
32657,
741,
2698,
1669,
2930,
2271,
33,
91447,
11349,
2877,
340,
11323,
8787,
2589,
32657,
38112,
7985,
18552,
3609,
11,
4922,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewAPITokenCredential(t *testing.T) {
cred := NewAPITokenCredential("john.doe@example.com", "apitoken")
if cred.Email() != "john.doe@example.com"+"/token" {
t.Fatalf("APITokenCredential: email not match")
}
if cred.Secret() != "apitoken" {
t.Fatalf("APITokenCredential: secret not match")
}
} | explode_data.jsonl/27983 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 128
} | [
2830,
3393,
3564,
2537,
952,
1679,
48265,
1155,
353,
8840,
836,
8,
341,
197,
10844,
1669,
1532,
2537,
952,
1679,
48265,
445,
47817,
950,
4644,
35487,
905,
497,
330,
391,
275,
1679,
5130,
743,
4187,
24066,
368,
961,
330,
47817,
950,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoteNonceChange(t *testing.T) {
ms, account := create()
nn := make([]bool, 10)
for i := range nn {
nn[i] = true
}
account.nonces = append(account.nonces, nn...)
ms.NewNonce(addr)
ms.StateDB.stateObjects[addr].data.Nonce = 200
nonce := ms.NewNonce(addr)
if nonce != 200 {
t.Error("expected nonce ... | explode_data.jsonl/57786 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 247
} | [
2830,
3393,
24703,
90528,
4072,
1155,
353,
8840,
836,
8,
341,
47691,
11,
2692,
1669,
1855,
741,
197,
7370,
1669,
1281,
10556,
2641,
11,
220,
16,
15,
340,
2023,
600,
1669,
2088,
10883,
341,
197,
197,
7370,
989,
60,
284,
830,
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 TestBuildImageTag(t *testing.T) {
buildTarget := "//:skaffold_example.tar"
imageTag := buildImageTag(buildTarget)
testutil.CheckDeepEqual(t, "bazel:skaffold_example", imageTag)
} | explode_data.jsonl/126 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 68
} | [
2830,
3393,
11066,
1906,
5668,
1155,
353,
8840,
836,
8,
341,
69371,
6397,
1669,
35574,
25,
4886,
2649,
813,
39304,
28048,
1837,
31426,
5668,
1669,
1936,
1906,
5668,
43333,
6397,
692,
18185,
1314,
10600,
33464,
2993,
1155,
11,
330,
42573,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNextBackoff(t *testing.T) {
cases := []struct {
currentBackoff float64
min float64
max float64
}{
{0.0, 0.5, 1.15},
{5.0, 5.0, 16},
{120, 120, 120},
}
for _, c := range cases {
t.Run(fmt.Sprintf("case %v", c.currentBackoff), func(t *testing.T) {
next := nextBackoff(c... | explode_data.jsonl/76335 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 254
} | [
2830,
3393,
5847,
3707,
1847,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
20121,
3707,
1847,
2224,
21,
19,
198,
197,
25320,
310,
2224,
21,
19,
198,
197,
22543,
310,
2224,
21,
19,
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 TestCreateCommandSubjects(t *testing.T) {
assert := assert.New(t)
cli := test.NewMockCLI()
client := cli.Client.(*client.MockClient)
client.On("CreateRoleBinding", mock.Anything).Return(nil)
// No user or group provided
cmd := CreateCommand(cli)
require.NoError(t, cmd.Flags().Set("role", "admin"))
_, err ... | explode_data.jsonl/27980 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 317
} | [
2830,
3393,
4021,
4062,
90417,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
86448,
1669,
1273,
7121,
11571,
63959,
741,
25291,
1669,
21348,
11716,
41399,
2972,
24664,
2959,
340,
25291,
8071,
445,
4021,
9030,
15059,
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 Test2Align(t *testing.T) {
table := [][]int{
[]int{5, 0},
[]int{10,4} }
expected := 10
cost, alignments, err := SolveDP2(2, 2, table)
if err != nil {
t.Fatal(err)
}
if cost != expected {
for _, ali := range alignments {
t.Logf("%s",ali)
}
t.Fatalf("Found Score of %d. Expected %d.",cost,expe... | explode_data.jsonl/36062 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
17,
10069,
1155,
353,
8840,
836,
8,
1476,
26481,
1669,
52931,
396,
515,
197,
197,
1294,
396,
90,
20,
11,
220,
15,
1583,
197,
197,
1294,
396,
90,
16,
15,
11,
19,
92,
555,
42400,
1669,
220,
16,
15,
198,
1444,
535,
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... | 4 |
func TestFmtCurrency(t *testing.T) {
tests := []struct {
num float64
v uint64
currency currency.Type
expected string
}{
// {
// num: 1123456.5643,
// v: 2,
// currency: currency.USD,
// expected: "$1,123,456.56",
// },
// {
// num: 1123456.5643,
// v: ... | explode_data.jsonl/1298 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 818
} | [
2830,
3393,
93322,
26321,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
22431,
414,
2224,
21,
19,
198,
197,
5195,
286,
2622,
21,
19,
198,
197,
1444,
5088,
11413,
10184,
198,
197,
42400,
914,
198,
197,
59403,
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 TestEncrypt(t *testing.T) {
seed, err := seedwords.RandomSeed()
if err != nil {
t.Error(err)
return
}
t0 := time.Now()
se := seed.Encrypt([]byte("password"))
t1 := time.Now()
fmt.Printf("Time spent encrypting: %s\n", t1.Sub(t0))
if seed1, err := se.Decrypt([]byte("password"), false); err != nil {
t.E... | explode_data.jsonl/30815 | {
"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,
61520,
1155,
353,
8840,
836,
8,
341,
197,
22602,
11,
1848,
1669,
10320,
5761,
26709,
41471,
741,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
853,
198,
197,
532,
3244,
15,
1669,
882,
13244,
741,
84686,
1669,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestIsSupportedKubernetesFileExtension(t *testing.T) {
tests := []struct {
name string
filename string
expected bool
}{
{
name: "valid k8 yaml filename format",
filename: "test1.yaml",
expected: true,
},
{
name: "valid k8 json filename format",
filename: "test1.json",
ex... | explode_data.jsonl/20054 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 347
} | [
2830,
3393,
3872,
34636,
42,
29827,
1703,
12049,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
66434,
914,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
257,
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... | 2 |
func TestInstanceClient(t *testing.T) {
const name = "test-instance"
client, _, shutdownServer := getFreshApiserverAndClient(t, func() runtime.Object {
return &servicecatalog.ServiceInstance{}
})
defer shutdownServer()
if err := testInstanceClient(client, name); err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/51885 | {
"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,
2523,
2959,
1155,
353,
8840,
836,
8,
341,
4777,
829,
284,
330,
1944,
73655,
698,
25291,
11,
8358,
23766,
5475,
1669,
633,
55653,
91121,
2836,
3036,
2959,
1155,
11,
2915,
368,
15592,
8348,
341,
197,
853,
609,
7936,
26539,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRandomData(t *testing.T) {
var lstr string
defer func() {
if v := recover(); v != nil {
println("'" + hex.Dump([]byte(lstr)) + "'")
println(lstr)
panic(v)
}
}()
data := []byte(`"�-mp�`)
_, err := ast.NewParser(string(data)).Parse()
if ... | explode_data.jsonl/62342 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 401
} | [
2830,
3393,
13999,
1043,
1155,
353,
8840,
836,
8,
341,
262,
762,
326,
495,
914,
198,
262,
17956,
2915,
368,
341,
286,
421,
348,
1669,
11731,
2129,
348,
961,
2092,
341,
310,
13751,
67393,
488,
12371,
909,
1510,
10556,
3782,
2333,
495,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDiscoverNoNodes(t *testing.T) {
nodename := "stringThatIsNotInTheListOfServers"
servers := []string{
"notwhatwewant1",
"alsoNotwhatWeWant",
"notwhatwewant2",
}
port, cleanup := startFakeNetbootServers(t, servers)
defer cleanup()
c := newClientWithPorts(port, port+1)
_, err := c.Discover(context.B... | explode_data.jsonl/78499 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 158
} | [
2830,
3393,
50002,
2753,
12288,
1155,
353,
8840,
836,
8,
341,
9038,
347,
1840,
1669,
330,
917,
4792,
3872,
2623,
86093,
64090,
78139,
698,
1903,
18729,
1669,
3056,
917,
515,
197,
197,
1,
1921,
12555,
86,
365,
517,
16,
756,
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... | 2 |
func TestRetryEmptyServerList(t *testing.T) {
forwarder, err := forward.New()
if err != nil {
t.Fatalf("Error creating forwarder: %s", err)
}
loadBalancer, err := roundrobin.New(forwarder)
if err != nil {
t.Fatalf("Error creating load balancer: %s", err)
}
// The EmptyBackendHandler middleware ensures that... | explode_data.jsonl/44114 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 352
} | [
2830,
3393,
51560,
3522,
5475,
852,
1155,
353,
8840,
836,
8,
341,
2023,
1606,
261,
11,
1848,
1669,
4637,
7121,
741,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
1454,
6825,
4637,
261,
25,
1018,
82,
497,
1848,
340,
197,
630,
493... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIpcConnRefused(t *testing.T) {
switch runtime.GOOS {
case "plan9":
t.Skip("IPC not supported on Plan9")
default:
tt.TestConnRefused(t)
}
} | explode_data.jsonl/40691 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 66
} | [
2830,
3393,
40,
3992,
9701,
3945,
2591,
1155,
353,
8840,
836,
8,
341,
8961,
15592,
97574,
3126,
341,
2722,
330,
10393,
24,
4660,
197,
3244,
57776,
445,
62119,
537,
7248,
389,
9680,
24,
1138,
11940,
510,
197,
3244,
83,
8787,
9701,
3945... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceImpl_Infof_WhenLogLevelIsInfo_ShouldLog(t *testing.T) {
// Setup fixture and expectations
actual := ""
tests := []struct {
logLevel string
fn loggerSelector
formatFixture string
vFixture []interface{}
expected string
}{
// Log level set to info
{
"iNfo",
... | explode_data.jsonl/44600 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 662
} | [
2830,
3393,
50603,
39624,
69,
62,
4498,
72676,
3872,
1731,
36578,
616,
2201,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
12507,
323,
16665,
198,
88814,
1669,
8389,
78216,
1669,
3056,
1235,
341,
197,
6725,
4449,
414,
914,
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 TestFilterCustomQuery(t *testing.T) {
mt.ParallelTest(t, versions, isReady,
func(t *testing.T, i mt.Instance) {
p := &Postgres{}
addr := fmt.Sprintf("postgres://postgres@%v:%v/postgres?sslmode=disable&x-custom=foobar", i.Host(), i.Port())
d, err := p.Open(addr)
if err != nil {
t.Fatalf("%v", err... | explode_data.jsonl/70108 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 161
} | [
2830,
3393,
5632,
10268,
2859,
1155,
353,
8840,
836,
8,
341,
2109,
83,
41288,
7957,
2271,
1155,
11,
10795,
11,
374,
19202,
345,
197,
29244,
1155,
353,
8840,
836,
11,
600,
11965,
12688,
8,
341,
298,
3223,
1669,
609,
4133,
17818,
16094,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckForDevices(t *testing.T) {
req := checkForDevices()
resp = &http.Response{
Header: http.Header{
"Set-Cookie": []string{"test=value; Domain=example.com; Path=/; Secure; HttpOnly"},
},
}
require.Equal(t, "https://authenticator.pingone.com/pingid/ppm/devices", req.URL.String())
require.Equal(t, ... | explode_data.jsonl/4332 | {
"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,
3973,
2461,
40835,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
1779,
2461,
40835,
2822,
34653,
284,
609,
1254,
12574,
515,
197,
197,
4047,
25,
1758,
15753,
515,
298,
197,
1,
1649,
7658,
9619,
788,
3056,
917,
4913,
1944,
465... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConnectionStateCallback(t *testing.T) {
lim := test.TimeOut(time.Second * 5)
defer lim.Stop()
report := test.CheckRoutines(t)
defer report()
var wg sync.WaitGroup
wg.Add(2)
timeoutDuration := time.Second
KeepaliveInterval := time.Duration(0)
cfg := &AgentConfig{
Urls: []*URL{},
Tri... | explode_data.jsonl/50568 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 694
} | [
2830,
3393,
4526,
1397,
7494,
1155,
353,
8840,
836,
8,
341,
197,
4659,
1669,
1273,
16299,
2662,
9730,
32435,
353,
220,
20,
340,
16867,
4568,
30213,
2822,
69931,
1669,
1273,
10600,
49,
28628,
1155,
340,
16867,
1895,
2822,
2405,
63581,
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... | 2 |
func TestHbdmSwap_GetUnfinishFutureOrders(t *testing.T) {
t.Log(swap.GetUnfinishFutureOrders(goex.NewCurrencyPair2("DOT_USD"), goex.SWAP_CONTRACT))
} | explode_data.jsonl/43255 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 67
} | [
2830,
3393,
39,
8940,
76,
46179,
13614,
1806,
30150,
24206,
24898,
1155,
353,
8840,
836,
8,
341,
3244,
5247,
1141,
21726,
2234,
1806,
30150,
24206,
24898,
47415,
327,
7121,
26321,
12443,
17,
445,
32553,
13467,
35,
3975,
728,
327,
808,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestMinimalRuntimeConfig(t *testing.T) {
dir, err := ioutil.TempDir(testDir, "minimal-runtime-config-")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(dir)
proxyPath := path.Join(dir, "proxy")
hypervisorPath := path.Join(dir, "hypervisor")
defaultHypervisorPath = hypervisorPath
jailerPath := path.Joi... | explode_data.jsonl/11726 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1456
} | [
2830,
3393,
88328,
15123,
2648,
1155,
353,
8840,
836,
8,
341,
48532,
11,
1848,
1669,
43144,
65009,
6184,
8623,
6184,
11,
330,
92607,
68912,
25130,
12,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
2643,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestManyVariousPathCounts(t *testing.T) {
jsonStr := `{"a":"a","b":"b","c":"c"}`
counts := []int{3, 4, 7, 8, 9, 15, 16, 17, 31, 32, 33, 63, 64, 65, 127,
128, 129, 255, 256, 257, 511, 512, 513}
paths := []string{"a", "b", "c"}
expects := []string{"a", "b", "c"}
for _, count := range counts {
var gpaths []s... | explode_data.jsonl/43418 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 335
} | [
2830,
3393,
8441,
72641,
1820,
63731,
1155,
353,
8840,
836,
8,
341,
30847,
2580,
1669,
1565,
4913,
64,
3252,
64,
2198,
65,
3252,
65,
2198,
66,
3252,
66,
9207,
3989,
18032,
82,
1669,
3056,
396,
90,
18,
11,
220,
19,
11,
220,
22,
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... | 6 |
func TestSuccess(t *testing.T) {
signer := &HmacSigner{
Key: []byte("NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j"),
}
queryString := []byte("symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559")
s := signer.Sign(queryString)
if s !=... | explode_data.jsonl/13302 | {
"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,
7188,
1155,
353,
8840,
836,
8,
341,
69054,
261,
1669,
609,
39,
11948,
7264,
261,
515,
197,
55242,
25,
3056,
3782,
445,
79759,
80,
34856,
2277,
97489,
56,
67,
42,
73,
53,
39,
73,
32,
22,
47,
57,
73,
19,
44,
709,
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... | 2 |
func TestScheduler_Start(t *testing.T) {
// We use tarawa runAt because it could expose some weird runAt math if by accident some code
// relied on the local TZ.
s := NewWithLocation(10, monitoring.NewRegistry(), tarawaTime())
defer s.Stop()
executed := make(chan string)
preAddEvents := uint32(10)
s.Add(testSc... | explode_data.jsonl/68483 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 930
} | [
2830,
3393,
38878,
38056,
1155,
353,
8840,
836,
8,
341,
197,
322,
1205,
990,
12183,
14077,
1598,
1655,
1576,
432,
1410,
28141,
1045,
16283,
1598,
1655,
6888,
421,
553,
11423,
1045,
2038,
198,
197,
322,
39913,
389,
279,
2205,
87105,
624,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCases(t *testing.T) {
var marshalCases = []struct {
Name string
Value interface{}
Expected string
}{
{
"with enum in root",
&MessageWithRootEnum{
Field: RootEnum_DEF,
},
"<MessageWithRootEnum><Field>DEF</Field></MessageWithRootEnum>",
},
{
"with nested enum",
&Messag... | explode_data.jsonl/19610 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 798
} | [
2830,
3393,
37302,
1155,
353,
8840,
836,
8,
341,
2405,
60771,
37302,
284,
3056,
1235,
341,
197,
21297,
257,
914,
198,
197,
47399,
262,
3749,
16094,
197,
197,
18896,
914,
198,
197,
59403,
197,
197,
515,
298,
197,
1,
4197,
7618,
304,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseFileInclude(t *testing.T) {
p := NewParser(nil)
err := p.ParseFile("testdata/valid00.ini")
if err != nil {
t.Errorf("unexpected error: %v", err)
}
expected := map[string]map[string]string{
"valid00": {
"valid00 L0": "valid00 V0",
"valid00 L1": "valid00 V1",
},
"include00": {
"includ... | explode_data.jsonl/49359 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
14463,
1703,
22283,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1532,
6570,
27907,
340,
9859,
1669,
281,
8937,
1703,
445,
92425,
14,
1891,
15,
15,
34958,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
53859,
1465,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRuleIn(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := []string{
`select id from t where num in(1,2,3);`,
`SELECT * FROM tbl WHERE col IN (NULL)`,
`SELECT * FROM tbl WHERE col NOT IN (NULL)`,
}
common.Config.MaxInCount = 0
for _, sql := range sqls {
q, e... | explode_data.jsonl/76820 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 270
} | [
2830,
3393,
11337,
641,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
3056,
917,
515,
197,
197,
63,
1742,
877,
504,
259,
1380,
1629,
304,
7,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.