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 TestGetBoolOption(t *testing.T) {
for _, tc := range []struct {
name string
envName string
exportEnv map[string]string
option string
options map[string]interface{}
defaultValue bool
expected bool
expectedError bool
}{
{
name: "default to false",
... | explode_data.jsonl/63536 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1494
} | [
2830,
3393,
1949,
11233,
5341,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
57538,
675,
981,
914,
198,
197,
59440,
14359,
257,
2415,
14032,
30953,
198,
197,
80845,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExactlyWrapper(t *testing.T) {
assert := New(new(testing.T))
a := float32(1)
b := float64(1)
c := float32(1)
d := float32(2)
if assert.Exactly(a, b) {
t.Error("Exactly should return false")
}
if assert.Exactly(a, d) {
t.Error("Exactly should return false")
}
if !assert.Exactly(a, c) {
t.Error... | explode_data.jsonl/54970 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
65357,
11542,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
1532,
1755,
8623,
287,
836,
4390,
11323,
1669,
2224,
18,
17,
7,
16,
340,
2233,
1669,
2224,
21,
19,
7,
16,
340,
1444,
1669,
2224,
18,
17,
7,
16,
340,
2698,
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... | 6 |
func TestUntarPathWithDestinationSrcFileAsFolder(t *testing.T) {
tmpFolder, err := os.MkdirTemp("", "docker-archive-test")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tmpFolder)
srcFile := filepath.Join(tmpFolder, "src")
tarFile := filepath.Join(tmpFolder, "src.tar")
os.Create(srcFile)
// Translate bac... | explode_data.jsonl/79240 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 481
} | [
2830,
3393,
20250,
277,
1820,
2354,
33605,
20360,
1703,
2121,
13682,
1155,
353,
8840,
836,
8,
341,
20082,
13682,
11,
1848,
1669,
2643,
1321,
12438,
12151,
19814,
330,
28648,
95100,
16839,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateUserMfa(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer th.TearDown()
Client := th.Client
th.App.SetLicense(model.NewTestLicense("mfa"))
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableMultifactorAuthentication = true })
session, _ := th.App.GetSession(C... | explode_data.jsonl/21543 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
4289,
1474,
44,
3632,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
1005,
3803,
2320,
7210,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
271,
70479,
5105,
4202,
9827,
7635,
7121,
2271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_getFirstColumn(t *testing.T) {
testCases := []struct {
name string
fileContent string
want []string
wantErr bool
}{
{
name: "valid content",
fileContent: `libiscsi_tcp 28672 1 iscsi_tcp, Live 0xffffffffc07ae000
libiscsi 57344 3 ib_iser,iscsi_tcp,libiscsi_tcp, Live 0xfffffff... | explode_data.jsonl/44375 | {
"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,
3062,
5338,
2933,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
17661,
2762,
914,
198,
197,
50780,
286,
3056,
917,
198,
197,
50780,
7747,
257,
1807,
198,
197,
59403,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestDdot(t *testing.T) {
ctx, handle, buffers := setupTest(t, []float64{1, 2, 3, 4, -2, -3, 5},
[]float64{3, -1, 2, 3, -2, 0, 4, 2.5, 3.5}, []float64{0})
<-ctx.Run(func() error {
var res float64
err := handle.Ddot(3, buffers[0], 1, buffers[1], 1, &res)
if err != nil {
t.Error(err)
return nil
}
... | explode_data.jsonl/70348 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 522
} | [
2830,
3393,
35,
16119,
1155,
353,
8840,
836,
8,
341,
20985,
11,
3705,
11,
27389,
1669,
6505,
2271,
1155,
11,
3056,
3649,
21,
19,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
481,
17,
11,
481,
18,
11,
220,
20,
1583,
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... | 9 |
func TestGrpc_CreateRawTxGroup(t *testing.T) {
_, err := g.CreateRawTxGroup(getOkCtx(), &pb.CreateTransactionGroup{})
assert.Equal(t, types.ErrTxGroupCountLessThanTwo, err)
} | explode_data.jsonl/326 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 68
} | [
2830,
3393,
6464,
3992,
34325,
20015,
31584,
2808,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
342,
7251,
20015,
31584,
2808,
5433,
11578,
23684,
1507,
609,
16650,
7251,
8070,
2808,
37790,
6948,
12808,
1155,
11,
4494,
27862,
3158... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestXORtest4(t *testing.T) {
t.Run("XORtest 4", func(t *testing.T) {
rb := NewBitmap()
rb2 := NewBitmap()
counter := 0
for i := 0; i < 200000; i += 4 {
rb2.AddInt(i)
counter++
}
assert.EqualValues(t, counter, rb2.GetCardinality())
for i := 200000; i < 400000; i += 14 {
rb2.AddInt(i)
c... | explode_data.jsonl/20340 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 541
} | [
2830,
3393,
55,
868,
1944,
19,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
55,
868,
1944,
220,
19,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
85589,
1669,
1532,
16773,
741,
197,
85589,
17,
1669,
1532,
16773,
741,
197,
58261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetFuncName(t *testing.T) {
res1 := KDbug.GetFuncName(nil, false)
res2 := KDbug.GetFuncName(nil, true)
res3 := KDbug.GetFuncName(KArr.ArrayDiff, false) // ...ArrayDiff-fm
res4 := KDbug.GetFuncName(KArr.ArrayDiff, true) // ArrayDiff-fm
if !strings.Contains(res1, "TestGetFuncName") || res2 != "TestGetFunc... | explode_data.jsonl/74239 | {
"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,
1949,
9626,
675,
1155,
353,
8840,
836,
8,
341,
10202,
16,
1669,
62990,
2313,
2234,
9626,
675,
27907,
11,
895,
340,
10202,
17,
1669,
62990,
2313,
2234,
9626,
675,
27907,
11,
830,
340,
10202,
18,
1669,
62990,
2313,
2234,
962... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileUtilFunctionsErrors(t *testing.T) {
t.Run("syncDir-openfile", func(t *testing.T) {
err := syncDir("non-existent-dir")
require.Error(t, err)
require.Contains(t, err.Error(), "error while opening dir:non-existent-dir")
})
t.Run("createAndSyncFile-openfile", func(t *testing.T) {
path, err := iouti... | explode_data.jsonl/74144 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
3393,
1703,
2742,
25207,
13877,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
12996,
6184,
25686,
1192,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
9859,
1669,
12811,
6184,
445,
6280,
59828,
45283,
1138,
197,
17957,
6141,
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 TestInit(t *testing.T) {
u := gptest.NewUnitTester(t)
defer u.Remove()
ctx := context.Background()
ctx = ctxutil.WithAlwaysYes(ctx, true)
ctx = out.WithHidden(ctx, true)
ctx = backend.WithCryptoBackend(ctx, backend.Plain)
cfg := config.New()
cfg.Root.Path = backend.FromPath(u.StoreDir("rs"))
rs, err := ... | explode_data.jsonl/23936 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 247
} | [
2830,
3393,
3803,
1155,
353,
8840,
836,
8,
341,
10676,
1669,
342,
70334,
7121,
4562,
58699,
1155,
340,
16867,
575,
13270,
2822,
20985,
1669,
2266,
19047,
741,
20985,
284,
5635,
1314,
26124,
37095,
9454,
7502,
11,
830,
340,
20985,
284,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWriteMapDesc(t *testing.T) {
buf := &bytes.Buffer{}
dw := printers.NewBarePrefixWriter(buf)
WriteMapDesc(dw, testMap, "eggs", false)
assert.Equal(t, buf.String(), "eggs:\ta=b, c=d, foo=bar\n")
} | explode_data.jsonl/36443 | {
"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,
7985,
2227,
11065,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
609,
9651,
22622,
16094,
2698,
86,
1669,
55953,
7121,
33,
546,
14335,
6492,
10731,
340,
60373,
2227,
11065,
97342,
11,
1273,
2227,
11,
330,
791,
5857,
497,
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... | 1 |
func TestContext_IsXHR(t *testing.T) {
a := assert.New(t, false)
srv := newServer(a, nil)
router := srv.NewRouter("router", "https://example.com", group.MatcherFunc(group.Any))
a.NotNil(router)
router.Get("/not-xhr", func(ctx *Context) Responser {
a.False(ctx.IsXHR())
return nil
})
router.Get("/xhr", func(c... | explode_data.jsonl/34201 | {
"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,
1972,
31879,
52036,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
11,
895,
692,
1903,
10553,
1669,
501,
5475,
2877,
11,
2092,
340,
67009,
1669,
43578,
7121,
9523,
445,
9937,
497,
330,
2428,
1110,
8687,
905,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenericStatementArrayType(t *testing.T) {
a, errs := ParseString(`
x = []List<string> {
new List<string>([]string{"hi"}),
}
`)
bvmUtils.AssertNow(t, len(errs) == 0, errs.Format())
bvmUtils.AssertNow(t, a != nil, "nil scope")
bvmUtils.AssertLength(t, len(a.Sequence), 1)
} | explode_data.jsonl/49770 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
19964,
8636,
98481,
1155,
353,
8840,
836,
8,
341,
11323,
11,
70817,
1669,
14775,
703,
61528,
197,
10225,
284,
3056,
852,
4947,
29,
341,
298,
8638,
1759,
4947,
2235,
1294,
917,
4913,
6023,
67432,
197,
197,
532,
197,
24183,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFind(t *testing.T) {
for _, tt := range limitTests {
t.Run(tt.name, func(t *testing.T) {
for _, httpMethod := range FindHTTPMethods {
testFind(t, httpMethod, tt.ex, tt.ex2, tt.header)
}
})
}
} | explode_data.jsonl/14049 | {
"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,
9885,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3930,
18200,
341,
197,
3244,
16708,
47152,
2644,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
2023,
8358,
1758,
3523,
1669,
2088,
7379,
9230,
17856,
341,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLoggingOutletEnumList_SetDefaults(t *testing.T) {
e := &LoggingOutletEnumList{}
var i yaml.Defaulter = e
require.NotPanics(t, func() {
i.SetDefault()
assert.Equal(t, "warn", (*e)[0].Ret.(*StdoutLoggingOutlet).Level)
})
} | explode_data.jsonl/18557 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
34575,
10643,
10766,
852,
14812,
16273,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
609,
34575,
10643,
10766,
852,
16094,
2405,
600,
32246,
49947,
4943,
465,
284,
384,
198,
17957,
15000,
35693,
1211,
1155,
11,
2915,
368,
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... | 1 |
func TestPart1(t *testing.T) {
input := readInputs("input.txt")
foodSlice := parseInputs(input)
want := 2573
allergens := getAllergens(foodSlice)
got := countNonAllergens(allergens, foodSlice)
if got != want {
t.Errorf("got %d; want %d", got, want)
}
} | explode_data.jsonl/26577 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 107
} | [
2830,
3393,
5800,
16,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
1349,
31946,
445,
1355,
3909,
1138,
197,
13915,
33236,
1669,
4715,
31946,
5384,
692,
50780,
1669,
220,
17,
20,
22,
18,
198,
50960,
2375,
724,
1669,
23955,
2375,
724,
810... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJSONIndented(t *testing.T) {
render := New(Options{
IndentJSON: true,
})
h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
render.JSON(w, http.StatusOK, Greeting{"hello", "world"})
})
res := httptest.NewRecorder()
req, _ := http.NewRequest("GET", "/foo", nil)
h.ServeHTTP(res, re... | explode_data.jsonl/3671 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 209
} | [
2830,
3393,
5370,
89509,
1155,
353,
8840,
836,
8,
341,
33921,
1669,
1532,
7,
3798,
515,
197,
197,
42729,
5370,
25,
830,
345,
197,
8824,
9598,
1669,
1758,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
33921,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseGCLifecycle(t *testing.T) {
tt := []struct {
lifecycle string
states map[TableGCState]bool
expectErr bool
}{
{
lifecycle: "",
states: map[TableGCState]bool{
DropTableGCState: true,
},
},
{
lifecycle: "drop",
states: map[TableGCState]bool{
DropTableGCState: true,
... | explode_data.jsonl/33453 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 595
} | [
2830,
3393,
14463,
38,
3140,
19517,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
3056,
1235,
341,
197,
8810,
19517,
914,
198,
197,
18388,
973,
262,
2415,
58,
2556,
22863,
1397,
96436,
198,
197,
24952,
7747,
1807,
198,
197,
59403,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestPresenceAPI(t *testing.T) {
node := nodeWithMemoryEngine()
ruleConfig := rule.DefaultConfig
ruleContainer := rule.NewContainer(ruleConfig)
api := NewExecutor(node, ruleContainer, "test")
resp := api.Presence(context.Background(), &PresenceRequest{})
require.Equal(t, ErrorBadRequest, resp.Error)
resp = ... | explode_data.jsonl/48463 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
89169,
7082,
1155,
353,
8840,
836,
8,
341,
20831,
1669,
2436,
2354,
10642,
4571,
741,
7000,
1111,
2648,
1669,
5912,
13275,
2648,
198,
7000,
1111,
4502,
1669,
5912,
7121,
4502,
34944,
2648,
692,
54299,
1669,
1532,
25255,
6958,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParametersForBinding(t *testing.T) {
testcases := []struct {
name string
cmd string
params map[string]interface{}
}{
{
name: "bind with --param",
cmd: "bind NAME --param foo=bar --param baz=boo",
params: map[string]interface{}{
"foo": "bar",
"baz": "boo",
},
},
{
name... | explode_data.jsonl/71178 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 875
} | [
2830,
3393,
9706,
2461,
15059,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
25920,
262,
914,
198,
197,
25856,
2415,
14032,
31344,
16094,
197,
59403,
197,
197,
515,
298,
11609,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestAcceptRetryTemporary(t *testing.T) {
listener := &testutils.MockListener{
AcceptFunc: func(i int) (net.Conn, error) {
if i < 10 {
return nil, testutils.ErrTemporaryTrue
}
return nil, io.EOF
},
}
server := &RetryServer{
Listener: listener,
}
ctx, cancel := context.WithTimeout(context.Ba... | explode_data.jsonl/71922 | {
"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,
16646,
51560,
59362,
1155,
353,
8840,
836,
8,
341,
14440,
798,
1669,
609,
1944,
6031,
24664,
2743,
515,
197,
197,
16646,
9626,
25,
2915,
1956,
526,
8,
320,
4711,
50422,
11,
1465,
8,
341,
298,
743,
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... | 2 |
func TestWalkDir(t *testing.T) {
// happy path
err := walker.WalkDir("testdata/fs", func(filePath string, info os.FileInfo, opener analyzer.Opener) error {
if info.IsDir() {
return nil
}
if filePath == "testdata/fs/bar" {
b, err := opener()
require.NoError(t, err)
assert.Equal(t, "bar", string(b))
... | explode_data.jsonl/82633 | {
"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,
48849,
6184,
1155,
353,
8840,
836,
8,
341,
197,
322,
6247,
1815,
198,
9859,
1669,
62524,
1175,
1692,
6184,
445,
92425,
73036,
497,
2915,
29605,
914,
11,
3546,
2643,
8576,
1731,
11,
35153,
54660,
67799,
798,
8,
1465,
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,
1... | 3 |
func TestDetectEncoding(t *testing.T) {
ff, _ := filepath.Glob("testdata/*.txt")
detector := NewDetector(WithLanguage("ja", ""))
for _, f := range ff {
filename := filepath.Base(f)
t.Run(filename, func(t *testing.T) {
b, _ := os.ReadFile(f)
enc, name := detector.DetectEncoding(b)
if assert.NotEqual(t, "... | explode_data.jsonl/66097 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 231
} | [
2830,
3393,
57193,
14690,
1155,
353,
8840,
836,
8,
341,
67399,
11,
716,
1669,
26054,
1224,
1684,
445,
92425,
23540,
8586,
1138,
2698,
295,
1256,
1669,
1532,
31606,
7,
2354,
13806,
445,
5580,
497,
77561,
2023,
8358,
282,
1669,
2088,
2553... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFetchTimebounds(t *testing.T) {
hmock := httptest.NewClient()
client := &Client{
HorizonURL: "https://localhost/",
HTTP: hmock,
}
// mock currentUniversalTime
client.SetCurrentUniversalTime(func() int64 {
return int64(1560947096)
})
// When no saved server time, return local time
st, err ... | explode_data.jsonl/82478 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 554
} | [
2830,
3393,
20714,
1462,
34019,
1155,
353,
8840,
836,
8,
341,
9598,
16712,
1669,
54320,
70334,
7121,
2959,
741,
25291,
1669,
609,
2959,
515,
197,
13292,
269,
16973,
3144,
25,
330,
2428,
1110,
8301,
35075,
197,
197,
9230,
25,
981,
305,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEventString(t *testing.T) {
var table = []struct {
definition string
expectations map[string]string
}{
{
definition: `[
{ "type" : "event", "name" : "Balance", "inputs": [{ "name" : "in", "type": "uint256" }] },
{ "type" : "event", "name" : "Check", "inputs": [{ "name" : "t", "type": "addres... | explode_data.jsonl/43924 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 456
} | [
2830,
3393,
1556,
703,
1155,
353,
8840,
836,
8,
341,
2405,
1965,
284,
3056,
1235,
341,
197,
7452,
4054,
256,
914,
198,
197,
24952,
804,
2415,
14032,
30953,
198,
197,
59403,
197,
197,
515,
298,
7452,
4054,
25,
1565,
9640,
298,
197,
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... | 5 |
func TestServerBoundHandshake_IsLoginRequest(t *testing.T) {
tt := []struct {
handshake mc.ServerBoundHandshake
result bool
}{
{
handshake: mc.ServerBoundHandshake{
NextState: mc.StatusState,
},
result: false,
},
{
handshake: mc.ServerBoundHandshake{
NextState: mc.LoginState,
},
... | explode_data.jsonl/45002 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
5475,
19568,
2314,
29661,
31879,
6231,
1900,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
3056,
1235,
341,
197,
9598,
437,
29661,
19223,
22997,
19568,
2314,
29661,
198,
197,
9559,
262,
1807,
198,
197,
59403,
197,
197,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestConcurrentWrites(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
_, mnt := setupIpnsTest(t, nil)
defer mnt.Close()
nactors := 4
filesPerActor := 400
fileSize := 2000
data := make([][][]byte, nactors)
if racedet.WithRace() {
nactors = 2
filesPerActor = 50
}
wg := sync.WaitGroup{}
for i ... | explode_data.jsonl/77471 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 443
} | [
2830,
3393,
1109,
3231,
93638,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
7039,
741,
197,
532,
197,
6878,
296,
406,
1669,
6505,
23378,
4412,
2271,
1155,
11,
2092,
340,
16867,
296,
406,
10421,
2822,
903... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteInstanceIDError(t *testing.T) {
status := http.StatusOK
var tr *http.Request
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
tr = r
w.WriteHeader(status)
w.Header().Set("Content-Type", "application/json")
w.Write([]byte("{}"))
}))
defer ts.Close()
c... | explode_data.jsonl/54624 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1041
} | [
2830,
3393,
6435,
2523,
915,
1454,
1155,
353,
8840,
836,
8,
341,
23847,
1669,
1758,
52989,
198,
2405,
489,
353,
1254,
9659,
198,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBitMatrixParser_Mirror(t *testing.T) {
mirrored, _ := gozxing.ParseStringToBitMatrix(""+
"############## ## ##############\n"+
"## ## #### ## ##\n"+
"## ###### ## #### ## ###### ##\n"+
"## ###### ## ######## ## ###### ##\n"+
"## ###### ## ... | explode_data.jsonl/32243 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 813
} | [
2830,
3393,
8344,
6689,
6570,
1245,
28812,
1155,
353,
8840,
836,
8,
341,
2109,
404,
47643,
11,
716,
1669,
728,
66700,
287,
8937,
703,
1249,
8344,
6689,
445,
27424,
197,
197,
1,
17455,
565,
220,
7704,
688,
76527,
565,
59,
77,
27424,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtend(t *testing.T) {
for _, destStartIdx := range pos {
for _, srcStartIdx := range pos {
for _, srcEndIdx := range pos {
if destStartIdx <= srcStartIdx && srcStartIdx <= srcEndIdx {
toAppend := srcEndIdx - srcStartIdx
name := fmt.Sprintf("destStartIdx=%d,srcStartIdx=%d,toAppend=%d", dest... | explode_data.jsonl/37158 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 532
} | [
2830,
3393,
72136,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
3201,
3479,
11420,
1669,
2088,
1133,
341,
197,
2023,
8358,
2286,
3479,
11420,
1669,
2088,
1133,
341,
298,
2023,
8358,
2286,
3727,
11420,
1669,
2088,
1133,
341,
571,
743,
3201,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImageInspectError(t *testing.T) {
client := &Client{
client: newMockClient(errorMock(http.StatusInternalServerError, "Server error")),
}
_, _, err := client.ImageInspectWithRaw(context.Background(), "nothing")
if err == nil || err.Error() != "Error response from daemon: Server error" {
t.Fatalf("expec... | explode_data.jsonl/6822 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 155
} | [
2830,
3393,
1906,
58533,
1454,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
609,
2959,
515,
197,
25291,
25,
501,
11571,
2959,
6390,
11571,
19886,
66760,
11,
330,
5475,
1465,
30154,
197,
630,
197,
6878,
8358,
1848,
1669,
2943,
7528,
58533,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRouter_MatchingOptions_MatchesByQueryParameters(t *testing.T) {
mainRouter := Router{}
_ = mainRouter.Get("/users", testHandlerFunc, NewMatchingOptions())
_ = mainRouter.Get("/users/{id}", testHandlerFunc, MatchingOptions{"", "", []string{}, map[string]string{}, map[string]string{"key1": "value1"}, nil})
... | explode_data.jsonl/31735 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 445
} | [
2830,
3393,
9523,
1245,
31924,
3798,
1245,
9118,
1359,
2859,
9706,
1155,
353,
8840,
836,
8,
341,
36641,
9523,
1669,
10554,
31483,
197,
62,
284,
1887,
9523,
2234,
4283,
4218,
497,
1273,
3050,
9626,
11,
1532,
64430,
3798,
2398,
197,
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... | 1 |
func TestBaseIdentity_HitPointGetterSetters(t *testing.T) {
i := getTestBaseIdentity()
mhp := i.GetMaxHitPoints()
chp := i.GetCurrentHitPoints()
if chp != mhp {
t.Errorf("Current Hit Points should equal max hit points: expected: %d, got: %d", mhp, chp)
}
i.ApplyDamage(TestDamage)
chp = i.GetCurrentHitPoints(... | explode_data.jsonl/55785 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 424
} | [
2830,
3393,
3978,
18558,
2039,
275,
2609,
31485,
1649,
5045,
1155,
353,
8840,
836,
8,
341,
8230,
1669,
633,
2271,
3978,
18558,
741,
2109,
21197,
1669,
600,
2234,
5974,
19498,
11411,
741,
23049,
79,
1669,
600,
44242,
19498,
11411,
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... | 6 |
func TestCaptivePrepareRange_ToIsAheadOfRootHAS(t *testing.T) {
mockRunner := &stellarCoreRunnerMock{}
mockArchive := &historyarchive.MockArchive{}
mockArchive.
On("GetRootHAS").
Return(historyarchive.HistoryArchiveState{
CurrentLedger: uint32(192),
}, nil)
captiveBackend := CaptiveStellarCore{
archive:... | explode_data.jsonl/7318 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 276
} | [
2830,
3393,
34,
27781,
50590,
6046,
38346,
3872,
87962,
2124,
8439,
78230,
1155,
353,
8840,
836,
8,
341,
77333,
19486,
1669,
609,
77293,
5386,
19486,
11571,
16094,
77333,
42502,
1669,
609,
18844,
16019,
24664,
42502,
16094,
77333,
42502,
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... | 1 |
func TestMultiStageDockerBuildPreservesSyntaxDirective(t *testing.T) {
f := newIBDFixture(t, k8s.EnvGKE)
defer f.TearDown()
baseImage := model.MustNewImageTarget(SanchoBaseRef).WithBuildDetails(model.DockerBuild{
Dockerfile: `FROM golang:1.10`,
BuildPath: f.JoinPath("sancho-base"),
})
srcImage := model.Must... | explode_data.jsonl/38260 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 533
} | [
2830,
3393,
20358,
19398,
35,
13659,
11066,
14367,
13280,
33890,
62076,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
3256,
5262,
12735,
1155,
11,
595,
23,
82,
81214,
38,
3390,
340,
16867,
282,
836,
682,
4454,
2822,
24195,
1906,
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 TestContentTypeFieldValidationRangeUniquePredefinedValues(t *testing.T) {
var err error
assert := assert.New(t)
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
assert.Equal(r.Method, "POST")
assert.Equal(r.RequestURI, "/spaces/"+spaceID+"/content_types")
checkHeaders(r, assert)... | explode_data.jsonl/66086 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 959
} | [
2830,
3393,
29504,
1877,
13799,
6046,
22811,
4703,
9711,
6227,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
6948,
1669,
2060,
7121,
1155,
692,
53326,
1669,
1758,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
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... | 1 |
func TestDirect_InvalidEvent(t *testing.T) {
g := NewGomegaWithT(t)
xform, src, acc := setup(g)
xform.Start()
defer xform.Stop()
src.Handlers.Handle(event.FullSyncFor(basicmeta.Collection2)) // Collection2
src.Handlers.Handle(event.AddFor(basicmeta.Collection2, data.EntryN1I1V1))
g.Consistently(acc.Events).S... | explode_data.jsonl/37563 | {
"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,
16027,
62,
7928,
1556,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
692,
10225,
627,
11,
2286,
11,
1029,
1669,
6505,
3268,
692,
10225,
627,
12101,
741,
16867,
856,
627,
30213,
2822,
41144,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNodeGetVolumeStats(t *testing.T) {
nonexistedPath := "/not/a/real/directory"
fakePath := "/tmp/fake-volume-path"
tests := []struct {
desc string
req csi.NodeGetVolumeStatsRequest
expectedErr error
}{
{
desc: "[Error] Volume ID missing",
req: csi.NodeGetVolumeSta... | explode_data.jsonl/36855 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 618
} | [
2830,
3393,
1955,
1949,
18902,
16635,
1155,
353,
8840,
836,
8,
341,
197,
6280,
327,
13236,
1820,
1669,
3521,
1921,
14186,
14,
7951,
3446,
4758,
698,
1166,
726,
1820,
1669,
3521,
5173,
6663,
726,
66768,
33095,
1837,
78216,
1669,
3056,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestTakeApartVehicle(t *testing.T) {
a := assert.New(t)
vehicle := &Vehicle{
id: DefaultID,
name: DefaultName,
communicationID: DefaultCommunicationID,
isCarbonCopy: CarbonCopy,
version: DefaultVersion,
newVersion: DefaultVersion,
}
comp := &vehicleComponent... | explode_data.jsonl/36304 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 353
} | [
2830,
3393,
17814,
69504,
34602,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
692,
197,
19764,
1669,
609,
34602,
515,
197,
15710,
25,
1060,
7899,
915,
345,
197,
11609,
25,
310,
7899,
675,
345,
197,
197,
50171,
915,
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 TestGdbPythonCgo(t *testing.T) {
if runtime.GOARCH == "mips" || runtime.GOARCH == "mipsle" || runtime.GOARCH == "mips64" {
testenv.SkipFlaky(t, 18784)
}
testGdbPython(t, true)
} | explode_data.jsonl/62283 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 81
} | [
2830,
3393,
38,
1999,
30280,
34,
3346,
1155,
353,
8840,
836,
8,
341,
743,
15592,
97574,
10790,
621,
330,
76,
3077,
1,
1369,
15592,
97574,
10790,
621,
330,
76,
3077,
273,
1,
1369,
15592,
97574,
10790,
621,
330,
76,
3077,
21,
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... | 4 |
func TestCreateBatchChangesCredential(t *testing.T) {
if testing.Short() {
t.Skip()
}
ctx := context.Background()
db := dbtesting.GetDB(t)
pruneUserCredentials(t, db)
userID := ct.CreateTestUser(t, db, false).ID
cstore := store.New(db)
r := &Resolver{store: cstore}
s, err := graphqlbackend.NewSchema(db,... | explode_data.jsonl/13592 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 523
} | [
2830,
3393,
4021,
21074,
11317,
48265,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
630,
20985,
1669,
2266,
19047,
741,
20939,
1669,
2927,
8840,
2234,
3506,
1155,
692,
25653,
2886,
1474,
27025,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSort(test *testing.T) {
var g = graph{
0: {},
1: {0},
2: {0, 1},
3: {2},
4: {0, 1, 2, 3},
}
var nodes = []int{2, 1, 3, 4, 0}
var sorted, hasCycle = tsort.Sort(nodes, g.From)
if hasCycle {
test.Fatal("graph has cycle")
}
assertOrdered(test, sorted, g.From)
} | explode_data.jsonl/20777 | {
"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,
10231,
8623,
353,
8840,
836,
8,
341,
2405,
342,
284,
4771,
515,
197,
197,
15,
25,
14573,
197,
197,
16,
25,
314,
15,
1583,
197,
197,
17,
25,
314,
15,
11,
220,
16,
1583,
197,
197,
18,
25,
314,
17,
1583,
197,
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... | 2 |
func TestIsManagedDisk(t *testing.T) {
tests := []struct {
options string
expected bool
}{
{
options: "testurl/subscriptions/12/resourceGroups/23/providers/Microsoft.Compute/disks/name",
expected: true,
},
{
options: "test.com",
expected: true,
},
{
options: "HTTP://test.com",
expe... | explode_data.jsonl/62102 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
3872,
27192,
47583,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
35500,
220,
914,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
515,
298,
35500,
25,
220,
330,
1944,
1085,
37885,
29966,
14,
16,
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... | 3 |
func TestEncoderFromPath(t *testing.T) {
test := func(path string, expected cidenc.Encoder) {
actual, err := CidEncoderFromPath(path)
if err != nil {
t.Error(err)
}
if actual != expected {
t.Errorf("CidEncoderFromPath(%s) failed: expected %#v but got %#v", path, expected, actual)
}
}
p := "QmRqVG8VGd... | explode_data.jsonl/60863 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 774
} | [
2830,
3393,
19921,
3830,
1820,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
2915,
5581,
914,
11,
3601,
32141,
954,
26598,
4316,
8,
341,
197,
88814,
11,
1848,
1669,
356,
307,
19921,
3830,
1820,
5581,
340,
197,
743,
1848,
961,
2092,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestParseBeegfsUrl(t *testing.T) {
tests := map[string]struct {
rawUrl string
wantHost, wantPath string
wantErr bool
}{
"basic ip example": {
rawUrl: "beegfs://127.0.0.1/path/to/volume",
wantHost: "127.0.0.1",
wantPath: "/path/to/volume",
wantErr: false,
},
"basi... | explode_data.jsonl/77106 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 678
} | [
2830,
3393,
14463,
3430,
791,
3848,
2864,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
76559,
2864,
1797,
914,
198,
197,
50780,
9296,
11,
1366,
1820,
914,
198,
197,
50780,
7747,
310,
1807,
198,
197,
5940... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRouterMethodGet(t *testing.T) {
request := &http.Request{
URL: &url.URL{
Path: "/sha246:41af286dc0b172ed2f1ca934fd2278de4a1192302ffa07087cea2682e7d372e3",
},
Method: "GET",
Body: nil,
}
ctrl := gomock.NewController(t)
defer ctrl.Finish()
cmp := setupRouterTestComponents(t, ctrl)
cmp.download... | explode_data.jsonl/3912 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 191
} | [
2830,
3393,
9523,
3523,
1949,
1155,
353,
8840,
836,
8,
341,
23555,
1669,
609,
1254,
9659,
515,
197,
79055,
25,
609,
1085,
20893,
515,
298,
69640,
25,
3521,
15247,
17,
19,
21,
25,
19,
16,
2577,
17,
23,
21,
7628,
15,
65,
16,
22,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestResolveTerraformModulesTwoModulesWithDependencies(t *testing.T) {
t.Parallel()
moduleA := &TerraformModule{
Path: canonical(t, "../test/fixture-modules/module-a"),
Dependencies: []*TerraformModule{},
Config: config.TerragruntConfig{
Terraform: &config.TerraformConfig{Source: ptr("test")},
... | explode_data.jsonl/26636 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 531
} | [
2830,
3393,
56808,
51,
13886,
627,
28201,
11613,
28201,
2354,
48303,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
54020,
32,
1669,
609,
51,
13886,
627,
3332,
515,
197,
69640,
25,
260,
42453,
1155,
11,
7005,
1944,
14,
59612,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPoolBorrowCreate(t *testing.T) {
assert := assert.New(t)
testCases := []struct {
contentType string
}{
{"application/json"},
{"application/msgpack"},
{""},
}
for _, tc := range testCases {
// borrow a decoder from the pool
pool := NewDecoderPool(1)
decoder := pool.Borrow(tc.contentType)
a... | explode_data.jsonl/35762 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 135
} | [
2830,
3393,
10551,
33,
7768,
4021,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
18185,
37302,
1669,
3056,
1235,
341,
197,
27751,
929,
914,
198,
197,
59403,
197,
197,
4913,
5132,
8931,
7115,
197,
197,
4913,
5132,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMemberNotFound_InChannel(t *testing.T) {
var expected *discordgo.Channel
mnf := &callbacks.MemberNotFound{}
actual := mnf.InChannel()
err := deepEqual(actual, expected)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/56082 | {
"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,
9366,
10372,
25972,
9629,
1155,
353,
8840,
836,
8,
341,
2405,
3601,
353,
42579,
3346,
38716,
271,
2109,
31737,
1669,
609,
68311,
46404,
10372,
16094,
88814,
1669,
27938,
69,
5337,
9629,
2822,
9859,
1669,
5538,
2993,
29721,
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
] | 2 |
func TestEscaping1(t *testing.T) {
lines := []string{
"weat\\,he\\ r,loc\\\"ation\\,\\ =us\\ mid\\\"west temperature=82,temperature_string=\"hot, really \\\"hot\\\"!\" 1465839830100400200", // all kinds of crazy characters
"\"weather\",\"location\"=\"us-midwest\" \"temperature\"=82 1465839830100400200", ... | explode_data.jsonl/15581 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 415
} | [
2830,
3393,
36121,
14216,
16,
1155,
353,
8840,
836,
8,
341,
78390,
1669,
3056,
917,
515,
197,
197,
1,
896,
266,
3422,
11,
383,
3422,
435,
11,
1074,
3422,
2105,
367,
3422,
11,
3422,
284,
355,
3422,
5099,
3422,
2105,
11039,
9315,
28,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStoreSendWithClockOffset(t *testing.T) {
defer leaktest.AfterTest(t)
store, mc, stopper := createTestStore(t)
defer stopper.Stop()
args := getArgs([]byte("a"))
// Set clock to time 1.
mc.Set(1)
// Set clock max offset to 250ms.
maxOffset := 250 * time.Millisecond
store.ctx.Clock.SetMaxOffset(maxOffse... | explode_data.jsonl/44471 | {
"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,
6093,
11505,
2354,
26104,
6446,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
340,
57279,
11,
19223,
11,
2936,
712,
1669,
1855,
2271,
6093,
1155,
340,
16867,
2936,
712,
30213,
741,
31215,
1669,
633,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestObjectTypeToString(t *testing.T) {
for typ, str := range map[ObjectType]string{
BlobObjectType: "blob",
TreeObjectType: "tree",
CommitObjectType: "commit",
TagObjectType: "tag",
UnknownObjectType: "unknown",
ObjectType(math.MaxUint8): "<unknown>",... | explode_data.jsonl/72187 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 198
} | [
2830,
3393,
49530,
5870,
1155,
353,
8840,
836,
8,
341,
2023,
3582,
11,
607,
1669,
2088,
2415,
58,
49530,
30953,
515,
197,
12791,
1684,
49530,
25,
310,
330,
35112,
756,
197,
197,
6533,
49530,
25,
310,
330,
9344,
756,
197,
197,
33441,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAdd(t *testing.T) {
lru := New(int64(0), nil)
lru.Add("key", String("1"))
lru.Add("key", String("111"))
if lru.nbytes != int64(len("key") + len("111")) {
t.Fatalf("expected 6 but got", lru.nbytes)
}
} | explode_data.jsonl/22957 | {
"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,
2212,
1155,
353,
8840,
836,
8,
341,
8810,
2672,
1669,
1532,
1548,
21,
19,
7,
15,
701,
2092,
340,
8810,
2672,
1904,
445,
792,
497,
923,
445,
16,
5455,
8810,
2672,
1904,
445,
792,
497,
923,
445,
16,
16,
16,
28075,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPVCVolumeMode(t *testing.T) {
// Enable feature BlockVolume for PVC
defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.BlockVolume, true)()
block := core.PersistentVolumeBlock
file := core.PersistentVolumeFilesystem
fake := core.PersistentVolumeMode("fake")
emp... | explode_data.jsonl/1007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 380
} | [
2830,
3393,
47,
11287,
18902,
3636,
1155,
353,
8840,
836,
8,
341,
197,
322,
18567,
4565,
8362,
18902,
369,
49866,
198,
16867,
4094,
12753,
8840,
4202,
13859,
42318,
16014,
2271,
1155,
11,
4094,
12753,
13275,
13859,
42318,
11,
4419,
28477,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPublishStateNew(t *testing.T) {
defer func(saved time.Duration) { *publishRetryInterval = saved }(*publishRetryInterval)
*publishRetryInterval = 1 * time.Millisecond
// This flow doesn't test the failure scenario, which
// we can't do using memorytopo, but we do test the retry
// code path.
ctx := cont... | explode_data.jsonl/75592 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 690
} | [
2830,
3393,
50145,
1397,
3564,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
14217,
882,
33795,
8,
314,
353,
27502,
51560,
10256,
284,
6781,
335,
4071,
27502,
51560,
10256,
340,
197,
9,
27502,
51560,
10256,
284,
220,
16,
353,
882,
71482,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mergeReportID(t *testing.T) {
type args struct {
r1 string
r2 string
}
tests := []struct {
name string
args args
want string
}{
{"1|2", args{"1", "2"}, base64.StdEncoding.EncodeToString([]byte("1|2"))},
{"1|2|3", args{base64.StdEncoding.EncodeToString([]byte("1|2")), "3"}, base64.StdEncoding... | explode_data.jsonl/52085 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
20888,
10361,
915,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
7000,
16,
914,
198,
197,
7000,
17,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_OCRContractTracker_IsLaterThan(t *testing.T) {
t.Parallel()
tests := []struct {
name string
incoming types.Log
existing types.Log
expected bool
}{
{
"incoming higher index than existing",
types.Log{BlockNumber: 1, TxIndex: 1, Index: 2},
types.Log{BlockNumber: 1, TxIndex: 1, Index: 1... | explode_data.jsonl/31063 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 656
} | [
2830,
3393,
2232,
8973,
14067,
31133,
31879,
29982,
26067,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
17430,
4959,
4494,
5247,
198,
197,
8122,
11083,
4494,
5247,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRESTCmd(t *testing.T) {
mockUpdaterFromFlags := rotor.NewMockUpdaterFromFlags(nil)
cmd := RESTCmd(mockUpdaterFromFlags)
cmd.Flags.Parse([]string{})
runner := cmd.Runner.(*restRunner)
assert.Equal(t, runner.updaterFlags, mockUpdaterFromFlags)
assert.NonNil(t, runner.clustersNodes)
} | explode_data.jsonl/10927 | {
"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,
38307,
15613,
1155,
353,
8840,
836,
8,
341,
77333,
79854,
3830,
9195,
1669,
62025,
7121,
11571,
79854,
3830,
9195,
27907,
692,
25920,
1669,
25414,
15613,
30389,
79854,
3830,
9195,
340,
25920,
51887,
8937,
10556,
917,
37790,
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 TestAssociationByTypeAndName(t *testing.T) {
association1 := Association{
Type: "elastic-inference",
Name: "dev1",
}
association2 := Association{
Type: "other-type",
Name: "dev2",
}
task := &Task{
Associations: []Association{association1, association2},
}
// positive cases
association, ok := tas... | explode_data.jsonl/37259 | {
"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,
63461,
1359,
929,
3036,
675,
1155,
353,
8840,
836,
8,
341,
197,
54465,
16,
1669,
10024,
515,
197,
27725,
25,
330,
61964,
3419,
2202,
756,
197,
21297,
25,
330,
3583,
16,
756,
197,
532,
197,
54465,
17,
1669,
10024,
515,
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 TestKafkaClient_decodeGroupMetadata(t *testing.T) {
module := fixtureModule()
module.Configure("test", "consumer.test")
keyBuf := bytes.NewBuffer([]byte("\x00\x09testgroup"))
valueBytes := []byte("\x00\x01\x00\x08testtype\x00\x00\x00\x01\x00\x0ctestprotocol\x00\x0atestleader\x00\x00\x00\x01\x00\x0ctestmemberi... | explode_data.jsonl/34275 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 571
} | [
2830,
3393,
42,
21883,
2959,
15227,
2808,
14610,
1155,
353,
8840,
836,
8,
341,
54020,
1669,
12507,
3332,
741,
54020,
78281,
445,
1944,
497,
330,
46764,
5958,
5130,
23634,
15064,
1669,
5820,
7121,
4095,
10556,
3782,
4921,
87,
15,
15,
346... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAppendWithoutDuplicates(t *testing.T) {
falseVar := false
tests := []struct {
name string
configs []*ModuleConfig
modules []string
expected []*ModuleConfig
}{
{
name: "just modules",
configs: []*ModuleConfig{},
modules: []string{"moduleA", "moduleB", "moduleC"},
expected: []*M... | explode_data.jsonl/64757 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 945
} | [
2830,
3393,
23877,
26040,
76851,
1155,
353,
8840,
836,
8,
341,
36012,
3962,
1669,
895,
198,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
25873,
82,
220,
29838,
3332,
2648,
198,
197,
42228,
2425,
220,
3056,
917,
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... | 1 |
func TestSessionCtxCancelClosesGetBlocksChannel(t *testing.T) {
fpm := newFakePeerManager()
fspm := newFakeSessionPeerManager()
fpf := newFakeProviderFinder()
sim := bssim.New()
bpm := bsbpm.New()
notif := notifications.New()
defer notif.Shutdown()
id := testutil.GenerateSessionID()
// Create a new session wi... | explode_data.jsonl/37013 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 458
} | [
2830,
3393,
5283,
23684,
9269,
34,
49341,
1949,
29804,
9629,
1155,
353,
8840,
836,
8,
341,
1166,
5187,
1669,
501,
52317,
30888,
2043,
741,
1166,
68622,
1669,
501,
52317,
5283,
30888,
2043,
741,
1166,
15897,
1669,
501,
52317,
5179,
42300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadHeaders(t *testing.T) {
input := strings.NewReader("A,B,C\n1,2,3")
r := NewReader(input)
headers, err := r.Headers()
exp := []string{"A", "B", "C"}
if !reflect.DeepEqual(headers, exp) {
t.Errorf("out=%q, want=%q", headers, exp)
}
if err != nil {
t.Errorf("unexpected error: %q", err)
}
} | explode_data.jsonl/21911 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
4418,
10574,
1155,
353,
8840,
836,
8,
1476,
22427,
1669,
9069,
68587,
445,
32,
8161,
11289,
1699,
16,
11,
17,
11,
18,
1138,
7000,
1669,
1532,
5062,
5384,
692,
67378,
11,
1848,
1669,
435,
43968,
741,
48558,
1669,
3056,
917,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestExpectedMethodCall(t *testing.T) {
reporter, ctrl := createFixtures(t)
subject := new(Subject)
ctrl.RecordCall(subject, "FooMethod", "argument")
ctrl.Call(subject, "FooMethod", "argument")
ctrl.Finish()
reporter.assertPass("Expected method call made.")
} | explode_data.jsonl/17269 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
18896,
3523,
7220,
1155,
353,
8840,
836,
8,
341,
69931,
261,
11,
23743,
1669,
1855,
25958,
18513,
1155,
340,
28624,
583,
1669,
501,
7,
13019,
692,
84381,
49959,
7220,
29128,
11,
330,
40923,
3523,
497,
330,
14479,
1138,
84381... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsCacheExcludeDirective(t *testing.T) {
testCases := []struct {
cacheControlOpt string
expectedResult bool
}{
{"no-cache", true},
{"no-store", true},
{"must-revalidate", true},
{"no-transform", false},
{"max-age", false},
}
for i, testCase := range testCases {
if isCacheExcludeDirective(t... | explode_data.jsonl/74497 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
3872,
8233,
95239,
62076,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
52680,
3273,
21367,
914,
198,
197,
42400,
2077,
220,
1807,
198,
197,
59403,
197,
197,
4913,
2152,
36680,
497,
830,
1583,
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 TestKeysToSlice(t *testing.T) {
m := map[string]bool{
"1": true,
"2": true,
"3": true,
}
expected := []string{"1", "2", "3"}
result := KeysToSlice(m)
if !reflect.DeepEqual(expected, result) {
t.Errorf("places.keysToSlice(%v) = %v; expected %v", m, result, expected)
}
} | explode_data.jsonl/80322 | {
"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,
8850,
1249,
33236,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
2415,
14032,
96436,
515,
197,
197,
1,
16,
788,
830,
345,
197,
197,
1,
17,
788,
830,
345,
197,
197,
1,
18,
788,
830,
345,
197,
532,
42400,
1669,
3056,
917,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPrincipal_ValidateForTCP(t *testing.T) {
testCases := []struct {
name string
principal *Principal
want bool
}{
{
name: "empty principal",
want: true,
},
{
name: "principal with group",
principal: &Principal{
Group: "group",
},
},
{
name: "principal with request... | explode_data.jsonl/19938 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 632
} | [
2830,
3393,
31771,
62,
17926,
2461,
49896,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
25653,
15702,
353,
31771,
198,
197,
50780,
414,
1807,
198,
197,
59403,
197,
197,
515,
298,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestProposalProcessorSendProposal(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
proc := mockfab.NewMockProposalProcessor(mockCtrl)
tp := mockProcessProposalRequest()
tpr := fab.TransactionProposalResponse{Endorser: "example.com", Status: 99, ProposalResponse: nil}
proc.EXPECT(... | explode_data.jsonl/4795 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 227
} | [
2830,
3393,
98637,
22946,
11505,
98637,
1155,
353,
8840,
836,
8,
341,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
7860,
15001,
991,
18176,
741,
197,
15782,
1669,
7860,
36855,
7121,
11571,
98637,
22946,
30389,
15001,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVirtualGeneratedColumnAndLimit(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t;")
tk.MustExec("create table t (a int, b int as (a + 1));")
tk.MustExec("insert into t(a) values (1);")
... | explode_data.jsonl/65516 | {
"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,
33026,
15741,
2933,
3036,
16527,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHandlePodCreationError(t *testing.T) {
taskRun := tb.TaskRun("test-taskrun-pod-creation-failed", tb.TaskRunSpec(
tb.TaskRunTaskRef(simpleTask.Name),
), tb.TaskRunStatus(
tb.TaskRunStartTime(time.Now()),
tb.StatusCondition(apis.Condition{
Type: apis.ConditionSucceeded,
Status: corev1.ConditionUn... | explode_data.jsonl/885 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 793
} | [
2830,
3393,
6999,
23527,
32701,
1454,
1155,
353,
8840,
836,
8,
341,
49115,
6727,
1669,
16363,
28258,
6727,
445,
1944,
52579,
6108,
2268,
347,
12,
37375,
2220,
5687,
497,
16363,
28258,
6727,
8327,
1006,
197,
62842,
28258,
6727,
6262,
3945,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestXOR_disconnected(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short Unit Test mode.")
}
// the numbers will be different every time we run.
rand.Seed(time.Now().Unix())
outDirPath, contextPath, genomePath := "../../out/XOR_disconnected_test", "../../data/xor.neat", "../../data/xordisc... | explode_data.jsonl/81243 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 772
} | [
2830,
3393,
55,
868,
9932,
15288,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
304,
2805,
7954,
3393,
3856,
13053,
197,
630,
197,
322,
279,
5109,
686,
387,
2155,
1449,
882,
582,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTypeOf(t *testing.T) {
// Special case for nil
if typ := TypeOf(nil); typ != nil {
t.Errorf("expected nil type for nil value; got %v", typ)
}
for _, test := range deepEqualTests {
v := ValueOf(test.a)
if !v.IsValid() {
continue
}
typ := TypeOf(test.a)
if typ != v.Type() {
t.Errorf("TypeOf... | explode_data.jsonl/29538 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 181
} | [
2830,
3393,
929,
2124,
1155,
353,
8840,
836,
8,
341,
197,
322,
9785,
1142,
369,
2092,
198,
743,
3582,
1669,
3990,
2124,
27907,
1215,
3582,
961,
2092,
341,
197,
3244,
13080,
445,
7325,
2092,
943,
369,
2092,
897,
26,
2684,
1018,
85,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestEchoReplacesInputWithSuppliedStringWhenUsedAsFilter(t *testing.T) {
t.Parallel()
want := "Hello, world."
p := script.Echo("bogus").Echo(want)
got, err := p.String()
if err != nil {
t.Error(err)
}
if got != want {
t.Errorf("want %q, got %q", want, got)
}
} | explode_data.jsonl/51466 | {
"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,
74994,
693,
26078,
2505,
2354,
10048,
3440,
703,
4498,
22743,
2121,
5632,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50780,
1669,
330,
9707,
11,
1879,
10040,
3223,
1669,
5316,
5142,
958,
445,
65,
538,
355,
1827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTimeout(t *testing.T) {
distroStruct := test_distro.New()
arch, err := distroStruct.GetArch(test_distro.TestArchName)
if err != nil {
t.Fatalf("error getting arch from distro: %v", err)
}
server := newTestServer(t, t.TempDir(), time.Millisecond*10, "/api/image-builder-worker/v1")
_, _, _, _, _, err = ... | explode_data.jsonl/1107 | {
"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,
7636,
1155,
353,
8840,
836,
8,
341,
2698,
15561,
9422,
1669,
1273,
814,
15561,
7121,
741,
197,
1113,
11,
1848,
1669,
1582,
299,
9422,
2234,
18727,
8623,
814,
15561,
8787,
18727,
675,
340,
743,
1848,
961,
2092,
341,
197,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestQueryCodec(t *testing.T) {
var rsp interface{}
var ok bool
var err error
conn := goetty.NewConnector(&goetty.Conf{
Addr: *addr,
TimeoutConnectToServer: time.Second * time.Duration(*connectTimeout),
}, gredis.NewRedisReplyDecoder(), goetty.NewEmptyEncoder())
if _, err = conn.Connect(); err != nil {
... | explode_data.jsonl/10857 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 392
} | [
2830,
3393,
2859,
36913,
1155,
353,
8840,
836,
8,
341,
2405,
42160,
3749,
16094,
2405,
5394,
1807,
198,
2405,
1848,
1465,
198,
32917,
1669,
728,
88798,
7121,
35954,
2099,
3346,
88798,
4801,
69,
515,
197,
197,
13986,
25,
353,
6214,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFuturesMarginChangeHistory(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() {
t.Skip("skipping test: api keys not set")
}
_, err := b.FuturesMarginChangeHistory(context.Background(), currency.NewPairWithDelimiter("BTCUSD", "PERP", "_"), "add", time.Time{}, time.Time{}, 10)
if err != nil {
t.Error(... | explode_data.jsonl/76632 | {
"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,
37,
74606,
21681,
4072,
13424,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
25,
6330,
6894,
537,
738,
1138,
197,
532,
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 TestMessageValid(t *testing.T) {
t.Parallel()
until := time.Now()
validmsgs := []Message{
{Code: Run},
{Code: Sleep, Until: &until},
{Code: Pause},
{Code: Kill},
{Code: Error, Err: errors.New("test")},
{Code: Complete},
{Code: Checkpoint},
{Code: Release},
}
for _, m := range validmsgs {
if ... | explode_data.jsonl/23107 | {
"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,
2052,
4088,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20479,
1646,
1669,
882,
13244,
741,
56322,
77845,
1669,
3056,
2052,
515,
197,
197,
90,
2078,
25,
6452,
1583,
197,
197,
90,
2078,
25,
23774,
11,
28970,
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... | 5 |
func TestSetClusterColor_MissingCluster(t *testing.T) {
manager := GetManagerInstance()
manager.SetDBConnection(&database.MockDBConnection{
GetClusterReturnErr: true,
})
clearManager()
_, err := manager.SetClusterColor("test", uint32(1))
if err == nil {
t.Error("Expected error")
}
} | explode_data.jsonl/24683 | {
"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,
1649,
28678,
1636,
1245,
13577,
28678,
1155,
353,
8840,
836,
8,
341,
92272,
1669,
2126,
2043,
2523,
741,
92272,
4202,
3506,
4526,
2099,
12216,
24664,
3506,
4526,
515,
197,
37654,
28678,
5598,
7747,
25,
830,
345,
197,
3518,
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... | 2 |
func TestAccessorFuncName(t *testing.T) {
const SCRIPT = `
const namedSym = Symbol('test262');
const emptyStrSym = Symbol("");
const anonSym = Symbol();
const o = {
get id() {},
get [anonSym]() {},
get [namedSym]() {},
get [emptyStrSym]() {},
set id(v) {},
set [anonSym](v) {},
set [namedSy... | explode_data.jsonl/10533 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 400
} | [
2830,
3393,
29889,
9626,
675,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
4777,
6941,
27912,
284,
19612,
492,
1944,
17,
21,
17,
1157,
4777,
4287,
2580,
27912,
284,
19612,
13056,
4777,
74812,
27912,
284,
19612,
1428,
4777,
297... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMaterializerExplicitColumns(t *testing.T) {
ms := &vtctldatapb.MaterializeSettings{
Workflow: "workflow",
SourceKeyspace: "sourceks",
TargetKeyspace: "targetks",
TableSettings: []*vtctldatapb.TableMaterializeSettings{{
TargetTable: "t1",
SourceExpression: "select c1, c1+c2, c2 from t1... | explode_data.jsonl/61870 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 791
} | [
2830,
3393,
13415,
3135,
98923,
13965,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
609,
9708,
302,
507,
266,
391,
65,
44253,
551,
6086,
515,
197,
197,
62768,
25,
981,
330,
56249,
756,
197,
197,
3608,
8850,
1306,
25,
330,
2427,
2787,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue_loadTotalTimes(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
ms, err := GetIssueByID(2)
assert.NoError(t, err)
assert.NoError(t, ms.loadTotalTimes(db.GetEngine(db.DefaultContext)))
assert.Equal(t, int64(3682), ms.TotalTrackedTime)
} | explode_data.jsonl/46844 | {
"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,
42006,
12411,
7595,
18889,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
19905,
28770,
3380,
2271,
5988,
2398,
47691,
11,
1848,
1669,
2126,
42006,
60572,
7,
17,
340,
6948,
35699,
1155,
11,
1848,
340,
6948,
35699,
1155... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFilesystemGenerate(t *testing.T) {
g := &FilesystemGenerator{}
result, err := g.Generate()
if err != nil {
t.Skipf("Generate() failed: %s", err)
}
_, resultTypeOk := result.(map[string]map[string]interface{})
if !resultTypeOk {
t.Errorf("Return type of Generate() shuold be map[string]map[string]int... | explode_data.jsonl/5903 | {
"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,
1703,
8948,
31115,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
609,
1703,
8948,
12561,
31483,
9559,
11,
1848,
1669,
342,
57582,
741,
743,
1848,
961,
2092,
341,
197,
3244,
57776,
69,
445,
31115,
368,
4641,
25,
1018,
82,
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... | 3 |
func TestAccProjectIamCustomRole_createAfterDestroy(t *testing.T) {
t.Parallel()
roleId := "tfIamCustomRole" + randString(t, 10)
vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckGoogleProjectIamCustomRoleDestroyProducer(t),
... | explode_data.jsonl/51556 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 377
} | [
2830,
3393,
14603,
7849,
40,
309,
10268,
9030,
8657,
6025,
14245,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
97491,
1669,
330,
8935,
40,
309,
10268,
9030,
1,
488,
10382,
703,
1155,
11,
220,
16,
15,
340,
5195,
5082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidatorMultiCreates(t *testing.T) {
_, _, mk := CreateTestInput(t, false, SufficientInitPower)
params := DefaultParams()
params.MaxValidators = 1
params.Epoch = 1
startUpValidator := NewValidator(addrVals[0], PKs[0], Description{}, types.DefaultMinSelfDelegation)
startUpStatus := baseValidatorStatus... | explode_data.jsonl/53778 | {
"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,
14256,
20358,
54868,
1155,
353,
8840,
836,
8,
1476,
197,
6878,
8358,
23789,
1669,
4230,
2271,
2505,
1155,
11,
895,
11,
328,
26683,
3803,
14986,
692,
25856,
1669,
7899,
4870,
741,
25856,
14535,
31748,
284,
220,
16,
198,
25856... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPairs(t *testing.T) {
pairs := Pairs{
{Priority: 4},
{Priority: 3},
{Priority: 100},
{Priority: 0, ComponentID: 2},
{Priority: 0, ComponentID: 1},
{Priority: 4},
{Priority: 5},
{Priority: 9},
{Priority: 8},
}
sort.Sort(pairs)
expectedOrder := []struct {
priority int64
component int
... | explode_data.jsonl/9181 | {
"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,
54228,
1155,
353,
8840,
836,
8,
341,
3223,
4720,
1669,
393,
4720,
515,
197,
197,
90,
20555,
25,
220,
19,
1583,
197,
197,
90,
20555,
25,
220,
18,
1583,
197,
197,
90,
20555,
25,
220,
16,
15,
15,
1583,
197,
197,
90,
205... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestELEMENTFromMont(t *testing.T) {
parameters := gopter.DefaultTestParameters()
parameters.MinSuccessfulTests = 10000
properties := gopter.NewProperties(parameters)
genA := gen()
properties.Property("Assembly implementation must be consistent with generic one", prop.ForAll(
func(a testPairElement) bool... | explode_data.jsonl/70340 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
91754,
3830,
34415,
1155,
353,
8840,
836,
8,
1476,
67543,
1669,
728,
73137,
13275,
2271,
9706,
741,
67543,
17070,
36374,
18200,
284,
220,
16,
15,
15,
15,
15,
271,
86928,
1669,
728,
73137,
7121,
7903,
37959,
692,
82281,
32,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestServerTcpNoPort(t *testing.T) {
// possibly flaky but worth it
// try to connect to localhost:DefaultPort
// if connection succeeds, port is in use and skip test
// if it fails, make sure it is because connection refused
if conn, err := net.DialTimeout("tcp", net.JoinHostPort("localhost", DefaultPort), 2*... | explode_data.jsonl/4939 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 332
} | [
2830,
3393,
5475,
77536,
2753,
7084,
1155,
353,
8840,
836,
8,
341,
197,
322,
10767,
1320,
28100,
714,
5802,
432,
198,
197,
322,
1430,
311,
4564,
311,
47422,
25,
3675,
7084,
198,
197,
322,
421,
3633,
50081,
11,
2635,
374,
304,
990,
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... | 4 |
func TestTimeStampMillisLogicalTypeUnionEncode(t *testing.T) {
schema := `{"type": ["null", {"type": "long", "logicalType": "timestamp-millis"}]}`
testBinaryEncodeFail(t, schema, "test", "cannot transform binary timestamp-millis, expected time.Time, received string")
testBinaryCodecPass(t, schema, nil, []byte("\x00"... | explode_data.jsonl/12004 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 173
} | [
2830,
3393,
66146,
17897,
64312,
929,
32658,
32535,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
1669,
1565,
4913,
1313,
788,
4383,
2921,
497,
5212,
1313,
788,
330,
4825,
497,
330,
30256,
929,
788,
330,
13035,
1448,
56212,
9207,
13989,
398... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCBCEncryptAndDecrypt(t *testing.T) {
var key = "1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9"
var iv = "d58ce954203b7c9a9a9d467f59839249"
keyByteAry, _ := hex.DecodeString(key)
ivByteAry, _ := hex.DecodeString(iv)
plainText := "6368616e676520746869732070617373"
crypted, err := AESC... | explode_data.jsonl/59365 | {
"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,
12979,
2104,
1016,
3571,
3036,
89660,
1155,
353,
8840,
836,
8,
341,
2405,
1376,
284,
330,
16,
5918,
23,
95840,
15,
68,
22,
24,
23,
20,
638,
15,
65,
21,
17,
15,
18,
64,
20,
20,
23,
20,
20,
64,
16,
15,
18,
19,
9429... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTemplateBOM(t *testing.T) {
b := newTestSitesBuilder(t).WithSimpleConfigFile()
bom := "\ufeff"
b.WithTemplatesAdded(
"_default/baseof.html", bom+`
Base: {{ block "main" . }}base main{{ end }}`,
"_default/single.html", bom+`{{ define "main" }}Hi!?{{ end }}`)
b.WithContent("page.md", `---
title: "Pag... | explode_data.jsonl/60651 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
7275,
33,
1898,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
501,
2271,
93690,
3297,
1155,
568,
2354,
16374,
2648,
1703,
741,
2233,
316,
1669,
2917,
1704,
6445,
1837,
2233,
26124,
51195,
19337,
1006,
197,
197,
35089,
2258,
2609... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExportImport(t *testing.T) {
// make the storage with reasonable defaults
cstore := NewInMemory()
info, _, err := cstore.CreateMnemonic("john", English, "secretcpw", Secp256k1)
require.NoError(t, err)
require.Equal(t, info.GetName(), "john")
john, err := cstore.Get("john")
require.NoError(t, err)
req... | explode_data.jsonl/10671 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
16894,
11511,
1155,
353,
8840,
836,
8,
341,
197,
322,
1281,
279,
5819,
448,
13276,
16674,
198,
1444,
4314,
1669,
1532,
641,
10642,
2822,
27043,
11,
8358,
1848,
1669,
272,
4314,
7251,
44,
70775,
445,
47817,
497,
6364,
11,
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 TestSeries_EndsWith(t *testing.T) {
// assert that function returns a correct bool Series
s := NewSeries("test", "we are", "leaving now", nil, "right now", "bar")
assert.Equal(t, NewSeries("HasSuffix(test)", false, true, false, true, false),
s.EndsWith("now"))
} | explode_data.jsonl/54088 | {
"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,
25544,
49953,
16056,
1155,
353,
8840,
836,
8,
341,
197,
322,
2060,
429,
729,
4675,
264,
4396,
1807,
11131,
198,
1903,
1669,
1532,
25544,
445,
1944,
497,
330,
896,
525,
497,
330,
273,
2317,
1431,
497,
2092,
11,
330,
1291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJobSpecsController_Create_NonExistentTaskJob(t *testing.T) {
t.Parallel()
rpcClient, gethClient, _, assertMocksCalled := cltest.NewEthMocksWithStartupAssertions(t)
defer assertMocksCalled()
app, cleanup := cltest.NewApplication(t,
eth.NewClientWith(rpcClient, gethClient),
)
defer cleanup()
require.NoE... | explode_data.jsonl/31809 | {
"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,
12245,
8327,
82,
2051,
34325,
1604,
263,
840,
18128,
6262,
12245,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
7000,
3992,
2959,
11,
633,
71,
2959,
11,
8358,
2060,
72577,
20960,
1669,
1185,
1944,
7121,
65390,
11571,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCCServerEmpty(t *testing.T) {
RegisterTestingT(t)
myModel := model.NewModel()
crossConnectAddress := "127.0.0.1:0"
grpcServer, monitor, sock, err := startAPIServer(myModel, crossConnectAddress)
defer grpcServer.Stop()
crossConnectAddress = sock.Addr().String()
Expect(err).To(BeNil())
monitor.Upda... | explode_data.jsonl/49127 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
3706,
5475,
3522,
1155,
353,
8840,
836,
8,
341,
79096,
16451,
51,
1155,
692,
13624,
1712,
1669,
1614,
7121,
1712,
2822,
1444,
2128,
14611,
4286,
1669,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
15,
1837,
197,
56585,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_getbaseURL(t *testing.T) {
type args struct {
dda *datadoghqv1alpha1.DatadogAgent
}
tests := []struct {
name string
args args
want string
}{
{
name: "Get default baseURL",
args: args{
dda: test.NewDefaultedDatadogAgent("foo", "bar", &test.NewDatadogAgentOptions{}),
},
want: "http... | explode_data.jsonl/8878 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 680
} | [
2830,
3393,
3062,
3152,
3144,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
197,
71487,
353,
5911,
329,
63936,
69578,
16,
7141,
16,
909,
266,
329,
538,
16810,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestTLSCert(t *testing.T) {
tmpDir := t.TempDir()
tmpCA := path.Join(tmpDir, "ca.pem")
err := os.WriteFile(tmpCA, fixtures.LocalhostCert, 0o644)
require.NoError(t, err)
tests := []struct {
name string
conf *FileConfig
}{
{
"read deprecated DB cert field",
&FileConfig{
Databases: Databases{
... | explode_data.jsonl/47183 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 643
} | [
2830,
3393,
13470,
3540,
529,
1155,
353,
8840,
836,
8,
341,
20082,
6184,
1669,
259,
65009,
6184,
741,
20082,
5049,
1669,
1815,
22363,
10368,
6184,
11,
330,
924,
49373,
5130,
9859,
1669,
2643,
4073,
1703,
10368,
5049,
11,
37664,
20856,
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 TestEventDecoding(t *testing.T) {
cc := []struct {
name string
input string
event Event
err error
}{
{
name: "empty_event",
input: "",
err: io.EOF,
},
{
name: "incomplete_event",
input: "data:ok\n",
err: io.EOF,
},
{
name: "only a comment",
input: ":start\n\n",... | explode_data.jsonl/75594 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 961
} | [
2830,
3393,
1556,
4900,
3700,
1155,
353,
8840,
836,
8,
341,
63517,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
22427,
914,
198,
197,
28302,
3665,
198,
197,
9859,
256,
1465,
198,
197,
59403,
197,
197,
515,
298,
11609,
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... | 4 |
func TestExportUint(t *testing.T) {
type UnsignedIntStruct struct {
UnsignedInt uint `json:"uint"`
}
schemaRef, _, err := NewSchemaRefForValue(&UnsignedIntStruct{}, UseAllExportedFields())
require.NoError(t, err)
require.Equal(t, &openapi3.SchemaRef{Value: &openapi3.Schema{
Type: "object",
Properties: map[s... | explode_data.jsonl/55876 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
16894,
21570,
1155,
353,
8840,
836,
8,
341,
13158,
97747,
1072,
9422,
2036,
341,
197,
197,
56421,
1072,
2622,
1565,
2236,
2974,
2496,
8805,
197,
630,
1903,
3416,
3945,
11,
8358,
1848,
1669,
1532,
8632,
3945,
2461,
1130,
2099... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccKeycloakOpenidClient_createAfterManualDestroy(t *testing.T) {
var client = &keycloak.OpenidClient{}
realmName := "terraform-" + acctest.RandString(10)
clientId := "terraform-" + acctest.RandString(10)
resource.Test(t, resource.TestCase{
ProviderFactories: testAccProviderFactories,
PreCheck: ... | explode_data.jsonl/52125 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 467
} | [
2830,
3393,
14603,
1592,
88751,
5002,
307,
2959,
8657,
6025,
52092,
14245,
1155,
353,
8840,
836,
8,
341,
2405,
2943,
284,
609,
792,
88751,
12953,
307,
2959,
31483,
17200,
7673,
675,
1669,
330,
61385,
27651,
488,
1613,
67880,
2013,
437,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.