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 TestWatchControllers(t *testing.T) {
fakeWatch := watch.NewFake()
client := fake.NewSimpleClientset()
client.PrependWatchReactor("replicasets", core.DefaultWatchReactor(fakeWatch, nil))
stopCh := make(chan struct{})
defer close(stopCh)
informers := informers.NewSharedInformerFactory(client, controller.NoResy... | explode_data.jsonl/7974 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 548
} | [
2830,
3393,
14247,
14353,
1155,
353,
8840,
836,
8,
341,
1166,
726,
14247,
1669,
3736,
7121,
52317,
741,
25291,
1669,
12418,
7121,
16374,
2959,
746,
741,
25291,
28770,
3740,
14247,
693,
5621,
445,
9995,
52210,
1415,
497,
6200,
13275,
14247... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogin(t *testing.T) {
//u := Input("请输入手机/邮箱:", "569929309@qq.com")
//p := Input("请输入密码:", "txxxx6")
u := "ddd"
p := "ddd"
body, err := Login(u, p)
if err != nil {
fmt.Printf("错误:%s,请手动关闭\n", err.Error())
time.Sleep(50 * time.Second)
os.Exit(0)
}
if strings.Contains(string(body), "验证") {
fmt.Pr... | explode_data.jsonl/66588 | {
"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,
6231,
1155,
353,
8840,
836,
8,
341,
197,
322,
84,
1669,
5571,
445,
47955,
58405,
14,
93568,
12147,
330,
20,
21,
24,
24,
17,
24,
18,
15,
24,
61652,
905,
1138,
197,
322,
79,
1669,
5571,
445,
47955,
32867,
12147,
330,
399... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetNoStoreRequest(t *testing.T) {
resetTest()
req, err := http.NewRequest("GET", s.server.URL, nil)
if err != nil {
t.Fatal(err)
}
req.Header.Add("Cache-Control", "no-store")
{
resp, err := s.client.Do(req)
if err != nil {
t.Fatal(err)
}
defer resp.Body.Close()
if resp.Header.Get(XFromCach... | explode_data.jsonl/77617 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 265
} | [
2830,
3393,
1949,
2753,
6093,
1900,
1155,
353,
8840,
836,
8,
341,
70343,
2271,
741,
24395,
11,
1848,
1669,
1758,
75274,
445,
3806,
497,
274,
12638,
20893,
11,
2092,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRest_CreateWithRestrictedWord(t *testing.T) {
ts, _, teardown := startupT(t)
defer teardown()
badComment := `{"text": "What the duck is that?", "locator":{"url": "https://radio-t.com/blah1",
"site": "remark42"}}`
resp, err := post(t, ts.URL+"/api/v1/comment", badComment)
assert.NoError(t, err)
assert.E... | explode_data.jsonl/37389 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 248
} | [
2830,
3393,
12416,
34325,
2354,
86405,
10879,
1155,
353,
8840,
836,
8,
341,
57441,
11,
8358,
49304,
1669,
20567,
51,
1155,
340,
16867,
49304,
2822,
2233,
329,
10677,
1669,
1565,
4913,
1318,
788,
330,
3838,
279,
35985,
374,
429,
31011,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDeleteSpace(t *testing.T) {
Convey("Delete space", t, func() {
setup(MockRoute{"DELETE", "/v2/spaces/a537761f-9d93-4b30-af17-3d73dbca181b", "", "", 204, "recursive=false&async=false", nil}, t)
defer teardown()
c := &Config{
ApiAddress: server.URL,
Token: "foobar",
}
client, err := NewClie... | explode_data.jsonl/59984 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 219
} | [
2830,
3393,
6435,
9914,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
6435,
3550,
497,
259,
11,
2915,
368,
341,
197,
84571,
66436,
4899,
4913,
14424,
497,
3521,
85,
17,
26734,
2434,
14186,
20,
18,
22,
22,
21,
16,
69,
12,
24,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakeLogicSigSingle(t *testing.T) {
var program []byte
var args [][]byte
var sk ed25519.PrivateKey
var pk MultisigAccount
acc, err := AccountFromPrivateKey(ed25519.PrivateKey{0xd2, 0xdc, 0x4c, 0xcc, 0xe9, 0x98, 0x62, 0xff, 0xcf, 0x8c, 0xeb, 0x93, 0x6, 0xc4, 0x8d, 0xa6, 0x80, 0x50, 0x82, 0xa, 0xbb, 0x29, 0... | explode_data.jsonl/2159 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 936
} | [
2830,
3393,
8078,
26751,
47246,
10888,
1155,
353,
8840,
836,
8,
341,
2405,
2025,
3056,
3782,
198,
2405,
2827,
52931,
3782,
198,
2405,
1901,
1578,
17,
20,
20,
16,
24,
87738,
1592,
198,
2405,
22458,
22162,
285,
343,
7365,
271,
197,
4475... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestControlMessages(t *testing.T) {
app := testNode()
// command from this node
cmd := testPingControlCmd(app.uid)
err := app.ControlMsg(cmd)
assert.Equal(t, nil, err)
cmd = testPingControlCmd("another_node")
err = app.ControlMsg(cmd)
assert.Equal(t, nil, err)
err = app.ControlMsg(testWrongControlCmd("ano... | explode_data.jsonl/53960 | {
"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,
3273,
15820,
1155,
353,
8840,
836,
8,
341,
28236,
1669,
1273,
1955,
741,
197,
322,
3210,
504,
419,
2436,
198,
25920,
1669,
1273,
69883,
3273,
15613,
11462,
24874,
340,
9859,
1669,
906,
3957,
6611,
14160,
340,
6948,
12808,
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 TestSetMinGasPrices(t *testing.T) {
minGasPrices := sdk.DecCoins{sdk.NewInt64DecCoin("stake", 5000)}
app := newBaseApp(t.Name(), baseapp.SetMinGasPrices(minGasPrices.String()))
require.Equal(t, minGasPrices, app.MinGasPrices())
} | explode_data.jsonl/30031 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
1649,
6217,
58728,
62718,
1155,
353,
8840,
836,
8,
341,
25320,
58728,
62718,
1669,
45402,
22442,
69602,
90,
51295,
7121,
1072,
21,
19,
4900,
41180,
445,
267,
726,
497,
220,
20,
15,
15,
15,
10569,
28236,
1669,
501,
3978,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestS3TestConnection(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer th.TearDown()
Client := th.Client
s3Host := os.Getenv("CI_HOST")
if s3Host == "" {
s3Host = "dockerhost"
}
s3Port := os.Getenv("CI_MINIO_PORT")
if s3Port == "" {
s3Port = "9001"
}
s3Endpoint := fmt.Sprintf("%s:%... | explode_data.jsonl/10692 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 619
} | [
2830,
3393,
50,
18,
2271,
4526,
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,
1903,
18,
9296,
1669,
2643,
64883,
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... | 5 |
func TestCheckEvent(t *testing.T) {
Convey("Given an event city and year", t, func() {
city := "Ponyville"
year := "2017"
Convey("When the event exists", func() {
result := CheckEvent(city, year)
Convey("Then the result should be true", func() {
So(result, ShouldEqual, true)
})
})
})
Convey("G... | explode_data.jsonl/82569 | {
"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,
3973,
1556,
1155,
353,
8840,
836,
8,
1476,
93070,
5617,
445,
22043,
458,
1538,
3283,
323,
1042,
497,
259,
11,
2915,
368,
341,
197,
1444,
487,
1669,
330,
47,
3549,
7919,
698,
197,
197,
3157,
1669,
330,
17,
15,
16,
22,
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 TestNestedArgumentList(t *testing.T) {
data, err := ioutil.ReadFile("../cases/nestedArgs.php")
if err != nil {
panic(err)
}
document := NewDocument("test1", data)
document.Load()
testOffsets := []int{
308,
345,
}
for _, testOffset := range testOffsets {
argumentList, hasParamsResolvable := document... | explode_data.jsonl/585 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 196
} | [
2830,
3393,
71986,
9171,
852,
1155,
353,
8840,
836,
8,
341,
8924,
11,
1848,
1669,
43144,
78976,
17409,
23910,
9612,
9980,
4117,
2296,
1138,
743,
1848,
961,
2092,
341,
197,
30764,
3964,
340,
197,
532,
17470,
1669,
1532,
7524,
445,
1944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLinuxConn_bindGetsocknameErrorCloseSocket(t *testing.T) {
// Trigger an error during bind with Getsockname, meaning that the socket
// should be closed to avoid leaking file descriptors.
s := &testSocket{
getsocknameErr: errors.New("cannot get socket name"),
}
if _, _, err := bind(s, &Config{}); err ==... | explode_data.jsonl/33485 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
46324,
9701,
27461,
1949,
13199,
606,
1454,
7925,
10286,
1155,
353,
8840,
836,
8,
341,
197,
322,
30291,
458,
1465,
2337,
10719,
448,
2126,
13199,
606,
11,
7290,
429,
279,
7575,
198,
197,
322,
1265,
387,
7877,
311,
5648,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestJPNLineupItem(t *testing.T) {
var err error
var JPNLineupItem = amiibo.JPNLineupItem{}
_, err = amiibo.WriteJPNLineupItem(filefolder, jpnLineupItemFileName, &JPNLineupItem)
if err != nil {
t.Fatal(err)
}
_, err = amiibo.ReadJPNLineupItem(filefolder, jpnLineupItemFileName)
if err != nil {
t.Fatal(err... | explode_data.jsonl/3950 | {
"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,
41,
17896,
2460,
454,
1234,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
2405,
619,
17896,
2460,
454,
1234,
284,
51727,
28846,
3503,
17896,
2460,
454,
1234,
16094,
197,
6878,
1848,
284,
51727,
28846,
4073,
41,
17896,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestControllable(t *testing.T) {
c, err := NewContainer(ContainerName)
if err != nil {
t.Errorf(err.Error())
}
if !c.Controllable() {
t.Errorf("Controling the container failed...")
}
} | explode_data.jsonl/2753 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
818,
68755,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
1532,
4502,
75145,
675,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
3964,
6141,
2398,
197,
630,
743,
753,
66,
2451,
68755,
368,
341,
197,
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
] | 3 |
func TestValidateS3Name(t *testing.T) {
testCases := map[string]testCase{
"good case": {
input: "happy-s3-bucket",
want: nil,
},
"contains punctuation": {
input: "sadbucket!",
want: errValueBadFormatWithPeriod,
},
"contains spaces": {
input: "bowie is a good dog",
want: errValueBadFormat... | explode_data.jsonl/34545 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 630
} | [
2830,
3393,
17926,
50,
18,
675,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
66194,
515,
197,
197,
1,
18536,
1142,
788,
341,
298,
22427,
25,
330,
56521,
1331,
18,
1455,
11152,
756,
298,
50780,
25,
220,
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... | 1 |
func TestH12_SmallBody(t *testing.T) {
h12Compare{Handler: func(w ResponseWriter, r *Request) {
io.WriteString(w, "small body")
}}.run(t)
} | explode_data.jsonl/4743 | {
"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,
39,
16,
17,
1098,
29532,
5444,
1155,
353,
8840,
836,
8,
341,
9598,
16,
17,
27374,
90,
3050,
25,
2915,
3622,
5949,
6492,
11,
435,
353,
1900,
8,
341,
197,
53112,
44747,
3622,
11,
330,
9004,
2487,
1138,
197,
3417,
13,
610... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestArray_CountValues(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []interface{}{"a", "b", "c", "d", "e", "d"}
array1 := garray.NewArrayFrom(a1)
array2 := array1.CountValues()
t.Assert(len(array2), 5)
t.Assert(array2["b"], 1)
t.Assert(array2["d"], 2)
})
} | explode_data.jsonl/13913 | {
"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,
1857,
50775,
6227,
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,
4913,
64,
497,
330,
65,
497,
330,
66,
497,
330,
67,
497,
330,
68,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSourceWriter(t *testing.T) {
rng := New()
sw := NewSourceWriter(rng, 2)
f, err := os.Open("/dev/random")
if err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
t.FailNow()
}
buf := new(bytes.Buffer)
io.CopyN(buf, f, 4096)
f.Close()
n, err := io.Copy(sw, buf)
if err != nil {
fmt.Fprintf(os.Stderr,... | explode_data.jsonl/67459 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
3608,
6492,
1155,
353,
8840,
836,
8,
341,
7000,
968,
1669,
1532,
741,
77295,
1669,
1532,
3608,
6492,
87597,
11,
220,
17,
340,
1166,
11,
1848,
1669,
2643,
12953,
4283,
3583,
79442,
1138,
743,
1848,
961,
2092,
341,
197,
1100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParse_ErrUnknownNotification(t *testing.T) {
f := MustOpenFile("testdata/unknown_notification.xml")
defer f.Close()
result, err := webhooks.Parse(f)
if result != nil {
t.Fatalf("unexpected notification: %#v", result)
} else if e, ok := err.(webhooks.ErrUnknownNotification); !ok {
t.Fatalf("unexpected... | explode_data.jsonl/76122 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
14463,
93623,
13790,
11196,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
15465,
5002,
1703,
445,
92425,
14,
16088,
34296,
9028,
1138,
16867,
282,
10421,
2822,
9559,
11,
1848,
1669,
3482,
38560,
8937,
955,
340,
743,
1102,
961,
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... | 5 |
func TestRuleModulePtr(t *testing.T) {
mod := `package test
p { true }
p { true }
q { true }
r = 1
default s = 2
`
parsed, err := ParseModule("", mod)
if err != nil {
t.Fatalf("Unexpected parse error: %v", err)
}
for _, rule := range parsed.Rules {
if rule.Module != parsed {
t.Fatalf("Expected modu... | explode_data.jsonl/50496 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 154
} | [
2830,
3393,
11337,
3332,
5348,
1155,
353,
8840,
836,
8,
341,
42228,
1669,
1565,
1722,
1273,
271,
3223,
314,
830,
456,
3223,
314,
830,
456,
18534,
314,
830,
456,
7000,
284,
220,
16,
198,
11940,
274,
284,
220,
17,
198,
197,
19324,
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... | 4 |
func TestQueryVotingInfos(t *testing.T) {
cdc := codec.New()
input := CreateTestInput(t)
querier := NewQuerier(input.OracleKeeper)
votingInfo1 := types.NewVotingInfo(ValAddrs[0], 7, 1, 32)
input.OracleKeeper.SetVotingInfo(input.Ctx, ValAddrs[0], votingInfo1)
votingInfo2 := types.NewVotingInfo(ValAddrs[1], 7, 1, ... | explode_data.jsonl/47472 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 443
} | [
2830,
3393,
2859,
53,
11519,
38059,
1155,
353,
8840,
836,
8,
341,
1444,
7628,
1669,
34647,
7121,
741,
22427,
1669,
4230,
2271,
2505,
1155,
340,
197,
15959,
1268,
1669,
1532,
2183,
261,
1268,
5384,
13,
48663,
77233,
692,
5195,
11519,
173... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigServiceV2GetSinkError(t *testing.T) {
errCode := codes.Internal
mockConfig.err = grpc.Errorf(errCode, "test error")
var formattedSinkName string = ConfigSinkPath("[PROJECT]", "[SINK]")
var request = &loggingpb.GetSinkRequest{
SinkName: formattedSinkName,
}
c, err := NewConfigClient(context.Back... | explode_data.jsonl/77770 | {
"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,
2648,
1860,
53,
17,
1949,
45094,
1454,
1155,
353,
8840,
836,
8,
341,
9859,
2078,
1669,
13912,
32579,
198,
77333,
2648,
18441,
284,
47900,
13080,
3964,
2078,
11,
330,
1944,
1465,
5130,
2405,
23126,
45094,
675,
914,
284,
5532,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewGrpcClient_MultiplePaths(t *testing.T) {
controller := gomock.NewController(t)
oldGrpcDialContext := grpc.DialContext
mockDialer := mock_grpc.NewMockDialer(controller)
mockKV := mock_etcd.NewMockKV(controller)
grpcDialContext = mockDialer.DialContext
defer func() { grpcDialContext = oldGrpcDialContext... | explode_data.jsonl/11502 | {
"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,
3564,
6464,
3992,
2959,
1245,
12229,
26901,
1155,
353,
8840,
836,
8,
341,
61615,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
61828,
6464,
3992,
35,
530,
1972,
1669,
47900,
98462,
1972,
198,
77333,
35,
530,
261,
1669,
7860,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLegacyMultipleGoroutines(t *testing.T) {
input := CreateTestInput(t)
ctx, accKeeper, bankKeeper, keeper := input.Ctx, input.AccKeeper, input.BankKeeper, input.WasmKeeper
deposit := sdk.NewCoins(sdk.NewInt64Coin("denom", 100000))
topUp := sdk.NewCoins(sdk.NewInt64Coin("denom", 5000))
creator := createFake... | explode_data.jsonl/20776 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 696
} | [
2830,
3393,
77415,
32089,
38,
269,
28628,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
4230,
2271,
2505,
1155,
340,
20985,
11,
1029,
77233,
11,
6073,
77233,
11,
53416,
1669,
1946,
727,
3998,
11,
1946,
77538,
77233,
11,
1946,
1785,
1180,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNestedMapPinNested(t *testing.T) {
if _, err := NewMap(&MapSpec{
Type: ArrayOfMaps,
KeySize: 4,
ValueSize: 4,
MaxEntries: 2,
InnerMap: &MapSpec{
Name: "inner",
Type: Array,
KeySize: 4,
ValueSize: 4,
MaxEntries: 1,
Pinning: PinByName,
},
}); err == ni... | explode_data.jsonl/21651 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
71986,
2227,
19861,
71986,
1155,
353,
8840,
836,
8,
341,
743,
8358,
1848,
1669,
1532,
2227,
2099,
2227,
8327,
515,
197,
27725,
25,
981,
2910,
2124,
36562,
345,
197,
55242,
1695,
25,
262,
220,
19,
345,
197,
47399,
1695,
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 TestFlowDirection(t *testing.T) {
in, err := policydb.GetFlowDescriptionFromFlowString("permit in ip from any to any")
assert.NoError(t, err)
assert.Equal(t, in.Match.Direction, protos.FlowMatch_UPLINK)
out, err := policydb.GetFlowDescriptionFromFlowString("permit out ip from any to any")
assert.Equal(t, out... | explode_data.jsonl/76963 | {
"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,
18878,
9268,
1155,
353,
8840,
836,
8,
341,
17430,
11,
1848,
1669,
4842,
1999,
2234,
18878,
5009,
3830,
18878,
703,
445,
39681,
304,
5997,
504,
894,
311,
894,
1138,
6948,
35699,
1155,
11,
1848,
340,
6948,
12808,
1155,
11,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWSUnmask(t *testing.T) {
key := []byte{1, 2, 3, 4}
orgBuf := []byte("this is a clear text")
mask := func() []byte {
t.Helper()
buf := append([]byte(nil), orgBuf...)
testWSSimpleMask(key, buf)
// First ensure that the content is masked.
if bytes.Equal(buf, orgBuf) {
t.Fatalf("Masking did not do... | explode_data.jsonl/42686 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 356
} | [
2830,
3393,
7433,
1806,
11258,
1155,
353,
8840,
836,
8,
341,
23634,
1669,
3056,
3782,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
532,
87625,
15064,
1669,
3056,
3782,
445,
574,
374,
264,
2797,
1467,
5130,
74912,
1669,
2915,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetOptionsThresholds(t *testing.T) {
kp0 := newKeypair0()
sourceAccount := NewSimpleAccount(kp0.Address(), int64(40385577484322))
setOptions := SetOptions{
LowThreshold: NewThreshold(1),
MediumThreshold: NewThreshold(2),
HighThreshold: NewThreshold(2),
}
received, err := newSignedTransaction(... | explode_data.jsonl/20668 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 447
} | [
2830,
3393,
1649,
3798,
37841,
82,
1155,
353,
8840,
836,
8,
341,
16463,
79,
15,
1669,
501,
6608,
1082,
1310,
15,
741,
47418,
7365,
1669,
1532,
16374,
7365,
5969,
79,
15,
26979,
1507,
526,
21,
19,
7,
19,
15,
18,
23,
20,
20,
22,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUserEntityDisableWRONGBODY(t *testing.T) {
resp, _ := sendPut("http://localhost:8080/TESTING/YourAccount&q=Disable", UserEntityDisableWRONGBODY, auth.Header.Get("Authorization"))
response := responseToString(resp)
compareResults(t, response, HyperText.CustomResponses["wrong-body"])
} | explode_data.jsonl/59343 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
1474,
3030,
25479,
17925,
711,
5381,
21050,
1155,
353,
8840,
836,
8,
341,
34653,
11,
716,
1669,
3624,
19103,
445,
1254,
1110,
8301,
25,
23,
15,
23,
15,
14,
10033,
1718,
14,
7771,
7365,
62735,
28,
25479,
497,
2657,
3030,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandlePR(t *testing.T) {
fc := newFakeClient()
newContributor := github.User{
Login: "newContributor",
Name: "newContributor fullname",
Type: github.UserTypeUser,
}
contributorA := github.User{
Login: "contributorA",
Name: "contributorA fullname",
Type: github.UserTypeUser,
}
contributor... | explode_data.jsonl/7530 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2384
} | [
2830,
3393,
6999,
6480,
1155,
353,
8840,
836,
8,
341,
1166,
66,
1669,
501,
52317,
2959,
2822,
8638,
52984,
4831,
1669,
31004,
7344,
515,
197,
197,
6231,
25,
330,
931,
52984,
4831,
756,
197,
21297,
25,
220,
330,
931,
52984,
4831,
61036... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccScimGroupResource(t *testing.T) {
//var secretScope model.Secre
var ScimGroup model.Group
// generate a random name for each tokenInfo test run, to avoid
// collisions from multiple concurrent tests.
// the acctest package includes many helpers such as RandStringFromCharSet
// See https://godoc.org/gi... | explode_data.jsonl/68181 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2192
} | [
2830,
3393,
14603,
3326,
318,
2808,
4783,
1155,
353,
8840,
836,
8,
341,
197,
322,
947,
6234,
10803,
1614,
808,
757,
265,
198,
2405,
2463,
318,
2808,
1614,
5407,
198,
197,
322,
6923,
264,
4194,
829,
369,
1817,
3950,
1731,
1273,
1598,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWriteAfterHijack(t *testing.T) {
req := reqBytes("GET / HTTP/1.1\nHost: golang.org")
var buf bytes.Buffer
wrotec := make(chan bool, 1)
conn := &rwTestConn{
Reader: bytes.NewReader(req),
Writer: &buf,
closec: make(chan bool, 1),
}
handler := HandlerFunc(func(rw ResponseWriter, r *Request) {
conn, ... | explode_data.jsonl/22460 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 350
} | [
2830,
3393,
7985,
6025,
39,
3172,
473,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
4232,
7078,
445,
3806,
608,
10130,
14,
16,
13,
16,
1699,
9296,
25,
342,
37287,
2659,
1138,
2405,
6607,
5820,
22622,
198,
6692,
5529,
66,
1669,
1281,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDataPostExplain(t *testing.T) {
f := newFixture(t)
f.v1(http.MethodPut, "/policies/test", `package test
p = [1, 2, 3, 4] { true }`, 200, "")
req := newReqV1(http.MethodPost, "/data/test/p?explain=full", "")
f.reset()
f.server.Handler.ServeHTTP(f.recorder, req)
var result types.DataResponseV1
if err... | explode_data.jsonl/78997 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 355
} | [
2830,
93200,
4133,
840,
20772,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
692,
1166,
3133,
16,
19886,
20798,
19103,
11,
3521,
79,
42038,
12697,
497,
1565,
1722,
1273,
271,
79,
284,
508,
16,
11,
220,
17,
11,
220,
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... | 6 |
func TestUpdateHistogram(t *testing.T) {
t.Parallel()
feedbacks := []Feedback{
newFeedback(0, 1, 10000, 1),
newFeedback(1, 2, 1, 1),
newFeedback(2, 3, 3, 1),
newFeedback(4, 5, 2, 1),
newFeedback(5, 7, 4, 1),
}
feedbacks = append(feedbacks, genFeedbacks(8, 20)...)
feedbacks = append(feedbacks, genFeedback... | explode_data.jsonl/22095 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 411
} | [
2830,
3393,
4289,
77210,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
1166,
12051,
24113,
1669,
3056,
35348,
515,
197,
8638,
35348,
7,
15,
11,
220,
16,
11,
220,
16,
15,
15,
15,
15,
11,
220,
16,
1326,
197,
8638,
35348,
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 TestGetOrderHistory(t *testing.T) {
t.Parallel()
var getOrdersRequest = order.GetOrdersRequest{
Type: order.AnyType,
AssetType: asset.Spot,
}
_, err := b.GetOrderHistory(context.Background(), &getOrdersRequest)
if err == nil {
t.Error("Expected: 'At least one currency is required to fetch order h... | explode_data.jsonl/76660 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 287
} | [
2830,
3393,
1949,
4431,
13424,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
2405,
633,
24898,
1900,
284,
1973,
2234,
24898,
1900,
515,
197,
27725,
25,
414,
1973,
13311,
929,
345,
197,
197,
16604,
929,
25,
9329,
808,
19099,
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... | 9 |
func TestReplaceIndexInIndexPattern(t *testing.T) {
// Test that replacing of index name in index pattern works no matter
// what the inner types are (MapStr, map[string]interface{} or interface{}).
// Also ensures that the inner types are not modified after replacement.
tests := []struct {
title string
inpu... | explode_data.jsonl/54839 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1019
} | [
2830,
3393,
23107,
1552,
641,
1552,
15760,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
429,
24891,
315,
1922,
829,
304,
1922,
5383,
4278,
902,
4925,
198,
197,
322,
1128,
279,
9179,
4494,
525,
320,
2227,
2580,
11,
2415,
14032,
31344,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvalidIgnConfig(t *testing.T) {
oldIgnConfig := ctrlcommon.NewIgnConfig()
oldMcfg := helpers.CreateMachineConfigFromIgnition(oldIgnConfig)
// create file to write that contains an impermissable relative path
tempFileContents := ign3types.Resource{Source: helpers.StrToPtr("data:,hello%20world%0A")}
tempM... | explode_data.jsonl/28213 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 373
} | [
2830,
3393,
7928,
43337,
2648,
1155,
353,
8840,
836,
8,
341,
61828,
43337,
2648,
1669,
23743,
5464,
7121,
43337,
2648,
741,
61828,
44,
14072,
1669,
30187,
7251,
21605,
2648,
3830,
43337,
680,
21972,
43337,
2648,
692,
197,
322,
1855,
1034,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDataResultSetUnfulfilledOverwitesUnfulfilled(t *testing.T) {
start := time.Now().Truncate(testBlockSize)
r := NewDataBootstrapResult()
r.SetUnfulfilled(shardTimeRanges{
0: xtime.NewRanges(xtime.Range{
Start: start,
End: start.Add(8 * testBlockSize),
}),
})
expected := shardTimeRanges{0: xtime... | explode_data.jsonl/4666 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 344
} | [
2830,
93200,
33208,
1806,
1262,
27511,
1918,
86,
3611,
1806,
1262,
27511,
1155,
353,
8840,
836,
8,
341,
21375,
1669,
882,
13244,
1005,
1282,
26900,
8623,
89932,
340,
7000,
1669,
1532,
1043,
45511,
2077,
741,
7000,
4202,
1806,
1262,
27511,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRedirectTokenResponse(t *testing.T) {
w := httptest.NewRecorder()
r := NewTokenResponse("foo", "bar", 1)
r = r.SetRedirect("http://example.com?foo=bar", "baz")
err := WriteTokenResponse(w, r)
assert.NoError(t, err)
assert.Equal(t, http.StatusSeeOther, w.Code)
assert.Equal(t,
"http://example.com?foo=b... | explode_data.jsonl/1729 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
17725,
3323,
2582,
1155,
353,
8840,
836,
8,
341,
6692,
1669,
54320,
70334,
7121,
47023,
741,
7000,
1669,
1532,
3323,
2582,
445,
7975,
497,
330,
2257,
497,
220,
16,
340,
7000,
284,
435,
4202,
17725,
445,
1254,
1110,
8687,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUpgradeConfigByStore(t *testing.T) {
ctx, keeper := createTestInput(t)
store := ctx.KVStore(keeper.storeKey)
_, found := keeper.GetUpgradeConfigByStore(store)
require.False(t, found)
appUpgradeConfig := DefaultUpgradeConfig("http://web.abc")
require.NotPanics(t, func() { keeper.SetUpgradeConfig(ctx, a... | explode_data.jsonl/74391 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
43861,
2648,
1359,
6093,
1155,
353,
8840,
836,
8,
341,
20985,
11,
53416,
1669,
1855,
2271,
2505,
1155,
692,
57279,
1669,
5635,
11352,
53,
6093,
7,
18861,
16114,
1592,
692,
197,
6878,
1730,
1669,
53416,
2234,
43861,
2648,
135... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientUnregister(t *testing.T) {
cs := createClientStore()
info := createClientInfo()
clientID := info.ID
connID := info.ConnID
// Unregistering one that does not exist should not cause a crash
cs.unregister(clientID)
// Now register a client
cs.register(info)
// Verify it's in the list of clients... | explode_data.jsonl/37757 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 323
} | [
2830,
3393,
2959,
1806,
6343,
1155,
353,
8840,
836,
8,
341,
71899,
1669,
1855,
2959,
6093,
2822,
27043,
1669,
1855,
2959,
1731,
741,
25291,
915,
1669,
3546,
9910,
198,
32917,
915,
1669,
3546,
50422,
915,
271,
197,
322,
1230,
6343,
287,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAPIRequests(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
b, err := ioutil.ReadAll(r.Body)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
fmt.Fprintf(w, "%s %s %s", r.Method, r.RequestURI, string(b))
... | explode_data.jsonl/66375 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 500
} | [
2830,
3393,
7082,
35295,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
2233,
11,
1848,
1669,
43144,
41851,
2601,
20934,
340,
197,
743,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestClusterReconcilePhases(t *testing.T) {
t.Run("reconcile infrastructure", func(t *testing.T) {
cluster := &clusterv1.Cluster{
ObjectMeta: metav1.ObjectMeta{
Name: "test-cluster",
Namespace: "test-namespace",
},
Status: clusterv1.ClusterStatus{
InfrastructureReady: true,
},
Spe... | explode_data.jsonl/66909 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2563
} | [
2830,
3393,
28678,
693,
40446,
457,
3357,
2264,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
265,
40446,
457,
13737,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
18855,
1669,
609,
564,
590,
648,
16,
72883,
515,
298,
23816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_getGroup(t *testing.T) {
wssdcloudGroup := &wssdcloud.Group{
Name: name,
Id: Id,
}
grp := getGroup(wssdcloudGroup)
if *grp.ID != wssdcloudGroup.Id {
t.Errorf("ID doesnt match post conversion")
}
if *grp.Name != wssdcloudGroup.Name {
t.Errorf("Name doesnt match post conversion")
}
} | explode_data.jsonl/1455 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
3062,
2808,
1155,
353,
8840,
836,
8,
341,
6692,
778,
67,
12361,
2808,
1669,
609,
86,
778,
67,
12361,
5407,
515,
197,
21297,
25,
829,
345,
197,
67211,
25,
256,
5223,
345,
197,
532,
197,
42854,
1669,
633,
2808,
3622,
778,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrorRequiredWithDefault(t *testing.T) {
type config struct {
IsRequired string `env:"IS_REQUIRED,required" envDefault:"important"`
}
cfg := &config{}
os.Setenv("IS_REQUIRED", "")
defer os.Clearenv()
assert.NoError(t, Parse(cfg))
assert.Equal(t, "", cfg.IsRequired)
} | explode_data.jsonl/78779 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
1454,
8164,
2354,
3675,
1155,
353,
8840,
836,
8,
341,
13158,
2193,
2036,
341,
197,
197,
58541,
914,
1565,
3160,
2974,
1637,
53912,
11,
6279,
1,
6105,
3675,
2974,
15333,
8805,
197,
630,
50286,
1669,
609,
1676,
31483,
25078,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExportTraceDataFullTrace(t *testing.T) {
resource := &resourcepb.Resource{
Labels: map[string]string{
serviceNameKey: "test-service",
"resource": "R1",
},
}
spans := []*tracepb.Span{
{
TraceId: []byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
SpanId: []byte{0, 0, 0, 0, 0, 0, 0... | explode_data.jsonl/16228 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1111
} | [
2830,
3393,
16894,
6550,
1043,
9432,
6550,
1155,
353,
8840,
836,
8,
341,
50346,
1669,
609,
9233,
16650,
20766,
515,
197,
197,
23674,
25,
2415,
14032,
30953,
515,
298,
52934,
675,
1592,
25,
330,
1944,
23461,
756,
298,
197,
1,
9233,
788... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRouteFailurePropagation(t *testing.T) {
svc := &Service{}
svc.Status.InitializeConditions()
checkConditionOngoingService(svc.Status, ServiceConditionReady, t)
checkConditionOngoingService(svc.Status, ServiceConditionConfigurationsReady, t)
checkConditionOngoingService(svc.Status, ServiceConditionRoutesRea... | explode_data.jsonl/17371 | {
"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,
4899,
17507,
35172,
1155,
353,
8840,
836,
8,
341,
1903,
7362,
1669,
609,
1860,
16094,
1903,
7362,
10538,
45829,
35435,
741,
25157,
10547,
46,
85071,
1860,
1141,
7362,
10538,
11,
5362,
10547,
19202,
11,
259,
340,
25157,
10547,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStringArray(t *testing.T) {
tt := test.Start(t).ScenarioWithoutHorizon("base")
defer tt.Finish()
expr := StringArray([]string{"1", "2", "3"}).(sq.Sqlizer)
sql, args, err := expr.ToSql()
tt.Require.NoError(err)
tt.Assert.Equal("?::character varying[]", sql)
tt.Assert.Len(args, 1)
tt.Assert.Equal("{1,... | explode_data.jsonl/69239 | {
"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,
703,
1857,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
1273,
12101,
1155,
568,
54031,
26040,
39601,
16973,
445,
3152,
1138,
16867,
17853,
991,
18176,
2822,
8122,
649,
1669,
923,
1857,
10556,
917,
4913,
16,
497,
330,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFilteredBlockResponseSenderIsFiltered(t *testing.T) {
var fbrs interface{} = &filteredBlockResponseSender{}
filtered, ok := fbrs.(deliver.Filtered)
assert.True(t, ok, "should be filtered")
assert.True(t, filtered.IsFiltered(), "should return true from IsFiltered")
} | explode_data.jsonl/67476 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
67310,
4713,
2582,
20381,
3872,
67310,
1155,
353,
8840,
836,
8,
341,
2405,
282,
1323,
82,
3749,
6257,
284,
609,
41131,
4713,
2582,
20381,
16094,
50108,
291,
11,
5394,
1669,
282,
1323,
82,
12832,
74728,
31696,
291,
340,
6948,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestValidate_FragmentsOnCompositeTypes_UnionIsValidFragmentType(t *testing.T) {
testutil.ExpectPassesRule(t, graphql.FragmentsOnCompositeTypesRule, `
fragment validFragment on CatOrDog {
__typename
}
`)
} | explode_data.jsonl/56011 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
17926,
1400,
41956,
1925,
41685,
4173,
62,
32658,
55470,
9488,
929,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
81893,
12187,
288,
11337,
1155,
11,
48865,
991,
41956,
1925,
41685,
4173,
11337,
11,
22074,
414,
12289,
2697,
9488,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDsa(t *testing.T) {
// AsnSignatureTestVector
type AsnSignatureTestVector struct {
// A brief description of the test case
Comment string `json:"comment,omitempty"`
// A list of flags
Flags []string `json:"flags,omitempty"`
// The message to sign
Msg string `json:"msg,omitempty"`
// Test re... | explode_data.jsonl/32397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1142
} | [
2830,
3393,
35,
9081,
1155,
353,
8840,
836,
8,
341,
197,
322,
1634,
77,
25088,
2271,
3781,
198,
13158,
1634,
77,
25088,
2271,
3781,
2036,
1476,
197,
197,
322,
362,
9814,
4008,
315,
279,
1273,
1142,
198,
197,
197,
10677,
914,
1565,
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 TestShouldCreateSyncer(t *testing.T) {
var (
anySupports = []string{"iframe"}
anyEndpoint = &config.SyncerEndpoint{}
anyCORS = true
)
testCases := []struct {
description string
given config.BidderInfo
expected bool
}{
{
description: "Enabled, No Syncer",
given: config.Bi... | explode_data.jsonl/52930 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1378
} | [
2830,
3393,
14996,
4021,
12154,
261,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
197,
3767,
7916,
82,
284,
3056,
917,
4913,
23207,
16707,
197,
197,
3767,
27380,
284,
609,
1676,
92183,
261,
27380,
16094,
197,
197,
3767,
34,
9821,
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 TestCreateInitialInitsystemConfig(t *testing.T) {
t.Run("successfully get initial gpinitsystem config array", func(t *testing.T) {
utils.System.Hostname = func() (string, error) {
return "mdw", nil
}
actualConfig, err := CreateInitialInitsystemConfig("/data/qddir/seg.AAAAAAAAAAA.-1")
if err != nil {
... | explode_data.jsonl/11384 | {
"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,
4021,
6341,
641,
1199,
612,
2648,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
60505,
633,
2856,
342,
13273,
1199,
612,
2193,
1334,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
80206,
16620,
29840,
606,
284,
2915,
368,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIDF2(t *testing.T) {
df := NewDocumentFrequency()
terms := []string{"car", "auto", "insurance", "best"}
vocab1 := map[string]int{
terms[0]: 27,
terms[1]: 3,
terms[3]: 14,
}
df.AddVocabulary(vocab1)
vocab2 := map[string]int{
terms[0]: 4,
terms[1]: 33,
terms[2]: 33,
}
df.AddVocabulary(vocab2)... | explode_data.jsonl/9830 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 280
} | [
2830,
3393,
915,
37,
17,
1155,
353,
8840,
836,
8,
341,
85187,
1669,
1532,
7524,
38614,
741,
197,
18347,
1669,
3056,
917,
4913,
6918,
497,
330,
3902,
497,
330,
69954,
497,
330,
15862,
16707,
5195,
20497,
16,
1669,
2415,
14032,
63025,
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... | 2 |
func TestLocation_SetID(t *testing.T) {
m1 := &Location{LocationID: 1}
m1.SetID(10)
assert.Equal(t, 10, m1.LocationID)
m2 := Location{LocationID: 2}
m2.SetID(20)
assert.Equal(t, 20, m2.LocationID)
} | explode_data.jsonl/60842 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
4707,
14812,
915,
1155,
353,
8840,
836,
8,
341,
2109,
16,
1669,
609,
4707,
90,
4707,
915,
25,
220,
16,
532,
2109,
16,
4202,
915,
7,
16,
15,
340,
6948,
12808,
1155,
11,
220,
16,
15,
11,
296,
16,
4515,
915,
692,
2109,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsValidIPv4Address(t *testing.T) {
goodValues := []string{
"1.1.1.1",
"1.1.1.01",
"255.0.0.1",
"1.0.0.0",
"0.0.0.0",
}
for _, val := range goodValues {
if msgs := IsValidIPv4Address(field.NewPath(""), val); len(msgs) != 0 {
t.Errorf("expected %q to be valid IPv4 address: %v", val, msgs)
}
... | explode_data.jsonl/11826 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 375
} | [
2830,
3393,
55470,
58056,
19,
4286,
1155,
353,
8840,
836,
8,
341,
3174,
1386,
6227,
1669,
3056,
917,
515,
197,
197,
1,
16,
13,
16,
13,
16,
13,
16,
756,
197,
197,
1,
16,
13,
16,
13,
16,
13,
15,
16,
756,
197,
197,
1,
17,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestRedis_Eval(t *testing.T) {
runOnRedis(t, func(client *Redis) {
_, err := NewRedis(client.Addr, "").Eval(`redis.call("EXISTS", KEYS[1])`, []string{"notexist"})
assert.NotNil(t, err)
_, err = client.Eval(`redis.call("EXISTS", KEYS[1])`, []string{"notexist"})
assert.Equal(t, Nil, err)
err = client.Set(... | explode_data.jsonl/39154 | {
"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,
48137,
2089,
831,
1155,
353,
8840,
836,
8,
341,
56742,
1925,
48137,
1155,
11,
2915,
12805,
353,
48137,
8,
341,
197,
197,
6878,
1848,
1669,
1532,
48137,
12805,
93626,
11,
35229,
54469,
5809,
21748,
8524,
445,
3257,
25137,
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... | 1 |
func TestUserStoreGetAllProfiles(t *testing.T) {
Setup()
teamId := model.NewId()
u1 := &model.User{}
u1.Email = model.NewId()
Must(store.User().Save(u1))
Must(store.Team().SaveMember(&model.TeamMember{TeamId: teamId, UserId: u1.Id}))
u2 := &model.User{}
u2.Email = model.NewId()
Must(store.User().Save(u2))
... | explode_data.jsonl/5090 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 361
} | [
2830,
3393,
1474,
6093,
1949,
2403,
62719,
1155,
353,
8840,
836,
8,
341,
197,
21821,
2822,
197,
9196,
764,
1669,
1614,
7121,
764,
2822,
10676,
16,
1669,
609,
2528,
7344,
16094,
10676,
16,
24066,
284,
1614,
7121,
764,
741,
9209,
590,
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... | 5 |
func TestMakeRegistryFromAllFiles(t *testing.T) {
barProto := testutil.MustCreateFileDescriptorProto(t, testutil.FileDescriptorSpec{
Filename: "bar.proto",
Template: `syntax = "proto3";
message Bar {
string baz = 1;
}`,
})
fooProto := testutil.MustCreateFileDescriptorProto(t, testutil.FileDescriptorSpec{
F... | explode_data.jsonl/3074 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 607
} | [
2830,
3393,
8078,
15603,
3830,
2403,
10809,
1155,
353,
8840,
836,
8,
341,
90709,
31549,
1669,
1273,
1314,
50463,
4021,
1703,
11709,
31549,
1155,
11,
1273,
1314,
8576,
11709,
8327,
515,
197,
12727,
4033,
25,
330,
2257,
57322,
756,
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... | 8 |
func TestAll(t *testing.T) {
var users []*User
qs := dORM.QueryTable("user")
num, err := qs.OrderBy("Id").All(&users)
throwFail(t, err)
throwFailNow(t, AssertIs(num, 3))
throwFail(t, AssertIs(users[0].UserName, "slene"))
throwFail(t, AssertIs(users[1].UserName, "astaxie"))
throwFail(t, AssertIs(users[2].UserNa... | explode_data.jsonl/18134 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 718
} | [
2830,
3393,
2403,
1155,
353,
8840,
836,
8,
341,
2405,
3847,
29838,
1474,
198,
18534,
82,
1669,
294,
4365,
15685,
2556,
445,
872,
1138,
22431,
11,
1848,
1669,
32421,
43040,
445,
764,
1827,
2403,
2099,
4218,
340,
9581,
19524,
1155,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOneShot(t *testing.T) {
Debug = &testLogger{t}
tImg := testImages[20]
tImg.PSD = "test1.psd"
testOne(tImg, t)
} | explode_data.jsonl/50812 | {
"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,
3966,
36402,
1155,
353,
8840,
836,
8,
341,
34424,
284,
609,
1944,
7395,
90,
83,
532,
3244,
13033,
1669,
1273,
14228,
58,
17,
15,
921,
3244,
13033,
1069,
5491,
284,
330,
1944,
16,
556,
13446,
698,
18185,
3966,
1155,
13033,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoJailedValidators(t *testing.T) {
codec := newStakingTestCodec()
opAddr1, err := sdk.AccAddressFromBech32("cosmosaccaddr1chchjxgackcqkn9fqgpsc4n9xamx4flgndapzg")
require.NoError(t, err)
validators := []stake.Validator{
stake.Validator{Owner: opAddr1, Revoked: false},
}
raw, err := codec.MarshalJSON... | explode_data.jsonl/78971 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 351
} | [
2830,
3393,
2753,
41,
5687,
31748,
1155,
353,
8840,
836,
8,
341,
43343,
66,
1669,
501,
623,
1765,
2271,
36913,
2822,
39703,
13986,
16,
11,
1848,
1669,
45402,
77538,
4286,
3830,
3430,
331,
18,
17,
445,
9407,
8631,
4475,
6214,
16,
331,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEmailAddressValidate(t *testing.T) {
kases := map[string]error{
"abc@gmail.com": nil,
"132@hotmail.com": nil,
"1-3-2@test.org": nil,
"1.3.2@test.org": nil,
"a_123@test.org.cn": nil,
`first.last@iana.org`: nil,
... | explode_data.jsonl/67893 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1615
} | [
2830,
3393,
79986,
17926,
1155,
353,
8840,
836,
8,
341,
16463,
2264,
1669,
2415,
14032,
60,
841,
515,
197,
197,
1,
13683,
10375,
905,
788,
1698,
2092,
345,
197,
197,
1,
16,
18,
17,
58031,
905,
788,
394,
2092,
345,
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... | 1 |
func TestFormatterNamedArguments(test *testing.T) {
formatted, err := formatter.New().Format("{z} {y} {x} {z}", formatter.Named{
"x": 1,
"y": 2,
"z": 3,
}, "c")
assert.NoError(test, err)
assert.Equal(test, "3 2 1 3 c", formatted)
} | explode_data.jsonl/39732 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
14183,
15810,
19139,
8623,
353,
8840,
836,
8,
341,
37410,
12127,
11,
1848,
1669,
24814,
7121,
1005,
4061,
13976,
89,
92,
314,
88,
92,
314,
87,
92,
314,
89,
9545,
24814,
57872,
515,
197,
197,
65438,
788,
220,
16,
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 TestInterpretStringFunction(t *testing.T) {
t.Parallel()
inter := parseCheckAndInterpret(t, `
fun test(): String {
return String()
}
`)
result, err := inter.Invoke("test")
require.NoError(t, err)
RequireValuesEqual(
t,
inter,
interpreter.NewStringValue(""),
result,
)
} | explode_data.jsonl/73415 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 135
} | [
2830,
3393,
3306,
8043,
703,
5152,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
58915,
1669,
4715,
3973,
3036,
3306,
8043,
1155,
11,
22074,
414,
2464,
1273,
4555,
923,
341,
688,
470,
923,
741,
414,
456,
262,
1565,
692,
9559... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHttpGet(t *testing.T) {
// 200.
rc, err := HttpGet(&http.Client{}, "http://example.com", nil)
if err != nil {
t.Fatalf("HttpGet:\n Expect => %v\n Got => %s\n", nil, err)
}
p, err := ioutil.ReadAll(rc)
if err != nil {
t.Errorf("HttpGet:\n Expect => %v\n Got => %s\n", nil, err)
}
s := string(p)
if !... | explode_data.jsonl/57411 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
29774,
1155,
353,
8840,
836,
8,
341,
197,
322,
220,
17,
15,
15,
624,
30295,
11,
1848,
1669,
4823,
1949,
2099,
1254,
11716,
22655,
330,
1254,
1110,
8687,
905,
497,
2092,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
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... | 4 |
func TestUpdatePods(t *testing.T) {
manager := NewReplicationManager(fake.NewSimpleClientset(), controller.NoResyncPeriodFunc, BurstReplicas, 0)
manager.podStoreSynced = alwaysReady
received := make(chan string)
manager.syncHandler = func(key string) error {
obj, exists, err := manager.rcStore.Store.GetByKey(ke... | explode_data.jsonl/37490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 578
} | [
2830,
3393,
4289,
23527,
82,
1155,
353,
8840,
836,
8,
341,
92272,
1669,
1532,
18327,
1693,
2043,
74138,
7121,
16374,
2959,
746,
1507,
6461,
16766,
1061,
1721,
23750,
9626,
11,
77467,
18327,
52210,
11,
220,
15,
340,
92272,
556,
347,
6093... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRuleNestedSubQueries(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := []string{
`SELECT s,p,d FROM tab WHERE p.p_id = (SELECT s.p_id FROM tab WHERE s.c_id = 100996 AND s.q = 1 );`,
}
for _, sql := range sqls {
q, err := NewQuery4Audit(sql)
if err == nil {
... | explode_data.jsonl/76803 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 244
} | [
2830,
3393,
11337,
71986,
3136,
55261,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
3056,
917,
515,
197,
197,
63,
4858,
274,
7237,
11991,
4295,
565... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEdgeGroup(t *testing.T) {
edgeInfo := getTestEdgeInfo(t, "account")
edgeGroup := edgeInfo.GetAssociationEdgeGroupByStatusName("FriendshipStatus")
friendRequestsEdge := edgeInfo.GetAssociationEdgeByName("FriendRequests")
friendsEdge := edgeInfo.GetAssociationEdgeByName("Friends")
expectedFriendRequestsEd... | explode_data.jsonl/73728 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 535
} | [
2830,
3393,
11656,
2808,
1155,
353,
8840,
836,
8,
341,
197,
7186,
1731,
1669,
633,
2271,
11656,
1731,
1155,
11,
330,
4608,
1138,
197,
7186,
2808,
1669,
6821,
1731,
2234,
63461,
11656,
2808,
1359,
2522,
675,
445,
41637,
5270,
2522,
5130,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReplace(t *testing.T) {
cases := []struct {
desc string
doc string
id string
frag string
exp string
replaceChild bool
}{
{
desc: "replace element by given id when element is empty",
doc: `<b><i id="x"></i></b>`, // empty start
... | explode_data.jsonl/24374 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1363
} | [
2830,
3393,
23107,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
41653,
260,
914,
198,
197,
59536,
688,
914,
198,
197,
15710,
1843,
914,
198,
197,
1166,
4101,
260,
914,
198,
197,
48558,
688,
914,
198,
197,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestObjectNames(t *testing.T) {
ctx := context.Background()
c, rollback := makeConnectionWithObjectHeaders(t)
defer rollback()
objects, err := c.ObjectNames(ctx, CONTAINER, nil)
if err != nil {
t.Fatal(err)
}
if len(objects) != 1 || objects[0] != OBJECT {
t.Error("Incorrect listing", objects)
}
} | explode_data.jsonl/12694 | {
"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,
1190,
7980,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
11,
60414,
1669,
1281,
4526,
2354,
1190,
10574,
1155,
340,
16867,
60414,
741,
197,
19210,
11,
1848,
1669,
272,
8348,
7980,
7502,
11,
16120,
34521... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoSynproxyFile(t *testing.T) {
tmpfile := makeFakeSynproxyFile([]byte(synproxyFileNormal))
// Remove file to generate "no such file" error
os.Remove(tmpfile)
k := Synproxy{
statFile: tmpfile,
}
acc := testutil.Accumulator{}
err := k.Gather(&acc)
assert.Error(t, err)
} | explode_data.jsonl/17569 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
2753,
37134,
22803,
1703,
1155,
353,
8840,
836,
8,
341,
20082,
1192,
1669,
1281,
52317,
37134,
22803,
1703,
10556,
3782,
1141,
1872,
22803,
1703,
12206,
1171,
197,
322,
10783,
1034,
311,
6923,
330,
2152,
1741,
1034,
1,
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 |
func TestSalesforceAPI_DeletedRecords(t *testing.T) {
type fields struct {
metadata *metadata
describe *describe
dml *dml
query *query
}
type args struct {
sobject string
startDate time.Time
endDate time.Time
}
tests := []struct {
name string
fields fields
args args
want ... | explode_data.jsonl/45146 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 600
} | [
2830,
3393,
35418,
8833,
7082,
24597,
6873,
25876,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
2109,
7603,
353,
17637,
198,
197,
82860,
353,
12332,
198,
197,
2698,
1014,
414,
353,
67,
1014,
198,
197,
27274,
262,
353,
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... | 3 |
func TestFaultSlasher_Slash(t *testing.T) {
tf.UnitTest(t)
ctx := context.Background()
signer, _ := types.NewMockSignersAndKeyInfo(3)
ownWorker := signer.Addresses[0]
t.Run("ok with no miners", func(t *testing.T) {
height := types.NewBlockHeight(1)
data, err := encoding.Encode(&map[string]uint64{})
require... | explode_data.jsonl/46783 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2659
} | [
2830,
3393,
58780,
7442,
33767,
1098,
24686,
1155,
353,
8840,
836,
8,
341,
3244,
69,
25159,
2271,
1155,
692,
20985,
1669,
2266,
19047,
741,
69054,
261,
11,
716,
1669,
4494,
7121,
11571,
7264,
388,
3036,
1592,
1731,
7,
18,
340,
197,
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... | 1 |
func TestClient(t *testing.T) {
testKey := "testKey"
claims := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.RegisteredClaims{})
token, err := claims.SignedString([]byte(testKey))
if err != nil {
panic(err)
}
tProvider := func(*jwt.Token) (interface{}, error) {
return []byte(testKey), nil
}
tests := []stru... | explode_data.jsonl/47108 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 552
} | [
2830,
3393,
2959,
1155,
353,
8840,
836,
8,
341,
18185,
1592,
1669,
330,
1944,
1592,
1837,
197,
48561,
1669,
24589,
7121,
2354,
51133,
3325,
9306,
41152,
287,
3523,
11961,
17,
20,
21,
11,
24589,
19983,
291,
51133,
37790,
43947,
11,
1848,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_UpForbidMid(t *testing.T) {
Convey("UpForbidMid", t, func() {
err := d.UpMidForbidStatus(context.TODO(), 1684013, 0)
So(err, ShouldBeNil)
})
} | explode_data.jsonl/48604 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 72
} | [
2830,
3393,
88425,
2461,
20648,
33648,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2324,
2461,
20648,
33648,
497,
259,
11,
2915,
368,
341,
197,
9859,
1669,
294,
60828,
33648,
2461,
20648,
2522,
5378,
90988,
1507,
220,
16,
21,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestTfgridReservationZdb1_ToProvisionType(t *testing.T) {
type fields struct {
WorkloadID int64
NodeID string
ReservationID int64
Size int64
Mode workloads.ZDBModeEnum
Password string
DiskType workloads.DiskTypeEnum
Public bool
}
tests := []struct {
... | explode_data.jsonl/67196 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1171
} | [
2830,
3393,
51,
69,
4203,
54948,
57,
1999,
16,
38346,
1336,
13013,
929,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
6776,
1078,
915,
262,
526,
21,
19,
198,
197,
30217,
915,
286,
914,
198,
197,
197,
54948,
915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_wordBreak4(t *testing.T) {
assert.Equal(t,
[]string{
"a a a a", "aa a a", "a aa a", "aaa a", "a a aa", "aa aa", "a aaa",
},
wordBreak("aaaa", []string{"a", "aa", "aaa"}))
} | explode_data.jsonl/37695 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
13533,
22524,
19,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
1155,
345,
197,
197,
1294,
917,
515,
298,
197,
56693,
264,
264,
264,
497,
330,
5305,
264,
264,
497,
330,
64,
29009,
264,
497,
330,
32646,
264,
497,
330,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNibble(t *testing.T) {
for n, test := range nTestEntries {
vm := &MinFuckVM{Code: test.code}
gets := make([]byte, test.read)
for i := 0; i < test.read; i++ {
var err error
gets[i], err = vm.nibble()
if err != nil {
if !test.err {
t.Errorf("Test #%d failed: VM should not return error wh... | explode_data.jsonl/5840 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
29125,
891,
1155,
353,
8840,
836,
8,
341,
2023,
308,
11,
1273,
1669,
2088,
308,
2271,
24533,
341,
197,
54879,
1669,
609,
6217,
76374,
11187,
90,
2078,
25,
1273,
10210,
532,
197,
10366,
82,
1669,
1281,
10556,
3782,
11,
1273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTolerationsTolerateTaintsWithFilter(t *testing.T) {
testCases := []struct {
description string
tolerations []v1.Toleration
taints []v1.Taint
applyFilter taintsFilterFunc
expectTolerated bool
}{
{
description: "empty tolerations tolerate empty taints",
tolerations: ... | explode_data.jsonl/25713 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1495
} | [
2830,
3393,
51,
22072,
804,
51,
22072,
349,
51,
1641,
16056,
5632,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
42407,
257,
914,
198,
197,
3244,
22072,
804,
257,
3056,
85,
16,
836,
337,
20927,
198,
197,
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 TestHeaderAdded(t *testing.T) {
tests := []struct {
name string
upstream string
expected string
}{{
name: "upstream env variable set",
upstream: "skaffold-v0.25.45",
expected: "kaniko/unset,skaffold-v0.25.45",
}, {
name: "upstream env variable not set",
expected: "kaniko/unset",
},
... | explode_data.jsonl/14801 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 418
} | [
2830,
3393,
4047,
19337,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
59810,
4027,
914,
198,
197,
42400,
914,
198,
197,
15170,
515,
197,
11609,
25,
257,
330,
454,
4027,
6105,
3890,
738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSortedSetRangeByLex(t *testing.T) {
testRaw(t, func(c *client) {
c.Do("ZADD", "z",
"12", "zero kelvin",
"12", "minusfour",
"12", "one",
"12", "oneone",
"12", "two",
"12", "zwei",
"12", "three",
"12", "drei",
"12", "inf",
)
c.Do("ZRANGEBYLEX", "z", "-", "+")
c.Do("ZREVRANGEBY... | explode_data.jsonl/23349 | {
"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,
51051,
1649,
6046,
1359,
47778,
1155,
353,
8840,
836,
8,
341,
18185,
20015,
1155,
11,
2915,
1337,
353,
2972,
8,
341,
197,
1444,
33596,
445,
57,
15665,
497,
330,
89,
756,
298,
197,
1,
16,
17,
497,
330,
14154,
48228,
9603,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCurrencyService(t *testing.T) {
// Connecting
//url := "127.0.0.1:7000"
url := "currencyservice:7000"
conn := connect(t, url)
defer conn.Close()
// Creating context
ctx, cn := context.WithTimeout(context.Background(), timeout)
defer cn()
// Creating the stub
client := hipstershop.NewCurrencyService... | explode_data.jsonl/44000 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 430
} | [
2830,
3393,
26321,
1860,
1155,
353,
8840,
836,
8,
341,
197,
322,
83938,
198,
197,
322,
1085,
1669,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
22,
15,
15,
15,
698,
19320,
1669,
330,
66,
4451,
1047,
1017,
25,
22,
15,
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... | 2 |
func TestOrigin_Eq(t *testing.T) {
assertEq(t, []eqAssert{
{newOrigin(), newOrigin(), true},
{newOrigin(), NewBytes([]byte{}), false},
{newOrigin(), NewBool(true), false},
{newOrigin(), NewBool(false), false},
})
} | explode_data.jsonl/3497 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
13298,
2089,
80,
1155,
353,
8840,
836,
8,
341,
6948,
27312,
1155,
11,
3056,
11006,
8534,
515,
197,
197,
90,
931,
13298,
1507,
501,
13298,
1507,
830,
1583,
197,
197,
90,
931,
13298,
1507,
1532,
7078,
10556,
3782,
6257,
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 TestDockerStopFailure(t *testing.T) {
composeMock, docker, imageMock := getComposeMocks()
imageMock.On("GetImageLabels").Return(map[string]string{}, nil)
composeMock.On("Stop", mock.Anything, mock.Anything, mock.Anything).Return(ErrSomeDockerIssue)
err := docker.Stop()
assert.Contains(t, err.Error(), messages... | explode_data.jsonl/50545 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
35,
13659,
10674,
17507,
1155,
353,
8840,
836,
8,
341,
32810,
2900,
11571,
11,
26588,
11,
2168,
11571,
1669,
633,
70492,
72577,
741,
31426,
11571,
8071,
445,
1949,
1906,
23674,
1827,
5598,
9147,
14032,
30953,
22655,
2092,
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 |
func TestPermanentDeleteTeam(t *testing.T) {
th := Setup(t)
defer th.TearDown()
enableAPITeamDeletion := *th.App.Config().ServiceSettings.EnableAPITeamDeletion
defer func() {
th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableAPITeamDeletion = &enableAPITeamDeletion })
}()
th.App.UpdateCon... | explode_data.jsonl/70712 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 778
} | [
2830,
3393,
78793,
6435,
14597,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
340,
16867,
270,
836,
682,
4454,
2822,
197,
12552,
2537,
952,
14580,
1912,
52625,
1669,
353,
339,
5105,
10753,
1005,
1860,
6086,
32287,
2537,
952,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigContainsConnStr(t *testing.T) {
connStr := os.Getenv("PGX_TEST_DATABASE")
config, err := pgx.ParseConfig(connStr)
require.NoError(t, err)
assert.Equal(t, connStr, config.ConnString())
} | explode_data.jsonl/39999 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
2648,
23805,
9701,
2580,
1155,
353,
8840,
836,
8,
341,
32917,
2580,
1669,
2643,
64883,
445,
11383,
55,
11641,
45510,
1138,
25873,
11,
1848,
1669,
17495,
87,
8937,
2648,
20571,
2580,
340,
17957,
35699,
1155,
11,
1848,
340,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPostConfirm(t *testing.T) {
t.Parallel()
h := testSetup()
r, w, _ := h.newHTTP("POST")
if err := h.totp.PostConfirm(w, r); err == nil {
t.Error("should fail because there is no totp secret")
}
user := &mocks.User{Email: "test@test.com"}
h.storer.Users[user.Email] = user
secret := makeSecretKey(h,... | explode_data.jsonl/63400 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 487
} | [
2830,
3393,
4133,
16728,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
9598,
1669,
1273,
21821,
2822,
7000,
11,
289,
11,
716,
1669,
305,
4618,
9230,
445,
2946,
5130,
743,
1848,
1669,
305,
734,
48708,
23442,
16728,
3622,
11,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServer_Request_Post_Body_ContentLength_Correct(t *testing.T) {
const content = "Some content"
testBodyContents(t, int64(len(content)), content, func(st *serverTester) {
st.writeHeaders(HeadersFrameParam{
StreamID: 1, // clients send odd numbers
BlockFragment: st.encodeHeader(
":method", "POST",
... | explode_data.jsonl/71611 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
5475,
44024,
66726,
1668,
1076,
78383,
4373,
920,
27034,
1155,
353,
8840,
836,
8,
341,
4777,
2213,
284,
330,
8373,
2213,
698,
18185,
5444,
14803,
1155,
11,
526,
21,
19,
6901,
15063,
5731,
2213,
11,
2915,
5895,
353,
4030,
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 TestValidateReplicationControllerStatus(t *testing.T) {
tests := []struct {
name string
replicas int32
fullyLabeledReplicas int32
readyReplicas int32
availableReplicas int32
observedGeneration int64
expectedErr bool
}{
{
name: "valid status",
replic... | explode_data.jsonl/1035 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1653
} | [
2830,
3393,
17926,
18327,
1693,
2051,
2522,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
271,
197,
73731,
52210,
1797,
526,
18,
17,
198,
197,
1166,
21965,
43,
22320,
18327,
52210,
526,
18,
17,
198,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRedeemWinningTickets_SingleTicket_SendersError(t *testing.T) {
sender, b, v, ts, faceValue, winProb, sig := newRecipientFixtureOrFatal(t)
r := newRecipientOrFatal(t, RandAddress(), b, v, ts, faceValue, winProb)
params := r.TicketParams(sender)
// Config stub validator with valid winning tickets
v.SetIsWi... | explode_data.jsonl/44763 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 323
} | [
2830,
3393,
6033,
68,
336,
16970,
1229,
55321,
1098,
2173,
34058,
1098,
14506,
1454,
1155,
353,
8840,
836,
8,
341,
1903,
1659,
11,
293,
11,
348,
11,
10591,
11,
3579,
1130,
11,
3164,
36980,
11,
8366,
1669,
501,
74432,
18930,
2195,
6239... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateDeveloperEmailExists(t *testing.T) {
testServer(func(s *core.Server) {
headers := make(map[string]string)
k := fernet.MustDecodeKeys("YI1ZYdopn6usnQ/5gMAHg8+pNh6D0DdaJkytdoLWUj0=")
tok, err := fernet.EncryptAndSign([]byte("mysharedtoken"), k[0])
if err != nil {
t.Fatalf("fernet encryption fai... | explode_data.jsonl/42208 | {
"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,
4021,
44911,
4781,
15575,
1155,
353,
8840,
836,
8,
341,
18185,
5475,
18552,
1141,
353,
2153,
22997,
8,
341,
197,
67378,
1669,
1281,
9147,
14032,
30953,
340,
197,
16463,
1669,
282,
13845,
50463,
32564,
8850,
445,
56,
40,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestAllocation_UploadFile(t *testing.T) {
const mockLocalPath = "1.txt"
require := require.New(t)
if teardown := setupMockFile(t, mockLocalPath); teardown != nil {
defer teardown(t)
}
a := &Allocation{
Tx: "TestAllocation_UploadFile",
ParityShards: 2,
DataShards: 2,
}
server := dev.NewBl... | explode_data.jsonl/4704 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 291
} | [
2830,
3393,
78316,
62,
13844,
1703,
1155,
353,
8840,
836,
8,
341,
4777,
7860,
7319,
1820,
284,
330,
16,
3909,
698,
17957,
1669,
1373,
7121,
1155,
340,
743,
49304,
1669,
6505,
11571,
1703,
1155,
11,
7860,
7319,
1820,
1215,
49304,
961,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestFileStoreWatcherEmitter(t *testing.T) {
if testing.Short() {
t.Skip("skipping watcher test in short mode")
}
t.Run("disabled", func(t *testing.T) {
path, tearDown := setupConfigFile(t, emptyConfig)
defer tearDown()
fsInner, err := config.NewFileStore(path, false)
require.NoError(t, err)
fs, err... | explode_data.jsonl/32383 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 918
} | [
2830,
3393,
1703,
6093,
47248,
21971,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
55727,
1273,
304,
2805,
3856,
1138,
197,
630,
3244,
16708,
445,
11978,
497,
2915,
1155,
353,
8840,
836,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDestroyFirewallRule(t *testing.T) {
handler := APIMock{
T: t,
ExpectMethod: "DELETE",
ExpectURL: "/1.0/firewall_rules/fwr-j3654",
ExpectBody: ``,
GiveBody: readJSON("firewall_rule"),
}
ts := httptest.NewServer(&handler)
defer ts.Close()
client, err := brightbox.NewClient(ts.... | explode_data.jsonl/17596 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 212
} | [
2830,
3393,
14245,
16697,
16431,
11337,
1155,
353,
8840,
836,
8,
341,
53326,
1669,
10106,
1791,
1176,
515,
197,
10261,
25,
310,
259,
345,
197,
35911,
3523,
25,
330,
14424,
756,
197,
35911,
3144,
25,
262,
3521,
16,
13,
15,
53010,
16431... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewPeerClientForAddress(t *testing.T) {
cleanup := initPeerTestEnv(t)
defer cleanup()
// TLS disabled
viper.Set("peer.tls.enabled", false)
// success case
pClient, err := common.NewPeerClientForAddress("testPeer", "")
assert.NoError(t, err)
assert.NotNil(t, pClient)
// failure - no peer address sup... | explode_data.jsonl/62456 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 399
} | [
2830,
3393,
3564,
30888,
2959,
2461,
4286,
1155,
353,
8840,
836,
8,
341,
1444,
60639,
1669,
2930,
30888,
2271,
14359,
1155,
340,
16867,
21290,
2822,
197,
322,
41654,
8386,
198,
5195,
12858,
4202,
445,
16537,
734,
4730,
22141,
497,
895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUseGenerateNameCNR(t *testing.T) {
var cnr atlassianv1.CycleNodeRequest
cnr.Name = "test"
UseGenerateNameCNR(&cnr)
assert.Equal(t, "", cnr.Name)
assert.Equal(t, "test-", cnr.GenerateName)
} | explode_data.jsonl/58233 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
10253,
31115,
675,
34,
26319,
1155,
353,
8840,
836,
8,
341,
2405,
13665,
81,
518,
89597,
85,
16,
727,
5449,
1955,
1900,
198,
1444,
19618,
2967,
284,
330,
1944,
698,
95023,
31115,
675,
34,
26319,
2099,
14271,
81,
340,
6948,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestNodeHandlerRoute(t *testing.T) {
assert := assert.New(t)
expRoute := "/api/cluster/v1/node"
// Mocks.
mcv1 := &mcliclusterv1.NodeClientInterface{}
nh := webapiclusterv1.NewNodeHandler(serializer.DefaultSerializer, mcv1)
assert.Equal(expRoute, nh.GetRoute())
} | explode_data.jsonl/62165 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
1955,
3050,
4899,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
48558,
4899,
1669,
3521,
2068,
14,
18855,
5457,
16,
37211,
1837,
197,
322,
14563,
82,
624,
2109,
13122,
16,
1669,
609,
12887,
415,
70979,
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 TestHookMessageWillBeUpdated(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
tearDown, _, _ := SetAppEnvironmentWithPlugins(t,
[]string{
`
package main
import (
"github.com/blastbao/mattermost-server/plugin"
"github.com/blastbao/mattermost-server/model"
)
type MyPlugin struc... | explode_data.jsonl/30305 | {
"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,
31679,
2052,
9945,
3430,
16196,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
197,
82892,
11,
8358,
716,
1669,
2573,
2164,
12723,
2354,
45378,
1155,
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... | 3 |
func TestPragmaArguments(t *testing.T) {
t.Parallel()
actual, err := ParseProgram(`#version("1.0")`)
require.NoError(t, err)
utils.AssertEqualWithDiff(t,
[]ast.Declaration{
&ast.PragmaDeclaration{
Expression: &ast.InvocationExpression{
InvokedExpression: &ast.IdentifierExpression{
Identifier:... | explode_data.jsonl/35980 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 487
} | [
2830,
3393,
93018,
19139,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
88814,
11,
1848,
1669,
14775,
10690,
5809,
2,
4366,
445,
16,
13,
15,
899,
24183,
17957,
35699,
1155,
11,
1848,
692,
80206,
11711,
2993,
2354,
21751,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.