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 TestRuleMeaninglessWhere(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := [][]string{
{
"select * from tbl where 1 = 1;",
"select * from tbl where 'a' = 'a';",
"select * from tbl where 'a' != 1;",
"select * from tbl where 'a';",
"select * from tbl where... | explode_data.jsonl/76771 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 501
} | [
2830,
3393,
11337,
18783,
287,
1717,
9064,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
52931,
917,
515,
197,
197,
515,
298,
197,
1,
1742,
353,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestEncodeToString(t *testing.T) {
for _, pair := range pairs {
got := DefaultCodec.EncodeToString([]byte(pair.decoded))
if got != pair.encoded {
t.Errorf("Encode(%q) = %q, want %q", pair.decoded, got, pair.encoded)
}
}
} | explode_data.jsonl/17243 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 101
} | [
2830,
3393,
32535,
5870,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
6716,
1669,
2088,
13530,
341,
197,
3174,
354,
1669,
7899,
36913,
50217,
5870,
10556,
3782,
39144,
28020,
6737,
1171,
197,
743,
2684,
961,
6716,
13,
19329,
341,
298,
3244... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_Web_Written(t *testing.T) {
Convey("Written sign", t, func() {
resp := httptest.NewRecorder()
m := New()
m.Handlers(func(res http.ResponseWriter) {
res.WriteHeader(http.StatusOK)
})
ctx := m.createContext(resp, &http.Request{Method: "GET"})
So(ctx.Written(), ShouldBeFalse)
ctx.run()
So(c... | explode_data.jsonl/44979 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 143
} | [
2830,
3393,
62,
5981,
2763,
12153,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
35624,
1841,
497,
259,
11,
2915,
368,
341,
197,
34653,
1669,
54320,
70334,
7121,
47023,
741,
197,
2109,
1669,
1532,
741,
197,
2109,
35308,
9254,
18552,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCustomer_RetrieveNotes(t *testing.T) {
key := "test api key"
var mockResponses invdendpoint.Notes
mockResponseId := int64(1523)
mockResponse := new(invdendpoint.Note)
mockResponse.Id = mockResponseId
mockResponse.Notes = "Mock Note"
mockResponses = append(mockResponses, *mockResponse)
server, err :=... | explode_data.jsonl/15029 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 257
} | [
2830,
3393,
12792,
2568,
295,
45004,
21667,
1155,
353,
8840,
836,
8,
341,
23634,
1669,
330,
1944,
6330,
1376,
1837,
2405,
7860,
70743,
1529,
67,
32540,
2067,
6295,
198,
77333,
2582,
764,
1669,
526,
21,
19,
7,
16,
20,
17,
18,
340,
77... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestLocale(t *testing.T) {
trans := New()
expected := "qu_PE"
if trans.Locale() != expected {
t.Errorf("Expected '%s' Got '%s'", expected, trans.Locale())
}
} | explode_data.jsonl/19697 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 70
} | [
2830,
3393,
19231,
1155,
353,
8840,
836,
8,
1476,
72453,
1669,
1532,
741,
42400,
1669,
330,
446,
45784,
1837,
743,
1356,
59094,
368,
961,
3601,
341,
197,
3244,
13080,
445,
18896,
7677,
82,
6,
24528,
7677,
82,
22772,
3601,
11,
1356,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAssertionUnmarshaledFromYAMLWithNotTrue(t *testing.T) {
assertionsYAML := `
- equal:
not: true
- notEqual:
not: true
- matchRegex:
not: true
- notMatchRegex:
not: true
- contains:
not: true
- notContains:
not: true
- isNull:
not: true
- isNotNull:
not: true
- isEmpty:
not: true
- isNotEmpty:... | explode_data.jsonl/62920 | {
"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,
68639,
1806,
36239,
5838,
3830,
56,
31102,
2354,
2623,
2514,
1155,
353,
8840,
836,
8,
341,
6948,
908,
56,
31102,
1669,
22074,
12,
6144,
510,
220,
537,
25,
830,
198,
12,
537,
2993,
510,
220,
537,
25,
830,
198,
12,
2432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddRecursive(t *testing.T) {
r := &repo.Mock{
C: config.Config{
Identity: config.Identity{
PeerID: testPeerID, // required by offline node
},
},
D: syncds.MutexWrap(datastore.NewMapDatastore()),
}
node, err := core.NewNode(context.Background(), &core.BuildCfg{Repo: r})
if err != nil {
t.F... | explode_data.jsonl/39682 | {
"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,
2212,
78542,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
609,
23476,
24664,
515,
197,
6258,
25,
2193,
10753,
515,
298,
197,
18558,
25,
2193,
24423,
515,
571,
10025,
34756,
915,
25,
1273,
30888,
915,
11,
442,
2567,
553,
26166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCollectorSet(t *testing.T) {
_ = redisMetric.Set(100, "1", "400")
_ = redisNoLabelsMetric.Set(101)
_ = Get("/metrics", nil)
} | explode_data.jsonl/52688 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 62
} | [
2830,
3393,
53694,
1649,
1155,
353,
8840,
836,
8,
341,
197,
62,
284,
20870,
54310,
4202,
7,
16,
15,
15,
11,
330,
16,
497,
330,
19,
15,
15,
1138,
197,
62,
284,
20870,
2753,
23674,
54310,
4202,
7,
16,
15,
16,
340,
197,
62,
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 |
func TestClustersVersion(t *testing.T) {
clusters, mock := createClusters(t)
defer shutdownClusters(t, clusters, mock)
f := func(t *testing.T, c *Cluster) {
v := c.Version()
if v != version.Version.String() {
t.Error("Bad version")
}
}
runF(t, clusters, f)
} | explode_data.jsonl/66600 | {
"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,
94992,
5637,
1155,
353,
8840,
836,
8,
341,
39407,
14605,
11,
7860,
1669,
1855,
94992,
1155,
340,
16867,
23766,
94992,
1155,
11,
26968,
11,
7860,
340,
1166,
1669,
2915,
1155,
353,
8840,
836,
11,
272,
353,
28678,
8,
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... | 2 |
func Test_SDBMHash(t *testing.T) {
var x uint32 = 1069170245
gtest.C(t, func(t *gtest.T) {
j := ghash.SDBMHash(strBasic)
t.Assert(j, x)
})
} | explode_data.jsonl/60228 | {
"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,
1098,
3506,
44,
6370,
1155,
353,
8840,
836,
8,
341,
2405,
856,
2622,
18,
17,
284,
220,
16,
15,
21,
24,
16,
22,
15,
17,
19,
20,
198,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
12428,
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 TestNamespacedBuiltins(t *testing.T) {
tests := []struct {
expr string
expected *Term
wantErr bool
}{
{`foo.bar.baz(1, 2)`, MustParseTerm("foo.bar.baz"), false},
{`foo.(1,2)`, nil, true},
{`foo.#.bar(1,2)`, nil, true},
}
for _, tc := range tests {
expr, err := ParseExpr(tc.expr)
if !tc.w... | explode_data.jsonl/50499 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 341
} | [
2830,
3393,
7980,
68552,
54300,
1330,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
8122,
649,
257,
914,
198,
197,
42400,
353,
17249,
198,
197,
50780,
7747,
220,
1807,
198,
197,
59403,
197,
197,
90,
63,
7975,
22001... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequestSetsHeaders(t *testing.T) {
server := clientFunc(func(req *http.Request) (*http.Response, error) {
if req.Header.Get("Accept") != "application/other, */*" {
t.Errorf("unexpected headers: %#v", req.Header)
}
return &http.Response{
StatusCode: http.StatusForbidden,
Body: ioutil.NopCl... | explode_data.jsonl/13246 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 257
} | [
2830,
3393,
1900,
30175,
10574,
1155,
353,
8840,
836,
8,
341,
41057,
1669,
2943,
9626,
18552,
6881,
353,
1254,
9659,
8,
4609,
1254,
12574,
11,
1465,
8,
341,
197,
743,
4232,
15753,
2234,
445,
16646,
899,
961,
330,
5132,
14,
1575,
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 Test_DirectedWithDuplicateNode(t *testing.T) {
gb := NewGraphBuilder(BuilderOptions{AllowDuplicateNodes: false, IsDirected: true})
gb.AddNode(1)
gb.AddNode(1)
_, err := gb.Build()
assert.ErrorIs(t, err, duplicateNodeError{nodeID: 1})
gb = NewGraphBuilder(BuilderOptions{AllowDuplicateNodes: true, IsDirected:... | explode_data.jsonl/81787 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
1557,
74612,
2354,
53979,
1955,
1155,
353,
8840,
836,
8,
341,
3174,
65,
1669,
1532,
11212,
3297,
7,
3297,
3798,
90,
18605,
53979,
12288,
25,
895,
11,
2160,
92669,
25,
830,
3518,
3174,
65,
1904,
1955,
7,
16,
340,
3174,
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 TestMasterIsCheckedLinkModeTrue(t *testing.T) {
sourceCluster := MustCreateCluster(t, []greenplum.SegConfig{
{ContentID: -1, DbID: 1, Port: 15432, Hostname: "localhost", DataDir: "/data/qddir/seg-1", Role: "p"},
{ContentID: 0, DbID: 2, Port: 25432, Hostname: "host1", DataDir: "/data/dbfast1/seg1", Role: "p"},... | explode_data.jsonl/35429 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 609
} | [
2830,
3393,
18041,
3872,
12666,
3939,
3636,
2514,
1155,
353,
8840,
836,
8,
341,
47418,
28678,
1669,
15465,
4021,
28678,
1155,
11,
3056,
13250,
500,
372,
808,
791,
2648,
515,
197,
197,
90,
2762,
915,
25,
481,
16,
11,
11988,
915,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestOpenClose(t *testing.T) {
type args struct {
path string
}
path := "testdata/openclosedb"
tests := []struct {
name string
args args
}{
{"CreateNewDB", args{path}},
{"OpenExistingDB", args{path}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := Open(tt.args.pat... | explode_data.jsonl/38329 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 379
} | [
2830,
3393,
5002,
7925,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
26781,
914,
198,
197,
532,
26781,
1669,
330,
92425,
52000,
954,
9259,
65,
698,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
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... | 6 |
func Test23262(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t")
tk.MustExec("create table t(a year)")
tk.MustExec("insert into t values(2002)")
tk.MustQuery("select * from t where a=2").Chec... | explode_data.jsonl/65573 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 157
} | [
2830,
3393,
17,
18,
17,
21,
17,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50463,
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... | 1 |
func TestInitializeContainerOrderingWithLinksAndVolumesFrom(t *testing.T) {
containerWithOnlyVolume := &apicontainer.Container{
Name: "myName",
Image: "image:tag",
VolumesFrom: []apicontainer.VolumeFrom{{SourceContainer: "myName1"}},
}
containerWithOnlyLink := &apicontainer.Container{
Name: "m... | explode_data.jsonl/37262 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 768
} | [
2830,
3393,
9928,
4502,
4431,
287,
2354,
24089,
3036,
96325,
3830,
1155,
353,
8840,
836,
8,
341,
53290,
2354,
7308,
18902,
1669,
609,
391,
51160,
1743,
33672,
515,
197,
21297,
25,
286,
330,
2408,
675,
756,
197,
53397,
25,
981,
330,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestArrayErrors(t *testing.T) {
test.RunProfiles(t, func(t *testing.T, profile test.Profile) {
agg, ckpt := new2()
_, err := ckpt.Max()
require.Error(t, err)
require.Equal(t, err, aggregation.ErrNoData)
_, err = ckpt.Min()
require.Error(t, err)
require.Equal(t, err, aggregation.ErrNoData)
_, er... | explode_data.jsonl/28116 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 505
} | [
2830,
3393,
1857,
13877,
1155,
353,
8840,
836,
8,
341,
18185,
16708,
62719,
1155,
11,
2915,
1155,
353,
8840,
836,
11,
5526,
1273,
59872,
8,
341,
197,
197,
15718,
11,
38613,
417,
1669,
501,
17,
2822,
197,
197,
6878,
1848,
1669,
38613,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEmpire_Deploy(t *testing.T) {
e := empiretest.NewEmpire(t)
s := new(mockScheduler)
e.Scheduler = s
user := &empire.User{Name: "ejholmes"}
app, err := e.Create(context.Background(), empire.CreateOpts{
User: user,
Name: "acme-inc",
})
assert.NoError(t, err)
img := image.Image{Repository: "remind10... | explode_data.jsonl/35282 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1344
} | [
2830,
3393,
28731,
554,
90680,
1989,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
31347,
1944,
7121,
28731,
554,
1155,
340,
1903,
1669,
501,
30389,
38878,
340,
7727,
808,
15222,
284,
274,
271,
19060,
1669,
609,
3262,
554,
7344,
63121,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestView(t *testing.T) {
input := CreateTestInput(t)
var newContractAddress sdk.AccAddress
t.Run("deploy a contract with regular code", func(t *testing.T) {
code, err := hex.DecodeString(BasicTestsBytecodeString)
require.Nil(t, err)
result, err2 := input.CvmKeeper.Call(input.Ctx, Addrs[0], nil, 0, code,... | explode_data.jsonl/14831 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 441
} | [
2830,
3393,
851,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
4230,
2271,
2505,
1155,
692,
2405,
501,
14067,
4286,
45402,
77538,
4286,
198,
3244,
16708,
445,
35794,
264,
5116,
448,
5792,
2038,
497,
2915,
1155,
353,
8840,
836,
8,
341,
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 TestIntegration_MultiwordV2(t *testing.T) {
t.Parallel()
// Simulate a consumer contract calling to obtain ETH quotes in 3 different currencies
// in a single callback.
config := cltest.NewTestEVMConfig(t)
user, _, operatorAddress, _, consumerContract, operatorContract, b := setupMultiWordContracts(t)
app, ... | explode_data.jsonl/29843 | {
"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,
52464,
1245,
7068,
1158,
53,
17,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
4467,
6334,
264,
11502,
5116,
8098,
311,
6851,
37742,
17194,
304,
220,
18,
2155,
35602,
198,
197,
322,
304,
264,
3175,
4822,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMetricsReporter(t *testing.T) {
pa := kpa(testNamespace, testRevision)
wantTags := map[string]string{
metricskey.LabelRevisionName: testRevision,
metricskey.LabelNamespaceName: testNamespace,
metricskey.LabelServiceName: pa.Labels[serving.ServiceLabelKey],
metricskey.LabelConfiguration... | explode_data.jsonl/35446 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 538
} | [
2830,
3393,
27328,
52766,
1155,
353,
8840,
836,
8,
341,
3223,
64,
1669,
595,
6595,
8623,
22699,
11,
1273,
33602,
340,
50780,
15930,
1669,
2415,
14032,
30953,
515,
197,
2109,
13468,
792,
4679,
33602,
675,
25,
414,
1273,
33602,
345,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetVolumeReplicaResource(t *testing.T) {
fakeKubeClient := fake.NewSimpleClientset()
fakeOpenebsClient := openebsFakeClientset.NewSimpleClientset()
kubeInformerFactory := kubeinformers.NewSharedInformerFactory(fakeKubeClient, time.Second*30)
openebsInformerFactory := informers.NewSharedInformerFactory(fak... | explode_data.jsonl/61359 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 851
} | [
2830,
3393,
1949,
18902,
18327,
15317,
4783,
1155,
353,
8840,
836,
8,
341,
1166,
726,
42,
3760,
2959,
1669,
12418,
7121,
16374,
2959,
746,
741,
1166,
726,
7125,
1952,
1279,
2959,
1669,
1787,
68,
1279,
52317,
2959,
746,
7121,
16374,
2959... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSizeEdgeAlignedFitTopEdge(t *testing.T) {
outer := CreateRect(0, 0, 100, 100)
s := Size{10, 10}
p := Point{50, 50}
test.AssertEquals(t, CreateRect(45, 50, 55, 60), s.EdgeAlignedFit(outer, p))
} | explode_data.jsonl/12902 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 87
} | [
2830,
3393,
1695,
11656,
93305,
23346,
5366,
11656,
1155,
353,
8840,
836,
8,
341,
197,
2676,
1669,
4230,
4415,
7,
15,
11,
220,
15,
11,
220,
16,
15,
15,
11,
220,
16,
15,
15,
340,
1903,
1669,
8478,
90,
16,
15,
11,
220,
16,
15,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPrintPodTemplate(t *testing.T) {
tests := []struct {
podTemplate api.PodTemplate
options printers.GenerateOptions
expected []metav1.TableRow
}{
// Test basic pod template with no containers.
{
podTemplate: api.PodTemplate{
ObjectMeta: metav1.ObjectMeta{Name: "pod-template-1"},
Tem... | explode_data.jsonl/21602 | {
"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,
8994,
23527,
7275,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
3223,
347,
7275,
6330,
88823,
7275,
198,
197,
35500,
257,
55953,
57582,
3798,
198,
197,
42400,
262,
3056,
4059,
402,
16,
18257,
3102,
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... | 5 |
func TestGitCommandCommitAmend(t *testing.T) {
gitCmd := newDummyGitCommand()
gitCmd.OSCommand.command = func(cmd string, args ...string) *exec.Cmd {
assert.EqualValues(t, "git", cmd)
assert.EqualValues(t, []string{"commit", "--amend", "--allow-empty"}, args)
return exec.Command("echo")
}
_, err := gitCmd.P... | explode_data.jsonl/38359 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
46562,
4062,
33441,
6091,
408,
1155,
353,
8840,
836,
8,
341,
90731,
15613,
1669,
501,
43344,
46562,
4062,
741,
90731,
15613,
57054,
4062,
14143,
284,
2915,
14160,
914,
11,
2827,
2503,
917,
8,
353,
11748,
64512,
341,
197,
694... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAESSIVDoesSupport(t *testing.T) {
km, err := registry.GetKeyManager(testutil.AESSIVTypeURL)
if err != nil {
t.Errorf("cannot obtain AESSIV key manager: %s", err)
}
if !km.DoesSupport(testutil.AESSIVTypeURL) {
t.Errorf("AESSIVKeyManager must support %s", testutil.AESSIVTypeURL)
}
if km.DoesSupport("so... | explode_data.jsonl/58687 | {
"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,
32,
9996,
3090,
21468,
7916,
1155,
353,
8840,
836,
8,
341,
197,
16017,
11,
1848,
1669,
19424,
51723,
2043,
8623,
1314,
875,
9996,
3090,
929,
3144,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
33260,
6851,
362,
99... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGrantSingleChannel(t *testing.T) {
assert := assert.New(t)
interceptor := stubs.NewInterceptor()
interceptor.AddStub(&stubs.Stub{
Method: "GET",
Path: fmt.Sprintf("/v2/auth/grant/sub-key/%s", pamConfig.SubscribeKey),
Query: "channel=ch1&m=0&r=1&w=1&d=0",
Respo... | explode_data.jsonl/43191 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 495
} | [
2830,
3393,
67971,
10888,
9629,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
58915,
15349,
1669,
13633,
82,
7121,
32786,
741,
58915,
15349,
1904,
33838,
2099,
267,
15738,
7758,
392,
515,
197,
84589,
25,
1797,
330,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSchemaReadInvalidName(t *testing.T) {
conn, cleanup, _ := testserver.NewTestServer(require.New(t), 0, memdb.DisableGC, 0, false, testfixtures.EmptyDatastore)
t.Cleanup(cleanup)
client := v1alpha1.NewSchemaServiceClient(conn)
_, err := client.ReadSchema(context.Background(), &v1alpha1.ReadSchemaRequest{
... | explode_data.jsonl/54543 | {
"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,
8632,
4418,
7928,
675,
1155,
353,
8840,
836,
8,
341,
32917,
11,
21290,
11,
716,
1669,
1273,
4030,
7121,
2271,
5475,
23482,
7121,
1155,
701,
220,
15,
11,
1833,
1999,
10166,
480,
22863,
11,
220,
15,
11,
895,
11,
1273,
4524... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNew_Send(t *testing.T) {
s, c := conn.TestPair()
defer s.Close()
defer c.Close()
recv := make(chan Message)
w := New("wizard", attr.Attr{Blood: 10}, c, codec.JsonCodec(), recv)
wg := &sync.WaitGroup{}
wg.Add(2)
go func() {
defer wg.Done()
data, err := s.Read()
if err != nil {
t.Error(err)
... | explode_data.jsonl/67898 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 387
} | [
2830,
3393,
3564,
46267,
1155,
353,
8840,
836,
8,
341,
1903,
11,
272,
1669,
4534,
8787,
12443,
741,
16867,
274,
10421,
741,
16867,
272,
10421,
2822,
197,
33977,
1669,
1281,
35190,
4856,
340,
6692,
1669,
1532,
445,
58593,
497,
6376,
1554... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetIcon(t *testing.T) {
req, err := http.NewRequest("GET", "/icon?url=apple.com&size=120", nil)
if err != nil {
log.Fatal(err)
}
w := httptest.NewRecorder()
iconHandler(w, req)
assertStringEquals(t, "302", fmt.Sprintf("%d", w.Code))
assertStringEquals(t, "max-age=86400", w.Header().Get("Cache-Contro... | explode_data.jsonl/25590 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 168
} | [
2830,
3393,
1949,
4395,
1155,
353,
8840,
836,
8,
341,
24395,
11,
1848,
1669,
1758,
75274,
445,
3806,
497,
3521,
1924,
94399,
28,
22377,
905,
5,
2141,
28,
16,
17,
15,
497,
2092,
340,
743,
1848,
961,
2092,
341,
197,
6725,
26133,
3964,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewPeerServer(t *testing.T) {
server, err := NewPeerServer(":4050", comm.ServerConfig{})
assert.NoError(t, err, "NewPeerServer returned unexpected error")
assert.Equal(t, "[::]:4050", server.Address(), "NewPeerServer returned the wrong address")
server.Stop()
_, err = NewPeerServer("", comm.ServerConfig{... | explode_data.jsonl/56825 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
3564,
30888,
5475,
1155,
353,
8840,
836,
8,
341,
41057,
11,
1848,
1669,
1532,
30888,
5475,
18893,
19,
15,
20,
15,
497,
1063,
22997,
2648,
37790,
6948,
35699,
1155,
11,
1848,
11,
330,
3564,
30888,
5475,
5927,
16500,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGet(t *testing.T) {
dep, err := generateDeployment()
if err != nil {
t.Fatal(err)
}
req := api.GetMessageRequest{Mailbox: dep.Mailbox.Id}
req.Sign(dep.AccessKey.Name, dep.AccessKey.Secret)
var resp api.GetMessageResponse
doRequest(t, req, &resp, "get")
if resp.Body != dep.Message.Body {
t.Fatalf("M... | explode_data.jsonl/15709 | {
"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,
1949,
1155,
353,
8840,
836,
8,
341,
197,
14891,
11,
1848,
1669,
6923,
75286,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
24395,
1669,
6330,
2234,
2052,
1900,
90,
16702,
2011,
25,
2170,
73103,
201... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRangeStatsInit(t *testing.T) {
defer leaktest.AfterTest(t)()
tc := testContext{}
stopper := stop.NewStopper()
defer stopper.Stop(context.TODO())
tc.Start(t, stopper)
ms := enginepb.MVCCStats{
LiveBytes: 1,
KeyBytes: 2,
ValBytes: 3,
IntentBytes: 4,
LiveCount: 5,
K... | explode_data.jsonl/25279 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 383
} | [
2830,
3393,
6046,
16635,
3803,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
78255,
1669,
1273,
1972,
16094,
62644,
712,
1669,
2936,
7121,
10674,
712,
741,
16867,
2936,
712,
30213,
5378,
90988,
2398,
78255,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateLeaderIP(t *testing.T) {
le := &fakeLeaderEngine{}
h := &Handler{
leadershipChan: make(chan state, 1),
leaderStatusCallback: le.get,
}
// First run, become leader
le.set("", nil)
err := h.updateLeaderIP()
assert.NoError(t, err)
assert.Equal(t, "", h.leaderIP)
h.assertLeadershipMessage... | explode_data.jsonl/17097 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 873
} | [
2830,
3393,
4289,
52621,
3298,
1155,
353,
8840,
836,
8,
341,
197,
273,
1669,
609,
30570,
52621,
4571,
16094,
9598,
1669,
609,
3050,
515,
197,
197,
78386,
2151,
46019,
25,
981,
1281,
35190,
1584,
11,
220,
16,
1326,
197,
197,
37391,
252... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPareLineErrors(t *testing.T) {
for _, tc := range []struct {
id string
line string
expectedErr string
}{
{
id: "empty line okay",
line: " # gibberish range: ",
expectedErr: "",
},
{
id: "Not enough fields",
line: "blurg",
expe... | explode_data.jsonl/54251 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 688
} | [
2830,
3393,
47,
546,
2460,
13877,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
15710,
688,
914,
198,
197,
27109,
286,
914,
198,
197,
42400,
7747,
914,
198,
197,
59403,
197,
197,
515,
298,
15710,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReceiverExistsForDeepSubRoute(t *testing.T) {
in := `
route:
receiver: team-X
routes:
- match:
foo: bar
routes:
- match:
foo: bar
receiver: nonexistent
receivers:
- name: 'team-X'
`
_, err := Load(in)
expected := "undefined receiver \"nonexiste... | explode_data.jsonl/72896 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 230
} | [
2830,
3393,
25436,
15575,
2461,
33464,
3136,
4899,
1155,
353,
8840,
836,
8,
341,
17430,
1669,
22074,
8966,
510,
262,
13964,
25,
2083,
30550,
198,
262,
11291,
510,
414,
481,
2432,
510,
688,
15229,
25,
3619,
198,
286,
11291,
510,
286,
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 TestAddNodeIDToDimensionReturnsOK(t *testing.T) {
t.Parallel()
Convey("Given a dataset API with a successful store mock and auth", t, func() {
mockedDataStore, isLocked := storeMockWithLock(true)
mockedDataStore.UpdateETagForOptionsFunc = func(ctx context.Context, currentInstance *models.Instance, upserts [... | explode_data.jsonl/20823 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1117
} | [
2830,
3393,
2212,
1955,
915,
1249,
26121,
16446,
3925,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
93070,
5617,
445,
22043,
264,
10337,
5333,
448,
264,
6849,
3553,
7860,
323,
4166,
497,
259,
11,
2915,
368,
341,
197,
2109,
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 TestNilStringMap(t *testing.T) {
assert.EqualValues(t, 0, NewStringMap().Len())
val, exist := NewStringMap().Get("test_key")
assert.False(t, exist)
assert.EqualValues(t, StringValue{nil}, val)
insertMap := NewStringMap()
insertMap.Insert("k", "v")
assert.EqualValues(t, generateTestStringMap(), insertMap)
... | explode_data.jsonl/38205 | {
"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,
19064,
703,
2227,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
6227,
1155,
11,
220,
15,
11,
1532,
703,
2227,
1005,
11271,
12367,
19302,
11,
3000,
1669,
1532,
703,
2227,
1005,
1949,
445,
1944,
3097,
1138,
6948,
50757,
1155,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUpdateUserPassword(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer TearDown()
Client := th.Client
password := "newpassword1"
pass, resp := Client.UpdateUserPassword(th.BasicUser.Id, th.BasicUser.Password, password)
CheckNoError(t, resp)
if !pass {
t.Fatal("should have returned true... | explode_data.jsonl/49502 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 763
} | [
2830,
3393,
4289,
1474,
4876,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
1005,
3803,
2320,
7210,
741,
16867,
76982,
4454,
741,
71724,
1669,
270,
11716,
271,
58199,
1669,
330,
931,
3833,
16,
698,
41431,
11,
9039... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBeginEndMatcher_Match(t *testing.T) {
t.Helper()
var test = func(expect bool, value string, prefixes []string) {
t.Helper()
var matcher = NewBeginEndMatcher(prefixes)
var got = matcher.Match(value)
if expect != got {
t.Errorf("expect %t, got %t", expect, got)
}
}
test(false, "", nil)
test... | explode_data.jsonl/73257 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 318
} | [
2830,
3393,
11135,
3727,
37554,
1245,
754,
1155,
353,
8840,
836,
8,
341,
3244,
69282,
2822,
2405,
1273,
284,
2915,
89443,
1807,
11,
897,
914,
11,
62576,
3056,
917,
8,
341,
197,
3244,
69282,
2822,
197,
2405,
36052,
284,
1532,
11135,
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... | 2 |
func TestCreateMetricsReceiver(t *testing.T) {
cfg := createDefaultConfig().(*Config)
cfg.Brokers = []string{"invalid:9092"}
cfg.ProtocolVersion = "2.0.0"
f := kafkaReceiverFactory{metricsUnmarshalers: defaultMetricsUnmarshalers()}
r, err := f.createMetricsReceiver(context.Background(), componenttest.NewNopReceive... | explode_data.jsonl/70856 | {
"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,
4021,
27328,
25436,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
1855,
3675,
2648,
1005,
4071,
2648,
340,
50286,
1785,
299,
26177,
284,
3056,
917,
4913,
11808,
25,
24,
15,
24,
17,
16707,
50286,
54096,
5637,
284,
330,
17,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUintJsonUnmarshalInvalid(t *testing.T) {
u := Uint{}
if err := u.UnmarshalJSON([]byte(`"0`)); err == nil {
t.Errorf("Expected error when json.Unmarshal, but not; %#v", u)
}
} | explode_data.jsonl/13389 | {
"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,
21570,
5014,
1806,
27121,
7928,
1155,
353,
8840,
836,
8,
341,
10676,
1669,
27883,
16094,
743,
1848,
1669,
575,
38097,
5370,
10556,
3782,
5809,
1,
15,
63,
5905,
1848,
621,
2092,
341,
197,
3244,
13080,
445,
18896,
1465,
979,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_LogLevel(t *testing.T) {
logLevel := "warn"
fixtureHandler := func(w http.ResponseWriter, r *http.Request) {
if r.Method == http.MethodPost {
var ll LogLevel
if err := json.NewDecoder(r.Body).Decode(&ll); err != nil {
t.Logf("could not decode json: %v\n", err)
t.FailNow()
}
logLevel = ... | explode_data.jsonl/66142 | {
"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,
44083,
4449,
1155,
353,
8840,
836,
8,
341,
6725,
4449,
1669,
330,
33481,
698,
1166,
12735,
3050,
1669,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
743,
435,
20798,
621,
1758,
20798,
4133,
341,
298,
2405... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTidbClusterControllerSync(t *testing.T) {
g := NewGomegaWithT(t)
type testcase struct {
name string
addTcToIndexer bool
errWhenUpdateTidbCluster bool
errExpectFn func(*GomegaWithT, error)
}
testFn := func(test *testcase, t *testing.T) {
t.Log(test.name)... | explode_data.jsonl/68176 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 823
} | [
2830,
3393,
51,
307,
65,
28678,
2051,
12154,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
340,
13158,
70080,
2036,
341,
197,
11609,
3824,
914,
198,
197,
12718,
51,
66,
1249,
1552,
261,
1843,
1807,
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... | 4 |
func TestDirectModeHandler(t *testing.T) {
privKey, pubkey, addr := testdata.KeyTestPubAddr()
interfaceRegistry := codectypes.NewInterfaceRegistry()
interfaceRegistry.RegisterImplementations((*sdk.Msg)(nil), &testdata.TestMsg{})
marshaler := codec.NewProtoCodec(interfaceRegistry)
txConfig := NewTxConfig(marshaler... | explode_data.jsonl/38085 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1270
} | [
2830,
3393,
16027,
3636,
3050,
1155,
353,
8840,
836,
8,
341,
71170,
1592,
11,
95116,
11,
10789,
1669,
1273,
691,
9610,
2271,
29162,
13986,
741,
58915,
1564,
15603,
1669,
20329,
439,
1804,
7121,
5051,
15603,
741,
58915,
1564,
15603,
19983,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMuxMatch(t *testing.T) {
r := NewRouter()
r.Get("/hi", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("X-Test", "yes")
w.Write([]byte("bye"))
})
r.Route("/articles", func(r Router) {
r.Get("/{id}", func(w http.ResponseWriter, r *http.Request) {
id := URLParam(r, "id")
w.Header().... | explode_data.jsonl/42895 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 451
} | [
2830,
3393,
44,
2200,
8331,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
9523,
741,
7000,
2234,
4283,
6023,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6692,
15753,
1005,
1649,
445,
55,
12,
2271,
497,
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 TestMSSQLIssue5(t *testing.T) {
testingIssue5 = true
defer func() {
testingIssue5 = false
}()
db, sc, err := mssqlConnect()
if err != nil {
t.Fatal(err)
}
const nworkers = 8
defer closeDB(t, db, sc, sc)
db.Exec("drop table dbo.temp")
exec(t, db, `
create table dbo.temp (
id int,
value int,
... | explode_data.jsonl/33551 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 635
} | [
2830,
3393,
44,
1220,
3588,
42006,
20,
1155,
353,
8840,
836,
8,
341,
197,
8840,
42006,
20,
284,
830,
198,
16867,
2915,
368,
341,
197,
197,
8840,
42006,
20,
284,
895,
198,
197,
69826,
20939,
11,
1136,
11,
1848,
1669,
296,
79713,
1461... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestControllerInitialization(t *testing.T) {
controller, r := newTestController("", "")
// Initialize should create the registration entry for the cluster nodes
require.NoError(t, controller.Initialize(context.Background()))
requireEntriesEqual(t, []*types.Entry{
{
Id: "00000001",
ParentId: must... | explode_data.jsonl/32147 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 216
} | [
2830,
3393,
2051,
61928,
1155,
353,
8840,
836,
8,
341,
61615,
11,
435,
1669,
501,
2271,
2051,
19814,
85617,
197,
322,
9008,
1265,
1855,
279,
12227,
4343,
369,
279,
10652,
7798,
198,
17957,
35699,
1155,
11,
6461,
45829,
5378,
19047,
1214... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadConfigFromUrl_Corrupted(t *testing.T) {
fileName, _, _ := toolbox.CallerInfo(2)
basePath := path.Dir(fileName)
url := toolbox.FileSchema + path.Join(basePath, "test", "corrupted_config.json")
config := &TestConfig{}
err := toolbox.LoadConfigFromUrl(url, config)
assert.NotNil(t, err)
} | explode_data.jsonl/72333 | {
"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,
5879,
2648,
3830,
2864,
920,
269,
85954,
1155,
353,
8840,
836,
8,
1476,
17661,
675,
11,
8358,
716,
1669,
67870,
727,
13956,
1731,
7,
17,
340,
24195,
1820,
1669,
1815,
83757,
23014,
340,
19320,
1669,
67870,
8576,
8632,
488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAllocateErrorAndRecovery(t *testing.T) {
defer leaktest.AfterTest(t)
store, _, stopper := createTestStore(t)
defer stopper.Stop()
allocd := make(chan int, 10)
// Firstly create a valid IDAllocator to get some ID.
idAlloc, err := newIDAllocator(keys.RaftIDGenerator, store.ctx.DB, 2, 10, stopper)
if err ... | explode_data.jsonl/45460 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 857
} | [
2830,
3393,
75380,
1454,
3036,
693,
7449,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
340,
57279,
11,
8358,
2936,
712,
1669,
1855,
2271,
6093,
1155,
340,
16867,
2936,
712,
30213,
741,
197,
4742,
67,
1669,
1281,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshalNullWithJSONPBUnmarshaler(t *testing.T) {
rawJson := `{"stringField":null}`
var ptrFieldMsg ptrFieldMessage
if err := Unmarshal(strings.NewReader(rawJson), &ptrFieldMsg); err != nil {
t.Errorf("unmarshal error: %v", err)
}
want := ptrFieldMessage{StringField: &stringField{IsSet: true, StringVa... | explode_data.jsonl/63127 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
1806,
27121,
3280,
2354,
5370,
40637,
1806,
27121,
261,
1155,
353,
8840,
836,
8,
341,
76559,
5014,
1669,
1565,
4913,
917,
1877,
788,
2921,
31257,
2405,
10087,
1877,
6611,
10087,
1877,
2052,
198,
743,
1848,
1669,
1230,
27121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUser_AddMember(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
org := AssertExistsAndLoadBean(t, &User{ID: 3}).(*User)
// add a user that is not a member
AssertNotExistsBean(t, &OrgUser{UID: 5, OrgID: 3})
prevNumMembers := org.NumMembers
assert.NoError(t, org.AddMember(5))
AssertExistsAndLoadB... | explode_data.jsonl/71051 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 340
} | [
2830,
3393,
1474,
21346,
9366,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
2271,
5988,
2398,
87625,
1669,
5319,
15575,
3036,
5879,
10437,
1155,
11,
609,
1474,
90,
915,
25,
220,
18,
16630,
4071,
1474,
692,
197,
322,
912... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServicecheckExtraPassAns(t *testing.T) {
convey.Convey("checkExtraPassAns", t, func() {
ret, qs, err := s.checkExtraPassAns(context.Background(), 14771787, []int64{}, nil, "", 0)
convey.So(err, convey.ShouldBeNil)
convey.So(qs, convey.ShouldNotBeNil)
convey.So(ret, convey.ShouldNotBeNil)
})
} | explode_data.jsonl/21135 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
1860,
2028,
11612,
12187,
69599,
1155,
353,
8840,
836,
8,
341,
37203,
5617,
4801,
5617,
445,
2028,
11612,
12187,
69599,
497,
259,
11,
2915,
368,
341,
197,
11262,
11,
32421,
11,
1848,
1669,
274,
9093,
11612,
12187,
69599,
537... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTaintedNode(t *testing.T) {
forEachStrategy(t, func(t *testing.T, strategy *apps.DaemonSetUpdateStrategy) {
closeFn, dc, informers, clientset := setup(t)
defer closeFn()
ns := framework.CreateNamespaceOrDie(clientset, "tainted-node", t)
defer framework.DeleteNamespaceOrDie(clientset, ns, t)
dsClien... | explode_data.jsonl/70046 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 883
} | [
2830,
3393,
51,
30229,
1955,
1155,
353,
8840,
836,
8,
341,
2023,
4854,
19816,
1155,
11,
2915,
1155,
353,
8840,
836,
11,
8282,
353,
27635,
909,
64,
7291,
1649,
4289,
19816,
8,
341,
197,
27873,
24911,
11,
19402,
11,
6051,
388,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestSignerAddCommandNoTargetsKey(t *testing.T) {
tmpDir, err := ioutil.TempDir("", "docker-sign-test-")
assert.NilError(t, err)
defer os.RemoveAll(tmpDir)
config.SetDir(tmpDir)
tmpfile, err := ioutil.TempFile("", "pemfile")
assert.NilError(t, err)
defer os.Remove(tmpfile.Name())
cli := test.NewFakeCli(&f... | explode_data.jsonl/23299 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 262
} | [
2830,
3393,
7264,
261,
2212,
4062,
2753,
49030,
1592,
1155,
353,
8840,
836,
8,
341,
20082,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
28648,
27953,
16839,
12,
1138,
6948,
59678,
1454,
1155,
11,
1848,
340,
16867,
2643,
84427,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenModel_Issue222(t *testing.T) {
specDoc, err := loads.Spec("../fixtures/codegen/tasklist.basic.yml")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
k := "Price"
opts := opts()
genModel, err := makeGenDefinition(k, "models", definitions[k], specDoc, opts)
require.NoError(t, err)
re... | explode_data.jsonl/2538 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 294
} | [
2830,
3393,
9967,
1712,
7959,
83890,
17,
17,
17,
1155,
353,
8840,
836,
8,
341,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
46928,
4370,
58186,
1607,
33257,
33936,
1138,
17957,
35699,
1155,
11,
1848,
692,
7452,
4054,
82,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIntegralPalindromesArePalindromes(t *testing.T) {
palindromes := [...]int{11, 101, 111, 1221, 12321, 1234321}
for _, n := range palindromes {
assert.True(t, IsPalindrome(n),
"%d should be a palindrome", n)
}
notPalindromes := [...]int{10, 12, 13, 113, 201, 311, 301, 1011, 17221, 3141, 12345678}
for ... | explode_data.jsonl/10876 | {
"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,
66164,
19980,
484,
441,
288,
11526,
19980,
484,
441,
288,
1155,
353,
8840,
836,
8,
341,
3223,
278,
484,
441,
288,
1669,
48179,
396,
90,
16,
16,
11,
220,
16,
15,
16,
11,
220,
16,
16,
16,
11,
220,
16,
17,
17,
16,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestEnsureBytes(t *testing.T) {
// the content here doesn't matter
r := strings.NewReader("0123456789")
lcd := largeChunkDecoder{
r, 0, 0,
3, 8189,
make([]byte, 8192),
bytes.NewBuffer(make([]byte, defaultStringBufferSize)),
nil,
}
lcd.ensureBytes(4)
// we expect the new remainder to be 3 + 10 (l... | explode_data.jsonl/23252 | {
"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,
64439,
7078,
1155,
353,
8840,
836,
8,
341,
197,
322,
279,
2213,
1588,
3171,
944,
4925,
198,
7000,
1669,
9069,
68587,
445,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
5130,
90596,
1669,
3460,
28304,
20732,
515,
197,
7000,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestProcessDNSRace(t *testing.T) {
p := new(process)
var wg sync.WaitGroup
wg.Add(2)
address := func(i byte) net.IP { return net.IPv4(172, 16, 0, i) }
go func() {
for i := byte(255); i > 0; i-- {
p.addTransaction(dns.Transaction{
Client: net.UDPAddr{IP: net.IPv4(10, 20, 30, 40)},
Server: ne... | explode_data.jsonl/70819 | {
"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,
7423,
61088,
55991,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
501,
21929,
340,
2405,
63581,
12811,
28384,
2808,
198,
72079,
1904,
7,
17,
340,
63202,
1669,
2915,
1956,
4922,
8,
4179,
46917,
314,
470,
4179,
46917,
85,
19,
7,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMakeHTTPWatchHandler(t *testing.T) {
t.Parallel()
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
idx := r.Header.Get("X-Consul-Index")
if idx != "100" {
t.Fatalf("bad: %s", idx)
}
// Get the first one
customHeader := r.Header.Get("X-Custom")
if cus... | explode_data.jsonl/26657 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 376
} | [
2830,
3393,
8078,
9230,
14247,
3050,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
41057,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
62077,
1669,
435,
15753,
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... | 5 |
func TestAssignFieldErrors(t *testing.T) {
t.Parallel()
tests := []struct {
name string
dest interface{}
src interface{}
err btcjson.Error
}{
{
name: "general incompatible int -> string",
dest: string(rune(0)),
src: int(0),
err: btcjson.Error{ErrorCode: btcjson.ErrInvalidType},
},
{
... | explode_data.jsonl/5031 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1790
} | [
2830,
3393,
28933,
1877,
13877,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
49616,
3749,
16094,
197,
41144,
220,
3749,
16094,
197,
9859,
220,
86037,
2236,
6141,
198,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestWordCountAndSimilarVsSummary(t *testing.T) {
t.Parallel()
assert := require.New(t)
single := []string{"_default/single.html", `
WordCount: {{ .WordCount }}
FuzzyWordCount: {{ .FuzzyWordCount }}
ReadingTime: {{ .ReadingTime }}
Len Plain: {{ len .Plain }}
Len PlainWords: {{ len .PlainWords }}
Truncated: {{ ... | explode_data.jsonl/60638 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1020
} | [
2830,
3393,
10879,
2507,
3036,
34402,
51737,
19237,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
741,
6948,
1669,
1373,
7121,
1155,
692,
1903,
2173,
1669,
3056,
917,
4913,
62,
2258,
96562,
2564,
497,
22074,
10879,
2507,
25,
5867,
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 TestTLSCodec_9(t *testing.T) {
t.Parallel()
l, p, _ := RandomListen("")
l0 := NewEventListener(l)
l0.AddCodecFactory(func(ctx Context) Codec {
c0 := NewTLSServerCodec()
c0.AddCertificate(testCert, testKEY)
c0.AddClientCa([]byte("aaa"))
return c0
})
var hasErr error
l0.OnAccept(func(ctx Context, c ne... | explode_data.jsonl/34697 | {
"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,
45439,
36913,
62,
24,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
8810,
11,
281,
11,
716,
1669,
10612,
38714,
31764,
8810,
15,
1669,
1532,
7765,
2333,
340,
8810,
15,
1904,
36913,
4153,
18552,
7502,
9608,
8,
67077... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSprintfln(t *testing.T) {
for _, randomString := range internal.RandomStrings {
testza.AssertEqual(t, randomString+"\n", pterm.Sprintfln(randomString))
}
testza.AssertEqual(t, "Hello, World!\n", pterm.Sprintfln("Hello, %s!", "World"))
} | explode_data.jsonl/49130 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 101
} | [
2830,
3393,
50,
1350,
1489,
77,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
4194,
703,
1669,
2088,
5306,
26709,
20859,
341,
197,
18185,
4360,
11711,
2993,
1155,
11,
4194,
703,
36269,
77,
497,
281,
4991,
808,
1350,
1489,
77,
25110,
703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestArtifact_GetArchive(t *testing.T) {
assert.NotNil(t, (&Artifact{}).GetArchive())
assert.Equal(t, &ArchiveStrategy{None: &NoneStrategy{}}, (&Artifact{Archive: &ArchiveStrategy{None: &NoneStrategy{}}}).GetArchive())
} | explode_data.jsonl/26034 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
85578,
13614,
42502,
1155,
353,
8840,
836,
8,
341,
6948,
93882,
1155,
11,
15899,
85578,
6257,
568,
1949,
42502,
2398,
6948,
12808,
1155,
11,
609,
42502,
19816,
90,
4064,
25,
609,
4064,
19816,
6257,
2137,
15899,
85578,
90,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestJobsSort(t *testing.T) {
assert := assert.New(t)
jobs := Jobs{
{Name: "aaa"},
{Name: "bbb"},
}
sort.Sort(jobs)
assert.Equal(jobs[0].Name, "aaa")
assert.Equal(jobs[1].Name, "bbb")
jobs = Jobs{
{Name: "ddd"},
{Name: "ccc"},
}
sort.Sort(jobs)
assert.Equal(jobs[0].Name, "ccc")
assert.Equal(job... | explode_data.jsonl/80862 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
40667,
10231,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
12428,
5481,
1669,
23076,
515,
197,
197,
63121,
25,
330,
32646,
7115,
197,
197,
63121,
25,
330,
53151,
7115,
197,
532,
39487,
35976,
3325,
5481,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGitCommandDiscardAnyUnstagedFileChanges(t *testing.T) {
type scenario struct {
testName string
command func(string, ...string) *exec.Cmd
test func(error)
}
scenarios := []scenario{
{
"valid case",
test.CreateMockCommand(t, []*test.CommandSwapper{
{
Expect: `git checkout -- .`,
... | explode_data.jsonl/6324 | {
"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,
46562,
4062,
23477,
567,
8610,
1806,
267,
3279,
1703,
11317,
1155,
353,
8840,
836,
8,
341,
13158,
15048,
2036,
341,
197,
18185,
675,
914,
198,
197,
45566,
220,
2915,
3609,
11,
2503,
917,
8,
353,
11748,
64512,
198,
197,
181... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStrArray_Clone(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []string{"0", "1", "2", "3", "4", "5", "6"}
array1 := garray.NewStrArrayFrom(a1)
array2 := array1.Clone()
t.Assert(array2, array1)
t.Assert(array2.Len(), 7)
})
} | explode_data.jsonl/53107 | {
"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,
2580,
1857,
85110,
603,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11323,
16,
1669,
3056,
917,
4913,
15,
497,
330,
16,
497,
330,
17,
497,
330,
18,
497,
330,
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 TestTiDBDecodePlanFunc(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustQuery("select tidb_decode_plan('')").Check(testkit.Rows(""))
tk.MustQuery("select tidb_decode_plan('7APIMAk1XzEzCTAJMQlmdW5jczpjb3VudCgxKQoxCTE3XzE0CTAJMAlpbm5lciBqb2luLCB... | explode_data.jsonl/65464 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2268
} | [
2830,
3393,
45351,
3506,
32564,
20485,
9626,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCalculateNextReconcileTimeNoInterval(t *testing.T) {
now := metav1.Now()
count := intstr.FromInt(1)
run := &v1alpha1.AnalysisRun{
Spec: v1alpha1.AnalysisRunSpec{
Metrics: []v1alpha1.Metric{{
Name: "success-rate",
Count: &count,
}},
},
Status: v1alpha1.AnalysisRunStatus{
Phase: v1alph... | explode_data.jsonl/75824 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 328
} | [
2830,
3393,
47866,
5847,
693,
40446,
457,
1462,
2753,
10256,
1155,
353,
8840,
836,
8,
341,
80922,
1669,
77520,
16,
13244,
741,
18032,
1669,
526,
495,
11439,
1072,
7,
16,
340,
56742,
1669,
609,
85,
16,
7141,
16,
8624,
9092,
6727,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGenManSeeAlso(t *testing.T) {
rootCmd := &cobra.Command{Use: "root", Run: emptyRun}
aCmd := &cobra.Command{Use: "aaa", Run: emptyRun, Hidden: true} // #229
bCmd := &cobra.Command{Use: "bbb", Run: emptyRun}
cCmd := &cobra.Command{Use: "ccc", Run: emptyRun}
rootCmd.AddCommand(aCmd, bCmd, cCmd)
buf := new(... | explode_data.jsonl/21958 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 362
} | [
2830,
3393,
9967,
1658,
9830,
13394,
1155,
353,
8840,
836,
8,
341,
33698,
15613,
1669,
609,
59410,
12714,
90,
10253,
25,
330,
2888,
497,
6452,
25,
4287,
6727,
532,
11323,
15613,
1669,
609,
59410,
12714,
90,
10253,
25,
330,
32646,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestJob(t *testing.T) {
eng := newTestEngine(t)
job1 := eng.Job("dummy1", "--level=awesome")
if job1.handler != nil {
t.Fatalf("job1.handler should be empty")
}
h := func(j *Job) Status {
j.Printf("%s\n", j.Name)
return 42
}
eng.Register("dummy2", h)
job2 := eng.Job("dummy2", "--level=awesome")
... | explode_data.jsonl/45349 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 206
} | [
2830,
3393,
12245,
1155,
353,
8840,
836,
8,
341,
197,
826,
1669,
501,
2271,
4571,
1155,
340,
68577,
16,
1669,
2922,
45293,
445,
31390,
16,
497,
14482,
3294,
28,
16875,
5130,
743,
2618,
16,
31171,
961,
2092,
341,
197,
3244,
30762,
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 TestDomain_Transfer(t *testing.T) {
// defines test prereqs
init := func() (k keeper.Keeper, ctx sdk.Context, ex *Domain) {
k, ctx, _ = keeper.NewTestKeeper(t, false)
domain := types.Domain{
Name: "test",
Admin: keeper.BobKey,
ValidUntil: 1,
Type: types.OpenDomain,
Broker: ... | explode_data.jsonl/16619 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1387
} | [
2830,
3393,
13636,
34932,
802,
1155,
353,
8840,
836,
8,
341,
197,
322,
18653,
1273,
43901,
26358,
198,
28248,
1669,
2915,
368,
320,
74,
53416,
11352,
43031,
11,
5635,
45402,
9328,
11,
505,
353,
13636,
8,
341,
197,
16463,
11,
5635,
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 TestJob_Split(t *testing.T) {
type args struct {
ctx context.Context
number int
}
tests := []struct {
name string
jobConf *config.JSON
args args
wantConfigs []*config.JSON
wantErr bool
}{
{
name: "1",
jobConf: testJSONFromString(`{"path":["file1"],"column":[],"... | explode_data.jsonl/73235 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 532
} | [
2830,
3393,
12245,
1098,
2292,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
20985,
262,
2266,
9328,
198,
197,
57135,
526,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
68577,
15578,
257,
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... | 4 |
func TestValidateCognitoIdentityProvidersClientId(t *testing.T) {
validValues := []string{
"7lhlkkfbfb4q5kpp90urffao",
"12345678",
"foo_123",
strings.Repeat("W", 128),
}
for _, s := range validValues {
_, errors := validateCognitoIdentityProvidersClientId(s, "client_id")
if len(errors) > 0 {
t.Fatalf... | explode_data.jsonl/78624 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 304
} | [
2830,
3393,
17926,
34,
63441,
18558,
37351,
94116,
1155,
353,
8840,
836,
8,
341,
56322,
6227,
1669,
3056,
917,
515,
197,
197,
1,
22,
75,
17958,
19196,
10798,
10798,
19,
80,
20,
74,
602,
24,
15,
324,
542,
3441,
756,
197,
197,
1,
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... | 5 |
func TestGroupStatsAlignment(t *testing.T) {
var g Group
off := unsafe.Offsetof(g.Stats)
if off%8 != 0 {
t.Fatal("Stats structure is not 8-byte aligned.")
}
} | explode_data.jsonl/62851 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
2808,
16635,
7033,
1155,
353,
8840,
836,
8,
341,
2405,
342,
5737,
198,
197,
1847,
1669,
19860,
61958,
1055,
3268,
7758,
1862,
340,
743,
1007,
4,
23,
961,
220,
15,
341,
197,
3244,
26133,
445,
16635,
5944,
374,
537,
220,
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
] | 2 |
func TestPluginReconfigure(t *testing.T) {
ctx := context.Background()
fixture := newTestFixture(t)
defer fixture.server.stop()
if err := fixture.plugin.Start(ctx); err != nil {
t.Fatal(err)
}
minDelay := 2
maxDelay := 3
pluginConfig := []byte(fmt.Sprintf(`{
"service": "example",
"reporting": {
... | explode_data.jsonl/2175 | {
"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,
11546,
693,
21002,
1155,
353,
8840,
836,
8,
1476,
20985,
1669,
2266,
19047,
741,
1166,
12735,
1669,
501,
69356,
1155,
340,
16867,
12507,
12638,
13227,
2822,
743,
1848,
1669,
12507,
26969,
12101,
7502,
1215,
1848,
961,
2092,
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... | 4 |
func TestCandidateVoteFail(t *testing.T) {
ctx := startup_candidate_test(t)
defer teardown_candidate_test(t, ctx)
for _, o := range ctx.svr.cluster_info {
oo, _ := o.client.(*MockClient)
oo.ReplaceVoteFunctor(func(ctx context.Context, req *pb.RequestVoteReq) (*pb.RequestVoteRes, error) {
rsp := new(pb.Request... | explode_data.jsonl/59087 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
63901,
41412,
19524,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
20567,
62360,
4452,
1155,
340,
16867,
49304,
62360,
4452,
1155,
11,
5635,
340,
2023,
8358,
297,
1669,
2088,
5635,
514,
18920,
40501,
3109,
341,
197,
197,
2624,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExistConfig(t *testing.T) {
tests := []struct {
name string
setupFunc func(t *testing.T) func(t *testing.T)
want bool
}{
{"True", setupTestExistConfig, true},
{"False", setupTestExistConfigFail, false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt := tt
de... | explode_data.jsonl/17824 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 220
} | [
2830,
3393,
25613,
2648,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
84571,
9626,
2915,
1155,
353,
8840,
836,
8,
2915,
1155,
353,
8840,
836,
340,
197,
50780,
414,
1807,
198,
197,
59403,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPubKeys(t *testing.T) {
for _, test := range pubKeyTests {
pk, err := ParsePubKey(test.key, S256())
if err != nil {
if test.isValid {
t.Errorf("%s pubkey failed when shouldn't %v",
test.name, err)
}
continue
}
if !test.isValid {
t.Errorf("%s counted as valid when it should fail",
... | explode_data.jsonl/71131 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 353
} | [
2830,
3393,
29162,
8850,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
6675,
1592,
18200,
341,
197,
3223,
74,
11,
1848,
1669,
14775,
29162,
1592,
8623,
4735,
11,
328,
17,
20,
21,
2398,
197,
743,
1848,
961,
2092,
341,
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... | 9 |
func Test_Get_Succ(t *testing.T) {
cache := mem.NewRotateCache(time.Second, func(key string) (string, error) {
return time.Now().Format(time.StampMilli), nil
})
v1, _ := cache.Get("now")
time.Sleep(600 * time.Millisecond)
v2, _ := cache.Get("now")
time.Sleep(600 * time.Millisecond)
v3, _ := cache.Get("now")
... | explode_data.jsonl/46753 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 167
} | [
2830,
3393,
13614,
1098,
14570,
1155,
353,
8840,
836,
8,
341,
52680,
1669,
1833,
7121,
34540,
8233,
9730,
32435,
11,
2915,
4857,
914,
8,
320,
917,
11,
1465,
8,
341,
197,
853,
882,
13244,
1005,
4061,
9730,
7758,
1121,
12328,
72,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestList_IteratorAsc(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
l := New()
a1 := []interface{}{1, 2, 5, 6, 3, 4}
l.PushFronts(a1)
e1 := l.Back()
fun1 := func(e *Element) bool {
if gconv.Int(e1.Value) > 2 {
return true
}
return false
}
checkList(t, l, []interface{}{4, 3, 6, 5, 2, 1})
... | explode_data.jsonl/30912 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
852,
7959,
465,
850,
40103,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
8810,
1669,
1532,
741,
197,
11323,
16,
1669,
3056,
4970,
6257,
90,
16,
11,
220,
17,
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... | 2 |
func TestAddSummaryEmpty(t *testing.T) {
t.Parallel()
// arrange
p := podcast.New("title", "desc", "Link", nil, nil)
// act
p.AddSummary("")
// assert
assert.Nil(t, p.ISummary)
} | explode_data.jsonl/73088 | {
"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,
2212,
19237,
3522,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
30893,
198,
3223,
1669,
17711,
7121,
445,
2102,
497,
330,
8614,
497,
330,
3939,
497,
2092,
11,
2092,
692,
197,
322,
1160,
198,
3223,
1904,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestCommitsOnBranch(t *testing.T) {
repo := setupRepo()
createTestHistory(repo)
head, _ := repo.Head()
testGit := &Git{repo: repo}
commits, err := testGit.CommitsOnBranch(head.Hash())
assert.Equal(t, 4, len(commits))
commit, commitErr := repo.CommitObject(commits[0])
assert.NoError(t, commitErr)
ass... | explode_data.jsonl/73761 | {
"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,
17977,
1199,
1925,
18197,
1155,
353,
8840,
836,
8,
341,
17200,
5368,
1669,
6505,
25243,
741,
39263,
2271,
13424,
50608,
692,
46081,
11,
716,
1669,
15867,
90478,
2822,
18185,
46562,
1669,
609,
46562,
90,
23476,
25,
15867,
630,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIsValidDomain(t *testing.T) {
testCases := []struct {
// Input.
host string
// Expected result.
result bool
}{
{"s3.amazonaws.com", true},
{"s3.cn-north-1.amazonaws.com.cn", true},
{"s3.amazonaws.com_", false},
{"%$$$", false},
{"s3.amz.test.com", true},
{"s3.%%", false},
{"localhost", ... | explode_data.jsonl/20466 | {
"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,
55470,
13636,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
197,
322,
5571,
624,
197,
63104,
914,
198,
197,
197,
322,
31021,
1102,
624,
197,
9559,
1807,
198,
197,
59403,
197,
197,
4913,
82,
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 TestLoggingSetup(t *testing.T) {
origLogLevel, exists := os.LookupEnv("JX_LOG_LEVEL")
if exists {
defer func() {
_ = os.Setenv("JX_LOG_LEVEL", origLogLevel)
}()
}
var logTests = []struct {
envLogLevel string
verbose bool
expectedOutput string
}{
{"trace", false, "TRACE: trace\nDEBUG:... | explode_data.jsonl/60769 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 997
} | [
2830,
3393,
34575,
21821,
1155,
353,
8840,
836,
8,
341,
197,
4670,
72676,
11,
6724,
1669,
2643,
79261,
14359,
445,
41,
55,
8419,
17415,
1138,
743,
6724,
341,
197,
16867,
2915,
368,
341,
298,
197,
62,
284,
2643,
4202,
3160,
445,
41,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetIQN(t *testing.T) {
tests := map[string]struct {
expectedOutput string
Volume VolumeInfo
}{
"Fetching IQN": {
Volume: VolumeInfo{
Volume: v1alpha1.CASVolume{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{},
},
Spec: v1alpha1.CASVolumeSpec{
Iq... | explode_data.jsonl/78048 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 792
} | [
2830,
3393,
1949,
61950,
45,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
42400,
5097,
914,
198,
197,
17446,
4661,
260,
20265,
1731,
198,
197,
59403,
197,
197,
1,
52416,
36711,
45,
788,
341,
298,
17446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDescribeTopic(t *testing.T) {
seedBroker := NewMockBroker(t, 1)
defer seedBroker.Close()
seedBroker.SetHandlerByMap(map[string]MockResponse{
"MetadataRequest": NewMockMetadataResponse(t).
SetController(seedBroker.BrokerID()).
SetLeader("my_topic", 0, seedBroker.BrokerID()).
SetBroker(seedBroker.... | explode_data.jsonl/40802 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 353
} | [
2830,
3393,
74785,
26406,
1155,
353,
8840,
836,
8,
341,
197,
22602,
65545,
1669,
1532,
11571,
65545,
1155,
11,
220,
16,
340,
16867,
10320,
65545,
10421,
2822,
197,
22602,
65545,
4202,
3050,
1359,
2227,
9147,
14032,
60,
11571,
2582,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestSortByName(t *testing.T) {
SortByName(releases)
check(t, "ByName", func(i, j int) bool {
ni := releases[i].Name
nj := releases[j].Name
return ni < nj
})
} | explode_data.jsonl/4969 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
10231,
16898,
1155,
353,
8840,
836,
8,
341,
7568,
371,
16898,
5801,
28299,
692,
25157,
1155,
11,
330,
16898,
497,
2915,
1956,
11,
502,
526,
8,
1807,
341,
197,
197,
7751,
1669,
19232,
989,
936,
675,
198,
197,
9038,
73,
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 |
func TestString_ToInt8(t *testing.T) {
tests := []struct {
name string
e String
want Int8
}{
{name: "", e: String{"123"}, want: Int8{123}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.e.ToInt8(); !got.Equal(tt.want) {
t.Errorf("String.ToInt8() = %v, want %v", go... | explode_data.jsonl/34777 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 172
} | [
2830,
3393,
703,
38346,
1072,
23,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
7727,
262,
923,
198,
197,
50780,
1333,
23,
198,
197,
59403,
197,
197,
47006,
25,
7342,
384,
25,
923,
4913,
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 TestGetFiles(t *testing.T) {
dir, err := ioutil.TempDir("", t.Name())
if err != nil {
t.Fatal(err)
}
defer func() {
os.RemoveAll(dir)
os.Unsetenv("OKTETO_FOLDER")
}()
os.Setenv("OKTETO_FOLDER", dir)
log := GetLogFile("test", "application")
expected := filepath.Join(dir, "test", "application", "sync... | explode_data.jsonl/77145 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
1949,
10809,
1155,
353,
8840,
836,
8,
1476,
48532,
11,
1848,
1669,
43144,
65009,
6184,
19814,
259,
2967,
2398,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
2915,
368,
341,
197,
25078,
84427,
14161... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMinInt64(t *testing.T) {
h := new(MinInt64)
h.verify(t, 0)
for i := 20; i > 10; i-- {
h.push(int64(i))
}
h.Init()
h.verify(t, 0)
for i := 10; i > 0; i-- {
h.Push(int64(i))
h.verify(t, 0)
}
for i := 1; h.length() > 0; i++ {
x := h.Pop()
if i < 20 {
h.Push(int64(20 + i))
}
h.verify(t... | explode_data.jsonl/57432 | {
"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,
6217,
1072,
21,
19,
1155,
353,
8840,
836,
8,
341,
9598,
1669,
501,
3189,
258,
1072,
21,
19,
340,
9598,
27520,
1155,
11,
220,
15,
692,
2023,
600,
1669,
220,
17,
15,
26,
600,
861,
220,
16,
15,
26,
600,
313,
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... | 6 |
func TestDotImport(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
import {x} from '.'
console.log(x)
`,
"/index.js": `
exports.x = 123
`,
},
entryPaths: []string{"/entry.js"},
options: config.Options{
Mode: config.ModeBundle,... | explode_data.jsonl/38467 | {
"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,
34207,
11511,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
4085,
2857,
788,
22074,
571,
21918,
314,
87,
92,
504,
6256,
124... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDFS(t *testing.T) {
g4 := gs.FromJSON("../../files/testgraph.json", "testgraph.004")
_ = DFS(g4)
/*
g4c1 := "S β B β A β D β E β T β F β C"
g4c2 := "S β B β D β E β A β T β F β C"
g4c3 := "S β B β E β A β D β C β F β T"
if g4s != g4c1 && g4s != g4c2 && g4s != g4c3 {
t.Errorf("Should be same but\n... | explode_data.jsonl/51287 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 576
} | [
2830,
3393,
62266,
1155,
353,
8840,
836,
8,
341,
3174,
19,
1669,
28081,
11439,
5370,
36800,
7198,
12697,
4439,
4323,
497,
330,
1944,
4439,
13,
15,
15,
19,
1138,
197,
62,
284,
56383,
3268,
19,
340,
197,
3284,
197,
3174,
19,
66,
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... | 7 |
func TestCreateTenant(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
mockCreateTenantResponse(t)
opts := tenants.CreateOpts{
Name: "new_tenant",
Description: "This is new tenant",
Enabled: golangsdk.Enabled,
}
tenant, err := tenants.Create(client.ServiceClient(), opts).Extract()
th.A... | explode_data.jsonl/82167 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
4021,
71252,
1155,
353,
8840,
836,
8,
341,
70479,
39820,
9230,
741,
16867,
270,
94849,
37496,
9230,
2822,
77333,
4021,
71252,
2582,
1155,
692,
64734,
1669,
39916,
7251,
43451,
515,
197,
21297,
25,
286,
330,
931,
528,
25121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAzureBlobNoContainerFails(t *testing.T) {
g := gomega.NewGomegaWithT(t)
isvc := makeTestInferenceService()
isvc.Spec.Default.Predictor.Tensorflow.StorageURI = "https://foo.blob.core.windows.net/"
g.Expect(isvc.validate(c)).ShouldNot(gomega.Succeed())
} | explode_data.jsonl/1484 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
78107,
37985,
2753,
4502,
37,
6209,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
340,
19907,
7362,
1669,
1281,
2271,
641,
2202,
1860,
741,
19907,
7362,
36473,
13275,
1069,
8861,
269,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetWithEtag(t *testing.T) {
resetTest()
req, err := http.NewRequest("GET", s.server.URL+"/etag", nil)
if err != nil {
t.Fatal(err)
}
{
resp, err := s.client.Do(req)
if err != nil {
t.Fatal(err)
}
defer resp.Body.Close()
if resp.Header.Get(XFromCache) != "" {
t.Fatal("XFromCache header is... | explode_data.jsonl/77619 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 404
} | [
2830,
3393,
1949,
2354,
36,
4578,
1155,
353,
8840,
836,
8,
341,
70343,
2271,
741,
24395,
11,
1848,
1669,
1758,
75274,
445,
3806,
497,
274,
12638,
20893,
27569,
80465,
497,
2092,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestModel_Forward(t *testing.T) {
model := New()
g := ag.NewGraph()
ctx := nn.Context{Graph: g, Mode: nn.Training}
// == Forward
x1 := g.NewVariable(mat.NewVecDense([]mat.Float{1.0, 2.0, 0.0, 4.0}), true)
x2 := g.NewVariable(mat.NewVecDense([]mat.Float{3.0, 2.0, 1.0, 6.0}), true)
x3 := g.NewVariable(mat.Ne... | explode_data.jsonl/15146 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 716
} | [
2830,
3393,
1712,
84368,
1606,
1155,
353,
8840,
836,
8,
341,
19727,
1669,
1532,
741,
3174,
1669,
933,
7121,
11212,
741,
20985,
1669,
10883,
9328,
90,
11212,
25,
342,
11,
14562,
25,
10883,
8240,
2056,
630,
197,
322,
621,
22164,
198,
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... | 1 |
func TestBaseIdentity_ExhaustGettersSetters(t *testing.T) {
i := getTestBaseIdentity()
if i.IsExhausted() {
t.Error("IsExhausted should have returned false, but retunned true")
}
r := i.Exhaust()
if !i.IsExhausted() {
t.Error("Exhaust should have set exhausted to true, but it was false")
}
if !r {
t.Error... | explode_data.jsonl/55783 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
3978,
18558,
62531,
15074,
1949,
5045,
1649,
5045,
1155,
353,
8840,
836,
8,
341,
8230,
1669,
633,
2271,
3978,
18558,
741,
743,
600,
4506,
840,
15074,
291,
368,
341,
197,
3244,
6141,
445,
3872,
840,
15074,
291,
1265,
614,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.