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 TestPrivateActivityNoHeatmapVisibleForAdmin(t *testing.T) {
defer prepareTestEnv(t)()
testPrivateActivityDoSomethingForActionEntries(t)
session := loginUser(t, privateActivityTestAdmin)
visible := testPrivateActivityHelperHasVisibleProfileHeatmapFromSession(t, session)
assert.True(t, visible, "user should h... | explode_data.jsonl/51657 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
16787,
4052,
2753,
61306,
2186,
5715,
2461,
7210,
1155,
353,
8840,
836,
8,
341,
16867,
10549,
2271,
14359,
1155,
8,
741,
18185,
16787,
4052,
5404,
23087,
2461,
2512,
24533,
1155,
692,
25054,
1669,
87169,
1155,
11,
869,
4052,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKeeper_AddDeposit(t *testing.T) {
ctx, _, keeper, _, _ := CreateTestInput(t, false, 1000)
// deposit on proposal which is not exist
err := keeper.AddDeposit(ctx, 0, Addrs[0],
sdk.SysCoins{sdk.NewInt64DecCoin(sdk.DefaultBondDenom, 40)}, "")
require.NotNil(t, err)
content := types.NewTextProposal("Test"... | explode_data.jsonl/78315 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 673
} | [
2830,
3393,
77233,
21346,
78982,
1155,
353,
8840,
836,
8,
341,
20985,
11,
8358,
53416,
11,
8358,
716,
1669,
4230,
2271,
2505,
1155,
11,
895,
11,
220,
16,
15,
15,
15,
692,
197,
322,
16539,
389,
13734,
892,
374,
537,
3000,
198,
9859,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateAWSSession(t *testing.T) {
tests := []struct {
descrip string
}{
{
"creates an aws session",
},
}
for _, l := range tests {
test := l
t.Run(test.descrip, func(t *testing.T) {
s := createAWSSession(endpoints.DefaultResolver().EndpointFor)
if s == nil {
t.Fail()
}
})
}
} | explode_data.jsonl/18783 | {
"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,
4021,
14419,
1220,
1338,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
52912,
740,
79,
914,
198,
197,
59403,
197,
197,
515,
298,
197,
1,
58519,
458,
31521,
3797,
756,
197,
197,
1583,
197,
630,
2023,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEBSHttpClient(t *testing.T) {
// always return wrong
// i need to mock up EBS server (which is really challenging!
//t.Fatalf("Something went wrong")
t.Run("Testing wrong content-types", func(t *testing.T) {
url := "https://example.com"
payload := getSuccessfulPurchasePayload(ebs_fields.PurchaseFields... | explode_data.jsonl/27399 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 409
} | [
2830,
3393,
36,
7347,
26316,
1155,
353,
8840,
836,
8,
341,
197,
322,
2677,
470,
4969,
198,
197,
322,
600,
1184,
311,
7860,
705,
468,
7347,
3538,
320,
8206,
374,
2167,
17003,
2219,
197,
322,
83,
30762,
445,
23087,
3937,
4969,
1138,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMCP23017DriverReadGPIO(t *testing.T) {
mcp, adaptor := initTestMCP23017DriverWithStubbedAdaptor(0)
gobottest.Assert(t, mcp.Start(), nil)
adaptor.i2cReadImpl = func(b []byte) (int, error) {
return len(b), nil
}
val, _ := mcp.ReadGPIO(7, "A")
gobottest.Assert(t, val, uint8(0))
// read error
mcp, adapto... | explode_data.jsonl/42319 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 389
} | [
2830,
3393,
44,
7123,
17,
18,
15,
16,
22,
11349,
4418,
26337,
1155,
353,
8840,
836,
8,
341,
2109,
4672,
11,
91941,
1669,
2930,
2271,
44,
7123,
17,
18,
15,
16,
22,
11349,
2354,
33838,
2721,
2589,
32657,
7,
15,
340,
3174,
674,
1716,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContextPath(t *testing.T) {
e := New()
r := e.Router()
r.Add(GET, "/users/:id", nil, e)
c := e.NewContext(nil, nil)
r.Find(GET, "/users/1", c)
assert.Equal(t, "/users/:id", c.Path())
r.Add(GET, "/users/:uid/files/:fid", nil, e)
c = e.NewContext(nil, nil)
r.Find(GET, "/users/1/files/1", c)
assert.Eq... | explode_data.jsonl/35871 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
1972,
1820,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
1532,
741,
7000,
1669,
384,
31413,
2822,
7000,
1904,
62918,
11,
3521,
4218,
11315,
307,
497,
2092,
11,
384,
340,
1444,
1669,
384,
7121,
1972,
27907,
11,
2092,
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... | 1 |
func TestMethodSignature(t *testing.T) {
String, _ := NewType("string")
m := Method{"foo", false, []Argument{{"bar", String, false}, {"baz", String, false}}, nil}
exp := "foo(string,string)"
if m.Sig() != exp {
t.Error("signature mismatch", exp, "!=", m.Sig())
}
idexp := crypto.Keccak256([]byte(exp))[:4]
if !... | explode_data.jsonl/64555 | {
"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,
3523,
25088,
1155,
353,
8840,
836,
8,
341,
4980,
11,
716,
1669,
1532,
929,
445,
917,
1138,
2109,
1669,
6730,
4913,
7975,
497,
895,
11,
3056,
9171,
2979,
1,
2257,
497,
923,
11,
895,
2137,
5212,
42573,
497,
923,
11,
895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResourceWithOwnerReferenceTemplate(t *testing.T) {
cancel, controller := newController()
defer cancel()
wfcset := controller.wfclientset.ArgoprojV1alpha1().Workflows("")
// operate the workflow. it should create a pod.
ctx := context.Background()
wf := unmarshalWF(resourceWithOwnerReferenceTemplate)
wf... | explode_data.jsonl/70989 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 719
} | [
2830,
3393,
4783,
2354,
13801,
8856,
7275,
1155,
353,
8840,
836,
8,
341,
84441,
11,
6461,
1669,
501,
2051,
741,
16867,
9121,
741,
6692,
8316,
746,
1669,
6461,
1418,
69,
2972,
746,
18979,
45926,
73,
53,
16,
7141,
16,
1005,
6776,
38140,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImport(t *testing.T) {
foo := RefTerm(VarTerm("input"), StringTerm("foo"))
foobarbaz := RefTerm(VarTerm("input"), StringTerm("foo"), StringTerm("bar"), StringTerm("baz"))
whitespace := RefTerm(VarTerm("input"), StringTerm("foo"), StringTerm("bar"), StringTerm("white space"))
assertParseImport(t, "single-in... | explode_data.jsonl/50482 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 596
} | [
2830,
3393,
11511,
1155,
353,
8840,
836,
8,
341,
197,
7975,
1669,
8550,
17249,
7,
3962,
17249,
445,
1355,
3975,
923,
17249,
445,
7975,
5455,
197,
50267,
42573,
1669,
8550,
17249,
7,
3962,
17249,
445,
1355,
3975,
923,
17249,
445,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileValidation(t *testing.T) {
validate := New()
tests := []struct {
title string
param string
expected bool
}{
{"empty path", "", false},
{"regular file", filepath.Join("testdata", "a.go"), true},
{"missing file", filepath.Join("testdata", "no.go"), false},
{"directory, not a file", "t... | explode_data.jsonl/77291 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 309
} | [
2830,
3393,
1703,
13799,
1155,
353,
8840,
836,
8,
341,
197,
7067,
1669,
1532,
2822,
78216,
1669,
3056,
1235,
341,
197,
24751,
262,
914,
198,
197,
36037,
262,
914,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
4913,
3194,
1815,
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 TestToDomain(t *testing.T) {
testToDomain(t, false)
testToDomain(t, true)
// this is just to confirm the uint64 representation of float64(72.5) used as a "temperature" tag
assert.Equal(t, int64(4634802150889750528), int64(math.Float64bits(72.5)))
} | explode_data.jsonl/5140 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
1249,
13636,
1155,
353,
8840,
836,
8,
341,
18185,
1249,
13636,
1155,
11,
895,
340,
18185,
1249,
13636,
1155,
11,
830,
340,
197,
322,
419,
374,
1101,
311,
7683,
279,
2622,
21,
19,
13042,
315,
2224,
21,
19,
7,
22,
17,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Format_LessArgs(t *testing.T) {
vm := goja.New()
util := New(vm)
var b bytes.Buffer
util.Format(&b, "Test: %s %d, %j", vm.ToValue("string"), vm.ToValue(42))
if res := b.String(); res != "Test: string 42, %j" {
t.Fatalf("Unexpected result: '%s'", res)
}
} | explode_data.jsonl/60331 | {
"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,
2742,
72999,
2351,
433,
4117,
1155,
353,
8840,
836,
8,
341,
54879,
1669,
728,
5580,
7121,
741,
79138,
1669,
1532,
31723,
692,
2405,
293,
5820,
22622,
198,
79138,
9978,
2099,
65,
11,
330,
2271,
25,
1018,
82,
1018,
67,
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 TestRangeCacheDetectSplitReverseScan(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
db := initTestDescriptorDB(t)
ctx := context.Background()
// A request initially looks up the range descriptor ["a"-"b").
doLookup(ctx, db.cache, "aa")
db.assertLookupCountEq(t, 2, "aa")
// A sp... | explode_data.jsonl/28188 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 816
} | [
2830,
3393,
6046,
8233,
57193,
20193,
45695,
26570,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
16867,
1487,
77940,
1155,
568,
7925,
1155,
340,
20939,
1669,
2930,
2271,
11709,
3506,
1155,
340,
20985,
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 TestShouldDestroySessionWhenInactiveForTooLong(t *testing.T) {
mock := mocks.NewMockAutheliaCtx(t)
defer mock.Close()
clock := mocks.TestingClock{}
clock.Set(time.Now())
past := clock.Now().Add(-1 * time.Hour)
mock.Ctx.Configuration.Session.Inactivity = testInactivity
// Reload the session provider since ... | explode_data.jsonl/20191 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 405
} | [
2830,
3393,
14996,
14245,
5283,
4498,
72214,
2461,
31246,
6583,
1155,
353,
8840,
836,
8,
341,
77333,
1669,
68909,
7121,
11571,
5087,
35929,
23684,
1155,
340,
16867,
7860,
10421,
2822,
84165,
1669,
68909,
8787,
287,
26104,
16094,
84165,
4202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGrow(t *testing.T) {
m := &Map{}
m.Grow(uintptr(63))
for { // make sure to wait for resize operation to finish
if atomic.LoadUintptr(&m.resizing) == 0 {
break
}
time.Sleep(time.Microsecond * 50)
}
d := m.mapData()
if d.keyShifts != 58 {
t.Error("Grow operation did not result in correct inter... | explode_data.jsonl/30797 | {
"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,
56788,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
609,
2227,
16094,
2109,
1224,
651,
8488,
3505,
7,
21,
18,
4390,
2023,
314,
442,
1281,
2704,
311,
3783,
369,
20925,
5666,
311,
6248,
198,
197,
743,
24510,
13969,
21570,
3505,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteClusterTemplate(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
HandleDeleteClusterSuccessfully(t)
sc := fake.ServiceClient()
sc.Endpoint = sc.Endpoint + "v1/"
res := clustertemplates.Delete(sc, "6dc6d336e3fc4c0a951b5698cd1236ee")
th.AssertNoErr(t, res.Err)
requestID := res.Header["X-Ope... | explode_data.jsonl/20364 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 183
} | [
2830,
3393,
6435,
28678,
7275,
1155,
353,
8840,
836,
8,
341,
70479,
39820,
9230,
741,
16867,
270,
94849,
37496,
9230,
2822,
197,
6999,
6435,
28678,
35959,
1155,
692,
29928,
1669,
12418,
13860,
2959,
741,
29928,
90409,
284,
1136,
90409,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSupplierConfig_String(t *testing.T) {
tests := []struct {
name string
config SupplierConfig
want string
}{
{
name: "test with empty config",
config: SupplierConfig{},
want: "",
},
{
name: "test with empty path",
config: SupplierConfig{
Key: "tfstate",
Backend: "... | explode_data.jsonl/6505 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 382
} | [
2830,
3393,
46167,
2648,
31777,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
25873,
31704,
2648,
198,
197,
50780,
256,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
256,
330,
1944,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQueryArrayValues(t *testing.T) {
jsonStr := `{
"artists": [
["Bob Dylan"],
"John Lennon",
"Mick Jagger",
"Elton John",
"Michael Jackson",
"John Smith",
true,
123,
456,
false,
null
]
}`
assert(t, Get(jsonStr, `a*.#[0="Bob Dylan"]#|#`).String() == "1")
assert(t, Get(jsonS... | explode_data.jsonl/43466 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 275
} | [
2830,
3393,
2859,
1857,
6227,
1155,
353,
8840,
836,
8,
341,
30847,
2580,
1669,
1565,
515,
197,
197,
1,
76635,
788,
2278,
298,
197,
1183,
32388,
43358,
8097,
298,
197,
1,
13079,
79740,
756,
298,
197,
73527,
865,
619,
10114,
756,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFilterLarge(t *testing.T) {
f := bloom.NewFilter(100000000, 0, 0.01, wire.BloomUpdateNone)
if len(f.MsgFilterLoad().Filter) > wire.MaxFilterLoadFilterSize {
t.Errorf("TestFilterLarge test failed: %d > %d",
len(f.MsgFilterLoad().Filter), wire.MaxFilterLoadFilterSize)
}
} | explode_data.jsonl/24698 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
5632,
34253,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
51454,
7121,
5632,
7,
16,
15,
15,
15,
15,
15,
15,
15,
15,
11,
220,
15,
11,
220,
15,
13,
15,
16,
11,
9067,
1785,
18474,
4289,
4064,
340,
743,
2422,
955,
30365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetIcons(t *testing.T) {
req, err := http.NewRequest("GET", "/icons?url=apple.com", nil)
if err != nil {
log.Fatal(err)
}
w := httptest.NewRecorder()
iconsHandler(w, req)
assertStringEquals(t, "200", fmt.Sprintf("%d", w.Code))
assertStringEquals(t, "max-age=86400", w.Header().Get("Cache-Control"))
... | explode_data.jsonl/25589 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 282
} | [
2830,
3393,
1949,
19106,
1155,
353,
8840,
836,
8,
341,
24395,
11,
1848,
1669,
1758,
75274,
445,
3806,
497,
3521,
10670,
94399,
28,
22377,
905,
497,
2092,
340,
743,
1848,
961,
2092,
341,
197,
6725,
26133,
3964,
340,
197,
630,
6692,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRelativeToAbsolutePath(t *testing.T) {
testfile1 := "./util.go"
testabsresult1, err := filepath.Abs(testfile1)
assert.NoError(t, err)
testabs1, err := common.RelativeToAbsolutePath(testfile1)
assert.NoError(t, err)
assert.Equal(t, testabs1, testabsresult1)
testfile2 := "../README.md"
testabsresult2,... | explode_data.jsonl/21753 | {
"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,
93347,
39211,
1155,
353,
8840,
836,
8,
1476,
18185,
1192,
16,
1669,
5924,
1314,
18002,
698,
18185,
3435,
1382,
16,
11,
1848,
1669,
26054,
33255,
8623,
1192,
16,
340,
6948,
35699,
1155,
11,
1848,
340,
18185,
3435,
16,
11,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLDFlags(t *testing.T) {
tmpHub, tmpTag := version.DockerInfo.Hub, version.DockerInfo.Tag
defer func() {
version.DockerInfo.Hub, version.DockerInfo.Tag = tmpHub, tmpTag
}()
version.DockerInfo.Hub = "testHub"
version.DockerInfo.Tag = "testTag"
l := clog.NewConsoleLogger(os.Stdout, os.Stderr, installerSco... | explode_data.jsonl/47922 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 275
} | [
2830,
3393,
12335,
9195,
1155,
353,
8840,
836,
8,
341,
20082,
19316,
11,
4174,
5668,
1669,
2319,
909,
13659,
1731,
3839,
392,
11,
2319,
909,
13659,
1731,
23676,
198,
16867,
2915,
368,
341,
197,
74954,
909,
13659,
1731,
3839,
392,
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 TestAccAlicloudMnsTopic_basic(t *testing.T) {
var attr ali_mns.TopicAttribute
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckMNSTopicDestroy,
Steps: []resource.TestStep{
{
Config: testAccMNSTopicConfig,
... | explode_data.jsonl/7448 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 416
} | [
2830,
3393,
14603,
32,
415,
52178,
44,
4412,
26406,
34729,
1155,
353,
8840,
836,
8,
1476,
2405,
6376,
18991,
717,
4412,
98354,
3907,
271,
50346,
8787,
1155,
11,
5101,
31363,
515,
197,
197,
4703,
3973,
25,
257,
2915,
368,
314,
1273,
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 TestPurgeByHeight(t *testing.T) {
// Scenario: commit 3000 blocks and ensure that PurgeByHeight is called
// at commit of blocks 2000 and 3000 with values of max block to retain of 1000 and 2000
peerSelfSignedData := common.SignedData{}
cs := createcollectionStore(peerSelfSignedData).thatAcceptsAll()
var pur... | explode_data.jsonl/36188 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 565
} | [
2830,
3393,
47,
39823,
1359,
3640,
1155,
353,
8840,
836,
8,
341,
197,
322,
58663,
25,
5266,
220,
18,
15,
15,
15,
10010,
323,
5978,
429,
14532,
709,
1359,
3640,
374,
2598,
198,
197,
322,
518,
5266,
315,
10010,
220,
17,
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 TestGetSenderServiceTagMetrics(t *testing.T) {
resetAggregator()
InitAggregator(nil, "testhostname")
senderMetricSampleChan := make(chan senderMetricSample, 10)
serviceCheckChan := make(chan metrics.ServiceCheck, 10)
eventChan := make(chan metrics.Event, 10)
bucketChan := make(chan senderHistogramBucket, 10... | explode_data.jsonl/78299 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 408
} | [
2830,
3393,
1949,
20381,
1860,
5668,
27328,
1155,
353,
8840,
836,
8,
341,
70343,
9042,
58131,
741,
98762,
9042,
58131,
27907,
11,
330,
1944,
27806,
5130,
1903,
1659,
54310,
17571,
46019,
1669,
1281,
35190,
4646,
54310,
17571,
11,
220,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFinalizers(t *testing.T) {
testCases := []struct {
name string
original sets.String
add bool
want sets.String
}{
{
name: "empty, add",
original: sets.NewString(),
add: true,
want: sets.NewString(finalizerName),
}, {
name: "empty, delete",
original: ... | explode_data.jsonl/24646 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 622
} | [
2830,
3393,
19357,
12230,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
197,
9889,
7289,
6431,
198,
197,
12718,
414,
1807,
198,
197,
50780,
257,
7289,
6431,
198,
197,
59403,
197,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestDHCPv4EncodeRequest(t *testing.T) {
dhcp := &DHCPv4{Operation: DHCPOpRequest, HardwareType: LinkTypeEthernet, Xid: 0x12345678,
ClientIP: net.IP{0, 0, 0, 0}, YourClientIP: net.IP{0, 0, 0, 0}, NextServerIP: net.IP{0, 0, 0, 0}, RelayAgentIP: net.IP{0, 0, 0, 0},
ClientHWAddr: net.HardwareAddr{0x12, 0x34, 0x56... | explode_data.jsonl/75879 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 607
} | [
2830,
3393,
51326,
7123,
85,
19,
32535,
1900,
1155,
353,
8840,
836,
8,
341,
2698,
62169,
1669,
609,
51326,
7123,
85,
19,
90,
8432,
25,
422,
22455,
2045,
79,
1900,
11,
36765,
929,
25,
5948,
929,
98006,
11,
1599,
307,
25,
220,
15,
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... | 2 |
func TestCdlProofRandValues(t *testing.T) {
curve := btcec.S256()
pi := tt.B10("6919475104087045887060618372655543590908678853538769938966951413117079143045707486775047358974010153856370915135629934162516525216344310189740955145228611758422996981357148321737126647081976850326418190385865500244512186485501805083008622... | explode_data.jsonl/25751 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 916
} | [
2830,
3393,
34,
8736,
31076,
56124,
6227,
1155,
353,
8840,
836,
8,
341,
33209,
586,
1669,
19592,
68955,
808,
17,
20,
21,
741,
197,
2493,
1669,
17853,
1785,
16,
15,
445,
21,
24,
16,
24,
19,
22,
20,
16,
15,
19,
15,
23,
22,
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... | 3 |
func TestUpgrade(t *testing.T) {
tests := []struct {
description string
yaml string
expected string
}{
{
description: "no helm deploy",
yaml: `apiVersion: skaffold/v2beta12
kind: Config
build:
artifacts:
- image: gcr.io/k8s-skaffold/skaffold-example
docker:
dockerfile: path/to/Do... | explode_data.jsonl/78923 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1046
} | [
2830,
3393,
43861,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
42407,
914,
198,
197,
14522,
9467,
286,
914,
198,
197,
42400,
262,
914,
198,
197,
59403,
197,
197,
515,
298,
42407,
25,
330,
2152,
33765,
10517,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDetectMode(t *testing.T) {
c11input := "Some blunders and absurdities no doubt crept in Some blunders and absurdities, no doubt crept in"
c11output := RandomlyEncrypt([]byte(c11input))
if DetectMode(c11output.ciphertext) != c11output.mode {
t.Fail()
}
} | explode_data.jsonl/10794 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
57193,
3636,
1155,
353,
8840,
836,
8,
341,
1444,
16,
16,
1355,
1669,
330,
8373,
1501,
31009,
323,
31577,
1361,
902,
10492,
1884,
417,
304,
4329,
1501,
31009,
323,
31577,
1361,
11,
902,
10492,
1884,
417,
304,
1837,
1444,
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... | 2 |
func Test_Dao(t *testing.T) {
var err error
d := New(nil)
Convey("set cache", t, func() {
PromError("")
PromInfo("")
err = d.SendSMS("")
So(err, ShouldBeNil)
})
} | explode_data.jsonl/76127 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
1557,
3441,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
2698,
1669,
1532,
27907,
340,
93070,
5617,
445,
746,
6500,
497,
259,
11,
2915,
368,
341,
197,
10025,
441,
1454,
31764,
197,
10025,
441,
1731,
31764,
197,
985... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEngine_OpenClose(t *testing.T) {
engine := NewDefaultEngine()
engine.MustOpen()
if err := engine.Close(); err != nil {
t.Fatal(err)
}
if err := engine.Open(context.Background()); err != nil {
t.Fatal(err)
}
if err := engine.Close(); err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/5988 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
4571,
51747,
7925,
1155,
353,
8840,
836,
8,
341,
80118,
1669,
1532,
3675,
4571,
741,
80118,
50463,
5002,
2822,
743,
1848,
1669,
4712,
10421,
2129,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
743,
1848,
1669,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestPlainGenomeWriter_WriteGenome_writeError(t *testing.T) {
errorWriter := ErrorWriter(1)
wr, err := NewGenomeWriter(bufio.NewWriter(&errorWriter), PlainGenomeEncoding)
require.NoError(t, err)
require.NotNil(t, wr)
gnome := buildTestGenome(1)
err = wr.WriteGenome(gnome)
assert.EqualError(t, err, alwaysErr... | explode_data.jsonl/18937 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
26982,
9967,
635,
6492,
31825,
9967,
635,
9165,
1454,
1155,
353,
8840,
836,
8,
341,
18290,
6492,
1669,
4600,
6492,
7,
16,
340,
6692,
81,
11,
1848,
1669,
1532,
9967,
635,
6492,
10731,
815,
7121,
6492,
2099,
841,
6492,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDecodeProduceReqV7(t *testing.T) {
bytes := testHex2Bytes(t, "00000002006d5f5f5f546573744b61666b6150726f647563655f696e5f676f5f64656d6f5f64656d6f5f6b61666b612e746573744068657a68616e676a69616e64654d6163426f6f6b2d50726f2e6c6f63616c20286769746875622e636f6d2f7365676d656e74696f2f6b61666b612d676f29ffffffff00000f9a00... | explode_data.jsonl/59645 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 845
} | [
2830,
3393,
32564,
1336,
13373,
27234,
53,
22,
1155,
353,
8840,
836,
8,
341,
70326,
1669,
1273,
20335,
17,
7078,
1155,
11,
330,
15,
15,
15,
15,
15,
15,
15,
17,
15,
15,
21,
67,
20,
69,
20,
69,
20,
69,
20,
19,
21,
20,
22,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAllAlbum(t *testing.T) {
Convey("get AllAlbum", t, func() {
_, _, err := dao.AllAlbum(ctx(), 27515258, 20)
err = nil
So(err, ShouldBeNil)
})
} | explode_data.jsonl/51615 | {
"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,
2403,
32378,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
455,
2009,
32378,
497,
259,
11,
2915,
368,
341,
197,
197,
6878,
8358,
1848,
1669,
24775,
16764,
32378,
7502,
1507,
220,
17,
22,
20,
16,
20,
17,
20,
23,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestMain(t *testing.T) {
tc := testutil.SystemTest(t)
ctx := context.Background()
bucketName = "cloud-samples-data/media/"
slateURI = "https://storage.googleapis.com/" + bucketName + "ForBiggerEscapes.mp4"
updatedSlateURI = "https://storage.googleapis.com/" + bucketName + "ForBiggerJoyrides.mp4"
// Get the... | explode_data.jsonl/56003 | {
"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,
6202,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
1273,
1314,
16620,
2271,
1155,
340,
20985,
1669,
2266,
19047,
2822,
2233,
11152,
675,
284,
330,
12361,
1331,
4023,
13945,
29506,
29555,
1903,
5075,
10301,
284,
330,
2428,
1110,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResetTimeoutPrecommitUponNewHeight(t *testing.T) {
config := configSetup(t)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
cs1, vss := makeState(ctx, t, makeStateArgs{config: config})
cs1.state.ConsensusParams.Timeout.BypassCommitTimeout = false
vs2, vs3, vs4 := vss[1], vss[2], ... | explode_data.jsonl/54291 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 820
} | [
2830,
3393,
14828,
7636,
4703,
17413,
49284,
3564,
3640,
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,
71899,
16,
11,
348,
778,
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 TestCorruptDB_MissingManifest(t *testing.T) {
rnd := rand.New(rand.NewSource(0x0badda7a))
h := newDbCorruptHarnessWopt(t, &opt.Options{
BlockCacheCapacity: 100,
Strict: opt.StrictJournalChecksum,
WriteBuffer: 1000 * 60,
})
defer h.close()
h.build(1000)
h.compactMem()
h.buildShuffle... | explode_data.jsonl/45793 | {
"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,
10580,
6585,
3506,
1245,
13577,
38495,
1155,
353,
8840,
836,
8,
341,
7000,
303,
1669,
10382,
7121,
37595,
7121,
3608,
7,
15,
87,
15,
65,
718,
64,
22,
64,
1171,
9598,
1669,
501,
7994,
10580,
6585,
74248,
54,
2912,
1155,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestExtractTarOverwrite(t *testing.T) {
if !sys.HasChrootCapability() {
t.Skipf("chroot capability not available. Disabling test.")
}
tmpdir, err := ioutil.TempDir("", "rkt-temp-dir")
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
defer os.RemoveAll(tmpdir)
entries := []*testTarEntry{
{
... | explode_data.jsonl/51019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1954
} | [
2830,
3393,
28959,
62733,
1918,
4934,
1155,
353,
8840,
836,
8,
341,
743,
753,
7791,
16152,
1143,
2888,
63746,
368,
341,
197,
3244,
57776,
69,
445,
331,
2888,
22302,
537,
2500,
13,
4093,
18768,
1273,
13053,
197,
630,
20082,
3741,
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... | 9 |
func TestKustomize2AppSource(t *testing.T) {
patchLabelMatchesFor := func(kind string) func(app *Application) {
return func(app *Application) {
name := "k2-patched-guestbook-ui-deploy1"
labelValue, err := fixture.Run(
"", "kubectl", "-n="+fixture.DeploymentNamespace(),
"get", kind, name,
"-ojsonpa... | explode_data.jsonl/37131 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 542
} | [
2830,
3393,
42,
1450,
551,
17,
2164,
3608,
1155,
353,
8840,
836,
8,
1476,
3223,
754,
2476,
42470,
2461,
1669,
2915,
62697,
914,
8,
2915,
11462,
353,
4988,
8,
341,
197,
853,
2915,
11462,
353,
4988,
8,
341,
298,
11609,
1669,
330,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_DhcpOptionsARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
parameters := gopter.DefaultTestParameters()
parameters.MaxSize = 10
properties := gopter.NewProperties(parameters)
properties.Property(
"Round trip of DhcpOptionsARM via JSON returns original",
prop.ForAll(RunJSONSerializationTes... | explode_data.jsonl/2899 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
1557,
62169,
3798,
17911,
62,
4498,
77521,
78967,
98054,
2848,
4756,
2121,
2993,
1155,
353,
8840,
836,
8,
341,
67543,
1669,
728,
73137,
13275,
2271,
9706,
741,
67543,
14535,
1695,
284,
220,
16,
15,
198,
86928,
1669,
728,
731... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFlowAddresses(t *testing.T) {
flow1Desc, err := policydb.GetFlowDescriptionFromFlowString("permit in ip from 1.1.1.0/28 to any")
assert.NoError(t, err)
flow1 := flow1Desc.Match
assert.Equal(t, flow1.IpSrc.Address, []byte("1.1.1.0/28"))
assert.Equal(t, flow1.IpDst, (*protos.IPAddress)(nil))
flow2Desc, er... | explode_data.jsonl/76965 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1032
} | [
2830,
3393,
18878,
52290,
1155,
353,
8840,
836,
8,
341,
1166,
10303,
16,
11065,
11,
1848,
1669,
4842,
1999,
2234,
18878,
5009,
3830,
18878,
703,
445,
39681,
304,
5997,
504,
220,
16,
13,
16,
13,
16,
13,
15,
14,
17,
23,
311,
894,
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 TestMessageExportSettingsIsValidActiance(t *testing.T) {
fs := &FileSettings{
DriverName: NewString("foo"), // bypass file location check
}
mes := &MessageExportSettings{
EnableExport: NewBool(true),
ExportFormat: NewString(COMPLIANCE_EXPORT_TYPE_ACTIANCE),
ExportFromTimestamp: NewInt64(0)... | explode_data.jsonl/50686 | {
"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,
2052,
16894,
6086,
55470,
2414,
5284,
1155,
353,
8840,
836,
8,
341,
53584,
1669,
609,
1703,
6086,
515,
197,
10957,
5469,
675,
25,
1532,
703,
445,
7975,
3975,
442,
30718,
1034,
3728,
1779,
198,
197,
532,
2109,
288,
1669,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_NodeExists_Positive_NodeDoesntExist(t *testing.T) {
// Arrange
volumePluginMgr, _ := controllervolumetesting.GetTestVolumePluginMgr((t))
dsw := NewDesiredStateOfWorld(volumePluginMgr)
nodeName := "node-name"
dsw.AddNode(nodeName)
// Act
nodeExists := dsw.NodeExists(nodeName)
// Assert
if !nodeExist... | explode_data.jsonl/40749 | {
"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,
41340,
15575,
44246,
3404,
41340,
21468,
406,
25613,
1155,
353,
8840,
836,
8,
341,
197,
322,
40580,
198,
5195,
4661,
11546,
25567,
11,
716,
1669,
683,
1100,
648,
1132,
57824,
287,
2234,
2271,
18902,
11546,
25567,
1188,
83,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPatchsetApply(t *testing.T) {
conn, s := fillSession(t)
defer func() {
if s != nil {
s.Delete()
}
if err := conn.Close(); err != nil {
t.Error(err)
}
}()
var rowCountBefore int
fn := func(stmt *sqlite.Stmt) error {
rowCountBefore = stmt.ColumnInt(0)
return nil
}
if err := sqlitex.Exec... | explode_data.jsonl/35696 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 955
} | [
2830,
3393,
43622,
746,
28497,
1155,
353,
8840,
836,
8,
341,
32917,
11,
274,
1669,
5155,
5283,
1155,
340,
16867,
2915,
368,
341,
197,
743,
274,
961,
2092,
341,
298,
1903,
18872,
741,
197,
197,
532,
197,
743,
1848,
1669,
4534,
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... | 3 |
func TestMatHconcat(t *testing.T) {
src := NewMatWithSize(10, 10, MatTypeCV32F)
defer src.Close()
dst := NewMat()
defer dst.Close()
Hconcat(src, src, &dst)
if dst.Empty() {
t.Error("TestMatHconcat dst should not be empty.")
}
if dst.Cols() != 2*src.Cols() {
t.Error("TestMatHconcat dst.Cols should be 2 x ... | explode_data.jsonl/81744 | {
"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,
11575,
39,
20164,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
1532,
11575,
2354,
1695,
7,
16,
15,
11,
220,
16,
15,
11,
6867,
929,
19589,
18,
17,
37,
340,
16867,
2286,
10421,
2822,
52051,
1669,
1532,
11575,
741,
16867,
106... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContext_ClientIP(t *testing.T) {
a := assert.New(t, false)
w := httptest.NewRecorder()
r, err := http.NewRequest(http.MethodPost, "/path", nil)
a.NotError(err).NotNil(r)
ctx := newServer(a, nil).NewContext(w, r)
a.Equal(ctx.ClientIP(), r.RemoteAddr)
r, err = http.NewRequest(http.MethodPost, "/path", n... | explode_data.jsonl/34206 | {
"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,
1972,
46102,
3298,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
11,
895,
340,
6692,
1669,
54320,
70334,
7121,
47023,
2822,
7000,
11,
1848,
1669,
1758,
75274,
19886,
20798,
4133,
11,
3521,
2343,
497,
2092,
340... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHotSpotReconnect(t *testing.T) {
s1 := RunServerOnPort(1222)
defer s1.Shutdown()
var srvrs string
if runtime.GOOS == "windows" {
srvrs = strings.Join(testServers[:5], ",")
} else {
srvrs = servers
}
numClients := 32
clients := []*nats.Conn{}
wg := &sync.WaitGroup{}
wg.Add(numClients)
opts :=... | explode_data.jsonl/1553 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 640
} | [
2830,
3393,
20170,
47049,
693,
6459,
1155,
353,
8840,
836,
8,
341,
1903,
16,
1669,
6452,
5475,
1925,
7084,
7,
16,
17,
17,
17,
340,
16867,
274,
16,
10849,
18452,
2822,
2405,
43578,
5428,
914,
198,
743,
15592,
97574,
3126,
621,
330,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNotReportingAlreadyFixed(t *testing.T) {
c := NewCtx(t)
defer c.Close()
// Upload a crash report.
build := testBuild(1)
c.client2.UploadBuild(build)
crash := testCrashWithRepro(build, 1)
c.client2.ReportCrash(crash)
c.client2.pollEmailBug()
// Receive the JobBisectCause.
resp := c.client2.pollJobs(... | explode_data.jsonl/51145 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1042
} | [
2830,
3393,
2623,
70131,
38370,
13520,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
23684,
1155,
340,
16867,
272,
10421,
2822,
197,
322,
24996,
264,
9920,
1895,
624,
69371,
1669,
1273,
11066,
7,
16,
340,
1444,
6581,
17,
86597,
11066,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestManageBuyOfferNewOffer(t *testing.T) {
kp0 := newKeypair0()
kp1 := newKeypair1()
sourceAccount := NewSimpleAccount(kp1.Address(), int64(41137196761092))
buyOffer := ManageBuyOffer{
Selling: NativeAsset{},
Buying: CreditAsset{"ABCD", kp0.Address()},
Amount: "100",
Price: "0.01",
OfferID: 0,
... | explode_data.jsonl/20687 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 513
} | [
2830,
3393,
33076,
17482,
39462,
3564,
39462,
1155,
353,
8840,
836,
8,
341,
16463,
79,
15,
1669,
501,
6608,
1082,
1310,
15,
741,
16463,
79,
16,
1669,
501,
6608,
1082,
1310,
16,
741,
47418,
7365,
1669,
1532,
16374,
7365,
5969,
79,
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 TestAddPVCToDeploymentConfig(t *testing.T) {
type args struct {
dc *appsv1.DeploymentConfig
pvc string
path string
}
tests := []struct {
name string
args args
wantErr bool
}{
{
name: "Test case 1: valid dc",
args: args{
dc: &appsv1.DeploymentConfig{
Spec: appsv1.Deployment... | explode_data.jsonl/65140 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1891
} | [
2830,
3393,
2212,
48469,
1162,
78,
75286,
2648,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
87249,
256,
353,
676,
3492,
16,
34848,
39130,
2648,
198,
197,
3223,
7362,
220,
914,
198,
197,
26781,
914,
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... | 2 |
func TestInitializeCloudProviderRateLimitConfigWithReadAndWriteRateLimitAlreadySetInConfig(t *testing.T) {
var rateLimitReadQPS float32 = 3.0
rateLimitReadBuckets := 10
var rateLimitWriteQPS float32 = 6.0
rateLimitWriteBuckets := 20
configWithRateLimits := &CloudProviderRateLimitConfig{
RateLimitConfig: azclien... | explode_data.jsonl/12802 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 495
} | [
2830,
3393,
9928,
16055,
5179,
11564,
16527,
2648,
2354,
4418,
3036,
7985,
11564,
16527,
38370,
1649,
641,
2648,
1155,
353,
8840,
836,
8,
341,
2405,
4379,
16527,
4418,
48,
5012,
2224,
18,
17,
284,
220,
18,
13,
15,
198,
7000,
349,
1652... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetStakingRewards(t *testing.T) {
if !areTestAPIKeysSet() {
t.Skip("skipping test, api keys not set")
}
_, err := f.GetStakingRewards(context.Background())
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/15256 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 84
} | [
2830,
3393,
1949,
623,
1765,
58465,
2347,
1155,
353,
8840,
836,
8,
341,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
11,
6330,
6894,
537,
738,
1138,
197,
532,
197,
6878,
1848,
1669,
282,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEntryResetSetData(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
e, lists, now := testEntry(ctrl, testEntryOptions{})
require.False(t, e.closed)
require.Equal(t, int64(0), e.rateLimiter.Limit())
require.False(t, e.hasDefaultMetadatas)
require.Equal(t, int64(uninitializedCutoverNan... | explode_data.jsonl/24204 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
5874,
14828,
1649,
1043,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
7727,
11,
11469,
11,
1431,
1669,
1273,
5874,
62100,
11,
1273,
5874,
3798,
6257,
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... | 1 |
func TestNasTypeRequestedNSSAIGetSetIei(t *testing.T) {
a := nasType.NewRequestedNSSAI(nasMessage.RegistrationRequestRequestedNSSAIType)
for _, table := range nasTypeAuthenticationResultRequestedNSSAITable {
a.SetIei(table.in)
assert.Equal(t, table.out, a.GetIei())
}
} | explode_data.jsonl/38092 | {
"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,
45,
300,
929,
37630,
53302,
32,
1914,
295,
1649,
40,
19972,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
17141,
929,
7121,
37630,
53302,
15469,
1445,
300,
2052,
8989,
4048,
1900,
37630,
53302,
15469,
929,
340,
2023,
8358,
1965... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigGetConfiguredProvider(t *testing.T) {
assert := assert.New(t)
c, _ := NewConfig([]string{})
// Should be able to get "google" default provider
p, err := c.GetConfiguredProvider("google")
assert.Nil(err)
assert.Equal(&c.Providers.Google, p)
// Should fail to get valid "oidc" provider as it's not ... | explode_data.jsonl/33763 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 161
} | [
2830,
3393,
2648,
1949,
2648,
3073,
5179,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
1444,
11,
716,
1669,
1532,
2648,
10556,
917,
6257,
692,
197,
322,
12260,
387,
2952,
311,
633,
330,
17485,
1,
1638,
9109,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCloneNEWUSERAndRemapNoRootDisableSetgroups(t *testing.T) {
if os.Getuid() == 0 {
t.Skip("skipping unprivileged user only test")
}
testNEWUSERRemap(t, os.Getuid(), os.Getgid(), false)
} | explode_data.jsonl/36115 | {
"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,
37677,
20594,
6448,
3036,
6590,
391,
2753,
8439,
25479,
1649,
16753,
1155,
353,
8840,
836,
8,
341,
743,
2643,
2234,
2423,
368,
621,
220,
15,
341,
197,
3244,
57776,
445,
4886,
5654,
650,
97288,
1196,
1172,
1273,
1138,
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
] | 2 |
func TestOCMProvider_ScaleUp(t *testing.T) {
type fields struct {
ocmClient ocm.Client
}
type args struct {
clusterSpec *types.ClusterSpec
increment int
}
internalId := "test-internal-id"
spec := &types.ClusterSpec{
InternalID: internalId,
ExternalID: "",
Status: "",
AdditionalIn... | explode_data.jsonl/4836 | {
"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,
7612,
44,
5179,
1098,
2246,
2324,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
509,
76,
2959,
297,
6226,
11716,
198,
197,
532,
13158,
2827,
2036,
341,
197,
197,
18855,
8327,
353,
9242,
72883,
8327,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_PrintFloat64(t *testing.T) {
cases := []float64{
1.1, 1.2, 1.3, 1.4, 1.5,
}
for _, c := range cases {
output := Print(c)
assert.Equal(t, fmt.Sprintf("%+v\n", c), output)
}
} | explode_data.jsonl/43707 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
45788,
5442,
21,
19,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
3649,
21,
19,
515,
197,
197,
16,
13,
16,
11,
220,
16,
13,
17,
11,
220,
16,
13,
18,
11,
220,
16,
13,
19,
11,
220,
16,
13,
20,
345,
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 TestClient_BatchQueryComment(t *testing.T) {
// 初始化参数结构体
bm := make(gopay.BodyMap)
bm.Set("nonce_str", util.GetRandomString(32)).
Set("sign_type", SignType_HMAC_SHA256).
Set("begin_time", "20190120000000").
Set("end_time", "20190122174000").
Set("offset", "0")
// 请求拉取订单评价数据,成功后得到结果,沙箱环境下,证书路径参数可传nil
... | explode_data.jsonl/56608 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 303
} | [
2830,
3393,
2959,
1668,
754,
2859,
10677,
1155,
353,
8840,
836,
8,
341,
197,
322,
76090,
32665,
100166,
31914,
198,
2233,
76,
1669,
1281,
3268,
453,
352,
20934,
2227,
340,
2233,
76,
4202,
445,
39593,
2895,
497,
4094,
2234,
13999,
703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequestWrongOkCode(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "OK")
// Returns 200 OK
}))
defer ts.Close()
p := &gophercloud.ProviderClient{}
_, err := p.Request("DELETE", ts.URL, &gophercloud.RequestOpts{})
th.AssertErr(... | explode_data.jsonl/5901 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 250
} | [
2830,
3393,
1900,
29185,
11578,
2078,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
11009,
991,
33655,
3622,
11,
330,
3925,
1138,
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 TestKeySizeList(t *testing.T) {
s := dbNumStrFull + "=" + listKeys[0]
e, _ := NewRedisExporter(os.Getenv("TEST_REDIS_URI"), Options{Namespace: "test", CheckSingleKeys: s})
setupDBKeys(t, os.Getenv("TEST_REDIS_URI"))
defer deleteKeysFromDB(t, os.Getenv("TEST_REDIS_URI"))
chM := make(chan prometheus.Metric)
... | explode_data.jsonl/46991 | {
"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,
1592,
1695,
852,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
2927,
4651,
2580,
9432,
488,
36234,
488,
1140,
8850,
58,
15,
921,
7727,
11,
716,
1669,
1532,
48137,
88025,
9638,
64883,
445,
10033,
2192,
21202,
23116,
3975,
14566,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSortComparatorReturnValueFloats(t *testing.T) {
const SCRIPT = `
var a = [
5.97,
9.91,
4.13,
9.28,
3.29,
];
a.sort( function(a, b) { return a - b; } );
for (var i = 1; i < a.length; i++) {
if (a[i] < a[i-1]) {
throw new Error("Array is not sorted: " + a);
}
}
`
testScript1(SCRIPT, _und... | explode_data.jsonl/10491 | {
"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,
10231,
38658,
40426,
5442,
82,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
2405,
264,
284,
2278,
197,
197,
20,
13,
24,
22,
345,
197,
197,
24,
13,
24,
16,
345,
197,
197,
19,
13,
16,
18,
345,
197,
197,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNodeIgnored(t *testing.T) {
fnh := &testutil.FakeNodeHandler{
Existing: []*v1.Node{
{
ObjectMeta: metav1.ObjectMeta{
Name: "node0",
CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
},
Status: v1.NodeStatus{
Conditions: []v1.NodeCondition{
{
... | explode_data.jsonl/20608 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 816
} | [
2830,
3393,
1955,
43337,
3018,
1155,
353,
8840,
836,
8,
341,
1166,
16719,
1669,
609,
1944,
1314,
991,
726,
1955,
3050,
515,
197,
197,
53067,
25,
29838,
85,
16,
21714,
515,
298,
197,
515,
571,
23816,
12175,
25,
77520,
16,
80222,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestTimeToExcelTime(t *testing.T) {
for i, test := range trueExpectedDateList {
t.Run(fmt.Sprintf("TestData%d", i+1), func(t *testing.T) {
excelTime, err := timeToExcelTime(test.GoValue)
assert.NoError(t, err)
assert.Equalf(t, test.ExcelValue, excelTime,
"Time: %s", test.GoValue.String())
})
}
} | explode_data.jsonl/47263 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 141
} | [
2830,
3393,
1462,
1249,
20055,
1462,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1273,
1669,
2088,
830,
18896,
1916,
852,
341,
197,
3244,
16708,
28197,
17305,
445,
83920,
14841,
497,
600,
10,
16,
701,
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 TestNewScrapePool(t *testing.T) {
var (
app = &nopAppendable{}
cfg = &config.ScrapeConfig{}
sp, _ = newScrapePool(cfg, app, 0, nil)
)
if a, ok := sp.appendable.(*nopAppendable); !ok || a != app {
t.Fatalf("Wrong sample appender")
}
if sp.config != cfg {
t.Fatalf("Wrong scrape config")
}
if sp... | explode_data.jsonl/56111 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
3564,
3326,
19842,
10551,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
28236,
256,
284,
609,
62813,
23877,
480,
16094,
197,
50286,
256,
284,
609,
1676,
18326,
19842,
2648,
16094,
197,
41378,
11,
716,
284,
501,
3326,
19842,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDownloadURLWithTooLargeTimeoutAndMissingAssetIDShouldReturnProperResponse(t *testing.T) {
rec := httptest.NewRecorder()
req, err := http.NewRequest(constants.RequestMethodGet,
fmt.Sprintf("%s?id=%s&timeout=111013", constants.AssetsURL, constants.MockID), nil)
require.NoError(t, err)
db := &test.MockD... | explode_data.jsonl/34293 | {
"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,
1949,
11377,
3144,
2354,
31246,
34253,
7636,
3036,
25080,
16604,
915,
14996,
5598,
1336,
712,
2582,
1155,
353,
8840,
836,
8,
341,
67904,
1669,
54320,
70334,
7121,
47023,
741,
24395,
11,
1848,
1669,
1758,
75274,
80368,
68940,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsValidClusterID(t *testing.T) {
var err error
err = isValidClusterID("valid-cluster")
if err != nil {
t.Error("unexpected an error: ", err)
}
err = isValidClusterID("valid-cluster01")
if err != nil {
t.Error("unexpected an error: ", err)
}
err = isValidClusterID("")
if err == nil {
t.Error("... | explode_data.jsonl/10036 | {
"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,
55470,
28678,
915,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
271,
9859,
284,
26171,
28678,
915,
445,
1891,
93208,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
445,
53859,
458,
1465,
25,
3670,
1848,
340,
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... | 7 |
func TestExpandCommandAndArgs(t *testing.T) {
cases := []struct {
name string
container *v1.Container
envs []EnvVar
expectedCommand []string
expectedArgs []string
}{
{
name: "none",
container: &v1.Container{},
},
{
name: "command expanded",
container: &v... | explode_data.jsonl/18699 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 951
} | [
2830,
3393,
38946,
4062,
3036,
4117,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
53290,
981,
353,
85,
16,
33672,
198,
197,
57538,
82,
310,
3056,
14359,
3962,
198,
197,
42400,
4062,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileCustomNonComplianceMessage(t *testing.T) {
testCases := []struct {
desc string
fileCheck *ipb.FileCheck
expectedResult *apb.ComplianceResult
}{
{
desc: "Custom message",
fileCheck: &ipb.FileCheck{
FilesToCheck: []*ipb.FileSet{testconfigcreator.SingleFileWithPath(testF... | explode_data.jsonl/24466 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1101
} | [
2830,
3393,
1703,
10268,
8121,
1092,
31612,
2052,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
1843,
914,
198,
197,
17661,
3973,
414,
353,
573,
65,
8576,
3973,
198,
197,
42400,
2077,
353,
391,
65,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientV1UnlockRangeReentrant(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
wg := &sync.WaitGroup{}
ch1 := make(chan *cdcpb.ChangeDataEvent, 10)
srv1 := newMockChangeDataService(t, ch1)
server1, addr1 := newMockService(ctx, t, srv1, wg)
rpcClient, cluster, pdClient, err := test... | explode_data.jsonl/32882 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 915
} | [
2830,
3393,
2959,
53,
16,
49679,
6046,
693,
69558,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
72079,
1669,
609,
12996,
28384,
2808,
31483,
23049,
16,
1669,
1281,
35190,
353,
4385,
4672,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCreateHandleSingle(t *testing.T) {
app := cli.NewApp()
flagset := flag.NewFlagSet("flags", 1)
flagset.String("name", "", "")
flagset.Set("name", "server1")
c := cli.NewContext(app, flagset, nil)
cmd := &commandCreate{
Ctx: &handler.Context{
CLIContext: c,
},
}
expected := &handler.Resource{
Pa... | explode_data.jsonl/75791 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 283
} | [
2830,
3393,
4021,
6999,
10888,
1155,
353,
8840,
836,
8,
341,
28236,
1669,
21348,
7121,
2164,
741,
30589,
746,
1669,
5181,
7121,
12135,
1649,
445,
11161,
497,
220,
16,
340,
30589,
746,
6431,
445,
606,
497,
7342,
14676,
30589,
746,
4202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNative_Compile_StepsPipelineTemplate(t *testing.T) {
// setup context
gin.SetMode(gin.TestMode)
resp := httptest.NewRecorder()
_, engine := gin.CreateTestContext(resp)
// setup mock server
engine.GET("/api/v3/repos/foo/bar/contents/:path", func(c *gin.Context) {
c.Header("Content-Type", "application/... | explode_data.jsonl/24134 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2994
} | [
2830,
3393,
20800,
16946,
12192,
62,
33951,
34656,
7275,
1155,
353,
8840,
836,
8,
341,
197,
322,
6505,
2266,
198,
3174,
258,
4202,
3636,
3268,
258,
8787,
3636,
692,
34653,
1669,
54320,
70334,
7121,
47023,
741,
197,
6878,
4712,
1669,
461... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeriveKey(t *testing.T) {
if err := key.DeriveKey(&password); err != nil {
t.Errorf("unexpected DeriveKey key failure: %v", err)
}
} | explode_data.jsonl/17471 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 56
} | [
2830,
3393,
22171,
533,
1592,
1155,
353,
8840,
836,
8,
341,
743,
1848,
1669,
1376,
909,
261,
533,
1592,
2099,
3833,
1215,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
53859,
12741,
533,
1592,
1376,
7901,
25,
1018,
85,
497,
1848,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestTabletServerCommiRollbacktFail(t *testing.T) {
db, tsv := setupTabletServerTest(t, "")
defer tsv.StopService()
defer db.Close()
target := querypb.Target{TabletType: topodatapb.TabletType_PRIMARY}
_, err := tsv.Commit(ctx, &target, -1)
want := "transaction -1: not found"
require.Equal(t, want, err.Error... | explode_data.jsonl/79990 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
2556,
83,
5475,
1092,
8155,
32355,
1419,
83,
19524,
1155,
353,
8840,
836,
8,
341,
20939,
11,
259,
3492,
1669,
6505,
2556,
83,
5475,
2271,
1155,
11,
14676,
16867,
259,
3492,
30213,
1860,
741,
16867,
2927,
10421,
2822,
28861,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPolynomialRegression(t *testing.T) {
assert := assert.New(t)
var xv []float64
var yv []float64
for i := 0; i < 100; i++ {
xv = append(xv, float64(i))
yv = append(yv, float64(i*i))
}
values := ContinuousSeries{
XValues: xv,
YValues: yv,
}
poly := &PolynomialRegressionSeries{
InnerSeries: v... | explode_data.jsonl/82514 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 215
} | [
2830,
3393,
14658,
25358,
45200,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
2405,
83411,
3056,
3649,
21,
19,
198,
2405,
379,
85,
3056,
3649,
21,
19,
271,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
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... | 3 |
func TestSendRecvLoopbackEFFFullFrame(t *testing.T) {
c, err := New("vcan0")
assert.Nil(t, err)
assert.Nil(t, c.Loopback(true))
assert.Nil(t, c.Send(&canio.Frame{Type: canio.EFF, Id: 0x1fffffff, Data: []byte("\xde\xad\xbe\xef\xca\xfe\xba\xbe")}))
m, err := c.Recv()
assert.Nil(t, err)
assert.Equal(t, canio.EFF,... | explode_data.jsonl/22606 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 240
} | [
2830,
3393,
11505,
63483,
14620,
1419,
54665,
9432,
4369,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
1532,
445,
85,
4814,
15,
1138,
6948,
59678,
1155,
11,
1848,
340,
6948,
59678,
1155,
11,
272,
1214,
47306,
1419,
3715,
4390,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMemory_SignCsr(t *testing.T) {
m := populateCert(t)
wcsr := createWorkloadCSR(t, "spiffe://localhost")
wcert, err := m.SignCsr(&ca.SignCsrRequest{Csr: wcsr})
require.NoError(t, err)
assert.NotEmpty(t, wcert)
} | explode_data.jsonl/73860 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
10642,
1098,
622,
34,
15094,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
30446,
36934,
1155,
692,
6692,
77851,
1669,
1855,
6776,
1078,
70022,
1155,
11,
330,
2154,
43414,
1110,
8301,
5130,
6692,
12246,
11,
1848,
1669,
296,
4115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGatherCryptoQuote(t *testing.T) {
GatherCryptoQuote(&types.Options{
Symbol: "BTC",
}, gocron.Every(10).Seconds())
gocron.Start()
time.Sleep(15 * time.Second)
} | explode_data.jsonl/15045 | {
"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,
38,
1856,
58288,
19466,
1155,
353,
8840,
836,
8,
341,
9600,
1856,
58288,
19466,
2099,
9242,
22179,
515,
197,
7568,
4001,
25,
330,
59118,
756,
197,
2137,
342,
509,
2248,
5142,
1204,
7,
16,
15,
568,
15343,
2398,
3174,
509,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandlersCanSetConnectionClose10(t *testing.T) {
testTCPConnectionCloses(t, "GET / HTTP/1.0\r\nConnection: keep-alive\r\n\r\n", HandlerFunc(func(w ResponseWriter, r *Request) {
w.Header().Set("Connection", "close")
}))
} | explode_data.jsonl/22402 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
39949,
6713,
1649,
4526,
7925,
16,
15,
1155,
353,
8840,
836,
8,
341,
18185,
49896,
4526,
34,
49341,
1155,
11,
330,
3806,
608,
10130,
14,
16,
13,
15,
12016,
1699,
4526,
25,
2506,
18779,
533,
12016,
1699,
12016,
1699,
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 TestTransactionalDeleteNoEtag(t *testing.T) {
s, c := setupMiniredis()
defer s.Close()
ss := &StateStore{
client: c,
json: jsoniter.ConfigFastest,
logger: logger.NewLogger("test"),
}
// Insert a record first.
ss.Set(&state.SetRequest{
Key: "weapon100",
Value: "deathstar100",
})
err := ss.M... | explode_data.jsonl/78642 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 280
} | [
2830,
3393,
31375,
6435,
2753,
36,
4578,
1155,
353,
8840,
836,
8,
341,
1903,
11,
272,
1669,
6505,
6217,
2690,
285,
741,
16867,
274,
10421,
2822,
34472,
1669,
609,
1397,
6093,
515,
197,
25291,
25,
272,
345,
197,
30847,
25,
256,
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... | 1 |
func TestSignupUser(t *testing.T) {
app := newTestApp(t)
// start up a https test server
ts := newTestServer(t, app.routes())
defer ts.Close()
// make a GET /user/signup request
_, _, body := ts.get(t, "/user/signup")
// extract the CSRF token from the response body (html signup form)
csrfToken := extractCSR... | explode_data.jsonl/12760 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 869
} | [
2830,
3393,
56246,
1474,
1155,
353,
8840,
836,
8,
341,
28236,
1669,
501,
2271,
2164,
1155,
692,
197,
322,
1191,
705,
264,
3703,
1273,
3538,
198,
57441,
1669,
501,
2271,
5475,
1155,
11,
906,
39306,
2398,
16867,
10591,
10421,
2822,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_putWorkflowGroupHandler(t *testing.T) {
api, db, router, end := newTestAPI(t, bootstrap.InitiliazeDB)
defer end()
u, pass := assets.InsertAdminUser(api.mustDB())
key := sdk.RandomString(10)
proj := assets.InsertTestProject(t, db, api.Cache, key, key, u)
//First pipeline
pip := sdk.Pipeline{
ProjectI... | explode_data.jsonl/64785 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1105
} | [
2830,
3393,
15557,
62768,
2808,
3050,
1155,
353,
8840,
836,
8,
341,
54299,
11,
2927,
11,
9273,
11,
835,
1669,
501,
2271,
7082,
1155,
11,
26925,
26849,
24078,
2986,
3506,
340,
16867,
835,
741,
10676,
11,
1494,
1669,
11770,
23142,
7210,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNameEncoders(t *testing.T) {
tests := []struct {
name string
expected interface{} // output of encoding InfoLevel
}{
{"", "main"},
{"full", "main"},
{"something-random", "main"},
}
for _, tt := range tests {
var ne NameEncoder
require.NoError(t, ne.UnmarshalText([]byte(tt.name)), "Unexpe... | explode_data.jsonl/51373 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 206
} | [
2830,
3393,
675,
7408,
52498,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
42400,
3749,
6257,
442,
2550,
315,
11170,
13074,
4449,
198,
197,
59403,
197,
197,
4913,
497,
330,
3817,
7115,
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 TestGenerateSecret(t *testing.T) {
user := &model.User{Id: model.NewId(), Roles: "system_user"}
config := model.Config{}
config.SetDefaults()
config.ServiceSettings.EnableMultifactorAuthentication = model.NewBool(true)
configService := testutils.StaticConfigService{Cfg: &config}
t.Run("fail on disabled mfa... | explode_data.jsonl/64308 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 706
} | [
2830,
3393,
31115,
19773,
1155,
353,
8840,
836,
8,
341,
19060,
1669,
609,
2528,
7344,
90,
764,
25,
1614,
7121,
764,
1507,
50907,
25,
330,
8948,
3317,
63159,
25873,
1669,
1614,
10753,
16094,
25873,
4202,
16273,
741,
25873,
13860,
6086,
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 TestGetNodeResourceGroup(t *testing.T) {
tests := []struct {
name string
nodeResourceGroups map[string]string
node string
expected string
informerSynced bool
expectError bool
}{
{
name: "cloud provider configured RG should be returne... | explode_data.jsonl/80296 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 649
} | [
2830,
3393,
1949,
1955,
4783,
2808,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
2290,
914,
198,
197,
20831,
4783,
22173,
2415,
14032,
30953,
198,
197,
20831,
2290,
914,
198,
197,
42400,
1843,
914,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_convertBST(t *testing.T) {
ast := assert.New(t)
for _, tc := range tcs {
fmt.Printf("~~%v~~\n", tc)
root := kit.PreIn2Tree(tc.pre, tc.in)
ans := kit.Tree2Postorder(convertBST(root))
ast.Equal(tc.ansPost, ans)
}
} | explode_data.jsonl/57810 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
34910,
61006,
1155,
353,
8840,
836,
8,
341,
88836,
1669,
2060,
7121,
1155,
692,
2023,
8358,
17130,
1669,
2088,
259,
4837,
341,
197,
11009,
19367,
445,
5817,
4,
85,
5817,
59,
77,
497,
17130,
340,
197,
33698,
1669,
16138,
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 TestBuildTrafficConfiguration_MissingRevision(t *testing.T) {
expected := &Config{
Targets: map[string]RevisionTargets{},
Configurations: map[string]*v1.Configuration{goodConfig.Name: goodConfig},
Revisions: map[string]*v1.Revision{goodNewRev.Name: goodNewRev},
MissingTargets: []corev1.ObjectR... | explode_data.jsonl/17621 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 439
} | [
2830,
3393,
11066,
87229,
7688,
1245,
13577,
33602,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
609,
2648,
515,
197,
197,
49030,
25,
286,
2415,
14032,
60,
33602,
49030,
38837,
197,
66156,
21449,
25,
2415,
14032,
8465,
85,
16,
17334,
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... | 4 |
func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) {
svc := NewInputService1ProtocolTest(nil)
svc.Endpoint = "https://test"
input := &InputService1TestShapeInputShape{
Bar: aws.String("val2"),
Foo: aws.String("val1"),
}
req, _ := svc.InputService1TestCaseOperation1Request(input)
r := req.HTTP... | explode_data.jsonl/53201 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 268
} | [
2830,
3393,
2505,
1860,
16,
20689,
2271,
20639,
24371,
4207,
16,
1155,
353,
8840,
836,
8,
341,
1903,
7362,
1669,
1532,
2505,
1860,
16,
20689,
2271,
27907,
340,
1903,
7362,
90409,
284,
330,
2428,
1110,
1944,
1837,
22427,
1669,
609,
2505,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultiRoutineAccess_logger(t *testing.T) {
// storing address of *Logger instance for validation.
msgArray := make([]string, 0)
// wait-group to make sure a certain number of go-routine(s)
// has finished its task.
var wgroup sync.WaitGroup
for i := 0; i < 10; i++ {
// updates the wait-group counter.
... | explode_data.jsonl/72648 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 417
} | [
2830,
3393,
20358,
73018,
6054,
27413,
1155,
353,
8840,
836,
8,
341,
197,
322,
27572,
2621,
315,
353,
7395,
2867,
369,
10519,
624,
21169,
1857,
1669,
1281,
10556,
917,
11,
220,
15,
692,
197,
322,
3783,
4351,
311,
1281,
2704,
264,
3654... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetup(t *testing.T) {
cfg := config.GetConfig()
cfg.LoadConfig("../../testdata/configtest.json")
hadaxConfig, err := cfg.GetExchangeConfig("HuobiHadax")
if err != nil {
t.Error("Test Failed - HuobiHadax Setup() init error")
}
hadaxConfig.AuthenticatedAPISupport = true
hadaxConfig.APIKey = apiKey
hada... | explode_data.jsonl/24324 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
21821,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
2193,
2234,
2648,
741,
50286,
13969,
2648,
36800,
92425,
14730,
1944,
4323,
1138,
9598,
329,
706,
2648,
11,
1848,
1669,
13286,
2234,
31564,
2648,
445,
81378,
18337,
55468,
706,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandleRealmsCreate(t *testing.T) {
t.Parallel()
ctx := project.TestContext(t)
harness := envstest.NewServerConfig(t, testDatabaseInstance)
c := admin.New(harness.Config, harness.Cacher, harness.Database, harness.AuthProvider, harness.RateLimiter, harness.Renderer)
handler := harness.WithCommonMiddleware... | explode_data.jsonl/53830 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1237
} | [
2830,
3393,
6999,
12768,
1011,
4021,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20985,
1669,
2390,
8787,
1972,
1155,
340,
9598,
23518,
1669,
6105,
267,
477,
7121,
5475,
2648,
1155,
11,
1273,
5988,
2523,
692,
1444,
1669,
3986... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLevelFeeBigByte(t *testing.T) {
q, mem := initEnv(0)
cfg := q.GetConfig()
defer q.Close()
defer mem.Close()
defer func() {
mem.cfg.IsLevelFee = false
}()
mem.cfg.IsLevelFee = true
mem.SetMinFee(100000)
msg0 := mem.client.NewMessage("mempool", types.EventTx, tx1)
mem.client.Send(msg0, true)
resp0, ... | explode_data.jsonl/16838 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1402
} | [
2830,
3393,
4449,
41941,
15636,
7153,
1155,
353,
8840,
836,
8,
341,
18534,
11,
1833,
1669,
2930,
14359,
7,
15,
340,
50286,
1669,
2804,
2234,
2648,
741,
16867,
2804,
10421,
741,
16867,
1833,
10421,
741,
16867,
2915,
368,
341,
197,
14145,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGMC2ManyPoints(test *testing.T) {
var timestamps []int64
var values []float64
for i := 0; i < 10000; i++ {
timestamps = append(timestamps, int64(i*1000))
values = append(values, rand.Float64())
}
gmc := &GroupMemoryChunk2{groupNum: 1, tupleSize: 4}
app, _ := gmc.Appender()
for i := 0; i < len(times... | explode_data.jsonl/36847 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 615
} | [
2830,
3393,
38,
11604,
17,
8441,
11411,
8623,
353,
8840,
836,
8,
341,
2405,
48781,
3056,
396,
21,
19,
198,
2405,
2750,
3056,
3649,
21,
19,
198,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
15,
15,
15,
26,
600,
1027,
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... | 7 |
func TestTakeFromWriteQueue(t *testing.T) {
t.Parallel()
if testing.Short() {
t.SkipNow()
}
sp, sc, cleanup := setup(t, SessionPoolConfig{MaxOpened: 1, WriteSessions: 1.0, MaxIdle: 1})
defer cleanup()
sc.MakeNice()
sh, err := sp.take(context.Background())
if err != nil {
t.Errorf("cannot get session from ... | explode_data.jsonl/78705 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 286
} | [
2830,
3393,
17814,
3830,
7985,
7554,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
7039,
741,
197,
630,
41378,
11,
1136,
11,
21290,
1669,
6505,
1155,
11,
9164,
10551,
2648,
90,
597... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServer_Rejects_Headers0(t *testing.T) {
testServerRejectsConn(t, func(st *serverTester) {
st.fr.AllowIllegalWrites = true
st.writeHeaders(HeadersFrameParam{
StreamID: 0,
BlockFragment: st.encodeHeader(),
EndStream: true,
EndHeaders: true,
})
})
} | explode_data.jsonl/71655 | {
"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,
5475,
50693,
583,
82,
62,
10574,
15,
1155,
353,
8840,
836,
8,
341,
18185,
5475,
78413,
82,
9701,
1155,
11,
2915,
5895,
353,
4030,
58699,
8,
341,
197,
18388,
18798,
29081,
33713,
93638,
284,
830,
198,
197,
18388,
3836,
1057... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAsMongoCriteria(t *testing.T) {
for k := range mgc.OperatorMapping {
statement := &dsc.BaseStatement{
Table: "abc",
SQLCriteria: &dsc.SQLCriteria{
Criteria: []*dsc.SQLCriterion{
{
LeftOperand: "k1",
Operator: k,
RightOperand: "?",
},
},
},
}
criteriaValu... | explode_data.jsonl/53665 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 258
} | [
2830,
3393,
2121,
54998,
12823,
1155,
353,
8840,
836,
8,
341,
2023,
595,
1669,
2088,
13742,
66,
85546,
6807,
341,
197,
89566,
1669,
609,
67,
2388,
13018,
8636,
515,
298,
197,
2556,
25,
330,
13683,
756,
298,
197,
6688,
12823,
25,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestIsSet(t *testing.T) {
v := New()
v.SetConfigType("yaml")
v.ReadConfig(bytes.NewBuffer(yamlExample))
assert.True(t, v.IsSet("clothing.jacket"))
assert.False(t, v.IsSet("clothing.jackets"))
assert.False(t, v.IsSet("helloworld"))
v.Set("helloworld", "fubar")
assert.True(t, v.IsSet("helloworld"))
} | explode_data.jsonl/5577 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
3872,
1649,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
1532,
741,
5195,
4202,
2648,
929,
445,
41466,
1138,
5195,
6503,
2648,
23158,
7121,
4095,
7021,
9467,
13314,
1171,
6948,
32443,
1155,
11,
348,
4506,
1649,
445,
32578,
1596... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAssertable_IsNil(t *testing.T) {
tests := []struct {
name string
actual interface{}
shouldFail bool
}{
{
name: "should assert nil",
actual: nil,
shouldFail: false,
},
{
name: "should assert not nil pointer",
actual: new(interface{}),
shouldFail: tru... | explode_data.jsonl/53645 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 350
} | [
2830,
3393,
8534,
480,
31879,
19064,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
88814,
257,
3749,
16094,
197,
197,
5445,
19524,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
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... | 1 |
func TestChatIsGroup(t *testing.T) {
chat := tgbotapi.Chat{ID: 10, Type: "group"}
if chat.IsGroup() != true {
t.Fail()
}
} | explode_data.jsonl/25810 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 56
} | [
2830,
3393,
15672,
3872,
2808,
1155,
353,
8840,
836,
8,
341,
197,
9686,
1669,
53188,
6331,
2068,
58844,
90,
915,
25,
220,
16,
15,
11,
3990,
25,
330,
4074,
63159,
743,
6236,
4506,
2808,
368,
961,
830,
341,
197,
3244,
57243,
741,
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
] | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.