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 TestNoAuth(t *testing.T) {
req := bytes.NewBuffer(nil)
req.Write([]byte{1, NoAuth})
var resp bytes.Buffer
s, _ := New(&Config{})
ctx, err := s.authenticate(&resp, req)
if err != nil {
t.Fatalf("err: %v", err)
}
if ctx.Method != NoAuth {
t.Fatal("Invalid Context Method")
}
out := resp.Bytes()
if !... | explode_data.jsonl/18558 | {
"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,
2753,
5087,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
5820,
7121,
4095,
27907,
340,
24395,
4073,
10556,
3782,
90,
16,
11,
2308,
5087,
3518,
2405,
9039,
5820,
22622,
271,
1903,
11,
716,
1669,
1532,
2099,
2648,
37790,
20985,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQueueHappy(t *testing.T) {
tf.UnitTest(t)
testQ := dispatcher.NewTargetQueue()
// Add syncRequests out of order
sR0 := dispatcher.Target{ChainInfo: *(chainInfoFromHeight(t, 0))}
sR1 := dispatcher.Target{ChainInfo: *(chainInfoFromHeight(t, 1))}
sR2 := dispatcher.Target{ChainInfo: *(chainInfoFromHeight(t,... | explode_data.jsonl/82040 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 366
} | [
2830,
3393,
7554,
32847,
1155,
353,
8840,
836,
8,
341,
3244,
69,
25159,
2271,
1155,
340,
18185,
48,
1669,
38799,
7121,
6397,
7554,
2822,
197,
322,
2691,
12811,
35295,
700,
315,
1973,
198,
1903,
49,
15,
1669,
38799,
35016,
90,
18837,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFilter_Out(t *testing.T) {
out := &TestPrinter{T: t}
filter := &Filter{Type: FilterOut}
filter.Chain(out)
DoFilterPrints(filter)
out.ExpectOrdered(
"<a> x",
"<a.b> x",
"<a.c> x",
"<a.b.c> x",
"<a.c.b> x",
"<b> x",
"<b.a> x",
"<b.c> x",
"<b.a.c> x",
"<b.c.a> x",
"<c> x",
"<c.a> x... | explode_data.jsonl/44646 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 616
} | [
2830,
3393,
5632,
36675,
1155,
353,
8840,
836,
8,
341,
13967,
1669,
609,
2271,
45660,
76025,
25,
259,
532,
50108,
1669,
609,
5632,
90,
929,
25,
12339,
2662,
532,
50108,
98269,
9828,
692,
197,
5404,
5632,
8994,
82,
19704,
340,
13967,
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 TestSeedPhrase(t *testing.T) {
// make the storage with reasonable defaults
cstore := NewInMemory()
algo := Secp256k1
n1, n2 := "lost-key", "found-again"
p1, p2 := nums, foobar
// make sure key works with initial password
info, mnemonic, err := cstore.CreateMnemonic(n1, English, p1, algo)
require.Nil(t,... | explode_data.jsonl/10674 | {
"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,
41471,
46806,
1155,
353,
8840,
836,
8,
1476,
197,
322,
1281,
279,
5819,
448,
13276,
16674,
198,
1444,
4314,
1669,
1532,
641,
10642,
2822,
69571,
3346,
1669,
4520,
79,
17,
20,
21,
74,
16,
198,
9038,
16,
11,
308,
17,
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 TestDirect_DoubleStop(t *testing.T) {
g := NewGomegaWithT(t)
xform, src, acc := setup(g)
xform.Start()
src.Handlers.Handle(event.FullSyncFor(basicmeta.K8SCollection1))
src.Handlers.Handle(event.AddFor(basicmeta.K8SCollection1, data.EntryN1I1V1))
fixtures.ExpectEventsEventually(t, acc,
event.FullSyncFor... | explode_data.jsonl/37561 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
16027,
84390,
10674,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
692,
10225,
627,
11,
2286,
11,
1029,
1669,
6505,
3268,
692,
10225,
627,
12101,
2822,
41144,
35308,
9254,
31421,
6235,
32038,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_yamlConfigAnalyzer_Required(t *testing.T) {
tests := []struct {
name string
filePattern *regexp.Regexp
filePath string
want bool
}{
{
name: "yaml",
filePath: "deployment.yaml",
want: true,
},
{
name: "yml",
filePath: "deployment.yml",
want: tr... | explode_data.jsonl/63941 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 390
} | [
2830,
3393,
64380,
2648,
54911,
62,
8164,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
17661,
15760,
353,
55796,
8989,
4580,
198,
197,
17661,
1820,
262,
914,
198,
197,
50780,
286,
1807,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEtcdListEndpoints(t *testing.T) {
ctx := api.NewDefaultContext()
fakeClient := tools.NewFakeEtcdClient(t)
key := makeServiceEndpointsListKey(ctx)
fakeClient.Data[key] = tools.EtcdResponseWithError{
R: &etcd.Response{
Node: &etcd.Node{
Nodes: []*etcd.Node{
{
Value: runtime.EncodeOrDie(la... | explode_data.jsonl/8172 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 384
} | [
2830,
3393,
31860,
4385,
852,
80786,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6330,
7121,
3675,
1972,
741,
1166,
726,
2959,
1669,
7375,
7121,
52317,
31860,
4385,
2959,
1155,
340,
23634,
1669,
1281,
1860,
80786,
852,
1592,
7502,
340,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestSendOnResetConnection(t *testing.T) {
c := context.New(t, defaultMTU)
defer c.Cleanup()
c.CreateConnected(789, 30000, nil)
// Send RST segment.
c.SendPacket(nil, &context.Headers{
SrcPort: context.TestPort,
DstPort: c.Port,
Flags: header.TCPFlagRst,
SeqNum: 790,
RcvWnd: 30000,
})
// Wai... | explode_data.jsonl/22308 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 268
} | [
2830,
3393,
11505,
1925,
14828,
4526,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2266,
7121,
1155,
11,
1638,
8505,
52,
340,
16867,
272,
727,
60639,
2822,
1444,
7251,
21146,
7,
22,
23,
24,
11,
220,
18,
15,
15,
15,
15,
11,
2092,
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 TestCheckAuthorization_NoPolicyDefined(t *testing.T) {
auth := setupAuthorizationTest(t)
auth.cfg.Resources[auth.resource].Views[auth.view].Roles[auth.role].Policies = nil
id, err := auth.dam.populateIdentityVisas(auth.ctx, auth.id, auth.cfg)
if err != nil {
t.Fatalf("unable to obtain passport identity: %v"... | explode_data.jsonl/18488 | {
"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,
3973,
18124,
36989,
13825,
29361,
1155,
353,
8840,
836,
8,
341,
78011,
1669,
6505,
18124,
2271,
1155,
340,
78011,
30481,
21703,
58,
3242,
24013,
936,
23217,
58,
3242,
3792,
936,
25116,
58,
3242,
26006,
936,
47,
42038,
284,
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 TestGetProviderByName(t *testing.T) {
tests := []struct {
name string
input string
expected string
}{
{
"should return ATS provider",
ATS,
ATS,
},
{
"should return Istio provider",
Istio,
Istio,
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
... | explode_data.jsonl/15641 | {
"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,
1949,
5179,
16898,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
22427,
262,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
515,
298,
197,
1,
5445,
470,
95375,
9109,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_Transaction(t *testing.T) {
var db = DB()
// 一键事务, 自动回滚和提交, 我们只需要关注业务即可
err := db.Transaction(
func(db IOrm) error {
//db.Table("users").Limit(2).SharedLock().Get()
//fmt.Println(db.LastSql())
_, err := db.Table("users").Where("uid", 2).Update(Data{"name": "gorose2"})
fmt.Println(db.LastSql()... | explode_data.jsonl/60041 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 476
} | [
2830,
3393,
34932,
1311,
1155,
353,
8840,
836,
8,
341,
2405,
2927,
284,
5952,
741,
197,
322,
220,
111471,
101436,
11,
61991,
27733,
18397,
100301,
33108,
71971,
11,
49434,
239,
79478,
107525,
100020,
103923,
104180,
198,
9859,
1669,
2927,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRestrictPrefix(t *testing.T) {
handler := http.StripPrefix("/static/",
RestrictPrefix(".", http.FileServer(http.Dir("../files/"))),
)
testCases := []struct {
path string
code int
}{
{"http://test/static/sage.svg", http.StatusOK},
{"http://test/static/.secret", http.StatusNotFound},
{"http://te... | explode_data.jsonl/48736 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 258
} | [
2830,
3393,
50360,
849,
14335,
1155,
353,
8840,
836,
8,
341,
53326,
1669,
1758,
27318,
573,
14335,
4283,
1978,
35075,
197,
11143,
15111,
849,
14335,
64217,
1758,
8576,
5475,
19886,
83757,
17409,
7198,
14,
2761,
1326,
197,
692,
18185,
3730... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAdmin_DeleteUser(t *testing.T) {
srv, ts := prep(t)
assert.NotNil(t, srv)
defer cleanup(ts)
c1 := store.Comment{Text: "test test #1", Orig: "o test test #1", User: store.User{ID: "id1", Name: "name"},
Locator: store.Locator{SiteID: "radio-t", URL: "https://radio-t.com/blah"}}
c2 := store.Comment{Text: ... | explode_data.jsonl/70317 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 983
} | [
2830,
3393,
7210,
57418,
1474,
1155,
353,
8840,
836,
8,
341,
1903,
10553,
11,
10591,
1669,
21327,
1155,
340,
6948,
93882,
1155,
11,
43578,
340,
16867,
21290,
35864,
692,
1444,
16,
1669,
3553,
56730,
90,
1178,
25,
330,
1944,
1273,
671,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogsPathMatcher_InvalidSource4(t *testing.T) {
cfgLogsPath := "/var/lib/kubelet/pods/"
cfgResourceType := "pod"
source := fmt.Sprintf("/invalid/dir/%s/volumes/kubernetes.io~empty-dir/applogs/server.log", puid)
expectedResult := ""
executeTestWithResourceType(t, cfgLogsPath, cfgResourceType, source, expect... | explode_data.jsonl/34421 | {
"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,
51053,
1820,
37554,
62,
7928,
3608,
19,
1155,
353,
8840,
836,
8,
341,
50286,
51053,
1820,
1669,
3521,
947,
8194,
14109,
3760,
1149,
4322,
29697,
29555,
50286,
4783,
929,
1669,
330,
39073,
698,
47418,
1669,
8879,
17305,
4283,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreExists(t *testing.T) {
testWithPostgresStoreV2(t, func(s storev2.Interface) {
fixture := corev3.FixtureEntityState("foo")
ctx := context.Background()
req := storev2.NewResourceRequestFromResource(ctx, fixture)
req.UsePostgres = true
// Exists should return false
got, err := s.Exists(req)
if... | explode_data.jsonl/73385 | {
"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,
6093,
15575,
1155,
353,
8840,
836,
8,
341,
18185,
2354,
4133,
17818,
6093,
53,
17,
1155,
11,
2915,
1141,
3553,
85,
17,
41065,
8,
341,
197,
1166,
12735,
1669,
6200,
85,
18,
991,
12735,
3030,
1397,
445,
7975,
1138,
197,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestJolokia2_ObjectValues(t *testing.T) {
config := `
[jolokia2_agent]
urls = ["%s"]
[[jolokia2_agent.metric]]
name = "object_without_attribute"
mbean = "object_without_attribute"
tag_keys = ["foo"]
[[jolokia2_agent.metric]]
name = "object_with_attribute"
mbean = "object_with_attribute"
... | explode_data.jsonl/5354 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2092
} | [
2830,
3393,
41,
337,
27552,
17,
27839,
6227,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
22074,
197,
3809,
337,
27552,
17,
25730,
921,
197,
19320,
82,
284,
4383,
4,
82,
25912,
197,
15505,
73,
337,
27552,
17,
25730,
85816,
14288,
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 TestNewMOfNRedeemScript(t *testing.T) {
testPublicKeyStrings := []string{
"0446f1c8de232a065da428bf76e44b41f59a46620dec0aedfc9b5ab651e91f2051d610fddc78b8eba38a634bfe9a74bb015a88c52b9b844c74997035e08a695ce9",
"04704e19d4fc234a42d707d41053c87011f990b564949532d72cab009e136bd60d7d0602f925fce79da77c0dfef4a49c6f44b... | explode_data.jsonl/67115 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 725
} | [
2830,
3393,
3564,
44,
2124,
45,
6033,
68,
336,
5910,
1155,
353,
8840,
836,
8,
341,
18185,
61822,
20859,
1669,
3056,
917,
515,
197,
197,
1,
15,
19,
19,
21,
69,
16,
66,
23,
450,
17,
18,
17,
64,
15,
21,
20,
3235,
19,
17,
23,
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... | 4 |
func TestGetDimensionsAndOptionsReturnsInternalError(t *testing.T) {
t.Parallel()
Convey("Given an internal error is returned from mongo, then response returns an internal error", t, func() {
r, err := createRequestWithToken("GET", "http://localhost:21800/instances/123/dimensions", nil)
So(err, ShouldBeNil)
w ... | explode_data.jsonl/20842 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 735
} | [
2830,
3393,
1949,
21351,
3036,
3798,
16446,
11569,
1454,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
93070,
5617,
445,
22043,
458,
5306,
1465,
374,
5927,
504,
33814,
11,
1221,
2033,
4675,
458,
5306,
1465,
497,
259,
11,
2915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_newBitString(t *testing.T) {
bs1 := e2sm_kpm_ies.BitString{
Value: 0x9ABCD4,
Len: 22,
}
xer1, err := xerEncodeBitString(&bs1)
assert.NilError(t, err)
//t.Logf("XER Bit String \n%s", xer1)
per1, err := perEncodeBitString(&bs1)
assert.NilError(t, err)
//t.Logf("PER Bit String \n%v", per1)
cBit... | explode_data.jsonl/66717 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 456
} | [
2830,
3393,
5921,
8344,
703,
1155,
353,
8840,
836,
8,
341,
93801,
16,
1669,
384,
17,
3563,
4698,
5187,
62,
550,
68866,
703,
515,
197,
47399,
25,
220,
15,
87,
24,
1867,
6484,
19,
345,
197,
197,
11271,
25,
256,
220,
17,
17,
345,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDefault(t *testing.T) {
for i, this := range []struct {
input interface{}
tpl string
expected string
ok bool
}{
{map[string]string{"foo": "bar"}, `{{ index . "foo" | default "nope" }}`, `bar`, true},
{map[string]string{"foo": "pop"}, `{{ index . "bar" | default "nada" }}`, `nada`, t... | explode_data.jsonl/9247 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 450
} | [
2830,
3393,
3675,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
419,
1669,
2088,
3056,
1235,
341,
197,
22427,
262,
3749,
16094,
197,
3244,
500,
414,
914,
198,
197,
42400,
914,
198,
197,
59268,
981,
1807,
198,
197,
59403,
197,
197,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func Test_BatchKinds_Authorization(t *testing.T) {
type testCase struct {
methodName string
additionalArgs []interface{}
expectedVerb string
expectedResource string
}
tests := []testCase{
// testCase{
// methodName: "AddActions",
// additionalArgs: []interface{}{[]*models.Object{... | explode_data.jsonl/43858 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 819
} | [
2830,
3393,
1668,
754,
42,
8673,
1566,
1553,
2022,
1155,
353,
8840,
836,
8,
341,
13158,
54452,
2036,
341,
197,
42257,
675,
981,
914,
198,
197,
12718,
3005,
4117,
256,
3056,
4970,
16094,
197,
42400,
66946,
257,
914,
198,
197,
42400,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNamespaceAggregateTilesSkipIfNoShardsOwned(t *testing.T) {
ctrl := xtest.NewController(t)
defer ctrl.Finish()
ctx := context.NewBackground()
defer ctx.Close()
start := xtime.Now().Truncate(targetBlockSize)
opts, err := NewAggregateTilesOptions(
start, start.Add(targetBlockSize), time.Second, targetN... | explode_data.jsonl/35387 | {
"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,
22699,
64580,
58365,
35134,
2679,
2753,
2016,
2347,
57641,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
856,
1944,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
20985,
1669,
2266,
7121,
8706,
741,
16867,
5635,
10421,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTx_Commit_ErrTxNotWritable(t *testing.T) {
db := MustOpenDB()
defer db.MustClose()
tx, err := db.Begin(false)
if err != nil {
t.Fatal(err)
}
if err := tx.Commit(); err != bolt.ErrTxNotWritable {
t.Fatal(err)
}
// Close the view transaction
tx.Rollback()
} | explode_data.jsonl/1683 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
31584,
16946,
1763,
93623,
31584,
2623,
39623,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
15465,
5002,
3506,
741,
16867,
2927,
50463,
7925,
741,
46237,
11,
1848,
1669,
2927,
28467,
3576,
340,
743,
1848,
961,
2092,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestReceiveIgnoreMissingFalse(t *testing.T) {
p := New().(*processor)
ctx := testutils.NewProcessorContext()
p.Configure(
ctx,
map[string]interface{}{
"Compare_Field": "toto",
"Ignore_missing": false,
},
)
p.Receive(testutils.NewPacketOld("test", map[string]interface{}{"toto": "A"}))
assert.Equ... | explode_data.jsonl/74197 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 461
} | [
2830,
3393,
14742,
12497,
25080,
4049,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1532,
1005,
4071,
29474,
340,
20985,
1669,
1273,
6031,
7121,
22946,
1972,
741,
3223,
78281,
1006,
197,
20985,
345,
197,
19567,
14032,
31344,
67066,
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 |
func TestNilEventName(t *testing.T) {
stub := ChaincodeStub{}
if err := stub.SetEvent("", []byte("event payload")); err == nil {
t.Error("Event name can not be nil string.")
}
} | explode_data.jsonl/10293 | {
"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,
19064,
1556,
675,
1155,
353,
8840,
836,
8,
341,
18388,
392,
1669,
28525,
1851,
33838,
16094,
743,
1848,
1669,
13633,
4202,
1556,
19814,
3056,
3782,
445,
3087,
7729,
32596,
1848,
621,
2092,
341,
197,
3244,
6141,
445,
1556,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIterFn(t *testing.T) {
err := Newf("%v", "Turtles").WithContext(" all the way down.").WithTrace()
for i := 0; i < 1000; i++ {
err = Wrap(err).WithContext(" %d ", i)
}
et := err.(ErrMadNet)
fmt.Printf("%s\n", et)
} | explode_data.jsonl/54724 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
8537,
24911,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
1532,
69,
4430,
85,
497,
330,
51,
51114,
1827,
91101,
445,
678,
279,
1616,
1495,
98401,
2354,
6550,
741,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
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... | 2 |
func TestGetSRVService(t *testing.T) {
tests := []struct {
scheme string
serviceName string
expected string
}{
{
"https",
"",
"etcd-client-ssl",
},
{
"http",
"",
"etcd-client",
},
{
"https",
"foo",
"etcd-client-ssl-foo",
},
{
"http",
"bar",
"etcd-client-ba... | explode_data.jsonl/26138 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 279
} | [
2830,
3393,
1949,
14557,
53,
1860,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
1903,
8058,
414,
914,
198,
197,
52934,
675,
914,
271,
197,
42400,
914,
198,
197,
59403,
197,
197,
515,
298,
197,
57557,
756,
298,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestFailedUserRebaseRequestDueToValidations(t *testing.T) {
ctxOuter, cancel := testhelper.Context()
defer cancel()
server, serverSocketPath := runFullServer(t)
defer server.Stop()
client, conn := operations.NewOperationClient(t, serverSocketPath)
defer conn.Close()
testRepo, _, cleanup := testhelper.New... | explode_data.jsonl/65109 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1834
} | [
2830,
3393,
9408,
1474,
693,
3152,
1900,
33060,
1249,
4088,
804,
1155,
353,
8840,
836,
8,
341,
20985,
51322,
11,
9121,
1669,
1273,
18764,
9328,
741,
16867,
9121,
2822,
41057,
11,
3538,
10286,
1820,
1669,
1598,
9432,
5475,
1155,
340,
168... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMongo_Verified(t *testing.T) {
m, skip := prepMongo(t, true) // adds two comments
if skip {
return
}
assert.False(t, m.IsVerified("radio-t", "u1"), "nothing verified")
assert.NoError(t, m.SetVerified("radio-t", "u1", true))
assert.True(t, m.IsVerified("radio-t", "u1"), "u1 verified")
assert.False(t,... | explode_data.jsonl/54202 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 471
} | [
2830,
3393,
54998,
2334,
261,
1870,
1155,
353,
8840,
836,
8,
341,
2109,
11,
10706,
1669,
21327,
54998,
1155,
11,
830,
8,
442,
11367,
1378,
6042,
198,
743,
10706,
341,
197,
853,
198,
197,
532,
6948,
50757,
1155,
11,
296,
4506,
54558,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconcileServiceInstanceNonExistentClusterServicePlan(t *testing.T) {
_, fakeCatalogClient, fakeClusterServiceBrokerClient, testController, sharedInformers := newTestController(t, noFakeActions())
sharedInformers.ClusterServiceBrokers().Informer().GetStore().Add(getTestClusterServiceBroker())
sharedInforme... | explode_data.jsonl/58131 | {
"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,
693,
40446,
457,
1860,
2523,
8121,
840,
18128,
28678,
1860,
20485,
1155,
353,
8840,
836,
8,
341,
197,
6878,
12418,
41606,
2959,
11,
12418,
28678,
1860,
65545,
2959,
11,
1273,
2051,
11,
6094,
37891,
388,
1669,
501,
2271,
2051... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCPUProfile(t *testing.T) {
testCPUProfile(t, []string{"runtime/pprof.cpuHog1"}, func(dur time.Duration) {
cpuHogger(cpuHog1, dur)
})
} | explode_data.jsonl/13648 | {
"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,
31615,
8526,
1155,
353,
8840,
836,
8,
341,
18185,
31615,
8526,
1155,
11,
3056,
917,
4913,
22255,
87146,
299,
69,
42387,
39,
538,
16,
14345,
2915,
1500,
324,
882,
33795,
8,
341,
197,
80335,
39,
538,
1389,
48814,
39,
538,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFuncStateCheckpoint(t *testing.T) {
common.IsTesting = true
streamList := []string{"text"}
handleStream(false, streamList, t)
var tests = []ruleCheckpointTest{
{
ruleTest: ruleTest{
name: `TestFuncStateCheckpointRule1`,
sql: `SELECT accumulateWordCount(slogan, " ") as wc FROM text`,
r: []... | explode_data.jsonl/47455 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1327
} | [
2830,
3393,
9626,
1397,
92688,
1155,
353,
8840,
836,
8,
341,
83825,
4506,
16451,
284,
830,
198,
44440,
852,
1669,
3056,
917,
4913,
1318,
16707,
53822,
3027,
3576,
11,
4269,
852,
11,
259,
340,
2405,
7032,
284,
3056,
12937,
92688,
2271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRSAPSSVerify(t *testing.T) {
var err error
key, _ := ioutil.ReadFile("test/sample_key.pub")
var rsaPSSKey *rsa.PublicKey
if rsaPSSKey, err = jwt.ParseRSAPublicKeyFromPEM(key); err != nil {
t.Errorf("Unable to parse RSA public key: %v", err)
}
for _, data := range rsaPSSTestData {
parts := strings.S... | explode_data.jsonl/10572 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 277
} | [
2830,
3393,
11451,
2537,
1220,
32627,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
271,
23634,
11,
716,
1669,
43144,
78976,
445,
1944,
69851,
3097,
47773,
1138,
2405,
68570,
47,
1220,
1592,
353,
60869,
49139,
1592,
198,
743,
68570,
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... | 7 |
func TestExp(t *testing.T) {
tests := []struct{ base, exponent, result *big.Int }{
{base: big.NewInt(0), exponent: big.NewInt(0), result: big.NewInt(1)},
{base: big.NewInt(1), exponent: big.NewInt(0), result: big.NewInt(1)},
{base: big.NewInt(1), exponent: big.NewInt(1), result: big.NewInt(1)},
{base: big.NewI... | explode_data.jsonl/35400 | {
"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,
8033,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
90,
2331,
11,
27690,
11,
1102,
353,
16154,
7371,
335,
515,
197,
197,
90,
3152,
25,
2409,
7121,
1072,
7,
15,
701,
27690,
25,
2409,
7121,
1072,
7,
15,
701,
110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDependencyOutputOptimizationSkipInit(t *testing.T) {
expectOutputLogs := []string{
`Detected module .*nested-optimization/dep/terragrunt.hcl is already init-ed. Retrieving outputs directly from working directory. prefix=\[.*fixture-get-output/nested-optimization/dep\]`,
}
dependencyOutputOptimizationTest(... | explode_data.jsonl/10126 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 121
} | [
2830,
3393,
36387,
5097,
21367,
65964,
35134,
3803,
1155,
353,
8840,
836,
8,
341,
24952,
5097,
51053,
1669,
3056,
917,
515,
197,
197,
63,
17076,
1569,
4688,
47409,
59271,
12,
19133,
2022,
14,
14891,
14,
465,
4101,
81,
3850,
860,
564,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTokensApprovedSucceedWithRetries(t *testing.T) {
em, cancel := newTestEventManagerWithMetrics(t)
defer cancel()
mdi := em.database.(*databasemocks.Plugin)
mti := &tokenmocks.Plugin{}
approval := newApproval()
approval.TX = fftypes.TransactionRef{}
pool := &fftypes.TokenPool{
Namespace: "ns1",
}
m... | explode_data.jsonl/15916 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 553
} | [
2830,
3393,
29300,
59651,
50,
29264,
2354,
12020,
4019,
1155,
353,
8840,
836,
8,
341,
66204,
11,
9121,
1669,
501,
2271,
83694,
2354,
27328,
1155,
340,
16867,
9121,
2822,
2109,
8579,
1669,
976,
15062,
41399,
67,
2096,
300,
336,
25183,
64... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestFileHelper_IsPathString_01(t *testing.T) {
fh := FileHelper{}
pathFile := fh.AdjustPathSlash("..\\..\\..\\")
expectedPathStr := fh.AdjustPathSlash("..\\..\\..\\")
isPath, cannotDetermine, testPathStr, err := fh.IsPathString(pathFile)
if err != nil {
t.Errorf("Error returned from fh.IsPathStrin... | explode_data.jsonl/14506 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 342
} | [
2830,
3393,
1703,
5511,
31879,
1820,
703,
62,
15,
16,
1155,
353,
8840,
836,
8,
1476,
220,
36075,
1669,
2887,
5511,
16094,
220,
1815,
1703,
1669,
36075,
17865,
4250,
1820,
88004,
95032,
3422,
496,
3422,
496,
3422,
1138,
220,
3601,
1820,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestChunkedNoContent(t *testing.T) {
defer afterTest(t)
ts := httptest.NewServer(HandlerFunc(func(w ResponseWriter, r *Request) {
w.WriteHeader(StatusNoContent)
}))
defer ts.Close()
c := ts.Client()
for _, closeBody := range []bool{true, false} {
const n = 4
for i := 1; i <= n; i++ {
res, err := c.... | explode_data.jsonl/14101 | {
"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,
28304,
291,
2753,
2762,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
340,
57441,
1669,
54320,
70334,
7121,
5475,
7,
3050,
9626,
18552,
3622,
5949,
6492,
11,
435,
353,
1900,
8,
341,
197,
6692,
69794,
38866,
2753,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUserLoginMFAFlow(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
th.App.UpdateConfig(func(c *model.Config) {
*c.ServiceSettings.EnableMultifactorAuthentication = true
})
t.Run("WithoutMFA", func(t *testing.T) {
_, _, err := th.Client.Login(th.BasicUser.Email, th.BasicUser.Password)
... | explode_data.jsonl/47525 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 916
} | [
2830,
3393,
1474,
6231,
44,
3627,
18878,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
70479,
5105,
16689,
2648,
18552,
1337,
353,
2528,
10753,
8,
341,
197,
197,
39091,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRangeCoalesce(t *testing.T) {
for _, test := range []struct {
rs Ranges
i int
want Ranges
}{
{
rs: Ranges{},
want: Ranges{},
},
{
rs: Ranges{
{Pos: 1, Size: 1},
},
want: Ranges{
{Pos: 1, Size: 1},
},
i: 0,
},
{
rs: Ranges{
{Pos: 1, Size: 1},
{Pos... | explode_data.jsonl/2638 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 541
} | [
2830,
3393,
6046,
7339,
73250,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
3056,
1235,
341,
197,
41231,
256,
431,
5520,
198,
197,
8230,
262,
526,
198,
197,
50780,
431,
5520,
198,
197,
59403,
197,
197,
515,
298,
41231,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSumInt(t *testing.T) {
sum := SumInt(1, 2, 3, 4, 5)
if sum != 15 {
t.Errorf("Expected 15 got %d", sum)
}
} | explode_data.jsonl/75161 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 58
} | [
2830,
3393,
9190,
1072,
1155,
353,
8840,
836,
8,
341,
31479,
1669,
8116,
1072,
7,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
340,
743,
2629,
961,
220,
16,
20,
341,
197,
3244,
13080,
445,
18896,
220,
16,
20,
2684,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue28106(t *testing.T) {
testenv.NeedsGoPackages(t)
// In go1.10, go/packages loads all packages from source, not
// export data, but does not type check function bodies of
// imported packages. This test ensures that we do not attempt
// to run the SSA builder on functions without type information.
c... | explode_data.jsonl/14824 | {
"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,
42006,
17,
23,
16,
15,
21,
1155,
353,
8840,
836,
8,
341,
18185,
3160,
2067,
68,
6767,
10850,
69513,
1155,
692,
197,
322,
758,
728,
16,
13,
16,
15,
11,
728,
72919,
20907,
678,
14185,
504,
2530,
11,
537,
198,
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 TestValidateVirtualServerRouteHost(t *testing.T) {
virtualServerHost := "example.com"
validHost := "example.com"
allErrs := validateVirtualServerRouteHost(validHost, virtualServerHost, field.NewPath("host"))
if len(allErrs) > 0 {
t.Errorf("validateVirtualServerRouteHost() returned errors %v for valid input... | explode_data.jsonl/65856 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 184
} | [
2830,
3393,
17926,
33026,
5475,
4899,
9296,
1155,
353,
8840,
836,
8,
341,
9558,
5475,
9296,
1669,
330,
8687,
905,
1837,
56322,
9296,
1669,
330,
8687,
905,
1837,
50960,
7747,
82,
1669,
9593,
33026,
5475,
4899,
9296,
41529,
9296,
11,
4108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSet(t *testing.T) {
for _, a := range sumNN {
z := nat(nil).set(a.z)
if z.cmp(a.z) != 0 {
t.Errorf("got z = %v; want %v", z, a.z)
}
}
} | explode_data.jsonl/2181 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 86
} | [
2830,
3393,
1649,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
264,
1669,
2088,
2629,
9745,
341,
197,
20832,
1669,
17588,
27907,
568,
746,
2877,
3938,
340,
197,
743,
1147,
520,
1307,
2877,
3938,
8,
961,
220,
15,
341,
298,
3244,
13080,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStats(t *testing.T) {
t.Run("Test Stats with empty bitmap", func(t *testing.T) {
expectedStats := roaring.Statistics{}
rr := NewBitmap()
assert.EqualValues(t, expectedStats, rr.Stats())
})
t.Run("Test Stats with bitmap Container", func(t *testing.T) {
// Given a bitmap that should have a single bi... | explode_data.jsonl/20347 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 446
} | [
2830,
3393,
16635,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
2271,
29927,
448,
4287,
19746,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
42400,
16635,
1669,
92756,
53419,
5589,
16094,
197,
197,
634,
1669,
1532,
16773,
2822,
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 TestCephPoolName(t *testing.T) {
t.Run("spec not set", func(t *testing.T) {
p := cephv1.CephBlockPool{ObjectMeta: metav1.ObjectMeta{Name: "metapool"}}
name := getCephName(p)
assert.Equal(t, "metapool", name)
})
t.Run("same name already set", func(t *testing.T) {
p := cephv1.CephBlockPool{ObjectMeta: met... | explode_data.jsonl/62474 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 421
} | [
2830,
3393,
34,
23544,
10551,
675,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
9535,
537,
738,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3223,
1669,
272,
23544,
85,
16,
727,
23544,
4713,
10551,
90,
1190,
12175,
25,
77520,
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 TestClient_secureConfigAndReattach(t *testing.T) {
config := &ClientConfig{
SecureConfig: &SecureConfig{},
Reattach: &ReattachConfig{},
}
c := NewClient(config)
defer c.Kill()
_, err := c.Start()
if err != ErrSecureConfigAndReattach {
t.Fatalf("err should not be %s, got %s", ErrSecureConfigAndRea... | explode_data.jsonl/57854 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 127
} | [
2830,
3393,
2959,
73088,
2648,
3036,
693,
16330,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
609,
2959,
2648,
515,
197,
7568,
76108,
2648,
25,
609,
49813,
2648,
38837,
197,
197,
693,
16330,
25,
257,
609,
693,
16330,
2648,
38837,
197,
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... | 2 |
func TestBadStructs(t *testing.T) {
val := "i_am_not_a_struct"
wantErr := errNotStruct(val)
if _, gotErr := InsertStruct("t_test", val); !reflect.DeepEqual(gotErr, wantErr) {
t.Errorf("InsertStruct(%q) returns error %v, want %v", val, gotErr, wantErr)
}
if _, gotErr := InsertOrUpdateStruct("t_test", val); !refle... | explode_data.jsonl/50036 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 327
} | [
2830,
3393,
17082,
9422,
82,
1155,
353,
8840,
836,
8,
341,
19302,
1669,
330,
72,
22880,
7913,
4306,
15126,
698,
50780,
7747,
1669,
1848,
2623,
9422,
9098,
340,
743,
8358,
2684,
7747,
1669,
17101,
9422,
445,
83,
4452,
497,
1044,
1215,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDashboardID(t *testing.T) {
testData := []struct {
Input string
Error bool
Expected *DashboardId
}{
{
// empty
Input: "",
Error: true,
},
{
// missing SubscriptionId
Input: "/",
Error: true,
},
{
// missing value for SubscriptionId
Input: "/subscriptions/",
... | explode_data.jsonl/40731 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 951
} | [
2830,
3393,
26947,
915,
1155,
353,
8840,
836,
8,
341,
18185,
1043,
1669,
3056,
1235,
341,
197,
66588,
262,
914,
198,
197,
58421,
262,
1807,
198,
197,
197,
18896,
353,
26947,
764,
198,
197,
92,
4257,
197,
197,
515,
298,
197,
322,
428... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateV1Beta1ValidWithMinimalChart(t *testing.T) {
manifest := `---
apiVersion: manifests/v1beta1
metadata:
name: test-manifest
spec:
charts:
- name: chart1
namespace: default
version: 0.0.1
`
_, err := Validate(manifest)
if err != nil {
t.Errorf("Got unexpected error from manifest.T... | explode_data.jsonl/80472 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
17926,
53,
16,
64811,
16,
4088,
2354,
88328,
14488,
1155,
353,
8840,
836,
8,
341,
197,
42315,
1669,
1565,
10952,
2068,
5637,
25,
83232,
5457,
16,
19127,
16,
198,
17637,
510,
220,
829,
25,
1273,
20477,
6962,
198,
9535,
510,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestArray_Pad(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []interface{}{0}
array1 := garray.NewArrayFrom(a1)
t.Assert(array1.Pad(3, 1).Slice(), []interface{}{0, 1, 1})
t.Assert(array1.Pad(-4, 1).Slice(), []interface{}{1, 0, 1, 1})
t.Assert(array1.Pad(3, 1).Slice(), []interface{}{1, 0, 1, 1})
})... | explode_data.jsonl/13902 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
1857,
1088,
329,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11323,
16,
1669,
3056,
4970,
6257,
90,
15,
532,
197,
11923,
16,
1669,
342,
1653,
7121,
1857,
3830,
2877,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLastIndexRune(t *testing.T) {
cs := []struct {
w int
s string
b rune
}{
{3, "aabbcc", 'b'},
{9, "一一二二うう", '二'},
}
for i, c := range cs {
a := LastIndexRune(c.s, c.b)
if a != c.w {
t.Errorf("[%d] LastIndexRune(%q, %q) = %v, want %v", i, c.s, c.b, a, c.w)
}
}
} | explode_data.jsonl/80916 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 173
} | [
2830,
3393,
5842,
1552,
49,
2886,
1155,
353,
8840,
836,
8,
341,
71899,
1669,
3056,
1235,
341,
197,
6692,
526,
198,
197,
1903,
914,
198,
197,
2233,
63499,
198,
197,
59403,
197,
197,
90,
18,
11,
330,
64,
12523,
638,
497,
364,
65,
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 TestRootParseExecutable(t *testing.T) {
root := setupSchema(t)
for src, expect := range map[string]string{
"{ title }": `query {
title
}
`,
"\xef\xbb\xbf{ title }": `query {
title
}
`,
"query getTitle { title }": `query getTitle {
title
}
`,
"{ alien: title }": `query {
alien: title
}
`,
"{art... | explode_data.jsonl/48187 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 827
} | [
2830,
3393,
8439,
14463,
94772,
1155,
353,
8840,
836,
8,
341,
33698,
1669,
6505,
8632,
1155,
692,
2023,
2286,
11,
1720,
1669,
2088,
2415,
14032,
30953,
515,
197,
197,
14129,
2265,
335,
788,
1565,
1631,
341,
220,
2265,
198,
532,
12892,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateBuilderIncludeExplicitInfoIfEnabled(t *testing.T) {
var tests = map[string]struct {
IncludeInfo map[types.IncludeInfoKey]bool
expectedExplicitCount int
}{
"include all": {
IncludeInfo: map[types.IncludeInfoKey]bool{
types.IncludeAllInfo: true,
},
expectedExplicitCount: 1,
... | explode_data.jsonl/54335 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 855
} | [
2830,
3393,
4289,
3297,
22283,
98923,
1731,
2679,
5462,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
2415,
14032,
60,
1235,
341,
197,
197,
22283,
1731,
1843,
2415,
58,
9242,
55528,
1731,
1592,
96436,
198,
197,
42400,
98923,
2507,
526,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCollectorAutoscalersSetMaxReplicas(t *testing.T) {
// prepare
maxReplicas := int32(2)
jaeger := v1.NewJaeger(types.NamespacedName{Name: "my-instance"})
jaeger.Spec.Collector.MaxReplicas = &maxReplicas
c := NewCollector(jaeger)
// test
a := c.Autoscalers()
// verify
assert.Len(t, a, 1)
assert.Equal(... | explode_data.jsonl/59537 | {
"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,
53694,
19602,
436,
5416,
388,
1649,
5974,
18327,
52210,
1155,
353,
8840,
836,
8,
341,
197,
322,
10549,
198,
22543,
18327,
52210,
1669,
526,
18,
17,
7,
17,
340,
197,
5580,
1878,
1669,
348,
16,
7121,
52445,
1878,
52613,
9893... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExecUpdateNode(t *testing.T) {
db, mock, err := sqlmock.New()
require.NoError(t, err)
mock.ExpectBegin()
mock.ExpectExec(escape("UPDATE `users` SET `age` = ?, `name` = ? WHERE `id` = ?")).
WithArgs(30, "Ariel", 1).
WillReturnResult(sqlmock.NewResult(1, 1))
mock.ExpectCommit()
err = UpdateNode(context... | explode_data.jsonl/41709 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 311
} | [
2830,
3393,
10216,
4289,
1955,
1155,
353,
8840,
836,
8,
341,
20939,
11,
7860,
11,
1848,
1669,
5704,
16712,
7121,
741,
17957,
35699,
1155,
11,
1848,
340,
77333,
81893,
11135,
741,
77333,
81893,
10216,
7,
12998,
445,
9239,
1565,
4218,
63,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAnalyze(t *testing.T) {
testCases := []analyzeTestCase{
analyzeTestCase{},
}
for _, testCase := range testCases {
kubeClient := &fakekube.Client{
Client: fake.NewSimpleClientset(),
}
analyzer := NewAnalyzer(kubeClient, log.Discard)
err := analyzer.Analyze(testCase.namespace, Options{Wait: tes... | explode_data.jsonl/45354 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 218
} | [
2830,
3393,
2082,
55856,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
93221,
16458,
515,
197,
197,
93221,
16458,
38837,
197,
630,
2023,
8358,
54452,
1669,
2088,
1273,
37302,
341,
197,
16463,
3760,
2959,
1669,
609,
30570,
97717,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDisallowOnEmptyConsent(t *testing.T) {
perms := permissionsImpl{
cfg: config.GDPR{
HostVendorID: 3,
DefaultValue: "0",
},
gdprDefaultValue: SignalNo,
vendorIDs: nil,
fetchVendorList: map[uint8]func(ctx context.Context, id uint16) (vendorlist.VendorList, error){
tcf2SpecVersion: faile... | explode_data.jsonl/31087 | {
"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,
87854,
1925,
3522,
15220,
306,
1155,
353,
8840,
836,
8,
341,
197,
87772,
1669,
8541,
9673,
515,
197,
50286,
25,
2193,
1224,
35,
6480,
515,
298,
197,
9296,
44691,
915,
25,
220,
18,
345,
298,
197,
41533,
25,
330,
15,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_packetConn_handleStats(t *testing.T) {
tests := []struct {
name string
noCumulative bool
stats []unix.TpacketStats
out []Stats
}{
{
name: "no cumulative",
noCumulative: true,
stats: []unix.TpacketStats{
// Expect these exact outputs.
{Packets: 1, Dr... | explode_data.jsonl/35216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 584
} | [
2830,
3393,
21078,
9701,
10630,
16635,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
72104,
85805,
22160,
1807,
198,
197,
79659,
286,
3056,
56646,
836,
24829,
16635,
198,
197,
13967,
688,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOutbreakEventsForTimeRange(t *testing.T) {
db, mock, _ := sqlmock.New(sqlmock.QueryMatcherOption(sqlmock.QueryMatcherEqual))
defer db.Close()
locationID := "ABCDEFGH"
startTime := time.Unix(1613238163, 0)
endTime := time.Unix(1613324563, 0)
severity := uint32(1)
query := `SELECT location_id, start_tim... | explode_data.jsonl/64737 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 365
} | [
2830,
3393,
2662,
8960,
7900,
2461,
1462,
6046,
1155,
353,
8840,
836,
8,
341,
20939,
11,
7860,
11,
716,
1669,
5704,
16712,
7121,
13148,
16712,
15685,
37554,
5341,
13148,
16712,
15685,
37554,
2993,
1171,
16867,
2927,
10421,
2822,
53761,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestManagerImpl(t *testing.T) {
lf, rl := NewRAMLedgerAndFactory(10)
consenters := make(map[string]consensus.Consenter)
consenters[conf.Orderer.OrdererType] = &mockConsenter{}
manager := NewRegistrar(lf, consenters, mockCrypto())
_, ok := manager.GetChain("Fake")
assert.False(t, ok, "Should not have found... | explode_data.jsonl/71399 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 438
} | [
2830,
3393,
2043,
9673,
1155,
353,
8840,
836,
8,
341,
8810,
69,
11,
38877,
1669,
1532,
49,
31102,
291,
1389,
3036,
4153,
7,
16,
15,
692,
197,
6254,
306,
388,
1669,
1281,
9147,
14032,
60,
6254,
13626,
94594,
1950,
340,
197,
6254,
306... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateRegisteredAttributes(t *testing.T) {
origAttributes := []*ecs.Attribute{
{Name: aws.String("foo"), Value: aws.String("bar")},
{Name: aws.String("baz"), Value: aws.String("quux")},
{Name: aws.String("no_value"), Value: aws.String("")},
}
actualAttributes := []*ecs.Attribute{
{Name: aws.String... | explode_data.jsonl/61447 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 292
} | [
2830,
3393,
17926,
41430,
10516,
1155,
353,
8840,
836,
8,
341,
197,
4670,
10516,
1669,
29838,
53717,
33775,
515,
197,
197,
63121,
25,
31521,
6431,
445,
7975,
3975,
5162,
25,
31521,
6431,
445,
2257,
79583,
197,
197,
63121,
25,
31521,
643... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCases(t *testing.T) {
names, err := filepath.Glob("testdata/*.xsd")
if err != nil {
t.Fatal(err)
}
for _, filename := range names {
base := filename[:len(filename)-len(".xsd")]
schema, docs := parseFragment(t, base+".xsd")
answer := parseAnswer(t, base+".json")
testCase := test{schema, answer}
... | explode_data.jsonl/22718 | {
"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,
37302,
1155,
353,
8840,
836,
8,
341,
93940,
11,
1848,
1669,
26054,
1224,
1684,
445,
92425,
23540,
82370,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
2023,
8358,
3899,
1669,
2088,
5036,
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 TestNotGitRepoStatus(t *testing.T) {
output := "fatal: Not a git repository (or any of the parent directories): .git"
mockRunner := NewMockRunner(output)
git := NewCustomGit(mockRunner)
repo := &Repo{Path: "/test/"}
status := git.Status(repo)
if status != "error" {
t.Errorf("Should be error status")
}
... | explode_data.jsonl/14061 | {
"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,
2623,
46562,
25243,
2522,
1155,
353,
8840,
836,
8,
341,
21170,
1669,
330,
74394,
25,
2806,
264,
16345,
12542,
320,
269,
894,
315,
279,
2681,
28625,
1648,
659,
12882,
1837,
77333,
19486,
1669,
1532,
11571,
19486,
11057,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestFailedUserRebaseRequestDueToPreReceiveError(t *testing.T) {
ctxOuter, cancel := testhelper.Context()
defer cancel()
server, serverSocketPath := runFullServer(t)
defer server.Stop()
client, conn := operations.NewOperationClient(t, serverSocketPath)
defer conn.Close()
testRepo, testRepoPath, cleanup :=... | explode_data.jsonl/65107 | {
"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,
9408,
1474,
693,
3152,
1900,
33060,
1249,
4703,
14742,
1454,
1155,
353,
8840,
836,
8,
341,
20985,
51322,
11,
9121,
1669,
1273,
18764,
9328,
741,
16867,
9121,
2822,
41057,
11,
3538,
10286,
1820,
1669,
1598,
9432,
5475,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSvcStatus_Execute(t *testing.T) {
mockError := errors.New("some error")
mockServiceStatus := &describe.ServiceStatusDesc{}
testCases := map[string]struct {
shouldOutputJSON bool
mockStatusDescriber func(m *mocks.MockstatusDescriber)
wantedError error
}{
"errors if failed to describe the ... | explode_data.jsonl/47142 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 771
} | [
2830,
3393,
92766,
2522,
83453,
1155,
353,
8840,
836,
8,
341,
77333,
1454,
1669,
5975,
7121,
445,
14689,
1465,
1138,
77333,
1860,
2522,
1669,
609,
12332,
13860,
2522,
11065,
16094,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
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... | 1 |
func TestNumber(t *testing.T) {
input := "123.7"
lex := lexer.NewLexer(input)
tokens, _ := lex.GetTokens()
parser := NewParser(tokens)
expressions, _ := parser.GetExpressions()
assertNumber(t, 123.7, expressions[0].(expr.Atom).Value.(float64))
} | explode_data.jsonl/43718 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
3393,
2833,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
330,
16,
17,
18,
13,
22,
698,
197,
2571,
1669,
53259,
7121,
92847,
5384,
340,
3244,
9713,
11,
716,
1669,
22429,
2234,
29300,
741,
55804,
1669,
1532,
6570,
34052,
340,
8122,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKMSProviderTimeout(t *testing.T) {
timeoutField := field.NewPath("Resource").Index(0).Child("Provider").Index(0).Child("KMS").Child("Timeout")
negativeTimeout := &metav1.Duration{Duration: -1 * time.Minute}
zeroTimeout := &metav1.Duration{Duration: 0 * time.Minute}
testCases := []struct {
desc string
... | explode_data.jsonl/75102 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 484
} | [
2830,
3393,
42,
4826,
5179,
7636,
1155,
353,
8840,
836,
8,
341,
78395,
1877,
1669,
2070,
7121,
1820,
445,
4783,
1827,
1552,
7,
15,
568,
3652,
445,
5179,
1827,
1552,
7,
15,
568,
3652,
445,
42,
4826,
1827,
3652,
445,
7636,
1138,
9038,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPingWire(t *testing.T) {
tests := []struct {
in wire.MsgPing // Message to encode
out wire.MsgPing // Expected decoded message
buf []byte // Wire encoding
pver uint32 // Protocol version for wire encoding
}{
// Latest protocol version.
{
wire.MsgPing{Nonce: 123123}, // 0x1e0f3
... | explode_data.jsonl/1146 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 800
} | [
2830,
3393,
69883,
37845,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
17430,
256,
9067,
30365,
69883,
442,
4856,
311,
16164,
198,
197,
13967,
220,
9067,
30365,
69883,
442,
31021,
29213,
1943,
198,
197,
26398,
220,
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... | 6 |
func TestCustomParserBasicUnsupported(t *testing.T) {
type ConstT int32
type config struct {
Const ConstT `env:"CONST_VAL"`
}
exp := ConstT(123)
os.Setenv("CONST_VAL", fmt.Sprintf("%d", exp))
cfg := &config{}
err := env.Parse(cfg)
assert.Zero(t, cfg.Const)
assert.Error(t, err)
assert.Equal(t, env.ErrUns... | explode_data.jsonl/7500 | {
"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,
10268,
6570,
15944,
41884,
1155,
353,
8840,
836,
8,
341,
13158,
24522,
51,
526,
18,
17,
271,
13158,
2193,
2036,
341,
197,
197,
19167,
24522,
51,
1565,
3160,
2974,
41795,
6096,
8805,
197,
630,
48558,
1669,
24522,
51,
7,
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 TestIsSignatureContractGood(t *testing.T) {
prog := make([]byte, 35)
prog[0] = byte(PUSHBYTES33)
prog[34] = byte(CHECKSIG)
assert.Equal(t, true, IsSignatureContract(prog))
assert.Equal(t, true, IsStandardContract(prog))
} | explode_data.jsonl/40581 | {
"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,
3872,
25088,
14067,
15216,
1155,
353,
8840,
836,
8,
341,
197,
32992,
1669,
1281,
10556,
3782,
11,
220,
18,
20,
340,
197,
32992,
58,
15,
60,
284,
4922,
5304,
19518,
97849,
18,
18,
340,
197,
32992,
58,
18,
19,
60,
284,
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 TestParseNetBackend(t *testing.T) {
val := ParseNetBackend("halide")
if val != NetBackendHalide {
t.Errorf("ParseNetBackend invalid")
}
val = ParseNetBackend("openvino")
if val != NetBackendOpenVINO {
t.Errorf("ParseNetBackend invalid")
}
val = ParseNetBackend("opencv")
if val != NetBackendOpenCV {
t... | explode_data.jsonl/31271 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
14463,
6954,
29699,
1155,
353,
8840,
836,
8,
341,
19302,
1669,
14775,
6954,
29699,
445,
11866,
577,
1138,
743,
1044,
961,
9374,
29699,
55941,
577,
341,
197,
3244,
13080,
445,
14463,
6954,
29699,
8318,
1138,
197,
532,
19302,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExecInContainerNoSuchPod(t *testing.T) {
testKubelet := newTestKubelet(t)
kubelet := testKubelet.kubelet
fakeRuntime := testKubelet.fakeRuntime
fakeCommandRunner := fakeContainerCommandRunner{}
kubelet.runner = &fakeCommandRunner
fakeRuntime.PodList = []*kubecontainer.Pod{}
podName := "podFoo"
podName... | explode_data.jsonl/43319 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
10216,
641,
4502,
65531,
23527,
1155,
353,
8840,
836,
8,
341,
18185,
42,
3760,
1149,
1669,
501,
2271,
42,
3760,
1149,
1155,
340,
16463,
3760,
1149,
1669,
1273,
42,
3760,
1149,
5202,
3760,
1149,
198,
1166,
726,
15123,
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... | 3 |
func TestFulltextSearchModifier(t *testing.T) {
require.False(t, FulltextSearchModifier(FulltextSearchModifierNaturalLanguageMode).IsBooleanMode())
require.True(t, FulltextSearchModifier(FulltextSearchModifierNaturalLanguageMode).IsNaturalLanguageMode())
require.False(t, FulltextSearchModifier(FulltextSearchModifier... | explode_data.jsonl/27587 | {
"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,
9432,
1318,
5890,
34405,
1155,
353,
8840,
836,
8,
341,
17957,
50757,
1155,
11,
8627,
1318,
5890,
34405,
7832,
617,
1318,
5890,
34405,
54281,
13806,
3636,
568,
3872,
6890,
3636,
2398,
17957,
32443,
1155,
11,
8627,
1318,
5890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestValidate_url(t *testing.T) {
assert := assert.New(t)
type Model struct {
U1 *string `validate:"url=http https"`
U2 string `validate:"url"`
U3 string `validate:"url=scp"`
}
assert.EqualError(
v.Validate(&Model{}, valis.EachFields(tagrule.Validate)),
"(invalid_scheme) .U3 which scheme is not inc... | explode_data.jsonl/17257 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 397
} | [
2830,
3393,
17926,
2903,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
13158,
4903,
2036,
341,
197,
15980,
16,
353,
917,
1565,
7067,
2974,
1085,
34717,
3703,
8805,
197,
15980,
17,
914,
220,
1565,
7067,
2974,
1085,
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 TestGetChannel(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer th.TearDown()
Client := th.Client
channel, resp := Client.GetChannel(th.BasicChannel.Id, "")
CheckNoError(t, resp)
if channel.Id != th.BasicChannel.Id {
t.Fatal("ids did not match")
}
Client.RemoveUserFromChannel(th.Basic... | explode_data.jsonl/65647 | {
"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,
1949,
9629,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
1005,
3803,
2320,
7210,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
271,
71550,
11,
9039,
1669,
8423,
2234,
9629,
24365,
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... | 3 |
func TestCompareConfigValue(t *testing.T) {
// Normal equality
assert.True(t, comparable{
ConfigValue: &cb.ConfigValue{
Version: 0,
ModPolicy: "foo",
Value: []byte("bar"),
}}.equals(comparable{
ConfigValue: &cb.ConfigValue{
Version: 0,
ModPolicy: "foo",
Value: []byte("bar"),
}}),... | explode_data.jsonl/40497 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 634
} | [
2830,
3393,
27374,
2648,
1130,
1155,
353,
8840,
836,
8,
341,
197,
322,
18437,
21777,
198,
6948,
32443,
1155,
11,
29039,
515,
197,
66156,
1130,
25,
609,
7221,
10753,
1130,
515,
298,
77847,
25,
256,
220,
15,
345,
298,
197,
4459,
13825,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLeastWaste(t *testing.T) {
cpuPerPod := int64(500)
memoryPerPod := int64(1000 * 1024 * 1024)
e := NewStrategy()
balancedNodeInfo := makeNodeInfo(16*cpuPerPod, 16*memoryPerPod, 100)
nodeMap := map[string]*schedulercache.NodeInfo{"balanced": balancedNodeInfo}
balancedOption := expander.Option{NodeGroup: &F... | explode_data.jsonl/37334 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 705
} | [
2830,
3393,
81816,
54,
5525,
1155,
353,
8840,
836,
8,
341,
80335,
3889,
23527,
1669,
526,
21,
19,
7,
20,
15,
15,
340,
2109,
4731,
3889,
23527,
1669,
526,
21,
19,
7,
16,
15,
15,
15,
353,
220,
16,
15,
17,
19,
353,
220,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPopulateAccountEntryMasterMissingInSigners(t *testing.T) {
tt := assert.New(t)
ctx, _ := test.ContextWithLogBuffer()
hAccount := Account{}
account.MasterWeight = 0
signers = []history.AccountSigner{
{
Account: accountID.Address(),
Signer: "GCMQBJWOLTCSSMWNVDJAXL6E42SADH563IL5MN5B6RBBP4XP7TBRLJKE... | explode_data.jsonl/9835 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
11598,
6334,
7365,
5874,
18041,
25080,
641,
7264,
388,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
2060,
7121,
1155,
340,
20985,
11,
716,
1669,
1273,
9328,
2354,
2201,
4095,
741,
9598,
7365,
1669,
8615,
31483,
86866,
71202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResourceAWSElastiCacheClusterIdValidation(t *testing.T) {
cases := []struct {
Value string
ErrCount int
}{
{
Value: "tEsting",
ErrCount: 1,
},
{
Value: "t.sting",
ErrCount: 1,
},
{
Value: "t--sting",
ErrCount: 1,
},
{
Value: "1testing",
ErrCount: 1,
... | explode_data.jsonl/78582 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 336
} | [
2830,
3393,
4783,
14419,
925,
4259,
72,
8233,
28678,
764,
13799,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
47399,
262,
914,
198,
197,
197,
7747,
2507,
526,
198,
197,
59403,
197,
197,
515,
298,
47399,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_Proxying(t *testing.T) {
builder := NewMockBuilder()
runner := NewMockRunner()
proxy := gin.NewProxy(builder, runner)
// create a test server and see if we can proxy a request
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Hello world")
}))
... | explode_data.jsonl/38856 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 288
} | [
2830,
3393,
16670,
4130,
287,
1155,
353,
8840,
836,
8,
341,
44546,
1669,
1532,
11571,
3297,
741,
197,
41736,
1669,
1532,
11571,
19486,
741,
197,
22803,
1669,
46183,
7121,
16219,
30750,
11,
22259,
692,
197,
322,
1855,
264,
1273,
3538,
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 TestMethodUsageFlags(t *testing.T) {
t.Parallel()
tests := []struct {
name string
method string
err error
flags btcjson.UsageFlag
}{
{
name: "unregistered type",
method: "bogusmethod",
err: btcjson.Error{ErrorCode: btcjson.ErrUnregisteredMethod},
},
{
name: "getblock",
... | explode_data.jsonl/27518 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 564
} | [
2830,
3393,
3523,
14783,
9195,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
42257,
914,
198,
197,
9859,
262,
1465,
198,
197,
59516,
220,
86037,
2236,
85900,
12135,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfig_WrongFieldType(t *testing.T) {
c := NewConfig()
err := c.LoadConfig("./testdata/wrong_field_type.toml")
require.Error(t, err, "invalid field type")
assert.Equal(t, "Error loading config file ./testdata/wrong_field_type.toml: error parsing http_listener_v2, line 2: (http_listener_v2.HTTPListenerV2.Po... | explode_data.jsonl/67106 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 260
} | [
2830,
3393,
2648,
2763,
14347,
63733,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
2648,
741,
9859,
1669,
272,
13969,
2648,
13988,
92425,
6324,
14347,
5013,
1819,
73494,
75,
1138,
17957,
6141,
1155,
11,
1848,
11,
330,
11808,
2070,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOperationOrSwaggerSecurity(t *testing.T) {
// Create the security schemes
securitySchemes := []ExampleSecurityScheme{
{
Name: "apikey",
Scheme: &openapi3.SecurityScheme{
Type: "apiKey",
Name: "apikey",
In: "cookie",
},
},
{
Name: "http-basic",
Scheme: &openapi3.SecuritySche... | explode_data.jsonl/41696 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1671
} | [
2830,
3393,
8432,
2195,
67714,
15352,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
279,
4763,
30856,
198,
197,
17039,
50,
66346,
1669,
3056,
13314,
15352,
28906,
515,
197,
197,
515,
298,
21297,
25,
330,
72174,
756,
298,
7568,
8058,
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 TestNoDuplicatedAddress(t *testing.T) {
tokens := getTokenInTestDirectory()
coins := make(map[string]bool)
for _, coin := range *tokens {
coins[coin.Address] = true
}
if len(*tokens) != len(coins) {
log.Fatal("Length are not equal")
}
} | explode_data.jsonl/51123 | {
"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,
2753,
35,
98984,
4286,
1155,
353,
8840,
836,
8,
341,
3244,
9713,
1669,
54111,
641,
2271,
9310,
2822,
197,
29609,
1669,
1281,
9147,
14032,
96436,
692,
2023,
8358,
16254,
1669,
2088,
353,
30566,
341,
197,
197,
29609,
58,
7160,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFormat(t *testing.T) {
converter := lines(10)
for _, test := range tests {
for ti, text := range test[:2] {
spn := span.Parse(text)
if ti <= 1 {
// we can check %v produces the same as the input
expect := toPath(test[ti])
if got := fmt.Sprintf("%v", spn); got != expect {
t.Errorf("pr... | explode_data.jsonl/35897 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 329
} | [
2830,
3393,
4061,
1155,
353,
8840,
836,
8,
341,
37203,
8721,
1669,
5128,
7,
16,
15,
340,
2023,
8358,
1273,
1669,
2088,
7032,
341,
197,
2023,
8988,
11,
1467,
1669,
2088,
1273,
3447,
17,
60,
341,
298,
1903,
19958,
1669,
9390,
8937,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestCache_parseCredentialHeader(t *testing.T) {
if u, p, ok := parseCredentialHeader(newTestCredReq(NewSecret(10), NewSecret(10))); ok {
t.Fatal(u, p)
}
} | explode_data.jsonl/43691 | {
"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,
8233,
21039,
48265,
4047,
1155,
353,
8840,
836,
8,
341,
743,
575,
11,
281,
11,
5394,
1669,
4715,
48265,
4047,
1755,
2271,
34,
1151,
27234,
35063,
19773,
7,
16,
15,
701,
1532,
19773,
7,
16,
15,
47563,
5394,
341,
197,
3244... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestMulWithMULXADxX(t *testing.T) {
defer resetCpuFeatures()
if !HasADXandBMI2 {
t.Skip("MULX, ADCX and ADOX not supported by the platform")
}
testMul(t, kUse_MULXandADxX, kUse_MUL)
} | explode_data.jsonl/20917 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
59155,
2354,
44,
1094,
55,
1808,
87,
55,
1155,
353,
8840,
836,
8,
341,
16867,
7585,
34,
5584,
21336,
741,
743,
753,
10281,
83172,
437,
95526,
17,
341,
197,
3244,
57776,
445,
44,
1094,
55,
11,
22083,
55,
323,
362,
5865,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMethods(t *testing.T) {
tests := []testRun{{
Name: "options",
URL: "",
Method: "OPTIONS",
Status: http.StatusOK,
Expected: "",
Headers: map[string]string{
"Access-Control-Allow-Origin": "http://localhost:5572/",
"Access-Control-Request-Method": "POST, OPTIONS, GET, HEAD",
"... | explode_data.jsonl/12963 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 298
} | [
2830,
3393,
17856,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1944,
6727,
90,
515,
197,
21297,
25,
257,
330,
2875,
756,
197,
79055,
25,
414,
8324,
197,
84589,
25,
256,
330,
56929,
756,
197,
58321,
25,
256,
1758,
52989,
345,
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 TestApp_Header(t *testing.T) {
tests := []struct {
name string
path string
wantErr error
}{
{
name: "Empty",
path: filepath.Join(corpus, "empty.sif"),
},
{
name: "OneGroup",
path: filepath.Join(corpus, "one-group.sif"),
},
{
name: "OneGroupSigned",
path: filepath.Join(corp... | explode_data.jsonl/26370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 781
} | [
2830,
3393,
2164,
71353,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
26781,
262,
914,
198,
197,
50780,
7747,
1465,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
3522,
756,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestIrisStream(t *testing.T) {
e := irisTester(t)
e.GET("/stream").
Expect().
Status(http.StatusOK).
TransferEncoding("chunked"). // ensure server sent chunks
Body().Equal("0123456789")
// send chunks to server
e.POST("/stream").WithChunked(strings.NewReader("<long text>")).
Expect().
Status(http... | explode_data.jsonl/66293 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
40,
5963,
3027,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
63942,
58699,
1155,
692,
7727,
17410,
4283,
4027,
38609,
197,
35911,
25829,
197,
58321,
19886,
52989,
4292,
197,
197,
21970,
14690,
445,
25979,
291,
1827,
442,
5978,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListMyFilmCMD(t *testing.T) {
testTelegramClientInst, answerChan, _ := NewTestMovieBot("./test_data/test_data.sql")
updates := make(chan tgbotapi.Update)
go testTelegramClientInst.GetMyFilm(updates)
updates <- tgbotapi.Update{Message: &tgbotapi.Message{Text: "", Chat: &tgbotapi.Chat{ID: 100}}}
answer := <... | explode_data.jsonl/19227 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 235
} | [
2830,
3393,
852,
5050,
51487,
38680,
1155,
353,
8840,
836,
8,
341,
18185,
72244,
2959,
8724,
11,
4226,
46019,
11,
716,
1669,
1532,
2271,
19668,
23502,
13988,
1944,
1769,
12697,
1769,
10045,
1138,
197,
49661,
1669,
1281,
35190,
53188,
6331... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRecorder_ResponseStatus_RecordsFinalResponseStatus(t *testing.T) {
status, err := NewTestRecorder().
AddHttpRequest(HttpRequest{}).
AddHttpResponse(HttpResponse{Value: &http.Response{StatusCode: http.StatusAccepted}}).
AddHttpRequest(HttpRequest{}).
AddHttpResponse(HttpResponse{Value: &http.Response{S... | explode_data.jsonl/76378 | {
"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,
47023,
65873,
2522,
62,
25876,
19357,
92663,
1155,
353,
8840,
836,
8,
341,
23847,
11,
1848,
1669,
1532,
2271,
47023,
25829,
197,
37972,
26362,
12286,
1900,
6257,
4292,
197,
37972,
43342,
12286,
2582,
90,
1130,
25,
609,
1254,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateBigQueryInput(t *testing.T) {
for _, testcase := range []struct {
name string
cmd *bigquery.UpdateCommand
api mock.API
want *fastly.UpdateBigQueryInput
wantError string
}{
{
name: "no updates",
cmd: updateCommandNoUpdates(),
api: mock.API{
ListVersionsFn:... | explode_data.jsonl/67598 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1247
} | [
2830,
3393,
4289,
15636,
2859,
2505,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
70080,
1669,
2088,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
25920,
981,
353,
16154,
1631,
16689,
4062,
198,
197,
54299,
981,
7860,
24922,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestPgpass(t *testing.T) {
if os.Getenv("TRAVIS") != "true" {
t.Skip("not running under Travis, skipping pgpass tests")
}
testAssert := func(conninfo string, expected string, reason string) {
conn, err := openTestConnConninfo(conninfo)
if err != nil {
t.Fatal(err)
}
defer conn.Close()
txn, err ... | explode_data.jsonl/73472 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1096
} | [
2830,
3393,
82540,
6385,
1155,
353,
8840,
836,
8,
341,
743,
2643,
64883,
445,
2378,
98716,
899,
961,
330,
1866,
1,
341,
197,
3244,
57776,
445,
1921,
4303,
1212,
40710,
11,
42659,
17495,
6385,
7032,
1138,
197,
630,
18185,
8534,
1669,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestDataChannelBufferedAmount(t *testing.T) {
t.Run("set before datachannel becomes open", func(t *testing.T) {
report := test.CheckRoutines(t)
defer report()
var nCbs int
buf := make([]byte, 1000)
offerPC, answerPC, err := newPair()
if err != nil {
t.Fatalf("Failed to create a PC pair for testin... | explode_data.jsonl/68048 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1509
} | [
2830,
93200,
9629,
4095,
291,
10093,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
746,
1573,
821,
10119,
9044,
1787,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
69931,
1669,
1273,
10600,
49,
28628,
1155,
340,
197,
16867,
1895,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNodePublishVolumeBlock(t *testing.T) {
// Skipping for now - issues with symlink
t.Skip()
// Create server and client connection
s := newTestServer(t)
defer s.Stop()
// Make a call
c := csi.NewNodeClient(s.Conn())
name := "myvol"
size := uint64(10)
// create devicepath/targetpath
devicePath := f... | explode_data.jsonl/51448 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 787
} | [
2830,
3393,
1955,
50145,
18902,
4713,
1155,
353,
8840,
836,
8,
341,
197,
322,
96118,
369,
1431,
481,
4714,
448,
83221,
198,
3244,
57776,
2822,
197,
322,
4230,
3538,
323,
2943,
3633,
198,
1903,
1669,
501,
2271,
5475,
1155,
340,
16867,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewRequestNewRequestFailure(t *testing.T) {
client := newClient()
req, err := client.NewRequest(
context.Background(), "\t\t\t", "/", nil, nil,
)
if err == nil || !strings.HasPrefix(err.Error(), "net/http: invalid method") {
t.Fatal("not the error we expected")
}
if req != nil {
t.Fatal("expected n... | explode_data.jsonl/60962 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
3564,
1900,
3564,
1900,
17507,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
2959,
741,
24395,
11,
1848,
1669,
2943,
75274,
1006,
197,
28413,
19047,
1507,
2917,
83,
4955,
4955,
497,
64657,
2092,
11,
2092,
345,
197,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestFillInPostProps(t *testing.T) {
t.Run("should not add disable group highlight to post props for user with group mention permissions", func(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
th.App.Srv().SetLicense(model.NewTestLicense("ldap"))
user1 := th.BasicUser
channel := th.Create... | explode_data.jsonl/26442 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1103
} | [
2830,
3393,
14449,
641,
4133,
5992,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5445,
537,
912,
11156,
1874,
11167,
311,
1736,
6914,
369,
1196,
448,
1874,
6286,
8541,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
70479,
1669,
1862... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTopDownSets(t *testing.T) {
tests := []struct {
note string
rules []string
expected interface{}
}{
{"set_diff", []string{`p = x { s1 = {1, 2, 3, 4}; s2 = {1, 3}; x = s1 - s2 }`}, `[2,4]`},
{"set_diff: refs", []string{`p = x { s1 = {a[2], a[1], a[0]}; s2 = {a[0], 2}; set_diff(s1, s2, x) }`}, ... | explode_data.jsonl/25212 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 432
} | [
2830,
3393,
5366,
4454,
30175,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
9038,
1272,
257,
914,
198,
197,
7000,
2425,
262,
3056,
917,
198,
197,
42400,
3749,
16094,
197,
59403,
197,
197,
4913,
746,
15850,
497,
305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.