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 TestLevelDBReceiptsGetReceiptOK(t *testing.T) {
assert := assert.New(t)
conf := &LevelDBReceiptStoreConf{
Path: path.Join(tmpdir, "test7"),
}
r, err := newLevelDBReceipts(conf)
defer r.store.Close()
receipt1 := make(map[string]interface{})
receipt1["_id"] = "r1"
receipt1["prop1"] = "value1"
receipt1["f... | explode_data.jsonl/21458 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
4449,
3506,
67461,
82,
1949,
67461,
3925,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
67850,
1669,
609,
4449,
3506,
67461,
6093,
15578,
515,
197,
69640,
25,
1815,
22363,
10368,
3741,
11,
330,
1944,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseLevel(t *testing.T) {
tests := []struct {
name string
wantOut Level
wantErr bool
}{
{name: "debug", wantOut: DEBUG},
{name: "Info", wantOut: INFO},
{name: "WARN", wantOut: WARN},
{name: "error", wantOut: ERROR},
{name: "panic", wantOut: PANIC},
{name: "FATAL", wantOut: FATAL},
{na... | explode_data.jsonl/75478 | {
"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,
14463,
4449,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
50780,
2662,
9395,
198,
197,
50780,
7747,
1807,
198,
197,
59403,
197,
197,
47006,
25,
330,
8349,
497,
1366,
2662,
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 TestGenericArrayScanScannerSliceString(t *testing.T) {
src, expected, nss := `{NULL,"\"",xyz}`,
[]sql.NullString{{}, {String: `"`, Valid: true}, {String: `xyz`, Valid: true}},
[]sql.NullString{{String: ``, Valid: true}, {}, {}}
if err := (GenericArray{&nss}).Scan(src); err != nil {
t.Fatalf("Expected no e... | explode_data.jsonl/5345 | {
"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,
19964,
1857,
26570,
31002,
33236,
703,
1155,
353,
8840,
836,
8,
341,
41144,
11,
3601,
11,
308,
778,
1669,
53692,
4576,
1335,
55853,
28854,
27249,
197,
197,
1294,
3544,
23979,
703,
2979,
2137,
314,
703,
25,
53305,
7808,
7818,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContainsPath(t *testing.T) {
testContainsPath(t, false, "a.proto", "a.proto")
testContainsPath(t, true, ".", "a.proto")
testContainsPath(t, false, "a.proto", ".")
testContainsPath(t, false, ".", ".")
testContainsPath(t, true, ".", "a/b.proto")
testContainsPath(t, true, ".", "a/b")
testContainsPath(t, fa... | explode_data.jsonl/11906 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
23805,
1820,
1155,
353,
8840,
836,
8,
341,
18185,
23805,
1820,
1155,
11,
895,
11,
330,
64,
57322,
497,
330,
64,
57322,
1138,
18185,
23805,
1820,
1155,
11,
830,
11,
68514,
330,
64,
57322,
1138,
18185,
23805,
1820,
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... | 1 |
func TestSQLite_AutoIncrement(t *testing.T) {
liteRun(t, func(t *liteTest) {
usersT := &schema.Table{
Name: "users",
Columns: []*schema.Column{
{Name: "id", Type: &schema.ColumnType{Type: &schema.IntegerType{T: "integer"}}, Attrs: []schema.Attr{sqlite.AutoIncrement{}}},
},
}
usersT.PrimaryKey = &sch... | explode_data.jsonl/20086 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 290
} | [
2830,
3393,
81772,
1566,
1535,
38311,
1155,
353,
8840,
836,
8,
341,
8810,
632,
6727,
1155,
11,
2915,
1155,
353,
68078,
2271,
8,
341,
197,
90896,
51,
1669,
609,
17349,
18257,
515,
298,
21297,
25,
330,
4218,
756,
298,
197,
13965,
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 Test_validateEmailAddress(t *testing.T) {
type args struct {
email string
}
tests := []struct {
name string
args args
wantErr bool
}{
// TODO: Add test cases.
{
name: "Valid email",
args: args{
email: "hello@example.com",
},
wantErr: false,
},
{
name: "Invalid email - n... | explode_data.jsonl/58086 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
42681,
79986,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
57549,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
198,
197,
50780,
7747,
1807,
198,
197,
594... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_simplifyPath(t *testing.T) {
type args struct {
path string
}
tests := []struct {
name string
args args
want string
}{
{
"[Test Case 1]",
args{
"/a/./b/../../c/",
},
"/c",
},
{
"[Test Case 2]",
args{
"/home",
},
"/home",
},
{
"[Test Case 3]",
args{
... | explode_data.jsonl/38285 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 392
} | [
2830,
3393,
643,
70206,
1820,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
26781,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
914,
198,
197,
59403,
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... | 2 |
func TestRunAndMonitorPlugin(t *testing.T) {
// Dead simple plugin works for this test. No need to test daemonset/job specific logic so
// a job plugin is much simpler to test against.
testPlugin := &job.Plugin{
Base: driver.Base{
Definition: manifest.Manifest{
SonobuoyConfig: manifest.SonobuoyConfig{
... | explode_data.jsonl/8326 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1874
} | [
2830,
3393,
6727,
3036,
30098,
11546,
1155,
353,
8840,
836,
8,
341,
197,
322,
15021,
4285,
9006,
4278,
369,
419,
1273,
13,
2308,
1184,
311,
1273,
39293,
746,
77402,
3151,
12218,
773,
198,
197,
322,
264,
2618,
9006,
374,
1753,
34288,
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 TestTxNotifierMultipleHistoricalSpendRescans(t *testing.T) {
t.Parallel()
const startingHeight = 10
hintCache := newMockHintCache()
n := chainntnfs.NewTxNotifier(startingHeight, 100, hintCache, hintCache)
// The first registration for an outpoint in the notifier should request
// a historical spend rescan ... | explode_data.jsonl/69556 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 772
} | [
2830,
3393,
31584,
64729,
32089,
48983,
938,
50,
3740,
1061,
66,
596,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
4777,
5916,
3640,
284,
220,
16,
15,
198,
9598,
396,
8233,
1669,
501,
11571,
26987,
8233,
741,
9038,
1669,
878... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCumulativeWeights(t *testing.T) {
weights := []float64{1, 2, 3, 4, 5, 6, 7}
cum := CumulativeWeights(weights)
assert.Equal(t, []float64{1, 3, 6, 10, 15, 21, 28}, cum)
} | explode_data.jsonl/20514 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
85805,
22160,
55630,
1155,
353,
8840,
836,
8,
341,
197,
13327,
1669,
3056,
3649,
21,
19,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
532,
1444,
372,
1669,
31578,
22160,
55630... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Encoding_Entries(t *testing.T) {
record := &WALRecord{
UserID: "123",
RefEntries: RefEntries{
Ref: 456,
Entries: []logproto.Entry{
{
Timestamp: time.Unix(1000, 0),
Line: "first",
},
{
Timestamp: time.Unix(2000, 0),
Line: "second",
},
},
},
}
buf... | explode_data.jsonl/45900 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 234
} | [
2830,
3393,
93529,
3700,
62,
24533,
1155,
353,
8840,
836,
8,
341,
71952,
1669,
609,
54,
969,
6471,
515,
197,
31672,
915,
25,
330,
16,
17,
18,
756,
197,
197,
3945,
24533,
25,
8550,
24533,
515,
298,
197,
3945,
25,
220,
19,
20,
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... | 1 |
func TestUpdatePrivilege(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t1, t2;")
tk.MustExec("create table t1 (id int);")
tk.MustExec("create table t2 (id int);")
tk.MustExec("in... | explode_data.jsonl/5763 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1093
} | [
2830,
3393,
4289,
32124,
42769,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnqueueInFront(t *testing.T) {
finite_tests.EnqueueInFront(t, func(size int) interface {
goqueue.Owner
goqueue.Enqueuer
goqueue.EnqueueInFronter
goqueue.Peeker
} {
return finite.New(size)
})
} | explode_data.jsonl/54510 | {
"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,
1702,
4584,
641,
23395,
1155,
353,
8840,
836,
8,
341,
1166,
15856,
32509,
65625,
641,
23395,
1155,
11,
2915,
6856,
526,
8,
3749,
341,
197,
30680,
4584,
49920,
198,
197,
30680,
4584,
22834,
591,
8801,
198,
197,
30680,
4584,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBadRequest(t *testing.T) {
badRequestUrl := fmt.Sprintf("%s?%s=%s", createUrl(badRequestPath), badRequestMessage, "test")
resp, err := http.Get(badRequestUrl)
AssertThat(t, err, Is{nil})
AssertThat(t, resp.StatusCode, EqualTo{http.StatusBadRequest})
bodyBytes, _ := ioutil.ReadAll(resp.Body)
AssertThat(t,... | explode_data.jsonl/65287 | {
"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,
46015,
1155,
353,
8840,
836,
8,
341,
2233,
329,
1900,
2864,
1669,
8879,
17305,
4430,
82,
30,
4,
82,
7846,
82,
497,
1855,
2864,
1883,
329,
1900,
1820,
701,
3873,
1900,
2052,
11,
330,
1944,
1138,
34653,
11,
1848,
1669,
175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSessionSplitFetch(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
vnet := getVirtualNetwork()
ig := testinstance.NewTestInstanceGenerator(vnet, nil, nil)
defer ig.Close()
bgen := blocksutil.NewBlockGenerator()
inst := ig.Instances(11)
// Add 10 distinct blocks ... | explode_data.jsonl/2223 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 440
} | [
2830,
3393,
5283,
20193,
20714,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
2822,
5195,
4711,
1669,
633,
33026,
12320,
741,
197,
343,
1669,
1273,
4851,
7121,
2271,
2523,
12561,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestArgoCDInstanceSelector(t *testing.T) {
t.Run("Selector for a Valid name", func(t *testing.T) {
validName := "argocd-server"
selector, err := argocdInstanceSelector(validName)
assert.NilError(t, err)
assert.Equal(t, selector.String(), "app.kubernetes.io/managed-by=argocd-server")
})
t.Run("Selector f... | explode_data.jsonl/11935 | {
"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,
2735,
78,
6484,
2523,
5877,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5877,
369,
264,
7818,
829,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
56322,
675,
1669,
330,
858,
509,
67,
26300,
698,
197,
197,
8925,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReconciler_Batch_Rerun(t *testing.T) {
job := mock.Job()
job.Type = structs.JobTypeBatch
job.TaskGroups[0].Update = nil
// Create 10 allocations from the old job and have them be complete
var allocs []*structs.Allocation
for i := 0; i < 10; i++ {
alloc := mock.Alloc()
alloc.Job = job
alloc.JobID =... | explode_data.jsonl/67278 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 530
} | [
2830,
3393,
693,
40446,
5769,
1668,
754,
2568,
261,
359,
1155,
353,
8840,
836,
8,
341,
68577,
1669,
7860,
45293,
741,
68577,
10184,
284,
62845,
45293,
929,
21074,
198,
68577,
28258,
22173,
58,
15,
936,
4289,
284,
2092,
271,
197,
322,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateDuration(t *testing.T) {
type durationCheck struct {
duration *types.Duration
isValid bool
}
checks := []durationCheck{
{
duration: &types.Duration{Seconds: 1},
isValid: true,
},
{
duration: &types.Duration{Seconds: 1, Nanos: -1},
isValid: false,
},
{
duration: &type... | explode_data.jsonl/56895 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 326
} | [
2830,
3393,
17926,
12945,
1155,
353,
8840,
836,
8,
341,
13158,
8090,
3973,
2036,
341,
197,
89300,
353,
9242,
33795,
198,
197,
19907,
4088,
220,
1807,
198,
197,
630,
25157,
82,
1669,
3056,
17021,
3973,
515,
197,
197,
515,
298,
89300,
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 TestResolveGceAddressValue(t *testing.T) {
oldRunner := runner
defer func() { runner = oldRunner }()
runner = exec.TestRunner{Output: []byte(testIpAddress)}
zone := "us-central1-a"
cluster := model.Cluster{
Name: "kcd-clustername",
Provider: model.Provider{
GKE: &model.GkeProvider{
Project: "te... | explode_data.jsonl/3664 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 282
} | [
2830,
3393,
56808,
38,
346,
4286,
1130,
1155,
353,
8840,
836,
8,
341,
61828,
19486,
1669,
22259,
198,
16867,
2915,
368,
314,
22259,
284,
2310,
19486,
50746,
197,
41736,
284,
3883,
8787,
19486,
90,
5097,
25,
3056,
3782,
8623,
98567,
1056... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogFiles(t *testing.T) {
cfg := Config{
KernelImagePath: filepath.Join(testDataPath, "vmlinux"), SocketPath: filepath.Join(testDataPath, "socket-path"),
Drives: []models.Drive{
{
DriveID: String("0"),
IsRootDevice: Bool(true),
IsReadOnly: Bool(false),
PathOnHost: String(testRoo... | explode_data.jsonl/70439 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 785
} | [
2830,
3393,
2201,
10809,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
5532,
515,
197,
197,
26343,
66356,
25,
26054,
22363,
8623,
1043,
1820,
11,
330,
85,
1014,
19559,
3975,
20954,
1820,
25,
26054,
22363,
8623,
1043,
1820,
11,
330,
9556,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPyModuleGetFilenameObject(t *testing.T) {
fmt.Println(assert.CallerInfo()[0])
assert.Nil(t, pymodule.GetFilenameObject(nil))
queue := pyimport.ImportModule("queue")
defer py.DecRef(queue)
queueRefCnt := py.RefCnt(queue)
defer func() { assert.Equal(t, queueRefCnt, py.RefCnt(queue)) }()
name := pymodul... | explode_data.jsonl/33471 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 217
} | [
2830,
3393,
13828,
3332,
1949,
20759,
1190,
1155,
353,
8840,
836,
8,
341,
11009,
12419,
75846,
727,
13956,
1731,
10116,
15,
9604,
6948,
59678,
1155,
11,
45760,
1756,
2234,
20759,
1190,
27907,
4390,
46993,
1669,
4510,
474,
67275,
3332,
445... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestErrWrapPanic(t *testing.T) {
gopClTest(t, `
var ret int = println("Hi")!
`, `package main
import fmt "fmt"
var ret int = func() (_gop_ret int) {
var _gop_err error
_gop_ret, _gop_err = fmt.Println("Hi")
if _gop_err != nil {
panic(_gop_err)
}
return
}()
`)
} | explode_data.jsonl/73612 | {
"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,
7747,
26787,
47,
31270,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
22074,
947,
2112,
526,
284,
13751,
445,
13048,
899,
4894,
7808,
1565,
1722,
1887,
271,
474,
8879,
330,
12501,
1837,
947,
2112,
526,
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 TestValidateS3BucketReplicationRuleId(t *testing.T) {
validId := []string{
"YadaHereAndThere",
"Valid-5Rule_ID",
"This . is also %% valid@!)+*(:ID",
"1234",
strings.Repeat("W", 255),
}
for _, v := range validId {
_, errors := validateS3BucketReplicationRuleId(v, "id")
if len(errors) != 0 {
t.Fa... | explode_data.jsonl/78576 | {
"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,
17926,
50,
18,
36018,
18327,
1693,
11337,
764,
1155,
353,
8840,
836,
8,
341,
56322,
764,
1669,
3056,
917,
515,
197,
197,
1,
56,
2584,
8420,
3036,
3862,
756,
197,
197,
1,
4088,
12,
20,
11337,
3450,
756,
197,
197,
21520,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRoundtripNoCompression(t *testing.T) {
// Make sure that we can use our standard routines for decompressing
// something with '0' level compression.
var buf bytes.Buffer
r1 := report.MakeReport()
r1.WriteBinary(&buf, 0)
r2, err := report.MakeFromBinary(&buf)
if err != nil {
t.Error(err)
}
if !reflec... | explode_data.jsonl/17309 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
27497,
32981,
2753,
81411,
1155,
353,
8840,
836,
8,
341,
197,
322,
7405,
2704,
429,
582,
646,
990,
1039,
5297,
29497,
369,
28502,
1873,
287,
198,
197,
322,
2494,
448,
364,
15,
6,
2188,
25111,
624,
2405,
6607,
5820,
22622,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGet_LeadingSlash(t *testing.T) {
want := "http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/identity?audience=http://example.com"
tests := []struct {
name string
suffix string
}{
{
name: "without leading slash",
suffix: "instance/service-accounts/default/identity?au... | explode_data.jsonl/17307 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 312
} | [
2830,
3393,
1949,
62,
69750,
88004,
1155,
353,
8840,
836,
8,
341,
50780,
1669,
330,
1254,
1110,
16,
21,
24,
13,
17,
20,
19,
13,
16,
21,
24,
13,
17,
20,
19,
25093,
8492,
14610,
5457,
16,
14,
4851,
34186,
12,
26206,
28989,
14,
169... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFormatArgsWithoutParameterTypeName(t *testing.T) {
// given
m := &sysl.Module{
Apps: map[string]*sysl.Application{
"test": {
Types: map[string]*sysl.Type{
"User": {
Attrs: make(map[string]*sysl.Attribute),
},
},
},
},
}
// when
actual := formatArgs(m, "test", "")
asser... | explode_data.jsonl/58739 | {
"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,
4061,
4117,
26040,
4971,
39429,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
2109,
1669,
609,
7791,
75,
26958,
515,
197,
197,
53602,
25,
2415,
14032,
8465,
7791,
75,
17521,
515,
298,
197,
1,
1944,
788,
341,
571,
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 TestLinkDestEncode(t *testing.T) {
dest1 := []byte("http://foo.bar/测试")
encoded := html.EncodeDestination(dest1)
dest2 := html.DecodeDestination(encoded)
if !bytes.Equal(dest1, dest2) {
t.Fatalf("Link dest encode failed")
}
} | explode_data.jsonl/10311 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
3939,
34830,
32535,
1155,
353,
8840,
836,
8,
341,
49616,
16,
1669,
3056,
3782,
445,
1254,
1110,
7975,
22001,
14,
81705,
1138,
197,
19329,
1669,
5272,
50217,
33605,
27010,
16,
340,
49616,
17,
1669,
5272,
56372,
33605,
76270,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetDefaults(t *testing.T) {
b.SetDefaults()
if b.Name != "Bitfinex" || b.Enabled != false ||
b.Verbose != false || b.Websocket != false ||
b.RESTPollingDelay != 10 {
t.Error("Test Failed - Bitfinex SetDefaults values not set correctly")
}
} | explode_data.jsonl/79925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 99
} | [
2830,
3393,
1649,
16273,
1155,
353,
8840,
836,
8,
341,
2233,
4202,
16273,
2822,
743,
293,
2967,
961,
330,
8344,
5472,
327,
1,
1369,
293,
13690,
961,
895,
8244,
197,
2233,
42505,
8297,
961,
895,
1369,
293,
6473,
9556,
961,
895,
8244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStatusUpdatesWithoutReplicasChange(t *testing.T) {
// Setup a fake server to listen for requests, and run the ReplicaSet controller in steady state
fakeHandler := utiltesting.FakeHandler{
StatusCode: 200,
ResponseBody: "{}",
}
testServer := httptest.NewServer(&fakeHandler)
defer testServer.Close()
... | explode_data.jsonl/10043 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 595
} | [
2830,
3393,
2522,
37091,
26040,
18327,
52210,
4072,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
264,
12418,
3538,
311,
8844,
369,
7388,
11,
323,
1598,
279,
94036,
1649,
6461,
304,
24020,
1584,
198,
1166,
726,
3050,
1669,
4094,
8840,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_getUserID(t *testing.T) {
type args struct {
msg *types.Message
}
tests := []struct {
name string
args args
want string
}{
{
name: "test with nil msg",
args: args{},
want: "",
},
{
name: "test with nil labels",
args: args{
msg: &types.Message{
Labels: nil,
},
}... | explode_data.jsonl/20545 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 901
} | [
2830,
3393,
3062,
36899,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
21169,
353,
9242,
8472,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
914,
198,
197,
59403,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAuthor_PendingExtrinsics(t *testing.T) {
res, err := author.PendingExtrinsics()
assert.NoError(t, err)
assert.Equal(t, []types.Extrinsic{types.Extrinsic{Version: 0x84, Signature: types.ExtrinsicSignatureV4{Signer: types.Address{IsAccountID: true, AsAccountID: types.AccountID{0xd4, 0x35, 0x93, 0xc7, 0x15, 0x... | explode_data.jsonl/50045 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1129
} | [
2830,
3393,
7133,
1088,
2459,
840,
376,
67102,
1155,
353,
8840,
836,
8,
341,
10202,
11,
1848,
1669,
3150,
96624,
840,
376,
67102,
741,
6948,
35699,
1155,
11,
1848,
340,
6948,
12808,
1155,
11,
3056,
9242,
5121,
45002,
90,
9242,
5121,
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 TestStructDeclConformsNullable(t *testing.T) {
decl, ok := testSchema(t).lookupDeclByName("ExampleStruct", true)
if !ok {
t.Fatalf("lookupDeclByName failed")
}
structDecl := decl.(*StructDecl)
checkConforms(t,
context{},
structDecl,
[]conformTest{
conformOk{gidlir.Record{
Name: "ExampleStruct",... | explode_data.jsonl/21401 | {
"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,
9422,
21629,
1109,
9807,
15703,
1155,
353,
8840,
836,
8,
341,
197,
10005,
11,
5394,
1669,
1273,
8632,
1155,
568,
21020,
21629,
16898,
445,
13314,
9422,
497,
830,
340,
743,
753,
562,
341,
197,
3244,
30762,
445,
21020,
21629,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCachedChartsRefreshChartRepoNotFound(t *testing.T) {
// Stubs Download and processing
DownloadAndExtractChartTarballOrig := charthelper.DownloadAndExtractChartTarball
defer func() { charthelper.DownloadAndExtractChartTarball = DownloadAndExtractChartTarballOrig }()
charthelper.DownloadAndExtractChartTarbal... | explode_data.jsonl/37975 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
70293,
64878,
14567,
14488,
25243,
10372,
1155,
353,
8840,
836,
8,
341,
197,
322,
794,
15738,
8577,
323,
8692,
198,
197,
11377,
3036,
28959,
14488,
62733,
3959,
62726,
1669,
1161,
339,
2947,
61204,
3036,
28959,
14488,
62733,
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 Test_Shutdown(t *testing.T) {
prwe := &PRWExporter{
wg: new(sync.WaitGroup),
closeChan: make(chan struct{}),
}
wg := new(sync.WaitGroup)
err := prwe.Shutdown(context.Background())
require.NoError(t, err)
errChan := make(chan error, 5)
for i := 0; i < 5; i++ {
wg.Add(1)
go func() {
defer wg... | explode_data.jsonl/78811 | {
"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,
36578,
18452,
1155,
353,
8840,
836,
8,
341,
25653,
896,
1669,
609,
6480,
54,
88025,
515,
197,
72079,
25,
286,
501,
97233,
28384,
2808,
1326,
197,
27873,
46019,
25,
1281,
35190,
2036,
6257,
1326,
197,
532,
72079,
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 TestMixedOSBuildKojiJobErrors(t *testing.T) {
require := require.New(t)
emptyManifestV2 := distro.Manifest(`{"version":"2","pipelines":{}}`)
server := newTestServer(t, t.TempDir(), time.Duration(0), "/api/worker/v1")
enqueueKojiJob := func(job *worker.OSBuildKojiJob) uuid.UUID {
initJob := new(worker.KojiI... | explode_data.jsonl/1113 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1374
} | [
2830,
3393,
86433,
3126,
11066,
42,
26902,
12245,
13877,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
692,
197,
3194,
38495,
53,
17,
1669,
1582,
299,
72272,
5809,
4913,
4366,
3252,
17,
2198,
51501,
10999,
788,
90,
3417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenesisBytes(t *testing.T) {
a := assert.New(t)
g1 := GetDefaultGenesis()
g1.Balance = map[string]string{"abc": "1234"}
g1.BPs = []string{"xxx", "yyy", "zzz"}
b := g1.Bytes()
fmt.Println(spew.Sdump(g1))
g2 := GetGenesisFromBytes(b)
a.Nil(g2.Balance)
} | explode_data.jsonl/47846 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
84652,
7078,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
340,
3174,
16,
1669,
2126,
3675,
84652,
741,
3174,
16,
1785,
4978,
284,
2415,
14032,
30953,
4913,
13683,
788,
330,
16,
17,
18,
19,
16707,
3174,
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 TestMap(t *testing.T) {
items := []int{23, 24, 2, 5, 10}
interfaceItems := make([]interface{}, len(items))
for i, v := range items {
interfaceItems[i] = v
}
a := New(interfaceItems)
doubleArray := a.Map(double)
if a.Length() != doubleArray.Length() {
t.Log("Mapped array should have same length as or... | explode_data.jsonl/47092 | {
"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,
2227,
1155,
353,
8840,
836,
8,
341,
46413,
1669,
3056,
396,
90,
17,
18,
11,
220,
17,
19,
11,
220,
17,
11,
220,
20,
11,
220,
16,
15,
532,
58915,
1564,
4353,
1669,
1281,
10556,
4970,
22655,
2422,
24337,
4390,
2023,
600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateVolumeDBEntry(t *testing.T) {
var in = &model.VolumeSpec{
BaseModel: &model.BaseModel{},
Name: "volume sample",
Description: "This is a sample volume for testing",
Size: int64(1),
ProfileId: "3769855c-a102-11e7-b772-17b880d2f537",
Status: model.VolumeCreating,
}
t.R... | explode_data.jsonl/29971 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 604
} | [
2830,
3393,
4021,
18902,
3506,
5874,
1155,
353,
8840,
836,
8,
341,
2405,
304,
284,
609,
2528,
79106,
8327,
515,
197,
66732,
1712,
25,
256,
609,
2528,
13018,
1712,
38837,
197,
21297,
25,
286,
330,
25060,
6077,
756,
197,
47414,
25,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestContextRenderNoContentData(t *testing.T) {
w := httptest.NewRecorder()
c, _ := CreateTestContext(w)
c.Data(http.StatusNoContent, "text/csv", []byte(`foo,bar`))
assert.Equal(t, http.StatusNoContent, w.Code)
assert.Empty(t, w.Body.String())
assert.Equal(t, "text/csv", w.Header().Get("Content-Type"))
} | explode_data.jsonl/26791 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
1972,
6750,
2753,
2762,
1043,
1155,
353,
8840,
836,
8,
341,
6692,
1669,
54320,
70334,
7121,
47023,
741,
1444,
11,
716,
1669,
4230,
2271,
1972,
3622,
692,
1444,
3336,
19886,
10538,
2753,
2762,
11,
330,
1318,
92128,
497,
3056,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_jx_boot_in_non_boot_repo_fails(t *testing.T) {
log.SetOutput(ioutil.Discard)
bootDir, err := ioutil.TempDir("", "boot-test")
require.NoError(t, err)
defer func() {
_ = os.RemoveAll(bootDir)
}()
commonOpts := opts.NewCommonOptionsWithFactory(clients.NewFactory())
commonOpts.BatchMode = true
o := Boo... | explode_data.jsonl/63010 | {
"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,
5374,
87,
52062,
1243,
21637,
52062,
37784,
761,
6209,
1155,
353,
8840,
836,
8,
341,
6725,
4202,
5097,
1956,
30158,
909,
47560,
340,
197,
4619,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
4619,
16839,
1138,
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 TestCloudTasksListTasksError(t *testing.T) {
errCode := codes.PermissionDenied
mockCloudTasks.err = gstatus.Error(errCode, "test error")
var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
var request = &taskspb.ListTasksRequest{
Parent: forma... | explode_data.jsonl/30862 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 264
} | [
2830,
3393,
16055,
25449,
852,
25449,
1454,
1155,
353,
8840,
836,
8,
341,
9859,
2078,
1669,
13912,
73409,
54481,
198,
77333,
16055,
25449,
18441,
284,
342,
2829,
6141,
3964,
2078,
11,
330,
1944,
1465,
5130,
2405,
23126,
8387,
914,
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... | 4 |
func TestDiffBasicNoLabels(t *testing.T) {
s := newScaffold(t)
defer s.reset()
d := &dg{cmValue: "baz", secretValue: "baz"}
s.client.getFunc = d.get
err := s.executeCommand("diff", "dev", "--ignore-all-labels", "-S", "--show-deletes=false")
require.NotNil(t, err)
a := assert.New(t)
secretValue := base64.StdEnco... | explode_data.jsonl/72088 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 231
} | [
2830,
3393,
21751,
15944,
2753,
23674,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
501,
50,
27864,
1155,
340,
16867,
274,
13857,
741,
2698,
1669,
609,
35138,
90,
6226,
1130,
25,
330,
42573,
497,
6234,
1130,
25,
330,
42573,
16707,
1903,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCacheMountPrivateRefs(t *testing.T) {
t.Parallel()
ctx := namespaces.WithNamespace(context.Background(), "buildkit-test")
tmpdir, err := ioutil.TempDir("", "cachemanager")
require.NoError(t, err)
defer os.RemoveAll(tmpdir)
snapshotter, err := native.NewSnapshotter(filepath.Join(tmpdir, "snapshots"))
r... | explode_data.jsonl/50739 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 817
} | [
2830,
3393,
8233,
16284,
16787,
82807,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
58091,
26124,
22699,
5378,
19047,
1507,
330,
5834,
8226,
16839,
5130,
20082,
3741,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
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 TestBlockList(t *testing.T) {
r := require.New(t)
now := time.Now()
name := "alfa"
withinBlockTTL := now.Add(blockListTTL / 2)
pastBlockTTL := now.Add(blockListTTL * 2)
blockTests := []struct {
curTime time.Time
blocked bool
}{
{now, false},
{now, false},
{withinBlockTTL, true},
{withinBlockTT... | explode_data.jsonl/7020 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 248
} | [
2830,
3393,
4713,
852,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1373,
7121,
1155,
692,
80922,
1669,
882,
13244,
741,
11609,
1669,
330,
84426,
698,
46948,
258,
4713,
51,
13470,
1669,
1431,
1904,
18682,
852,
51,
13470,
608,
220,
17,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResumptionDisabled(t *testing.T) {
sessionFilePath := tempFile("")
defer os.Remove(sessionFilePath)
config := *testConfig
test := &serverTest{
name: "IssueTicketPreDisable",
command: []string{"openssl", "s_client", "-cipher", "RC4-SHA", "-sess_out", sessionFilePath},
config: &config,
}
runSer... | explode_data.jsonl/80566 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 254
} | [
2830,
3393,
1061,
60574,
25907,
1155,
353,
8840,
836,
8,
341,
25054,
19090,
1669,
2730,
1703,
31764,
16867,
2643,
13270,
16264,
19090,
692,
25873,
1669,
353,
1944,
2648,
271,
18185,
1669,
609,
4030,
2271,
515,
197,
11609,
25,
262,
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... | 1 |
func TestValidateEndpointHandlerErrorRegion(t *testing.T) {
restoreEnvFn := sdktesting.StashEnv()
defer restoreEnvFn()
svc := awstesting.NewClient()
svc.Handlers.Clear()
svc.Handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler)
req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil... | explode_data.jsonl/44093 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 196
} | [
2830,
3393,
17926,
27380,
3050,
1454,
14091,
1155,
353,
8840,
836,
8,
341,
96027,
14359,
24911,
1669,
45402,
8840,
7758,
988,
14359,
741,
16867,
14952,
14359,
24911,
741,
1903,
7362,
1669,
1360,
267,
59855,
7121,
2959,
741,
1903,
7362,
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... | 3 |
func TestSufficientCapacityNodeDaemonLaunchesPod(t *testing.T) {
for _, strategy := range updateStrategies() {
podSpec := resourcePodSpec("not-too-much-mem", "75M", "75m")
ds := newDaemonSet("foo")
ds.Spec.UpdateStrategy = *strategy
ds.Spec.Template.Spec = podSpec
manager, podControl, _, err := newTestContro... | explode_data.jsonl/50314 | {
"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,
50,
26683,
29392,
1955,
89177,
32067,
288,
23527,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
8282,
1669,
2088,
2647,
2580,
69388,
368,
341,
197,
3223,
347,
8327,
1669,
5101,
23527,
8327,
445,
1921,
93579,
1448,
1387,
1448,
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... | 3 |
func TestFile_NotExists(t *testing.T) {
fs := testFs()
err := CheckFile(fs, "missing.file", false)
assert.Equal(t, linterrors.NewFileError("missing.file", "does not exist"), err)
} | explode_data.jsonl/71216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 68
} | [
2830,
3393,
1703,
60816,
15575,
1155,
353,
8840,
836,
8,
341,
53584,
1669,
1273,
48300,
741,
9859,
1669,
4248,
1703,
31856,
11,
330,
30616,
9715,
497,
895,
692,
6948,
12808,
1155,
11,
57920,
7650,
7121,
1703,
1454,
445,
30616,
9715,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestWatchPurposefulShutdown(t *testing.T) {
fakeClient := NewFakeEtcdClient(t)
h := EtcdHelper{fakeClient, codec, versioner}
fakeClient.expectNotFoundGetSet["/some/key"] = struct{}{}
// Test purposeful shutdown
watching := h.Watch("/some/key", 0)
fakeClient.WaitForWatchCompletion()
watching.Stop()
// Did... | explode_data.jsonl/40984 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 189
} | [
2830,
3393,
14247,
74033,
1262,
62004,
1155,
353,
8840,
836,
8,
341,
1166,
726,
2959,
1669,
1532,
52317,
31860,
4385,
2959,
1155,
340,
9598,
1669,
18888,
4385,
5511,
90,
30570,
2959,
11,
34647,
11,
2319,
261,
532,
1166,
726,
2959,
25952... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPageHTMLContent(t *testing.T) {
b := newTestSitesBuilder(t)
b.WithSimpleConfigFile()
frontmatter := `---
title: "HTML Content"
---
`
b.WithContent("regular.html", frontmatter+`<h1>Hugo</h1>`)
b.WithContent("noblackfridayforyou.html", frontmatter+`**Hugo!**`)
b.WithContent("manualsummary.html", frontmatt... | explode_data.jsonl/60631 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 403
} | [
2830,
3393,
2665,
5835,
2762,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
501,
2271,
93690,
3297,
1155,
340,
2233,
26124,
16374,
2648,
1703,
2822,
1166,
9411,
58965,
1669,
1565,
10952,
2102,
25,
330,
5835,
8883,
698,
10952,
3989,
2233,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNotIteratorBasics(t *testing.T) {
ctx := context.TODO()
allIt := NewFixed(
Int64Node(1),
Int64Node(2),
Int64Node(3),
Int64Node(4),
)
toComplementIt := NewFixed(
Int64Node(2),
Int64Node(4),
)
not := NewNot(toComplementIt, allIt)
if v, _ := not.Size(); v != 2 {
t.Errorf("Unexpected iterat... | explode_data.jsonl/59598 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 389
} | [
2830,
3393,
2623,
11951,
33603,
1211,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
90988,
741,
50960,
2132,
1669,
1532,
13520,
1006,
197,
57152,
21,
19,
1955,
7,
16,
1326,
197,
57152,
21,
19,
1955,
7,
17,
1326,
197,
57152,
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,
1... | 8 |
func TestKeeperDB_EligibleUpkeeps_KeepersRotate(t *testing.T) {
t.Parallel()
store, orm, cleanup := setupKeeperDB(t)
defer cleanup()
db := store.DB
ethKeyStore := cltest.NewKeyStore(t, store.DB).Eth()
registry, _ := cltest.MustInsertKeeperRegistry(t, store, ethKeyStore)
registry.NumKeepers = 5
require.NoError(... | explode_data.jsonl/27011 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 502
} | [
2830,
3393,
77233,
3506,
2089,
7708,
1238,
2324,
440,
7124,
62,
19434,
388,
34540,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
57279,
11,
67602,
11,
21290,
1669,
6505,
77233,
3506,
1155,
340,
16867,
21290,
741,
20939,
1669,
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 TestAgentConnectCALeafCert_aclServiceWrite(t *testing.T) {
t.Parallel()
require := require.New(t)
a := NewTestAgent(t.Name(), TestACLConfig()+testAllowProxyConfig())
defer a.Shutdown()
// Register a service with a managed proxy
{
reg := &structs.ServiceDefinition{
ID: "test-id",
Name: "test... | explode_data.jsonl/33655 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 633
} | [
2830,
3393,
16810,
14611,
49533,
68,
2577,
36934,
63692,
1860,
7985,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
17957,
1669,
1373,
7121,
1155,
340,
11323,
1669,
1532,
2271,
16810,
1155,
2967,
1507,
3393,
55393,
2648,
17140,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRestoreSystemTableFromFullClusterBackup(t *testing.T) {
defer leaktest.AfterTest(t)()
const numAccounts = 10
_, _, sqlDB, _, cleanupFn := backupRestoreTestSetup(t, singleNode, numAccounts, initNone)
defer cleanupFn()
sqlDB.Exec(t, `CREATE USER maxroach`)
sqlDB.Exec(t, `BACKUP TO $1`, localFoo)
sqlDB.E... | explode_data.jsonl/48483 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
56284,
2320,
2556,
3830,
9432,
28678,
56245,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
4777,
1629,
41369,
284,
220,
16,
15,
198,
197,
6878,
8358,
5704,
3506,
11,
8358,
21290,
24911,
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 TestName_ModulesDedup(t *testing.T) {
if usesOldGolist {
t.Skip("pre-modules version of Go")
}
exported := packagestest.Export(t, packagestest.Modules, []packagestest.Module{{
Name: "golang.org/fake",
Files: map[string]interface{}{
"fake.go": `package fake`,
}}})
defer exported.Cleanup()
wd, err ... | explode_data.jsonl/45197 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 515
} | [
2830,
3393,
675,
71485,
2425,
35,
291,
454,
1155,
353,
8840,
836,
8,
341,
743,
5711,
18284,
38,
34675,
341,
197,
3244,
57776,
445,
1726,
61079,
2319,
315,
5994,
1138,
197,
630,
59440,
291,
1669,
6328,
267,
477,
81077,
1155,
11,
6328,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWrappedErrors(t *testing.T) {
t.Parallel()
const err semerr.Error = "error"
testCases := []struct {
Name string
Create func(err error) error
Temporary bool
}{
{
Name: "StatusRequestTimeoutError",
Create: semerr.NewStatusRequestTimeoutError,
Temporary: true,
},
{
Na... | explode_data.jsonl/72526 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 995
} | [
2830,
3393,
67795,
13877,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
4777,
1848,
5234,
615,
6141,
284,
330,
841,
1837,
18185,
37302,
1669,
3056,
1235,
341,
197,
21297,
414,
914,
198,
197,
75569,
262,
2915,
3964,
1465,
8,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAddAndWrite(t *testing.T) {
builder, err := NewBuilder(Header{
Author: "devblok",
DateCreated: time.Now().Unix(),
Version: 1,
})
if err != nil {
t.Error(err)
}
builder.Add("test", bytes.NewReader([]byte("idunvovkjnreovmegihjbrqlkmfrjnb")))
builder.Add("test2", bytes.NewReader([]byte("idu... | explode_data.jsonl/74121 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
2212,
3036,
7985,
1155,
353,
8840,
836,
8,
341,
44546,
11,
1848,
1669,
1532,
3297,
7,
4047,
515,
197,
197,
7133,
25,
414,
330,
3583,
38145,
74,
756,
197,
48730,
11694,
25,
882,
13244,
1005,
55832,
3148,
197,
77847,
25,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestServerRequestVoteDeniedForStaleTerm(t *testing.T) {
s := newTestServer("1", &testTransporter{})
s.Start()
if _, err := s.Do(&DefaultJoinCommand{Name: s.Name()}); err != nil {
t.Fatalf("Server %s unable to join: %v", s.Name(), err)
}
s.(*server).currentTerm = 2
defer s.Stop()
resp := s.RequestVote(ne... | explode_data.jsonl/44058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
5475,
1900,
41412,
54481,
2461,
623,
1574,
17249,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
501,
2271,
5475,
445,
16,
497,
609,
1944,
27560,
261,
6257,
692,
1903,
12101,
741,
743,
8358,
1848,
1669,
274,
33596,
2099,
3675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPidNamespace(t *testing.T) {
testID := "test-id"
testPid := uint32(1234)
testSandboxID := "sandbox-id"
containerConfig, sandboxConfig, imageConfig, _ := getCreateContainerTestData()
ociRuntime := config.Runtime{}
c := newTestCRIService()
for desc, test := range map[string]struct {
pidNS runtime.Nam... | explode_data.jsonl/6413 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 491
} | [
2830,
3393,
32339,
22699,
1155,
353,
8840,
836,
8,
341,
18185,
915,
1669,
330,
1944,
12897,
698,
18185,
32339,
1669,
2622,
18,
17,
7,
16,
17,
18,
19,
340,
18185,
50,
31536,
915,
1669,
330,
76756,
12897,
698,
53290,
2648,
11,
42754,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDB_BeginRW_Closed(t *testing.T) {
var db bolt.DB
if _, err := db.Begin(true); err != bolt.ErrDatabaseNotOpen {
t.Fatalf("unexpected error: %s", err)
}
} | explode_data.jsonl/27475 | {
"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,
3506,
93447,
56368,
920,
9259,
1155,
353,
8840,
836,
8,
341,
2405,
2927,
31842,
22537,
198,
743,
8358,
1848,
1669,
2927,
28467,
3715,
1215,
1848,
961,
31842,
27862,
5988,
2623,
5002,
341,
197,
3244,
30762,
445,
53859,
1465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandlesExistingCommonSecret(t *testing.T) {
t.Parallel()
ns := &core_v1.Namespace{
TypeMeta: meta_v1.TypeMeta{
Kind: k8s.NamespaceKind,
APIVersion: core_v1.SchemeGroupVersion.String(),
},
ObjectMeta: meta_v1.ObjectMeta{
Name: namespaceName,
Labels: map[string]string{
voyager.Serv... | explode_data.jsonl/4284 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 961
} | [
2830,
3393,
65928,
53067,
10839,
19773,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
84041,
1669,
609,
2153,
2273,
16,
46011,
515,
197,
27725,
12175,
25,
8823,
2273,
16,
10184,
12175,
515,
298,
197,
10629,
25,
981,
595,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStartAndEndOfWeek(t *testing.T) {
t.Log(StartOfWeek(time.Now()))
t.Log(PreviousStartOfWeek(time.Now()))
t.Log(NextStartOfWeek(time.Now()))
t.Log(EndOfWeek(time.Now()))
t.Log(PreviousEndOfWeek(time.Now()))
t.Log(NextEndOfWeek(time.Now()))
t.Log(StartOfWeek(time.Now(), time.Sunday))
t.Log(PreviousStart... | explode_data.jsonl/80463 | {
"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,
3479,
3036,
3727,
38353,
1155,
353,
8840,
836,
8,
341,
3244,
5247,
7,
3479,
38353,
9730,
13244,
12145,
3244,
5247,
7,
21291,
3479,
38353,
9730,
13244,
12145,
3244,
5247,
7,
5847,
3479,
38353,
9730,
13244,
49962,
3244,
5247,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTouch(t *testing.T) {
fileName := dirRoot + "/touch.txt"
err := Touch(fileName)
if err != nil {
panic(err)
}
t.Cleanup(func() {
_ = RemoveWithRecur(dirRoot)
})
if !Exists(fileName) {
t.Error("Touch test failed!")
}
} | explode_data.jsonl/34170 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
11309,
1155,
353,
8840,
836,
8,
341,
17661,
675,
1669,
5419,
8439,
488,
3521,
22020,
3909,
1837,
9859,
1669,
19338,
23014,
340,
743,
1848,
961,
2092,
341,
197,
30764,
3964,
340,
197,
630,
3244,
727,
60639,
18552,
368,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMonthsAbbreviated(t *testing.T) {
trans := New()
months := trans.MonthsAbbreviated()
for i, month := range months {
s := trans.MonthAbbreviated(time.Month(i + 1))
if s != month {
t.Errorf("Expected '%s' Got '%s'", month, s)
}
}
tests := []struct {
idx int
expected string
}{
// {
... | explode_data.jsonl/1286 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 660
} | [
2830,
3393,
59184,
80219,
7282,
10029,
1155,
353,
8840,
836,
8,
1476,
72453,
1669,
1532,
741,
197,
49714,
1669,
1356,
48383,
82,
80219,
7282,
10029,
2822,
2023,
600,
11,
2254,
1669,
2088,
3951,
341,
197,
1903,
1669,
1356,
48383,
80219,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMergeSort(t *testing.T) {
t.Run("should sort int slice correctly", func(t *testing.T) {
a := util.GenerateSeries(5)
got := sorting.MergeSort(a)
want := []int{1, 2, 3, 4, 5}
if !reflect.DeepEqual(got, want) {
t.Errorf("got: %v, want: %v", got, want)
}
if !reflect.DeepEqual(a, []int{5, 4, 3, 2, 1... | explode_data.jsonl/14909 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
52096,
10231,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5445,
3378,
526,
15983,
12440,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
11323,
1669,
4094,
57582,
25544,
7,
20,
340,
197,
3174,
354,
1669,
28273,
93855,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNewRemoteModuleInstaller(t *testing.T) {
var (
got = NewRemoteModuleInstaller()
wantDownloader = downloader.NewDownloader()
)
if !reflect.DeepEqual(got.downloader, wantDownloader) {
t.Errorf("downloader got: '%v', want: '%v'", got.downloader, wantDownloader)
}
} | explode_data.jsonl/16232 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 115
} | [
2830,
3393,
3564,
24703,
3332,
88096,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
3174,
354,
310,
284,
1532,
24703,
3332,
88096,
741,
197,
50780,
92698,
284,
86774,
7121,
92698,
741,
197,
340,
743,
753,
34913,
94750,
3268,
354,
18148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTmplServiceAccount(t *testing.T) {
woc := newWoc()
woc.execWf.Spec.ServiceAccountName = "foo"
woc.execWf.Spec.Templates[0].ServiceAccountName = "tmpl"
tmplCtx, err := woc.createTemplateContext(wfv1.ResourceScopeLocal, "")
assert.NoError(t, err)
ctx := context.Background()
_, err = woc.executeContainer(... | explode_data.jsonl/75365 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 264
} | [
2830,
3393,
51,
54010,
1860,
7365,
1155,
353,
8840,
836,
8,
341,
6692,
509,
1669,
501,
54,
509,
741,
6692,
509,
15776,
54,
69,
36473,
13860,
7365,
675,
284,
330,
7975,
698,
6692,
509,
15776,
54,
69,
36473,
836,
76793,
58,
15,
936,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCompactString(t *testing.T) {
assert := require.New(t)
assert.Nil(CompactString(nil))
assert.Equal([]string{
`one`, `three`, `five`,
}, CompactString([]string{
`one`, `three`, `five`,
}))
assert.Equal([]string{
`one`, `three`, ` `, `five`,
}, CompactString([]string{
`one`, ``, `three`, ``, ` ... | explode_data.jsonl/45564 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
98335,
703,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
1373,
7121,
1155,
692,
6948,
59678,
7,
98335,
703,
27907,
4390,
6948,
12808,
10556,
917,
515,
197,
197,
63,
603,
7808,
1565,
27856,
7808,
1565,
52670,
12892,
197,
2137,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestContext2Plan_targetedOrphan(t *testing.T) {
m := testModule(t, "plan-targeted-orphan")
p := testProvider("aws")
p.DiffFn = testDiffFn
ctx := testContext2(t, &ContextOpts{
Config: m,
ProviderResolver: providers.ResolverFixed(
map[string]providers.Factory{
"aws": testProviderFuncFixed(p),
},
... | explode_data.jsonl/28706 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 713
} | [
2830,
3393,
1972,
17,
20485,
11123,
291,
2195,
9943,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1273,
3332,
1155,
11,
330,
10393,
18489,
291,
26511,
9943,
1138,
3223,
1669,
1273,
5179,
445,
8635,
1138,
3223,
98063,
24911,
284,
1273,
2175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServer_fetchApp(t *testing.T) {
app, trx, down, err := models.NewAppForTest(nil, t)
assert.Nil(t, err)
defer down(t)
_, err = fetchAPP(app.UID, "", trx)
assert.Equal(t, err, ErrAppSecret)
} | explode_data.jsonl/30078 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
5475,
11803,
2164,
1155,
353,
8840,
836,
8,
341,
28236,
11,
73021,
11,
1495,
11,
1848,
1669,
4119,
7121,
2164,
2461,
2271,
27907,
11,
259,
340,
6948,
59678,
1155,
11,
1848,
340,
16867,
1495,
1155,
340,
197,
6878,
1848,
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 |
func TestChannelNotFound_InChannel(t *testing.T) {
var expected *discordgo.Channel
cnf := &callbacks.ChannelNotFound{}
actual := cnf.InChannel()
err := deepEqual(actual, expected)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/56088 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 84
} | [
2830,
3393,
9629,
10372,
25972,
9629,
1155,
353,
8840,
836,
8,
341,
2405,
3601,
353,
42579,
3346,
38716,
271,
1444,
31737,
1669,
609,
68311,
38716,
10372,
16094,
88814,
1669,
13665,
69,
5337,
9629,
2822,
9859,
1669,
5538,
2993,
29721,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestComposeNotImplemented(t *testing.T) {
c := NewParallelE2eCLI(t, binDir)
res := c.RunDockerCmd("context", "show")
res.Assert(t, icmd.Expected{Out: "default"})
res = c.RunDockerOrExitError("compose", "up")
res.Assert(t, icmd.Expected{
ExitCode: 1,
Err: `Command "compose up" not available in current... | explode_data.jsonl/5424 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 227
} | [
2830,
3393,
70492,
2623,
18300,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
16547,
36,
17,
68,
63959,
1155,
11,
9544,
6184,
340,
10202,
1669,
272,
16708,
35,
13659,
15613,
445,
2147,
497,
330,
3445,
1138,
10202,
11711,
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,
1... | 1 |
func TestInMemorySignVerify(t *testing.T) {
cstore := NewInMemory()
algo := hd.Secp256k1
n1, n2, n3 := "some dude", "a dudette", "dude-ish"
// create two users and get their info
i1, _, err := cstore.NewMnemonic(n1, English, sdk.FullFundraiserPath, algo)
require.Nil(t, err)
i2, _, err := cstore.NewMnemonic(n2... | explode_data.jsonl/73445 | {
"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,
641,
10642,
7264,
32627,
1155,
353,
8840,
836,
8,
341,
1444,
4314,
1669,
1532,
641,
10642,
741,
69571,
3346,
1669,
17907,
808,
757,
79,
17,
20,
21,
74,
16,
271,
9038,
16,
11,
308,
17,
11,
308,
18,
1669,
330,
14689,
350... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNfq(t *testing.T) {
gotpacket := make(chan struct{}, 16)
cb := func(date []byte) Verdict {
gotpacket <- struct{}{}
return NF_ACCEPT
}
nfq, err := NewDefaultQueue(0, cb)
if err != nil {
t.Fatal(err)
}
l, err := net.ListenPacket("udp", "127.0.0.1:9999")
if err != nil {
t.Fatal(err)
}
defer ... | explode_data.jsonl/1599 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 303
} | [
2830,
3393,
45,
63919,
1155,
353,
8840,
836,
8,
1476,
3174,
354,
24829,
1669,
1281,
35190,
2036,
22655,
220,
16,
21,
692,
63810,
1669,
2915,
11970,
3056,
3782,
8,
6250,
8477,
341,
197,
3174,
354,
24829,
9119,
2036,
6257,
16094,
197,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDivideSeriesMultiReturn(t *testing.T) {
now32 := int32(time.Now().Unix())
tests := []th.MultiReturnEvalTestItem{
{
parser.NewExpr("divideSeries",
"metric[12]",
"metric2",
),
map[parser.MetricRequest][]*types.MetricData{
{"metric[12]", 0, 1}: {
types.MakeMetricData("metric1", []f... | explode_data.jsonl/47840 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 574
} | [
2830,
3393,
12509,
577,
25544,
20358,
5598,
1155,
353,
8840,
836,
8,
341,
80922,
18,
17,
1669,
526,
18,
17,
9730,
13244,
1005,
55832,
12367,
78216,
1669,
3056,
339,
57706,
5598,
54469,
2271,
1234,
515,
197,
197,
515,
298,
55804,
7121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetNullRange(t *testing.T) {
for _, start := range pos {
for _, end := range pos {
n := NewNulls(BatchSize)
n.SetNullRange(start, end)
for i := uint64(0); i < BatchSize; i++ {
expected := i >= start && i < end
require.Equal(t, expected, n.NullAt64(i),
"NullAt(%d) should be %t after Set... | explode_data.jsonl/37155 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
1649,
3280,
6046,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1191,
1669,
2088,
1133,
341,
197,
2023,
8358,
835,
1669,
2088,
1133,
341,
298,
9038,
1669,
1532,
3280,
82,
5349,
754,
1695,
340,
298,
9038,
4202,
3280,
6046,
1063... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNamespacedServiceBrokerClient(t *testing.T) {
const name = "test-broker"
const namespace = "test-namespace"
resetFeaturesFunc, err := enableNamespacedResources()
if err != nil {
t.Fatal(err)
}
defer resetFeaturesFunc()
client, _, shutdownServer := getFreshApiserverAndClient(t, func() runtime.Object {
... | explode_data.jsonl/51880 | {
"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,
7980,
68552,
1860,
65545,
2959,
1155,
353,
8840,
836,
8,
341,
4777,
829,
284,
330,
1944,
1455,
45985,
698,
4777,
4473,
284,
330,
1944,
12,
2231,
698,
70343,
21336,
9626,
11,
1848,
1669,
7283,
7980,
68552,
11277,
741,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAssociateUserToken(t *testing.T) {
ts := httptest.NewTLSServer(
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, associateUserTokenResponse)
}),
)
defer ts.Close()
duo := buildAdminClient(ts.URL, nil)
result, err := duo.AssociateUserToken("DU3RP9I2WOC59VZX672N", "DH... | explode_data.jsonl/61416 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 252
} | [
2830,
3393,
95540,
1474,
3323,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
13470,
1220,
2836,
1006,
197,
28080,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
298,
11009,
991,
33655,
3622,
11,
2194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildStatSummaryRequest(t *testing.T) {
t.Run("Maps Kubernetes friendly names to canonical names", func(t *testing.T) {
expectations := map[string]string{
"deployments": k8s.Deployment,
"deployment": k8s.Deployment,
"deploy": k8s.Deployment,
"pods": k8s.Pod,
"pod": k8s.Po... | explode_data.jsonl/53451 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1206
} | [
2830,
3393,
11066,
15878,
19237,
1900,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
36562,
66374,
11657,
5036,
311,
42453,
5036,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
24952,
804,
1669,
2415,
14032,
30953,
515,
298,
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... | 4 |
func TestHead(t *testing.T) {
// TODO: test result
srv := httptest.NewServer(http.HandlerFunc(HandleHead))
defer srv.Close()
url := "http://" + srv.Listener.Addr().String()
resp, err := Head(url, nil, nil)
if err != nil {
t.Error(err)
}
assert.Equal(t, 200, resp.Status())
} | explode_data.jsonl/14810 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
12346,
1155,
353,
8840,
836,
8,
341,
197,
322,
5343,
25,
1273,
1102,
198,
1903,
10553,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
90832,
12346,
1171,
16867,
43578,
10421,
741,
19320,
1669,
330,
1254,
52136,
488,
43578,
6409... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFlushIntervalHeaders(t *testing.T) {
const expected = "hi"
stopCh := make(chan struct{})
backend := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Add("MyHeader", expected)
w.WriteHeader(200)
w.(http.Flusher).Flush()
<-stopCh
}))
defer backend.Close()... | explode_data.jsonl/35096 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 396
} | [
2830,
3393,
46874,
10256,
10574,
1155,
353,
8840,
836,
8,
341,
4777,
3601,
284,
330,
6023,
698,
62644,
1143,
1669,
1281,
35190,
2036,
37790,
197,
20942,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestVisitorDisableChildren(t *testing.T) {
for _, tt := range nodesToTest {
v := &visitorMock{false, []string{}}
tt.node.Walk(v)
expected := []string{}
actual := v.visitedKeys
assert.DeepEqual(t, expected, actual)
}
} | explode_data.jsonl/50809 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 94
} | [
2830,
3393,
16796,
25479,
11539,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
7798,
1249,
2271,
341,
197,
5195,
1669,
609,
39985,
11571,
90,
3849,
11,
3056,
917,
6257,
532,
197,
3244,
83,
12097,
1175,
1692,
3747,
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... | 2 |
func TestImageCopy(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Errorf("copying image and using it should panic")
}
}()
img0, _ := NewImage(256, 256, FilterDefault)
img1 := *img0
img1.Fill(color.Transparent)
} | explode_data.jsonl/10906 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
1906,
12106,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
368,
341,
197,
743,
435,
1669,
11731,
2129,
435,
621,
2092,
341,
298,
3244,
13080,
445,
8560,
287,
2168,
323,
1667,
432,
1265,
21975,
1138,
197,
197,
532,
197,
66816,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTraceConfigValidation(t *testing.T) {
factory := NewFactory()
config := factory.CreateDefaultConfig().(*Config)
assert.Error(t, config.validate())
config.Topic = "projects/000project/topics/my-topic"
assert.Error(t, config.validate())
config.Topic = "projects/my-project/subscriptions/my-subscription"
as... | explode_data.jsonl/9313 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 152
} | [
2830,
3393,
6550,
2648,
13799,
1155,
353,
8840,
836,
8,
341,
1166,
2919,
1669,
1532,
4153,
741,
25873,
1669,
8633,
7251,
3675,
2648,
1005,
4071,
2648,
340,
6948,
6141,
1155,
11,
2193,
19520,
2398,
25873,
98354,
284,
330,
17161,
14,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBuilder(t *testing.T) {
result := aTask("ID1",
withIP("10.10.10.10"),
withLabel("foo", "bar"),
withLabel("fii", "bar"),
withLabel("fuu", "bar"),
withInfo("name1",
withPorts(withPort("TCP", 80, "p"),
withPortTCP(81, "n"))),
withStatus(withHealthy(true), withState("a")))
expected := state.T... | explode_data.jsonl/24531 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 496
} | [
2830,
3393,
3297,
1155,
353,
8840,
836,
8,
341,
9559,
1669,
264,
6262,
445,
915,
16,
756,
197,
46948,
3298,
445,
16,
15,
13,
16,
15,
13,
16,
15,
13,
16,
15,
4461,
197,
46948,
2476,
445,
7975,
497,
330,
2257,
4461,
197,
46948,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseSignedData(t *testing.T) {
mockSigner := NewMockSigner()
t.Run("success", func(t *testing.T) {
jwsSignature, err := internal.NewJWS(nil, nil, []byte("payload"), mockSigner)
require.NoError(t, err)
compactJWS, err := jwsSignature.SerializeCompact(false)
require.NoError(t, err)
jws, err := pa... | explode_data.jsonl/78227 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 636
} | [
2830,
3393,
14463,
49312,
1043,
1155,
353,
8840,
836,
8,
341,
77333,
7264,
261,
1669,
1532,
11571,
7264,
261,
2822,
3244,
16708,
445,
5630,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
12428,
8915,
25088,
11,
1848,
1669,
5306,
7121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApp_OrderOfOperations(t *testing.T) {
counts := &opCounts{}
resetCounts := func() { counts = &opCounts{} }
app := &App{
EnableShellCompletion: true,
ShellComplete: func(c *Context) {
fmt.Fprintf(os.Stderr, "---> ShellComplete(%#v)\n", c)
counts.Total++
counts.ShellComplete = counts.Total
},... | explode_data.jsonl/52582 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1278
} | [
2830,
3393,
2164,
53267,
2124,
35120,
1155,
353,
8840,
836,
8,
341,
18032,
82,
1669,
609,
453,
63731,
31483,
70343,
63731,
1669,
2915,
368,
314,
14579,
284,
609,
453,
63731,
6257,
555,
28236,
1669,
609,
2164,
515,
197,
197,
11084,
25287... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQueueScaling_AcceptableBacklogPerTask(t *testing.T) {
testCases := map[string]struct {
in QueueScaling
wantedBacklog int
wantedErr error
}{
"should return an error if queue scaling is empty": {
in: QueueScaling{},
wantedErr: errors.New(`"queue_delay" must be specified in o... | explode_data.jsonl/70121 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 444
} | [
2830,
3393,
7554,
59684,
1566,
66,
1484,
480,
3707,
839,
3889,
6262,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
17430,
310,
18745,
59684,
198,
197,
6692,
7566,
3707,
839,
526,
198,
197,
6692,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidate(t *testing.T) {
tests := []struct {
name string
req Message
rep []Message
err error
}{
{
name: "mismatched sequence",
req: Message{
Header: Header{
Sequence: 1,
},
},
rep: []Message{{
Header: Header{
Sequence: 2,
},
}},
err: errMismatchedSeque... | explode_data.jsonl/25585 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1104
} | [
2830,
3393,
17926,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
24395,
220,
4856,
198,
197,
73731,
220,
3056,
2052,
198,
197,
9859,
220,
1465,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLintImages(t *testing.T) {
ctx := context.TODO()
for _, f := range []string{"edcon_tool.png", "edcon_tool.pdf", "hello.txt.gz"} {
for _, err := range eclint.Lint(ctx, fmt.Sprintf("./testdata/images/%s", f)) {
if err != nil {
t.Fatalf("no errors where expected, got %s", err)
}
}
}
} | explode_data.jsonl/82393 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
47556,
14228,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
90988,
2822,
2023,
8358,
282,
1669,
2088,
3056,
917,
4913,
291,
443,
22785,
3508,
497,
330,
291,
443,
22785,
15995,
497,
330,
14990,
3909,
20963,
9207,
341,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestEvalPointerLimitNumberOfDereferences(t *testing.T) {
var data = make(VarMap)
var i *int
data.Set("intPointer", &i)
RunJetTest(t, data, nil, "IntPointer_i", `{{ intPointer }}`, "")
j := &i
data.Set("intPointer", &j)
RunJetTest(t, data, nil, "IntPointer_j", `{{ intPointer }}`, "")
k := &j
data.Set("i... | explode_data.jsonl/22902 | {
"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,
54469,
9084,
16527,
40619,
35,
485,
4901,
1155,
353,
8840,
836,
8,
341,
2405,
821,
284,
1281,
7,
3962,
2227,
692,
2405,
600,
353,
396,
198,
8924,
4202,
445,
396,
9084,
497,
609,
72,
340,
85952,
35641,
2271,
1155,
11,
821... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_PJWHash(t *testing.T) {
var x uint32 = 7244206
gtest.C(t, func(t *gtest.T) {
j := ghash.PJWHash(strBasic)
t.Assert(j, x)
})
} | explode_data.jsonl/60234 | {
"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,
1088,
41,
54,
6370,
1155,
353,
8840,
836,
8,
341,
2405,
856,
2622,
18,
17,
284,
220,
22,
17,
19,
19,
17,
15,
21,
198,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
12428,
1669,
342,
8296,
1069,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPreAllocatedBuffer_allocateNotExpiredInUse(t *testing.T) {
allocateSz := 16
now := time.Now()
expiration := now
data := make([]byte, 129)
preAllocated := newPreAllocatedBuffer(data)
bufCap := len(data) / allocateSz
for i := 0; i < bufCap-1; i++ {
buf, ok := preAllocated.allocate(allocateSz, expirat... | explode_data.jsonl/8640 | {
"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,
4703,
25154,
657,
4095,
77078,
2623,
54349,
641,
10253,
1155,
353,
8840,
836,
8,
341,
197,
31191,
89837,
1669,
220,
16,
21,
198,
80922,
1669,
882,
13244,
741,
48558,
19629,
1669,
1431,
271,
8924,
1669,
1281,
10556,
3782,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLaunchWithHashCollision(t *testing.T) {
server, closeFn, dc, informers, clientset := setup(t)
defer closeFn()
ns := framework.CreateTestingNamespace("one-node-daemonset-test", server, t)
defer framework.DeleteTestingNamespace(ns, server, t)
dsClient := clientset.AppsV1().DaemonSets(ns.Name)
podInformer ... | explode_data.jsonl/8559 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1336
} | [
2830,
3393,
32067,
2354,
6370,
32280,
1155,
353,
8840,
836,
8,
341,
41057,
11,
3265,
24911,
11,
19402,
11,
6051,
388,
11,
2943,
746,
1669,
6505,
1155,
340,
16867,
3265,
24911,
741,
84041,
1669,
12626,
7251,
16451,
22699,
445,
603,
39054... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDistributionToPoints(t *testing.T) {
end := time.Unix(30, 0)
endTimestamp := convertTimestamp(end)
tests := []struct {
name string
counts []int64
count int64
sum float64
buckets []float64
end time.Time
want []*wire.Point
}{
{
name: "3 buckets",
counts: []int64{
1... | explode_data.jsonl/80877 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 714
} | [
2830,
3393,
62377,
1249,
11411,
1155,
353,
8840,
836,
8,
341,
6246,
1669,
882,
10616,
941,
7,
18,
15,
11,
220,
15,
340,
6246,
20812,
1669,
5508,
20812,
15076,
692,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
18032,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResultField(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("create table t (id int);")
tk.MustExec(`INSERT INTO t VALUES (1);`)
tk.MustExec(`INSERT INTO t VALUES (2);`)
r, err := tk.Exec(`SEL... | explode_data.jsonl/5776 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
2077,
1877,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEventProcessCallback(t *testing.T) {
svc, err := New(&protocol.MockProvider{
ServiceMap: map[string]interface{}{
mediator.Coordination: &mockroute.MockMediatorSvc{},
},
})
require.NoError(t, err)
msg := &message{
ThreadID: threadIDValue,
Msg: service.NewDIDCommMsgMap(model.Ack{Type: AckMsg... | explode_data.jsonl/30527 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 238
} | [
2830,
3393,
1556,
7423,
7494,
1155,
353,
8840,
836,
8,
341,
1903,
7362,
11,
1848,
1669,
1532,
2099,
17014,
24664,
5179,
515,
197,
91619,
2227,
25,
2415,
14032,
31344,
67066,
298,
197,
4404,
850,
52114,
98244,
25,
609,
16712,
8966,
24664... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRootParseExecutableNoHang(t *testing.T) {
root := ggql.NewRoot(nil)
src := "{artist{name}}}"
_, err := root.ParseExecutableString(src)
checkNotNil(t, err, "ParseExecutableString(%s) should fail", src)
} | explode_data.jsonl/48192 | {
"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,
8439,
14463,
94772,
2753,
57038,
1155,
353,
8840,
836,
8,
341,
33698,
1669,
52034,
1470,
7121,
8439,
27907,
340,
41144,
1669,
13868,
18622,
47006,
3417,
11195,
197,
6878,
1848,
1669,
3704,
8937,
94772,
703,
14705,
340,
25157,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrometheusGetCondition(t *testing.T) {
tests := []struct {
name string
cs *PrometheusSourceStatus
condQuery apis.ConditionType
want *apis.Condition
}{{
name: "single condition",
cs: &PrometheusSourceStatus{
SourceStatus: duckv1.SourceStatus{
Status: duckv1.Status{
Con... | explode_data.jsonl/41234 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 746
} | [
2830,
3393,
35186,
39705,
1949,
10547,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
71899,
286,
353,
35186,
39705,
3608,
2522,
198,
197,
197,
1297,
2859,
97723,
75134,
929,
198,
197,
50780,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestContextHelpACI(t *testing.T) {
c := NewParallelE2eCLI(t, binDir)
t.Run("help", func(t *testing.T) {
res := c.RunDockerCmd("context", "create", "aci", "--help")
// Can't use golden here as the help prints the config directory which changes
res.Assert(t, icmd.Expected{Out: "docker context create aci CON... | explode_data.jsonl/5428 | {
"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,
1972,
12689,
1706,
40,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
16547,
36,
17,
68,
63959,
1155,
11,
9544,
6184,
692,
3244,
16708,
445,
8653,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
10202,
1669,
272,
16708,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.