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 TestValidateRedirectURLFails(t *testing.T) {
tests := []struct {
redirectURL string
msg string
}{
{
redirectURL: "",
msg: "url is blank",
},
{
redirectURL: "/uri",
msg: "url does not start with http://, https:// or ${scheme}://",
},
{
redirectURL: "$scheme://... | explode_data.jsonl/65836 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 780
} | [
2830,
3393,
17926,
17725,
3144,
37,
6209,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
37921,
3144,
914,
198,
197,
21169,
260,
914,
198,
197,
92,
4257,
197,
197,
515,
298,
37921,
3144,
25,
8324,
298,
21169,
25,
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 TestAttrsReadV2(t *testing.T) {
c := setupTest([]string{"get", "attrs", "--host", "orion", "--id", "airqualityobserved1", "--attrs", "CO"})
reqRes := helper.MockHTTPReqRes{}
reqRes.Res.StatusCode = http.StatusOK
reqRes.ResBody = []byte(`{"CO":{"type":"Number","value":400.463869544,"metadata":{}}}`)
reqRes.Pa... | explode_data.jsonl/33056 | {
"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,
53671,
4418,
53,
17,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
6505,
2271,
10556,
917,
4913,
455,
497,
330,
20468,
497,
14482,
3790,
497,
330,
269,
290,
497,
14482,
307,
497,
330,
1310,
10473,
5481,
2771,
16,
497,
14482,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGatherer(t *testing.T) {
r := metrics.NewRegistry()
httpReqsTotal := metrics.GetOrRegisterCounter("http.requests_total", r)
httpReqsInflight := metrics.GetOrRegisterGauge("http.requests_inflight", r)
httpReqsTotal.Inc(123)
httpReqsInflight.Update(10)
g := apmgometrics.Wrap(r)
metrics := gatherMetrics(g... | explode_data.jsonl/11598 | {
"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,
38,
1856,
261,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
16734,
7121,
15603,
741,
28080,
693,
26358,
7595,
1669,
16734,
2234,
2195,
8690,
14099,
445,
1254,
67671,
10784,
497,
435,
340,
28080,
693,
26358,
641,
38390,
1669,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestGocloak_GetUsersByRoleName(t *testing.T) {
t.Parallel()
cfg := GetConfig(t)
client := NewClientWithDebug(t)
token := GetAdminToken(t, client)
tearDownUser, userID := CreateUser(t, client)
defer tearDownUser()
tearDownRole, roleName := CreateRealmRole(t, client)
defer tearDownRole()
role, err := cli... | explode_data.jsonl/79563 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 363
} | [
2830,
3393,
38,
509,
385,
585,
13614,
7137,
1359,
9030,
675,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50286,
1669,
2126,
2648,
1155,
340,
25291,
1669,
1532,
2959,
2354,
7939,
1155,
340,
43947,
1669,
2126,
7210,
3323,
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 TestValidator(t *testing.T) {
testDBEnv := testEnvs[levelDBtestEnvName]
testDBEnv.Init(t)
defer testDBEnv.Cleanup()
db := testDBEnv.GetDBHandle("TestDB")
//populate db with initial data
batch := privacyenabledstate.NewUpdateBatch()
batch.PubUpdates.Put("ns1", "key1", []byte("value1"), version.NewHeight(1, ... | explode_data.jsonl/65027 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 761
} | [
2830,
3393,
14256,
1155,
353,
8840,
836,
8,
341,
18185,
3506,
14359,
1669,
1273,
1702,
11562,
64586,
3506,
1944,
14359,
675,
921,
18185,
3506,
14359,
26849,
1155,
340,
16867,
1273,
3506,
14359,
727,
60639,
741,
20939,
1669,
1273,
3506,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMongoStore(t *testing.T) {
connectCtx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond)
defer cancel()
client, err := mongo.Connect(connectCtx)
if err != nil {
t.Skip()
return
}
err = client.Ping(connectCtx, nil)
if err != nil {
t.Skip()
return
}
ctx := context.Backg... | explode_data.jsonl/77722 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 394
} | [
2830,
3393,
54998,
6093,
1155,
353,
8840,
836,
8,
341,
56905,
23684,
11,
9121,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
220,
20,
15,
77053,
71482,
340,
16867,
9121,
2822,
25291,
11,
1848,
1669,
33814,
43851,
73480,
23684,
340,
743,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestRemoteIPDefault(t *testing.T) {
ipLookups := []string{"RemoteAddr", "X-Real-IP"}
ipv6 := "2601:7:1c82:4097:59a0:a80b:2841:b8c8"
request, err := http.NewRequest("GET", "/", strings.NewReader("Hello, world!"))
if err != nil {
t.Errorf("Unable to create new HTTP request. Error: %v", err)
}
request.Heade... | explode_data.jsonl/54312 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 234
} | [
2830,
3393,
24703,
3298,
3675,
1155,
353,
8840,
836,
8,
341,
46531,
10380,
8602,
1669,
3056,
917,
4913,
24703,
13986,
497,
330,
55,
12,
12768,
12,
3298,
16707,
197,
42676,
21,
1669,
330,
17,
21,
15,
16,
25,
22,
25,
16,
66,
23,
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... | 4 |
func TestDoCIDRsOverlap(t *testing.T) {
cases := []struct {
a string
b string
overlap bool
}{
{
a: "192.168.0.0/30",
b: "192.168.0.3/30",
overlap: true,
},
{
a: "192.168.0.0/30",
b: "192.168.0.4/30",
overlap: false,
},
{
a: "192.168.0.0/29... | explode_data.jsonl/56439 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 526
} | [
2830,
3393,
5404,
54146,
42327,
82171,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11323,
981,
914,
198,
197,
2233,
981,
914,
198,
197,
197,
80061,
1807,
198,
197,
59403,
197,
197,
515,
298,
11323,
25,
981,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetMQParameters(t *testing.T) {
const u = "amqp://admin:password@orb.mq.domain1.com:5672/"
t.Run("Valid env values -> error", func(t *testing.T) {
restoreURLEnv := setEnv(t, mqURLEnvKey, u)
restoreObserverPoolEnv := setEnv(t, mqObserverPoolEnvKey, "3")
restoreChannelPoolEnv := setEnv(t, mqPublisherCha... | explode_data.jsonl/31134 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1323
} | [
2830,
3393,
1949,
35169,
9706,
1155,
353,
8840,
836,
8,
341,
4777,
575,
284,
330,
309,
32763,
1110,
2882,
25,
3833,
31,
29886,
744,
80,
11003,
16,
905,
25,
20,
21,
22,
17,
85312,
3244,
16708,
445,
4088,
6105,
2750,
1464,
1465,
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 TestDefsInfo(t *testing.T) {
var tests = []struct {
src string
obj string
want string
}{
{`package p0; const x = 42`, `x`, `const p0.x untyped int`},
{`package p1; const x int = 42`, `x`, `const p1.x int`},
{`package p2; var x int`, `x`, `var p2.x int`},
{`package p3; type x int`, `x`, `type p3.x... | explode_data.jsonl/29375 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 548
} | [
2830,
3393,
56031,
1731,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
41144,
220,
914,
198,
197,
22671,
220,
914,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
90,
63,
1722,
281,
15,
26,
733,
856,
284,
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... | 6 |
func TestReplaceCallsPush(t *testing.T) {
mkObj := func(name string, val interface{}) testUndeltaObject {
return testUndeltaObject{name: name, val: val}
}
var got []interface{}
var callcount int = 0
push := func(m []interface{}) {
callcount++
got = m
}
u := NewUndeltaStore(push, testUndeltaKe... | explode_data.jsonl/69027 | {
"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,
23107,
55292,
16644,
1155,
353,
8840,
836,
8,
972,
2109,
74,
5261,
1669,
2915,
3153,
914,
11,
1044,
3749,
28875,
1273,
19957,
5964,
1190,
972,
197,
853,
1273,
19957,
5964,
1190,
47006,
25,
829,
11,
1044,
25,
1044,
1771,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOperatorDump(t *testing.T) {
goldenFilepath := filepath.Join(env.IstioSrc, "operator/cmd/mesh/testdata/operator/output/operator-dump.yaml")
odArgs := &operatorDumpArgs{
common: operatorCommonArgs{
hub: "foo.io/istio",
tag: "1.2.3",
imagePullSecrets: []string{"imagePul... | explode_data.jsonl/67546 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 519
} | [
2830,
3393,
18461,
51056,
1155,
353,
8840,
836,
8,
341,
3174,
813,
268,
1703,
2343,
1669,
26054,
22363,
16978,
2447,
267,
815,
20360,
11,
330,
7884,
83033,
3183,
4288,
12697,
691,
68341,
47016,
68341,
1737,
1510,
33406,
5130,
197,
347,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccAWSWafSizeConstraintSet_changeConstraints(t *testing.T) {
var before, after waf.SizeConstraintSet
setName := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5))
resourceName := "aws_waf_size_constraint_set.size_constraint_set"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { ... | explode_data.jsonl/45418 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 928
} | [
2830,
3393,
14603,
36136,
54,
2577,
1695,
17890,
1649,
15947,
12925,
1155,
353,
8840,
836,
8,
341,
2405,
1573,
11,
1283,
289,
2577,
2465,
17890,
1649,
198,
8196,
675,
1669,
8879,
17305,
445,
2141,
17890,
1649,
11069,
82,
497,
1613,
6788... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSendTransactionProposal(t *testing.T) {
user := mspmocks.NewMockSigningIdentity("test", "1234")
ctx := mocks.NewMockContext(user)
responseMessage := "success"
peer := mocks.MockPeer{MockName: "Peer1", MockURL: "http://peer1.com",
MockRoles: []string{}, MockCert: nil, Status: 200, Payload: []byte("A"),
... | explode_data.jsonl/26396 | {
"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,
11505,
8070,
98637,
1155,
353,
8840,
836,
8,
341,
19060,
1669,
296,
2154,
16712,
82,
7121,
11571,
93358,
18558,
445,
1944,
497,
330,
16,
17,
18,
19,
1138,
20985,
1669,
68909,
7121,
11571,
1972,
4277,
340,
21735,
2052,
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... | 7 |
func TestModule(t *testing.T) {
thread := &starlark.Thread{Load: testdata.NewLoader(LoadModule, ModuleName)}
starlarktest.SetReporter(thread, t)
// Execute test file
_, err := starlark.ExecFile(thread, "testdata/test.star", nil, nil)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/20982 | {
"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,
3332,
1155,
353,
8840,
836,
8,
341,
68214,
1669,
609,
11870,
75,
838,
32032,
90,
5879,
25,
1273,
691,
7121,
9181,
4957,
2731,
3332,
11,
13711,
675,
10569,
197,
11870,
75,
838,
1944,
4202,
52766,
34007,
11,
259,
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... | 2 |
func TestReadDockerConfigFile(t *testing.T) {
configJsonFileName := "config.json"
var fileInfo *os.File
preferredPaths := []string{}
//test dockerconfig json
inputDockerconfigJsonFile := "{ \"auths\": { \"http://foo.example.com\":{\"auth\":\"Zm9vOmJhcgo=\",\"email\":\"foo@example.com\"}}}"
preferredPath... | explode_data.jsonl/40708 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 548
} | [
2830,
3393,
4418,
35,
13659,
2648,
1703,
1155,
353,
8840,
836,
8,
972,
25873,
5014,
10903,
1669,
330,
1676,
4323,
5031,
2405,
73651,
353,
436,
8576,
319,
40346,
5554,
26901,
1669,
3056,
917,
90,
2570,
197,
322,
1944,
26588,
1676,
2951,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRSAPSSKeyError(t *testing.T) {
// crypto/tls does not support the rsa_pss_pss_* SignatureSchemes. If support for
// public keys with OID RSASSA-PSS is added to crypto/x509, they will be misused with
// the rsa_pss_rsae_* SignatureSchemes. Assert that RSASSA-PSS certificates don't
// parse, or that they don... | explode_data.jsonl/27734 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1182
} | [
2830,
3393,
11451,
2537,
1220,
1592,
1454,
1155,
353,
8840,
836,
8,
341,
197,
322,
19028,
5523,
4730,
1558,
537,
1824,
279,
68570,
620,
778,
620,
778,
45797,
32232,
50,
66346,
13,
1416,
1824,
369,
198,
197,
322,
584,
6894,
448,
76358,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConnectToMongoErrorNoPassword(t *testing.T) {
originalMongoRootPassword := os.Getenv("MONGO_INITDB_ROOT_PASSWORD")
os.Setenv("MONGO_INITDB_ROOT_PASSWORD", "")
_, _, _, err := ConnectToMongo(mongoTestsHostURL, "", "")
expectedError := errors.New("is not possible store notifications results in mongodb no va... | explode_data.jsonl/71136 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
3393,
14611,
1249,
54998,
1454,
2753,
4876,
1155,
353,
8840,
836,
8,
341,
197,
9889,
54998,
8439,
4876,
1669,
2643,
64883,
445,
44,
63984,
14446,
3506,
16197,
23059,
1138,
25078,
4202,
3160,
445,
44,
63984,
14446,
3506,
16197,
23059... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStreamLimitOffset(t *testing.T) {
executor, sbc1, sbc2, _ := createLegacyExecutorEnv()
// This test is similar to TestStreamUnsharded except that it returns a Result > 10 bytes,
// such that the splitting of the Result into multiple Result responses gets tested.
sbc1.SetResults([]*sqltypes.Result{{
Fiel... | explode_data.jsonl/67386 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 760
} | [
2830,
3393,
3027,
16527,
6446,
1155,
353,
8840,
836,
8,
341,
67328,
4831,
11,
7898,
66,
16,
11,
7898,
66,
17,
11,
716,
1669,
1855,
77415,
25255,
14359,
2822,
197,
322,
1096,
1273,
374,
4428,
311,
3393,
3027,
1806,
927,
20958,
3650,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAbsCollection_Join(t *testing.T) {
intColl := NewIntCollection([]int{2, 4, 3})
out := intColl.Join(",")
if out != "2,4,3" {
t.Fatal("join错误")
}
out = intColl.Join(",", func(item interface{}) string {
return fmt.Sprintf("'%d'", item.(int))
})
if out != "'2','4','3'" {
t.Fatal("join 错误")
}
} | explode_data.jsonl/66459 | {
"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,
27778,
6482,
10598,
1961,
1155,
353,
8840,
836,
8,
341,
2084,
15265,
1669,
1532,
1072,
6482,
10556,
396,
90,
17,
11,
220,
19,
11,
220,
18,
3518,
13967,
1669,
526,
15265,
22363,
76675,
743,
700,
961,
330,
17,
11,
19,
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 TestRemoveExpiredCA(t *testing.T) {
caSecret := getExpiredCertSecret()
oldCertLength := len(caSecret.Data["tls.crt"])
c := fake.NewFakeClient(caSecret)
removeExpiredCA(c, serverCACerts)
c.Get(context.TODO(),
types.NamespacedName{Name: serverCACerts, Namespace: namespace},
caSecret)
if len(caSecret.Data[... | explode_data.jsonl/82272 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 157
} | [
2830,
3393,
13021,
54349,
5049,
1155,
353,
8840,
836,
8,
1476,
197,
924,
19773,
1669,
633,
54349,
36934,
19773,
741,
61828,
36934,
4373,
1669,
2422,
82506,
19773,
3336,
1183,
34488,
93869,
14108,
1444,
1669,
12418,
7121,
52317,
2959,
82506,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigFileName(t *testing.T) {
c, err := NewContainer(ContainerName)
if err != nil {
t.Errorf(err.Error())
}
if c.ConfigFileName() == "" {
t.Errorf("ConfigFileName failed...")
}
} | explode_data.jsonl/2747 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
2648,
10903,
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,
272,
10753,
10903,
368,
621,
1591,
341,
197,
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
] | 3 |
func TestToUintE(t *testing.T) {
type args struct {
s string
}
tests := []struct {
name string
args args
want uint
wantErr bool
}{
{
name: "",
args: args{
s: "21",
},
want: 21,
wantErr: false,
},
{
name: "",
args: args{
s: "21a",
},
want: 0,
wantE... | explode_data.jsonl/5476 | {
"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,
1249,
21570,
36,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1903,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
198,
197,
50780,
262,
2622,
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 TestSecretAuthProviderBadKey(t *testing.T) {
req := httptest.NewRequest(http.MethodGet, "/", nil)
req.Header.Add("Authorization", "SharedKey fake")
req.Header.Add("X-Account-UUID", "woot")
rec, _ := makeMiddlewareRequest(req, secreteAuthMiddleware)
assert.Equal(t, 401, rec.Code)
} | explode_data.jsonl/17022 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 107
} | [
2830,
3393,
19773,
96443,
17082,
1592,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
54320,
70334,
75274,
19886,
20798,
1949,
11,
64657,
2092,
340,
24395,
15753,
1904,
445,
18124,
497,
330,
16997,
1592,
12418,
1138,
24395,
15753,
1904,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNoSelfOrCls(t *testing.T) {
tc := requireTestCase(t, `
"".split($)
`)
comps := requireCompletions(t, tc, KWArgs{}, CallPatterns{})
for _, c := range comps {
for _, ph := range c.Snippet.Placeholders() {
arg := c.Snippet.Text[ph.Begin:ph.End]
assert.NotContains(t, "self", arg)
assert.NotContains... | explode_data.jsonl/56040 | {
"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,
2753,
12092,
2195,
46343,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
1373,
16458,
1155,
11,
22074,
69355,
6960,
699,
340,
197,
63,
692,
32810,
1690,
1669,
1373,
1092,
10819,
908,
1155,
11,
17130,
11,
71915,
4117,
22655,
7143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDealDeviceTwin(t *testing.T) {
var mockOrmer *beego.MockOrmer
var mockQuerySeter *beego.MockQuerySeter
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockOrmer = beego.NewMockOrmer(mockCtrl)
mockQuerySeter = beego.NewMockQuerySeter(mockCtrl)
dbm.DBAccess = mockOrmer
str := typeString
opt... | explode_data.jsonl/30636 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1781
} | [
2830,
3393,
72841,
6985,
51,
7526,
1155,
353,
8840,
836,
8,
341,
2405,
7860,
2195,
1174,
353,
1371,
13243,
24664,
2195,
1174,
198,
2405,
7860,
2859,
50,
1404,
353,
1371,
13243,
24664,
2859,
50,
1404,
198,
77333,
15001,
1669,
342,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetIncomingRequest_ErrorCalculateID(t *testing.T) {
t.Parallel()
ctx := flow.TestContextWithPulse(
inslogger.TestContext(t),
insolar.GenesisPulse.PulseNumber+10,
)
var (
msg payload.Meta
err error
handler *handle.SetIncomingRequest
)
t.Run("calculateID procedure returns err", func(t *... | explode_data.jsonl/49672 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 773
} | [
2830,
3393,
1649,
97564,
1900,
28651,
47866,
915,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
6396,
8787,
1972,
2354,
47,
17217,
1006,
197,
197,
1330,
9786,
8787,
1972,
1155,
1326,
197,
197,
1330,
7417,
65384,
137... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReportTemplate(t *testing.T) {
var testcases = []struct {
org string
repo string
number int
suffix string
}{
{
org: "o",
repo: "r",
number: 4,
suffix: "?org=o&repo=r&pr=4",
},
{
org: "kubernetes",
repo: "test-infra",
number: 123,
suffix: "?org=kubernetes&r... | explode_data.jsonl/55571 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 606
} | [
2830,
3393,
10361,
7275,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
23910,
284,
3056,
1235,
341,
197,
87625,
262,
914,
198,
197,
17200,
5368,
256,
914,
198,
197,
57135,
526,
198,
197,
1903,
13554,
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... | 4 |
func TestBlockValidSyntax(t *testing.T) {
tf.UnitTest(t)
blockTime := clock.DefaultEpochDuration
ts := time.Unix(1234567890, 0)
mclock := clock.NewFake(ts)
chainClock := clock.NewChainClockFromClock(uint64(ts.Unix()), blockTime, mclock)
ctx := context.Background()
mclock.Advance(blockTime)
validator := consen... | explode_data.jsonl/31028 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 750
} | [
2830,
3393,
4713,
4088,
33890,
1155,
353,
8840,
836,
8,
341,
3244,
69,
25159,
2271,
1155,
692,
47996,
1462,
1669,
8866,
13275,
44338,
12945,
198,
57441,
1669,
882,
10616,
941,
7,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
11,
220,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRefDescriptions(t *testing.T) {
t.Parallel()
ctx := actor.WithActor(context.Background(), &actor.Actor{
UID: 1,
})
db := database.NewMockDB()
gitCommands := append(getGitCommandsWithFiles("file1", "file2"), "git checkout -b my-other-branch")
gitCommands = append(gitCommands, getGitCommandsWithFiles("fi... | explode_data.jsonl/8527 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 903
} | [
2830,
3393,
3945,
68145,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
12089,
26124,
18870,
5378,
19047,
1507,
609,
5621,
76094,
515,
197,
197,
6463,
25,
220,
16,
345,
197,
3518,
20939,
1669,
4625,
7121,
11571,
3506... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue18525(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 t1")
tk.MustExec("create table t1 (col0 BLOB, col1 CHAR(74), col2 DATE UNIQUE)")
tk.MustExec("insert into t1 values ('l', '7a3... | explode_data.jsonl/65543 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
42006,
16,
23,
20,
17,
20,
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 TestApiDevAuthVerifyToken(t *testing.T) {
t.Parallel()
// enforce specific field naming in errors returned by API
updateRestErrorFieldName()
tcases := []struct {
req *http.Request
code int
body string
headers map[string]string
err error
}{
{
req: test.MakeSimpleRequest("POST",
... | explode_data.jsonl/630 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1257
} | [
2830,
3393,
6563,
14592,
5087,
32627,
3323,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
28162,
3151,
2070,
34948,
304,
5975,
5927,
553,
5333,
198,
27175,
12416,
1454,
51241,
2822,
3244,
23910,
1669,
3056,
1235,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPickUpRulesByVariable(t *testing.T) {
ruleMap := generateRuleStore()
cases := []struct {
name string
searchVar rules.VariableFieldName
ruleStore map[string]rules.RuleMatrix
expectedRes bool
expectedArr []string
}{
{
name: "Basic Pickup Test",
searchVar: rules.SanctionEx... | explode_data.jsonl/74052 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 334
} | [
2830,
3393,
36953,
2324,
26008,
1359,
7827,
1155,
353,
8840,
836,
8,
341,
7000,
1111,
2227,
1669,
6923,
11337,
6093,
741,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
45573,
3962,
256,
5601,
40070,
51241,
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 TestField(t *testing.T) {
esVersion2, err := NewVersion("2.0.0")
assert.NoError(t, err)
falseVar := false
tests := []struct {
field Field
method func(f Field) common.MapStr
output common.MapStr
}{
{
field: Field{Type: "long"},
method: func(f Field) common.MapStr { return f.other() },
out... | explode_data.jsonl/7475 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1551
} | [
2830,
3393,
1877,
1155,
353,
8840,
836,
8,
1476,
78966,
5637,
17,
11,
1848,
1669,
1532,
5637,
445,
17,
13,
15,
13,
15,
1138,
6948,
35699,
1155,
11,
1848,
692,
36012,
3962,
1669,
895,
271,
78216,
1669,
3056,
1235,
341,
197,
39250,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFiles_Shared(t *testing.T) {
setup()
defer teardown()
fixture := `
{
"shared": [
{
"file_id": 388029022,
"file_name": "cowboy",
"shared_with": 1
},
{
"file_id": 388029023,
"file_name": "bebop",
"shared_with": 1
}
],
"status": "OK"
}
`
mux.HandleFunc("/v2/files/shared", fun... | explode_data.jsonl/48326 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 333
} | [
2830,
3393,
10809,
36578,
1605,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
1166,
12735,
1669,
22074,
515,
197,
1,
6100,
788,
2278,
262,
341,
197,
197,
1,
1192,
842,
788,
220,
18,
23,
23,
15,
17,
24,
15,
17,
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 TestTaskByBuildPaginator(t *testing.T) {
numTasks := 300
Convey("When paginating with a Connector", t, func() {
serviceContext := data.MockConnector{
URL: "http://evergreen.example.net",
}
Convey("and there are tasks to be found", func() {
cachedTasks := []task.Task{}
cachedOldTasks := []task.Task... | explode_data.jsonl/9566 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3033
} | [
2830,
3393,
6262,
1359,
11066,
69065,
1155,
353,
8840,
836,
8,
341,
22431,
25449,
1669,
220,
18,
15,
15,
198,
93070,
5617,
445,
4498,
14774,
15873,
448,
264,
54814,
497,
259,
11,
2915,
368,
341,
197,
52934,
1972,
1669,
821,
24664,
359... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSignSameVoteTwice(t *testing.T) {
config := configSetup(t)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
_, vss := makeState(ctx, t, makeStateArgs{config: config, validators: 2})
randBytes := tmrand.Bytes(crypto.HashSize)
vote := signVote(
ctx,
t,
vss[1],
tmproto.Preco... | explode_data.jsonl/54295 | {
"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,
7264,
19198,
41412,
22816,
558,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
2193,
21821,
1155,
340,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
2822,
197,
6878,
348,
778,
1669,
1281,
1397,
7502,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRetrieveSubscriptionOk(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 {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.Statu... | explode_data.jsonl/64667 | {
"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,
87665,
33402,
11578,
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,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestHandshakeClientECDHEECDSAChaCha20(t *testing.T) {
config := testConfig.Clone()
config.CipherSuites = []uint16{TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305}
test := &clientTest{
name: "ECDHE-ECDSA-CHACHA20-POLY1305",
args: []string{"-cipher", "ECDHE-ECDSA-CHACHA20-POLY1305"},
config: config,
cert: t... | explode_data.jsonl/27704 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 185
} | [
2830,
3393,
2314,
29661,
2959,
36,
6484,
1799,
7498,
72638,
95971,
95971,
17,
15,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
1273,
2648,
64463,
741,
25873,
727,
10558,
62898,
288,
284,
3056,
2496,
16,
21,
90,
45439,
2089,
6484,
1799,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDigits(t *testing.T) {
expected := []byte{0x3F, 0x06}
if b := Digits(0, 1); !bytes.Equal(b, expected) {
t.Fatalf("%v != %v", b, expected)
}
} | explode_data.jsonl/32415 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 74
} | [
2830,
3393,
47167,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
3056,
3782,
90,
15,
87,
18,
37,
11,
220,
15,
87,
15,
21,
532,
743,
293,
1669,
422,
18667,
7,
15,
11,
220,
16,
1215,
753,
9651,
12808,
1883,
11,
3601,
8,
341,
197,
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
] | 2 |
func TestOptionPanic(t *testing.T) {
t.Parallel()
require.NotPanics(t, func() {
moduleFileSet := testGetModuleFileSet(t, filepath.Join("testdata", "optionpanic"))
_, _, err := NewBuilder(zap.NewNop()).Build(
context.Background(),
moduleFileSet,
)
require.NoError(t, err)
})
} | explode_data.jsonl/1254 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
5341,
47,
31270,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
17957,
15000,
35693,
1211,
1155,
11,
2915,
368,
341,
197,
54020,
1703,
1649,
1669,
1273,
1949,
3332,
1703,
1649,
1155,
11,
26054,
22363,
445,
92425,
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 TestUserFind(t *testing.T) {
defer gock.Off()
gock.New("https://api.bitbucket.org").
Get("/2.0/user").
Reply(200).
Type("application/json").
File("testdata/user.json")
client, _ := New("https://api.bitbucket.org")
got, _, err := client.Users.Find(context.Background())
if err != nil {
t.Error(err)
... | explode_data.jsonl/31629 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 225
} | [
2830,
3393,
1474,
9885,
1155,
353,
8840,
836,
8,
341,
16867,
728,
377,
13,
4596,
2822,
3174,
1176,
7121,
445,
2428,
1110,
2068,
30099,
30410,
2659,
38609,
197,
37654,
4283,
17,
13,
15,
11739,
38609,
197,
197,
20841,
7,
17,
15,
15,
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... | 3 |
func TestStatePrepareResponse_Execute(t *testing.T) {
t.Run("new connection", func(t *testing.T) {
t.Run("error while saving attachment handling state", func(t *testing.T) {
expected := errors.New("test")
ctx := &context{Invitation: &Invitation{
Requests: []*decorator.Attachment{{
ID: uuid.New().Strin... | explode_data.jsonl/11781 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1671
} | [
2830,
3393,
1397,
50590,
2582,
83453,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
931,
3633,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3244,
16708,
445,
841,
1393,
13997,
19984,
11589,
1584,
497,
2915,
1155,
353,
8840,
836,
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 TestGetOrderInfo(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() {
t.Skip("skipping test: api keys not set")
}
tradablePairs, err := b.FetchTradablePairs(context.Background(),
asset.CoinMarginedFutures)
if err != nil {
t.Error(err)
}
if len(tradablePairs) == 0 {
t.Fatal("no tradable pairs")
}
... | explode_data.jsonl/76672 | {
"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,
1949,
4431,
1731,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
25,
6330,
6894,
537,
738,
1138,
197,
532,
25583,
329,
480,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkDir(t *testing.T) {
wd := os.TempDir()
// For Darwin `os.TempDir()` returns `/tmp` which is symlink to `/private/tmp`.
if runtime.GOOS == "darwin" {
wd = "/private/tmp"
}
protest.AllowRecording(t)
withTestProcessArgs("workdir", t, wd, []string{}, 0, func(p *proc.Target, fixture protest.Fixture) {
... | explode_data.jsonl/56278 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 220
} | [
2830,
3393,
6776,
6184,
1155,
353,
8840,
836,
8,
341,
197,
6377,
1669,
2643,
65009,
6184,
741,
197,
322,
1752,
44380,
1565,
436,
65009,
6184,
54258,
4675,
37301,
5173,
63,
892,
374,
83221,
311,
37301,
1996,
57008,
18639,
743,
15592,
975... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBasics(t *testing.T) {
s := newSummary(2)
err := s.Add(1, 1)
if err != nil {
t.Errorf("Failed to add simple item")
}
if s.Add(math.NaN(), 1) == nil {
t.Errorf("Adding math.NaN() shouldn't be allowed")
}
if s.Add(1, 0) == nil {
t.Errorf("Adding count=0 shouldn't be allowed")
}
} | explode_data.jsonl/77558 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
33603,
1211,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
501,
19237,
7,
17,
692,
9859,
1669,
274,
1904,
7,
16,
11,
220,
16,
692,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
9408,
311,
912,
4285,
1509,
1138,
197,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSyncer_processStatusUpdates_RetriesOnConflict(t *testing.T) {
// Admin cluster mocks
adminMocker := gomock.NewController(t)
adminMock := mocks.NewMockClient(adminMocker)
statusMocker := gomock.NewController(t)
statusMock := mocks.NewMockClient(statusMocker)
// Reduce the retry delay to make the test fas... | explode_data.jsonl/42636 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1091
} | [
2830,
3393,
12154,
261,
11305,
2522,
37091,
2568,
295,
4019,
1925,
57974,
1155,
353,
8840,
836,
8,
341,
197,
322,
7582,
10652,
68909,
198,
64394,
11571,
261,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
64394,
11571,
1669,
68909,
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 TestIssue235CircularDep(t *testing.T) {
t.Skip("TODO: return an error on circular dependencies between external files of a spec")
loader := NewSwaggerLoader()
loader.IsExternalRefsAllowed = true
doc, err := loader.LoadSwaggerFromFile("testdata/issue235.spec0-typo.yml")
require.Nil(t, doc)
require.Error(t, er... | explode_data.jsonl/48662 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 111
} | [
2830,
3393,
42006,
17,
18,
20,
82440,
7839,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
445,
14732,
25,
470,
458,
1465,
389,
26931,
19543,
1948,
9250,
3542,
315,
264,
1398,
1138,
197,
8355,
1669,
1532,
67714,
9181,
741,
197,
8355,
4506... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQueueCommon(t *testing.T) {
connection, err := OpenConnection("queue-conn", "tcp", "localhost:6379", 1, nil)
assert.NoError(t, err)
require.NotNil(t, connection)
queue, err := connection.OpenQueue("queue-q")
assert.NoError(t, err)
require.NotNil(t, queue)
_, err = queue.PurgeReady()
assert.NoError(t, ... | explode_data.jsonl/44663 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 683
} | [
2830,
3393,
7554,
10839,
1155,
353,
8840,
836,
8,
341,
54590,
11,
1848,
1669,
5264,
4526,
445,
4584,
12,
5148,
497,
330,
27161,
497,
330,
8301,
25,
21,
18,
22,
24,
497,
220,
16,
11,
2092,
340,
6948,
35699,
1155,
11,
1848,
340,
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 TestReadArtifact_Succeed(t *testing.T) {
store, manager, job := initWithJob(t)
defer store.Close()
expectedContent := "test"
filePath := "test/file.txt"
store.ObjectStore().AddFile([]byte(expectedContent), filePath)
// Create a scheduled run
// job, _ := manager.CreateJob(&api.Job{
// Name: "pp1",... | explode_data.jsonl/28398 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 705
} | [
2830,
3393,
4418,
85578,
1098,
29264,
1155,
353,
8840,
836,
8,
341,
57279,
11,
6645,
11,
2618,
1669,
13864,
12245,
1155,
340,
16867,
3553,
10421,
2822,
42400,
2762,
1669,
330,
1944,
698,
17661,
1820,
1669,
330,
1944,
23903,
3909,
698,
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 TestMergeSchema_unions(t *testing.T) {
t.Run("Matching", func(t *testing.T) {
originalSchema, err := graphql.LoadSchema(`
type Foo {
name: String!
}
type Bar {
lastName: String!
}
union Foobar = Foo | Bar
`)
if !assert.Nil(t, err, "original schema didn't parse") {
return
}
... | explode_data.jsonl/20240 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 644
} | [
2830,
3393,
52096,
8632,
4907,
908,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
64430,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
9889,
8632,
11,
1848,
1669,
48865,
13969,
8632,
61528,
298,
13158,
33428,
341,
571,
11609,
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... | 7 |
func TestSetEnvKeyReplacer(t *testing.T) {
Reset()
AutomaticEnv()
os.Setenv("REFRESH_INTERVAL", "30s")
replacer := strings.NewReplacer("-", "_")
SetEnvKeyReplacer(replacer)
assert.Equal(t, "30s", Get("refresh-interval"))
} | explode_data.jsonl/5563 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
1649,
14359,
1592,
693,
90212,
1155,
353,
8840,
836,
8,
341,
197,
14828,
2822,
197,
62790,
14359,
741,
25078,
4202,
3160,
445,
5996,
21221,
37353,
497,
330,
18,
15,
82,
5130,
17200,
90212,
1669,
9069,
7121,
693,
90212,
68046... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPolicy(t *testing.T) {
tests := []struct {
name string
policy func() *Policy
expectedString string
}{
{
"empty",
func() *Policy {
return NewPolicy(nil)
},
``,
},
{
"initial",
func() *Policy {
return NewPolicy(&Policy{
Directives: DirectivesMap{
... | explode_data.jsonl/3504 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 769
} | [
2830,
3393,
13825,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
3223,
8018,
260,
2915,
368,
353,
13825,
198,
197,
42400,
703,
914,
198,
197,
59403,
197,
197,
515,
298,
197,
1,
3194,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJoinerReadAt(t *testing.T) {
store := mock.NewStorer()
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
// create root chunk with 2 references and the referenced data chunks
rootChunk := filetest.GenerateTestRandomFileChunk(swarm.ZeroAddress, swarm.ChunkSize*2, swarm.... | explode_data.jsonl/51989 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 485
} | [
2830,
3393,
12292,
261,
4418,
1655,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
7860,
7121,
623,
14827,
2822,
20985,
11,
9121,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
882,
32435,
340,
16867,
9121,
2822,
197,
322,
1855,
3704,
11879,
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... | 7 |
func TestEntry_Select(t *testing.T) {
for name, tt := range map[string]struct {
keys []fyne.KeyName
text string
setupReverse bool
wantMarkup string
wantSelection string
wantText string
}{
"delete single-line": {
keys: []fyne.KeyName{fyne.KeyDelete},
wantText: "Te... | explode_data.jsonl/12352 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2640
} | [
2830,
3393,
5874,
58073,
1155,
353,
8840,
836,
8,
341,
2023,
829,
11,
17853,
1669,
2088,
2415,
14032,
60,
1235,
341,
197,
80112,
688,
3056,
30595,
811,
9610,
675,
198,
197,
15425,
688,
914,
198,
197,
84571,
45695,
220,
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... | 2 |
func TestHoard_ReEntry(t *testing.T) {
h := Make(ExpiresDefault)
result := h.Get("reone", func() (interface{}, *Expiration) {
return h.Get("retwo", func() (interface{}, *Expiration) {
return "retwo", ExpiresNever
}), ExpiresNever
}).(string)
assert.Equal(t, result, "retwo")
} | explode_data.jsonl/82510 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 114
} | [
2830,
3393,
39,
33386,
50693,
5874,
1155,
353,
8840,
836,
8,
1476,
9598,
1669,
7405,
7,
65331,
3675,
692,
9559,
1669,
305,
2234,
445,
265,
603,
497,
2915,
368,
320,
4970,
22655,
353,
66301,
8,
341,
197,
853,
305,
2234,
445,
2122,
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 TestOSImageList(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc(testlib.CloudServerURL(osImagePath), func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, http.MethodGet, r.Method)
assert.Equal(t, "True", r.URL.Query().Get("os_images"))
resp := `
{
"os_images": [
{
... | explode_data.jsonl/35481 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2193
} | [
2830,
3393,
3126,
1906,
852,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
741,
2109,
2200,
63623,
8623,
2740,
94492,
5475,
3144,
9638,
66356,
701,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6948,
12808,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetTeamByNameSanitization(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer th.TearDown()
var team *model.Team
if res, err := th.BasicClient.CreateTeam(&model.Team{
DisplayName: t.Name() + "_1",
Name: GenerateTestTeamName(),
Email: th.GenerateTestEmail(),
Type... | explode_data.jsonl/48524 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 684
} | [
2830,
3393,
1949,
14597,
16898,
23729,
275,
2022,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
1005,
3803,
2320,
7210,
741,
16867,
270,
836,
682,
4454,
2822,
2405,
2083,
353,
2528,
65842,
198,
743,
592,
11,
1848,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestWrap(t *testing.T) {
w := httptest.NewRecorder()
jw := Wrap(w)
jw2 := Wrap(jw)
if jw2 != jw {
t.Errorf("Wrap: have: %q, want: %q", jw2, jw)
}
} | explode_data.jsonl/3980 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 87
} | [
2830,
3393,
26787,
1155,
353,
8840,
836,
8,
341,
6692,
1669,
54320,
70334,
7121,
47023,
741,
12428,
86,
1669,
42187,
3622,
340,
12428,
86,
17,
1669,
42187,
3325,
86,
692,
743,
502,
86,
17,
961,
502,
86,
341,
197,
3244,
13080,
445,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDebug(t *testing.T) {
client := resty.New()
resp, err := client.R().Get(BASE_URL + "/debug/health")
if err != nil {
t.Fail()
}
assert.Equal(t, 200, resp.StatusCode())
} | explode_data.jsonl/44521 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
7939,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
2732,
88,
7121,
741,
34653,
11,
1848,
1669,
2943,
2013,
1005,
1949,
51746,
8000,
488,
3521,
8349,
14,
12120,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
57243,
741,
197,
532... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHistogramNotSet(t *testing.T) {
ctx := context.Background()
test.RunProfiles(t, func(t *testing.T, profile test.Profile) {
descriptor := test.NewAggregatorTest(export.MeasureKind, profile.NumberKind, false)
agg := New(descriptor, boundaries[profile.NumberKind])
agg.Checkpoint(ctx, descriptor)
asum... | explode_data.jsonl/2054 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
77210,
2623,
1649,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
18185,
16708,
62719,
1155,
11,
2915,
1155,
353,
8840,
836,
11,
5526,
1273,
59872,
8,
341,
197,
52912,
6820,
1669,
1273,
7121,
9042,
58131,
2271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGrantSucccessNotStubbedContext(t *testing.T) {
assert := assert.New(t)
pn := pubnub.NewPubNub(pamConfigCopy())
pn.Config.UUID = "asd,|//&aqwe"
res, _, err := pn.GrantWithContext(backgroundContext).
Read(true).Write(true).Manage(true).
AuthKeys([]string{"pam-key"}).Channels([]string{"ch1", "ch2"}).
... | explode_data.jsonl/43189 | {
"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,
67971,
50,
14570,
1120,
2623,
33838,
2721,
1972,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
3223,
77,
1669,
6675,
77,
392,
7121,
29162,
45,
392,
1295,
309,
2648,
12106,
12367,
3223,
77,
10753,
39636,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestYaegi(t *testing.T) {
t.Run("Happy path with string result", func(t *testing.T) {
goInt := NewGolangInterpreter(`
"xyz"
`)
result, err := goInt.EvalString()
require.NoError(t, err)
require.Equal(t, "xyz", result)
})
t.Run("Happy path with boolean as result", func(t *testing.T) {
goInt := NewGola... | explode_data.jsonl/39720 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 994
} | [
2830,
3393,
62893,
791,
72,
1155,
353,
8840,
836,
8,
1476,
3244,
16708,
445,
32847,
1815,
448,
914,
1102,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
30680,
1072,
1669,
1532,
38,
37287,
58426,
61528,
1,
28854,
698,
24183,
197,
9559,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewReadLogsCommandLines(t *testing.T) {
lines := []string{"1", "2", "3"}
f, cleanup := setupTestFile(t)
defer cleanup()
appendToFile(t, f, lines)
cmd := newReadLogsCommand()
mockLogOutputWriter := new(mockLogOutputWriter)
defer mockLogOutputWriter.AssertExpectations(t)
_, wg := setupMockLogOutputWrit... | explode_data.jsonl/3427 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
3564,
4418,
51053,
4062,
16794,
1155,
353,
8840,
836,
8,
341,
78390,
1669,
3056,
917,
4913,
16,
497,
330,
17,
497,
330,
18,
16707,
1166,
11,
21290,
1669,
6505,
2271,
1703,
1155,
340,
16867,
21290,
741,
82560,
41550,
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 TestGetOwnedNamespacesErrorIfClosed(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
d, mapCh, _ := newTestDatabase(t, ctrl, Bootstrapped)
defer func() {
close(mapCh)
}()
require.NoError(t, d.Open())
require.NoError(t, d.Terminate())
_, err := d.GetOwnedNamespaces()
require.Equal(t... | explode_data.jsonl/46531 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
1949,
57641,
7980,
27338,
1454,
2679,
26884,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
2698,
11,
2415,
1143,
11,
716,
1669,
501,
2271,
5988,
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 TestContextCanceled(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
user := User{UserName: "slene"}
err := dORM.ReadWithCtx(ctx, &user, "UserName")
throwFail(t, err)
cancel()
err = dORM.ReadWithCtx(ctx, &user, "UserName")
throwFail(t, AssertIs(err, context.Canceled))
ctx, cancel... | explode_data.jsonl/18171 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
1972,
63263,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
12367,
19060,
1669,
2657,
90,
18856,
25,
330,
3226,
1952,
63159,
9859,
1669,
294,
4365,
6503,
2354,
23684,
7502,
11,
609,
872,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHashJoiner(t *testing.T) {
defer leaktest.AfterTest(t)()
testCases := joinerTestCases()
// Add INTERSECT ALL cases with HashJoinerSpecs.
for _, tc := range intersectAllTestCases() {
testCases = append(testCases, setOpTestCaseToJoinerTestCase(tc))
}
// Add EXCEPT ALL cases with HashJoinerSpecs.
for ... | explode_data.jsonl/16323 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1525
} | [
2830,
3393,
6370,
12292,
261,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
18185,
37302,
1669,
5138,
261,
2271,
37302,
2822,
197,
322,
2691,
29342,
925,
1162,
13097,
5048,
448,
6531,
12292,
261,
8327,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestRschedBackup(t *testing.T) {
if os.Getenv("RSCHED_TEST_SKIP_E2E") != "" {
t.Skip("RSCHED_TEST_SKIP_E2E environment variable set")
}
prjRoot := testsupport.ProjectRoot(t)
resticBinary := filepath.Join(prjRoot, "bin", "restic")
if !testsupport.PathExists(t, resticBinary) {
t.Skipf("%s does not exist.", ... | explode_data.jsonl/55416 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 410
} | [
2830,
3393,
42327,
2397,
56245,
1155,
353,
8840,
836,
8,
341,
743,
2643,
64883,
445,
11451,
34357,
11641,
67756,
2089,
17,
36,
899,
961,
1591,
341,
197,
3244,
57776,
445,
11451,
34357,
11641,
67756,
2089,
17,
36,
4573,
3890,
738,
1138,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOr(t *testing.T) {
a, b := Bitmap{}, Bitmap{}
for i := uint32(0); i < 100; i += 2 {
b.Set(i)
}
a.Or(b)
assert.False(t, a.Contains(1))
for i := uint32(0); i < 100; i += 2 {
assert.True(t, a.Contains(i))
}
} | explode_data.jsonl/39887 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
2195,
1155,
353,
8840,
836,
8,
341,
11323,
11,
293,
1669,
17533,
22655,
17533,
16094,
2023,
600,
1669,
2622,
18,
17,
7,
15,
1215,
600,
366,
220,
16,
15,
15,
26,
600,
1421,
220,
17,
341,
197,
2233,
4202,
1956,
340,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestAdorn(t *testing.T) {
want := []byte(`
this is a testing mock!this is a testing mock!this is a testing mock!this is a testing mock!this is a testing mock!
this is a testing mock!this is a testing mock!this is a testing mock!this is a testing mock!this is a testing mock!
this is a testing mock!this is a testin... | explode_data.jsonl/74258 | {
"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,
2589,
1512,
1155,
353,
8840,
836,
8,
341,
50780,
1669,
3056,
3782,
61528,
574,
374,
264,
7497,
7860,
0,
574,
374,
264,
7497,
7860,
0,
574,
374,
264,
7497,
7860,
0,
574,
374,
264,
7497,
7860,
0,
574,
374,
264,
7497,
786... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReportWorkflowResource_ScheduledWorkflowIDNotEmpty_Success(t *testing.T) {
store, manager, job := initWithJob(t)
defer store.Close()
// report workflow
workflow := util.NewWorkflow(&v1alpha1.Workflow{
ObjectMeta: v1.ObjectMeta{
Name: "MY_NAME",
Namespace: "MY_NAMESPACE",
UID: "WORKFL... | explode_data.jsonl/77055 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 872
} | [
2830,
3393,
10361,
62768,
4783,
1098,
26644,
62768,
915,
27416,
87161,
1155,
353,
8840,
836,
8,
341,
57279,
11,
6645,
11,
2618,
1669,
13864,
12245,
1155,
340,
16867,
3553,
10421,
2822,
197,
322,
1895,
28288,
198,
197,
56249,
1669,
4094,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFunc_Signature(t *testing.T) {
var src = `package main
var a = func() { fmt.Println("tokyo") }
func foo(
a int,
b string,
c bool,
) (
bool,
error,
) {
return false, nil
}
func foo(a, b int, foo string) (string, error) {
_ = func() {
// -------
}
return nil
}
func (q *qaz) example(x,y,z int) err... | explode_data.jsonl/60364 | {
"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,
9626,
1098,
622,
1568,
1155,
353,
8840,
836,
8,
341,
2405,
2286,
284,
1565,
1722,
1887,
271,
947,
264,
284,
2915,
368,
314,
8879,
12419,
445,
29594,
16032,
899,
555,
2830,
15229,
1006,
11323,
526,
345,
2233,
914,
345,
1444... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunIntegrationArtifactUpload(t *testing.T) {
t.Parallel()
t.Run("Successfull Integration Flow Create Test", func(t *testing.T) {
filesMock := mock.FilesMock{}
path := filepath.Join("tempDir", "iflow4.zip")
filesMock.AddFile(path, []byte("dummy content"))
exists, err := filesMock.FileExists(path)
a... | explode_data.jsonl/70089 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2187
} | [
2830,
3393,
6727,
52464,
85578,
13844,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3244,
16708,
445,
7188,
8878,
40069,
22452,
4230,
3393,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
74075,
11571,
1669,
7860,
52009,
11571,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCreateV4(t *testing.T) {
bodyHash := "foo"
credentials := ec2tokens.AuthOptions{
Access: "a7f1e798b7c2417cba4a02de97dc3cdc",
BodyHash: &bodyHash,
Timestamp: new(time.Time),
Region: "region1",
Service: "ec2",
Path: "/",
Secret: "18f4f6761ada4e3795fa5273c30349b9",
Verb: "G... | explode_data.jsonl/68580 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 621
} | [
2830,
3393,
4021,
53,
19,
1155,
353,
8840,
836,
8,
341,
35402,
6370,
1669,
330,
7975,
698,
197,
32353,
1669,
11942,
17,
30566,
25233,
3798,
515,
197,
197,
6054,
25,
262,
330,
64,
22,
69,
16,
68,
22,
24,
23,
65,
22,
66,
17,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRunMigratorMigrationFinishesDown(t *testing.T) {
store := NewMockStoreIface()
ticker := glock.NewMockTicker(time.Second)
migrator := NewMockMigrator()
migrator.ProgressFunc.PushReturn(0.2, nil) // check
migrator.ProgressFunc.PushReturn(0.1, nil) // after down
migrator.ProgressFunc.SetDefault... | explode_data.jsonl/11535 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 322
} | [
2830,
3393,
6727,
44,
5233,
850,
20168,
9134,
20527,
4454,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
1532,
11571,
6093,
40,
1564,
741,
3244,
5215,
1669,
342,
1023,
7121,
11571,
87278,
9730,
32435,
692,
2109,
5233,
850,
1669,
1532,
1157... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultiSitesWithTwoLanguages(t *testing.T) {
t.Parallel()
assert := require.New(t)
b := newTestSitesBuilder(t).WithConfigFile("toml", `
defaultContentLanguage = "nn"
[languages]
[languages.nn]
languageName = "Nynorsk"
weight = 1
title = "Tittel på Nynorsk"
[languages.nn.params]
p1 = "p1nn"
[languages.en]
... | explode_data.jsonl/16236 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 373
} | [
2830,
3393,
20358,
93690,
2354,
11613,
59286,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
6948,
1669,
1373,
7121,
1155,
340,
2233,
1669,
501,
2271,
93690,
3297,
1155,
568,
2354,
2648,
1703,
445,
37401,
75,
497,
1565,
271,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDeleteTodo(t *testing.T) {
r := &MemoryRepository{}
s := NewService(r)
var userID int = 1
addedTodo, err := r.addTodo("todo1", nil, userID, defaultPriority())
if err != nil {
t.Errorf("failed to add todo")
}
err = s.DeleteTodo(userID, addedTodo.id)
if err != nil {
t.Errorf("failed to delete todo ... | explode_data.jsonl/21376 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
6435,
24176,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
609,
10642,
4624,
16094,
1903,
1669,
1532,
1860,
2601,
692,
2405,
35204,
526,
284,
220,
16,
198,
12718,
291,
24176,
11,
1848,
1669,
435,
1364,
24176,
445,
17370,
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... | 5 |
func TestStartStopUnpulledImageDigest(t *testing.T) {
baseImgWithDigest := os.Getenv("BASE_IMAGE_NAME_WITH_DIGEST")
taskEngine, done, _ := setupWithDefaultConfig(t)
defer done()
// Ensure this image isn't pulled by deleting it
removeImage(t, baseImgWithDigest)
testTask := createTestTask("testStartUnpulledDigest"... | explode_data.jsonl/20156 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 339
} | [
2830,
3393,
3479,
10674,
1806,
79,
91022,
1906,
45217,
1155,
353,
8840,
836,
8,
341,
24195,
13033,
2354,
45217,
1669,
2643,
64883,
445,
18450,
19121,
4708,
23929,
94901,
1138,
49115,
4571,
11,
2814,
11,
716,
1669,
6505,
2354,
3675,
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 TestMapContents(t *testing.T) {
spec := &MapSpec{
Type: Array,
KeySize: 4,
ValueSize: 4,
MaxEntries: 2,
Contents: []MapKV{
{uint32(0), uint32(23)},
{uint32(1), uint32(42)},
},
}
m, err := NewMap(spec)
if err != nil {
t.Fatal("Can't create map:", err)
}
defer m.Close()
var val... | explode_data.jsonl/21674 | {
"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,
2227,
14803,
1155,
353,
8840,
836,
8,
341,
98100,
1669,
609,
2227,
8327,
515,
197,
27725,
25,
981,
2910,
345,
197,
55242,
1695,
25,
262,
220,
19,
345,
197,
47399,
1695,
25,
220,
220,
19,
345,
197,
197,
5974,
24533,
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... | 7 |
func TestValidArgsFuncAliases(t *testing.T) {
rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
child := &Command{
Use: "child",
Aliases: []string{"son", "daughter"},
ValidArgsFunction: validArgsFunc,
Run: emptyRun,
}
rootCmd.AddCommand(child)
// Test comp... | explode_data.jsonl/43750 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 570
} | [
2830,
3393,
4088,
4117,
9626,
95209,
1155,
353,
8840,
836,
8,
341,
33698,
15613,
1669,
609,
4062,
90,
10253,
25,
330,
2888,
497,
17693,
25,
2308,
4117,
11,
6452,
25,
4287,
6727,
532,
58391,
1669,
609,
4062,
515,
197,
95023,
25,
2290,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDuplicateSemantics(t *testing.T) {
ctx := context.Background()
dstore := dssync.MutexWrap(ds.NewMapDatastore())
bstore := blockstore.NewBlockstore(dstore)
bserv := bs.New(bstore, offline.Exchange(bstore))
dserv := mdag.NewDAGService(bserv)
// TODO does pinner need to share datastore with blockservice?
... | explode_data.jsonl/31304 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 310
} | [
2830,
3393,
53979,
29499,
36233,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
2698,
4314,
1669,
294,
778,
1721,
99014,
26787,
33783,
7121,
2227,
1043,
4314,
2398,
2233,
4314,
1669,
2504,
4314,
7121,
4713,
4314,
1500,
4314,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ErrCouldNotRollbackMigration_CommitError(t *testing.T) {
err := ErrCouldNotRollbackMigration{
Name: "some-migration",
CommitError: errors.New("commit failed"),
}
assert.Equal(t, "error rolling back migration (some-migration), commit error: commit failed", err.Error())
} | explode_data.jsonl/55404 | {
"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,
93623,
12895,
2623,
32355,
1419,
20168,
16946,
1763,
1454,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
15495,
12895,
2623,
32355,
1419,
20168,
515,
197,
21297,
25,
286,
330,
14689,
1448,
5033,
756,
197,
197,
33441,
1454,
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 TestInternalEvaluationStep_Run(t *testing.T) {
// given
log := logrus.New()
memoryStorage := storage.NewMemoryStorage()
provisioningOperation := fixOperationCreateRuntime(t)
inputCreator := newInputCreator()
provisioningOperation.InputCreator = inputCreator
err := memoryStorage.Operations().InsertProvisio... | explode_data.jsonl/68978 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 556
} | [
2830,
3393,
11569,
82363,
8304,
84158,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
6725,
1669,
1487,
20341,
7121,
741,
2109,
4731,
5793,
1669,
5819,
7121,
10642,
5793,
741,
197,
776,
13013,
287,
8432,
1669,
5046,
8432,
4021,
1512... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLongitudeValidation(t *testing.T) {
tests := []struct {
param interface{}
expected bool
}{
{"", false},
{"-180.000", true},
{"180.1", false},
{"+73.234", true},
{"+382.3811", false},
{"23.11111111", true},
{uint(180), true},
{float32(-180.0), true},
{-180, true},
{180.1, false},
}... | explode_data.jsonl/77261 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 404
} | [
2830,
3393,
39065,
13799,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
36037,
262,
3749,
16094,
197,
42400,
1807,
198,
197,
59403,
197,
197,
4913,
497,
895,
1583,
197,
197,
4913,
12,
16,
23,
15,
13,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGoPackageName(t *testing.T) {
assert.Equal(t, "aws", goPackage("aws"))
assert.Equal(t, "azurenextgen", goPackage("azure-nextgen"))
assert.Equal(t, "plantprovider", goPackage("plant-provider"))
assert.Equal(t, "", goPackage(""))
} | explode_data.jsonl/22933 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
10850,
65655,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
1155,
11,
330,
8635,
497,
728,
13100,
445,
8635,
5455,
6948,
12808,
1155,
11,
330,
39495,
3600,
4370,
497,
728,
13100,
445,
39495,
22304,
4370,
5455,
6948,
12808,
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 |
func TestAutomationConfigFCVIsNotIncreasedWhenUpgradingMinorVersion(t *testing.T) {
mdb := newTestReplicaSet()
mgr := client.NewManager(&mdb)
r := NewReconciler(mgr)
res, err := r.Reconcile(context.TODO(), reconcile.Request{NamespacedName: types.NamespacedName{Namespace: mdb.Namespace, Name: mdb.Name}})
assertReco... | explode_data.jsonl/80680 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 457
} | [
2830,
3393,
98856,
2648,
6754,
53,
3872,
2623,
96841,
4498,
2324,
32259,
57024,
5637,
1155,
353,
8840,
836,
8,
341,
2109,
1999,
1669,
501,
2271,
18327,
15317,
1649,
741,
2109,
901,
1669,
2943,
7121,
2043,
2099,
78127,
340,
7000,
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... | 1 |
func TestTx(t *testing.T) {
subConfig := SubConfig{10240, 10000}
cache := newCache(10240, 10, 10240)
cache.SetQueueCache(NewSimpleQueue(subConfig))
tx := &types.Transaction{Execer: []byte("user.write"), Payload: types.Encode(transfer), Fee: 100000000, Expire: 0, To: toAddr}
var replyTxList types.ReplyTxList
var ... | explode_data.jsonl/16842 | {
"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,
31584,
1155,
353,
8840,
836,
8,
341,
28624,
2648,
1669,
3719,
2648,
90,
16,
15,
17,
19,
15,
11,
220,
16,
15,
15,
15,
15,
532,
52680,
1669,
501,
8233,
7,
16,
15,
17,
19,
15,
11,
220,
16,
15,
11,
220,
16,
15,
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... | 6 |
func TestOverrideUserAgent(t *testing.T) {
const userAgent = "my-user-agent"
rt := &rrt{}
c := NewClient(&http.Client{Transport: userAgentTransport{userAgent, rt}})
c.Get("foo")
if got, want := rt.gotUserAgent, userAgent; got != want {
t.Errorf("got %q, want %q", got, want)
}
} | explode_data.jsonl/17305 | {
"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,
2177,
1474,
16810,
1155,
353,
8840,
836,
8,
341,
4777,
94196,
284,
330,
2408,
8694,
41935,
698,
55060,
1669,
609,
634,
83,
16094,
1444,
1669,
1532,
2959,
2099,
1254,
11716,
90,
27560,
25,
94196,
27560,
90,
872,
16810,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSrvKeyspaceWatcher(t *testing.T) {
ts, factory := memorytopo.NewServerAndFactory("test_cell")
*srvTopoCacheTTL = time.Duration(100 * time.Millisecond)
*srvTopoCacheRefresh = time.Duration(40 * time.Millisecond)
defer func() {
*srvTopoCacheTTL = 1 * time.Second
*srvTopoCacheRefresh = 1 * time.Second
}(... | explode_data.jsonl/52264 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1357
} | [
2830,
3393,
50,
10553,
8850,
1306,
47248,
1155,
353,
8840,
836,
8,
341,
57441,
11,
8633,
1669,
4938,
3481,
78,
7121,
5475,
3036,
4153,
445,
1944,
16648,
1138,
197,
33454,
10553,
5366,
78,
8233,
51,
13470,
284,
882,
33795,
7,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSyncJobRunPresenter_EthTxTask(t *testing.T) {
tests := []struct {
name string
path string
want string
}{
{"confirmed", "testdata/confirmedEthTxData.json", ""},
{"safe fulfilled", "testdata/fulfilledReceiptResponse.json", "fulfilledRunLog"},
{"safe not fulfilled", "testdata/notFulfilledReceiptResp... | explode_data.jsonl/66340 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 850
} | [
2830,
3393,
12154,
12245,
6727,
33849,
2089,
339,
31584,
6262,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
26781,
914,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
4913,
41028,
497,
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 TestPrintLease(t *testing.T) {
holder1 := "holder1"
holder2 := "holder2"
tests := []struct {
lease coordination.Lease
expected []metav1.TableRow
}{
{
lease: coordination.Lease{
ObjectMeta: metav1.ObjectMeta{
Name: "lease1",
CreationTimestamp: metav1.Time{Time: time.Now().... | explode_data.jsonl/21632 | {
"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,
8994,
2304,
519,
1155,
353,
8840,
836,
8,
341,
88559,
16,
1669,
330,
4251,
16,
698,
88559,
17,
1669,
330,
4251,
17,
698,
78216,
1669,
3056,
1235,
341,
197,
197,
1623,
262,
37693,
11824,
519,
198,
197,
42400,
3056,
4059,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRollback(t *testing.T) {
require := require.New(t)
tree := NewMutableTree(db.NewMemDB(), 0)
tree.Set([]byte("k"), []byte("v"))
tree.SaveVersion()
tree.Set([]byte("r"), []byte("v"))
tree.Set([]byte("s"), []byte("v"))
tree.Rollback()
tree.Set([]byte("t"), []byte("v"))
tree.SaveVersion()
require.... | explode_data.jsonl/25140 | {
"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,
32355,
1419,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
692,
51968,
1669,
1532,
11217,
6533,
9791,
7121,
18816,
3506,
1507,
220,
15,
692,
51968,
4202,
10556,
3782,
445,
74,
3975,
3056,
3782,
445,
85,
5455,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_buildScenarioReportLines(t *testing.T) {
type args struct {
reportLines []string
scenarioResult *ScenarioResult
}
tests := []struct {
name string
args args
want []string
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := buildScenar... | explode_data.jsonl/49959 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 210
} | [
2830,
3393,
20801,
54031,
10361,
16794,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
69931,
16794,
262,
3056,
917,
198,
197,
29928,
20413,
2077,
353,
54031,
2077,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSessionToken_StableMarshal(t *testing.T) {
sessionTokenFrom := generateSessionToken("Session Token")
t.Run("non empty", func(t *testing.T) {
wire, err := sessionTokenFrom.StableMarshal(nil)
require.NoError(t, err)
sessionTokenTo := new(session.SessionToken)
require.NoError(t, sessionTokenTo.Unmarsh... | explode_data.jsonl/79973 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 136
} | [
2830,
3393,
5283,
3323,
70645,
480,
55438,
1155,
353,
8840,
836,
8,
341,
25054,
3323,
3830,
1669,
6923,
5283,
3323,
445,
5283,
9660,
5130,
3244,
16708,
445,
6280,
4287,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6692,
554,
11,
1848... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCryptoSignED25519NoSigningKey(t *testing.T) {
tc := SetupEngineTest(t, "crypto")
defer tc.Cleanup()
secretUI := &libkb.TestSecretUI{}
_, err := SignED25519(tc.G, secretUI, keybase1.SignED25519Arg{
Msg: []byte("test message"),
})
if _, ok := err.(libkb.SelfNotFoundError); !ok {
t.Errorf("expected Se... | explode_data.jsonl/16761 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
58288,
7264,
1479,
17,
20,
20,
16,
24,
2753,
93358,
1592,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
18626,
4571,
2271,
1155,
11,
330,
35772,
1138,
16867,
17130,
727,
60639,
2822,
197,
20474,
2275,
1669,
609,
2740,
21310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateFlagKey(t *testing.T) {
t.Run("happy code path", func(t *testing.T) {
key, err := CreateFlagKey("")
assert.NoError(t, err)
assert.NotZero(t, key)
})
t.Run("invalid key", func(t *testing.T) {
key, err := CreateFlagKey(" spaces in key are not allowed 1-2-3")
assert.Error(t, err)
assert.Zero... | explode_data.jsonl/36840 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
4021,
12135,
1592,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
56521,
2038,
1815,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
23634,
11,
1848,
1669,
4230,
12135,
1592,
31764,
197,
6948,
35699,
1155,
11,
1848,
340,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIssue15517(t *testing.T) {
skipSpecialPlatforms(t)
// This package only handles gc export data.
if runtime.Compiler != "gc" {
t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler)
}
// On windows, we have to set the -D option for the compiler to avoid having a drive
// letter a... | explode_data.jsonl/30568 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 476
} | [
2830,
3393,
42006,
16,
20,
20,
16,
22,
1155,
353,
8840,
836,
8,
341,
1903,
13389,
20366,
87268,
1155,
692,
197,
322,
1096,
6328,
1172,
13469,
22122,
7485,
821,
624,
743,
15592,
35952,
961,
330,
20669,
1,
341,
197,
3244,
57776,
69,
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... | 5 |
func TestFilters(t *testing.T) {
servicename := "test-service"
namespace := "knative-serving"
tests := []struct {
name string
instance servingv1alpha1.KnativeServing
// This label is used to mark the tested resource to indicate which ingress it belongs to.
// Empty label means no label for the resource.
... | explode_data.jsonl/15440 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1786
} | [
2830,
3393,
28351,
1155,
353,
8840,
836,
8,
341,
1903,
648,
292,
1840,
1669,
330,
1944,
23461,
698,
56623,
1669,
330,
19095,
1388,
85986,
698,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
56256,
13480,
85,
16,
7141,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultilineErrors(t *testing.T) {
_, err := fixture(t, "invalid/bad-on.workflow")
require.Error(t, err)
expect := "unable to parse and validate\n" +
" Line 5: Workflow `foo' has an invalid `on' attribute `hsup' - must be a known event type or schedule expression\n" +
" Line 7: `on' redefined in workflow... | explode_data.jsonl/55701 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 218
} | [
2830,
3393,
40404,
26560,
13877,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
12507,
1155,
11,
330,
11808,
3470,
329,
10326,
72774,
1138,
17957,
6141,
1155,
11,
1848,
340,
24952,
1669,
330,
45928,
311,
4715,
323,
9593,
1699,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHash(t *testing.T) {
tests := []struct {
hashAlgo sigpb.DigitallySigned_HashAlgorithm
wantHash crypto.Hash
wantErr bool
}{
{hashAlgo: sigpb.DigitallySigned_NONE, wantErr: true},
{hashAlgo: sigpb.DigitallySigned_SHA256, wantHash: crypto.SHA256},
}
for _, test := range tests {
tree := proto.Clo... | explode_data.jsonl/47883 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 316
} | [
2830,
3393,
6370,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
50333,
2101,
3346,
8366,
16650,
909,
12597,
745,
49312,
2039,
988,
27847,
198,
197,
50780,
6370,
19028,
15103,
198,
197,
50780,
7747,
220,
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... | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.