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 TestGetDataRateIndexFromDataRate(t *testing.T) {
for _, tc := range []struct {
Name string
BandID string
DataRate ttnpb.DataRate
ExpectedDataRateIndex int
ErrorAssertion func(error) bool
}{
{
Name: "Valid_EU",
BandID: "EU_863_870",
DataRa... | explode_data.jsonl/69426 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 840
} | [
2830,
3393,
68957,
11564,
1552,
3830,
1043,
11564,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
21297,
1698,
914,
198,
197,
12791,
437,
915,
394,
914,
198,
197,
40927,
11564,
1060,
259,
1517,
16650,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGet(t *testing.T) {
lru := New(int64(0), nil)
lru.Add("key1", String("1234"))
v, ok := lru.Get("key1")
if !ok || string(v.(String)) != "1234" {
t.Fatalf("cache hit key1=1234 failed")
}
_, ok = lru.Get("key2")
if ok {
t.Fatalf("cache miss key2 failed")
}
} | explode_data.jsonl/16543 | {
"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,
1949,
1155,
353,
8840,
836,
8,
341,
8810,
2672,
1669,
1532,
1548,
21,
19,
7,
15,
701,
2092,
340,
8810,
2672,
1904,
445,
792,
16,
497,
923,
445,
16,
17,
18,
19,
5455,
5195,
11,
5394,
1669,
326,
2672,
2234,
445,
792,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAnonymous(t *testing.T) {
validate := New()
validate.RegisterTagNameFunc(func(fld reflect.StructField) string {
name := strings.SplitN(fld.Tag.Get("json"), ",", 2)[0]
if name == "-" {
return ""
}
return name
})
type Test struct {
Anonymous struct {
A string `validate:"required" json:"EH... | explode_data.jsonl/77217 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 543
} | [
2830,
3393,
32684,
1155,
353,
8840,
836,
8,
1476,
197,
7067,
1669,
1532,
741,
197,
7067,
19983,
22616,
9626,
18552,
955,
507,
8708,
51445,
1877,
8,
914,
341,
197,
11609,
1669,
9069,
19823,
45,
955,
507,
23676,
2234,
445,
2236,
3975,
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 TestQueryEscape(t *testing.T) {
for _, tt := range queryEscapeTests {
actual := QueryEscape(tt.in)
if tt.out != actual {
t.Errorf("QueryEscape(%q) = %q, want %q", tt.in, actual, tt.out)
}
// for bonus points, verify that escape:unescape is an identity.
roundtrip, err := QueryUnescape(actual)
if ro... | explode_data.jsonl/71722 | {
"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,
2859,
48124,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3239,
48124,
18200,
341,
197,
88814,
1669,
11361,
48124,
47152,
1858,
340,
197,
743,
17853,
2532,
961,
5042,
341,
298,
3244,
13080,
445,
2859,
48124,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInterpretOneCharacterStringLiteralType(t *testing.T) {
t.Parallel()
inter := parseCheckAndInterpret(t, `
fun test(): Type {
let c: String = "x"
return c.getType()
}
`)
result, err := inter.Invoke("test")
require.NoError(t, err)
require.Equal(t,
interpreter.TypeValue{Type... | explode_data.jsonl/73422 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
3306,
8043,
3966,
12404,
703,
17350,
929,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
58915,
1669,
4715,
3973,
3036,
3306,
8043,
1155,
11,
22074,
262,
2464,
1273,
4555,
3990,
341,
286,
1077,
272,
25,
923,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCacheLargePacket(t *testing.T) {
data := make([]byte, pageBytes*3)
test(t, []testSequence{
{
in: layers.TCP{
SrcPort: 1,
DstPort: 2,
Seq: 1001,
BaseLayer: layers.BaseLayer{Payload: data},
},
want: []Reassembly{},
},
{
in: layers.TCP{
SrcPort: 1,... | explode_data.jsonl/9657 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 425
} | [
2830,
3393,
8233,
34253,
16679,
1155,
353,
8840,
836,
8,
972,
8924,
1669,
1281,
10556,
3782,
11,
2150,
7078,
9,
18,
1218,
18185,
1155,
11,
3056,
1944,
14076,
1666,
197,
197,
1666,
298,
17430,
25,
13617,
836,
7123,
1666,
571,
7568,
128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUnmarshalerPanic(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Errorf("recover = nil, want error")
}
}()
m := &fakeUnmarshaler{err: errors.New("blah")}
MustUnmarshal(m, nil)
} | explode_data.jsonl/66764 | {
"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,
1806,
27121,
261,
47,
31270,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
368,
341,
197,
743,
435,
1669,
11731,
2129,
435,
621,
2092,
341,
298,
3244,
13080,
445,
74283,
284,
2092,
11,
1366,
1465,
1138,
197,
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... | 2 |
func TestParseIfStatementInit(t *testing.T) {
p := createParser(`if x = 0; x > 5 {
}`)
bvmUtils.Assert(t, isIfStatement(p), "should detect if statement")
parseIfStatement(p)
bvmUtils.AssertNow(t, len(p.errs) == 0, p.errs.Format())
first := p.scope.Next()
bvmUtils.Assert(t, first.Type() == ast.IfStatement, "Aste... | explode_data.jsonl/49712 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
14463,
2679,
8636,
3803,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1855,
6570,
5809,
333,
856,
284,
220,
15,
26,
856,
861,
220,
20,
1476,
197,
27085,
2233,
7338,
4209,
11711,
1155,
11,
374,
2679,
8636,
1295,
701,
330,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStateToTerminalViewUnresourcedYAMLManifest(t *testing.T) {
m := k8sManifest(t, model.UnresourcedYAMLManifestName, testyaml.SanchoYAML)
state := newState([]model.Manifest{m})
krs := state.ManifestTargets[m.Name].State.K8sRuntimeState()
krs.ApplyFilter = yamlToApplyFilter(t, testyaml.SanchoYAML)
state.Manif... | explode_data.jsonl/54856 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 271
} | [
2830,
3393,
1397,
1249,
47890,
851,
1806,
416,
53392,
56,
31102,
38495,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
595,
23,
82,
38495,
1155,
11,
1614,
10616,
416,
53392,
56,
31102,
38495,
675,
11,
1273,
41466,
808,
276,
958,
56,
31102,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_forwardProcessBlock(t *testing.T) {
tmpDir, err := ioutil.TempDir("", "")
require.NoError(t, err)
mapper, _ := eosSearch.NewBlockMapper("dfuseiohooks:event", false, "*")
preIndexer := search.NewPreIndexer(mapper, tmpDir)
cases := []struct {
name string
block *pbcodec... | explode_data.jsonl/14625 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1295
} | [
2830,
3393,
32121,
7423,
4713,
1155,
353,
8840,
836,
8,
341,
20082,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
14676,
17957,
35699,
1155,
11,
1848,
340,
2109,
3106,
11,
716,
1669,
61794,
5890,
7121,
4713,
10989,
445,
2940,
810,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetEnabledPairs(t *testing.T) {
cfg := GetConfig()
err := cfg.LoadConfig(ConfigTestFile)
if err != nil {
t.Errorf(
"Test failed. TestGetEnabledPairs. LoadConfig Error: %s", err.Error(),
)
}
_, err = cfg.GetEnabledPairs("asdf")
if err == nil {
t.Error(
"Test failed. TestGetEnabledPairs. Non-e... | explode_data.jsonl/21890 | {
"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,
1949,
5462,
54228,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
2126,
2648,
741,
9859,
1669,
13286,
13969,
2648,
33687,
2271,
1703,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
1006,
298,
197,
1,
2271,
4641,
13,
3393,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVersionedCheckpointsSpecialCase3(t *testing.T) {
tree := NewMutableTree(db.NewMemDB(), 0)
tree.Set([]byte("n"), []byte("2wUCUs8q"))
tree.Set([]byte("l"), []byte("WQ7mvMbc"))
tree.SaveVersion()
tree.Set([]byte("N"), []byte("ved29IqU"))
tree.Set([]byte("v"), []byte("01jquVXU"))
tree.SaveVersion()
tree... | explode_data.jsonl/25129 | {
"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,
5637,
291,
3973,
7706,
20366,
4207,
18,
1155,
353,
8840,
836,
8,
341,
51968,
1669,
1532,
11217,
6533,
9791,
7121,
18816,
3506,
1507,
220,
15,
692,
51968,
4202,
10556,
3782,
445,
77,
3975,
3056,
3782,
445,
17,
86,
5459,
355... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreMark(t *testing.T) {
assert := assert.New(t)
db := dbm.NewMemDB()
store := NewStore(db)
// before we do anything, priority/pending are empty
priorityEv := store.PriorityEvidence()
pendingEv := store.PendingEvidence(-1)
assert.Equal(0, len(priorityEv))
assert.Equal(0, len(pendingEv))
priority :... | explode_data.jsonl/47406 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 528
} | [
2830,
3393,
6093,
8949,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
20939,
1669,
2927,
76,
7121,
18816,
3506,
741,
57279,
1669,
1532,
6093,
9791,
692,
197,
322,
1573,
582,
653,
4113,
11,
10619,
4322,
2459,
525,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHeadTracker_ReconnectOnError(t *testing.T) {
t.Parallel()
g := gomega.NewGomegaWithT(t)
db := pgtest.NewGormDB(t)
config := newCfg(t)
orm := headtracker.NewORM(db, cltest.FixtureChainID)
ethClient, sub := cltest.NewEthClientAndSubMockWithDefaultChain(t)
ethClient.On("SubscribeNewHead", mock.Anything, ... | explode_data.jsonl/63750 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 428
} | [
2830,
3393,
12346,
31133,
50693,
6459,
74945,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
692,
20939,
1669,
17495,
1944,
7121,
38,
493,
3506,
1155,
340,
25873,
1669,
501... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransformImportedTypes(t *testing.T) {
schema := []byte(`
syntax = "proto3";
package test;
import "google/protobuf/any.proto";
message ErrorStatus {
string message = 1;
repeated google.protobuf.Any details = 2;
}
`)
input := new(bytes.Buffer)
input.Write(schema)
output := new(bytes.B... | explode_data.jsonl/2071 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 265
} | [
2830,
3393,
8963,
11511,
291,
4173,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
1669,
3056,
3782,
61528,
197,
1903,
13662,
284,
330,
15110,
18,
876,
197,
197,
1722,
1273,
401,
197,
21918,
330,
17485,
14,
32921,
14,
3767,
57322,
3302,
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... | 3 |
func TestR4GetOperation(t *testing.T) {
teardown := setup(t, jsonformat.R4)
defer teardown()
orgID := "f5fe538f-c3b5-4454-8774-cd3789f59b9f"
muxCDR.HandleFunc("/store/fhir/"+cdrOrgID+"/Organization/"+orgID, func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/fhir+json;fhir... | explode_data.jsonl/40619 | {
"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,
49,
19,
1949,
8432,
1155,
353,
8840,
836,
8,
341,
197,
665,
37496,
1669,
6505,
1155,
11,
2951,
2243,
2013,
19,
340,
16867,
49304,
2822,
87625,
915,
1669,
330,
69,
20,
1859,
20,
18,
23,
69,
1786,
18,
65,
20,
12,
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 TestParseIPPortInvalid(t *testing.T) {
testcases := []string{
"",
"C0A80016",
"C0A800:1234",
"FOOBARBA:1234",
"C0A80016:0CEA:1234",
}
for _, s := range testcases {
ip, port, err := parseIPPort(s)
if ip != nil || port != uint16(0) || err == nil {
t.Errorf("Expected error for input %s, have ip =... | explode_data.jsonl/52484 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 178
} | [
2830,
3393,
14463,
3298,
7084,
7928,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
917,
515,
197,
197,
39680,
197,
197,
46316,
15,
32,
23,
15,
15,
16,
21,
756,
197,
197,
46316,
15,
32,
23,
15,
15,
25,
16,
17,
18,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestNewIndexDatabase(t *testing.T) {
ctrl := gomock.NewController(t)
defer func() {
_ = fileutil.RemoveDir(testPath)
ctrl.Finish()
}()
mockMetadata := metadb.NewMockMetadata(ctrl)
mockMetadata.EXPECT().DatabaseName().Return("test").AnyTimes()
db, err := NewIndexDatabase(context.TODO(), testPath, mockMet... | explode_data.jsonl/33820 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 223
} | [
2830,
3393,
3564,
1552,
5988,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
2915,
368,
341,
197,
197,
62,
284,
1034,
1314,
13270,
6184,
8623,
1820,
692,
197,
84381,
991,
18176,
741,
197,
6982... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSyncJobRunPresenter_HappyPath(t *testing.T) {
newAddress := common.HexToAddress("0x9FBDa871d559710256a2502A2517b794B482Db40")
requestID := common.HexToHash("0xcafe")
txHash := common.HexToHash("0xdeadbeef")
task0RunID := models.NewID()
task1RunID := models.NewID()
job := models.JobSpec{ID: models.NewID... | explode_data.jsonl/66338 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1213
} | [
2830,
3393,
12154,
12245,
6727,
33849,
2039,
11144,
1820,
1155,
353,
8840,
836,
8,
341,
8638,
4286,
1669,
4185,
91538,
1249,
4286,
445,
15,
87,
24,
37,
9548,
64,
23,
22,
16,
67,
20,
20,
24,
22,
16,
15,
17,
20,
21,
64,
17,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestZeroRat(t *testing.T) {
var x, y, z Rat
y.SetFrac64(0, 42)
if x.Cmp(&y) != 0 {
t.Errorf("x and y should be both equal and zero")
}
if s := x.String(); s != "0/1" {
t.Errorf("got x = %s, want 0/1", s)
}
if s := x.RatString(); s != "0" {
t.Errorf("got x = %s, want 0", s)
}
z.Add(&x, &y)
if s ... | explode_data.jsonl/35065 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 369
} | [
2830,
3393,
17999,
49,
266,
1155,
353,
8840,
836,
8,
341,
2405,
856,
11,
379,
11,
1147,
40577,
198,
14522,
4202,
37,
19959,
21,
19,
7,
15,
11,
220,
19,
17,
692,
743,
856,
727,
1307,
2099,
88,
8,
961,
220,
15,
341,
197,
3244,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestContains(t *testing.T) {
items := []string{"item1", "item2", "item3"}
require.True(t, contains(items, "item2"))
require.False(t, contains(items, "item5"))
} | explode_data.jsonl/4334 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
23805,
1155,
353,
8840,
836,
8,
341,
46413,
1669,
3056,
917,
4913,
1203,
16,
497,
330,
1203,
17,
497,
330,
1203,
18,
16707,
17957,
32443,
1155,
11,
5610,
24337,
11,
330,
1203,
17,
5455,
17957,
50757,
1155,
11,
5610,
24337,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseEnv(t *testing.T) {
tests := []struct {
envArray []string
expected []api.EnvVar
expectErr bool
test string
}{
{
envArray: []string{
"THIS_ENV=isOK",
"HAS_COMMAS=foo,bar",
"HAS_EQUALS=jJnro54iUu75xNy==",
},
expected: []api.EnvVar{
{
Name: "THIS_ENV",
V... | explode_data.jsonl/64189 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 764
} | [
2830,
3393,
14463,
14359,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
57538,
1857,
220,
3056,
917,
198,
197,
42400,
220,
3056,
2068,
81214,
3962,
198,
197,
24952,
7747,
1807,
198,
197,
18185,
414,
914,
198,
197,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestInvalidJSONUnmarshal(t *testing.T) {
cases := []struct {
name string
req map[string]interface{}
target interface{}
}{
{
name: "InvalidTTLSegments",
req: map[string]interface{}{
"ttl": "1.2.3s",
},
target: &AndroidConfig{},
},
{
name: "IncorrectTTLSeconds",
req: map[stri... | explode_data.jsonl/75175 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 505
} | [
2830,
3393,
7928,
5370,
1806,
27121,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
24395,
262,
2415,
14032,
31344,
16094,
197,
28861,
3749,
16094,
197,
59403,
197,
197,
515,
298,
11609,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShowMessageParams(t *testing.T) {
t.Parallel()
const (
want = `{"message":"error message","type":1}`
wantUnknown = `{"message":"unknown message","type":0}`
)
wantType := ShowMessageParams{
Message: "error message",
Type: MessageTypeError,
}
wantTypeUnkonwn := ShowMessageParams{
Messa... | explode_data.jsonl/16158 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1241
} | [
2830,
3393,
7812,
2052,
4870,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
4777,
2399,
197,
50780,
286,
284,
1565,
4913,
1994,
3252,
841,
1943,
2198,
1313,
788,
16,
31257,
197,
50780,
13790,
284,
1565,
4913,
1994,
3252,
16088,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkflowTemplateServer_DeleteClusterWorkflowTemplate(t *testing.T) {
server, ctx := getClusterWorkflowTemplateServer()
t.Run("Labelled", func(t *testing.T) {
_, err := server.DeleteClusterWorkflowTemplate(ctx, &clusterwftmplpkg.ClusterWorkflowTemplateDeleteRequest{
Name: "cluster-workflow-template-whale... | explode_data.jsonl/48139 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 225
} | [
2830,
3393,
62768,
7275,
5475,
57418,
28678,
62768,
7275,
1155,
353,
8840,
836,
8,
341,
41057,
11,
5635,
1669,
633,
28678,
62768,
7275,
5475,
741,
3244,
16708,
445,
2476,
832,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
6878,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrintStorageVersion(t *testing.T) {
commonEncodingVersion := "v1"
tests := []struct {
sv apiserverinternal.StorageVersion
expected []metav1.TableRow
}{
{
sv: apiserverinternal.StorageVersion{
ObjectMeta: metav1.ObjectMeta{
Name: "empty",
CreationTimestamp: metav1.Ti... | explode_data.jsonl/72311 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1788
} | [
2830,
3393,
8994,
5793,
5637,
1155,
353,
8840,
836,
8,
341,
83825,
14690,
5637,
1669,
330,
85,
16,
698,
78216,
1669,
3056,
1235,
341,
197,
1903,
85,
981,
97723,
2836,
10481,
43771,
5637,
198,
197,
42400,
3056,
4059,
402,
16,
18257,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClustersReplicationFactorMin(t *testing.T) {
ctx := context.Background()
if nClusters < 5 {
t.Skip("Need at least 5 peers")
}
clusters, mock := createClusters(t)
defer shutdownClusters(t, clusters, mock)
for _, c := range clusters {
c.config.ReplicationFactorMin = nClusters - 1
c.config.Replicatio... | explode_data.jsonl/66615 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
94992,
18327,
1693,
20661,
6217,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
743,
308,
94992,
366,
220,
20,
341,
197,
3244,
57776,
445,
23657,
518,
3245,
220,
20,
25029,
1138,
197,
630,
39407,
14605,
11,
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... | 5 |
func TestPrometheus_GetDescIsStable(t *testing.T) {
metric := &Prometheus{
Name: "test-metric",
Labels: []*MetricLabel{
{Key: "foo", Value: "bar"},
{Key: "hello", Value: "World"},
},
Histogram: &Histogram{
Buckets: []Amount{{"10"}, {"20"}, {"30"}},
},
}
stableDesc := metric.GetDesc()
for i := 0; ... | explode_data.jsonl/26047 | {
"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,
35186,
39705,
13614,
11065,
3872,
623,
480,
1155,
353,
8840,
836,
8,
341,
2109,
16340,
1669,
609,
35186,
39705,
515,
197,
21297,
25,
330,
1944,
1448,
16340,
756,
197,
197,
23674,
25,
29838,
54310,
2476,
515,
298,
197,
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... | 3 |
func TestResourceSpansWireCompatibility(t *testing.T) {
// This test verifies that OTLP ProtoBufs generated using goproto lib in
// opentelemetry-proto repository OTLP ProtoBufs generated using gogoproto lib in
// this repository are wire compatible.
// Generate ResourceSpans as pdata struct.
pdataRS := generateT... | explode_data.jsonl/79479 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 432
} | [
2830,
3393,
4783,
6406,
596,
37845,
85880,
1155,
353,
8840,
836,
8,
341,
197,
322,
1096,
1273,
87856,
429,
8605,
12567,
57677,
15064,
82,
7907,
1667,
342,
45926,
983,
3051,
304,
198,
197,
322,
1179,
6817,
35958,
9838,
983,
12542,
8605,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVariableFunctionScoping(t *testing.T) {
withTestProcess("testvariables", t, func(p *proc.Target, fixture protest.Fixture) {
err := p.Continue()
assertNoError(err, t, "Continue() returned an error")
evalVariable(p, t, "a1")
evalVariable(p, t, "a2")
// Move scopes, a1 exists here by a2 does not
er... | explode_data.jsonl/56229 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 207
} | [
2830,
3393,
7827,
5152,
3326,
33707,
1155,
353,
8840,
836,
8,
341,
46948,
2271,
7423,
445,
1944,
18616,
497,
259,
11,
2915,
1295,
353,
15782,
35016,
11,
12507,
8665,
991,
12735,
8,
341,
197,
9859,
1669,
281,
2451,
6232,
741,
197,
6948... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInfoInvalidResponseJSONError(t *testing.T) {
client := &Client{
client: newMockClient(func(req *http.Request) (*http.Response, error) {
return &http.Response{
StatusCode: http.StatusOK,
Body: ioutil.NopCloser(bytes.NewReader([]byte("invalid json"))),
}, nil
}),
}
_, err := client.Inf... | explode_data.jsonl/70205 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 185
} | [
2830,
3393,
1731,
7928,
2582,
5370,
1454,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
609,
2959,
515,
197,
25291,
25,
501,
11571,
2959,
18552,
6881,
353,
1254,
9659,
8,
4609,
1254,
12574,
11,
1465,
8,
341,
298,
853,
609,
1254,
12574,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPayload_Type(t *testing.T) {
t.Parallel()
payload := Payload{
"type": "test",
}
t.Run("normal test", func(t *testing.T) {
result := payload.Type()
assert.Equal(t, "test", result)
})
} | explode_data.jsonl/29917 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
29683,
13729,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
76272,
1669,
52916,
515,
197,
197,
44470,
788,
330,
1944,
756,
197,
630,
3244,
16708,
445,
8252,
1273,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
9559,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestModelAvg_Forward(t *testing.T) {
model := newTestModel(Avg)
g := ag.NewGraph()
ctx := nn.Context{Graph: g, Mode: nn.Training}
// == Forward
x1 := g.NewVariable(mat.NewVecDense([]mat.Float{0.5, 0.6}), true)
x2 := g.NewVariable(mat.NewVecDense([]mat.Float{0.7, -0.4}), true)
x3 := g.NewVariable(mat.NewVe... | explode_data.jsonl/67750 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 343
} | [
2830,
3393,
1712,
39447,
84368,
1606,
1155,
353,
8840,
836,
8,
341,
19727,
1669,
501,
2271,
1712,
4346,
7239,
340,
3174,
1669,
933,
7121,
11212,
741,
20985,
1669,
10883,
9328,
90,
11212,
25,
342,
11,
14562,
25,
10883,
8240,
2056,
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... | 1 |
func TestIntList(t *testing.T) {
for idx, tc := range sharedIntCases {
t.Run(fmt.Sprintf("int/%d", idx), func(t *testing.T) {
tt := assert.WrapTB(t)
out, skip := tc.AsInts()
if skip {
t.Skip()
}
var v IntList
fs := cmdy.NewFlagSet()
fs.Var(&v, "s", "test")
err := fs.Parse(tc.in)
if t... | explode_data.jsonl/58341 | {
"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,
1072,
852,
1155,
353,
8840,
836,
8,
341,
2023,
7187,
11,
17130,
1669,
2088,
6094,
1072,
37302,
341,
197,
3244,
16708,
28197,
17305,
445,
396,
12627,
67,
497,
7187,
701,
2915,
1155,
353,
8840,
836,
8,
341,
298,
3244,
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... | 3 |
func Test_hasCycleUsingSet(t *testing.T) {
t.Parallel()
t.Run("cycle in position 1", func(t *testing.T) {
t.Parallel()
tail := &Node{
Value: -4,
Next: nil,
}
list := &Node{
Value: 3,
Next: &Node{
Value: 2,
Next: &Node{
Value: 0,
Next: tail,
},
},
}
tail.Next = li... | explode_data.jsonl/17960 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 475
} | [
2830,
3393,
21778,
44820,
16429,
1649,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3244,
16708,
445,
21621,
304,
2309,
220,
16,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3244,
41288,
7957,
2822,
197,
3244,
604,
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 TestContainerSpecTty(t *testing.T) {
testID := "test-id"
testSandboxID := "sandbox-id"
testPid := uint32(1234)
containerConfig, sandboxConfig, imageConfig, specCheck := getCreateContainerTestData()
ociRuntime := config.Runtime{}
c := newTestCRIService()
for _, tty := range []bool{true, false} {
containerC... | explode_data.jsonl/6405 | {
"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,
4502,
8327,
51,
1881,
1155,
353,
8840,
836,
8,
341,
18185,
915,
1669,
330,
1944,
12897,
698,
18185,
50,
31536,
915,
1669,
330,
76756,
12897,
698,
18185,
32339,
1669,
2622,
18,
17,
7,
16,
17,
18,
19,
340,
53290,
2648,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNodeCount(t *testing.T) {
graphSpec := types.GraphSpec{
Edges: []types.Edge{{Source: "n1", Target: "n2"}, {Source: "n1", Target: "n3"}, {Source: "n2", Target: "n4"}},
}
if NodeCount(&graphSpec) != 4 {
t.Error("")
}
} | explode_data.jsonl/62516 | {
"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,
1955,
2507,
1155,
353,
8840,
836,
8,
341,
66616,
8327,
1669,
4494,
40237,
8327,
515,
197,
197,
41122,
25,
3056,
9242,
13,
11656,
2979,
3608,
25,
330,
77,
16,
497,
13483,
25,
330,
77,
17,
14345,
314,
3608,
25,
330,
77,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTiernanSimpleCyclesInto(t *testing.T) {
g := graph.NewSimpleDirectedGraphWithFeatures(graph.DeterministicIteration)
g.AddVertex("a")
g.AddVertex("b")
g.AddVertex("c")
g.Connect("a", "b")
g.Connect("b", "c")
g.Connect("c", "a")
var cycles [][]string
assert.NotPanics(t, func() {
TiernanSimpleCyclesO... | explode_data.jsonl/67942 | {
"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,
45351,
932,
276,
16374,
34,
15805,
26591,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
4771,
7121,
16374,
92669,
11212,
2354,
21336,
24312,
909,
16483,
4532,
53101,
340,
3174,
1904,
8320,
445,
64,
1138,
3174,
1904,
8320,
445,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFullParseJWE(t *testing.T) {
// Messages that should succeed to parse
successes := []string{
// Flattened serialization, single recipient
"{\"protected\":\"eyJhbGciOiJYWVoiLCJlbmMiOiJYWVoifQo\",\"encrypted_key\":\"QUJD\",\"iv\":\"QUJD\",\"ciphertext\":\"QUJD\",\"tag\":\"QUJD\"}",
// Unflattened se... | explode_data.jsonl/14776 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1057
} | [
2830,
3393,
9432,
14463,
41,
12457,
1155,
353,
8840,
836,
8,
972,
197,
322,
26729,
429,
1265,
11996,
311,
4715,
319,
30553,
288,
1669,
3056,
917,
1666,
197,
197,
322,
2988,
1587,
6758,
47443,
11,
3175,
21713,
319,
197,
197,
14129,
210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetFileRef(t *testing.T) {
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
t.Errorf("Bad method: %s", r.Method)
}
if r.URL.Path != "/repos/k8s/kuber/contents/foo/bar.txt" {
t.Errorf("Bad request path: %s", r.URL)
}
if ... | explode_data.jsonl/6282 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 406
} | [
2830,
3393,
1949,
1703,
3945,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
13470,
1220,
2836,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
743,
435,
20798,
961,
1758,
20798,
1949,
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... | 5 |
func TestSignHeader(t *testing.T) {
//create only what we need to test the seal
var testRaftId uint16 = 5
config := &node.Config{Name: "unit-test", DataDir: ""}
nodeKey := config.NodeKey()
raftProtocolManager := &ProtocolManager{raftId: testRaftId}
raftService := &RaftService{nodeKey: nodeKey, raftProtocolManag... | explode_data.jsonl/13615 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 623
} | [
2830,
3393,
7264,
4047,
1155,
353,
8840,
836,
8,
341,
197,
322,
3182,
1172,
1128,
582,
1184,
311,
1273,
279,
25349,
198,
2405,
1273,
55535,
723,
764,
2622,
16,
21,
284,
220,
20,
198,
25873,
1669,
609,
3509,
10753,
63121,
25,
330,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReposService_List(t *testing.T) {
var s repos
ctx := testContext()
wantRepos := []*types.Repo{
{Name: "r1"},
{Name: "r2"},
}
calledList := db.Mocks.Repos.MockList(t, "r1", "r2")
repos, err := s.List(ctx, db.ReposListOptions{})
if err != nil {
t.Fatal(err)
}
if !*calledList {
t.Error("!calle... | explode_data.jsonl/77406 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 202
} | [
2830,
3393,
693,
966,
1860,
27104,
1155,
353,
8840,
836,
8,
341,
2405,
274,
45774,
198,
20985,
1669,
1273,
1972,
2822,
50780,
693,
966,
1669,
29838,
9242,
2817,
5368,
515,
197,
197,
63121,
25,
330,
81,
16,
7115,
197,
197,
63121,
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 TestGrep(t *testing.T) {
u := gptest.NewUnitTester(t)
defer u.Remove()
ctx := context.Background()
ctx = ctxutil.WithAlwaysYes(ctx, true)
ctx = ctxutil.WithInteractive(ctx, false)
act, err := newMock(ctx, u)
require.NoError(t, err)
require.NotNil(t, act)
buf := &bytes.Buffer{}
out.Stdout = buf
defer f... | explode_data.jsonl/60983 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 451
} | [
2830,
3393,
38,
9995,
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,
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 TestAsyncProducer(t *testing.T) {
// the default for producers is a fire-and-forget model that doesn't return
// successes
t.Run("Without Successes", func(t *testing.T) {
t.Skip("Skipping test because sarama.MockBroker doesn't work with versions >= sarama.V0_11_0_0 " +
"https://github.com/Shopify/sarama/is... | explode_data.jsonl/28006 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1002
} | [
2830,
3393,
6525,
45008,
1155,
353,
8840,
836,
8,
341,
197,
322,
279,
1638,
369,
23308,
374,
264,
3940,
9777,
15193,
455,
1614,
429,
3171,
944,
470,
198,
197,
322,
47088,
198,
3244,
16708,
445,
26040,
13047,
288,
497,
2915,
1155,
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... | 2 |
func TestExecErrorsWhenTheSpecifiedCommandDoesNotExist(t *testing.T) {
t.Parallel()
p := script.Exec("doesntexist")
p.Wait()
if p.Error() == nil {
t.Error("want error running non-existent command")
}
} | explode_data.jsonl/51501 | {
"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,
10216,
13877,
4498,
785,
8327,
1870,
4062,
21468,
45535,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3223,
1669,
5316,
30798,
445,
27057,
406,
28575,
1138,
3223,
28384,
741,
743,
281,
6141,
368,
621,
2092,
341,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func Test_Pagination_PrevNext_PrevAnd1NextLink(t *testing.T) {
doc := testutil.CreateHTML()
body := dom.QuerySelector(doc, "body")
root := testutil.CreateDiv(0)
dom.AppendChild(body, root)
prevAnchor := testutil.CreateAnchor("prev", "prev page")
nextAnchor := testutil.CreateAnchor("page2", "next page")
dom.App... | explode_data.jsonl/10829 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
1088,
10353,
1088,
7282,
5847,
1088,
7282,
3036,
16,
5847,
3939,
1155,
353,
8840,
836,
8,
341,
59536,
1669,
1273,
1314,
7251,
5835,
741,
35402,
1669,
4719,
15685,
5877,
19153,
11,
330,
2599,
5130,
33698,
1669,
1273,
1314,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshalPublish(t *testing.T) {
testCases := map[string]struct {
inContent string
wantedPublish PublishConfig
wantedErr error
}{
"Valid publish yaml": {
inContent: `topics:
- name: tests
allowed_workers:
- hello
`,
wantedPublish: PublishConfig{
Topics: []Topic{
{
... | explode_data.jsonl/79738 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 551
} | [
2830,
3393,
1806,
27121,
50145,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
17430,
2762,
257,
914,
198,
197,
6692,
7566,
50145,
23499,
2648,
198,
197,
6692,
7566,
7747,
257,
1465,
198,
197,
59403,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAppSdkVersionByPartition(t *testing.T) {
testJavaError(t, "sdk_version must have a value when the module is located at vendor or product", `
android_app {
name: "foo",
srcs: ["a.java"],
vendor: true,
platform_apis: true,
}
`)
testJava(t, `
android_app {
name: "bar",
srcs: ["b.java"]... | explode_data.jsonl/58490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 427
} | [
2830,
3393,
2164,
57175,
5637,
1359,
49978,
1155,
353,
8840,
836,
8,
341,
18185,
15041,
1454,
1155,
11,
330,
51295,
9438,
1969,
614,
264,
897,
979,
279,
4688,
374,
7407,
518,
20728,
476,
1985,
497,
22074,
197,
197,
5954,
8191,
341,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestContext2Plan_taintIgnoreChanges(t *testing.T) {
m := testModule(t, "plan-taint-ignore-changes")
p := testProvider("aws")
p.GetSchemaReturn = &ProviderSchema{
ResourceTypes: map[string]*configschema.Block{
"aws_instance": {
Attributes: map[string]*configschema.Attribute{
"id": {Type: cty.Stri... | explode_data.jsonl/28701 | {
"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,
1972,
17,
20485,
528,
1641,
12497,
11317,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1273,
3332,
1155,
11,
330,
10393,
2385,
1641,
43171,
11582,
5520,
1138,
3223,
1669,
1273,
5179,
445,
8635,
1138,
3223,
2234,
8632,
5598,
284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestDockerPullImage(t *testing.T) {
image := "test_image"
ctx := context.Background()
mockCtrl := gomock.NewController(t)
executable := mockexecutables.NewMockExecutable(mockCtrl)
executable.EXPECT().Execute(ctx, "pull", image).Return(bytes.Buffer{}, nil)
d := executables.NewDocker(executable)
err := d.Pu... | explode_data.jsonl/6802 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
35,
13659,
36068,
1906,
1155,
353,
8840,
836,
8,
341,
31426,
1669,
330,
1944,
4954,
1837,
20985,
1669,
2266,
19047,
741,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
1155,
692,
67328,
5922,
1669,
7860,
11748,
332,
4788,
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... | 2 |
func TestReadArchiveMultipleUpdates(t *testing.T) {
// first create archive, that we will be able to read
updateTestDir, _ := ioutil.TempDir("", "update")
defer os.RemoveAll(updateTestDir)
archive, err := WriteRootfsImageArchive(updateTestDir, RootfsImageStructMultiple)
assert.NoError(t, err)
assert.NotEqual(t, ... | explode_data.jsonl/35295 | {
"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,
4418,
42502,
32089,
37091,
1155,
353,
8840,
836,
8,
341,
197,
322,
1156,
1855,
18132,
11,
429,
582,
686,
387,
2952,
311,
1349,
198,
27175,
2271,
6184,
11,
716,
1669,
43144,
65009,
6184,
19814,
330,
2386,
1138,
16867,
2643,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNodeMapUnmarshalYAML(t *testing.T) {
var tests = []struct {
name string
mockUnmarshal func(interface{}) error
expected NodeMap
wantErr bool
}{
{
name: "ValidUnmarshal",
mockUnmarshal: func(v interface{}) error {
result, ok := v.(*map[string]string)
if !ok {
re... | explode_data.jsonl/66731 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 720
} | [
2830,
3393,
1955,
2227,
1806,
27121,
56,
31102,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
77333,
1806,
27121,
2915,
75487,
28875,
1465,
198,
197,
42400,
414,
6018,
2227,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestWriteConcernWithOptions(t *testing.T) {
t.Run("on nil WriteConcern", func(t *testing.T) {
var wc *writeconcern.WriteConcern
wc = wc.WithOptions(writeconcern.WMajority())
require.Equal(t, wc.GetW().(string), "majority")
})
t.Run("on existing WriteConcern", func(t *testing.T) {
wc := writeconcern.New... | explode_data.jsonl/44437 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 452
} | [
2830,
3393,
7985,
62142,
74238,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
263,
2092,
9645,
62142,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
2405,
26548,
353,
4934,
443,
28544,
4073,
62142,
271,
197,
88858,
284,
26548,
26124,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCapability_FormatToCapability(t *testing.T) {
assert := assert.New(t)
// Ensure all ffmpeg-enumerated formats are represented during conversion
for _, format := range ffmpeg.ExtensionFormats {
_, err := formatToCapability(format)
assert.Nil(err)
}
// ensure error is triggered for unrepresented values
... | explode_data.jsonl/74082 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
63746,
72999,
1249,
63746,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
197,
322,
29279,
678,
84912,
20767,
3389,
657,
19856,
525,
15251,
2337,
14409,
198,
2023,
8358,
3561,
1669,
2088,
84912,
59715,
44599,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPostXappPush(t *testing.T) {
var tests = []struct {
description string
request models.XappRequest
jsonRequest string
jsonResponse string
expectedOutput *models.XappResponse
expectedError error
httpStatusCode int
}{
{
description: "successfully create push",
request: mod... | explode_data.jsonl/67192 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1490
} | [
2830,
3393,
4133,
55,
676,
16644,
1155,
353,
8840,
836,
8,
1476,
2405,
7032,
284,
3056,
1235,
341,
197,
42407,
262,
914,
198,
197,
23555,
286,
4119,
4338,
676,
1900,
198,
197,
30847,
1900,
262,
914,
198,
197,
30847,
2582,
256,
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 TestExpansionsInHighlevelConfig(t *testing.T) {
camroot, err := osutil.GoPackagePath("camlistore.org")
if err != nil {
t.Fatalf("failed to find camlistore.org GOPATH root: %v", err)
}
const keyID = "26F5ABDA"
os.Setenv("TMP_EXPANSION_TEST", keyID)
os.Setenv("TMP_EXPANSION_SECRING", filepath.Join(camroot, f... | explode_data.jsonl/9279 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 390
} | [
2830,
3393,
8033,
596,
908,
641,
11976,
3294,
2648,
1155,
353,
8840,
836,
8,
341,
1444,
309,
2888,
11,
1848,
1669,
2643,
1314,
67131,
13100,
1820,
445,
11599,
1607,
460,
2659,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
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... | 4 |
func TestPropertyDrop(t *testing.T) {
// GIVEN
graphName := "mygraph"
g := NewGraph(graphName)
require.NotNil(t, g)
v := NewVertexG(g)
require.NotNil(t, v)
p := NewPropertyV(v)
require.NotNil(t, p)
// WHEN
qb := p.Drop()
// THEN
assert.NotNil(t, qb)
assert.Equal(t, fmt.Sprintf("%s.drop()", graphName), p... | explode_data.jsonl/38215 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
3052,
19871,
1155,
353,
8840,
836,
8,
1476,
197,
322,
89836,
198,
66616,
675,
1669,
330,
2408,
4439,
698,
3174,
1669,
1532,
11212,
24312,
675,
340,
17957,
93882,
1155,
11,
342,
340,
5195,
1669,
1532,
8320,
38,
3268,
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... | 1 |
func TestClearAll(t *testing.T) {
tt := test.Start(t).Scenario("kahuna")
defer tt.Finish()
is := sys(tt)
err := is.ClearAll()
tt.Require.NoError(err)
// ensure no ledgers
var found int
err = tt.HorizonSession().GetRaw(&found, "SELECT COUNT(*) FROM history_ledgers")
tt.Require.NoError(err)
tt.Assert.Equal(0... | explode_data.jsonl/69625 | {
"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,
14008,
2403,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
1273,
12101,
1155,
568,
54031,
445,
83502,
8565,
1138,
16867,
17853,
991,
18176,
741,
19907,
1669,
5708,
47152,
692,
9859,
1669,
374,
13524,
2403,
2822,
3244,
83,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWithHTTPAuth(t *testing.T) {
t.Parallel()
Convey("Given an auth provider and dialer", t, func() {
dialer := &mockDialerStruct{}
Convey("And Dial is called with username and password", func() {
_, err := mockDial(dialer, WithHTTPAuth(func(request *http.Request) error {
return nil
}))
Convey(... | explode_data.jsonl/53407 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
2354,
9230,
5087,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
93070,
5617,
445,
22043,
458,
4166,
9109,
323,
27860,
261,
497,
259,
11,
2915,
368,
341,
197,
2698,
530,
261,
1669,
609,
16712,
35,
530,
261,
9422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChanOf(t *testing.T) {
// check construction and use of type not in binary
type T string
ct := ChanOf(BothDir, TypeOf(T("")))
v := MakeChan(ct, 2)
runtime.GC()
v.Send(ValueOf(T("hello")))
runtime.GC()
v.Send(ValueOf(T("world")))
runtime.GC()
sv1, _ := v.Recv()
sv2, _ := v.Recv()
s1 := sv1.String()... | explode_data.jsonl/29608 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
46019,
2124,
1155,
353,
8840,
836,
8,
341,
197,
322,
1779,
8086,
323,
990,
315,
943,
537,
304,
7868,
198,
13158,
350,
914,
198,
89216,
1669,
41302,
2124,
7,
20629,
6184,
11,
3990,
2124,
4140,
445,
29836,
5195,
1669,
7405,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCustomer_CreatePaymentSource_Acct(t *testing.T) {
key := "test api key"
mockResponse := new(invdendpoint.BankAccount)
mockResponse.Id = int64(1234)
mockResponse.Last4 = "4242"
mockResponse.Object = "bank_account"
mockResponse.Verified = true
server, err := invdmockserver.New(200, mockResponse, "json",... | explode_data.jsonl/15020 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 277
} | [
2830,
3393,
12792,
34325,
20188,
3608,
1566,
66,
302,
1155,
353,
8840,
836,
8,
341,
23634,
1669,
330,
1944,
6330,
1376,
1837,
77333,
2582,
1669,
501,
5900,
16598,
32540,
1785,
1180,
7365,
340,
77333,
2582,
6444,
284,
526,
21,
19,
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... | 5 |
func TestModelRegister(t *testing.T) {
RegisterModel((*Model)(nil))
for k := range modelRegistry {
t.Log(k)
}
model := MakeInstance("github.com/lonelypale/goutils/database/mongodb.Model")
t.Log(model)
} | explode_data.jsonl/53025 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 83
} | [
2830,
3393,
1712,
8690,
1155,
353,
8840,
836,
8,
341,
79096,
1712,
26609,
1712,
2376,
8385,
4390,
2023,
595,
1669,
2088,
1614,
15603,
341,
197,
3244,
5247,
5969,
340,
197,
630,
19727,
1669,
7405,
2523,
445,
5204,
905,
14,
12212,
974,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReactorBasic(t *testing.T) {
N := 4
css, cleanup := randConsensusNet(N, "consensus_reactor_test", newMockTickerFunc(true), newCounter)
defer cleanup()
reactors, blocksSubs, eventBuses := startConsensusNet(t, css, N)
defer stopConsensusNet(log.TestingLogger(), reactors, eventBuses)
// wait till everyone m... | explode_data.jsonl/7890 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
693,
5621,
15944,
1155,
353,
8840,
836,
8,
341,
18317,
1669,
220,
19,
198,
1444,
778,
11,
21290,
1669,
10382,
15220,
13626,
6954,
8204,
11,
330,
6254,
13626,
1288,
5621,
4452,
497,
501,
11571,
87278,
9626,
3715,
701,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImageTagInvalidReference(t *testing.T) {
client := &Client{
client: newMockClient(errorMock(http.StatusInternalServerError, "Server error")),
}
err := client.ImageTag(context.Background(), "image_id", "aa/asdf$$^/aa")
if err == nil || err.Error() != `Error parsing reference: "aa/asdf$$^/aa" is not a val... | explode_data.jsonl/42538 | {
"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,
1906,
5668,
7928,
8856,
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,
9859,
1669,
2943,
7528,
5668,
5378,
19047,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAsValue(t *testing.T) {
intValue, ok := asValue("10").(int)
if ok != true {
t.Error()
}
if intValue != 10 {
t.Error()
}
floatValue, ok := asValue("0.12").(float64)
if ok != true {
t.Error()
}
if floatValue != 0.12 {
t.Error()
}
boolValue, ok := asValue("true").(bool)
if ok != true {
t.E... | explode_data.jsonl/13415 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 223
} | [
2830,
3393,
2121,
1130,
1155,
353,
8840,
836,
8,
341,
2084,
1130,
11,
5394,
1669,
438,
1130,
445,
16,
15,
1827,
7,
396,
340,
743,
5394,
961,
830,
341,
197,
3244,
6141,
741,
197,
532,
743,
53077,
961,
220,
16,
15,
341,
197,
3244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestReverseProxy(t *testing.T) {
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stderr)
testHeaderValue := []string{"header-value"}
testHeaders := http.Header{
"X-Header-1": testHeaderValue,
"X-Header-2": testHeaderValue,
"X-Header-3": testHeaderValue,
}
testTrailerValue := []string{"trailer-val... | explode_data.jsonl/64225 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1181
} | [
2830,
3393,
45695,
16219,
1155,
353,
8840,
836,
8,
341,
6725,
4202,
5097,
1956,
30158,
909,
47560,
340,
16867,
1487,
4202,
5097,
9638,
77319,
692,
18185,
97721,
1669,
3056,
917,
4913,
2708,
19083,
16707,
18185,
10574,
1669,
1758,
15753,
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... | 4 |
func TestMetadata_Offline(t *testing.T) {
t.Run("unavailable in offline mode", func(t *testing.T) {
service := APIService{
config: &configuration.Configuration{Mode: configuration.Offline},
}
resp, err := service.ConstructionMetadata(
context.Background(),
&types.ConstructionMetadataRequest{},
)
as... | explode_data.jsonl/44644 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
14610,
94377,
1056,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
359,
10334,
304,
26166,
3856,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
52934,
1669,
10106,
95125,
515,
298,
25873,
25,
609,
21138,
17334,
90,
3636,
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 TestMetaIndexEntriesSorted(t *testing.T) {
f, err := build(DefaultCompression, nil, /* filter policy */
TableFilter, nil, nil, 4096, 4096)
require.NoError(t, err)
r, err := NewReader(f, ReaderOptions{})
require.NoError(t, err)
b, err := r.readBlock(r.metaIndexBH, nil /* transform */, nil /* attrs */)
req... | explode_data.jsonl/40343 | {
"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,
12175,
1552,
24533,
51051,
1155,
353,
8840,
836,
8,
341,
1166,
11,
1848,
1669,
1936,
87874,
81411,
11,
2092,
11,
1391,
4051,
4842,
735,
197,
197,
2556,
5632,
11,
2092,
11,
2092,
11,
220,
19,
15,
24,
21,
11,
220,
19,
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... | 3 |
func TestBuildInfo(t *testing.T) {
t.Parallel()
Convey("A testing BuildInfoProvider", t, func() {
c := context.Background()
c = memory.Use(c)
c = rawpresentation.InjectFakeLogdogClient(c, fakelogs.NewClient())
testSvc := testSwarmingService{
host: "swarming.example.com",
req: swarming.SwarmingRpcsTask... | explode_data.jsonl/51974 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 642
} | [
2830,
3393,
11066,
1731,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
93070,
5617,
445,
32,
7497,
7854,
1731,
5179,
497,
259,
11,
2915,
368,
341,
197,
1444,
1669,
2266,
19047,
741,
197,
1444,
284,
4938,
9046,
1337,
340,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLockRESTlient(t *testing.T) {
endpoint, err := NewEndpoint("http://localhost:9000")
if err != nil {
t.Fatalf("unexpected error %v", err)
}
lkClient := newlockRESTClient(endpoint)
if !lkClient.IsOnline() {
t.Fatalf("unexpected error. connection failed")
}
// Attempt all calls.
_, err = lkClient.RL... | explode_data.jsonl/72403 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 304
} | [
2830,
3393,
11989,
38307,
1451,
1155,
353,
8840,
836,
8,
341,
6246,
2768,
11,
1848,
1669,
1532,
27380,
445,
1254,
1110,
8301,
25,
24,
15,
15,
15,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
53859,
1465,
1018,
85,
497,
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... | 7 |
func TestService_Serialize(t *testing.T) {
t.Run(
"when 'rawArg' is specified, it returns it serialized to base64",
func(t *testing.T) {
rawArg := []byte("foobar")
svc := NewBase64Service()
actualReturn, actualErr := svc.Serialize(rawArg)
require.Nil(t, actualErr)
expectedReturn := []byte("Zm9vY... | explode_data.jsonl/15602 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 158
} | [
2830,
3393,
1860,
1098,
9050,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
1006,
197,
197,
1,
9309,
364,
1041,
2735,
6,
374,
5189,
11,
432,
4675,
432,
32916,
311,
2331,
21,
19,
756,
197,
29244,
1155,
353,
8840,
836,
8,
341,
298,
765... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDescribeResourceQuota(t *testing.T) {
fake := fake.NewSimpleClientset(&api.ResourceQuota{
ObjectMeta: metav1.ObjectMeta{
Name: "bar",
Namespace: "foo",
},
Status: api.ResourceQuotaStatus{
Hard: api.ResourceList{
api.ResourceName(api.ResourceCPU): resource.MustParse("1"),
... | explode_data.jsonl/34948 | {
"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,
74785,
4783,
2183,
6089,
1155,
353,
8840,
836,
8,
341,
1166,
726,
1669,
12418,
7121,
16374,
2959,
746,
2099,
2068,
20766,
2183,
6089,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
414,
330,
2257,
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... | 4 |
func TestReplaceTextLinks(t *testing.T) {
scenarios := map[string]string{
`This is a link to example.org`: `This is a link to example.org`,
`This is a link to ftp://example.org`: `This is a link to ftp://example.org`,
`This is a ... | explode_data.jsonl/21468 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 708
} | [
2830,
3393,
23107,
1178,
24089,
1155,
353,
8840,
836,
8,
341,
29928,
60494,
1669,
2415,
14032,
30953,
515,
197,
197,
63,
1986,
374,
264,
2656,
311,
3110,
2659,
44622,
13463,
1565,
1986,
374,
264,
2656,
311,
3110,
2659,
12892,
197,
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 TestReadChallengeTx_forbidsMuxedAccounts(t *testing.T) {
kp0 := newKeypair0()
tx, err := BuildChallengeTx(
kp0.Seed(),
kp0.Address(),
"testwebauth.stellar.org",
"testanchor.stellar.org",
network.TestNetworkPassphrase,
time.Hour,
)
env := tx.ToXDR()
assert.NoError(t, err)
aid := xdr.MustAddress(k... | explode_data.jsonl/20715 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 398
} | [
2830,
3393,
4418,
62078,
31584,
5478,
65,
3365,
44,
2200,
291,
41369,
1155,
353,
8840,
836,
8,
341,
16463,
79,
15,
1669,
501,
6608,
1082,
1310,
15,
741,
46237,
11,
1848,
1669,
7854,
62078,
31584,
1006,
197,
16463,
79,
15,
5732,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStream_gotoNextWriteFrame(t *testing.T) {
t.Run("test", func(t *testing.T) {
assert := base.NewAssert(t)
for i := 0; i < streamBlockSize*(streamFrameArrayInitSize+2); i++ {
stream := NewStream()
if i >= streamPosBody {
stream.SetWritePos(i)
}
curSeg := stream.writeSeg
assert(stream.wri... | explode_data.jsonl/21190 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 216
} | [
2830,
3393,
3027,
97732,
5847,
7985,
4369,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6948,
1669,
2331,
7121,
8534,
1155,
340,
197,
2023,
600,
1669,
220,
15,
26,
600,
366,
426... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestArtistService_Create(t *testing.T) {
s := NewArtistService(newMockArtistDAO())
artist, err := s.Create(nil, &models.Artist{
Name: "ddd",
})
if assert.Nil(t, err) && assert.NotNil(t, artist) {
assert.Equal(t, 4, artist.Id)
assert.Equal(t, "ddd", artist.Name)
}
// dao error
_, err = s.Create(nil, &... | explode_data.jsonl/70210 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 221
} | [
2830,
3393,
40309,
1860,
34325,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1532,
40309,
1860,
1755,
11571,
40309,
19532,
2398,
197,
18622,
11,
1848,
1669,
274,
7251,
27907,
11,
609,
6507,
50064,
380,
515,
197,
21297,
25,
330,
40360,
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... | 3 |
func TestGetHeaders(t *testing.T) {
testCases := []struct {
desc string
labels map[string]string
expected *types.Headers
}{
{
desc: "should return nil when no custom headers options are set",
labels: map[string]string{},
expected: nil,
},
{
desc: "should return a struct when all cu... | explode_data.jsonl/51865 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1599
} | [
2830,
3393,
1949,
10574,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
257,
914,
198,
197,
95143,
256,
2415,
14032,
30953,
198,
197,
42400,
353,
9242,
43968,
198,
197,
59403,
197,
197,
515,
298,
41653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHttpRequest(t *testing.T) {
if err := setupDir(); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(testDir)
d := &Daemon{}
err := d.Init()
if err != nil {
t.Fatal(err)
}
defer d.Stop()
c := http.Client{Transport: &http.Transport{Dial: DevLxdDialer{Path: fmt.Sprintf("%s/devapollo/sock", testDir)}.D... | explode_data.jsonl/9187 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 287
} | [
2830,
3393,
26362,
1155,
353,
8840,
836,
8,
341,
743,
1848,
1669,
6505,
6184,
2129,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
2643,
84427,
8623,
6184,
692,
2698,
1669,
609,
89177,
16094,
9859,
1669,
294,
26849,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAnnotationsForInvalidCandidate(t *testing.T) {
candidate := NewCandidate(
&Context{
Event: &github.CheckSuiteEvent{},
}, &github.CommitFile{
BlobURL: github.String("https://github.com/octocat/Hello-World/blob/837db83be4137ca555d9a5598d0a1ea2987ecfee/deployment.yaml"),
Filename: github.String("de... | explode_data.jsonl/53893 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 835
} | [
2830,
3393,
21418,
2461,
7928,
63901,
1155,
353,
8840,
836,
8,
341,
1444,
17050,
1669,
1532,
63901,
1006,
197,
197,
5,
1972,
515,
298,
56055,
25,
609,
5204,
10600,
28000,
1556,
38837,
197,
197,
2137,
609,
5204,
53036,
1703,
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... | 4 |
func TestGoBuildQualifyImport(t *testing.T) {
base, err := random.Image(1024, 1)
if err != nil {
t.Fatalf("random.Image() = %v", err)
}
repoDir, err := repoRootDir()
if err != nil {
t.Fatalf("could not get Git repository root directory")
}
tests := []struct {
description string
rawImportpath ... | explode_data.jsonl/2478 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1253
} | [
2830,
3393,
10850,
11066,
31029,
1437,
11511,
1155,
353,
8840,
836,
8,
341,
24195,
11,
1848,
1669,
4194,
7528,
7,
16,
15,
17,
19,
11,
220,
16,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
11463,
7528,
368,
284,
1018,
85,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClose(t *testing.T) {
data := "data"
s, server := newServiceAndServer(t)
go server.Start()
l := New(s)
var wg sync.WaitGroup
wg.Add(1)
go func() {
assert.NotNil(t, l.Start())
wg.Done()
}()
_, _, err := server.Execute("log", data)
assert.Nil(t, err)
assert.Nil(t, l.Close())
_, _, err = serve... | explode_data.jsonl/61163 | {
"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,
7925,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
330,
691,
1837,
1903,
11,
3538,
1669,
501,
1860,
3036,
5475,
1155,
340,
30680,
3538,
12101,
2822,
8810,
1669,
1532,
1141,
340,
2405,
63581,
12811,
28384,
2808,
271,
72079,
1904... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConstructBlockVolumeSpec(t *testing.T) {
tmpDir, plug := getBlockPlugin(t)
defer os.RemoveAll(tmpDir)
podPath := filepath.Join(tmpDir, testPodPath)
spec, err := plug.ConstructBlockVolumeSpec(types.UID("poduid"), testPVName, podPath)
if err != nil {
t.Errorf("ConstructBlockVolumeSpec() failed: %v", err)... | explode_data.jsonl/14260 | {
"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,
28468,
4713,
18902,
8327,
1155,
353,
8840,
836,
8,
341,
20082,
6184,
11,
19633,
1669,
633,
4713,
11546,
1155,
340,
16867,
2643,
84427,
10368,
6184,
692,
3223,
347,
1820,
1669,
26054,
22363,
10368,
6184,
11,
1273,
23527,
1820,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemittanceOriginatorContactPhoneNumberAlphaNumeric(t *testing.T) {
ro := mockRemittanceOriginator()
ro.ContactPhoneNumber = "®"
err := ro.Validate()
require.EqualError(t, err, fieldError("ContactPhoneNumber", ErrNonAlphanumeric, ro.ContactPhoneNumber).Error())
} | explode_data.jsonl/32941 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 85
} | [
2830,
3393,
6590,
87191,
13298,
850,
8732,
45820,
19384,
36296,
1155,
353,
8840,
836,
8,
341,
197,
299,
1669,
7860,
6590,
87191,
13298,
850,
741,
197,
299,
53975,
45820,
284,
330,
11909,
1837,
9859,
1669,
926,
47667,
2822,
17957,
12808,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestVSphereKubernetes120BottleRocketThreeWorkersConformanceFlow(t *testing.T) {
test := framework.NewClusterE2ETest(
t,
framework.NewVSphere(t, framework.WithBottleRocket120()),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube120)),
framework.WithClusterFiller(api.WithWorkerNodeCount(3)... | explode_data.jsonl/34518 | {
"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,
26050,
8023,
42,
29827,
16,
17,
15,
33,
62118,
80017,
19641,
74486,
1109,
11795,
18878,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
12626,
7121,
28678,
36,
17,
1348,
477,
1006,
197,
3244,
345,
197,
1166,
5794,
7121,
26050,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceAccountTokenAutoCreate(t *testing.T) {
c, _, stopFunc := startServiceAccountTestServer(t)
defer stopFunc()
ns := "test-service-account-token-creation"
name := "my-service-account"
// Create namespace
_, err := c.Core().Namespaces().Create(&api.Namespace{ObjectMeta: api.ObjectMeta{Name: ns}})
if... | explode_data.jsonl/67129 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 927
} | [
2830,
3393,
1860,
7365,
3323,
13253,
4021,
1155,
353,
8840,
836,
8,
341,
1444,
11,
8358,
2936,
9626,
1669,
1191,
1860,
7365,
2271,
5475,
1155,
340,
16867,
2936,
9626,
2822,
84041,
1669,
330,
1944,
23461,
49982,
34841,
12,
37375,
698,
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... | 4 |
func TestDatastore(t *testing.T) {
client := initDatastoreClient(t)
taskRepo := task.NewTaskRepository(client)
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
now := time.Unix(time.Now().Unix(), 0)
desc := "hello"
id, err := taskRepo.Insert(ctx, &task.Task{
ID: ... | explode_data.jsonl/6549 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 602
} | [
2830,
93200,
4314,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
68733,
4314,
2959,
1155,
692,
49115,
25243,
1669,
3383,
7121,
6262,
4624,
12805,
692,
20985,
11,
9121,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
220,
18,
15,
77053,
32435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateFeeAdjustments(t *testing.T) {
t.Parallel()
aliceChannel, bobChannel, cleanUp, err := CreateTestChannels(
channeldb.SingleFunderTweaklessBit,
)
if err != nil {
t.Fatalf("unable to create test channels: %v", err)
}
defer cleanUp()
// First, we'll grab the current base fee rate as we'll be usi... | explode_data.jsonl/72467 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 676
} | [
2830,
3393,
4289,
41941,
38616,
1368,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
63195,
9629,
11,
35192,
9629,
11,
4240,
2324,
11,
1848,
1669,
4230,
2271,
35925,
1006,
197,
23049,
1020,
783,
65,
23119,
37,
7995,
51,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshalInvalidPointerKind(t *testing.T) {
a := 1
err := Unmarshal([]byte{}, &a)
if err == nil {
t.Fatal("unmarshal should err when given an invalid pointer type")
}
} | explode_data.jsonl/46341 | {
"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,
1806,
27121,
7928,
9084,
10629,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
220,
16,
198,
9859,
1669,
1230,
27121,
10556,
3782,
22655,
609,
64,
340,
743,
1848,
621,
2092,
341,
197,
3244,
26133,
445,
359,
27121,
1265,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestMinimumNumber(t *testing.T) {
t.Parallel()
tests := []struct {
name string
len int32
pass string
expected int32
}{
{"Test case 00", int32(3), "Ab1", int32(3)},
{"Test case 01", int32(11), "#HackerRank", int32(1)},
{"Test case 38", int32(5), "jnhqj", int32(3)},
}
for _, tc := r... | explode_data.jsonl/67679 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
28695,
2833,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
33111,
414,
526,
18,
17,
198,
197,
41431,
257,
914,
198,
197,
42400,
526,
18,
17,
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 TestPlanCacheSnapshot(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
orgEnable := core.PreparedPlanCacheEnabled()
defer core.SetPreparedPlanCache(orgEnable)
core.SetPreparedPlanCache(true)
se, err := session.CreateSession4TestWithOpt(store, &session.Opt{
PreparedPlanCache: kvcache... | explode_data.jsonl/5527 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 749
} | [
2830,
3393,
20485,
8233,
15009,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
741,
87625,
11084,
1669,
6200,
28770,
7212,
20485,
8233,
5462,
741,
16867,
6200,
4202,
4703,
7212,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParse(t *testing.T) {
tokenizer := jwt.New(secret)
token, err := tokenizer.Issue(key())
require.Nil(t, err, fmt.Sprintf("issuing key expected to succeed: %s", err))
userKey := key()
userKey.Type = authn.APIKey
userKey.ExpiresAt = time.Now().UTC().Add(-1 * time.Minute).Round(time.Second)
userToken, err... | explode_data.jsonl/64410 | {
"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,
14463,
1155,
353,
8840,
836,
8,
341,
43947,
3135,
1669,
24589,
7121,
75862,
692,
43947,
11,
1848,
1669,
45958,
2447,
83890,
4857,
2398,
17957,
59678,
1155,
11,
1848,
11,
8879,
17305,
445,
1038,
7471,
1376,
3601,
311,
11996,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestThousandSep(t *testing.T) {
st := []struct {
name string
num int
exp string
}{
{"num=0", 0, "0"},
{"testcase1", 123, "123"},
{"testcase2", 1234, "1.234"},
{"testcase3", 1000000, "1.000.000"},
}
for _, tt := range st {
t.Run(tt.name, func(t *testing.T) {
out := addSeps(tt.num)
if out... | explode_data.jsonl/61173 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 220
} | [
2830,
3393,
1001,
51849,
41114,
1155,
353,
8840,
836,
8,
341,
18388,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
22431,
220,
526,
198,
197,
48558,
220,
914,
198,
197,
59403,
197,
197,
4913,
2413,
28,
15,
497,
220,
15,
11,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_getVMExtensionUpdateSupport(t *testing.T) {
// Update disabled
ctx := log.NewSyncLogger(log.NewLogfmtLogger(os.Stdout))
mm := createMockVMExtensionEnvironmentManager()
ii, _ := GetInitializationInfo("yaba", "5.0", true, testEnableCallback)
ext, err := getVMExtensionInternal(ctx, ii, mm)
require.NoError(... | explode_data.jsonl/18579 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 368
} | [
2830,
3393,
3062,
11187,
12049,
4289,
7916,
1155,
353,
8840,
836,
8,
341,
197,
322,
5549,
8386,
198,
20985,
1669,
1487,
7121,
12154,
7395,
12531,
7121,
2201,
12501,
7395,
9638,
83225,
1171,
2109,
76,
1669,
1855,
11571,
11187,
12049,
12723... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMetricsServiceV2ListLogMetricsError(t *testing.T) {
errCode := codes.Internal
mockMetrics.err = grpc.Errorf(errCode, "test error")
var formattedParent string = MetricsProjectPath("[PROJECT]")
var request = &loggingpb.ListLogMetricsRequest{
Parent: formattedParent,
}
c, err := NewMetricsClient(context... | explode_data.jsonl/77778 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 203
} | [
2830,
3393,
27328,
1860,
53,
17,
852,
2201,
27328,
1454,
1155,
353,
8840,
836,
8,
341,
9859,
2078,
1669,
13912,
32579,
198,
77333,
27328,
18441,
284,
47900,
13080,
3964,
2078,
11,
330,
1944,
1465,
5130,
2405,
23126,
8387,
914,
284,
5419... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_getShardSets(t *testing.T) {
t.Parallel()
c := &Cluster{
Vtctld: &vtctldProxy{
VtctldClient: &fakevtctldclient.VtctldClient{
GetKeyspaceResults: map[string]struct {
Response *vtctldatapb.GetKeyspaceResponse
Error error
}{
"ks1": {
Response: &vtctldatapb.GetKeyspaceRespo... | explode_data.jsonl/57720 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1876
} | [
2830,
3393,
3062,
2016,
567,
30175,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
1669,
609,
28678,
515,
197,
17446,
83,
302,
507,
25,
609,
9708,
302,
507,
16219,
515,
298,
17446,
83,
302,
507,
2959,
25,
609,
30570,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDetectKvOrderViolation(t *testing.T) {
var errOrderViolation = errors.New("Detected Order Violation")
defer testutil.AfterTest(t)
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 3})
defer clus.Terminate(t)
cfg := clientv3.Config{
Endpoints: []string{
clus.Members[0].GRPCAddr(),... | explode_data.jsonl/66030 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 659
} | [
2830,
3393,
57193,
42,
85,
4431,
74971,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
4431,
74971,
284,
5975,
7121,
445,
17076,
1569,
7217,
29455,
367,
5130,
16867,
1273,
1314,
36892,
2271,
1155,
340,
197,
4163,
1669,
17590,
7121,
28678,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatch(t *testing.T) {
var (
exactMatcher, _ = StringMatcherFromProto(&v3matcherpb.StringMatcher{MatchPattern: &v3matcherpb.StringMatcher_Exact{Exact: "exact"}})
prefixMatcher, _ = StringMatcherFromProto(&v3matcherpb.StringMatcher{MatchPattern: &v3matcherpb.StringMatcher_Prefix{Prefix: "... | explode_data.jsonl/38090 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1868
} | [
2830,
3393,
8331,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
8122,
531,
37554,
11,
716,
1843,
284,
923,
37554,
3830,
31549,
2099,
85,
18,
70826,
16650,
6431,
37554,
90,
8331,
15760,
25,
609,
85,
18,
70826,
16650,
6431,
37554,
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... | 2 |
func Test_scsi_WaitUdevSymlink(t *testing.T) {
type args struct {
ctx context.Context
deviceName string
wwn string
}
ctx := context.Background()
devArgs := args{ctx: ctx, deviceName: mh.ValidDeviceName, wwn: mh.ValidWWID}
dmArgs := args{ctx: ctx, deviceName: mh.ValidDMName, wwn: mh.ValidWWID}... | explode_data.jsonl/65990 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1100
} | [
2830,
3393,
643,
63229,
2763,
1315,
52,
3583,
34667,
44243,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
20985,
286,
2266,
9328,
198,
197,
54719,
675,
914,
198,
197,
197,
1250,
77,
286,
914,
198,
197,
630,
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 TestDaoReportLog(t *testing.T) {
var (
c = context.TODO()
id = int64(0)
)
convey.Convey("ReportLog", t, func(ctx convey.C) {
res, tids, err := d.ReportLog(c, id)
ctx.Convey("Then err should be nil.res,tids should not be nil.", func(ctx convey.C) {
ctx.So(err, convey.ShouldBeNil)
ctx.So(tids, conv... | explode_data.jsonl/51302 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 177
} | [
2830,
3393,
12197,
10361,
2201,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
1444,
220,
284,
2266,
90988,
741,
197,
15710,
284,
526,
21,
19,
7,
15,
340,
197,
340,
37203,
5617,
4801,
5617,
445,
10361,
2201,
497,
259,
11,
2915,
7502... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDataSetsGet(t *testing.T) {
req := client.NewDataSetsGetRequest()
resp, err := req.Do()
if err != nil {
t.Error(err)
}
b, _ := json.MarshalIndent(resp, "", " ")
log.Println(string(b))
} | explode_data.jsonl/18871 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
93200,
30175,
1949,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
2943,
7121,
1043,
30175,
1949,
1900,
741,
34653,
11,
1848,
1669,
4232,
33596,
741,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
630,
2233,
11,
716,
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
] | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.