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 TestRemittanceOriginatorAddressLineTwoAlphaNumeric(t *testing.T) {
ro := mockRemittanceOriginator()
ro.RemittanceData.AddressLineTwo = "®"
err := ro.Validate()
require.EqualError(t, err, fieldError("AddressLineTwo", ErrNonAlphanumeric, ro.RemittanceData.AddressLineTwo).Error())
} | explode_data.jsonl/32933 | {
"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,
6590,
87191,
13298,
850,
4286,
2460,
11613,
19384,
36296,
1155,
353,
8840,
836,
8,
341,
197,
299,
1669,
7860,
6590,
87191,
13298,
850,
741,
197,
299,
11398,
87191,
1043,
26979,
2460,
11613,
284,
330,
11909,
1837,
9859,
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 TestIfMissing(t *testing.T) {
assert := assert.New(t)
// create an empty confMap and populate it with one option (in one section)
confMap := MakeConfMap()
testSectionName0 := "TestSection0"
testSectionName1 := "TestSection1e"
testOptionName0 := "Test_-_Option0"
testOptionName1 := "Test_-_Option1"
testOp... | explode_data.jsonl/9170 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1100
} | [
2830,
3393,
2679,
25080,
1155,
353,
8840,
836,
8,
1476,
6948,
1669,
2060,
7121,
1155,
692,
197,
322,
1855,
458,
4287,
2335,
2227,
323,
30446,
432,
448,
825,
2999,
320,
258,
825,
3772,
340,
67850,
2227,
1669,
7405,
15578,
2227,
2822,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParameterParser_Issue2007(t *testing.T) {
sctx := loadClassificationPkgsCtx(t)
operations := make(map[string]*spec.Operation)
td := getParameter(sctx, "SetConfiguration")
prs := ¶meterBuilder{
ctx: sctx,
decl: td,
}
require.NoError(t, prs.Build(operations))
op := operations["getConfiguration"]... | explode_data.jsonl/82115 | {
"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,
4971,
6570,
7959,
83890,
17,
15,
15,
22,
1155,
353,
8840,
836,
8,
341,
1903,
3773,
1669,
2795,
85040,
58415,
5857,
23684,
1155,
340,
197,
38163,
1669,
1281,
9147,
14032,
8465,
9535,
56297,
340,
76373,
1669,
633,
4971,
1141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRenderNoDHCP(t *testing.T) {
g := NewGomegaWithT(t)
crd := NoDHCPConfig.DeepCopy()
config := &crd.Spec
FillDefaults(config, nil)
objs, err := RenderMultus(config, manifestDir)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(objs).NotTo(ContainElement(HaveKubernetesID("DaemonSet", "openshift-multus", "dhc... | explode_data.jsonl/16735 | {
"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,
6750,
2753,
51326,
7123,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
692,
1444,
6498,
1669,
2308,
51326,
7123,
2648,
55602,
12106,
741,
25873,
1669,
609,
5082,
67,
36473,
198,
12727,
483,
16273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdatePipelineRunStatusFromInformer(t *testing.T) {
names.TestingSeed()
pr := &v1beta1.PipelineRun{
ObjectMeta: metav1.ObjectMeta{
Name: "test-pipeline-run",
Namespace: "foo",
Labels: map[string]string{"mylabel": "myvale"},
},
Spec: v1beta1.PipelineRunSpec{
PipelineSpec: &v1beta1.P... | explode_data.jsonl/68299 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1049
} | [
2830,
3393,
4289,
34656,
6727,
2522,
3830,
641,
34527,
1155,
353,
8840,
836,
8,
341,
93940,
8787,
287,
41471,
2822,
25653,
1669,
609,
85,
16,
19127,
16,
1069,
8790,
6727,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test300(t *testing.T) {
// add test cases
tc := map[string]IO300{
//"1": IO300{[]int{10, 9, 2, 5, 3, 7, 101, 18}, 4},
"2": IO300{[]int{1, 3, 2, 3, 1, 4}, 4},
//"3": IO300{[]int{4, 10, 4, 3, 8, 9}, 3},
}
for k, v := range tc {
// algo func
out := lengthOfLIS(v.in)
fmt.Printf("case-%v:\n", k)
fmt... | explode_data.jsonl/52917 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 292
} | [
2830,
3393,
18,
15,
15,
1155,
353,
8840,
836,
8,
341,
197,
322,
912,
1273,
5048,
198,
78255,
1669,
2415,
14032,
60,
3810,
18,
15,
15,
515,
197,
197,
77215,
16,
788,
6429,
18,
15,
15,
90,
1294,
396,
90,
16,
15,
11,
220,
24,
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... | 3 |
func Test_operation(t *testing.T) {
o := GetOperation("divi", float64(1), float64(32))
//var data = []float64{1, 4, 5, 7, 9, 12}
//o := GetOperation("divi", data)
//fmt.Println(o.GetResult(), data)
var a []Operation
a = append(a, o)
a = append(a, Min{Data: []float64{1, 3, 6, 9}})
a = append(a, Divi{Data: []floa... | explode_data.jsonl/35901 | {
"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,
32565,
1155,
353,
8840,
836,
8,
341,
22229,
1669,
2126,
8432,
445,
611,
72,
497,
2224,
21,
19,
7,
16,
701,
2224,
21,
19,
7,
18,
17,
1171,
197,
322,
947,
821,
284,
3056,
3649,
21,
19,
90,
16,
11,
220,
19,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestCustomer_CreatePaymentSource_Card(t *testing.T) {
key := "test api key"
mockResponse := new(invdendpoint.Card)
mockResponse.Id = int64(1234)
mockResponse.Last4 = "4242"
mockResponse.Object = "card"
mockResponse.Brand = "Visa"
server, err := invdmockserver.New(200, mockResponse, "json", true)
if err !... | explode_data.jsonl/15019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 278
} | [
2830,
3393,
12792,
34325,
20188,
3608,
920,
567,
1155,
353,
8840,
836,
8,
341,
23634,
1669,
330,
1944,
6330,
1376,
1837,
77333,
2582,
1669,
501,
5900,
16598,
32540,
48613,
340,
77333,
2582,
6444,
284,
526,
21,
19,
7,
16,
17,
18,
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... | 5 |
func TestUpdateDashboardWithTemplate(t *testing.T) {
err := RenderDashboardWithTemplate(UpdateConfig{
APIUrl: "http://localhost:3000",
DashboardUID: "RKAQZi9Zk",
BasicAuth: "",
}, []Var{
{
Name: "SERVICE_NAME",
Values: []Val{
{
Value: "news",
Context: map[string]string{
"TES... | explode_data.jsonl/652 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 372
} | [
2830,
3393,
4289,
26947,
2354,
7275,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
13848,
26947,
2354,
7275,
7,
4289,
2648,
515,
197,
197,
7082,
2864,
25,
981,
330,
1254,
1110,
8301,
25,
18,
15,
15,
15,
756,
197,
10957,
7349,
6463,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestACMEService_ListError(t *testing.T) {
httpmock.Activate()
defer httpmock.DeactivateAndReset()
httpmock.RegisterResponder("GET", "https://cert-manager.com/api/acme/v1/account", httpmock.NewStringResponder(400, `{ "code": -1001, "description": "Value of 'organizationId' must not be null." }`))
logger, _ := ... | explode_data.jsonl/40534 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 238
} | [
2830,
3393,
1706,
87711,
1017,
27104,
1454,
1155,
353,
8840,
836,
8,
341,
28080,
16712,
14140,
731,
741,
16867,
1758,
16712,
8934,
16856,
3036,
14828,
741,
28080,
16712,
19983,
30884,
445,
3806,
497,
330,
2428,
1110,
12246,
44896,
905,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestScrapeLoopSeriesAdded(t *testing.T) {
// Need a full storage for correct Add/AddFast semantics.
s := teststorage.New(t)
defer s.Close()
app, err := s.Appender()
if err != nil {
t.Error(err)
}
ctx, cancel := context.WithCancel(context.Background())
sl := newScrapeLoop(ctx,
&testScraper{},
nil, ni... | explode_data.jsonl/56122 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 351
} | [
2830,
3393,
3326,
19842,
14620,
25544,
19337,
1155,
353,
8840,
836,
8,
341,
197,
322,
14656,
264,
2480,
5819,
369,
4396,
2691,
98619,
32174,
52694,
624,
1903,
1669,
1273,
16172,
7121,
1155,
340,
16867,
274,
10421,
2822,
28236,
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 TestSortLongestRouteFirst(t *testing.T) {
tests := map[string]struct {
routes []*envoy_api_v2_route.Route
want []*envoy_api_v2_route.Route
}{
"two prefixes": {
routes: []*envoy_api_v2_route.Route{{
Match: envoy.RoutePrefix("/"),
}, {
Match: envoy.RoutePrefix("/longer"),
}},
want: []*e... | explode_data.jsonl/56952 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 887
} | [
2830,
3393,
10231,
6583,
477,
4899,
5338,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
7000,
5495,
29838,
3160,
2253,
11697,
2273,
17,
28109,
58004,
198,
197,
50780,
256,
29838,
3160,
2253,
11697,
2273,
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 TestLabelDoubleAnchor(t *testing.T) {
as := assert.New(t)
e := assert.GetTestEncoder()
l1 := e.NewLabel()
l1.DropAnchor()
defer func() {
if rec := recover(); rec == nil {
as.Fail("error not raised on double anchoring")
}
}()
l1.DropAnchor()
} | explode_data.jsonl/68514 | {
"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,
2476,
7378,
14677,
1155,
353,
8840,
836,
8,
341,
60451,
1669,
2060,
7121,
1155,
692,
7727,
1669,
2060,
2234,
2271,
19921,
741,
8810,
16,
1669,
384,
7121,
2476,
741,
8810,
16,
21688,
14677,
2822,
16867,
2915,
368,
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... | 2 |
func TestMigrateWithUniqueIndex(t *testing.T) {
type UserWithUniqueIndex struct {
ID int
Name string `gorm:"size:20;index:idx_name,unique"`
Date time.Time `gorm:"index:idx_name,unique"`
}
DB.Migrator().DropTable(&UserWithUniqueIndex{})
if err := DB.AutoMigrate(&UserWithUniqueIndex{}); err != nil {
t.F... | explode_data.jsonl/6497 | {
"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,
44,
34479,
2354,
22811,
1552,
1155,
353,
8840,
836,
8,
341,
13158,
2657,
2354,
22811,
1552,
2036,
341,
197,
29580,
256,
526,
198,
197,
21297,
914,
262,
1565,
73281,
2974,
2141,
25,
17,
15,
26,
1252,
25,
6361,
1269,
11,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestEmptyRegistration(t *testing.T) {
t.Log("Registration test start...\n")
reg := NewRegistration("", "", 0, 0, "")
json.NewEncoder(os.Stdout).Encode(reg)
if reg.Version != defVer {
t.Log(reg.Version)
t.Fail()
}
if reg.Service != defId {
t.Log(reg.Service)
t.Fail()
}
inst := reg.Instances
i... | explode_data.jsonl/33932 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
3522,
23365,
1155,
353,
8840,
836,
8,
341,
3244,
5247,
445,
23365,
1273,
1191,
30801,
77,
5130,
37013,
1669,
1532,
23365,
19814,
7342,
220,
15,
11,
220,
15,
11,
85617,
30847,
7121,
19921,
9638,
83225,
568,
32535,
18390,
692,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConvertWithBadImportListOfBadStruct(t *testing.T) {
lines, err := convertTypes(
"Foo", "Bar",
`
include "../../bar.thrift"
struct Inner {
1: optional bar.MyStruct field
}
struct Foo {
1: optional list<Inner> one
2: required string two
}
struct Bar {
1: optional list<Inner> one... | explode_data.jsonl/62050 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 271
} | [
2830,
3393,
12012,
2354,
17082,
11511,
64090,
17082,
9422,
1155,
353,
8840,
836,
8,
341,
78390,
11,
1848,
1669,
5508,
4173,
1006,
197,
197,
1,
40923,
497,
330,
3428,
756,
197,
197,
3989,
197,
24699,
10208,
2257,
13677,
41380,
1837,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTCPConnectICMPError(t *testing.T) {
dut := testbench.NewDUT(t)
clientFD, clientPort := dut.CreateBoundSocket(t, unix.SOCK_STREAM|unix.SOCK_NONBLOCK, unix.IPPROTO_TCP, dut.Net.RemoteIPv4)
port := uint16(9001)
conn := dut.Net.NewTCPIPv4(t, testbench.TCP{SrcPort: &port, DstPort: &clientPort}, testbench.TCP{S... | explode_data.jsonl/63902 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 703
} | [
2830,
3393,
49896,
14611,
1317,
5781,
1454,
1155,
353,
8840,
836,
8,
341,
2698,
332,
1669,
1273,
27024,
7121,
35,
1381,
1155,
692,
25291,
14596,
11,
2943,
7084,
1669,
10043,
7251,
19568,
10286,
1155,
11,
51866,
78922,
23584,
91,
56646,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfig(t *testing.T) {
var testCases = []struct {
name string
config string
asFile bool
asEnv bool
compressEnv bool
expected *api.ReleaseBuildConfiguration
isGzipped bool
expectedError bool
}{
{
name: "loading config from file works",
... | explode_data.jsonl/278 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1463
} | [
2830,
3393,
2648,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
37302,
284,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
25873,
286,
914,
198,
197,
60451,
1703,
286,
1807,
198,
197,
60451,
14359,
260,
1807,
198,
197,
32810,
1873,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransportCONNECTBidi(t *testing.T) {
defer afterTest(t)
const target = "backend:443"
cst := newClientServerTest(t, h1Mode, HandlerFunc(func(w ResponseWriter, r *Request) {
if r.Method != "CONNECT" {
t.Errorf("unexpected method %q", r.Method)
w.WriteHeader(500)
return
}
if r.RequestURI != targ... | explode_data.jsonl/14179 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 699
} | [
2830,
3393,
27560,
39521,
33,
12278,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
340,
4777,
2169,
284,
330,
20942,
25,
19,
19,
18,
698,
1444,
267,
1669,
501,
2959,
5475,
2271,
1155,
11,
305,
16,
3636,
11,
19954,
9626,
185... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_Hoverfly_PutSimulation_ImportsRecordings(t *testing.T) {
RegisterTestingT(t)
unit := NewHoverflyWithConfiguration(&Configuration{})
simulationToImport := v2.SimulationViewV5{
v2.DataViewV5{
RequestResponsePairs: []v2.RequestMatcherResponsePairViewV5{pairOne},
GlobalActions: v2.GlobalActionsView{
... | explode_data.jsonl/45376 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 433
} | [
2830,
3393,
2039,
1975,
21642,
1088,
332,
64554,
62,
31250,
6471,
819,
1155,
353,
8840,
836,
8,
341,
79096,
16451,
51,
1155,
692,
81189,
1669,
1532,
34379,
21642,
2354,
7688,
2099,
7688,
6257,
692,
1903,
60361,
1249,
11511,
1669,
348,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUtil_testMergeEnvsWithDuplicates1(t *testing.T) {
//given
a := []v1.EnvVar{{
Name: "a",
Value: "a",
}}
b := []v1.EnvVar{{
Name: "a",
Value: "b",
}}
//when
c := MergeEnvs(a, b)
//then
expected := []v1.EnvVar{
{
Name: "a",
Value: "a",
},
}
assert.Equal(t, expected, c)
} | explode_data.jsonl/28519 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 168
} | [
2830,
3393,
2742,
4452,
52096,
1702,
11562,
2354,
76851,
16,
1155,
353,
8840,
836,
8,
341,
197,
322,
41968,
198,
11323,
1669,
3056,
85,
16,
81214,
3962,
90,
515,
197,
21297,
25,
220,
330,
64,
756,
197,
47399,
25,
330,
64,
756,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_SalesReports_Filter_ToQueryParamsMapOnlyRequired(t *testing.T) {
filter := &SalesReportsFilter{}
filter.Yearly().TypeSales().SubTypeSummary()
qs := make(map[string]interface{})
qs["filter[reportSubType]"] = string(SalesReportSubTypeSummary)
qs["filter[reportType]"] = string(SalesReportTypeSales)
qs["fi... | explode_data.jsonl/60783 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 152
} | [
2830,
3393,
1098,
3831,
23748,
68935,
38346,
2859,
4870,
2227,
7308,
8164,
1155,
353,
8840,
836,
8,
341,
50108,
1669,
609,
35418,
23748,
5632,
16094,
50108,
7507,
22140,
1005,
929,
35418,
1005,
3136,
929,
19237,
2822,
18534,
82,
1669,
128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMetricFactory(t *testing.T) {
SUT := NewDefaultCollector("test")
SUT.SetDescriptor("test_metric", "", nil)
metric := SUT.MakeGaugeMetric("test_metric", 1)
assert.Equal(t, SUT.GetDescriptor("test_metric"), metric.Desc())
} | explode_data.jsonl/5001 | {
"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,
54310,
4153,
1155,
353,
8840,
836,
8,
341,
7568,
1381,
1669,
1532,
3675,
53694,
445,
1944,
1138,
7568,
1381,
4202,
11709,
445,
1944,
41294,
497,
7342,
2092,
692,
2109,
16340,
1669,
328,
1381,
50133,
38,
19392,
54310,
445,
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 |
func TestCloseShouldRemoveRoot(t *testing.T) {
extraMountPoints := []*MountPoint{}
extraDirectories := []string{}
dir := filepath.Join(tmpDir, "TestCloseShouldRemoveRoot")
chroot := NewChroot(dir, isExistingDir)
err := chroot.Initialize(emptyPath, extraDirectories, extraMountPoints)
assert.NoError(t, err)
// ... | explode_data.jsonl/38791 | {
"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,
7925,
14996,
13021,
8439,
1155,
353,
8840,
836,
8,
341,
8122,
2172,
16284,
11411,
1669,
29838,
16284,
2609,
16094,
8122,
2172,
56397,
1669,
3056,
917,
31483,
48532,
1669,
26054,
22363,
10368,
6184,
11,
330,
2271,
7925,
14996,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInsertingSnapShots(t *testing.T) {
var snapShot1 orderbook.Base
asks := []orderbook.Item{
{Price: 6000, Amount: 1, ID: 1},
{Price: 6001, Amount: 0.5, ID: 2},
{Price: 6002, Amount: 2, ID: 3},
{Price: 6003, Amount: 3, ID: 4},
{Price: 6004, Amount: 5, ID: 5},
{Price: 6005, Amount: 2, ID: 6},
{Pric... | explode_data.jsonl/29305 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1523
} | [
2830,
3393,
13780,
287,
61871,
2016,
2412,
1155,
353,
8840,
836,
8,
341,
2405,
10658,
36402,
16,
1973,
2190,
13018,
198,
197,
4604,
1669,
3056,
1358,
2190,
9399,
515,
197,
197,
90,
6972,
25,
220,
21,
15,
15,
15,
11,
25783,
25,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGrantParseLogsForAuthKey(t *testing.T) {
assert := assert.New(t)
rescueStdout := os.Stdout
r, w, _ := os.Pipe()
os.Stdout = w
pn := pubnub.NewPubNub(configCopy())
pn.Config.SecretKey = "sec-key"
pn.Config.AuthKey = "myAuthKey"
pn.Config.Log = log.New(os.Stdout, "", log.Ldate|log.Ltime|log.Lshortfile... | explode_data.jsonl/43183 | {
"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,
67971,
14463,
51053,
2461,
5087,
1592,
1155,
353,
8840,
836,
8,
1476,
6948,
1669,
2060,
7121,
1155,
340,
10202,
31724,
22748,
411,
1669,
2643,
83225,
198,
7000,
11,
289,
11,
716,
1669,
2643,
1069,
3444,
741,
25078,
83225,
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... | 2 |
func TestEventList(t *testing.T) {
defaultCtx := context.Background()
testCases := []struct {
name string
ctx context.Context
events []*types.Event
entity string
storeErr error
expectedLen int
expectedErr error
}{
{
name: "No Params No Events",
ctx: d... | explode_data.jsonl/34056 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 811
} | [
2830,
3393,
1556,
852,
1155,
353,
8840,
836,
8,
341,
11940,
23684,
1669,
2266,
19047,
2822,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
20985,
260,
2266,
9328,
198,
197,
90873,
414,
29838,
9242,
6904,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReportScheduledWorkflowResource_Error(t *testing.T) {
store := NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch())
defer store.Close()
manager := NewResourceManager(store)
// Create pipeline
workflow := util.NewWorkflow(&v1alpha1.Workflow{
TypeMeta: v1.TypeMeta{APIVersion: "argoproj.io/v1alpha1",... | explode_data.jsonl/28393 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 466
} | [
2830,
3393,
10361,
88137,
62768,
4783,
28651,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
1532,
52317,
2959,
2043,
2195,
62396,
67811,
7121,
52317,
1462,
2461,
44338,
2398,
16867,
3553,
10421,
741,
92272,
1669,
1532,
32498,
31200,
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... | 1 |
func TestConvertDescriptor(t *testing.T) {
for _, tc := range []struct {
desc string
input metricdata.Descriptor
expected sdkapi.Descriptor
expectedErr error
}{
{
desc: "empty descriptor",
expected: metrictest.NewDescriptor(
"",
sdkapi.GaugeObserverInstrumentKind,
number.In... | explode_data.jsonl/68224 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1221
} | [
2830,
3393,
12012,
11709,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
41653,
286,
914,
198,
197,
22427,
981,
18266,
691,
23548,
6820,
198,
197,
42400,
262,
45402,
2068,
23548,
6820,
198,
197,
42400... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetMutualTLSMode(t *testing.T) {
tests := []struct {
name string
in v1beta1.PeerAuthentication_MutualTLS
want model.MutualTLSMode
}{
{
name: "unset",
in: v1beta1.PeerAuthentication_MutualTLS{
Mode: v1beta1.PeerAuthentication_MutualTLS_UNSET,
},
want: model.MTLSUnknown,
},
{
n... | explode_data.jsonl/13357 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 503
} | [
2830,
3393,
1949,
51440,
928,
45439,
3636,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
17430,
256,
348,
16,
19127,
16,
1069,
34756,
19297,
1245,
332,
928,
45439,
198,
197,
50780,
1614,
1321,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetFuturesTakerVolume(t *testing.T) {
t.Parallel()
_, err := b.GetFuturesTakerVolume(context.Background(), "BTCUSD", "ALL", "5m", 0, time.Time{}, time.Time{})
if err != nil {
t.Error(err)
}
_, err = b.GetFuturesTakerVolume(context.Background(), "BTCUSD", "ALL", "5m", 0, time.Unix(1577836800, 0), time.Un... | explode_data.jsonl/76616 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 162
} | [
2830,
3393,
1949,
37,
74606,
51,
4407,
18902,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
293,
2234,
37,
74606,
51,
4407,
18902,
5378,
19047,
1507,
330,
59118,
26749,
497,
330,
3919,
497,
330,
20,
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... | 3 |
func TestValidateRegexPath(t *testing.T) {
tests := []struct {
regexPath string
msg string
}{
{
regexPath: "~ ^/foo.*\\.jpg",
msg: "case sensitive regexp",
},
{
regexPath: "~* ^/Bar.*\\.jpg",
msg: "case insensitive regexp",
},
{
regexPath: `~ ^/f\"oo.*\\.jpg`,
msg: ... | explode_data.jsonl/65840 | {
"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,
17926,
32464,
1820,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
197,
26387,
1820,
914,
198,
197,
21169,
981,
914,
198,
197,
59403,
197,
197,
515,
298,
197,
26387,
1820,
25,
51269,
6306,
14,
7975,
4908,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNestedMarshal(t *testing.T) {
result, err := Marshal(nestedTestData)
if err != nil {
t.Fatal(err)
}
expected := nestedTestToml
if !bytes.Equal(result, expected) {
t.Errorf("Bad nested marshal: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", expected, result)
}
} | explode_data.jsonl/46323 | {
"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,
71986,
55438,
1155,
353,
8840,
836,
8,
341,
9559,
11,
1848,
1669,
35667,
1445,
9980,
83920,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
42400,
1669,
24034,
2271,
24732,
75,
198,
743,
753,
9651,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconcileSubscription(t *testing.T) {
newReconciledAdapter := mustNewReconciledAdapter(t)
newReconciledSource := mustNewReconciledSource(t)
testCases := rt.TableTest{
// Regular lifecycle
{
Name: "Not yet subscribed",
Key: tKey,
Objects: []runtime.Object{
newReconciledSource(),
newRe... | explode_data.jsonl/273 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1254
} | [
2830,
3393,
693,
40446,
457,
33402,
1155,
353,
8840,
836,
8,
341,
8638,
693,
40446,
2181,
5940,
1669,
1969,
3564,
693,
40446,
2181,
5940,
1155,
340,
8638,
693,
40446,
2181,
3608,
1669,
1969,
3564,
693,
40446,
2181,
3608,
1155,
692,
1818... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProvider(t *testing.T) {
assert, require := assert.New(t), require.New(t)
cfg := rpctest.GetConfig()
rpcAddr := cfg.RPC.ListenAddress
genDoc, err := types.GenesisDocFromFile(cfg.GenesisFile())
if err != nil {
panic(err)
}
chainID := genDoc.ChainID
t.Log("chainID:", chainID)
p := NewHTTPProvider(cha... | explode_data.jsonl/36033 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 348
} | [
2830,
3393,
5179,
1155,
353,
8840,
836,
8,
341,
6948,
11,
1373,
1669,
2060,
7121,
1155,
701,
1373,
7121,
1155,
692,
50286,
1669,
33109,
67880,
2234,
2648,
741,
7000,
3992,
13986,
1669,
13286,
2013,
4872,
68334,
4286,
198,
82281,
9550,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogsExporter_NilPushLogsData(t *testing.T) {
le, err := NewLogsExporter(&fakeLogsExporterConfig, componenttest.NewNopExporterCreateSettings(), nil)
require.Nil(t, le)
require.Equal(t, errNilPushLogsData, err)
} | explode_data.jsonl/59603 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 85
} | [
2830,
3393,
51053,
88025,
1604,
321,
16644,
51053,
1043,
1155,
353,
8840,
836,
8,
341,
197,
273,
11,
1848,
1669,
1532,
51053,
88025,
2099,
30570,
51053,
88025,
2648,
11,
3692,
1944,
7121,
45,
453,
88025,
4021,
6086,
1507,
2092,
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 |
func TestUpdateContextKey(t *testing.T) {
context := model.Context{}
context["test_string"] = "123"
context["test_number"] = 36.5
context["test_bool"] = true
visitor := createVisitor("test", context)
err := visitor.UpdateContextKey("test_error", errors.New("wrong type"))
if err == nil {
t.Error("Visitor wit... | explode_data.jsonl/12286 | {
"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,
1972,
1592,
1155,
353,
8840,
836,
8,
341,
28413,
1669,
1614,
9328,
16094,
28413,
1183,
1944,
3904,
1341,
284,
330,
16,
17,
18,
698,
28413,
1183,
1944,
5500,
1341,
284,
220,
18,
21,
13,
20,
198,
28413,
1183,
1944,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestDstPtr(t *testing.T) {
var e string = "eeee"
var c bool = true
var d []int = []int{3, 2}
src := NoPtr{
B: 3,
C: c,
D: d,
E: e,
}
var dst WithPtr
StructCopy(&dst, &src)
if dst.A != nil {
t.Error("field A failed")
}
if src.B != dst.B {
t.Error("field B failed")
}
if *dst.C != src.C {
t... | explode_data.jsonl/40580 | {
"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,
54600,
5348,
1155,
353,
8840,
836,
8,
341,
2405,
384,
914,
284,
330,
68616,
698,
2405,
272,
1807,
284,
830,
198,
2405,
294,
3056,
396,
284,
3056,
396,
90,
18,
11,
220,
17,
532,
41144,
1669,
2308,
5348,
515,
197,
12791,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNamespaceSnapshotShardError(t *testing.T) {
shardMethodResults := []snapshotTestCase{
{
isSnapshotting: false,
expectSnapshot: true,
shardBootstrapStateBeforeTick: Bootstrapped,
shardSnapshotErr: nil,
isBootstrapped: true,
},
{
... | explode_data.jsonl/35361 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 323
} | [
2830,
3393,
22699,
15009,
2016,
567,
1454,
1155,
353,
8840,
836,
8,
341,
36196,
567,
3523,
9801,
1669,
3056,
35501,
16458,
515,
197,
197,
515,
298,
19907,
15009,
1280,
25,
394,
895,
345,
298,
24952,
15009,
25,
394,
830,
345,
298,
3619... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFilter(t *testing.T) {
// TODO: Test error cases
cache := newTestCache(t)
input := []TestData{{I: 123, I2: 124}, {I: 200, I2: 124}, {I: 223, I2: 124}}
output := []TestData{}
cases := []struct {
filter string
expected []TestData
input []TestData
}{
{
filter: `[">", "I", 200]`,
expecte... | explode_data.jsonl/8986 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 718
} | [
2830,
3393,
5632,
1155,
353,
8840,
836,
8,
341,
197,
322,
5343,
25,
3393,
1465,
5048,
198,
52680,
1669,
501,
2271,
8233,
1155,
340,
22427,
1669,
3056,
83920,
2979,
40,
25,
220,
16,
17,
18,
11,
358,
17,
25,
220,
16,
17,
19,
2137,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListMaterial(t *testing.T) {
body := []byte(`{"type":"image","offset":0,"count":10}`)
resp := &http.Response{
StatusCode: http.StatusOK,
Body: io.NopCloser(bytes.NewReader([]byte(`{
"total_count": 10,
"item_count": 1,
"item": [
{
"media_id": "MEDIA_ID",
"name": "NAME",
"update_time": 16432... | explode_data.jsonl/20876 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 494
} | [
2830,
3393,
852,
13415,
1155,
353,
8840,
836,
8,
341,
35402,
1669,
3056,
3782,
5809,
4913,
1313,
3252,
1805,
2198,
3176,
788,
15,
1335,
1830,
788,
16,
15,
5541,
692,
34653,
1669,
609,
1254,
12574,
515,
197,
197,
15872,
25,
1758,
52989... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRetrying(t *testing.T) {
ctx := testlogging.Context(t)
someError := errors.New("some error")
ms := blobtesting.NewMapStorage(blobtesting.DataMap{}, nil, nil)
fs := &blobtesting.FaultyStorage{
Base: ms,
Faults: map[string][]*blobtesting.Fault{
"PutBlob": {
{Err: someError},
},
"GetBlob": {... | explode_data.jsonl/18763 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 747
} | [
2830,
3393,
12020,
27509,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
1273,
25263,
9328,
1155,
692,
1903,
635,
1454,
1669,
5975,
7121,
445,
14689,
1465,
1138,
47691,
1669,
23404,
8840,
7121,
2227,
5793,
67938,
8840,
3336,
2227,
22655,
2092... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestAsGet(t *testing.T) {
r, _ := Prepare(mocks.NewRequest(), AsGet())
if r.Method != "GET" {
t.Fatal("autorest: AsGet failed to set HTTP method header to GET")
}
} | explode_data.jsonl/20954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 72
} | [
2830,
3393,
2121,
1949,
1155,
353,
8840,
836,
8,
972,
7000,
11,
716,
1669,
31166,
1255,
25183,
75274,
1507,
1634,
1949,
13116,
743,
435,
20798,
961,
330,
3806,
1,
972,
197,
3244,
26133,
445,
2717,
41419,
25,
1634,
1949,
4641,
311,
738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRulesGetTags(t *testing.T) {
type tests struct {
input Rules
want []string
}
tcs := []tests{
{input: Rules{{Tag: "tag", Value: "value"}, {Tag: "", Value: ""}}, want: []string{"tag", ""}},
{input: Rules{{Tag: "tag", Value: "value"}}, want: []string{"tag"}},
{input: Rules{}, want: nil},
}
for _... | explode_data.jsonl/69243 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 199
} | [
2830,
3393,
26008,
1949,
15930,
1155,
353,
8840,
836,
8,
341,
13158,
7032,
2036,
341,
197,
22427,
22847,
198,
197,
50780,
220,
3056,
917,
198,
197,
630,
3244,
4837,
1669,
3056,
23841,
515,
197,
197,
90,
1355,
25,
22847,
2979,
5668,
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... | 3 |
func TestMultipleAssignmentsUpdateAssignments(t *testing.T) {
a := assert.New(t)
var (
DefaultFleetEventID1 = DefaultFleetEventID + "-1"
DefaultFleetAssignmentID1 = DefaultFleetAssignmentID + "-1"
DefaultFleetVehicleID1 = DefaultFleetVehicleID + "-1"
DefaultFleetMissionID1 = DefaultFleetMissionID ... | explode_data.jsonl/58074 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1084
} | [
2830,
3393,
32089,
28933,
1368,
4289,
28933,
1368,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
692,
2405,
2399,
197,
91084,
37,
18973,
1556,
915,
16,
414,
284,
7899,
37,
18973,
1556,
915,
488,
6523,
16,
698,
197,
9108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetQRCode(t *testing.T) {
t.Parallel()
h := testSetup()
r, w, wr := h.newHTTP("GET")
user := &mocks.User{Email: "test@test.com"}
h.putUserInCtx(user, &r)
if err := h.totp.GetQRCode(w, r); err == nil {
t.Error("should fail because there is no totp secret")
}
secret := makeSecretKey(h, user.Email)
... | explode_data.jsonl/63398 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 270
} | [
2830,
3393,
1949,
30465,
2078,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
9598,
1669,
1273,
21821,
2822,
7000,
11,
289,
11,
3112,
1669,
305,
4618,
9230,
445,
3806,
5130,
19060,
1669,
609,
16712,
82,
7344,
90,
4781,
25,
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... | 5 |
func TestCancelPipelineBuild(t *testing.T) {
mux, server, client := setup()
defer teardown(server)
mux.HandleFunc("/projects/1/pipelines/5949167/cancel", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "POST")
fmt.Fprintln(w, `{"id":1, "status":"canceled"}`)
})
pipeline, _, err := client.Pipe... | explode_data.jsonl/5217 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 256
} | [
2830,
3393,
9269,
34656,
11066,
1155,
353,
8840,
836,
8,
341,
2109,
2200,
11,
3538,
11,
2943,
1669,
6505,
741,
16867,
49304,
21421,
692,
2109,
2200,
63623,
4283,
17161,
14,
16,
4322,
93997,
14,
20,
24,
19,
24,
16,
21,
22,
2899,
4949... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHTTPExtension(t *testing.T) {
req := NewInvokeMethodRequest("test_method")
req.WithHTTPExtension("POST", "query1=value1&query2=value2")
assert.Equal(t, commonv1pb.HTTPExtension_POST, req.Message().GetHttpExtension().GetVerb())
assert.Equal(t, "query1=value1&query2=value2", req.EncodeHTTPQueryString())
} | explode_data.jsonl/46242 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 116
} | [
2830,
3393,
9230,
12049,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
1532,
17604,
3523,
1900,
445,
1944,
9032,
1138,
24395,
26124,
9230,
12049,
445,
2946,
497,
330,
1631,
16,
46538,
16,
5,
1631,
17,
46538,
17,
1138,
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,
1,
1... | 1 |
func TestStopping(t *testing.T) {
obj := StoppableStruct{}
di := New().
WithObjects(&obj).
InitializeGraph()
// This will usually be called in defer:
di.Stop()
assert.True(t, obj.Stopped)
} | explode_data.jsonl/72957 | {
"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,
75385,
1155,
353,
8840,
836,
8,
1476,
22671,
1669,
794,
77539,
9422,
31483,
2698,
72,
1669,
1532,
25829,
197,
197,
2354,
11543,
2099,
2295,
4292,
197,
93904,
11212,
2822,
197,
322,
1096,
686,
5990,
387,
2598,
304,
17956,
510... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakeSliceBuffer(t *testing.T) {
type args struct {
c gltf.ComponentType
t gltf.AccessorType
count uint32
buffer interface{}
}
tests := []struct {
name string
args args
want interface{}
}{
{"nil buffer", args{gltf.ComponentUbyte, gltf.AccessorVec2, 2, nil}, make([][2]uint8, 2)},
... | explode_data.jsonl/68396 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 516
} | [
2830,
3393,
8078,
33236,
4095,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1444,
414,
2770,
8935,
5119,
929,
198,
197,
3244,
414,
2770,
8935,
35645,
269,
929,
198,
197,
18032,
220,
2622,
18,
17,
198,
197,
31122,
3749,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNamedPtrFields(t *testing.T) {
m := NewMapperTagFunc("db", strings.ToLower, nil)
type User struct {
Name string
}
type Asset struct {
Title string
Owner *User `db:"owner"`
}
type Post struct {
Author string
Asset1 *Asset `db:"asset1"`
Asset2 *Asset `db:"asset2"`
}
post := &Post{Author:... | explode_data.jsonl/59102 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 579
} | [
2830,
3393,
15810,
5348,
8941,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
10989,
5668,
9626,
445,
1999,
497,
9069,
29983,
11,
2092,
692,
13158,
2657,
2036,
341,
197,
21297,
914,
198,
197,
630,
13158,
22605,
2036,
341,
197,
92233,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPexpireat(t *testing.T) {
s, err := Run()
ok(t, err)
defer s.Close()
c, err := proto.Dial(s.Addr())
ok(t, err)
defer c.Close()
// Not volatile yet
{
equals(t, time.Duration(0), s.TTL("foo"))
mustDo(t, c,
"TTL", "foo",
proto.Int(-2),
)
}
// Set something
{
mustOK(t, c, "SET", "foo", "... | explode_data.jsonl/44812 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 349
} | [
2830,
3393,
47,
52161,
266,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
6452,
741,
59268,
1155,
11,
1848,
340,
16867,
274,
10421,
741,
1444,
11,
1848,
1669,
18433,
98462,
1141,
93626,
2398,
59268,
1155,
11,
1848,
340,
16867,
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 TestServerWithH2Load(t *testing.T) {
if !*doh2load {
t.Skip("Skipping without --h2load flag.")
}
if runtime.GOOS != "linux" {
t.Skip("skipping Docker test when not on Linux; requires --net which won't work with boot2docker anyway")
}
requireH2load(t)
msg := strings.Repeat("Hello, h2load!\n", 5000)
ts :... | explode_data.jsonl/71684 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 325
} | [
2830,
3393,
5475,
2354,
39,
17,
5879,
1155,
353,
8840,
836,
8,
341,
743,
753,
9,
67,
2267,
17,
1078,
341,
197,
3244,
57776,
445,
85945,
2041,
1177,
71,
17,
1078,
5181,
13053,
197,
532,
743,
15592,
97574,
3126,
961,
330,
14210,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReceiveTicket_InvalidRecipientRand_InvalidSender(t *testing.T) {
sender, b, v, ts, faceValue, winProb, sig := newRecipientFixtureOrFatal(t)
r := newRecipientOrFatal(t, RandAddress(), b, v, ts, faceValue, winProb)
params := r.TicketParams(sender)
// Test invalid recipientRand from seed (invalid sender)
ti... | explode_data.jsonl/44751 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 232
} | [
2830,
3393,
14742,
34058,
62,
7928,
74432,
56124,
62,
7928,
20381,
1155,
353,
8840,
836,
8,
341,
1903,
1659,
11,
293,
11,
348,
11,
10591,
11,
3579,
1130,
11,
3164,
36980,
11,
8366,
1669,
501,
74432,
18930,
2195,
62396,
1155,
340,
7000... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvalidSigningIdentityNodeOU(t *testing.T) {
//测试数据/节点2:
//配置启用noduous,但签名标识不携带
//任何有效的结节。因此签名身份验证应该失败
thisMSP := getLocalMSPWithVersion(t, "testdata/nodeous2", MSPv1_1)
assert.True(t, thisMSP.(*bccspmsp).ouEnforcement)
id, err := thisMSP.GetDefaultSigningIdentity()
assert.NoError(t, err)
err = id.Valid... | explode_data.jsonl/2649 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 355
} | [
2830,
3393,
7928,
93358,
18558,
1955,
11922,
1155,
353,
8840,
836,
8,
341,
322,
81705,
20074,
14,
92374,
17,
28311,
322,
85767,
111456,
34566,
9193,
3837,
77288,
110573,
106918,
16530,
107426,
198,
322,
99885,
104775,
36885,
55502,
1773,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTaskResetPrepare(t *testing.T) {
Convey("With handler and a project context and user", t, func() {
trh := &taskRestartHandler{}
projCtx := serviceModel.Context{
Task: &task.Task{
Id: "testTaskId",
Priority: 0,
Activated: false,
},
}
u := user.DBUser{
Id: "testUser",
}
... | explode_data.jsonl/9570 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 536
} | [
2830,
3393,
6262,
14828,
50590,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2354,
7013,
323,
264,
2390,
2266,
323,
1196,
497,
259,
11,
2915,
368,
341,
197,
25583,
71,
1669,
609,
8202,
59354,
3050,
31483,
197,
197,
30386,
23684,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCassVersionBefore(t *testing.T) {
tests := [...]struct {
version cassVersion
major, minor, patch int
}{
{cassVersion{1, 0, 0}, 0, 0, 0},
{cassVersion{0, 1, 0}, 0, 0, 0},
{cassVersion{0, 0, 1}, 0, 0, 0},
{cassVersion{1, 0, 0}, 0, 1, 0},
{cassVersion{0, 1, 0}, 0, 0, 1},
}
for i, t... | explode_data.jsonl/37532 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 245
} | [
2830,
3393,
34,
395,
5637,
10227,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
48179,
1235,
341,
197,
74954,
1797,
44224,
5637,
198,
197,
2109,
3035,
11,
8922,
11,
10900,
526,
198,
197,
59403,
197,
197,
90,
66,
395,
5637,
90,
16,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestAsciiB64(t *testing.T) {
input := "=?US-ASCII?B?SGVsbG8gV29ybGQ=?="
expect := "Hello World"
result := DecodeHeader(input)
assert.Equal(t, expect, result)
} | explode_data.jsonl/31259 | {
"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,
84135,
33,
21,
19,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
330,
19884,
2034,
12,
56450,
30,
33,
30,
7783,
53,
16892,
38,
23,
70,
53,
17,
24,
84307,
38,
48,
19884,
43488,
24952,
1669,
330,
9707,
4337,
698,
9559,
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 |
func TestObject_String(t *testing.T) {
t.Run("return the string of an empty object", func(t *testing.T) {
got := Object{}.String()
assertEquals(t, got, "{}")
})
t.Run("return the string of an object that contains a single element", func(t *testing.T) {
got := Object{"a": Int(1)}.String()
assertEquals(t, got... | explode_data.jsonl/4129 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 232
} | [
2830,
3393,
1190,
31777,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
689,
279,
914,
315,
458,
4287,
1633,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3174,
354,
1669,
3002,
46391,
703,
741,
197,
21729,
1155,
11,
2684,
11,
3550... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScore(t *testing.T) {
for _, test := range scrabbleScoreTests {
if actual := Score(test.input); actual != test.expected {
t.Errorf("Score(%q) expected %d, Actual %d", test.input, test.expected, actual)
}
}
} | explode_data.jsonl/32817 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 85
} | [
2830,
3393,
10570,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
9224,
72191,
10570,
18200,
341,
197,
743,
5042,
1669,
18115,
8623,
10046,
1215,
5042,
961,
1273,
56835,
341,
298,
3244,
13080,
445,
10570,
15238,
80,
8,
3601... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestToString(t *testing.T) {
nm := NetworkMember{
Endpoint: "a",
InternalEndpoint: "b",
}
assert.Equal(t, "b", nm.PreferredEndpoint())
nm = NetworkMember{
Endpoint: "a",
}
assert.Equal(t, "a", nm.PreferredEndpoint())
now := time.Now()
ts := ×tamp{
incTime: now,
seqNum: uint64(42),
... | explode_data.jsonl/62255 | {
"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,
5870,
1155,
353,
8840,
836,
8,
341,
9038,
76,
1669,
8141,
9366,
515,
197,
197,
27380,
25,
260,
330,
64,
756,
197,
197,
11569,
27380,
25,
330,
65,
756,
197,
532,
6948,
12808,
1155,
11,
330,
65,
497,
25723,
28770,
5554,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_SubscriberMethods(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
Convey("Given a valid manipulator with a backend subscriber", t, func() {
m := maniptest.NewTestManipulator()
us := maniptest.NewTestSubscriber()
d, err := newDatastore()
So(err, ShouldBeNil)
... | explode_data.jsonl/66556 | {
"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,
36359,
20351,
17856,
1155,
353,
8840,
836,
8,
1476,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
2822,
93070,
5617,
445,
22043,
264,
2697,
14609,
10511,
448,
264,
19163,
32115,
497,
259,
11,
2915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCompareOptionIgnoreExtraneous(t *testing.T) {
Given(t).
Prune(false).
Path("two-nice-pods").
When().
PatchFile("pod-1.yaml", `[{"op": "add", "path": "/metadata/annotations", "value": {"argocd.argoproj.io/compare-options": "IgnoreExtraneous"}}]`).
Create().
Sync().
Then().
Expect(OperationPhase... | explode_data.jsonl/66694 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 398
} | [
2830,
3393,
27374,
5341,
12497,
840,
376,
17666,
1155,
353,
8840,
836,
8,
341,
9600,
2071,
1155,
4292,
197,
197,
3533,
2886,
3576,
4292,
197,
69640,
445,
19789,
5279,
558,
2268,
29697,
38609,
197,
197,
4498,
25829,
197,
10025,
754,
1703... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateDBUser_ConcurrentDuplicateUser(t *testing.T) {
storage.Conn.Truncate([]string{models.TableNames.Users})
id := 123
user := &models.User{ID: id}
err := user.Insert(storage.Conn.DB.DB, boil.Infer())
require.NoError(t, err)
// we want the very first getDBUser() call in getOrCreateLocalUser() to retur... | explode_data.jsonl/1641 | {
"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,
4021,
3506,
1474,
15100,
3231,
53979,
1474,
1155,
353,
8840,
836,
8,
341,
197,
16172,
50422,
8240,
26900,
10556,
917,
90,
6507,
18257,
7980,
36782,
8824,
15710,
1669,
220,
16,
17,
18,
198,
19060,
1669,
609,
6507,
7344,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFindListOnce(t *testing.T) {
env, cleanup := withTestEnvironment(t)
defer cleanup()
env.gopts.backendTestHook = func(r restic.Backend) (restic.Backend, error) {
return newListOnceBackend(r), nil
}
testSetupBackupData(t, env)
opts := BackupOptions{}
testRunBackup(t, "", []string{filepath.Join(env.te... | explode_data.jsonl/43578 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 479
} | [
2830,
3393,
9885,
852,
12522,
1155,
353,
8840,
836,
8,
341,
57538,
11,
21290,
1669,
448,
2271,
12723,
1155,
340,
16867,
21290,
2822,
57538,
1302,
10518,
37187,
2271,
31679,
284,
2915,
2601,
2732,
292,
8864,
408,
8,
320,
3927,
292,
8864,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImports(t *testing.T) {
switch runtime.GOOS {
case "android", "nacl":
t.Skipf("skipping on %s", runtime.GOOS)
return
}
if err := exec.Command("go", "run", "x509_test_import.go").Run(); err != nil {
t.Errorf("failed to run x509_test_import.go: %s", err)
}
} | explode_data.jsonl/56556 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 116
} | [
2830,
3393,
31250,
1155,
353,
8840,
836,
8,
341,
8961,
15592,
97574,
3126,
341,
2722,
330,
5954,
497,
330,
3376,
564,
4660,
197,
3244,
57776,
69,
445,
4886,
5654,
389,
1018,
82,
497,
15592,
97574,
3126,
340,
197,
853,
198,
197,
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 TestSliptValues(t *testing.T) {
t.Run("when there are some values", func(t *testing.T) {
input := "um,dois,tres"
got := SplitValues(&input)
want := []string{"um", "dois", "tres"}
if fmt.Sprintf("%v", got) != fmt.Sprintf("%v", want) {
t.Errorf("got %q want %q\n", got, want)
}
})
t.Run("when there ar... | explode_data.jsonl/35883 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 342
} | [
2830,
3393,
50,
742,
417,
6227,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
9309,
1052,
525,
1045,
2750,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
22427,
1669,
330,
372,
11,
2982,
285,
13960,
416,
698,
197,
3174,
354,
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 TestSpanFinish(t *testing.T) {
assert := assert.New(t)
wait := time.Millisecond * 2
tracer := newTracer(withTransport(newDefaultTransport()))
span := tracer.newRootSpan("pylons.request", "pylons", "/")
// the finish should set finished and the duration
time.Sleep(wait)
span.Finish()
assert.True(span.Durat... | explode_data.jsonl/42837 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
12485,
25664,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
48750,
1669,
882,
71482,
353,
220,
17,
198,
25583,
9584,
1669,
501,
1282,
9584,
16980,
27560,
1755,
3675,
27560,
12145,
197,
1480,
1669,
64306,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBuildsInfoError(t *testing.T) {
testClient(t, func(e *cli.Engine, i *mocksdk.Interface) {
i.On("BuildGet", "app1", "build1").Return(nil, fmt.Errorf("err1"))
res, err := testExecute(e, "builds info build1 -a app1", nil)
require.NoError(t, err)
require.Equal(t, 1, res.Code)
res.RequireStderr(t, []str... | explode_data.jsonl/65798 | {
"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,
11066,
82,
1731,
1454,
1155,
353,
8840,
836,
8,
341,
18185,
2959,
1155,
11,
2915,
2026,
353,
19521,
54424,
11,
600,
353,
16712,
51295,
41065,
8,
341,
197,
8230,
8071,
445,
11066,
1949,
497,
330,
676,
16,
497,
330,
5834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPageWithDelimiter(t *testing.T) {
t.Parallel()
assertFunc := func(t *testing.T, ext string, pages page.Pages) {
p := pages[0]
checkPageTitle(t, p, "Simple")
checkPageContent(t, p, normalizeExpected(ext, "<p>Summary Next Line</p>\n\n<p>Some more text</p>\n"), ext)
checkPageSummary(t, p, normalizeExpec... | explode_data.jsonl/60609 | {
"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,
2665,
2354,
91098,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
6948,
9626,
1669,
2915,
1155,
353,
8840,
836,
11,
1303,
914,
11,
6816,
2150,
68829,
8,
341,
197,
3223,
1669,
6816,
58,
15,
921,
197,
25157,
2665,
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 TestLoader(t *testing.T) {
secretName := "test-secret-name"
namespace := "default"
client := &mocks.Client{}
secret := &apiCoreV1.Secret{}
background := context.Background()
actionContext := &service.ActionContext{
Context: background,
Task: &reconciler.Task{
Namespace: namespace,
},
KubeClient... | explode_data.jsonl/68824 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 503
} | [
2830,
3393,
9181,
1155,
353,
8840,
836,
8,
1476,
197,
20474,
675,
1669,
330,
1944,
68892,
11494,
698,
56623,
1669,
330,
2258,
1837,
25291,
1669,
609,
16712,
82,
11716,
16094,
197,
20474,
1669,
609,
2068,
5386,
53,
16,
74779,
31483,
3073... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoveAllAnnotations(t *testing.T) {
msg := "TestRemoveAllAnnotations"
fn := "test.pdf"
copyFile(t, filepath.Join(inDir, fn), filepath.Join(outDir, fn))
inFile := filepath.Join(outDir, fn)
m := map[int][]pdf.AnnotationRenderer{}
anns := make([]pdf.AnnotationRenderer, 2)
anns[0] = textAnn
anns[1] = li... | explode_data.jsonl/65409 | {
"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,
13021,
2403,
21418,
1155,
353,
8840,
836,
8,
341,
21169,
1669,
330,
2271,
13021,
2403,
21418,
1837,
40095,
1669,
330,
1944,
15995,
698,
49124,
1703,
1155,
11,
26054,
22363,
5900,
6184,
11,
5168,
701,
26054,
22363,
9828,
6184,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceConversionWithEmptyServiceAccountsAnnotation(t *testing.T) {
serviceName := "service1"
namespace := "default"
ip := "10.0.0.1"
localSvc := coreV1.Service{
ObjectMeta: metaV1.ObjectMeta{
Name: serviceName,
Namespace: namespace,
Annotations: map[string]string{},
},
Spec: core... | explode_data.jsonl/73805 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 379
} | [
2830,
3393,
1860,
48237,
2354,
3522,
1860,
41369,
19711,
1155,
353,
8840,
836,
8,
341,
52934,
675,
1669,
330,
7936,
16,
698,
56623,
1669,
330,
2258,
1837,
46531,
1669,
330,
16,
15,
13,
15,
13,
15,
13,
16,
1837,
8854,
92766,
1669,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPodTest(t *testing.T) {
s, buf := setupScaffoldAndWriter()
err := s.Execute(appConfig,
&TestPod{
Image: "quay.io/app/operator:v1.0.0",
TestNamespaceEnv: test.TestNamespaceEnv,
})
if err != nil {
t.Fatalf("failed to execute the scaffold: (%v)", err)
}
if testPodExp != buf.String() {... | explode_data.jsonl/62246 | {
"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,
23527,
2271,
1155,
353,
8840,
836,
8,
341,
1903,
11,
6607,
1669,
6505,
50,
27864,
3036,
6492,
741,
9859,
1669,
274,
13827,
11462,
2648,
345,
197,
197,
5,
2271,
23527,
515,
298,
53397,
25,
310,
330,
446,
352,
4245,
10640,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLru(t *testing.T) {
g := Goblin(t)
g.Describe("Test zeroshifter cache", func() {
const capacity = 10
z := New(capacity)
g.It("Checks work of clean method", func(){
r, err := rand.Int(rand.Reader, big.NewInt(1000))
g.Assert(err).IsNil()
z.Add(r)
g.Assert(len(z.Get())).Eql(1)
z.Clean... | explode_data.jsonl/39420 | {
"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,
43,
2672,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
80164,
1155,
692,
3174,
23548,
3114,
445,
2271,
17516,
71,
37700,
6500,
497,
2915,
368,
341,
197,
4777,
8654,
284,
220,
16,
15,
271,
197,
20832,
1669,
1532,
51386,
4018,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsStorageCompatible(t *testing.T) {
tests := []struct {
name string
spotInfo instanceTypeInformation
instanceInfo instanceTypeInformation
attachedVolumes int
expected bool
}{
{name: "Instance has no attached volumes",
spotInfo: instanceTypeInformation{
instanceS... | explode_data.jsonl/55198 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1493
} | [
2830,
3393,
3872,
5793,
29161,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
1903,
19099,
1731,
286,
2867,
929,
14873,
198,
197,
56256,
1731,
262,
2867,
929,
14873,
198,
197,
197,
67497,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetEnvAsUint32(t *testing.T) {
t.Parallel()
testVarKey := "TEST_ONLY_FOR_UNIT_TEST_UINT32"
res := util.GetEnvAsUint32(testVarKey, 1)
assert.Equal(t, uint32(1), res)
os.Setenv(testVarKey, "2")
defer os.Unsetenv(testVarKey)
res = util.GetEnvAsUint32(testVarKey, 1)
assert.Equal(t, uint32(2), res)
os.S... | explode_data.jsonl/6085 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 202
} | [
2830,
3393,
1949,
14359,
2121,
21570,
18,
17,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18185,
3962,
1592,
1669,
330,
10033,
31263,
14516,
31718,
11641,
27241,
18,
17,
698,
10202,
1669,
4094,
2234,
14359,
2121,
21570,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestJolokia2_ScalarValues(t *testing.T) {
config := `
[jolokia2_agent]
urls = ["%s"]
[[jolokia2_agent.metric]]
name = "scalar_without_attribute"
mbean = "scalar_without_attribute"
[[jolokia2_agent.metric]]
name = "scalar_with_attribute"
mbean = "scalar_with_attribute"
paths = ["biz"]
[[joloki... | explode_data.jsonl/5353 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1084
} | [
2830,
3393,
41,
337,
27552,
17,
1098,
59153,
6227,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
22074,
197,
3809,
337,
27552,
17,
25730,
921,
197,
19320,
82,
284,
4383,
4,
82,
25912,
197,
15505,
73,
337,
27552,
17,
25730,
85816,
14288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetSecurityGroup(t *testing.T) {
type args struct {
ctx context.Context
req service.GetSecurityGroupRequest
}
tests := []struct {
name string
args args
want []model.SecurityGroup
wantErr bool
}{
{
name: "测试查询安全组",
args: args{
ctx: nil,
req: service.GetSecurityGroupReque... | explode_data.jsonl/72646 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 482
} | [
2830,
3393,
1949,
15352,
2808,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
20985,
2266,
9328,
198,
197,
24395,
2473,
2234,
15352,
2808,
1900,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestShouldShow(t *testing.T) {
list := cmdList{}
state := &api.Container{
Name: "foo",
ExpandedConfig: map[string]string{
"security.privileged": "1",
"user.blah": "abc",
},
}
if !list.shouldShow([]string{"u.blah=abc"}, state) {
t.Error("u.blah=abc didn't match")
}
if !list.shouldSh... | explode_data.jsonl/79087 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
14996,
7812,
1155,
353,
8840,
836,
8,
341,
14440,
1669,
5439,
852,
31483,
24291,
1669,
609,
2068,
33672,
515,
197,
21297,
25,
330,
7975,
756,
197,
197,
51933,
2648,
25,
2415,
14032,
30953,
515,
298,
197,
1,
17039,
82571,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestOr(t *testing.T) {
dryDB := DB.Session(&gorm.Session{DryRun: true})
result := dryDB.Where("role = ?", "admin").Or("role = ?", "super_admin").Find(&User{})
if !regexp.MustCompile("SELECT \\* FROM .*users.* WHERE .*role.* = .+ OR .*role.* = .+").MatchString(result.Statement.SQL.String()) {
t.Fatalf("Build ... | explode_data.jsonl/48703 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 393
} | [
2830,
3393,
2195,
1155,
353,
8840,
836,
8,
341,
2698,
884,
3506,
1669,
5952,
20674,
2099,
73281,
20674,
90,
85215,
6727,
25,
830,
8824,
9559,
1669,
9058,
3506,
17067,
445,
5778,
284,
42313,
330,
2882,
1827,
2195,
445,
5778,
284,
42313,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNew_CredentialURL(t *testing.T) {
{
var resource = url.NewResource("https://raw.githubusercontent.com:80/viant/toolbox/master/LICENSE.txt?check=1&p=2")
var URL = resource.CredentialURL("smith", "123")
assert.EqualValues(t, "https://smith:123@raw.githubusercontent.com:80/viant/toolbox/master/LICENSE.txt... | explode_data.jsonl/31246 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 238
} | [
2830,
3393,
3564,
920,
30320,
3144,
1155,
353,
8840,
836,
8,
1476,
197,
515,
197,
2405,
5101,
284,
2515,
7121,
4783,
445,
2428,
1110,
1041,
50927,
905,
25,
23,
15,
5457,
5372,
75027,
2011,
23303,
10845,
3909,
30,
2028,
28,
16,
96774,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAnnotatingExecuteBatchKeyspaceIdsMultipleIds(t *testing.T) {
keyspace, shards := setUpSandboxWithTwoShards("TestAnnotatingExecuteBatchKeyspaceIdsMultipleIds")
_, err := rpcVTGate.ExecuteBatchKeyspaceIds(
context.Background(),
[]*vtgatepb.BoundKeyspaceIdQuery{
{
Query: &querypb.BoundQuery{
Sql... | explode_data.jsonl/7850 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 302
} | [
2830,
3393,
2082,
1921,
1095,
17174,
21074,
8850,
1306,
12701,
32089,
12701,
1155,
353,
8840,
836,
8,
341,
23634,
8746,
11,
74110,
1669,
18620,
50,
31536,
2354,
11613,
2016,
2347,
445,
2271,
2082,
1921,
1095,
17174,
21074,
8850,
1306,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLiteralBlockNodeType(t *testing.T) {
n := &LiteralBlockNode{Type: NodeLiteralBlock}
if n.NodeType() != NodeLiteralBlock {
t.Error("n.Type != NodeLiteralBlock")
}
} | explode_data.jsonl/1869 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 72
} | [
2830,
3393,
17350,
4713,
66137,
1155,
353,
8840,
836,
8,
341,
9038,
1669,
609,
17350,
4713,
1955,
90,
929,
25,
6018,
17350,
4713,
532,
743,
308,
21714,
929,
368,
961,
6018,
17350,
4713,
341,
197,
3244,
6141,
445,
77,
10184,
961,
6018,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadASN1Optional(t *testing.T) {
var empty String
var present bool
ok := empty.ReadOptionalASN1(nil, &present, 0xa0)
if !ok || present {
t.Errorf("empty.ReadOptionalASN1() = %v, want true; present = %v want false", ok, present)
}
var in, out String = []byte{0xa1, 3, 0x4, 1, 1}, nil
ok = in.ReadOption... | explode_data.jsonl/16721 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
4418,
68134,
16,
15309,
1155,
353,
8840,
836,
8,
341,
2405,
4287,
923,
198,
2405,
3042,
1807,
198,
59268,
1669,
4287,
6503,
15309,
68134,
16,
27907,
11,
609,
28744,
11,
220,
15,
9591,
15,
340,
743,
753,
562,
1369,
3042,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSymbolEqual(t *testing.T) {
require.True(t, bass.Symbol("hello").Equal(bass.Symbol("hello")))
require.False(t, bass.Symbol("hello").Equal(bass.String("hello")))
require.True(t, bass.Symbol("hello").Equal(wrappedValue{bass.Symbol("hello")}))
require.False(t, bass.Symbol("hello").Equal(wrappedValue{bass.Stri... | explode_data.jsonl/12614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 128
} | [
2830,
3393,
15090,
2993,
1155,
353,
8840,
836,
8,
341,
17957,
32443,
1155,
11,
21529,
65995,
445,
14990,
1827,
2993,
1883,
395,
65995,
445,
14990,
29836,
17957,
50757,
1155,
11,
21529,
65995,
445,
14990,
1827,
2993,
1883,
395,
6431,
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 TestConfigureModule(t *testing.T) {
module := NewClassifierModule()
dumpPackets, err := utils.ReadDumpFile("../../godpi_example/dumps/http.cap")
if err != nil {
t.Fatal(err)
}
for i := 0; i < 3; i++ {
<-dumpPackets
}
packet := <-dumpPackets
flow := types.CreateFlowFromPacket(packet)
result := module.C... | explode_data.jsonl/61054 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 323
} | [
2830,
3393,
28560,
3332,
1155,
353,
8840,
836,
8,
341,
54020,
1669,
1532,
33895,
3332,
741,
2698,
1510,
47,
18382,
11,
1848,
1669,
12439,
6503,
51056,
1703,
36800,
39711,
2493,
39304,
3446,
11793,
15627,
27388,
1138,
743,
1848,
961,
2092,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestCheckCompatible(t *testing.T) {
type test struct {
stored, new *ChainConfig
head uint64
wantErr *ConfigCompatError
}
tests := []test{
{stored: AllProtocolChanges, new: AllProtocolChanges, head: 0, wantErr: nil},
{stored: AllProtocolChanges, new: AllProtocolChanges, head: 100, wantErr: n... | explode_data.jsonl/62515 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 538
} | [
2830,
3393,
3973,
29161,
1155,
353,
8840,
836,
8,
341,
13158,
1273,
2036,
341,
197,
18388,
3018,
11,
501,
353,
18837,
2648,
198,
197,
46081,
286,
2622,
21,
19,
198,
197,
50780,
7747,
257,
353,
2648,
8712,
1454,
198,
197,
532,
78216,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRowTableDelete(t *testing.T) {
map_dao := &TableRowDeleteImpl{&DaoImpl{}}
service := service.MakeTableRowService(map_dao)
result := service.Delete("323", "12")
if !result.IsSuccess() {
t.Errorf("Delete failed")
}
_, ok := result.GetDataByKey("update_hash")
if !ok {
t.Errorf("update_hash not present ... | explode_data.jsonl/15451 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 129
} | [
2830,
3393,
3102,
2556,
6435,
1155,
353,
8840,
836,
8,
341,
19567,
814,
3441,
1669,
609,
38558,
6435,
9673,
90,
5,
12197,
9673,
6257,
532,
52934,
1669,
2473,
50133,
38558,
1860,
9147,
814,
3441,
340,
9559,
1669,
2473,
18872,
445,
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... | 3 |
func TestSyncUnConfirmedCoinBase(t *testing.T) {
args := []string{"--modules=miner", "--modules=qitmeer", "--notls"}
h, err := NewHarness(t, params.PrivNetParam.Params, args...)
defer h.Teardown()
if err != nil {
t.Errorf("new harness failed: %v", err)
return
}
err = h.Setup()
if err != nil {
t.Errorf("se... | explode_data.jsonl/3898 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 388
} | [
2830,
3393,
12154,
1806,
47948,
41180,
3978,
1155,
353,
8840,
836,
8,
341,
31215,
1669,
3056,
917,
4913,
313,
11525,
61506,
261,
497,
14482,
11525,
63048,
275,
89925,
497,
14482,
1921,
4730,
16707,
9598,
11,
1848,
1669,
1532,
74248,
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... | 7 |
func TestResolveIOPathPlaceholders(t *testing.T) {
wf := unmarshalWF(ioPathPlaceholders)
woc := newWoc(*wf)
woc.artifactRepository.S3 = new(config.S3ArtifactRepository)
woc.operate()
assert.Equal(t, wfv1.NodeRunning, woc.wf.Status.Phase)
pods, err := woc.controller.kubeclientset.CoreV1().Pods(wf.ObjectMeta.Namesp... | explode_data.jsonl/54380 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 263
} | [
2830,
3393,
56808,
3810,
1820,
17371,
16662,
1155,
353,
8840,
836,
8,
341,
6692,
69,
1669,
650,
27121,
32131,
37258,
1820,
17371,
16662,
340,
6692,
509,
1669,
501,
54,
509,
4071,
43083,
340,
6692,
509,
46886,
20754,
4624,
808,
18,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestModifyMultisigAccountTransactionSerialization(t *testing.T) {
acc1, err := NewAccountFromPublicKey("68b3fbb18729c1fde225c57f8ce080fa828f0067e451a3fd81fa628842b0b763", MijinTest)
assert.Nilf(t, err, "NewAccountFromPublicKey returned error: %s", err)
acc2, err := NewAccountFromPublicKey("cf893ffcc47c33e7f68... | explode_data.jsonl/69195 | {
"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,
44427,
40404,
285,
343,
7365,
8070,
35865,
1155,
353,
8840,
836,
8,
341,
197,
4475,
16,
11,
1848,
1669,
1532,
7365,
3830,
61822,
445,
21,
23,
65,
18,
69,
6066,
16,
23,
22,
17,
24,
66,
16,
69,
450,
17,
17,
20,
66,
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 TestScan(t *testing.T) {
user1 := User{Name: "ScanUser1", Age: 1, Birthday: parseTime("2000-1-1")}
user2 := User{Name: "ScanUser2", Age: 10, Birthday: parseTime("2010-1-1")}
user3 := User{Name: "ScanUser3", Age: 20, Birthday: parseTime("2020-1-1")}
DB.Save(&user1).Save(&user2).Save(&user3)
type result struct... | explode_data.jsonl/28049 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 403
} | [
2830,
3393,
26570,
1155,
353,
8840,
836,
8,
341,
19060,
16,
1669,
2657,
63121,
25,
330,
26570,
1474,
16,
497,
13081,
25,
220,
16,
11,
36240,
25,
4715,
1462,
445,
17,
15,
15,
15,
12,
16,
12,
16,
42132,
19060,
17,
1669,
2657,
63121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEscapedURLParams(t *testing.T) {
m := NewRouter()
m.Get("/api/{identifier}/{region}/{size}/{rotation}/*", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(200)
rctx := RouteContext(r.Context())
if rctx == nil {
t.Error("no context")
return
}
identifier := URLParam(r, "identifier")... | explode_data.jsonl/42893 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 447
} | [
2830,
3393,
36121,
10185,
3144,
4870,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
9523,
741,
2109,
2234,
4283,
2068,
9388,
15909,
22472,
3943,
22472,
2141,
22472,
13538,
92,
1057,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFibonacciVerifyCorrectOutputAgainstInt(t *testing.T) {
//At 'iteration' 93 int rolls and cannot be used to validate the implemented algorithm
var test_values = []int{1, 2, 3, 10, 20, 93}
for _, i := range test_values {
fg, err := NewGenerator(i)
if err != nil {
t.Errorf("Expected NewGenerator to ret... | explode_data.jsonl/44342 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 326
} | [
2830,
3393,
37,
579,
39345,
32627,
33092,
5097,
84317,
1072,
1155,
353,
8840,
836,
8,
341,
197,
322,
1655,
364,
36722,
6,
220,
24,
18,
526,
27373,
323,
4157,
387,
1483,
311,
9593,
279,
11537,
12111,
198,
2405,
1273,
9146,
284,
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... | 6 |
func TestMove(t *testing.T) {
s, err := Run()
ok(t, err)
defer s.Close()
c, err := proto.Dial(s.Addr())
ok(t, err)
defer c.Close()
// No problem.
{
s.Set("foo", "bar!")
must1(t, c, "MOVE", "foo", "1")
}
// Src key doesn't exists.
{
must0(t, c, "MOVE", "nosuch", "1")
}
// Target key already exists.... | explode_data.jsonl/44818 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 529
} | [
2830,
3393,
9860,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
6452,
741,
59268,
1155,
11,
1848,
340,
16867,
274,
10421,
741,
1444,
11,
1848,
1669,
18433,
98462,
1141,
93626,
2398,
59268,
1155,
11,
1848,
340,
16867,
272,
10421,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCandlesticksAppend(t *testing.T) {
cs, err := NewCandlesticks(IntervalOneDay, 5)
if err != nil {
t.Fatalf("Error creating new candlesticks %+v", err)
}
c, err := NewCandlestick(45.5, 46, 46.5, 42.2, time.Now(), 2302)
if err != nil {
t.Fatalf("Error creating new candlestick %+v", err)
}
if err := cs.... | explode_data.jsonl/47323 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 352
} | [
2830,
3393,
34,
3316,
68945,
23877,
1155,
353,
8840,
836,
8,
341,
71899,
11,
1848,
1669,
1532,
34,
3316,
68945,
7,
10256,
3966,
10159,
11,
220,
20,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
1454,
6825,
501,
37799,
68945,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChangefeedPermissions(t *testing.T) {
defer leaktest.AfterTest(t)()
testFn := func(t *testing.T, db *gosql.DB, f testfeedFactory) {
sqlDB := sqlutils.MakeSQLRunner(db)
sqlDB.Exec(t, `CREATE TABLE foo (a INT PRIMARY KEY, b STRING)`)
sqlDB.Exec(t, `CREATE USER testuser`)
s := f.Server()
pgURL, clea... | explode_data.jsonl/21291 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 381
} | [
2830,
3393,
1143,
524,
823,
12051,
23851,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
18185,
24911,
1669,
2915,
1155,
353,
8840,
836,
11,
2927,
353,
34073,
1470,
22537,
11,
282,
1273,
11184,
4153,
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... | 3 |
func TestHostParseAndValidate(t *testing.T) {
Convey("With a hostGetHandler and request", t, func() {
testStatus := "testStatus"
hgh := &hostGetHandler{}
hgh, ok := hgh.Factory().(*hostGetHandler)
So(ok, ShouldBeTrue)
u := url.URL{
RawQuery: fmt.Sprintf("status=%s", testStatus),
}
r := http.Request{
... | explode_data.jsonl/9563 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 235
} | [
2830,
3393,
9296,
14463,
3036,
17926,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2354,
264,
3468,
1949,
3050,
323,
1681,
497,
259,
11,
2915,
368,
341,
197,
18185,
2522,
1669,
330,
1944,
2522,
698,
197,
9598,
866,
1669,
609,
3790,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandshakeServerAES256GCMSHA384(t *testing.T) {
test := &serverTest{
name: "RSA-AES256-GCM-SHA384",
command: []string{"openssl", "s_client", "-no_ticket", "-cipher", "ECDHE-RSA-AES256-GCM-SHA384"},
}
runServerTestTLS12(t, test)
} | explode_data.jsonl/36328 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
2314,
29661,
5475,
69168,
17,
20,
21,
22863,
4826,
17020,
18,
23,
19,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
609,
4030,
2271,
515,
197,
11609,
25,
262,
330,
73564,
6691,
1570,
17,
20,
21,
12010,
9985,
6222,
17020,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.