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 TestIntLimit(t *testing.T) {
const (
min = 0
max = 10
)
cases := []struct {
n int
expected int
}{
{5, 5},
{-1, 0},
{11, 10},
}
for _, c := range cases {
assert.Equal(t, c.expected, LimitInt(c.n, min, max))
}
} | explode_data.jsonl/24828 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
1072,
16527,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
25320,
284,
220,
15,
198,
197,
22543,
284,
220,
16,
15,
198,
197,
340,
1444,
2264,
1669,
3056,
1235,
341,
197,
9038,
286,
526,
198,
197,
42400,
526,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPrepareMaxParamCountCheck(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t")
tk.MustExec("create table t (v int)")
normalSQL, normalParams := generateBatchSQL(math.MaxUint16)
_, err :... | explode_data.jsonl/38142 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
50590,
5974,
2001,
2507,
3973,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTeamsService_AddTeamRepoByID_noAccess(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
mux.HandleFunc("/organizations/1/team/1/repos/owner/repo", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "PUT")
w.WriteHeader(http.StatusUnprocessableEntity)
})
ctx := context... | explode_data.jsonl/4536 | {
"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,
60669,
1860,
21346,
14597,
25243,
60572,
6536,
6054,
1155,
353,
8840,
836,
8,
341,
25291,
11,
59807,
11,
8358,
49304,
1669,
6505,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
69253,
14,
16,
78015,
14,
16,
49505,
14,
811... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTypes(t *testing.T) {
testConvert(t, `
file_to_generate: "foo.proto"
proto_file <
name: "foo.proto"
package: "example_package.nested"
message_type <
name: "FooProto"
field < name: "i32" number: 1 type: TYPE_INT32 label: LABEL_OPTIONAL >
field < name: "i64" number: 2 type: TYPE... | explode_data.jsonl/41115 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2792
} | [
2830,
3393,
4173,
1155,
353,
8840,
836,
8,
341,
18185,
12012,
1155,
11,
22074,
298,
17661,
2346,
48851,
25,
330,
7975,
57322,
698,
298,
197,
15110,
2458,
77565,
571,
11609,
25,
330,
7975,
57322,
698,
571,
197,
1722,
25,
330,
8687,
263... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDispatchError(t *testing.T) {
assertRoundtrip(t, DispatchError{HasModule: true, Module: 0xf1, Error: 0xa2})
assertRoundtrip(t, DispatchError{HasModule: false, Error: 0xa2})
} | explode_data.jsonl/68332 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
11283,
1454,
1155,
353,
8840,
836,
8,
341,
6948,
27497,
32981,
1155,
11,
21133,
1454,
90,
10281,
3332,
25,
830,
11,
13711,
25,
220,
15,
5848,
16,
11,
4600,
25,
220,
15,
9591,
17,
3518,
6948,
27497,
32981,
1155,
11,
21133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCache_autoExpiry(t *testing.T) {
monitorTicker := helper.NewManualTicker()
c := newCache(time.Hour, 10, monitorTicker)
defer c.Stop()
cfg, repo, _ := testcfg.BuildWithRepo(t)
// Add a process that has expired already.
key0 := mustCreateKey(t, "0", repo)
value0, cancel := mustCreateCacheable(t, cfg, r... | explode_data.jsonl/81953 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 376
} | [
2830,
3393,
8233,
27740,
840,
48209,
1155,
353,
8840,
836,
8,
341,
197,
32225,
87278,
1669,
13137,
7121,
52092,
87278,
2822,
1444,
1669,
501,
8233,
9730,
73550,
11,
220,
16,
15,
11,
8718,
87278,
340,
16867,
272,
30213,
2822,
50286,
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 TestVirtualService_NoListeners(t *testing.T) {
g := NewGomegaWithT(t)
o := processing.ProcessorOptions{
DomainSuffix: "cluster.local",
MeshConfig: meshcfg.Default(),
}
xforms := GetProviders().Create(o)
g.Expect(xforms).To(HaveLen(2))
src := &fixtures.Source{}
xform := xforms[0]
src.Dispatch(xform... | explode_data.jsonl/71126 | {
"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,
33026,
1860,
36989,
31570,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
692,
22229,
1669,
8692,
29012,
269,
3798,
515,
197,
10957,
3121,
40177,
25,
330,
18855,
11033,
756,
197,
9209,
4288,
2648,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadSymlinkedDirectoryToFile(t *testing.T) {
var err error
var file *os.File
if file, err = os.Create("/tmp/testReadSymlinkToFile"); err != nil {
t.Fatalf("failed to create file: %s", err)
}
file.Close()
if err = os.Symlink("/tmp/testReadSymlinkToFile", "/tmp/fileLinkTest"); err != nil {
t.Errorf(... | explode_data.jsonl/57528 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 318
} | [
2830,
3393,
4418,
34667,
44243,
291,
9310,
41550,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
2405,
1034,
353,
436,
8576,
271,
743,
1034,
11,
1848,
284,
2643,
7251,
4283,
5173,
12697,
4418,
34667,
44243,
41550,
5038,
1848,
961,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestNamedMapOpts(t *testing.T) {
tmpMap := make(map[string]string)
o := NewNamedMapOpts("max-name", tmpMap, nil)
o.Set("max-size=1")
if o.String() != "map[max-size:1]" {
t.Errorf("%s != [map[max-size:1]", o.String())
}
if o.Name() != "max-name" {
t.Errorf("%s != max-name", o.Name())
}
if _, exist := t... | explode_data.jsonl/26385 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
15810,
2227,
43451,
1155,
353,
8840,
836,
8,
341,
20082,
2227,
1669,
1281,
9147,
14032,
30953,
340,
22229,
1669,
1532,
15810,
2227,
43451,
445,
2810,
11494,
497,
4174,
2227,
11,
2092,
692,
22229,
4202,
445,
2810,
7174,
28,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestColorRenderExample(t *testing.T) {
renderer := New(true)
expected := "\x1b[32mExample\x1b[0m\n"
actual := renderer.RenderExample("Example")
assert.Equal(t, expected, actual)
} | explode_data.jsonl/12223 | {
"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,
1636,
6750,
13314,
1155,
353,
8840,
836,
8,
341,
83509,
1669,
1532,
3715,
340,
42400,
1669,
2917,
87,
16,
65,
58,
18,
17,
76,
13314,
3462,
16,
65,
58,
15,
76,
1699,
698,
88814,
1669,
19715,
27386,
13314,
445,
13314,
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 |
func TestProductionUsage(t *testing.T) {
defer ensureNoGoroutineLeak(t)()
// This test configures the client in a similar fashion as will be
// in production, and tests against a live gRPC server.
os := mocks.NewOrderer(5612, t)
os.SetNextExpectedSeek(5)
connFact := func(endpoint string) (*grpc.ClientConn, error... | explode_data.jsonl/38323 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 453
} | [
2830,
3393,
44967,
14783,
1155,
353,
8840,
836,
8,
341,
16867,
5978,
2753,
38,
269,
14159,
2304,
585,
1155,
8,
741,
197,
322,
1096,
1273,
2193,
1413,
279,
2943,
304,
264,
4428,
11153,
438,
686,
387,
198,
197,
322,
304,
5670,
11,
323... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExecutePaginatedQuery(t *testing.T) {
for _, testEnv := range testEnvs {
// Query is only supported and tested on the CouchDB testEnv
if testEnv.getName() == couchDBtestEnvName {
t.Logf("Running test for TestEnv = %s", testEnv.getName())
testLedgerID := "testexecutepaginatedquery"
testEnv.init(t,... | explode_data.jsonl/63612 | {
"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,
17174,
47712,
15479,
2859,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
14359,
1669,
2088,
1273,
1702,
11562,
341,
197,
197,
322,
11361,
374,
1172,
7248,
323,
12510,
389,
279,
61128,
3506,
1273,
14359,
198,
197,
743,
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 Test_Service_Listener(t *testing.T) {
bkoff := backoff.NewExponentialBackOff()
bkoff.MaxElapsedTime = time.Second * 15
err := backoff.Retry(func() error {
logger, _ := test.NewNullLogger()
logger.SetLevel(logrus.DebugLevel)
c := service.NewContainer(logger)
c.Register(ID, &Service{})
err := c.Init(... | explode_data.jsonl/34502 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 563
} | [
2830,
3393,
52548,
62,
2743,
1155,
353,
8840,
836,
8,
341,
2233,
74,
1847,
1669,
1182,
1847,
7121,
840,
59825,
3707,
4596,
741,
2233,
74,
1847,
14535,
98483,
284,
882,
32435,
353,
220,
16,
20,
271,
9859,
1669,
1182,
1847,
2013,
15149,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTypeCloseGracefully(t *testing.T) {
conf := NewConfig()
conf.Input.Type = input.TypeNanomsg
conf.Output.Type = output.TypeNanomsg
strm, err := New(conf)
if err != nil {
t.Fatal(err)
}
if err = strm.stopGracefully(time.Second); err != nil {
t.Error(err)
}
conf.Buffer.Type = "memory"
strm, err ... | explode_data.jsonl/78328 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 284
} | [
2830,
3393,
929,
7925,
86543,
3641,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
1532,
2648,
741,
67850,
16130,
10184,
284,
1946,
10184,
45,
276,
316,
1991,
198,
67850,
34246,
10184,
284,
2550,
10184,
45,
276,
316,
1991,
271,
11355,
76,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunUnknownJob(t *testing.T) {
ctx := context.Background()
s, err := standard.New(ctx, standard.WithLogLevel(zerolog.Disabled), standard.WithMonitor(&nullmetrics.Service{}))
require.NoError(t, err)
require.NotNil(t, s)
assert.EqualError(t, s.RunJob(ctx, "Unknown job"), scheduler.ErrNoSuchJob.Error())
} | explode_data.jsonl/44215 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 115
} | [
2830,
3393,
6727,
13790,
12245,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1903,
11,
1848,
1669,
5297,
7121,
7502,
11,
5297,
26124,
72676,
7,
7070,
1609,
89576,
701,
5297,
26124,
30098,
2099,
2921,
43262,
13860,
6257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParser(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
// test for https://github.com/pingcap/tidb/pull/177
tk.MustExec("CREATE TABLE `t1` ( `a` char(3) NOT NULL default '', `b` char(3) NOT NULL default '',... | explode_data.jsonl/5786 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 424
} | [
2830,
3393,
6570,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTomlOutputValues(t *testing.T) {
assert := assert.New(t)
settings := testutil.Settings().WithSections().With(&print.Settings{
OutputValues: true,
}).Build()
expected, err := testutil.GetExpected("toml", "toml-OutputValues")
assert.Nil(err)
options, err := module.NewOptions().With(&module.Options{
O... | explode_data.jsonl/36771 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 216
} | [
2830,
3393,
24732,
75,
5097,
6227,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
62930,
1669,
1273,
1314,
27000,
1005,
2354,
38122,
1005,
2354,
2099,
1350,
27000,
515,
197,
80487,
6227,
25,
830,
345,
197,
16630,
11066... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIgnoreAdmission(t *testing.T) {
namespace := "test"
mockClient := newMockClientForTest([]string{})
handler, informerFactory, err := newHandlerForTest(mockClient)
if err != nil {
t.Errorf("unexpected error initializing handler: %v", err)
}
informerFactory.Start(wait.NeverStop)
chainHandler := admission... | explode_data.jsonl/9273 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 244
} | [
2830,
3393,
12497,
2589,
2728,
1155,
353,
8840,
836,
8,
341,
56623,
1669,
330,
1944,
698,
77333,
2959,
1669,
501,
11571,
2959,
2461,
2271,
10556,
917,
37790,
53326,
11,
6051,
261,
4153,
11,
1848,
1669,
501,
3050,
2461,
2271,
30389,
2959... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRootRouteHasNoMatcher(t *testing.T) {
in := `
route:
receiver: 'team-X'
match:
severity: critical
receivers:
- name: 'team-X'
`
_, err := Load(in)
expected := "root route must not have any matchers"
if err == nil {
t.Fatalf("no error returned, expected:\n%q", expected)
}
if err.Error() != ex... | explode_data.jsonl/72902 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
8439,
4899,
10281,
2753,
37554,
1155,
353,
8840,
836,
8,
341,
17430,
1669,
22074,
8966,
510,
220,
13964,
25,
364,
9196,
30550,
1248,
220,
2432,
510,
262,
29920,
25,
9023,
271,
53387,
1945,
510,
12,
829,
25,
364,
9196,
3055... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrometheusProvider_IsOnline(t *testing.T) {
t.Run("fail", func(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusBadGateway)
}))
defer ts.Close()
clients := prometheusFake()
template, err := clients.flaggerClient.Fl... | explode_data.jsonl/23615 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 725
} | [
2830,
3393,
35186,
39705,
5179,
31879,
19598,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
18403,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSelectEntry_MinSize(t *testing.T) {
smallOptions := []string{"A", "B", "C"}
largeOptions := []string{"Large Option A", "Larger Option B", "Very Large Option C"}
largeOptionsMinWidth := optionsMinSize(largeOptions).Width
minTextHeight := widget.NewLabel("W").MinSize().Height
tests := map[string]struct {... | explode_data.jsonl/42146 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 898
} | [
2830,
3393,
3379,
5874,
62122,
1695,
1155,
353,
8840,
836,
8,
341,
1903,
29532,
3798,
1669,
3056,
917,
4913,
32,
497,
330,
33,
497,
330,
34,
63159,
8810,
2744,
3798,
1669,
3056,
917,
4913,
34253,
6959,
362,
497,
330,
43,
41776,
6959,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChmodWithRecur(t *testing.T) {
fileName := recursiveDirRoot + "/chmod.txt"
err := Touch(fileName)
if err != nil {
panic(err)
}
t.Cleanup(func() {
_ = RemoveWithRecur(dirRoot)
})
if !Exists(fileName) {
t.Error("ChmodWithRecur test failed!")
}
err = ChmodWithRecur(dirRoot, 0755)
if err != nil... | explode_data.jsonl/34176 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 147
} | [
2830,
3393,
1143,
2593,
2354,
693,
2352,
1155,
353,
8840,
836,
8,
341,
17661,
675,
1669,
30819,
6184,
8439,
488,
3521,
56274,
3909,
1837,
9859,
1669,
19338,
23014,
340,
743,
1848,
961,
2092,
341,
197,
30764,
3964,
340,
197,
630,
3244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDbNameOverride(t *testing.T) {
defer cluster.PanicHandler(t)
ctx := context.Background()
conn, err := mysql.Connect(ctx, &vtParams)
require.Nil(t, err)
defer conn.Close()
qr, err := conn.ExecuteFetch("SELECT database() FROM information_schema.tables WHERE table_schema = database()", 1000, true)
require... | explode_data.jsonl/37407 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 172
} | [
2830,
3393,
7994,
675,
2177,
1155,
353,
8840,
836,
8,
341,
16867,
10652,
1069,
31270,
3050,
1155,
340,
20985,
1669,
2266,
19047,
741,
32917,
11,
1848,
1669,
10564,
43851,
7502,
11,
609,
9708,
4870,
340,
17957,
59678,
1155,
11,
1848,
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 TestSetBootable(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
MockSetBootableResponse(t)
options := volumeactions.BootableOpts{
Bootable: true,
}
err := volumeactions.SetBootable(client.ServiceClient(), "cd281d77-8217-4830-be95-9528227c105c", options).ExtractErr()
th.AssertNoErr(t, err)
} | explode_data.jsonl/20635 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
1649,
17919,
480,
1155,
353,
8840,
836,
8,
341,
70479,
39820,
9230,
741,
16867,
270,
94849,
37496,
9230,
2822,
9209,
1176,
1649,
17919,
480,
2582,
1155,
692,
35500,
1669,
8123,
4020,
13,
17919,
480,
43451,
515,
197,
197,
179... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPageStats_String(t *testing.T) {
v := PageStats{
TotalPages: Int(0),
}
want := `github.PageStats{TotalPages:0}`
if got := v.String(); got != want {
t.Errorf("PageStats.String = %v, want %v", got, want)
}
} | explode_data.jsonl/33265 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
2665,
16635,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
5755,
16635,
515,
197,
197,
7595,
17713,
25,
1333,
7,
15,
1326,
197,
532,
50780,
1669,
1565,
5204,
17558,
16635,
90,
7595,
17713,
25,
15,
31257,
743,
2684,
1669... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestIsBool(t *testing.T) {
var v *Value
v = &Value{data: bool(true)}
assert.True(t, v.IsBool())
v = &Value{data: []bool{bool(true)}}
assert.True(t, v.IsBoolSlice())
} | explode_data.jsonl/23402 | {
"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,
3872,
11233,
1155,
353,
8840,
836,
8,
1476,
2405,
348,
353,
1130,
271,
5195,
284,
609,
1130,
90,
691,
25,
1807,
3715,
10569,
6948,
32443,
1155,
11,
348,
4506,
11233,
12367,
5195,
284,
609,
1130,
90,
691,
25,
3056,
2641,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSubmitContainerStateChangeReason(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
client, _, mockSubmitStateClient := NewMockClient(mockCtrl, ec2.NewBlackholeEC2MetadataClient(), nil)
exitCode := 20
reason := strings.Repeat("a", ecsMaxReasonLength)
mockSubmitStateClient.EXPECT... | explode_data.jsonl/61442 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 395
} | [
2830,
3393,
8890,
4502,
1397,
4072,
25139,
1155,
353,
8840,
836,
8,
341,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
7860,
15001,
991,
18176,
741,
25291,
11,
8358,
7860,
8890,
1397,
2959,
1669,
1532,
11571,
2959,
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 TestAddrOfIndex(t *testing.T) {
// golang.org/issue/14916.
// Before index worked on reflect.Values, the .String could not be
// found on the (incorrectly unaddressable) V value,
// in contrast to range, which worked fine.
// Also testing that passing a reflect.Value to tmpl.Execute works.
texts := []string{... | explode_data.jsonl/41535 | {
"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,
13986,
2124,
1552,
1155,
353,
8840,
836,
8,
341,
197,
322,
342,
37287,
2659,
14,
11159,
14,
16,
19,
24,
16,
21,
624,
197,
322,
13235,
1922,
6439,
389,
8708,
35145,
11,
279,
659,
703,
1410,
537,
387,
198,
197,
322,
1730... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLdapClose(t *testing.T) {
m := newMockLdap()
d := &ldapBackend{l: m}
d.Close()
if len(m.MethodsCalled) != 1 || len(m.MethodsCalled["Close"]) != 1 {
t.Error("expected close method to be called on backend")
}
} | explode_data.jsonl/9455 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 94
} | [
2830,
3393,
43,
91294,
7925,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
501,
11571,
43,
91294,
741,
2698,
1669,
609,
38665,
29699,
94617,
25,
296,
532,
2698,
10421,
741,
743,
2422,
1255,
20798,
82,
20960,
8,
961,
220,
16,
1369,
2422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogsReceiver_error(t *testing.T) {
zcore, logObserver := observer.New(zapcore.ErrorLevel)
logger := zap.New(zcore)
expectedErr := errors.New("handler error")
c := kafkaLogsConsumer{
nextConsumer: consumertest.NewNop(),
logger: logger,
consumerGroup: &testConsumerGroup{err: expectedErr},
}
... | explode_data.jsonl/79402 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 223
} | [
2830,
3393,
51053,
25436,
4096,
1155,
353,
8840,
836,
8,
341,
20832,
2153,
11,
1487,
17151,
1669,
22067,
7121,
13174,
391,
2153,
6141,
4449,
340,
17060,
1669,
32978,
7121,
13174,
2153,
692,
42400,
7747,
1669,
5975,
7121,
445,
17905,
1465,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldUpdateLoadBalancer(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
testCases := []struct {
desc string
lbHasDeletionTimestamp bool
existsLb bool
expectedOutput bool
}{
{
desc: "should update a load balancer th... | explode_data.jsonl/34009 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1175
} | [
2830,
3393,
14996,
4289,
5879,
93825,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
4293,
914,
198,
197,
8810,
65,
1028... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWatchFutureRev(t *testing.T) {
b, tmpPath := backend.NewDefaultTmpBackend()
s := newWatchableStore(zap.NewExample(), b, &lease.FakeLessor{}, nil, StoreConfig{})
defer func() {
s.store.Close()
os.Remove(tmpPath)
}()
testKey := []byte("foo")
testValue := []byte("bar")
w := s.NewWatchStream()
wrev ... | explode_data.jsonl/67206 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 386
} | [
2830,
3393,
14247,
24206,
36184,
1155,
353,
8840,
836,
8,
341,
2233,
11,
4174,
1820,
1669,
19163,
7121,
3675,
35986,
29699,
741,
1903,
1669,
501,
14247,
480,
6093,
13174,
391,
7121,
13314,
1507,
293,
11,
609,
1623,
991,
726,
43,
8309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInterpretRecursiveValueString(t *testing.T) {
t.Parallel()
inter := parseCheckAndInterpret(t, `
fun test(): AnyStruct {
let map: {String: AnyStruct} = {}
let mapRef = &map as &{String: AnyStruct}
mapRef["mapRef"] = mapRef
return map
}
`)
mapValue, e... | explode_data.jsonl/73414 | {
"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,
3306,
8043,
78542,
1130,
703,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
58915,
1669,
4715,
3973,
3036,
3306,
8043,
1155,
11,
22074,
414,
2464,
1273,
4555,
5765,
9422,
341,
688,
1077,
2415,
25,
314,
703,
25,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestContext2Plan_createBeforeDestroy_depends_datasource(t *testing.T) {
m := testModule(t, "plan-cbd-depends-datasource")
p := testProvider("aws")
p.GetSchemaReturn = &ProviderSchema{
ResourceTypes: map[string]*configschema.Block{
"aws_instance": {
Attributes: map[string]*configschema.Attribute{
"... | explode_data.jsonl/28718 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1925
} | [
2830,
3393,
1972,
17,
20485,
8657,
10227,
14245,
49258,
1412,
46530,
919,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1273,
3332,
1155,
11,
330,
10393,
1786,
8940,
6810,
79,
1412,
1737,
19346,
919,
1138,
3223,
1669,
1273,
5179,
445,
8635,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApiTest_AddsTextBodyToRequest(t *testing.T) {
handler := http.NewServeMux()
handler.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) {
data, _ := ioutil.ReadAll(r.Body)
if string(data) != `hello` {
w.WriteHeader(http.StatusInternalServerError)
return
}
w.WriteHeader(http.Status... | explode_data.jsonl/54786 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
6563,
2271,
21346,
82,
1178,
5444,
1249,
1900,
1155,
353,
8840,
836,
8,
341,
53326,
1669,
1758,
7121,
60421,
44,
2200,
741,
53326,
63623,
4283,
14990,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsValidBST(t *testing.T) {
cases := []struct {
root *TreeNode
want bool
}{
{
&TreeNode{Val: 2, Left: &TreeNode{Val: 1}, Right: &TreeNode{Val: 3}},
true,
},
{
&TreeNode{Val: 5, Left: &TreeNode{Val: 1}, Right: &TreeNode{Val: 4, Left: &TreeNode{Val: 3}, Right: &TreeNode{Val: 6}}},
false,
... | explode_data.jsonl/44694 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 314
} | [
2830,
3393,
55470,
61006,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
33698,
353,
26597,
198,
197,
50780,
1807,
198,
197,
59403,
197,
197,
515,
298,
197,
5,
26597,
90,
2208,
25,
220,
17,
11,
13727,
25,
609,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestBaseConfigValidateBasic(t *testing.T) {
cfg := TestBaseConfig()
assert.NoError(t, cfg.ValidateBasic())
// tamper with log format
cfg.LogFormat = "invalid"
assert.Error(t, cfg.ValidateBasic())
} | explode_data.jsonl/66915 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
3978,
2648,
17926,
15944,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
3393,
3978,
2648,
741,
6948,
35699,
1155,
11,
13286,
47667,
15944,
12367,
197,
322,
25476,
712,
448,
1487,
3561,
198,
50286,
5247,
4061,
284,
330,
11808,
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 |
func TestPKIOperationGET(t *testing.T) {
server, _, teardown := newServer(t)
defer teardown()
pkcsreq := loadTestFile(t, "../scep/testdata/PKCSReq.der")
message := base64.StdEncoding.EncodeToString(pkcsreq)
req, err := http.NewRequest("GET", server.URL+"/scep", nil)
if err != nil {
t.Fatal(err)
}
params := re... | explode_data.jsonl/70656 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 257
} | [
2830,
3393,
22242,
3810,
91774,
3806,
1155,
353,
8840,
836,
8,
341,
41057,
11,
8358,
49304,
1669,
501,
5475,
1155,
340,
16867,
49304,
741,
3223,
74,
4837,
2958,
1669,
2795,
2271,
1703,
1155,
11,
7005,
82,
31652,
12697,
691,
16341,
42,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestGetCertificate_expiredCache(t *testing.T) {
// Make an expired cert and cache it.
pk, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
if err != nil {
t.Fatal(err)
}
tmpl := &x509.Certificate{
SerialNumber: big.NewInt(1),
Subject: pkix.Name{CommonName: exampleDomain},
NotAfter: time... | explode_data.jsonl/65048 | {
"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,
1949,
33202,
80221,
8233,
1155,
353,
8840,
836,
8,
341,
197,
322,
7405,
458,
26391,
2777,
323,
6500,
432,
624,
3223,
74,
11,
1848,
1669,
384,
4385,
9081,
57582,
1592,
7,
613,
11442,
292,
1069,
17,
20,
21,
1507,
10382,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSubscriptions(t *testing.T) {
mch := &operatorsv1.MultiClusterHub{
ObjectMeta: metav1.ObjectMeta{Namespace: "test"},
Spec: operatorsv1.MultiClusterHubSpec{
ImagePullSecret: "test",
},
}
ovr := map[string]string{}
tests := []struct {
name string
got *unstructured.Unstructured
}{
{"Applicat... | explode_data.jsonl/16278 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 456
} | [
2830,
3393,
3136,
29966,
1155,
353,
8840,
836,
8,
341,
2109,
331,
1669,
609,
32838,
85,
16,
57706,
28678,
19316,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
90,
22699,
25,
330,
1944,
7115,
197,
7568,
992,
25,
19624,
85,
16,
57706,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAppendListenerFallthroughRoute(t *testing.T) {
push := &model.PushContext{
Mesh: &meshconfig.MeshConfig{},
}
tests := []struct {
name string
listener *xdsapi.Listener
listenerOpts *buildListenerOpts
node *model.Proxy
hostname string
}{
{
name: "Registry_Only",
... | explode_data.jsonl/61276 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1030
} | [
2830,
3393,
23877,
2743,
49772,
19742,
4899,
1155,
353,
8840,
836,
8,
341,
43155,
1669,
609,
2528,
34981,
1972,
515,
197,
9209,
4288,
25,
609,
23506,
1676,
50155,
2648,
38837,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
260,
914... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestXor(t *testing.T) {
t.Parallel()
xor := ID{
Address: address,
PublicKey: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},
}
result := id1.Xor(id3)
if !xor.Equals(result) {
t.Errorf("Xor() = %v, want %v", xor, result)
}
} | explode_data.jsonl/7131 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
55,
269,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
10225,
269,
1669,
3034,
515,
197,
98090,
25,
256,
2621,
345,
197,
73146,
1592,
25,
3056,
3782,
90,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestShouldURLEncodeRedirectionURLParameter(t *testing.T) {
mock := mocks.NewMockAutheliaCtx(t)
defer mock.Close()
mock.Clock.Set(time.Now())
userSession := mock.Ctx.GetSession()
userSession.Username = testUsername
userSession.AuthenticationLevel = authentication.NotAuthenticated
userSession.RefreshTTL = m... | explode_data.jsonl/20197 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 304
} | [
2830,
3393,
14996,
1511,
867,
1016,
534,
6033,
2866,
3144,
4971,
1155,
353,
8840,
836,
8,
341,
77333,
1669,
68909,
7121,
11571,
5087,
35929,
23684,
1155,
340,
16867,
7860,
10421,
2822,
77333,
79248,
4202,
9730,
13244,
12367,
19060,
5283,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFetch_withCache(t *testing.T) {
dir := tmpDir(t)
//goland:noinspection GoUnhandledErrorResult
defer os.RemoveAll(dir)
start := time.Now()
if err := FetchNative(dir); err != nil {
t.Fatalf("fetchEngine 1 failed: %s", err)
}
log.Printf("first fetchEngine took %s", time.Since(start))
start = time.Now... | explode_data.jsonl/15514 | {
"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,
20714,
6615,
8233,
1155,
353,
8840,
836,
8,
341,
48532,
1669,
4174,
6184,
1155,
340,
197,
322,
70,
96440,
66479,
53395,
5994,
95539,
1454,
2077,
198,
16867,
2643,
84427,
14161,
692,
21375,
1669,
882,
13244,
741,
743,
1848,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestVSphereKubernetes120UbuntuUpgradeFromLatestMinorRelease(t *testing.T) {
provider := framework.NewVSphere(t, framework.WithVSphereFillers(
api.WithTemplateForAllMachines(""), // Use default template from bundle
api.WithOsFamilyForAllMachines(anywherev1.Ubuntu),
))
test := framework.NewClusterE2ETest(
t... | explode_data.jsonl/6563 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 280
} | [
2830,
3393,
26050,
8023,
42,
29827,
16,
17,
15,
75652,
43861,
3830,
31992,
57024,
16077,
1155,
353,
8840,
836,
8,
341,
197,
19979,
1669,
12626,
7121,
26050,
8023,
1155,
11,
12626,
26124,
26050,
8023,
14449,
388,
1006,
197,
54299,
26124,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPushConditionCheckForPessimisticTxn(t *testing.T) {
store, clean := createMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk1 := testkit.NewTestKit(t, store)
tk1.MustExec("use test")
defer tk.MustExec("drop table if exists t")
tk.MustExec("drop table if e... | explode_data.jsonl/12468 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 257
} | [
2830,
3393,
16644,
10547,
3973,
2461,
47,
66733,
4532,
31584,
77,
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,
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 TestGetIPByNodeName(t *testing.T) {
testCases := []struct {
description string
scaleSet string
vmList []string
nodeName string
expected []string
expectError bool
}{
{
description: "GetIPByNodeName should get node's privateIP and publicIP",
scaleSet: "ss",
vmList: []st... | explode_data.jsonl/17947 | {
"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,
1949,
3298,
1359,
1955,
675,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
42407,
914,
198,
197,
70780,
1649,
262,
914,
198,
197,
54879,
852,
414,
3056,
917,
198,
197,
20831,
675,
262,
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... | 3 |
func Test200WithErrorUnmarshalError(t *testing.T) {
s := s3.New(unit.Session)
s.Handlers.Send.Clear()
s.Handlers.Send.PushBack(func(r *request.Request) {
r.HTTPResponse = &http.Response{
StatusCode: 200,
Header: http.Header{"X-Amz-Request-Id": []string{"abc123"}},
Body: ioutil.NopCloser... | explode_data.jsonl/69506 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 412
} | [
2830,
3393,
17,
15,
15,
66102,
1806,
27121,
1454,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
274,
18,
7121,
24144,
20674,
340,
1903,
35308,
9254,
20176,
13524,
741,
1903,
35308,
9254,
20176,
34981,
3707,
18552,
2601,
353,
2035,
9659,
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 TestDestroyEdgeTransformer_selfRef(t *testing.T) {
g := Graph{Path: addrs.RootModuleInstance}
g.Add(testDestroyNode("test_object.A"))
tf := &DestroyEdgeTransformer{
Config: testModule(t, "transform-destroy-edge-self-ref"),
Schemas: simpleTestSchemas(),
}
if err := tf.Transform(&g); err != nil {
t.Fatal... | explode_data.jsonl/46936 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 204
} | [
2830,
3393,
14245,
11656,
46358,
25637,
3945,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
12165,
90,
1820,
25,
912,
5428,
45345,
3332,
2523,
532,
3174,
1904,
8623,
14245,
1955,
445,
1944,
5314,
875,
5455,
3244,
69,
1669,
609,
14245,
11656... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDecimal_FromBytes_min_byte_error(t *testing.T) {
d := new(Decimal)
buf := utils.RandomSlice(7)
err := d.SetBytes(buf)
assert.Error(t, err)
assert.True(t, errors.IsOfType(ErrInvalidDecimal, err))
} | explode_data.jsonl/31238 | {
"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,
11269,
53157,
7078,
7260,
19737,
4096,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
501,
7,
11269,
340,
26398,
1669,
12439,
26709,
33236,
7,
22,
340,
9859,
1669,
294,
4202,
7078,
10731,
340,
6948,
6141,
1155,
11,
1848,
340,
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 |
func TestPlaceSwapOrder(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test, either api keys or manipulaterealorders isnt set correctly")
}
_, err := c.PlaceSwapOrder(swapTestPair,
order.Buy.Lower(),
"limit",
"fixed",
"12345",
1,
1,
2)
if err !=... | explode_data.jsonl/42944 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
17371,
46179,
4431,
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,
6330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScopedService_Parent(t *testing.T) {
t.Parallel()
tests := []struct {
sg Scoped
wantCurrentScope scope.Type
wantCurrentId uint32
wantParentScope scope.Type
wantParentID uint32
}{
{makeScoped(nil, 33, 1), scope.Store, 1, scope.Website, 33},
{makeScoped(nil, 3, 0), scope.We... | explode_data.jsonl/18713 | {
"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,
39437,
1860,
1088,
1390,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
78216,
1669,
3056,
1235,
341,
197,
1903,
70,
2290,
98687,
198,
197,
50780,
5405,
10803,
6891,
10184,
198,
197,
50780,
5405,
764,
262,
2622,
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... | 6 |
func TestRandomizedGenState1(t *testing.T) {
interfaceRegistry := codectypes.NewInterfaceRegistry()
cdc := codec.NewProtoCodec(interfaceRegistry)
s := rand.NewSource(1)
r := rand.New(s)
// all these tests will panic
tests := []struct {
simState module.SimulationState
panicMsg string
}{
{ // panic => reaso... | explode_data.jsonl/67876 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 279
} | [
2830,
3393,
13999,
1506,
9967,
1397,
16,
1155,
353,
8840,
836,
8,
341,
58915,
1564,
15603,
1669,
20329,
439,
1804,
7121,
5051,
15603,
741,
1444,
7628,
1669,
34647,
7121,
31549,
36913,
75487,
15603,
692,
1903,
1669,
10382,
7121,
3608,
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 TestValue(t *testing.T) {
table := map[Version]int64{
Version{8, 5, 1, 0}: 8005001000,
Version{4, 7, 0, 0}: 4007000000,
Version{0, 23, 0, 0}: 23000000,
Version{14, 0, 0, 100}: 14000000100,
Version{0, 0, 0, 0}: 0,
Version{0, 0, 1, 1}: 1001,
Version{0, 1, 0, 0}: 1000000,
Version{1, ... | explode_data.jsonl/74328 | {
"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,
1130,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
2415,
58,
5637,
63025,
21,
19,
515,
197,
77847,
90,
23,
11,
220,
20,
11,
220,
16,
11,
220,
15,
16097,
262,
220,
23,
15,
15,
20,
15,
15,
16,
15,
15,
15,
345,
197,
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... | 4 |
func TestTransactionFetcherSingletonRequesting(t *testing.T) {
testTransactionFetcherParallel(t, txFetcherTest{
init: func() *TxFetcher {
return NewTxFetcher(
func(common.Hash) bool { return false },
nil,
func(string, []common.Hash) error { return nil },
)
},
steps: []interface{}{
// Push an... | explode_data.jsonl/52211 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 968
} | [
2830,
3393,
8070,
97492,
25915,
1900,
287,
1155,
353,
8840,
836,
8,
341,
18185,
8070,
97492,
16547,
1155,
11,
259,
9770,
2995,
261,
2271,
515,
197,
28248,
25,
2915,
368,
353,
51,
9770,
2995,
261,
341,
298,
853,
1532,
51,
9770,
2995,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSchema_AddField(t *testing.T) {
type fields struct {
Fields []Field
Options Options
}
type args struct {
f Field
}
tests := []struct {
name string
fields fields
args args
want *Schema
}{
{"nil", fields{nil, DefaultOptions}, args{NewTextField("text-field")}, &Schema{Fields: []Field{... | explode_data.jsonl/72800 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 409
} | [
2830,
3393,
8632,
21346,
1877,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
8941,
220,
3056,
1877,
198,
197,
197,
3798,
14566,
198,
197,
532,
13158,
2827,
2036,
341,
197,
1166,
8601,
198,
197,
532,
78216,
1669,
3056... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPopUp_Move_ConstrainedWindowToSmall(t *testing.T) {
label := NewLabel("Hi")
win := test.NewWindow(NewLabel("OK"))
win.Resize(fyne.NewSize(10, 5))
pop := NewPopUp(label, win.Canvas())
pos := fyne.NewPos(20, 10)
pop.Move(pos)
innerPos := pop.Content.Position()
assert.Equal(t, theme.Padding(), innerPos.... | explode_data.jsonl/65217 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
11598,
2324,
66352,
15100,
57727,
4267,
1249,
25307,
1155,
353,
8840,
836,
8,
341,
29277,
1669,
1532,
2476,
445,
13048,
1138,
68452,
1669,
1273,
7121,
4267,
35063,
2476,
445,
3925,
5455,
68452,
77707,
955,
81708,
7121,
1695,
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 TestGetIndexByID(t *testing.T) {
if testing.Short() {
t.Skip()
}
dbtesting.SetupGlobalTestDB(t)
db := testDB()
// Index does not exist initially
if _, exists, err := db.GetIndexByID(context.Background(), 1); err != nil {
t.Fatalf("unexpected error getting index: %s", err)
} else if exists {
t.Fatal("... | explode_data.jsonl/11065 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 474
} | [
2830,
3393,
1949,
1552,
60572,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
532,
20939,
8840,
39820,
11646,
2271,
3506,
1155,
340,
20939,
1669,
1273,
3506,
2822,
197,
322,
8008,
1558,
537,
3000,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMetricCornerCases(t *testing.T) {
assert.Equal(t, min(1, 2), 1)
assert.Equal(t, min(2, 1), 1)
assert.Equal(t, min(1, 1), 1)
var label KeyValues
label.Append("a", "b")
assert.Equal(t, label.String(), "a#$#b")
} | explode_data.jsonl/48128 | {
"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,
54310,
50352,
37302,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
1155,
11,
1308,
7,
16,
11,
220,
17,
701,
220,
16,
340,
6948,
12808,
1155,
11,
1308,
7,
17,
11,
220,
16,
701,
220,
16,
340,
6948,
12808,
1155,
11,
1308,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_getWorkflowHandler_CheckPermission(t *testing.T) {
api, db, _ := newTestAPI(t)
u, pass := assets.InsertLambdaUser(t, api.mustDB())
proj := assets.InsertTestProject(t, db, api.Cache, sdk.RandomString(10), sdk.RandomString(10))
require.NoError(t, group.InsertLinkGroupUser(context.TODO(), api.mustDB(), &gro... | explode_data.jsonl/31069 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1273
} | [
2830,
3393,
3062,
62768,
3050,
28188,
14966,
1155,
353,
8840,
836,
8,
341,
54299,
11,
2927,
11,
716,
1669,
501,
2271,
7082,
1155,
692,
10676,
11,
1494,
1669,
11770,
23142,
58266,
1474,
1155,
11,
6330,
69419,
3506,
2398,
197,
30386,
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 TestSonobuoyVersion(t *testing.T) {
stdout := mustRunSonobuoyCommand(t, "version")
lines := strings.Split(stdout.String(), "\n")
for _, line := range lines {
versionComponents := strings.Split(line, ":")
// If a Kubeconfig is not provided, a warning is included that the API version check is skipped.
// O... | explode_data.jsonl/54729 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
45614,
674,
84,
2253,
5637,
1155,
353,
8840,
836,
8,
341,
6736,
411,
1669,
1969,
6727,
45614,
674,
84,
2253,
4062,
1155,
11,
330,
4366,
5130,
78390,
1669,
9069,
19823,
29376,
6431,
1507,
2917,
77,
1138,
2023,
8358,
1555,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMarkStart(t *testing.T) {
Convey("With a task, build and version", t, func() {
require.NoError(t, db.ClearCollections(task.Collection, build.Collection, VersionCollection),
"Error clearing task and build collections")
displayName := "testName"
b := &build.Build{
Id: "buildtest",
Status: e... | explode_data.jsonl/60435 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1376
} | [
2830,
3393,
8949,
3479,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2354,
264,
3383,
11,
1936,
323,
2319,
497,
259,
11,
2915,
368,
341,
197,
17957,
35699,
1155,
11,
2927,
13524,
52730,
17483,
28629,
11,
1936,
28629,
11,
6079,
6482... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHTTPTimeout(t *testing.T) {
t.Parallel()
reg := apiRegMutWrapper{mut: &http.ServeMux{}}
mgr, err := manager.New(manager.NewConfig(), reg, log.Noop(), metrics.Noop())
if err != nil {
t.Fatal(err)
}
conf := input.NewConfig()
conf.HTTPServer.Path = "/testpost"
conf.HTTPServer.Timeout = "1ms"
h, err ... | explode_data.jsonl/40360 | {
"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,
9230,
7636,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
37013,
1669,
6330,
3477,
51440,
11542,
90,
6984,
25,
609,
1254,
83535,
44,
2200,
6257,
532,
2109,
901,
11,
1848,
1669,
6645,
7121,
55168,
7121,
2648,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTaskListEmpty(t *testing.T) {
cs, _ := pipelinetest.SeedTestData(pipelinetest.Data{})
p := &test.Params{Tekton: cs.Pipeline}
task := Command(p)
_, err := test.ExecuteCommand(task, "list", "-n", "foo")
if err == nil {
t.Errorf("No errors was defined")
}
if d := cmp.Diff(emptyMsg, err.Error()); d != ""... | explode_data.jsonl/72533 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
6262,
852,
3522,
1155,
353,
8840,
836,
8,
341,
71899,
11,
716,
1669,
23626,
301,
29876,
477,
5732,
291,
83920,
1295,
81079,
29876,
477,
3336,
37790,
3223,
1669,
609,
1944,
58268,
90,
55715,
777,
25,
10532,
1069,
8790,
630,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAllCases(t *testing.T) {
recorder := record.NewBroadcaster().NewRecorder(scheme.Scheme, corev1.EventSource{Component: controllerAgentName})
for _, tc := range testCases {
c := tc.GetClient()
dc := tc.GetDynamicClient()
r := &reconciler{
client: c,
dynamicClient: dc,
restConfig: &re... | explode_data.jsonl/70586 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 214
} | [
2830,
3393,
2403,
37302,
1155,
353,
8840,
836,
8,
341,
67904,
1358,
1669,
3255,
7121,
68324,
32020,
1005,
3564,
47023,
1141,
8058,
92719,
11,
6200,
85,
16,
6904,
3608,
90,
2189,
25,
6461,
16810,
675,
8824,
2023,
8358,
17130,
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... | 2 |
func TestMiscFunc_Apply1(t *testing.T) {
var tests = []struct {
sql string
data *xsql.Tuple
result []map[string]interface{}
}{
{
sql: "SELECT md5(a) AS a FROM test",
data: &xsql.Tuple{
Emitter: "test",
Message: xsql.Message{
"a": "The quick brown fox jumps over the lazy dog",
"b":... | explode_data.jsonl/446 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2685
} | [
2830,
3393,
50979,
9626,
36117,
398,
16,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
30633,
262,
914,
198,
197,
8924,
256,
353,
87,
3544,
836,
6061,
198,
197,
9559,
3056,
2186,
14032,
31344,
16094,
197,
59403,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshalProof(t *testing.T) {
for _, test := range []struct {
desc string
m string
want log.Proof
wantErr bool
}{
{
desc: "valid one",
m: "b25l\ndHdv\ndGhyZWU=\n",
want: log.Proof{[]byte("one"), []byte("two"), []byte("three")},
}, {
desc: "valid two",
m: "Zm91cg=... | explode_data.jsonl/61514 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 545
} | [
2830,
3393,
1806,
27121,
31076,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
3056,
1235,
341,
197,
41653,
262,
914,
198,
197,
2109,
981,
914,
198,
197,
50780,
262,
1487,
7763,
1055,
198,
197,
50780,
7747,
1807,
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... | 3 |
func TestRemoveSpaceAuditorByUsername(t *testing.T) {
Convey("Remove auditor by username", t, func() {
setup(MockRoute{"DELETE", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors", "", "", 200, "", nil}, t)
defer teardown()
c := &Config{
ApiAddress: server.URL,
Token: "foobar",
}
client, e... | explode_data.jsonl/59993 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
13021,
9914,
52949,
1919,
91519,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
13021,
53306,
553,
5934,
497,
259,
11,
2915,
368,
341,
197,
84571,
66436,
4899,
4913,
14424,
497,
3521,
85,
17,
26734,
2434,
3470,
66,
22,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoveNonExistantOffer(t *testing.T) {
tt := test.Start(t)
defer tt.Finish()
test.ResetHorizonDB(t, tt.HorizonDB)
q := &Q{tt.HorizonSession()}
numAffected, err := q.RemoveOffers([]int64{12345}, 1236)
tt.Assert.NoError(err)
tt.Assert.Equal(int64(0), numAffected)
} | explode_data.jsonl/69698 | {
"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,
13021,
8121,
840,
11202,
39462,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
1273,
12101,
1155,
340,
16867,
17853,
991,
18176,
741,
18185,
36660,
39601,
16973,
3506,
1155,
11,
17853,
3839,
269,
16973,
3506,
340,
18534,
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 TestCreateEntityCreated(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("Content-Type") != "application/json" {
t.Fatal("Missing appl... | explode_data.jsonl/64662 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 593
} | [
2830,
3393,
4021,
3030,
11694,
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,
2089... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunNonRoot(t *testing.T) {
for _, conf := range configs(kvm) {
t.Logf("Running test with conf: %+v", conf)
spec := testutil.NewSpecWithArgs("/bin/true")
spec.Process.User.UID = 343
spec.Process.User.GID = 2401
// User that container runs as can't list '$TMP/blocked' and would fail to
// mount it... | explode_data.jsonl/48925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 411
} | [
2830,
3393,
6727,
8121,
8439,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
2335,
1669,
2088,
42309,
5969,
7338,
8,
341,
197,
3244,
98954,
445,
18990,
1273,
448,
2335,
25,
68524,
85,
497,
2335,
692,
197,
98100,
1669,
1273,
1314,
7121,
832... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransformMultiField(t *testing.T) {
f := common.Field{
Name: "context",
Type: "",
MultiFields: common.Fields{
common.Field{Name: "keyword", Type: "keyword"},
common.Field{Name: "text", Type: "text"},
},
}
trans, _ := newFieldsTransformer(version, common.Fields{f})
transformed, err := trans.tr... | explode_data.jsonl/37639 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 279
} | [
2830,
3393,
8963,
20358,
1877,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
4185,
17087,
515,
197,
21297,
25,
330,
2147,
756,
197,
27725,
25,
8324,
197,
9209,
7068,
8941,
25,
4185,
42809,
515,
298,
83825,
17087,
63121,
25,
330,
19863,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBoolCondition(t *testing.T) {
cases := []struct {
name string
input ConditionBuilder
expectedNode exprNode
err condErrorMode
}{
{
name: "basic method and",
input: Name("foo").Equal(Value(5)).And(Name("bar").Equal(Value("baz"))),
expectedNode: exprNode{
children... | explode_data.jsonl/27674 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3107
} | [
2830,
3393,
11233,
10547,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
22427,
286,
15180,
3297,
198,
197,
42400,
1955,
15169,
1955,
198,
197,
9859,
688,
9756,
1454,
3636,
198,
197,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestIssue17726(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t0")
tk.MustExec("create table t0 (c1 DATE, c2 TIME, c3 DATETIME, c4 TIMESTAMP)")
tk.MustExec("insert into t0 values ('1000-01... | explode_data.jsonl/65563 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 282
} | [
2830,
3393,
42006,
16,
22,
22,
17,
21,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPluginPushError(t *testing.T) {
client := &Client{
client: newMockClient(errorMock(http.StatusInternalServerError, "Server error")),
}
_, err := client.PluginPush(context.Background(), "plugin_name", "")
if !errdefs.IsSystem(err) {
t.Fatalf("expected a Server Error, got %[1]T: %[1]v", err)
}
} | explode_data.jsonl/31929 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
11546,
16644,
1454,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
609,
2959,
515,
197,
25291,
25,
501,
11571,
2959,
6390,
11571,
19886,
66760,
11,
330,
5475,
1465,
30154,
197,
630,
197,
6878,
1848,
1669,
2943,
64378,
16644,
537... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRocksdbKV_Dummy(t *testing.T) {
name := "/tmp/rocksdb_dummy"
rocksdbkv, err := rocksdbkv.NewRocksdbKV(name)
assert.Nil(t, err)
defer rocksdbkv.Close()
defer rocksdbkv.RemoveWithPrefix("")
rocksdbkv.DB = nil
_, err = rocksdbkv.Load("")
assert.Error(t, err)
_, _, err = rocksdbkv.LoadWithPrefix("")
ass... | explode_data.jsonl/71523 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 395
} | [
2830,
3393,
49,
25183,
1999,
82707,
1557,
8574,
1155,
353,
8840,
836,
8,
341,
11609,
1669,
3521,
5173,
14,
299,
14553,
1999,
60321,
698,
197,
299,
14553,
1999,
43408,
11,
1848,
1669,
23035,
1999,
43408,
7121,
49,
25183,
1999,
82707,
315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_discordLogger_buildPayload(t *testing.T) {
t.Run("default titles and colors", func(t *testing.T) {
l := &discordLogger{
titles: discordTitles,
colors: discordColors,
}
tests := []struct {
name string
msg *message
wantTitle string
wantDesc string
wantColor int
}{
{... | explode_data.jsonl/58521 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1921
} | [
2830,
3393,
37745,
539,
7395,
20801,
29683,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
2258,
15311,
323,
7987,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
8810,
1669,
609,
42579,
7395,
515,
298,
3244,
41243,
25,
31041,
48255,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_getCompactionTasksBySignalID(t *testing.T) {
type fields struct {
plans map[int64]*compactionTask
}
type args struct {
signalID int64
}
tests := []struct {
name string
fields fields
args args
want []*compactionTask
}{
{
"test get compaction tasks",
fields{
plans: map[int64]... | explode_data.jsonl/9515 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 598
} | [
2830,
3393,
3062,
13552,
1311,
25449,
1359,
26810,
915,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
72213,
596,
2415,
18640,
21,
19,
8465,
5689,
1311,
6262,
198,
197,
532,
13158,
2827,
2036,
341,
197,
81319,
915,
526,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDecode(t *testing.T) {
for _, tc := range testCases {
t.Logf("Testing %s\n", tc.b62)
if n := Decode(tc.b62); n != tc.n {
t.Fatalf("%s decoded to %d (should be %d)", tc.b62, n, tc.n)
}
}
} | explode_data.jsonl/165 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
32564,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
1273,
37302,
341,
197,
3244,
98954,
445,
16451,
1018,
82,
1699,
497,
17130,
948,
21,
17,
340,
197,
743,
308,
1669,
50194,
44415,
948,
21,
17,
1215,
308,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRejectFrameOnIdle_WindowUpdate(t *testing.T) {
testRejectRequestWithProtocolError(t, func(st *serverTester) {
st.fr.WriteWindowUpdate(123, 456)
})
} | explode_data.jsonl/71632 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 62
} | [
2830,
3393,
78413,
4369,
1925,
41370,
60649,
4289,
1155,
353,
8840,
836,
8,
341,
18185,
78413,
1900,
2354,
20689,
1454,
1155,
11,
2915,
5895,
353,
4030,
58699,
8,
341,
197,
18388,
18798,
4073,
4267,
4289,
7,
16,
17,
18,
11,
220,
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 |
func TestGetFuturesPublicTrades(t *testing.T) {
t.Parallel()
_, err := b.GetFuturesPublicTrades(context.Background(), currency.NewPairWithDelimiter("BTCUSD", "PERP", "_"), 5)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/76597 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 86
} | [
2830,
3393,
1949,
37,
74606,
12676,
1282,
3452,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
293,
2234,
37,
74606,
12676,
1282,
3452,
5378,
19047,
1507,
11413,
7121,
12443,
2354,
91098,
445,
59118,
26749,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultipleRulesMissingSingleVerbResourceCombination(t *testing.T) {
escalationTest{
ownerRules: []authorizationapi.PolicyRule{
{Verbs: sets.NewString("delete", "update"), Resources: sets.NewString("builds", "deployments")},
{Verbs: sets.NewString("delete"), Resources: sets.NewString("pods")},
},
ser... | explode_data.jsonl/9046 | {
"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,
32089,
26008,
25080,
10888,
66946,
4783,
36192,
2554,
1155,
353,
8840,
836,
8,
341,
80629,
278,
367,
2271,
515,
197,
197,
8118,
26008,
25,
3056,
39554,
2068,
1069,
8018,
11337,
515,
298,
197,
90,
10141,
1279,
25,
7289,
7121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMetricSlice_Resize(t *testing.T) {
es := generateTestMetricSlice()
emptyVal := NewMetric()
emptyVal.InitEmpty()
// Test Resize less elements.
const resizeSmallLen = 4
expectedEs := make(map[*otlpmetrics.Metric]bool, resizeSmallLen)
for i := 0; i < resizeSmallLen; i++ {
expectedEs[*(es.At(i).orig)] = t... | explode_data.jsonl/19508 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 535
} | [
2830,
3393,
54310,
33236,
62,
30561,
1155,
353,
8840,
836,
8,
341,
78966,
1669,
6923,
2271,
54310,
33236,
741,
197,
3194,
2208,
1669,
1532,
54310,
741,
197,
3194,
2208,
26849,
3522,
741,
197,
322,
3393,
63343,
2686,
5424,
624,
4777,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWithFormat(t *testing.T) {
type test struct {
name string
str string
checkFunc func(Option) error
}
tests := []test{
{
name: "set success when str is JSON",
str: format.JSON.String(),
checkFunc: func(opt Option) error {
got := new(logger)
opt(got)
if got.format != ... | explode_data.jsonl/2665 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 397
} | [
2830,
3393,
2354,
4061,
1155,
353,
8840,
836,
8,
341,
13158,
1273,
2036,
341,
197,
11609,
414,
914,
198,
197,
11355,
981,
914,
198,
197,
25157,
9626,
2915,
7,
5341,
8,
1465,
198,
197,
630,
78216,
1669,
3056,
1944,
515,
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... | 2 |
func TestWriteAtOffset(t *testing.T) {
data := []byte("Hi there")
toWrite := uint32(0x20212121)
data, e := WriteAtOffset(data, uint64(len(data)), binary.BigEndian,
toWrite)
if e != nil {
t.Logf("Failed writing data at offset: %s\n", e)
t.FailNow()
}
if string(data) != "Hi there !!!" {
t.Logf("Got wrong da... | explode_data.jsonl/56512 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
7985,
1655,
6446,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
3056,
3782,
445,
13048,
1052,
1138,
31709,
7985,
1669,
2622,
18,
17,
7,
15,
87,
17,
15,
17,
16,
17,
16,
17,
16,
340,
8924,
11,
384,
1669,
9645,
1655,
6446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProcessCancelCommand_Success(t *testing.T) {
ctx := context.NewMockDefault()
sendCommandPoolMock := new(task.MockedPool)
docState := contracts.DocumentState{}
docState.CancelInformation.CancelMessageID = "messageID"
sendCommandPoolMock.On("Cancel", "messageID").Return(true)
docMock := new(DocumentMgrMock... | explode_data.jsonl/533 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 244
} | [
2830,
3393,
7423,
9269,
4062,
87161,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
7121,
11571,
3675,
741,
32817,
4062,
10551,
11571,
1669,
501,
17483,
24664,
291,
10551,
340,
59536,
1397,
1669,
17080,
26256,
1397,
16094,
59536,
1397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetRegistry(t *testing.T) {
api, router, mockCtl := initRegistryAPI(t)
defer mockCtl.Finish()
sSecret := ms.NewMockSecretService(mockCtl)
api.AppCombinedService = &service.AppCombinedService{
Secret: sSecret,
}
mConf := &models.Registry{
Namespace: "default",
Name: "abc",
}
mConf2 := &spe... | explode_data.jsonl/41103 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 415
} | [
2830,
3393,
1949,
15603,
1155,
353,
8840,
836,
8,
341,
54299,
11,
9273,
11,
7860,
94252,
1669,
2930,
15603,
7082,
1155,
340,
16867,
7860,
94252,
991,
18176,
2822,
1903,
19773,
1669,
9829,
7121,
11571,
19773,
1860,
30389,
94252,
340,
54299... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCPUTime(t *testing.T) {
c, err := NewContainer(ContainerName)
if err != nil {
t.Errorf(err.Error())
}
if _, err := c.CPUTime(); err != nil {
t.Errorf(err.Error())
}
} | explode_data.jsonl/2790 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 81
} | [
2830,
3393,
34,
6221,
545,
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,
8358,
1848,
1669,
272,
727,
6221,
545,
2129,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNamespaceCreateDelete(t *testing.T) {
defer func() {
exec.Command("kubectl", "-n", "foobar", "delete", "networkpolicy", "baz").Run()
exec.Command("kubectl", "delete", "namespace", "foobar").Run()
}()
setupClient(t)
r := NewRuntime()
// Create a namespace
testNamespace, err := runtime.NewNamespace("f... | explode_data.jsonl/42237 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 723
} | [
2830,
3393,
22699,
4021,
6435,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
368,
341,
197,
67328,
12714,
445,
79971,
497,
6523,
77,
497,
330,
50267,
497,
330,
4542,
497,
330,
17511,
34790,
497,
330,
42573,
1827,
6727,
741,
197,
67328,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseAzureEnvironment(t *testing.T) {
cases := []struct {
cloudName string
resourceManagerEndpoint string
identitySystem string
expected *azure.Environment
}{
{
cloudName: "",
resourceManagerEndpoint: "",
identitySystem: "",
e... | explode_data.jsonl/30653 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 356
} | [
2830,
3393,
14463,
78107,
12723,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
197,
12361,
675,
2290,
914,
198,
197,
50346,
2043,
27380,
914,
198,
197,
197,
16912,
2320,
688,
914,
198,
197,
42400,
394,
353,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseServerInfo(t *testing.T) {
inputFiles := []string{
"negative-space.xml",
"na-values.xml",
}
for _, inputFile := range inputFiles {
inputFile := inputFile
t.Run(inputFile, func(t *testing.T) {
t.Parallel()
reader, err := os.Open("testdata/" + inputFile)
if err != nil {
t.Fatalf("e... | explode_data.jsonl/3754 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
14463,
5475,
1731,
1155,
353,
8840,
836,
8,
341,
22427,
10809,
1669,
3056,
917,
515,
197,
197,
1,
42224,
27947,
9028,
756,
197,
197,
1,
3376,
69050,
9028,
756,
197,
630,
2023,
8358,
76208,
1669,
2088,
1946,
10809,
341,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSeedLocalCache(t *testing.T) {
t.Parallel()
err := b.SeedLocalCache(context.Background(), currency.NewPair(currency.BTC, currency.USDT))
if err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/76697 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 73
} | [
2830,
3393,
41471,
7319,
8233,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
9859,
1669,
293,
5732,
291,
7319,
8233,
5378,
19047,
1507,
11413,
7121,
12443,
90475,
1785,
7749,
11,
11413,
67672,
10599,
1171,
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
] | 2 |
func TestDirtySet(t *testing.T) {
var set DirtySet
set.MarkDirty(memmap.MappableRange{0, 2 * usermem.PageSize})
set.KeepDirty(memmap.MappableRange{usermem.PageSize, 2 * usermem.PageSize})
set.MarkClean(memmap.MappableRange{0, 2 * usermem.PageSize})
want := &DirtySegmentDataSlices{
Start: []uint64{usermem.PageSi... | explode_data.jsonl/14786 | {
"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,
36485,
1649,
1155,
353,
8840,
836,
8,
341,
2405,
738,
54291,
1649,
198,
8196,
75888,
36485,
39908,
2186,
1321,
86384,
6046,
90,
15,
11,
220,
17,
353,
1196,
10536,
93189,
3518,
8196,
13,
19434,
36485,
39908,
2186,
1321,
86384... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMustNewTestInterfaceRoundRobinPool(t *testing.T) {
assert.Panics(t, func() {
MustNewTestInterfaceRoundRobinPool()
})
assert.NotPanics(t, func() {
MustNewTestInterfaceRoundRobinPool(&testImpl{})
})
} | explode_data.jsonl/24524 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 76
} | [
2830,
3393,
31776,
3564,
2271,
5051,
27497,
76671,
10551,
1155,
353,
8840,
836,
8,
341,
6948,
1069,
276,
1211,
1155,
11,
2915,
368,
341,
197,
9209,
590,
3564,
2271,
5051,
27497,
76671,
10551,
741,
197,
8824,
6948,
15000,
35693,
1211,
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 |
func TestDeleteJobShouldSetJobObjectToExpire(t *testing.T) {
withRepository(func(r *RedisJobRepository) {
job := addLeasedJob(t, r, "queue1", "cluster1")
expiryStatuses, err := r.getExpiryStatus([]*api.Job{job})
if err != nil {
t.Fatalf("getting expiry status failed with error %s", err)
}
assert.False(t,... | explode_data.jsonl/32048 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 308
} | [
2830,
3393,
6435,
12245,
14996,
1649,
12245,
1190,
1249,
8033,
554,
1155,
353,
8840,
836,
8,
341,
46948,
4624,
18552,
2601,
353,
48137,
12245,
4624,
8,
341,
197,
68577,
1669,
912,
2304,
1475,
12245,
1155,
11,
435,
11,
330,
4584,
16,
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 TestUpdateDescription(t *testing.T) {
d1 := Description{
Website: "https://validator.cosmos",
Details: "Test validator",
}
d2 := Description{
Moniker: DoNotModifyDesc,
Identity: DoNotModifyDesc,
Website: DoNotModifyDesc,
Details: DoNotModifyDesc,
}
d3 := Description{
Moniker: "",
Identit... | explode_data.jsonl/733 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 230
} | [
2830,
3393,
4289,
5009,
1155,
353,
8840,
836,
8,
341,
2698,
16,
1669,
7662,
515,
197,
197,
30051,
25,
330,
2428,
1110,
16112,
21147,
8631,
756,
197,
197,
7799,
25,
330,
2271,
22935,
756,
197,
630,
2698,
17,
1669,
7662,
515,
197,
920... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConcurrency(t *testing.T) {
// Create a mathworker kite
mathKite := newXhrKite("mathworker", "0.0.1")
mathKite.Config.DisableAuthentication = true
mathKite.Config.Port = 3637
mathKite.HandleFunc("ping", func(r *Request) (interface{}, error) {
time.Sleep(time.Second)
return "pong", nil
})
go mathKite... | explode_data.jsonl/68245 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 442
} | [
2830,
3393,
79611,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
264,
6888,
21462,
98119,
198,
2109,
587,
42,
632,
1669,
88803,
4079,
42,
632,
445,
10374,
21462,
497,
330,
15,
13,
15,
13,
16,
1138,
2109,
587,
42,
632,
10753,
10166,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInit(t *testing.T) {
c := qt.New(t)
var found bool
var ns *internal.TemplateFuncsNamespace
for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
ns = nsf(&deps.Deps{Log: loggers.NewIgnorableLogger(loggers.NewErrorLogger())})
if ns.Name == name {
found = true
break
}
}
c.Assert(found... | explode_data.jsonl/55800 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 187
} | [
2830,
3393,
3803,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
38949,
7121,
1155,
340,
2405,
1730,
1807,
198,
2405,
12268,
353,
10481,
52530,
9626,
82,
22699,
271,
2023,
8358,
12268,
69,
1669,
2088,
5306,
52530,
9626,
82,
22699,
15603,
341... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestXHeader_StableMarshal(t *testing.T) {
xheaderFrom := generateXHeader("X-Header-Key", "X-Header-Value")
t.Run("non empty", func(t *testing.T) {
wire, err := xheaderFrom.StableMarshal(nil)
require.NoError(t, err)
xheaderTo := new(session.XHeader)
require.NoError(t, xheaderTo.Unmarshal(wire))
requi... | explode_data.jsonl/79969 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
55,
4047,
70645,
480,
55438,
1155,
353,
8840,
836,
8,
341,
10225,
2708,
3830,
1669,
6923,
55,
4047,
445,
55,
12,
4047,
94321,
497,
330,
55,
12,
4047,
12,
1130,
5130,
3244,
16708,
445,
6280,
4287,
497,
2915,
1155,
353,
88... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseExp(t *testing.T) {
now := time.Unix(time.Now().Unix(), 0)
claims := map[string]interface{}{
expClaim: float64(now.Unix()),
}
exp, err := parseExp(claims)
if err != nil {
t.Errorf("parseExp: %v", err)
}
if exp != now {
t.Errorf("parseExp float got: %v, want: %v", exp, now)
}
claims[expCla... | explode_data.jsonl/67150 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 280
} | [
2830,
3393,
14463,
8033,
1155,
353,
8840,
836,
8,
341,
80922,
1669,
882,
10616,
941,
9730,
13244,
1005,
55832,
1507,
220,
15,
692,
197,
48561,
1669,
2415,
14032,
31344,
67066,
197,
48558,
45544,
25,
2224,
21,
19,
32263,
10616,
941,
1470... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.