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 TestNamespaceCond(t *testing.T) {
r, _ := http.NewRequest("GET", "/v2/test/list", nil)
w := httptest.NewRecorder()
ns := NewNamespace("/v2")
ns.Cond(func(ctx *context.Context) bool {
return ctx.Input.Domain() == "beego.me"
}).
AutoRouter(&TestController{})
AddNamespace(ns)
BeeApp.Handlers.ServeHTTP(w, ... | explode_data.jsonl/12611 | {
"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,
22699,
49696,
1155,
353,
8840,
836,
8,
341,
7000,
11,
716,
1669,
1758,
75274,
445,
3806,
497,
3521,
85,
17,
12697,
20936,
497,
2092,
340,
6692,
1669,
54320,
70334,
7121,
47023,
2822,
84041,
1669,
1532,
22699,
4283,
85,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSet(t *testing.T) {
client := framework.NewEtcdClient()
keysAPI := etcd.NewKeysAPI(client)
etcdStorage := etcdstorage.NewEtcdStorage(client, testapi.Default.Codec(), "", false)
ctx := context.TODO()
framework.WithEtcdKey(func(key string) {
testObject := api.ServiceAccount{ObjectMeta: api.ObjectMeta{Name... | explode_data.jsonl/50998 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 358
} | [
2830,
3393,
1649,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
12626,
7121,
31860,
4385,
2959,
741,
80112,
7082,
1669,
1842,
4385,
7121,
8850,
7082,
12805,
340,
197,
295,
4385,
5793,
1669,
1842,
4385,
16172,
7121,
31860,
4385,
5793,
12805,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateWithAutoidSchema(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec(`use test`)
tk.MustExec(`create table t1(id int primary key auto_increment, n int);`)
tk.MustExec(`create table t2(id int primary key, n float auto_increment, key... | explode_data.jsonl/76260 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1391
} | [
2830,
3393,
4289,
2354,
19602,
588,
8632,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
741,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestValidateNodeIP(t *testing.T) {
hostnameOverride := GetHostname()
localIP, _ := GetLocalIP(hostnameOverride)
cases := []struct {
name string
ip net.IP
expected error
}{
{
name: "case1",
ip: nil,
expected: fmt.Errorf("nodeIP must be a valid IP address"),
},
{
name... | explode_data.jsonl/76272 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 629
} | [
2830,
3393,
17926,
1955,
3298,
1155,
353,
8840,
836,
8,
341,
197,
27806,
2177,
1669,
2126,
88839,
741,
8854,
3298,
11,
716,
1669,
2126,
7319,
3298,
85886,
2177,
692,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNoCancellationContext(t *testing.T) {
deadline := time.Now().Add(1 * time.Second)
ctx, cancelFunc := context.WithDeadline(context.Background(), deadline)
cancelFunc()
require.Error(t, ctx.Err())
d, ok := ctx.Deadline()
require.True(t, ok)
require.Equal(t, deadline, d)
nctx := noCancellationContext{Con... | explode_data.jsonl/46014 | {
"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,
2753,
82298,
1972,
1155,
353,
8840,
836,
8,
341,
197,
78788,
1669,
882,
13244,
1005,
2212,
7,
16,
353,
882,
32435,
340,
20985,
11,
9121,
9626,
1669,
2266,
26124,
83593,
5378,
19047,
1507,
21428,
340,
84441,
9626,
741,
17957,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestState_IsOn(t *testing.T) {
t.Parallel()
st := setupNewState()
if st.IsOn(users[0], channels[0]) {
t.Errorf("Expected %v to not be on %v", users[0], channels[0])
}
st.addChannel(channels[0])
if st.IsOn(users[0], channels[0]) {
t.Errorf("Expected %v to not be on %v", users[0], channels[0])
}
st.addU... | explode_data.jsonl/32090 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
1397,
31879,
1925,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18388,
1669,
6505,
3564,
1397,
741,
743,
357,
4506,
1925,
35438,
58,
15,
1125,
11744,
58,
15,
2467,
341,
197,
3244,
13080,
445,
18896,
1018,
85,
311... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHash(t *testing.T) {
// hash the empty string to be sure that sha256 is being used
expect := "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
sum := Hash("")
if expect != sum {
t.Errorf("expected hash %q but got %q", expect, sum)
}
} | explode_data.jsonl/32275 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
6370,
1155,
353,
8840,
836,
8,
341,
197,
322,
5175,
279,
4287,
914,
311,
387,
2704,
429,
15870,
17,
20,
21,
374,
1660,
1483,
198,
24952,
1669,
330,
68,
18,
65,
15,
66,
19,
19,
17,
24,
23,
8316,
16,
66,
16,
19,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAnalyzersHaveUniqueNames(t *testing.T) {
g := NewWithT(t)
existingNames := make(map[string]struct{})
for _, a := range All() {
n := a.Metadata().Name
_, ok := existingNames[n]
// TODO (Nino-K): remove this condition once metadata is clean up
if ok == true && n == "schema.ValidationAnalyzer.ServiceE... | explode_data.jsonl/37450 | {
"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,
73307,
59619,
12116,
22811,
7980,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
2354,
51,
1155,
692,
8122,
11083,
7980,
1669,
1281,
9147,
14032,
60,
1235,
37790,
2023,
8358,
264,
1669,
2088,
2009,
368,
341,
197,
9038,
1669... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestCheckBoolean(t *testing.T) {
l := lua.NewState()
l.PushBoolean(true)
if !checkBoolean(l, -1) {
t.Error("expected true")
}
l.PushNumber(42)
defer func() {
err := recover()
if err == nil {
t.Error("expected panic")
}
}()
checkBoolean(l, -1)
} | explode_data.jsonl/40378 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 123
} | [
2830,
3393,
3973,
6890,
1155,
353,
8840,
836,
8,
341,
8810,
1669,
20357,
7121,
1397,
741,
8810,
34981,
6890,
3715,
340,
743,
753,
2028,
6890,
2333,
11,
481,
16,
8,
341,
197,
3244,
6141,
445,
7325,
830,
1138,
197,
630,
8810,
34981,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAppendElement(t *testing.T) {
e := Tags(struct{ a, b, c Tag }{})
doc := e.a(e.b("b"))
doc.Append(e.c("c"))
assert.Equal(t, `<a><b>b</b><c>c</c></a>`, marshal(doc))
} | explode_data.jsonl/15615 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
23877,
1691,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
27683,
6163,
90,
264,
11,
293,
11,
272,
12353,
335,
37790,
59536,
1669,
384,
5849,
2026,
948,
445,
65,
5455,
59536,
8982,
2026,
520,
445,
66,
5455,
6948,
12808,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestConstStringIter(t *testing.T) {
const SCRIPT = `
var count = 0;
for (var i in "1234") {
for (var j in "1234567") {
count++
}
}
count;
`
testScript1(SCRIPT, intToValue(28), t)
} | explode_data.jsonl/10448 | {
"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,
19167,
703,
8537,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
1565,
271,
2405,
1760,
284,
220,
15,
401,
2023,
320,
947,
600,
304,
330,
16,
17,
18,
19,
899,
341,
7782,
2023,
320,
947,
502,
304,
330,
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... | 1 |
func TestValidateExpirationYear(t *testing.T) {
if !ValidateExpirationYear("2020") {
t.Error("2020")
t.FailNow()
}
if !ValidateExpirationYear("2025") {
t.Error("2025")
t.FailNow()
}
if !ValidateExpirationYear("2030") {
t.Error("2030")
t.FailNow()
}
if ValidateExpirationYear("2019") {
t.Error("2019"... | explode_data.jsonl/24411 | {
"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,
17926,
66301,
9490,
1155,
353,
8840,
836,
8,
341,
743,
753,
17926,
66301,
9490,
445,
17,
15,
17,
15,
899,
341,
197,
3244,
6141,
445,
17,
15,
17,
15,
1138,
197,
3244,
57243,
7039,
741,
197,
532,
743,
753,
17926,
66301,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBasicTransform(t *testing.T) {
type Test struct {
String string `r:"repl"`
}
var tt Test
set := New()
set.SetTagName("r")
set.Register("repl", func(ctx context.Context, t *Transformer, value reflect.Value, param string) error {
value.SetString("test")
return nil
})
val := reflect.ValueOf(tt)
... | explode_data.jsonl/43614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1287
} | [
2830,
3393,
15944,
8963,
1155,
353,
8840,
836,
8,
1476,
13158,
3393,
2036,
341,
197,
4980,
914,
1565,
81,
2974,
265,
500,
8805,
197,
630,
2405,
17853,
3393,
271,
8196,
1669,
1532,
741,
8196,
4202,
22616,
445,
81,
1138,
8196,
19983,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCalculateCapacities(t *testing.T) {
activeProcessesPriorities := make(ProcessMetrics)
activeProcessesPriorities["first"] = 4
activeProcessesPriorities["second"] = 1
browserState := make(BrowserState)
const maxConnections = 25
newCapacities := calculateCapacities(browserState, activeProcessesPriorities, m... | explode_data.jsonl/65289 | {
"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,
47866,
12903,
580,
1361,
1155,
353,
8840,
836,
8,
341,
74770,
92727,
49471,
1361,
1669,
1281,
78003,
27328,
340,
74770,
92727,
49471,
1361,
1183,
3896,
1341,
284,
220,
19,
198,
74770,
92727,
49471,
1361,
1183,
5569,
1341,
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 TestIsCfgChanged(t *testing.T) {
getInitialCfg := func() *ReplicationCfg {
return &ReplicationCfg{
ReplicationConfig: ReplicationConfig{
ID: "foo",
Remote: "a",
Direction: ActiveReplicatorTypePull,
ConflictResolutionType: ConflictResolverCusto... | explode_data.jsonl/73344 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1081
} | [
2830,
3393,
3872,
42467,
5389,
1155,
353,
8840,
836,
8,
1476,
10366,
6341,
42467,
1669,
2915,
368,
353,
18327,
1693,
42467,
341,
197,
853,
609,
18327,
1693,
42467,
515,
298,
197,
18327,
1693,
2648,
25,
3321,
1693,
2648,
515,
571,
29580,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOpen_Size(t *testing.T) {
// Open a data file.
db := MustOpenDB()
path := db.Path()
defer db.MustClose()
pagesize := db.Info().PageSize
// Insert until we get above the minimum 4MB size.
if err := db.Update(func(tx *bolt.Tx) error {
b, _ := tx.CreateBucketIfNotExists([]byte("data"))
for i := 0; i ... | explode_data.jsonl/27463 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 586
} | [
2830,
3393,
5002,
45553,
1155,
353,
8840,
836,
8,
341,
197,
322,
5264,
264,
821,
1034,
624,
20939,
1669,
15465,
5002,
3506,
741,
26781,
1669,
2927,
17474,
741,
16867,
2927,
50463,
7925,
2822,
3223,
1134,
551,
1669,
2927,
20132,
1005,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestYAMLLoader_SupportedFileExtensions(t *testing.T) {
tests := []struct {
name string
want []string
}{
{
name: "support .yaml and .yml file extensions",
want: []string{".yaml", ".yml"},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
yl := &YAMLLoader{}
if got := yl.S... | explode_data.jsonl/33677 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 212
} | [
2830,
3393,
56,
1402,
4086,
39966,
1098,
12513,
1703,
31282,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
50780,
3056,
917,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
23362,
659,
414... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeclLine(t *testing.T) {
ver, _ := goversion.Parse(runtime.Version())
if ver.Major > 0 && !ver.AfterOrEqual(goversion.GoVersion{Major: 1, Minor: 10, Rev: -1}) {
t.Skip("go 1.9 and prior versions do not emit DW_AT_decl_line")
}
withTestProcess("decllinetest", t, func(p *proc.Target, fixture protest.Fixtu... | explode_data.jsonl/56301 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 516
} | [
2830,
3393,
21629,
2460,
1155,
353,
8840,
836,
8,
341,
197,
423,
11,
716,
1669,
728,
4366,
8937,
89467,
35842,
2398,
743,
2739,
1321,
3035,
861,
220,
15,
1009,
753,
423,
36892,
2195,
2993,
3268,
859,
1325,
67131,
5637,
90,
34475,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestClient_ShowJobSpec_NotFound(t *testing.T) {
t.Parallel()
app, cleanup := cltest.NewApplication(t, cltest.EthMockRegisterChainID)
defer cleanup()
require.NoError(t, app.Start())
client, r := app.NewClientAndRenderer()
set := flag.NewFlagSet("test", 0)
set.Parse([]string{"bogus-ID"})
c := cli.NewConte... | explode_data.jsonl/78837 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 161
} | [
2830,
3393,
2959,
79665,
12245,
8327,
60816,
6650,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
28236,
11,
21290,
1669,
1185,
1944,
7121,
4988,
1155,
11,
1185,
1944,
5142,
339,
11571,
8690,
18837,
915,
340,
16867,
21290,
741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreGetNonCachedReceipts(t *testing.T) {
logger.SetTestMode(t)
block, expect := fakeReceipts()
store := nonCachedStore()
store.SetRawReceipts(block, expect)
got, _ := store.GetRawReceipts(block)
equalStorageReceipts(t, expect, got)
} | explode_data.jsonl/51278 | {
"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,
6093,
1949,
8121,
70293,
67461,
82,
1155,
353,
8840,
836,
8,
341,
17060,
4202,
2271,
3636,
1155,
692,
47996,
11,
1720,
1669,
12418,
67461,
82,
741,
57279,
1669,
2477,
70293,
6093,
741,
57279,
4202,
20015,
67461,
82,
18682,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldFindStringInSliceFold(t *testing.T) {
a := "xYz"
b := "AbC"
slice := []string{"XYz", "abc"}
assert.True(t, IsStringInSliceFold(a, slice))
assert.True(t, IsStringInSliceFold(b, slice))
} | explode_data.jsonl/45970 | {
"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,
14996,
9885,
703,
641,
33236,
75536,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
330,
87,
56,
89,
698,
2233,
1669,
330,
5830,
34,
698,
1903,
4754,
1669,
3056,
917,
4913,
16356,
89,
497,
330,
13683,
63159,
6948,
32443,
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 TestFlatten(t *testing.T) {
assert := require.New(t)
assert.Equal([]interface{}{`one`, `two`, `three`}, Flatten([]string{`one`, `two`, `three`}))
assert.Equal([]interface{}{`one`, `two`, `three`}, Flatten([]interface{}{[]string{`one`, `two`}, `three`}))
assert.Equal([]interface{}{`one`, `two`, `three`}, Flatt... | explode_data.jsonl/45573 | {
"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,
3882,
14456,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
1373,
7121,
1155,
692,
6948,
12808,
10556,
4970,
6257,
90,
63,
603,
7808,
1565,
19789,
7808,
1565,
27856,
63,
2137,
85638,
10556,
917,
90,
63,
603,
7808,
1565,
19789,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildQuery(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
src := url.Values{
"a": {"a2", "a1"},
"b": {"b2", "b1"},
"c": {"c1", "c2"},
}
expect := "a=a2&a=a1&b=b2&b=b1&c=c1&c=c2"
t.Assert(gurl.BuildQuery(src), expect)
})
} | explode_data.jsonl/52550 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
11066,
2859,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
41144,
1669,
2515,
35145,
515,
298,
197,
56693,
788,
5212,
64,
17,
497,
330,
64,
16,
7115,
298,
197,
1,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRevelLevelfOutput(t *testing.T) {
l, b := newBufferedRevelLog()
l.Errorf("This is %s test", "a")
expectedMatch := "ERROR.*This is a test\n"
actual := b.String()
if ok, _ := regexp.Match(expectedMatch, []byte(actual)); !ok {
t.Errorf("Log output mismatch %s (actual) != %s (expected)", actual, expectedMa... | explode_data.jsonl/3452 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
693,
889,
2304,
85,
490,
5097,
1155,
353,
8840,
836,
8,
341,
8810,
11,
293,
1669,
501,
4095,
291,
693,
889,
2201,
741,
8810,
13080,
445,
1986,
374,
1018,
82,
1273,
497,
330,
64,
5130,
42400,
8331,
1669,
330,
3682,
4908,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestTx_DeleteBucket_ReadOnly(t *testing.T) {
db := MustOpenDB()
defer db.MustClose()
if err := db.View(func(tx *bolt.Tx) error {
if err := tx.DeleteBucket([]byte("foo")); err != bolt.ErrTxNotWritable {
t.Fatalf("unexpected error: %s", err)
}
return nil
}); err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/1696 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
31584,
57418,
36018,
62,
20914,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
15465,
5002,
3506,
741,
16867,
2927,
50463,
7925,
741,
743,
1848,
1669,
2927,
6382,
18552,
27301,
353,
52433,
81362,
8,
1465,
341,
197,
743,
1848,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRequestBodyBuffered(t *testing.T) {
// Buffered requested are removed by
// *http.Client.Do
// but we want wedeploy.RequestBody to "persist"
// so we can read it afterwards (for example, for verbose mode)
setupServer()
defer teardownServer()
mux.HandleFunc("/url", func(w http.ResponseWriter, r *http.Re... | explode_data.jsonl/24738 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 293
} | [
2830,
3393,
33334,
4095,
291,
1155,
353,
8840,
836,
8,
341,
197,
322,
30702,
11223,
525,
6963,
553,
198,
197,
322,
353,
1254,
11716,
33596,
198,
197,
322,
714,
582,
1366,
10840,
747,
1989,
72096,
311,
330,
39826,
698,
197,
322,
773,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJsonSamples(t *testing.T) {
bidder, buildErr := Builder(openrtb_ext.BidderConnectAd, config.Adapter{
Endpoint: "http://bidder.connectad.io/API?src=pbs"})
if buildErr != nil {
t.Fatalf("Builder returned unexpected error %v", buildErr)
}
adapterstest.RunJSONBidderTest(t, "connectadtest", bidder)
} | explode_data.jsonl/30336 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
5014,
39571,
1155,
353,
8840,
836,
8,
341,
2233,
307,
1107,
11,
1936,
7747,
1669,
20626,
30981,
3342,
65,
9927,
1785,
307,
1107,
14611,
2589,
11,
2193,
34190,
515,
197,
197,
27380,
25,
330,
1254,
1110,
20648,
1107,
10800,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Map(t *testing.T) {
in := []int{1, 2, 4, 8}
expected := []float32{1.1, 2.2, 4.4, 8.8}
mapper := func(i int) float32 {
return float32(i) * 1.1
}
actual := Map(in, mapper)
assert.Equal(t, expected, actual)
} | explode_data.jsonl/58331 | {
"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,
56992,
1155,
353,
8840,
836,
8,
341,
17430,
1669,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
19,
11,
220,
23,
532,
42400,
1669,
3056,
3649,
18,
17,
90,
16,
13,
16,
11,
220,
17,
13,
17,
11,
220,
19,
13,
19,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestONTTransfer(t *testing.T) {
for i := 1; i <= 100; i++ {
endpoint := "http://polaris1.ont.io:20336"
//pass := ""
//wif, _ := neoutils.NEP2Decrypt("", pass)
wif := ""
asset := "ong"
to := "AcWfHYbPDt4ysz7s5WQtkGvcFsfTsM6anm"
amount := float64(float64(i) / math.Pow10(9))
gasPrice := int(500)
... | explode_data.jsonl/20396 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
10232,
21970,
1155,
353,
8840,
836,
8,
1476,
2023,
600,
1669,
220,
16,
26,
600,
2651,
220,
16,
15,
15,
26,
600,
1027,
1476,
197,
6246,
2768,
1669,
330,
1254,
1110,
79,
7417,
285,
16,
13,
544,
4245,
25,
17,
15,
18,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestReconcilePropagateAnnotations(t *testing.T) {
names.TestingSeed()
ps := []*v1alpha1.Pipeline{tb.Pipeline("test-pipeline", "foo", tb.PipelineSpec(
tb.PipelineTask("hello-world-1", "hello-world"),
))}
prs := []*v1alpha1.PipelineRun{tb.PipelineRun("test-pipeline-run-with-annotations", "foo",
tb.PipelineR... | explode_data.jsonl/81296 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 906
} | [
2830,
3393,
693,
40446,
457,
2008,
46836,
21418,
1155,
353,
8840,
836,
8,
341,
93940,
8787,
287,
41471,
2822,
35009,
1669,
29838,
85,
16,
7141,
16,
1069,
8790,
90,
18387,
1069,
8790,
445,
1944,
2268,
8790,
497,
330,
7975,
497,
16363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDirFDIterDirents(t *testing.T) {
sys := newTestSystem(t, func(creds *auth.Credentials, fs *filesystem) *kernfs.Dentry {
return fs.newReadonlyDir(creds, 0755, map[string]*kernfs.Dentry{
// Fill root with nodes backed by various inode implementations.
"dir1": fs.newReadonlyDir(creds, 0755, nil),
"dir... | explode_data.jsonl/19805 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 550
} | [
2830,
3393,
6184,
14596,
8537,
87409,
65677,
1155,
353,
8840,
836,
8,
341,
41709,
1669,
501,
2271,
2320,
1155,
11,
2915,
7,
85734,
353,
3242,
727,
15735,
11,
8619,
353,
41897,
8,
353,
74,
932,
3848,
909,
4085,
341,
197,
853,
8619,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGerritOptOutHelpRepos(t *testing.T) {
tests := []struct {
name string
in *GerritOrgRepoConfigs
want map[string]sets.String
}{
{
name: "multiple-org",
in: &GerritOrgRepoConfigs{
{
Org: "org-1",
Repos: []string{"repo-1"},
OptOutHelp: true,
},
{
Org: ... | explode_data.jsonl/41020 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 849
} | [
2830,
3393,
38,
615,
275,
21367,
2662,
12689,
693,
966,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
17430,
256,
353,
38,
615,
275,
42437,
25243,
84905,
198,
197,
50780,
2415,
14032,
60,
4917,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakeWithBool(t *testing.T) {
o := opt.Bool(0, true)
assert.True(t, o.IsDefined())
assert.Equal(t, 0, o.Get())
v, ok := o.Fetch()
assert.Equal(t, 0, v)
assert.True(t, ok)
o = opt.Bool(100, false)
assert.False(t, o.IsDefined())
assert.Panics(t, func() { o.Get() })
v, ok = o.Fetch()
assert.Equal(t,... | explode_data.jsonl/32426 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 171
} | [
2830,
3393,
8078,
2354,
11233,
1155,
353,
8840,
836,
8,
341,
22229,
1669,
3387,
52497,
7,
15,
11,
830,
692,
6948,
32443,
1155,
11,
297,
4506,
29361,
2398,
6948,
12808,
1155,
11,
220,
15,
11,
297,
2234,
12367,
5195,
11,
5394,
1669,
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 TestClientReceivingUnknownTopicWithBackoffFunc(t *testing.T) {
seedBroker := NewMockBroker(t, 1)
metadataResponse1 := new(MetadataResponse)
seedBroker.Returns(metadataResponse1)
retryCount := int32(0)
config := NewTestConfig()
config.Metadata.Retry.Max = 1
config.Metadata.Retry.BackoffFunc = func(retries... | explode_data.jsonl/54403 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 370
} | [
2830,
3393,
2959,
693,
46344,
13790,
26406,
2354,
3707,
1847,
9626,
1155,
353,
8840,
836,
8,
341,
197,
22602,
65545,
1669,
1532,
11571,
65545,
1155,
11,
220,
16,
692,
2109,
7603,
2582,
16,
1669,
501,
3189,
7603,
2582,
340,
197,
22602,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFrontendRouter_RedirectToEntryPage__should_redirect_to_login_when_auth_token_is_unavailable(t *testing.T) {
setup := setupTest(t, nil)
defer setup.ctrl.Finish()
setup.testCtx.Request = httptest.NewRequest(http.MethodGet, "/test", nil)
setup.router.RedirectToEntryPage(setup.testCtx)
assert.Equal(t, http... | explode_data.jsonl/32974 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
23395,
408,
9523,
92940,
1226,
1249,
5874,
2665,
563,
5445,
30043,
2346,
13681,
47636,
14014,
6458,
6892,
4907,
10334,
1155,
353,
8840,
836,
8,
341,
84571,
1669,
6505,
2271,
1155,
11,
2092,
340,
16867,
6505,
57078,
991,
18176,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNestedGroups(t *testing.T) {
handlerPrintCounter := func(w http.ResponseWriter, r *http.Request) {
counter, _ := r.Context().Value(ctxKey{"counter"}).(int)
w.Write([]byte(fmt.Sprintf("%v", counter)))
}
mwIncreaseCounter := func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.Res... | explode_data.jsonl/42880 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 715
} | [
2830,
3393,
71986,
22173,
1155,
353,
8840,
836,
8,
341,
53326,
8994,
14099,
1669,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
58261,
11,
716,
1669,
435,
9328,
1005,
1130,
7502,
1592,
4913,
8292,
9207,
68615,
396,
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 TestNamespaceSnapshotAllShardsSuccess(t *testing.T) {
shardMethodResults := []snapshotTestCase{
{
isSnapshotting: false,
expectSnapshot: true,
shardBootstrapStateBeforeTick: Bootstrapped,
shardSnapshotErr: nil,
isBootstrapped: true,
},
... | explode_data.jsonl/35360 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
22699,
15009,
2403,
2016,
2347,
7188,
1155,
353,
8840,
836,
8,
341,
36196,
567,
3523,
9801,
1669,
3056,
35501,
16458,
515,
197,
197,
515,
298,
19907,
15009,
1280,
25,
394,
895,
345,
298,
24952,
15009,
25,
394,
830,
345,
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 TestReporter(t *testing.T) {
var (
release = "release"
version = "version"
network = "192.168.0.0/16"
hostID = "hostid"
hostname = "hostname"
timestamp = time.Now()
metrics = report.Metrics{
host.Load1: report.MakeSingletonMetric(timestamp, 1.0),
host.CPUUsage: report.Make... | explode_data.jsonl/41261 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1248
} | [
2830,
3393,
52766,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
17200,
1623,
256,
284,
330,
22998,
698,
197,
74954,
256,
284,
330,
4366,
698,
197,
9038,
2349,
256,
284,
330,
16,
24,
17,
13,
16,
21,
23,
13,
15,
13,
15,
14,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestChannelReconfigureChannel(t *testing.T) {
t.Parallel()
// Scenario: We test the following things:
// Updating a channel with an outdated JoinChannel message doesn't work
// Removing an organization from a channel is indeed reflected in that
// the GossipChannel doesn't consider peers from that organizati... | explode_data.jsonl/66328 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1345
} | [
2830,
3393,
9629,
693,
21002,
9629,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
58663,
25,
1205,
1273,
279,
2701,
2513,
510,
197,
322,
78118,
264,
5496,
448,
458,
40526,
16471,
9629,
1943,
3171,
944,
975,
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 TestLoadTestPostsCommands(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
Client := th.Client
channel := th.BasicChannel
enableTesting := *th.App.Config().ServiceSettings.EnableTesting
defer func() {
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableTesting = enableT... | explode_data.jsonl/26341 | {
"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,
5879,
2271,
19631,
30479,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
71724,
1669,
270,
11716,
198,
71550,
1669,
270,
48868,
9629,
271,
197,
12552,
16451,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEncodeDecodePunycode(t *testing.T) {
for _, tst := range testcases {
enc := encode([]byte(tst[0]))
if string(enc) != tst[1] {
t.Errorf("%s encodeded as %s but should be %s", tst[0], enc, tst[1])
}
dec := decode([]byte(tst[1]))
if string(dec) != strings.ToLower(tst[0]) {
t.Errorf("%s decoded as... | explode_data.jsonl/74308 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 184
} | [
2830,
3393,
32535,
32564,
47,
359,
88,
1851,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
71707,
1669,
2088,
1273,
23910,
341,
197,
197,
954,
1669,
16164,
10556,
3782,
1155,
267,
58,
15,
10907,
197,
743,
914,
66941,
8,
961,
71707,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTool_ShowAction(t *testing.T) {
e, cleanup := fakes.NewTestEnv(t)
defer cleanup()
cmd := &command.Command{
Args: []string{"tool"},
ExecRoot: e.ExecRoot,
InputSpec: &command.InputSpec{
Inputs: []string{
"a/b/input.txt",
},
},
OutputFiles: []string{"a/b/out"},
}
opt := command.Defau... | explode_data.jsonl/8277 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 750
} | [
2830,
3393,
7740,
79665,
2512,
1155,
353,
8840,
836,
8,
341,
7727,
11,
21290,
1669,
282,
2050,
7121,
2271,
14359,
1155,
340,
16867,
21290,
741,
25920,
1669,
609,
5631,
12714,
515,
197,
197,
4117,
25,
257,
3056,
917,
4913,
14172,
7115,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDownloadIntoNonexistentBucket(t *testing.T) {
var (
baseParams = tutils.BaseAPIParams()
objName = "object"
obj = "storage.googleapis.com/nvdata-openimages/openimages-train-000001.tar"
)
bucket, err := tutils.GenerateNonexistentBucketName("download", baseParams)
tassert.CheckFatal(t, err)
... | explode_data.jsonl/70388 | {
"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,
11377,
26591,
8121,
64085,
36018,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
24195,
4870,
284,
259,
6031,
13018,
7082,
4870,
741,
197,
22671,
675,
262,
284,
330,
1700,
698,
197,
22671,
286,
284,
330,
16172,
19758,
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 TestIPv4Addresses(t *testing.T) {
if !unprivileged() {
t.Skip("skipping test in privileged mode.")
}
c, err := NewContainer(ContainerName)
if err != nil {
t.Errorf(err.Error())
}
if _, err := c.IPv4Addresses(); err != nil {
t.Errorf(err.Error())
}
} | explode_data.jsonl/2806 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 111
} | [
2830,
3393,
58056,
19,
52290,
1155,
353,
8840,
836,
8,
341,
743,
753,
359,
97288,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
304,
46261,
3856,
13053,
197,
630,
1444,
11,
1848,
1669,
1532,
4502,
75145,
675,
340,
743,
1848,
961,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccAWSDBInstance_enhancedMonitoring(t *testing.T) {
var dbInstance rds.DBInstance
rName := acctest.RandString(5)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSDBInstanceNoSnapshot,
Steps: []resource.Test... | explode_data.jsonl/33925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 260
} | [
2830,
3393,
14603,
36136,
3506,
2523,
6205,
71,
4874,
98062,
1155,
353,
8840,
836,
8,
341,
2405,
2927,
2523,
435,
5356,
22537,
2523,
198,
7000,
675,
1669,
1613,
67880,
2013,
437,
703,
7,
20,
692,
50346,
8787,
1155,
11,
5101,
31363,
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 |
func TestMergeWithPrecedence(t *testing.T) {
cases := []struct {
name string
first *meshconfig.ProxyConfig
second *meshconfig.ProxyConfig
expected *meshconfig.ProxyConfig
}{
{
name: "concurrency",
first: &meshconfig.ProxyConfig{
Concurrency: v(1),
},
second: &meshconfig.ProxyConfig{... | explode_data.jsonl/52374 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1335
} | [
2830,
3393,
52096,
2354,
4703,
1998,
763,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
42190,
262,
353,
23506,
1676,
75200,
2648,
198,
197,
197,
5569,
256,
353,
23506,
1676,
75200,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNewConsulDiscovery(t *testing.T) {
d := NewConsulDiscovery(config.TestLogger(), config.DefaultDiscovery())
assert.NotNil(t, d.log, "Logger")
assert.NotNil(t, d.client, "Consul client")
} | explode_data.jsonl/69055 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 76
} | [
2830,
3393,
3564,
15220,
360,
67400,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
1532,
15220,
360,
67400,
8754,
8787,
7395,
1507,
2193,
13275,
67400,
2398,
6948,
93882,
1155,
11,
294,
1665,
11,
330,
7395,
1138,
6948,
93882,
1155,
11,
294,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMetric_HistogramDataPoints(t *testing.T) {
ms := NewMetric()
ms.InitEmpty()
assert.EqualValues(t, NewHistogramDataPointSlice(), ms.HistogramDataPoints())
fillTestHistogramDataPointSlice(ms.HistogramDataPoints())
testValHistogramDataPoints := generateTestHistogramDataPointSlice()
assert.EqualValues(t, tes... | explode_data.jsonl/19514 | {
"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,
54310,
2039,
28499,
1043,
11411,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
54310,
741,
47691,
26849,
3522,
741,
6948,
12808,
6227,
1155,
11,
1532,
77210,
1043,
2609,
33236,
1507,
9829,
3839,
28499,
1043,
11411,
2398,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSetExpr(t *testing.T) {
assert.NoError(t, prepareEngine())
type User struct {
Id int64
Show bool
}
assert.NoError(t, testEngine.Sync2(new(User)))
cnt, err := testEngine.Insert(&User{
Show: true,
})
assert.NoError(t, err)
assert.EqualValues(t, 1, cnt)
var not = "NOT"
if testEngine.dialect.... | explode_data.jsonl/9275 | {
"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,
1649,
16041,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
10549,
4571,
12367,
13158,
2657,
2036,
341,
197,
67211,
256,
526,
21,
19,
198,
197,
197,
7812,
1807,
198,
197,
630,
6948,
35699,
1155,
11,
1273,
4571,
92183... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVectorBase(t *testing.T) {
v := New(WithCapacity(10))
assert.True(t, v.Empty())
assert.Equal(t, 10, v.Capacity())
v.PushBack(1)
v.PushBack(2)
assert.False(t, v.Empty())
assert.Equal(t, 2, v.Size())
assert.Equal(t, 1, v.Front())
assert.Equal(t, 2, v.Back())
} | explode_data.jsonl/33850 | {
"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,
3781,
3978,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
1532,
7,
2354,
29392,
7,
16,
15,
1171,
6948,
32443,
1155,
11,
348,
11180,
2398,
6948,
12808,
1155,
11,
220,
16,
15,
11,
348,
78963,
4018,
2398,
5195,
34981,
3707,
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 TestNonExistentImageStream(t *testing.T) {
// this buildconfig references a non-existent image stream, so an update to the real image stream should not
// trigger a build here.
buildcfg := mockBuildConfig("registry.com/namespace/imagename", "registry.com/namespace/imagename", "testImageStream", "testTag")
imag... | explode_data.jsonl/69170 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 334
} | [
2830,
3393,
8121,
840,
18128,
1906,
3027,
1155,
353,
8840,
836,
8,
341,
197,
322,
419,
1936,
1676,
15057,
264,
2477,
59828,
2168,
4269,
11,
773,
458,
2647,
311,
279,
1931,
2168,
4269,
1265,
537,
198,
197,
322,
8183,
264,
1936,
1588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssueFind(t *testing.T) {
defer gock.Off()
gock.New("https://try.gogs.io").
Get("/api/v1/repos/gogits/gogs/issues/1").
Reply(200).
Type("application/json").
File("testdata/issue.json")
client, _ := New("https://try.gogs.io")
got, _, err := client.Issues.Find(context.Background(), "gogits/gogs", 1... | explode_data.jsonl/77747 | {
"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,
42006,
9885,
1155,
353,
8840,
836,
8,
341,
16867,
728,
377,
13,
4596,
2822,
3174,
1176,
7121,
445,
2428,
1110,
1539,
1302,
26307,
4245,
38609,
197,
37654,
4283,
2068,
5457,
16,
49505,
4846,
538,
1199,
4846,
26307,
38745,
14,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestAPIRequestParameters_WithSorting_SetsSorting(t *testing.T) {
s := APIRequestSorting{
Property: "testproperty1",
}
params := APIRequestParameters{}
params.WithSorting(s)
assert.Equal(t, s, params.Sorting)
} | explode_data.jsonl/44622 | {
"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,
7082,
1900,
9706,
62,
2354,
71681,
1098,
1415,
71681,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
5333,
1900,
71681,
515,
197,
197,
3052,
25,
330,
1944,
3699,
16,
756,
197,
532,
25856,
1669,
5333,
1900,
9706,
31483,
25856,
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 |
func TestGetClusterPlansFromServiceName(t *testing.T) {
planExternalMetaDataRaw, err := fakePlanExternalMetaDataRaw()
if err != nil {
fmt.Printf("error occured %v during marshalling", err)
return
}
planServiceInstanceCreateParameterSchemasRaw, err := fakePlanServiceInstanceCreateParameterSchemasRaw()
if err !... | explode_data.jsonl/65170 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2574
} | [
2830,
3393,
1949,
28678,
97728,
3830,
1860,
675,
1155,
353,
8840,
836,
8,
341,
197,
10393,
25913,
37307,
20015,
11,
1848,
1669,
12418,
20485,
25913,
37307,
20015,
741,
743,
1848,
961,
2092,
341,
197,
11009,
19367,
445,
841,
34942,
1018,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetRemote(t *testing.T) {
t.Parallel()
// windows fails when lazy blob is being extracted with "invalid windows mount type: 'bind'"
if runtime.GOOS != "linux" {
t.Skipf("unsupported GOOS: %s", runtime.GOOS)
}
ctx := namespaces.WithNamespace(context.Background(), "buildkit-test")
tmpdir, err := ioutil... | explode_data.jsonl/3979 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2835
} | [
2830,
3393,
1949,
24703,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
322,
11030,
14525,
979,
15678,
23404,
374,
1660,
27432,
448,
330,
11808,
11030,
6470,
943,
25,
364,
7666,
41165,
743,
15592,
97574,
3126,
961,
330,
1421... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateSensor(t *testing.T) {
dir := "../../examples/sensors"
files, err := ioutil.ReadDir(dir)
assert.Nil(t, err)
for _, file := range files {
content, err := ioutil.ReadFile(fmt.Sprintf("%s/%s", dir, file.Name()))
assert.Nil(t, err)
var sensor *v1alpha1.Sensor
err = yaml.Unmarshal(content, &sens... | explode_data.jsonl/60534 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
17926,
30752,
1155,
353,
8840,
836,
8,
341,
48532,
1669,
10208,
51668,
2687,
26529,
698,
74075,
11,
1848,
1669,
43144,
6503,
6184,
14161,
340,
6948,
59678,
1155,
11,
1848,
340,
2023,
8358,
1034,
1669,
2088,
3542,
341,
197,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAPISelector_Select(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
fmt.Fprint(w, testAPIServerString)
}))
defer ts.Close()
u, _ := url.Parse(ts.URL)
as := NewAPISelector(u)
actual, _ := as.Select(context.TODO(), &Params{
Infra: "test",
... | explode_data.jsonl/18678 | {
"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,
7082,
5877,
58073,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
4232,
353,
1254,
9659,
8,
341,
197,
11009,
991,
1350,
3622,
11,
1273,
2537,
1637,
2836,
703,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestApiVersion(t *testing.T) {
for _, hey := range []struct {
x Gvk
exp string
}{
{Gvk{}, ""},
{Gvk{Kind: "k"}, ""},
{Gvk{Version: "v"}, "v"},
{Gvk{Version: "v", Kind: "k"}, "v"},
{Gvk{Group: "g"}, "g/"},
{Gvk{Group: "g", Kind: "k"}, "g/"},
{Gvk{Group: "g", Version: "v"}, "g/v"},
{Gvk{Group... | explode_data.jsonl/39016 | {
"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,
6563,
5637,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
34209,
1669,
2088,
3056,
1235,
341,
197,
10225,
256,
479,
48363,
198,
197,
48558,
914,
198,
197,
59403,
197,
197,
90,
38,
48363,
22655,
77496,
197,
197,
90,
38,
48363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseKeyword(t *testing.T) {
foo := strings.Split("republic dominican cuba caribbean greenland el salvador too", " ")
var args []string
for _, s := range foo {
args = append(args, []string{"--foo", s}...)
}
f := NewFixture(t, model.NewUserConfigState(args))
defer f.TearDown()
f.File("Tiltfile", `
co... | explode_data.jsonl/65226 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 201
} | [
2830,
3393,
14463,
34481,
1155,
353,
8840,
836,
8,
341,
197,
7975,
1669,
9069,
19823,
445,
265,
888,
11111,
7065,
18728,
64,
1803,
32059,
6176,
1933,
655,
27059,
5364,
2238,
497,
330,
14167,
2405,
2827,
3056,
917,
198,
2023,
8358,
274,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCloudHypervisorCleanupVM(t *testing.T) {
assert := assert.New(t)
store, err := persist.GetDriver()
assert.NoError(err, "persist.GetDriver() unexpected error")
clh := &cloudHypervisor{
config: HypervisorConfig{
VMStorePath: store.RunVMStoragePath(),
RunStorePath: store.RunStoragePath(),
},
}
... | explode_data.jsonl/68499 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 314
} | [
2830,
3393,
16055,
39,
1082,
31396,
67335,
11187,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
57279,
11,
1848,
1669,
22334,
2234,
11349,
741,
6948,
35699,
3964,
11,
330,
39826,
2234,
11349,
368,
16500,
1465,
5130,
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 TestCollectorVolumeMountsWithVolumes(t *testing.T) {
name := "my-instance"
globalVolumes := []corev1.Volume{
{
Name: "globalVolume",
VolumeSource: corev1.VolumeSource{},
},
}
globalVolumeMounts := []corev1.VolumeMount{
{
Name: "globalVolume",
},
}
collectorVolumes := []corev1.Volu... | explode_data.jsonl/59524 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 524
} | [
2830,
3393,
53694,
18902,
16284,
16056,
96325,
1155,
353,
8840,
836,
8,
341,
11609,
1669,
330,
2408,
73655,
1837,
18842,
96325,
1669,
3056,
98645,
16,
79106,
515,
197,
197,
515,
298,
21297,
25,
260,
330,
9752,
18902,
756,
298,
17446,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConnectToMongo(t *testing.T) {
ctx, client, _, err := ConnectToMongo(mongoTestsHostURL, "", "")
if err != nil {
log.Fatal(err)
}
// Check the connection
err = client.Ping(ctx, nil)
if err != nil {
log.Fatal(err)
}
} | explode_data.jsonl/71134 | {
"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,
14611,
1249,
54998,
1155,
353,
8840,
836,
8,
341,
20985,
11,
2943,
11,
8358,
1848,
1669,
13015,
1249,
54998,
1255,
6363,
18200,
9296,
3144,
11,
7342,
14676,
743,
1848,
961,
2092,
341,
197,
6725,
26133,
3964,
340,
197,
630,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestHostInfo_ConnectAddress(t *testing.T) {
var localhost = net.IPv4(127, 0, 0, 1)
tests := []struct {
name string
connectAddr net.IP
rpcAddr net.IP
broadcastAddr net.IP
peer net.IP
}{
{name: "rpc_address", rpcAddr: localhost},
{name: "connect_address", connectAddr: local... | explode_data.jsonl/37536 | {
"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,
9296,
1731,
15100,
2321,
4286,
1155,
353,
8840,
836,
8,
341,
2405,
47422,
284,
4179,
46917,
85,
19,
7,
16,
17,
22,
11,
220,
15,
11,
220,
15,
11,
220,
16,
340,
78216,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDialerCancelDial(t *testing.T) {
done := make(chan struct{}, 1)
var (
l net.Listener
err error
setupWg sync.WaitGroup
connsMadeWg sync.WaitGroup
)
setupWg.Add(1)
connsMadeWg.Add(5)
go func() {
// Continuously accept connections from myself
l, err = net.Listen("tcp", "1... | explode_data.jsonl/72397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 770
} | [
2830,
3393,
35,
530,
261,
9269,
35,
530,
1155,
353,
8840,
836,
8,
341,
40495,
1669,
1281,
35190,
2036,
22655,
220,
16,
692,
2405,
2399,
197,
8810,
1843,
4179,
64091,
198,
197,
9859,
260,
1465,
198,
197,
84571,
54,
70,
257,
12811,
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... | 5 |
func TestHybiShortRead(t *testing.T) {
wireData := []byte{0x81, 0x05, 'h', 'e', 'l', 'l', 'o',
0x89, 0x05, 'h', 'e', 'l', 'l', 'o', // ping
0x81, 0x05, 'w', 'o', 'r', 'l', 'd'}
br := bufio.NewReader(bytes.NewBuffer(wireData))
bw := bufio.NewWriter(bytes.NewBuffer([]byte{}))
conn := newHybiConn(newConfig(t, "/")... | explode_data.jsonl/53446 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 511
} | [
2830,
3393,
30816,
8221,
12472,
4418,
1155,
353,
8840,
836,
8,
341,
6692,
554,
1043,
1669,
3056,
3782,
90,
15,
87,
23,
16,
11,
220,
15,
87,
15,
20,
11,
364,
71,
516,
364,
68,
516,
364,
75,
516,
364,
75,
516,
364,
78,
751,
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... | 8 |
func TestTruncateBody(t *testing.T) {
tests := []struct {
body string
want string
level string
}{
// Anything below 8 is completely truncated
{
body: "Completely truncated below 8",
want: " [truncated 28 chars]",
level: "0",
},
// Small strings are not truncated by high levels
{
body: ... | explode_data.jsonl/13286 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 607
} | [
2830,
3393,
1282,
26900,
5444,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
35402,
220,
914,
198,
197,
50780,
220,
914,
198,
197,
53743,
914,
198,
197,
59403,
197,
197,
322,
40933,
3685,
220,
23,
374,
6587,
59756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCallModelSecondArg(t *testing.T) {
t.Skip("call model times out right now")
tc := requireTestCaseWithModelAndSymbols(t, `import requests
url = "https://it-is-a-good-question/42-is-a-good-answer"
data = dict(field=5)
requests.get(url, $`)
completions := requireCompletions(t, tc, CallModel{})
require.NotE... | explode_data.jsonl/56042 | {
"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,
7220,
1712,
15666,
2735,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
445,
6659,
1614,
3039,
700,
1290,
1431,
1138,
78255,
1669,
1373,
16458,
2354,
1712,
3036,
56213,
1155,
11,
1565,
474,
7388,
4710,
1085,
284,
330,
2428,
1110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSuObjectObjectAsKey(t *testing.T) {
ob := SuObject{}
ob.Set(&SuObject{}, SuInt(123))
assert.T(t).This(ob.Get(nil, &SuObject{})).Is(SuInt(123))
} | explode_data.jsonl/7113 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 69
} | [
2830,
3393,
36459,
1190,
1190,
2121,
1592,
1155,
353,
8840,
836,
8,
341,
63353,
1669,
16931,
1190,
16094,
63353,
4202,
2099,
36459,
1190,
22655,
16931,
1072,
7,
16,
17,
18,
1171,
6948,
836,
1155,
568,
1986,
49595,
2234,
27907,
11,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestSnapshot(t *testing.T) {
nodeName := "node"
now := time.Now()
ttl := 10 * time.Second
testPods := []*v1.Pod{
makeBasePod(t, nodeName, "test-1", "100m", "500", "", []v1.ContainerPort{{HostIP: "127.0.0.1", HostPort: 80, Protocol: "TCP"}}),
makeBasePod(t, nodeName, "test-2", "200m", "1Ki", "", []v1.Conta... | explode_data.jsonl/19645 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 610
} | [
2830,
3393,
15009,
1155,
353,
8840,
836,
8,
341,
20831,
675,
1669,
330,
3509,
698,
80922,
1669,
882,
13244,
741,
3244,
11544,
1669,
220,
16,
15,
353,
882,
32435,
271,
18185,
23527,
82,
1669,
29838,
85,
16,
88823,
515,
197,
77438,
3978... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetValidatorSortingUnmixed(t *testing.T) {
app, ctx, addrs, _ := bootstrapValidatorTest(t, 1000, 20)
// initialize some validators into the state
amts := []int64{
0,
100 * sdk.PowerReduction.Int64(),
1 * sdk.PowerReduction.Int64(),
400 * sdk.PowerReduction.Int64(),
200 * sdk.PowerReduction.Int64(... | explode_data.jsonl/6097 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1595
} | [
2830,
3393,
1949,
14256,
71681,
1806,
56685,
1155,
353,
8840,
836,
8,
341,
28236,
11,
5635,
11,
912,
5428,
11,
716,
1669,
26925,
14256,
2271,
1155,
11,
220,
16,
15,
15,
15,
11,
220,
17,
15,
692,
197,
322,
9468,
1045,
38588,
1119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProposalSent_ExecuteInbound(t *testing.T) {
t.Run("Successes", func(t *testing.T) {
followup, action, err := (&proposalSent{}).ExecuteInbound(&metaData{proposeCredential: &ProposeCredential{}})
require.NoError(t, err)
require.Equal(t, &noOp{}, followup)
require.NotNil(t, action)
ctrl := gomock.NewC... | explode_data.jsonl/53013 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 309
} | [
2830,
3393,
98637,
31358,
83453,
641,
10891,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
7188,
288,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
1166,
1544,
454,
11,
1917,
11,
1848,
1669,
15899,
73874,
31358,
6257,
568,
17174,
64... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRWFileHandleWriteAt(t *testing.T) {
r, vfs, fh, cleanup := rwHandleCreateWriteOnly(t)
defer cleanup()
offset := func() int64 {
n, err := fh.Seek(0, io.SeekCurrent)
require.NoError(t, err)
return n
}
// Preconditions
assert.Equal(t, int64(0), offset())
assert.True(t, fh.opened)
assert.False(t, f... | explode_data.jsonl/7344 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 498
} | [
2830,
3393,
56368,
1703,
6999,
7985,
1655,
1155,
353,
8840,
836,
8,
341,
7000,
11,
92941,
11,
36075,
11,
21290,
1669,
25991,
6999,
4021,
7985,
7308,
1155,
340,
16867,
21290,
2822,
40668,
1669,
2915,
368,
526,
21,
19,
341,
197,
9038,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMinimumNObjectIDArgs(t *testing.T) {
tests := []struct {
name string
args []string
wantErr bool
}{
{
name: "no args",
args: []string{},
wantErr: true,
},
{
name: "with correct args",
args: []string{"5dd56c847a3e5a1f363d424d"},
wantErr: false,
},
{
name: ... | explode_data.jsonl/59323 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 454
} | [
2830,
3393,
28695,
45,
1190,
915,
4117,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
3056,
917,
198,
197,
50780,
7747,
1807,
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... | 2 |
func TestValidatePersistentVolumeSourceUpdate(t *testing.T) {
validVolume := testVolume("foo", "", core.PersistentVolumeSpec{
Capacity: core.ResourceList{
core.ResourceName(core.ResourceStorage): resource.MustParse("1G"),
},
AccessModes: []core.PersistentVolumeAccessMode{core.ReadWriteOnce},
PersistentVolum... | explode_data.jsonl/992 | {
"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,
17926,
53194,
18902,
3608,
4289,
1155,
353,
8840,
836,
8,
341,
56322,
18902,
1669,
1273,
18902,
445,
7975,
497,
7342,
6200,
61655,
18902,
8327,
515,
197,
6258,
391,
4018,
25,
6200,
20766,
852,
515,
298,
71882,
20766,
675,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHasOnlyTags(t *testing.T) {
opt := NewOption()
tp := newTextProcessor(opt)
actuals := []bool{
tp.IsOnlyTags("\t <br> \n"),
tp.IsOnlyTags("\t hoge \n"),
}
expecteds := []bool{
true,
false,
}
for i := range actuals {
if actuals[i] != expecteds[i] {
t.Errorf("expected %v, but got %v", expect... | explode_data.jsonl/25043 | {
"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,
10281,
7308,
15930,
1155,
353,
8840,
836,
8,
341,
64838,
1669,
1532,
5341,
741,
73423,
1669,
94653,
22946,
24539,
692,
88814,
82,
1669,
3056,
2641,
515,
197,
73423,
4506,
7308,
15930,
4921,
83,
366,
1323,
29,
1124,
77,
4461,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadIdentityFile(t *testing.T) {
t.Parallel()
// Load expected tls.Config and ssh.ClientConfig.
expectedTLSConfig := getExpectedTLSConfig(t)
expectedSSHConfig := getExpectedSSHConfig(t)
// Write identity file to disk.
path := filepath.Join(t.TempDir(), "file")
idFile := &identityfile.IdentityFile{
P... | explode_data.jsonl/55479 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 457
} | [
2830,
3393,
92985,
1703,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
8893,
3601,
55026,
10753,
323,
29230,
11716,
2648,
624,
42400,
45439,
2648,
1669,
633,
18896,
45439,
2648,
1155,
340,
42400,
62419,
2648,
1669,
633,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEndpointConfigWithMultipleBackends(t *testing.T) {
configPath := filepath.Join(getConfigPath(), configTestEntityMatchersFile)
sampleViper := newViper(configPath)
var backends []core.ConfigBackend
backendMap := make(map[string]interface{})
backendMap["client"] = sampleViper.Get("client")
backends = appe... | explode_data.jsonl/34099 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1381
} | [
2830,
3393,
27380,
2648,
2354,
32089,
3707,
1412,
1155,
353,
8840,
836,
8,
1476,
25873,
1820,
1669,
26054,
22363,
5433,
2648,
1820,
1507,
2193,
2271,
3030,
37862,
1703,
340,
1903,
1516,
53,
12858,
1669,
501,
53,
12858,
8754,
1820,
692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestResetAllWithGit(t *testing.T) {
th := git.InitTestRepositoryFromLocal(t)
defer th.CleanUp(t)
_, err := testFile(th.RepoPath, "file")
require.NoError(t, err)
err = AddAll(th.Repository, testAddopt1)
require.NoError(t, err)
var tests = []struct {
inp1 *git.Repository
inp2 *ResetOptions
}{
{th.Re... | explode_data.jsonl/16673 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 199
} | [
2830,
3393,
14828,
2403,
2354,
46562,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
16345,
26849,
2271,
4624,
3830,
7319,
1155,
340,
16867,
270,
727,
2675,
2324,
1155,
692,
197,
6878,
1848,
1669,
1273,
1703,
24365,
2817,
5368,
1820,
11,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreGateway_InitialSyncFailure(t *testing.T) {
ctx := context.Background()
gatewayCfg := mockGatewayConfig()
gatewayCfg.ShardingEnabled = true
storageCfg := mockStorageConfig(t)
ringStore := consul.NewInMemoryClient(ring.GetCodec())
bucketClient := &bucket.ClientMock{}
g, err := newStoreGateway(gatewa... | explode_data.jsonl/57958 | {
"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,
6093,
40709,
62,
6341,
12154,
17507,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
3174,
12043,
42467,
1669,
7860,
40709,
2648,
741,
3174,
12043,
42467,
10849,
28410,
5462,
284,
830,
198,
197,
16172,
42467,
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 TestPrQueueOneReaderOneWriter(t *testing.T) {
clus := NewClusterV3(t, &ClusterConfig{Size: 1})
defer clus.Terminate(t)
// write out five items with random priority
etcdc := clus.RandClient()
q := recipe.NewPriorityQueue(etcdc, "testprq")
for i := 0; i < 5; i++ {
// [0, 2] priority for priority collision t... | explode_data.jsonl/14552 | {
"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,
3533,
7554,
3966,
5062,
3966,
6492,
1155,
353,
8840,
836,
8,
341,
197,
4163,
1669,
1532,
28678,
53,
18,
1155,
11,
609,
28678,
2648,
90,
1695,
25,
220,
16,
3518,
16867,
1185,
355,
836,
261,
34016,
1155,
692,
197,
322,
327... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigDefaultEmailNotificationContentsType(t *testing.T) {
c1 := Config{}
c1.SetDefaults()
if *c1.EmailSettings.EmailNotificationContentsType != EMAIL_NOTIFICATION_CONTENTS_FULL {
t.Fatal("EmailSettings.EmailNotificationContentsType should default to 'full'")
}
} | explode_data.jsonl/50669 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
2648,
3675,
4781,
11196,
14803,
929,
1155,
353,
8840,
836,
8,
341,
1444,
16,
1669,
5532,
16094,
1444,
16,
4202,
16273,
2822,
743,
353,
66,
16,
24066,
6086,
24066,
11196,
14803,
929,
961,
51708,
54241,
25560,
50,
29822,
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
] | 2 |
func TestBTreeMultipleSearch1(t *testing.T) {
tree := newRangeTree()
tree.update(&metapb.Range{StartKey: []byte("a"), EndKey: []byte("e")})
tree.update(&metapb.Range{StartKey: []byte("e"), EndKey: []byte("k")})
tree.update(&metapb.Range{StartKey: []byte("k"), EndKey: []byte("t")})
tree.update(&metapb.Range{StartKe... | explode_data.jsonl/25353 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 281
} | [
2830,
3393,
33,
6533,
32089,
5890,
16,
1155,
353,
8840,
836,
8,
341,
51968,
1669,
501,
6046,
6533,
741,
51968,
5317,
2099,
4059,
391,
65,
24783,
90,
3479,
1592,
25,
3056,
3782,
445,
64,
3975,
3972,
1592,
25,
3056,
3782,
445,
68,
899... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRollBackVote(t *testing.T) {
desc := &contract.TxDesc{
Module: "tdpos",
Method: "rollback_vote",
}
strDesc, _ := json.Marshal(desc)
U, L, tdpos := commonWork(t)
txCons, block := makeTxWithDesc(strDesc, U, L, t)
tdpos.context = &contract.TxContext{}
tdpos.context.UtxoBatch = tdpos.utxoVM.NewBatch()... | explode_data.jsonl/77200 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 489
} | [
2830,
3393,
32355,
3707,
41412,
1155,
353,
8840,
836,
8,
341,
41653,
1669,
609,
20257,
81362,
11065,
515,
197,
197,
3332,
25,
330,
1296,
966,
756,
197,
84589,
25,
330,
33559,
54360,
756,
197,
532,
11355,
11065,
11,
716,
1669,
2951,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAs(t *testing.T) {
var errT errorT
var errP *os.PathError
var p *poser
_, errF := os.Open("non-existing")
testCases := []struct {
err error
target interface{}
match bool
}{{
fmt.Errorf("pittied the fool: %w", errorT{}),
&errT,
true,
}, {
errF,
&errP,
true,
}, {
errors.Opaque(er... | explode_data.jsonl/5221 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 509
} | [
2830,
3393,
2121,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
51,
1465,
51,
198,
2405,
1848,
47,
353,
436,
17474,
1454,
198,
2405,
281,
353,
20071,
198,
197,
6878,
1848,
37,
1669,
2643,
12953,
445,
6280,
49357,
5130,
18185,
37302,
1669,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestFloatListEncoder(t *testing.T) {
e := NewFloatListEncoder()
d := NewFloatListDecoder(false)
slices := [][]float64{
{},
{0},
{10.1, 20.2, 30.3},
repeatFloatSlice([]float64{-11, 22, -33, 44}, 128),
}
// test Encode & Decode
for _, sl := range slices {
b := e.Encode(sl)
assert.Equal(t, sl, d.De... | explode_data.jsonl/60190 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 292
} | [
2830,
3393,
5442,
852,
19921,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
1532,
5442,
852,
19921,
741,
2698,
1669,
1532,
5442,
852,
20732,
3576,
340,
1903,
37414,
1669,
52931,
3649,
21,
19,
515,
197,
197,
38837,
197,
197,
90,
15,
1583,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScriptTokenizerUnsupportedVersion(t *testing.T) {
const scriptVersion = 65535
tokenizer := MakeScriptTokenizer(scriptVersion, nil)
if !errors.Is(tokenizer.Err(), ErrUnsupportedScriptVersion) {
t.Fatalf("script tokenizer did not error with unsupported version")
}
} | explode_data.jsonl/33514 | {
"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,
5910,
37434,
41884,
5637,
1155,
353,
8840,
836,
8,
341,
4777,
5316,
5637,
284,
220,
21,
20,
20,
18,
20,
198,
43947,
3135,
1669,
7405,
5910,
37434,
42795,
5637,
11,
2092,
340,
743,
753,
7650,
4506,
13274,
3135,
27862,
1507,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequestReceived_ExecuteInbound(t *testing.T) {
t.Run("Successes", func(t *testing.T) {
followup, action, err := (&requestReceived{}).ExecuteInbound(&metaData{issueCredential: &IssueCredential{}})
require.NoError(t, err)
require.Equal(t, &credentialIssued{}, followup)
require.NotNil(t, action)
ctrl ... | explode_data.jsonl/53007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 308
} | [
2830,
3393,
1900,
23260,
83453,
641,
10891,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
7188,
288,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
1166,
1544,
454,
11,
1917,
11,
1848,
1669,
15899,
2035,
23260,
6257,
568,
17174,
641,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatConvertFp16(t *testing.T) {
src := NewMatWithSize(100, 100, MatTypeCV32F)
dst := src.ConvertFp16()
if dst.Empty() {
t.Error("TestConvertFp16 dst should not be empty.")
}
} | explode_data.jsonl/81698 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
11575,
12012,
37,
79,
16,
21,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
1532,
11575,
2354,
1695,
7,
16,
15,
15,
11,
220,
16,
15,
15,
11,
6867,
929,
19589,
18,
17,
37,
340,
52051,
1669,
2286,
36179,
37,
79,
16,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetEmojiImage(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
Client := th.Client
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableCustomEmoji = true })
emoji1 := &model.Emoji{
CreatorId: th.BasicUser.Id,
Name: model.NewId(),
}
emoji1, resp := Client.Cre... | explode_data.jsonl/76086 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1286
} | [
2830,
3393,
1949,
92731,
1906,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
271,
70479,
5105,
16689,
2648,
18552,
28272,
353,
2528,
10753,
8,
314,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFastGetPodsToMove(t *testing.T) {
// Unreplicated pod
pod1 := &kube_api.Pod{
ObjectMeta: kube_api.ObjectMeta{
Name: "pod1",
Namespace: "ns",
},
}
_, err := FastGetPodsToMove(schedulercache.NewNodeInfo(pod1), false, true, kube_api.Codecs.UniversalDecoder())
assert.Error(t, err)
// Replica... | explode_data.jsonl/70895 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 943
} | [
2830,
3393,
32174,
1949,
23527,
82,
1249,
9860,
1155,
353,
8840,
836,
8,
1476,
197,
322,
1230,
9995,
13724,
7509,
198,
3223,
347,
16,
1669,
609,
97717,
11697,
88823,
515,
197,
23816,
12175,
25,
80958,
11697,
80222,
515,
298,
21297,
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 TestNewFileItem(t *testing.T) {
f := &fileDialog{file: &FileDialog{}}
_ = f.makeUI()
item := f.newFileItem("/path/to/filename.txt", false)
assert.Equal(t, item.name, "filename")
test.Tap(item)
assert.True(t, item.isCurrent)
assert.Equal(t, item, f.selected)
} | explode_data.jsonl/76866 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
3564,
1703,
1234,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
609,
1192,
4468,
90,
1192,
25,
609,
26596,
6257,
532,
197,
62,
284,
282,
10117,
2275,
741,
22339,
1669,
282,
4618,
1703,
1234,
4283,
2343,
32429,
6663,
4033,
3909... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClaimPosition(t *testing.T) {
t.Parallel()
_, err := b.ClaimPosition(1337)
if err == nil {
t.Error("Test Failed - ClaimPosition() error")
}
} | explode_data.jsonl/79954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 60
} | [
2830,
3393,
45544,
3812,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
6878,
1848,
1669,
293,
21610,
2640,
3812,
7,
16,
18,
18,
22,
340,
743,
1848,
621,
2092,
341,
197,
3244,
6141,
445,
2271,
21379,
481,
37502,
3812,
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
] | 2 |
func TestAssociateAuditorByUsernameAndOrigin(t *testing.T) {
Convey("Associate auditor by username and origin", t, func() {
expectedBody := `{"origin":"ldap","username":"user-name"}`
setup(MockRoute{"PUT", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors", []string{associateOrgUserPayload}, "", 201... | explode_data.jsonl/4446 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 345
} | [
2830,
3393,
95540,
52949,
1919,
91519,
3036,
13298,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
95540,
53306,
553,
5934,
323,
6238,
497,
259,
11,
2915,
368,
341,
197,
42400,
5444,
1669,
1565,
4913,
8611,
3252,
38665,
2198,
5113,
325... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProjectEulerChallenges(t *testing.T) {
testCases := []struct {
desc string
actualResult int
expectedResult int
}{
{"67: Maximum Path Sum Two", MaximumPathSumTwo(), 7273},
}
for _, tC := range testCases {
if tC.actualResult != tC.expectedResult {
t.Errorf("Failure. Test case: %v. Ac... | explode_data.jsonl/41119 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 163
} | [
2830,
3393,
7849,
36,
8479,
1143,
42370,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
1843,
914,
198,
197,
88814,
2077,
256,
526,
198,
197,
42400,
2077,
526,
198,
197,
59403,
197,
197,
4913,
21,
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... | 3 |
func TestGocloak_GetClientRoles(t *testing.T) {
t.Parallel()
cfg := GetConfig(t)
client := NewClientWithDebug(t)
token := GetAdminToken(t, client)
testClient := GetClientByClientID(t, client, cfg.GoCloak.ClientID)
_, err := client.GetClientRoles(
token.AccessToken,
cfg.GoCloak.Realm,
testClient.ID)
FailI... | explode_data.jsonl/79534 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
38,
509,
385,
585,
13614,
2959,
25116,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50286,
1669,
2126,
2648,
1155,
340,
25291,
1669,
1532,
2959,
2354,
7939,
1155,
340,
43947,
1669,
2126,
7210,
3323,
1155,
11,
2943,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidate(t *testing.T) {
t.Parallel()
ctx := context.TODO()
now := time.Now()
z1, err := zone.New(ctx, t.Name()+"1")
require.NoError(t, err)
m1, err := mode.New(ctx, z1.ID, t.Name()+"1", 70, 80, 1)
require.NoError(t, err)
m2, err := mode.New(ctx, z1.ID, t.Name()+"2", 71, 79, 2)
require.NoError(t, err... | explode_data.jsonl/13338 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1070
} | [
2830,
3393,
17926,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
2266,
90988,
741,
80922,
1669,
882,
13244,
2822,
20832,
16,
11,
1848,
1669,
10143,
7121,
7502,
11,
259,
2967,
25589,
16,
1138,
17957,
35699,
1155,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestAccKmsSecretCiphertext_basic(t *testing.T) {
t.Parallel()
kms := BootstrapKMSKey(t)
plaintext := fmt.Sprintf("secret-%s", acctest.RandString(10))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Config: ... | explode_data.jsonl/81402 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 302
} | [
2830,
3393,
14603,
42,
1011,
19773,
34,
45043,
34729,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
16463,
1011,
1669,
26059,
42,
4826,
1592,
1155,
692,
197,
71223,
1669,
8879,
17305,
445,
20474,
11069,
82,
497,
1613,
67880,
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 TestSingleAck(t *testing.T) {
ctx := context.Background()
ctx, cancel := context.WithTimeout(ctx, time.Second)
defer cancel()
workChan := make(chan *TestWork, 10)
go testWorker(workChan)
ack := ack.NewAckTree(ctx,
func() {
//we are good
},
func(err error) {
t.Errorf("Receive error %s", err.Erro... | explode_data.jsonl/51887 | {
"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,
10888,
55559,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
20985,
11,
9121,
1669,
2266,
26124,
7636,
7502,
11,
882,
32435,
340,
16867,
9121,
2822,
97038,
46019,
1669,
1281,
35190,
353,
2271,
6776,
11,
220,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIssue29993(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.NewSim... | explode_data.jsonl/5535 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1527
} | [
2830,
3393,
42006,
17,
24,
24,
24,
18,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTConfiguration(t *testing.T) {
invalidProtoID := THeaderProtocolID(-1)
if invalidProtoID.Validate() == nil {
t.Fatalf("Expected %v to be an invalid THeaderProtocolID, it passes the validation", invalidProtoID)
}
tlsConfig := &tls.Config{
Time: time.Now,
}
for _, c := range []struct {
label ... | explode_data.jsonl/9726 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3632
} | [
2830,
3393,
51,
7688,
1155,
353,
8840,
836,
8,
341,
197,
11808,
31549,
915,
1669,
350,
4047,
20689,
915,
4080,
16,
340,
743,
8318,
31549,
915,
47667,
368,
621,
2092,
341,
197,
3244,
30762,
445,
18896,
1018,
85,
311,
387,
458,
8318,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.