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 TestBalances(t *testing.T) {
client := v1.New(&v1.Config{
Key: os.Getenv("BFKEY"),
Secret: os.Getenv("BFSECRET"),
})
res, err := client.Balances(list.NewForBalances(
"JPY",
500, 0, 0,
))
assert.NoError(t, err)
for i, v := range *res {
fmt.Printf("%d %+v\n", i, v)
}
fmt.Printf("%+v %+v\n", cl... | explode_data.jsonl/41221 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
37889,
3020,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
348,
16,
7121,
2099,
85,
16,
10753,
515,
197,
55242,
25,
262,
2643,
64883,
445,
19883,
4784,
4461,
197,
7568,
50856,
25,
2643,
64883,
445,
19883,
65310,
4461,
197,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPqNotconcurrent(t *testing.T) {
ctx, end := trace.WithTaskFromStack(context.Background())
defer end()
var ctr uint32
q := newStepQueue()
var wg sync.WaitGroup
wg.Add(4)
go func() {
ctx, end := trace.WithTaskFromStack(ctx)
defer end()
defer wg.Done()
defer q.WaitReady(ctx, "1", time.Unix(9999, 0)... | explode_data.jsonl/22489 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 565
} | [
2830,
3393,
47,
80,
2623,
443,
3231,
1155,
353,
8840,
836,
8,
341,
20985,
11,
835,
1669,
11655,
26124,
6262,
3830,
4336,
5378,
19047,
2398,
16867,
835,
741,
2405,
50638,
2622,
18,
17,
198,
18534,
1669,
501,
8304,
7554,
741,
2405,
6358... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStamperStamping(t *testing.T) {
privKey, err := crypto.GenerateSecp256k1Key()
if err != nil {
t.Fatal(err)
}
owner, err := crypto.NewEthereumAddress(privKey.PublicKey)
if err != nil {
t.Fatal(err)
}
signer := crypto.NewDefaultSigner(privKey)
createStamp := func(t *testing.T, stamper postage.Stampe... | explode_data.jsonl/19320 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1422
} | [
2830,
3393,
623,
309,
712,
20906,
287,
1155,
353,
8840,
836,
8,
341,
71170,
1592,
11,
1848,
1669,
19028,
57582,
8430,
79,
17,
20,
21,
74,
16,
1592,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
197,
8118,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSwitchThread(t *testing.T) {
protest.AllowRecording(t)
withTestProcess("testnextprog", t, func(p *proc.Target, fixture protest.Fixture) {
// With invalid thread id
err := p.SwitchThread(-1)
if err == nil {
t.Fatal("Expected error for invalid thread id")
}
setFunctionBreakpoint(p, t, "main.main")... | explode_data.jsonl/56214 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 337
} | [
2830,
3393,
16837,
6855,
1155,
353,
8840,
836,
8,
341,
197,
776,
1944,
29081,
52856,
1155,
340,
46948,
2271,
7423,
445,
1944,
3600,
32992,
497,
259,
11,
2915,
1295,
353,
15782,
35016,
11,
12507,
8665,
991,
12735,
8,
341,
197,
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... | 8 |
func TestSpecC3(t *testing.T) {
var f, g *[]string
init := func(c *Cmd) {
f = c.StringsArg("SRC", nil, "")
g = c.StringsArg("DST", nil, "")
}
spec := "(SRC... DST) | SRC"
okCmd(t, spec, init, []string{"A"})
require.Equal(t, []string{"A"}, *f)
require.Equal(t, 0, len(*g))
okCmd(t, spec, init, []string{"A",... | explode_data.jsonl/23934 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 318
} | [
2830,
3393,
8327,
34,
18,
1155,
353,
8840,
836,
8,
341,
2405,
282,
11,
342,
353,
1294,
917,
198,
28248,
1669,
2915,
1337,
353,
15613,
8,
341,
197,
1166,
284,
272,
89154,
2735,
445,
56017,
497,
2092,
11,
14676,
197,
3174,
284,
272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParsersJavaElasticsearchLogs(t *testing.T) {
env := newInputTestingEnvironment(t)
testlogName := "test.log"
inp := env.mustCreateInput(map[string]interface{}{
"paths": []string{env.abspath(testlogName)},
"prospector.scanner.check_interval": "1ms",
"parsers": []map[string]i... | explode_data.jsonl/14916 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 380
} | [
2830,
3393,
47,
40488,
15041,
36,
51179,
1836,
51053,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
501,
2505,
16451,
12723,
1155,
692,
18185,
839,
675,
1669,
330,
1944,
1665,
698,
17430,
79,
1669,
6105,
69419,
4021,
2505,
9147,
14032,
313... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAttributeValue(t *testing.T) {
t.Parallel()
ctx, cancel := testAllocate(t, "image.html")
defer cancel()
tests := []struct {
sel string
by QueryOption
attr string
exp string
}{
{`//*[@id="icon-brankas"]`, BySearch, "alt", "Brankas - Easy Money Management"},
{`body > img:first-child`, ByQu... | explode_data.jsonl/59478 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 407
} | [
2830,
3393,
78554,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20985,
11,
9121,
1669,
1273,
75380,
1155,
11,
330,
1805,
2564,
1138,
16867,
9121,
2822,
78216,
1669,
3056,
1235,
341,
197,
1903,
301,
220,
914,
198,
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... | 5 |
func TestUint32to24(t *testing.T) {
if v := uint32to24(0xdabeef); !bytes.Equal(v, []byte{218, 190, 239}) {
t.Fatalf("Unexpected result. Want [218 190 239], have %v", v)
}
} | explode_data.jsonl/45523 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
21570,
18,
17,
983,
17,
19,
1155,
353,
8840,
836,
8,
341,
743,
348,
1669,
2622,
18,
17,
983,
17,
19,
7,
15,
9703,
8229,
823,
1215,
753,
9651,
12808,
3747,
11,
3056,
3782,
90,
17,
16,
23,
11,
220,
16,
24,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRuleText(t *testing.T) {
input := ` package test
r[x] = y {
x = input.a
x = "foo"
} {
x = input.b
x = "bar"
} {
x = input.c
x = "baz"
}
r[x] = y {
x = input.d
x = "qux"
}
`
mod := MustParseModule(input)
rules := mod.Rules
if len(rules) != 4 {
t.Fatalf("Expected 4 rules, got %d", len(rules))
... | explode_data.jsonl/50502 | {
"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,
11337,
1178,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
1565,
6328,
1273,
271,
81,
8323,
60,
284,
379,
341,
10225,
284,
1946,
5849,
198,
10225,
284,
330,
7975,
698,
92,
341,
10225,
284,
1946,
948,
198,
10225,
284,
330,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestInodeIdsIncrementing(t *testing.T) {
runTestNoQfs(t, func(test *testHelper) {
ids := newInodeIds(100*time.Millisecond, time.Hour)
c := test.newCtx()
test.Assert(newInodeId(c, ids) == 4, "Wrong 1st inodeId given")
test.Assert(newInodeId(c, ids) == 5, "Wrong 2nd inodeId given")
test.Assert(newInodeId(... | explode_data.jsonl/1826 | {
"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,
641,
534,
12701,
38311,
287,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
2753,
48,
3848,
1155,
11,
2915,
8623,
353,
1944,
5511,
8,
341,
197,
197,
3365,
1669,
501,
641,
534,
12701,
7,
16,
15,
15,
77053,
71482,
11,
882,
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 TestLogHandler_GetLogEntries(t *testing.T) {
type fields struct {
logManager *fake.ILogManagerMock
}
tests := []struct {
name string
fields fields
request *http.Request
wantStatus int
wantLogs *models.GetLogsResponse
wantGetLogsParams *models.GetLo... | explode_data.jsonl/71970 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1481
} | [
2830,
3393,
2201,
3050,
13614,
2201,
24533,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
6725,
2043,
353,
30570,
13,
64909,
2043,
11571,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
1060,
914,
198,
197,
55276,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefineTypeOfExample(t *testing.T) {
var example interface{}
var err error
example, err = defineTypeOfExample("string", "", "example")
assert.NoError(t, err)
assert.Equal(t, example.(string), "example")
example, err = defineTypeOfExample("number", "", "12.34")
assert.NoError(t, err)
assert.Equal(t, ex... | explode_data.jsonl/63591 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 637
} | [
2830,
3393,
35338,
929,
2124,
13314,
1155,
353,
8840,
836,
8,
341,
2405,
3110,
3749,
16094,
2405,
1848,
1465,
271,
8122,
1516,
11,
1848,
284,
6979,
929,
2124,
13314,
445,
917,
497,
7342,
330,
8687,
1138,
6948,
35699,
1155,
11,
1848,
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... | 3 |
func TestErrorCodeStringer(t *testing.T) {
tests := []struct {
in database.ErrorCode
want string
}{
{database.ErrDbTypeRegistered, "ErrDbTypeRegistered"},
{database.ErrDbUnknownType, "ErrDbUnknownType"},
{database.ErrDbDoesNotExist, "ErrDbDoesNotExist"},
{database.ErrDbExists, "ErrDbExists"},
{databas... | explode_data.jsonl/7152 | {
"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,
30748,
703,
261,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
17430,
256,
4625,
98433,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
90,
12216,
27862,
20886,
41430,
11,
330,
7747,
20886,
41430,
7115,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestDeleteService(t *testing.T) {
handler := func(w http.ResponseWriter, r *http.Request) {
testutils.AssertEqual(t, r.Method, "DELETE")
testutils.AssertEqual(t, r.URL.Path, "/service/id")
headers := map[string]string{
"Location": "/job/jobid",
"X-JobID": "jobid",
}
MarshalAndWriteHeader(t, w, ... | explode_data.jsonl/24179 | {
"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,
6435,
1860,
1155,
353,
8840,
836,
8,
341,
53326,
1669,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
18185,
6031,
11711,
2993,
1155,
11,
435,
20798,
11,
330,
14424,
1138,
197,
18185,
6031,
11711,
2993,
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 TestFileByPhotoUID(t *testing.T) {
t.Run("files found", func(t *testing.T) {
file, err := FileByPhotoUID("pt9jtdre2lvl0y11")
if err != nil {
t.Fatal(err)
}
assert.Equal(t, "bridge.jpg", file.FileName)
})
t.Run("no files found", func(t *testing.T) {
file, err := FileByPhotoUID("111")
assert.Err... | explode_data.jsonl/71299 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 164
} | [
2830,
3393,
1703,
1359,
10463,
6463,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
7198,
1730,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
17661,
11,
1848,
1669,
2887,
1359,
10463,
6463,
445,
417,
24,
73,
1296,
265,
17,
58160,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLookup(t *testing.T) {
zone, err := Parse(strings.NewReader(dbMiekNL), testzone, "stdin", 0)
if err != nil {
t.Fatalf("Expected no error when reading zone, got %q", err)
}
fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: zone}, Names: []string{testzone}}}
ctx := context.... | explode_data.jsonl/68724 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 272
} | [
2830,
3393,
34247,
1155,
353,
8840,
836,
8,
341,
197,
8684,
11,
1848,
1669,
14775,
51442,
68587,
9791,
44,
35007,
30042,
701,
1273,
8684,
11,
330,
51602,
497,
220,
15,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
18896,
902,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExternalModuleExclusionScopedPackage(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/index.js": `
import '@a1'
import '@a1/a2'
import '@a1-a2'
import '@b1'
import '@b1/b2'
import '@b1/b2/b3'
import '@b1/b2-b3'
import '@c1'
import '... | explode_data.jsonl/38523 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 595
} | [
2830,
3393,
25913,
3332,
840,
8957,
39437,
13100,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
1252,
2857,
788,
22074,
571,
21918,
3458,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestABCIValidatorFromPubKeyAndPower(t *testing.T) {
pubkey := bls12381.GenPrivKey().PubKey()
abciVal := TM2PB.NewValidatorUpdate(pubkey, 10)
assert.Equal(t, int64(10), abciVal.Power)
assert.Panics(t, func() { TM2PB.NewValidatorUpdate(nil, 10) })
assert.Panics(t, func() { TM2PB.NewValidatorUpdate(pubKeyBLS{}... | explode_data.jsonl/65077 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
1867,
11237,
14256,
3830,
29162,
1592,
3036,
14986,
1155,
353,
8840,
836,
8,
341,
62529,
792,
1669,
1501,
82,
16,
17,
18,
23,
16,
65384,
32124,
1592,
1005,
29162,
1592,
2822,
197,
370,
5855,
2208,
1669,
23975,
17,
40637,
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 TestInvalidNilValues(t *testing.T) {
var date1 time.Time
var date2 int
tests := []struct {
name string
input interface{}
expectedError string
}{
{
name: "time.Time",
input: &date1,
expectedError: `sql: Scan error on column index 0, name "bdate": unsupported S... | explode_data.jsonl/15982 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 561
} | [
2830,
3393,
7928,
19064,
6227,
1155,
353,
8840,
836,
8,
341,
2405,
2400,
16,
882,
16299,
198,
2405,
2400,
17,
526,
271,
78216,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
22427,
260,
3749,
16094,
197,
42400,
1454,
914,
198,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestSortedArray_Clone(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []interface{}{"a", "d", "c", "b", "e", "f"}
func1 := func(v1, v2 interface{}) int {
return strings.Compare(gconv.String(v1), gconv.String(v2))
}
array1 := garray.NewSortedArrayFrom(a1, func1)
array2 := array1.Clone()
t.Asser... | explode_data.jsonl/67019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 187
} | [
2830,
3393,
51051,
1857,
85110,
603,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11323,
16,
1669,
3056,
4970,
6257,
4913,
64,
497,
330,
67,
497,
330,
66,
497,
330,
65,
497,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGoCSVNewWithInputsToOutput(t *testing.T) {
// Change directory to project root so the test cases can form the correct pkg imports
cleanupFunc := chDirWithCleanup(t, testNonStandardLayoutDataDir)
defer cleanupFunc()
// Temporary output dir for generating catalog bundle
outputDir, rmDirFunc := mkTempDirWit... | explode_data.jsonl/21320 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 468
} | [
2830,
3393,
10850,
44209,
3564,
2354,
31946,
1249,
5097,
1155,
353,
8840,
836,
8,
341,
197,
322,
10388,
6220,
311,
2390,
3704,
773,
279,
1273,
5048,
646,
1352,
279,
4396,
24793,
15202,
198,
1444,
60639,
9626,
1669,
521,
6184,
2354,
6733... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAllKeys(t *testing.T) {
initConfigs()
ks := sort.StringSlice{"title", "newkey", "owner.organization", "owner.dob", "owner.bio", "name", "beard", "ppu", "batters.batter", "hobbies", "clothing.jacket", "clothing.trousers", "clothing.pants.size", "age", "hacker", "id", "type", "eyes", "p_id", "p_ppu", "p_batte... | explode_data.jsonl/5564 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 652
} | [
2830,
3393,
2403,
8850,
1155,
353,
8840,
836,
8,
341,
28248,
84905,
2822,
197,
2787,
1669,
3378,
6431,
33236,
4913,
2102,
497,
330,
931,
792,
497,
330,
8118,
69224,
497,
330,
8118,
950,
674,
497,
330,
8118,
78818,
497,
330,
606,
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 TestUnitExtractTarballTmp(t *testing.T) {
sut := NewSPDX()
// Non existent files shoud error
_, err := sut.ExtractTarballTmp("lsdjkflskdjfl")
require.Error(t, err)
// Lets test a zipped and unzipped tarball
for _, tf := range []bool{true, false} {
tarFile := writeTestTarball(t, tf)
require.NotNil(t, tar... | explode_data.jsonl/7735 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 286
} | [
2830,
3393,
4562,
28959,
62733,
3959,
35986,
1155,
353,
8840,
836,
8,
341,
1903,
332,
1669,
1532,
4592,
16591,
741,
197,
322,
11581,
3000,
306,
3542,
557,
2950,
1465,
198,
197,
6878,
1848,
1669,
34212,
5121,
2144,
62733,
3959,
35986,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestIDDriverScanByteFromDatabase(t *testing.T) {
id := ID{}
bs := []byte("9m4e2mr0ui3e8a215n4g")
err := id.Scan(bs)
assert.NoError(t, err)
assert.Equal(t, ID{0x4d, 0x88, 0xe1, 0x5b, 0x60, 0xf4, 0x86, 0xe4, 0x28, 0x41, 0x2d, 0xc9}, id)
} | explode_data.jsonl/58929 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
915,
11349,
26570,
7153,
3830,
5988,
1155,
353,
8840,
836,
8,
341,
15710,
1669,
3034,
16094,
93801,
1669,
3056,
3782,
445,
24,
76,
19,
68,
17,
20946,
15,
1963,
18,
68,
23,
64,
17,
16,
20,
77,
19,
70,
1138,
9859,
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 TestV1beta1TLSConfig(t *testing.T) {
tests := []struct {
test string
clientCert, clientKey, clientCA []byte
serverCert, serverKey, serverCA []byte
wantErr bool
}{
{
test: "TLS setup between client and server",
clientCert: clientCert, client... | explode_data.jsonl/35037 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1032
} | [
2830,
3393,
53,
16,
19127,
16,
45439,
2648,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
18185,
999,
914,
198,
197,
25291,
36934,
11,
2943,
1592,
11,
2943,
5049,
3056,
3782,
198,
197,
41057,
36934,
11,
3538,
1592,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_costructRegionFromZone(t *testing.T) {
type args struct {
zone string
}
tests := []struct {
name string
args args
want string
}{
{
name: "DC Zone",
args: args{
zone: "dal12",
},
want: "dal",
},
{
name: "AZ Zone",
args: args{
zone: "eu-de-1",
},
want: "eu-de",
... | explode_data.jsonl/37962 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
11393,
1235,
14091,
3830,
15363,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
197,
8684,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
914,
198,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLoggerDebugExpected(t *testing.T) {
checkMessages(t, zapcore.DebugLevel, []Option{WithDebug()}, zapcore.DebugLevel, []string{
"hello",
"world",
"foo",
}, func(logger *Logger) {
logger.Print("hello")
logger.Printf("world")
logger.Println("foo")
})
} | explode_data.jsonl/58460 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 114
} | [
2830,
3393,
7395,
7939,
18896,
1155,
353,
8840,
836,
8,
341,
25157,
15820,
1155,
11,
32978,
2153,
20345,
4449,
11,
3056,
5341,
90,
2354,
7939,
76777,
32978,
2153,
20345,
4449,
11,
3056,
917,
515,
197,
197,
1,
14990,
756,
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... | 1 |
func TestUpdateTeamMemberSchemeRoles(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
SystemAdminClient := th.SystemAdminClient
th.LoginBasic()
s1 := &model.SchemeRoles{
SchemeAdmin: false,
SchemeUser: false,
SchemeGuest: false,
}
_, r1 := SystemAdminClient.UpdateTeamMemberSchemeRoles(th.Ba... | explode_data.jsonl/70733 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1398
} | [
2830,
3393,
4289,
14597,
9366,
28906,
25116,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
5816,
7210,
2959,
1669,
270,
16620,
7210,
2959,
198,
70479,
32499,
15944,
2822,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetEventsInRangeWithEventsInsertedLikeBackfill(t *testing.T) {
t.Parallel()
db := MustCreateDatabase(t)
events, _ := SimpleRoom(t, testRoomID, testUserIDA, testUserIDB)
// "federation" join
userC := fmt.Sprintf("@radiance:%s", testOrigin)
joinEvent := MustCreateEvent(t, testRoomID, []gomatrixserverlib.H... | explode_data.jsonl/36041 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 695
} | [
2830,
3393,
1949,
7900,
76059,
2354,
7900,
91269,
12949,
3707,
7559,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20939,
1669,
15465,
4021,
5988,
1155,
340,
90873,
11,
716,
1669,
8993,
14003,
1155,
11,
1273,
14003,
915,
11,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateHelmWithValues(t *testing.T) {
service := newService("../..")
res, err := service.GenerateManifest(context.Background(), &apiclient.ManifestRequest{
Repo: &argoappv1.Repository{},
AppName: "test",
ApplicationSource: &argoappv1.ApplicationSource{
Path: "./util/helm/testdata/redis",
Hel... | explode_data.jsonl/5674 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 402
} | [
2830,
3393,
31115,
39,
23162,
2354,
6227,
1155,
353,
8840,
836,
8,
341,
52934,
1669,
501,
1860,
17409,
496,
5130,
10202,
11,
1848,
1669,
2473,
57582,
38495,
5378,
19047,
1507,
609,
391,
292,
1451,
72272,
1900,
515,
197,
197,
25243,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestIssue16029(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test;")
tk.MustExec("drop table if exists t0,t1;")
tk.MustExec("CREATE TABLE t0(c0 INT);")
tk.MustExec("CREATE TABLE t1(c0 INT);")
tk.MustExec("INSERT INTO t0 VALUES ... | explode_data.jsonl/65528 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 251
} | [
2830,
3393,
42006,
16,
21,
15,
17,
24,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBeginningOfMonth(t *testing.T) {
assert := assert.New(t)
testCases := [...]struct {
Input time.Time
Expected time.Time
}{
{Input: time.Date(2019, 9, 9, 17, 59, 44, 0, time.UTC), Expected: time.Date(2019, 9, 1, 0, 0, 0, 0, time.UTC)},
{Input: time.Date(2019, 9, 1, 0, 0, 0, 0, time.UTC), Expected:... | explode_data.jsonl/81201 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 305
} | [
2830,
3393,
75290,
59646,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
18185,
37302,
1669,
48179,
1235,
341,
197,
66588,
262,
882,
16299,
198,
197,
197,
18896,
882,
16299,
198,
197,
59403,
197,
197,
90,
2505,
25,
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... | 2 |
func TestGet_archive(t *testing.T) {
dst := tempDir(t)
u := filepath.Join("./test-fixtures", "archive.tar.gz")
u, _ = filepath.Abs(u)
if err := Get(dst, u); err != nil {
t.Fatalf("err: %s", err)
}
mainPath := filepath.Join(dst, "main.tf")
if _, err := os.Stat(mainPath); err != nil {
t.Fatalf("err: %s", err... | explode_data.jsonl/813 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
1949,
42873,
1155,
353,
8840,
836,
8,
341,
52051,
1669,
2730,
6184,
1155,
340,
10676,
1669,
26054,
22363,
13988,
1944,
70913,
18513,
497,
330,
16019,
28048,
20963,
1138,
10676,
11,
716,
284,
26054,
33255,
8154,
692,
743,
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... | 3 |
func TestUpdateWithNoRepo(t *testing.T) {
// Set up a fake repo
srv, err := repotest.NewTempServerWithCleanup(t, "testdata/*.tgz*")
if err != nil {
t.Fatal(err)
}
defer srv.Stop()
if err := srv.LinkIndices(); err != nil {
t.Fatal(err)
}
dir := func(p ...string) string {
return filepath.Join(append([]strin... | explode_data.jsonl/24400 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 677
} | [
2830,
3393,
4289,
2354,
2753,
25243,
1155,
353,
8840,
836,
8,
341,
197,
322,
2573,
705,
264,
12418,
15867,
198,
1903,
10553,
11,
1848,
1669,
2064,
354,
477,
7121,
12151,
5475,
2354,
67335,
1155,
11,
330,
92425,
23540,
41428,
89,
9,
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 TestEnvDeduplication(t *testing.T) {
for desc, test := range map[string]struct {
existing []string
kv [][2]string
expected []string
}{
"single env": {
kv: [][2]string{
{"a", "b"},
},
expected: []string{"a=b"},
},
"multiple envs": {
kv: [][2]string{
{"a", "b"},
{"c", "d"}... | explode_data.jsonl/8828 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 737
} | [
2830,
3393,
14359,
35,
291,
454,
1693,
1155,
353,
8840,
836,
8,
341,
2023,
6560,
11,
1273,
1669,
2088,
2415,
14032,
60,
1235,
341,
197,
8122,
11083,
3056,
917,
198,
197,
16463,
85,
981,
508,
1457,
17,
30953,
198,
197,
42400,
3056,
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... | 4 |
func TestVStreamCopySimpleFlow(t *testing.T) {
if testing.Short() {
t.Skip()
}
execStatements(t, []string{
"create table t1(id11 int, id12 int, primary key(id11))",
"create table t2(id21 int, id22 int, primary key(id21))",
})
log.Infof("Pos before bulk insert: %s", primaryPosition(t))
insertLotsOfData(t, 10... | explode_data.jsonl/10403 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1636
} | [
2830,
3393,
53,
3027,
12106,
16374,
18878,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
532,
67328,
93122,
1155,
11,
3056,
917,
515,
197,
197,
1,
3182,
1965,
259,
16,
3724,
16,
16,
526,
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... | 4 |
func TestGetMethod(t *testing.T) {
var test = &KOS
fun1 := KDbug.GetMethod(test, "GoMemory")
fun2 := KDbug.GetMethod(test, "Hello")
if fun1 == nil || fun2 != nil {
t.Error("GetMethod fail")
return
}
} | explode_data.jsonl/74245 | {
"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,
85073,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
284,
609,
42,
3126,
271,
90126,
16,
1669,
62990,
2313,
2234,
3523,
8623,
11,
330,
10850,
10642,
1138,
90126,
17,
1669,
62990,
2313,
2234,
3523,
8623,
11,
330,
9707,
5130,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestGetUserInformation(t *testing.T) {
expected := NewMockUserRecord("SYSOP")
userRecs = []bbs.UserRecord{
expected,
}
req, err := http.NewRequest("GET", "/v1/users/SYSOP/information", nil)
if err != nil {
t.Fatal(err)
}
token := newAccessTokenWithUsername(expected.UserID())
t.Logf("testing token: ... | explode_data.jsonl/30219 | {
"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,
1949,
1474,
14873,
1155,
353,
8840,
836,
8,
1476,
42400,
1669,
1532,
11571,
1474,
6471,
445,
37931,
3067,
5130,
19060,
3820,
82,
284,
3056,
65,
1279,
7344,
6471,
515,
197,
42400,
345,
197,
630,
24395,
11,
1848,
1669,
1758,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLongLogicalTypeFallback(t *testing.T) {
schema := `{"type": "long", "logicalType": "this_logical_type_does_not_exist"}`
testSchemaValid(t, schema)
testBinaryCodecPass(t, schema, 12345, []byte("\xf2\xc0\x01"))
} | explode_data.jsonl/12002 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
6583,
64312,
929,
87206,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
1669,
1565,
4913,
1313,
788,
330,
4825,
497,
330,
30256,
929,
788,
330,
574,
86484,
1819,
96374,
7913,
35906,
9207,
3989,
18185,
8632,
4088,
1155,
11,
10802,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunIntegrationArtifactGetMplStatus(t *testing.T) {
t.Parallel()
t.Run("Successfully Test of Get Integration Flow MPL Status", func(t *testing.T) {
apiServiceKey := `{
"oauth": {
"url": "https://demo",
"clientid": "demouser",
"clientsecret": "******",
"tokenurl": "https://demo/oauth/toke... | explode_data.jsonl/49454 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 860
} | [
2830,
3393,
6727,
52464,
85578,
1949,
44,
500,
2522,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3244,
16708,
445,
35959,
3393,
315,
2126,
40069,
22452,
47356,
8104,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
54299,
1860,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIntegration_ReadCRC(t *testing.T) {
// Test that the checksum is handled correctly when reading files.
// For gzipped files, see https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/1641.
if testing.Short() {
t.Skip("Integration tests skipped in short mode")
}
const (
// This is an uncomp... | explode_data.jsonl/8915 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1965
} | [
2830,
3393,
52464,
38381,
83339,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
429,
279,
32529,
374,
17608,
12440,
979,
5290,
3542,
624,
197,
322,
1752,
76963,
6450,
3542,
11,
1490,
3703,
1110,
5204,
905,
14,
14444,
16055,
17296,
40689,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddress_Parse(t *testing.T) {
for i, test := range addrTests {
addr := &Address{}
if err := addr.Parse(test.fields); err != nil {
t.Error("Error parsing address:", err)
} else if !reflect.DeepEqual(addr, test.addr) {
t.Errorf("Invalid address for #%v: got %v but expected %v", i, addr, test.addr)
... | explode_data.jsonl/43049 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
4286,
77337,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1273,
1669,
2088,
10789,
18200,
341,
197,
53183,
1669,
609,
4286,
31483,
197,
743,
1848,
1669,
10789,
8937,
8623,
12920,
1215,
1848,
961,
2092,
341,
298,
3244,
6141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRPC_QueryTX(t *testing.T) {
codec.UpgradeHeight = 7000
var tx *types.TxResponse
_, _, cleanup := NewInMemoryTendermintNode(t, oneValTwoNodeGenesisState())
_, _, evtChan := subscribeTo(t, tmTypes.EventNewBlock)
<-evtChan // Wait for block
_, stopCli, evtChan := subscribeTo(t, tmTypes.EventTx)
kb := getIn... | explode_data.jsonl/44707 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 557
} | [
2830,
3393,
29528,
48042,
22867,
1155,
353,
8840,
836,
8,
341,
43343,
66,
13,
43861,
3640,
284,
220,
22,
15,
15,
15,
198,
2405,
9854,
353,
9242,
81362,
2582,
198,
197,
6878,
8358,
21290,
1669,
1532,
641,
10642,
51,
1659,
67791,
1955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrivateKeyFromHex(t *testing.T) {
//str1 := "3714c34e68f8481d"
//str2 := "9e3647445d5ca65e"
//str3 := "9d150ddb24d2182a"
//str4 := "6ac12143f1293835"
//pri := core.PrivateKeyFromBytes(hexToBytes(str1 + str2 + str3 + str4))
//if pri == nil {
// t.Error("pri is nil")
//}
//pub := pri.PubKey()
//pub.Co... | explode_data.jsonl/60823 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 199
} | [
2830,
3393,
75981,
3830,
20335,
1155,
353,
8840,
836,
8,
1476,
197,
322,
495,
16,
1669,
330,
18,
22,
16,
19,
66,
18,
19,
68,
21,
23,
69,
23,
19,
23,
16,
67,
698,
197,
322,
495,
17,
1669,
330,
24,
68,
18,
21,
19,
22,
19,
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 TestContainsTargetScriptHash(t *testing.T) {
//https://neotracker.io/tx/8f691ec7b9e9979964de9ce3f994588f31d6b6fea2588081d20010c14f32138d
p := smartcontract.NewParserWithScript("0600027264cd0414aaef53a5153128fcb268b0337e8e7eae5724c78f146063795d3b9b3cd55aef026eae992b91063db0db53c1087472616e7366657267cf9472821400ce... | explode_data.jsonl/28991 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 245
} | [
2830,
3393,
23805,
6397,
5910,
6370,
1155,
353,
8840,
836,
8,
341,
197,
322,
2428,
1110,
811,
86379,
9683,
4245,
14,
3998,
14,
23,
69,
21,
24,
16,
757,
22,
65,
24,
68,
24,
24,
22,
24,
24,
21,
19,
450,
24,
346,
18,
69,
24,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCreateDisableValidation(t *testing.T) {
Given(t).
Path("baddir").
When().
CreateApp("--validate=false").
Then().
And(func(app *Application) {
_, err := RunCli("app", "create", app.Name, "--upsert", "--validate=false", "--repo", RepoURL(RepoURLTypeFile),
"--path", "baddir2", "--project", app.S... | explode_data.jsonl/35663 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
4021,
25479,
13799,
1155,
353,
8840,
836,
8,
341,
9600,
2071,
1155,
4292,
197,
69640,
445,
65,
44525,
38609,
197,
197,
4498,
25829,
197,
75569,
2164,
21549,
7067,
12219,
38609,
197,
197,
12209,
25829,
197,
197,
3036,
18552,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCheckPatch(t *testing.T) {
mocks, checkService := newCheckSvcStack()
ch := mocks.pipingCoordinator.taskUpdatedChan()
deadman := &check.Deadman{}
deadman.SetTaskID(4)
mocks.checkSvc.PatchCheckFn = func(context.Context, platform.ID, influxdb.CheckUpdate) (influxdb.Check, error) {
return deadman, nil
}
... | explode_data.jsonl/72196 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
3973,
43622,
1155,
353,
8840,
836,
8,
341,
2109,
25183,
11,
1779,
1860,
1669,
501,
3973,
92766,
4336,
741,
23049,
1669,
68909,
556,
46095,
64304,
15034,
16196,
46019,
2822,
197,
33754,
1515,
1669,
609,
2028,
909,
3149,
1515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSeparateV4V6WithWildcardCIDRPrefix(t *testing.T) {
cfg := constructTestConfig()
iptConfigurator := NewIptablesConfigurator(cfg, &dep.StdoutStubDependencies{})
v4Range, v6Range, _ := iptConfigurator.separateV4V6("*")
if !v4Range.IsWildcard || !v6Range.IsWildcard {
t.Errorf("Expected v4Range and v6Range t... | explode_data.jsonl/65390 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
14492,
349,
53,
19,
53,
21,
2354,
92988,
54146,
49,
14335,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
9245,
2271,
2648,
2822,
8230,
417,
2648,
57383,
1669,
1532,
40,
417,
4788,
2648,
57383,
28272,
11,
609,
14891,
83225,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNewNoDate(t *testing.T) {
testTime := time.Date(2000, 12, 15, 17, 8, 0, 0, time.Local)
timeNow = func() time.Time {
return testTime
}
lib, err := New()
if assert.NoError(t, err) {
assert.True(t, testTime.Local().Equal(lib.ToTime()))
assert.True(t, lib.ToTime().Location() == time.Local)
}
// Rese... | explode_data.jsonl/73965 | {
"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,
3564,
2753,
1916,
1155,
353,
8840,
836,
8,
341,
18185,
1462,
1669,
882,
8518,
7,
17,
15,
15,
15,
11,
220,
16,
17,
11,
220,
16,
20,
11,
220,
16,
22,
11,
220,
23,
11,
220,
15,
11,
220,
15,
11,
882,
20856,
340,
2195... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSelf(t *testing.T) {
t.Parallel()
cs := &cryptoService{}
pkiID1 := common.PKIidType("1")
jcm := &joinChanMsg{
members2AnchorPeers: map[string][]api.AnchorPeer{
string(orgInChannelA): {},
},
}
adapter := new(gossipAdapterMock)
configureAdapter(adapter)
adapter.On("Gossip", mock.Anything)
gc := ... | explode_data.jsonl/66311 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 297
} | [
2830,
3393,
12092,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
71899,
1669,
609,
35772,
1860,
16094,
3223,
6642,
915,
16,
1669,
4185,
1069,
80971,
307,
929,
445,
16,
1138,
12428,
6226,
1669,
609,
5987,
46019,
6611,
515,
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 TestParseFile(t *testing.T) {
_, err := ParseFile("", nil, nil, 0)
if err == nil {
t.Error("missing io error")
}
var first error
_, err = ParseFile("", func(err error) {
if first == nil {
first = err
}
}, nil, 0)
if err == nil || first == nil {
t.Error("missing io error")
}
if err != first {
... | explode_data.jsonl/24651 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 158
} | [
2830,
3393,
14463,
1703,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
14775,
1703,
19814,
2092,
11,
2092,
11,
220,
15,
340,
743,
1848,
621,
2092,
341,
197,
3244,
6141,
445,
30616,
6399,
1465,
1138,
197,
630,
2405,
1156,
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... | 2 |
func TestEditorMoveWord(t *testing.T) {
type Test struct {
Text string
Start int
Skip int
Want int
}
tests := []Test{
{"", 0, 0, 0},
{"", 0, -1, 0},
{"", 0, 1, 0},
{"hello", 0, -1, 0},
{"hello", 0, 1, 5},
{"hello world", 3, 1, 5},
{"hello world", 3, -1, 0},
{"hello world", 8, -1, 6},
{"h... | explode_data.jsonl/27264 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 530
} | [
2830,
3393,
9410,
9860,
10879,
1155,
353,
8840,
836,
8,
341,
13158,
3393,
2036,
341,
197,
49635,
220,
914,
198,
197,
65999,
526,
198,
197,
7568,
13389,
220,
526,
198,
197,
17300,
517,
220,
526,
198,
197,
532,
78216,
1669,
3056,
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 TestAutoscalingGroup_spot(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping test in short mode")
}
tf := `
resource "aws_launch_template" "lt_spot" {
image_id = "fake_ami"
instance_type = "t3.medium"
instance_market_options {
market_type = "spot"
}
}
resource "aws_aut... | explode_data.jsonl/78710 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1473
} | [
2830,
3393,
19602,
436,
81552,
2808,
84766,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
304,
2805,
3856,
1138,
197,
630,
3244,
69,
1669,
22074,
50346,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCollection_Upsert(t *testing.T) {
mgoClient := Ins()
result, err := mgoClient.C("test").Upsert(bson.M{"name": "test"}, bson.M{"name": "test", "age": 18})
if err != nil {
t.Errorf("Upsert error: %s", err)
t.FailNow()
}
t.Log("Upsert ok: ", result)
} | explode_data.jsonl/30109 | {
"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,
6482,
6665,
1690,
529,
1155,
353,
8840,
836,
8,
341,
2109,
3346,
2959,
1669,
9726,
2822,
9559,
11,
1848,
1669,
296,
3346,
2959,
727,
445,
1944,
1827,
98778,
529,
1883,
930,
1321,
4913,
606,
788,
330,
1944,
14345,
50980,
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... | 2 |
func TestDistinctByStruct(t *testing.T) {
type a struct { Id int32 }
as := []*a{
{Id: 1},
{Id: 1},
{Id: 3},
}
res := DistinctBy(as, func(v *a) int32 {
return v.Id
}).([]*a)
t.Log(res[0].Id)
} | explode_data.jsonl/66309 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
72767,
1359,
9422,
1155,
353,
8840,
836,
8,
341,
13158,
264,
2036,
314,
5223,
526,
18,
17,
456,
60451,
1669,
29838,
64,
515,
197,
197,
90,
764,
25,
220,
16,
1583,
197,
197,
90,
764,
25,
220,
16,
1583,
197,
197,
90,
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 TestListAvailableProjects(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
HandleListAvailableProjectsSuccessfully(t)
count := 0
err := projects.ListAvailable(client.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
count++
actual, err := projects.ExtractProjects(page)
th.Asse... | explode_data.jsonl/49966 | {
"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,
852,
16485,
29958,
1155,
353,
8840,
836,
8,
341,
70479,
39820,
9230,
741,
16867,
270,
94849,
37496,
9230,
741,
197,
6999,
852,
16485,
29958,
35959,
1155,
692,
18032,
1669,
220,
15,
198,
9859,
1669,
7079,
5814,
16485,
12805,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWFLevelAutomountServiceAccountToken(t *testing.T) {
woc := newWoc()
ctx := context.Background()
_, err := util.CreateServiceAccountWithToken(ctx, woc.controller.kubeclientset, "", "foo", "foo-token")
assert.NoError(t, err)
falseValue := false
woc.execWf.Spec.AutomountServiceAccountToken = &falseValue
w... | explode_data.jsonl/75366 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 330
} | [
2830,
3393,
32131,
4449,
41072,
629,
1860,
7365,
3323,
1155,
353,
8840,
836,
8,
341,
6692,
509,
1669,
501,
54,
509,
741,
20985,
1669,
2266,
19047,
741,
197,
6878,
1848,
1669,
4094,
7251,
1860,
7365,
2354,
3323,
7502,
11,
289,
509,
145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestToInt8E(t *testing.T) {
type args struct {
s string
}
tests := []struct {
name string
args args
want int8
wantErr bool
}{
{
name: "",
args: args{
s: "21",
},
want: 21,
wantErr: false,
},
{
name: "",
args: args{
s: "21a",
},
want: 0,
wantE... | explode_data.jsonl/5472 | {
"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,
38544,
23,
36,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1903,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
198,
197,
50780,
262,
526,
23,
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 TestGenModel_Issue251(t *testing.T) {
specDoc, err := loads.Spec("../fixtures/bugs/251/swagger.yml")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
k := "example"
opts := opts()
genModel, err := makeGenDefinition(k, "models", definitions[k], specDoc, opts)
require.NoError(t, err)
buf :... | explode_data.jsonl/2541 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 362
} | [
2830,
3393,
9967,
1712,
7959,
83890,
17,
20,
16,
1155,
353,
8840,
836,
8,
341,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
14,
56176,
14,
17,
20,
16,
80930,
33936,
1138,
17957,
35699,
1155,
11,
1848,
692,
7452,
4054,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFirstTrans(t *testing.T) {
trans := newFirstTrans()
Convey("TestFirstTrans", t, func() {
Convey("trans exec succ", func() {
transInfo := &transdsl.TransInfo{
AppInfo: &context.StubInfo{
X: "first",
Y: 1,
},
}
err := trans.Start(transInfo)
So(err, ShouldEqual, nil)
So(trans... | explode_data.jsonl/19235 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 306
} | [
2830,
3393,
5338,
3167,
1155,
353,
8840,
836,
8,
341,
72453,
1669,
501,
5338,
3167,
741,
93070,
5617,
445,
2271,
5338,
3167,
497,
259,
11,
2915,
368,
1476,
197,
93070,
5617,
445,
1458,
3883,
20038,
497,
2915,
368,
341,
298,
72453,
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... | 1 |
func TestNewFromRepoNoObjectPool(t *testing.T) {
pool, testRepo := setupObjectPool(t)
testRepoPath := filepath.Join(pool.cfg.Storages[0].Path, testRepo.RelativePath)
// no alternates file
poolFromRepo, err := FromRepo(pool.cfg, pool.locator, pool.gitCmdFactory, nil, testRepo)
require.Equal(t, ErrAlternateObjectD... | explode_data.jsonl/44265 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 582
} | [
2830,
3393,
3564,
3830,
25243,
2753,
1190,
10551,
1155,
353,
8840,
836,
8,
341,
85273,
11,
1273,
25243,
1669,
6505,
1190,
10551,
1155,
692,
18185,
25243,
1820,
1669,
26054,
22363,
41838,
30481,
7758,
269,
1134,
58,
15,
936,
1820,
11,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQueueOneReaderOneWriter(t *testing.T) {
clus := NewClusterV3(t, &ClusterConfig{Size: 1})
defer clus.Terminate(t)
done := make(chan struct{})
go func() {
defer func() {
done <- struct{}{}
}()
etcdc := clus.RandClient()
q := recipe.NewQueue(etcdc, "testq")
for i := 0; i < 5; i++ {
if err := ... | explode_data.jsonl/14548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 332
} | [
2830,
3393,
7554,
3966,
5062,
3966,
6492,
1155,
353,
8840,
836,
8,
341,
197,
4163,
1669,
1532,
28678,
53,
18,
1155,
11,
609,
28678,
2648,
90,
1695,
25,
220,
16,
3518,
16867,
1185,
355,
836,
261,
34016,
1155,
692,
40495,
1669,
1281,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCreateSortedSignerArray(t *testing.T) {
privVal1 := mock.NewPV()
pubKey1, err := privVal1.GetPubKey()
require.NoError(t, err)
privVal2 := mock.NewPV()
pubKey2, err := privVal2.GetPubKey()
require.NoError(t, err)
validator1 := tmtypes.NewValidator(pubKey1, 1)
validator2 := tmtypes.NewValidator(pubKey2... | explode_data.jsonl/18666 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 408
} | [
2830,
3393,
4021,
51051,
7264,
261,
1857,
1155,
353,
8840,
836,
8,
341,
71170,
2208,
16,
1669,
7860,
7121,
48469,
741,
62529,
1592,
16,
11,
1848,
1669,
6095,
2208,
16,
2234,
29162,
1592,
741,
17957,
35699,
1155,
11,
1848,
692,
71170,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSerializeConnectionJson(t *testing.T) {
ctx := context.Background()
c, rollback := makeConnectionAuth(t)
defer rollback()
serializedConnection, err := json.Marshal(c)
if err != nil {
t.Fatalf("Failed to serialize connection: %v", err)
}
c2 := new(swift.Connection)
err = json.Unmarshal(serializedConne... | explode_data.jsonl/12658 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 225
} | [
2830,
3393,
15680,
4526,
5014,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
11,
60414,
1669,
1281,
4526,
5087,
1155,
340,
16867,
60414,
741,
197,
75277,
4526,
11,
1848,
1669,
2951,
37271,
1337,
340,
743,
1848,
961,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestTextRanges(t *testing.T) {
for name, tc := range map[string]struct {
Markdown string
ExpectedRanges []Range
ExpectedValues []string
}{
"simple": {
Markdown: "hello",
ExpectedRanges: []Range{{0, 5}},
ExpectedValues: []string{"hello"},
},
"simple2": {
Markdown: "hello!... | explode_data.jsonl/38283 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1262
} | [
2830,
3393,
1178,
74902,
1155,
353,
8840,
836,
8,
341,
2023,
829,
11,
17130,
1669,
2088,
2415,
14032,
60,
1235,
341,
197,
197,
68005,
981,
914,
198,
197,
197,
18896,
74902,
3056,
6046,
198,
197,
197,
18896,
6227,
3056,
917,
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... | 2 |
func TestConnected(t *testing.T) {
n := New("testconnected", lookupFunc)
// Add a new address and get it
err := n.addAddressByIP(someIP + ":8333")
if err != nil {
t.Fatalf("Adding address failed: %v", err)
}
ka := n.GetAddress()
na := ka.NetAddress()
// make it an hour ago
na.Timestamp = time.Unix(time.Now(... | explode_data.jsonl/26479 | {
"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,
21146,
1155,
353,
8840,
836,
8,
341,
9038,
1669,
1532,
445,
1944,
15288,
497,
18615,
9626,
692,
197,
322,
2691,
264,
501,
2621,
323,
633,
432,
198,
9859,
1669,
308,
1364,
4286,
1359,
3298,
1141,
635,
3298,
488,
13022,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestGet(t *testing.T) {
m := NewSharedMap()
// Get a missing element.
val, ok := m.Load("Money")
if ok == true {
t.Error("ok should be false when item is missing from map.")
}
if val != nil {
t.Error("Missing values should return as null.")
}
elephant := Animal{"elephant"}
m.Store("elephant", elep... | explode_data.jsonl/77832 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
1949,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
16997,
2227,
2822,
197,
322,
2126,
264,
7402,
2392,
624,
19302,
11,
5394,
1669,
296,
13969,
445,
24786,
5130,
743,
5394,
621,
830,
341,
197,
3244,
6141,
445,
562,
1265,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCancelExchangeOrder(t *testing.T) {
p.SetDefaults()
TestSetup(t)
if areTestAPIKeysSet() && !canManipulateRealOrders {
t.Skip("API keys set, canManipulateRealOrders false, skipping test")
}
currencyPair := currency.NewPair(currency.LTC, currency.BTC)
var orderCancellation = &exchange.OrderCancellatio... | explode_data.jsonl/23572 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 282
} | [
2830,
3393,
9269,
31564,
4431,
1155,
353,
8840,
836,
8,
341,
3223,
4202,
16273,
741,
73866,
21821,
1155,
692,
743,
525,
2271,
7082,
8850,
1649,
368,
1009,
753,
4814,
92876,
6334,
12768,
24898,
341,
197,
3244,
57776,
445,
7082,
6894,
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... | 7 |
func TestGetUsersNotInChannel(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer th.TearDown()
Client := th.Client
teamId := th.BasicTeam.Id
channelId := th.BasicChannel.Id
user := th.CreateUser()
th.LinkUserToTeam(user, th.BasicTeam)
rusers, resp := Client.GetUsersNotInChannel(teamId, channelI... | explode_data.jsonl/21542 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 436
} | [
2830,
3393,
1949,
7137,
2623,
641,
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,
198,
197,
9196,
764,
1669,
270,
48868,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImgpkgLockOutputSuccessful(t *testing.T) {
env := BuildEnv(t)
kbld := Kbld{t, env.Namespace, env.KbldBinaryPath, Logger{}}
input := `
images:
- image: nginx:1.14.2
- image: sample-app
- sidecarImage: sample-app
- - sample-app
---
apiVersion: kbld.k14s.io/v1alpha1
kind: ImageOverrides
overrides:
- image: sa... | explode_data.jsonl/33766 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 707
} | [
2830,
3393,
13033,
30069,
11989,
5097,
36374,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
7854,
14359,
1155,
340,
16463,
65,
507,
1669,
98086,
507,
90,
83,
11,
6105,
46011,
11,
6105,
11352,
65,
507,
21338,
1820,
11,
9514,
6257,
630,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestNewPoll(t *testing.T) {
t.Run("all fine", func(t *testing.T) {
assert := assert.New(t)
patch1 := monkey.Patch(model.GetMillis, func() int64 { return 1234567890 })
patch2 := monkey.Patch(model.NewId, testutils.GetPollID)
defer patch1.Unpatch()
defer patch2.Unpatch()
creator := model.NewRandomStrin... | explode_data.jsonl/30283 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 706
} | [
2830,
3393,
3564,
49207,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
541,
6915,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6948,
1669,
2060,
7121,
1155,
340,
197,
3223,
754,
16,
1669,
38703,
1069,
754,
7635,
2234,
17897,
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 TestParseInputTextArgument(t *testing.T) {
argument := &model.AutocompleteArg{
Name: "", //positional
HelpText: "some_help",
Type: model.AutocompleteArgTypeText,
Data: &model.AutocompleteTextArg{Hint: "hint", Pattern: "pat"},
}
found, _, _, suggestion := parseInputTextArgument(argument, "",... | explode_data.jsonl/58278 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 709
} | [
2830,
3393,
14463,
2505,
1178,
9171,
1155,
353,
8840,
836,
8,
341,
197,
14479,
1669,
609,
2528,
875,
332,
20104,
2735,
515,
197,
21297,
25,
257,
7342,
442,
966,
3005,
198,
197,
197,
12689,
1178,
25,
330,
14689,
26926,
756,
197,
27725,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntArray_RLockFunc(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
s1 := []int{1, 2, 3, 4}
a1 := garray.NewIntArrayFrom(s1, true)
ch1 := make(chan int64, 3)
ch2 := make(chan int64, 1)
//go1
go a1.RLockFunc(func(n1 []int) { //读锁
time.Sleep(2 * time.Second) //暂停1秒
n1[2] = 6
ch2 <- gconv.Int6... | explode_data.jsonl/47626 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 488
} | [
2830,
3393,
95338,
2568,
11989,
9626,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
1903,
16,
1669,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
532,
197,
11323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRWSchema(t *testing.T) {
meta := arrow.NewMetadata([]string{"k1", "k2", "k3"}, []string{"v1", "v2", "v3"})
for _, tc := range []struct {
schema *arrow.Schema
memo dictMemo
}{
{
schema: arrow.NewSchema([]arrow.Field{
{Name: "f1", Type: arrow.PrimitiveTypes.Int64},
{Name: "f2", Type: arrow.... | explode_data.jsonl/17521 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 651
} | [
2830,
3393,
49,
7433,
3416,
1155,
353,
8840,
836,
8,
341,
84004,
1669,
17921,
7121,
14610,
10556,
917,
4913,
74,
16,
497,
330,
74,
17,
497,
330,
74,
18,
14345,
3056,
917,
4913,
85,
16,
497,
330,
85,
17,
497,
330,
85,
18,
23625,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReproduceParse_NoTaskID(t *testing.T) {
t.Parallel()
Convey(`Make sure Parse works with with no task ID.`, t, func() {
c := reproduceRun{}
c.init(&testAuthFlags{})
err := c.GetFlags().Parse([]string{"-server", "http://localhost:9050"})
So(err, ShouldBeNil)
err = c.parse([]string(nil))
So(err, S... | explode_data.jsonl/74869 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
693,
97274,
14463,
36989,
6262,
915,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
93070,
5617,
5809,
8078,
2704,
14775,
4278,
448,
448,
902,
3383,
3034,
13,
7808,
259,
11,
2915,
368,
341,
197,
1444,
1669,
22800,
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 TestWarningsInsideNodeModules(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
import "./dup-case.js"; import "./node_modules/dup-case.js"; import "@plugin/dup-case.js"
import "./not-in.js"; import "./node_modules/not-in.js"; ... | explode_data.jsonl/38579 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2434
} | [
2830,
3393,
20140,
24480,
1955,
28201,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
4085,
2857,
788,
22074,
571,
21918,
5924,
21912,
384... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPodIndexer(t *testing.T) {
var testConfig = common.NewConfig()
podIndexer, err := NewPodNameIndexer(*testConfig, metagen)
assert.Nil(t, err)
podName := "testpod"
ns := "testns"
pod := Pod{
Metadata: ObjectMeta{
Name: podName,
Namespace: ns,
Labels: map[string]string{
"labelkey": "la... | explode_data.jsonl/80955 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 381
} | [
2830,
3393,
23527,
1552,
261,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
2648,
284,
4185,
7121,
2648,
2822,
3223,
347,
1552,
261,
11,
1848,
1669,
1532,
23527,
675,
1552,
261,
4071,
1944,
2648,
11,
2270,
8535,
340,
6948,
59678,
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 TestRsyslogScan(t *testing.T) {
data := []byte("98 <133>Mar 14 04:20:29 example-host-prod-1-1 audit type=SYSCALL msg=audit(1489465219.995:1699): test")
buffer := NewSyslogBuffer()
buffer.Append(data)
result := buffer.Next()
assert.NotEqual(t, nil, result)
assert.Equal(t, "<133>Mar 14 04:20:29 example-host-... | explode_data.jsonl/18083 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 163
} | [
2830,
3393,
49,
7791,
839,
26570,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
3056,
3782,
445,
24,
23,
366,
16,
18,
18,
29,
12061,
220,
16,
19,
220,
15,
19,
25,
17,
15,
25,
17,
24,
3110,
38589,
9838,
67,
12,
16,
12,
16,
24275,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetEC2InstanceIDBlackholedError(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
ec2MetadataClient := mock_ec2.NewMockEC2MetadataClient(ctrl)
agent := &ecsAgent{ec2MetadataClient: ec2MetadataClient}
ec2MetadataClient.EXPECT().InstanceID().Return("", errors.New("blackholed"))
assert.E... | explode_data.jsonl/41591 | {
"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,
1949,
7498,
17,
2523,
915,
14417,
6161,
832,
1454,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
197,
757,
17,
14610,
2959,
1669,
7860,
36844,
17,
7121,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_CreateScratch_ValidDestpath_Success(t *testing.T) {
rhcs := runhcs.Runhcs{
Debug: true,
}
scratchPath := filepath.Join(t.TempDir(), "scratch.vhdx")
ctx := context.TODO()
err := rhcs.CreateScratch(ctx, scratchPath)
if err != nil {
t.Fatalf("Failed 'CreateScratch' command with: %v", err)
}
_, err ... | explode_data.jsonl/71752 | {
"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,
34325,
65508,
754,
97279,
34830,
2343,
87161,
1155,
353,
8840,
836,
8,
341,
7000,
71,
4837,
1669,
1598,
71,
4837,
16708,
71,
4837,
515,
197,
34424,
25,
830,
345,
197,
630,
1903,
86284,
1820,
1669,
26054,
22363,
1155,
65009,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefaultWebhookFlow(t *testing.T) {
tests := []struct {
name string
body string
reviewResponse *admissionv1beta1.AdmissionResponse
expCode int
expBody string
}{
{
name: "No admission review on request should return error",
body: "",
expBody: "no bod... | explode_data.jsonl/36783 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 798
} | [
2830,
3393,
3675,
5981,
20873,
18878,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
35402,
1843,
914,
198,
197,
17200,
1050,
2582,
353,
329,
2728,
85,
16,
19127,
16,
17865,
2728,
2582,
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 TestManifestGenerateAllOff(t *testing.T) {
g := NewGomegaWithT(t)
m, _, err := generateManifest("all_off", "", liveCharts)
if err != nil {
t.Fatal(err)
}
objs, err := parseObjectSetFromManifest(m)
if err != nil {
t.Fatal(err)
}
g.Expect(objs.size()).Should(Equal(0))
} | explode_data.jsonl/48758 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 129
} | [
2830,
3393,
38495,
31115,
2403,
4596,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
340,
2109,
11,
8358,
1848,
1669,
6923,
38495,
445,
541,
13651,
497,
7342,
3887,
64878,
340,
743,
1848,
961,
2092,
341,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestUnmarshalStoredJson(t *testing.T) {
Convey("Given one stored temperature", t, func() {
s := NewStore("./test-data", 20)
storedData1, err := s.unmarshal(storeJSON1)
So(err, ShouldBeNil)
So(storedData1, ShouldNotBeNil)
So(len(storedData1.Temperatures), ShouldEqual, 1)
})
} | explode_data.jsonl/4844 | {
"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,
1806,
27121,
93243,
5014,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
22043,
825,
9768,
9315,
497,
259,
11,
2915,
368,
341,
197,
1903,
1669,
1532,
6093,
13988,
1944,
13945,
497,
220,
17,
15,
340,
197,
18388,
3018,
1043... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconcileServiceInstanceTimeoutTriggersOrphanMitigation(t *testing.T) {
_, fakeCatalogClient, _, testController, sharedInformers := newTestController(t, fakeosb.FakeClientConfiguration{
ProvisionReaction: &fakeosb.ProvisionReaction{
Error: &url.Error{
Err: getTestTimeoutError(),
},
},
})
shar... | explode_data.jsonl/58181 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 510
} | [
2830,
3393,
693,
40446,
457,
1860,
2523,
7636,
1282,
21385,
2195,
9943,
54370,
17930,
1155,
353,
8840,
836,
8,
341,
197,
6878,
12418,
41606,
2959,
11,
8358,
1273,
2051,
11,
6094,
37891,
388,
1669,
501,
2271,
2051,
1155,
11,
12418,
436,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetBuffers(t *testing.T) {
ctx, handler := testSetup(t)
defer ctx.TeardownTestCtx()
const reply = `Pool Name Index NUMA Size Data Size Total Avail Cached Used
default-numa-0 0 0 2304 2048 17290 17290 0 0 `
ctx.MockVpp.MockReply(&vpe.CliInbandReply{
R... | explode_data.jsonl/69840 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 556
} | [
2830,
3393,
1949,
36219,
1155,
353,
8840,
836,
8,
341,
20985,
11,
7013,
1669,
1273,
21821,
1155,
340,
16867,
5635,
94849,
37496,
2271,
23684,
2822,
4777,
9851,
284,
1565,
10551,
3988,
310,
8008,
15943,
32,
220,
8478,
220,
2885,
8478,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFailClose(t *testing.T) {
s := &TestSetup{
t: t,
conf: basicConfig+","+networkFailClose,
no_mixer: true,
}
if err := s.SetUp(); err != nil {
t.Fatalf("Failed to setup test: %v", err)
}
defer s.TearDown()
url := fmt.Sprintf("http://localhost:%d/echo", ClientProxyPort)
tag := "Fail-Open"
// ... | explode_data.jsonl/51390 | {
"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,
19524,
7925,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
609,
2271,
21821,
515,
197,
3244,
25,
262,
259,
345,
197,
67850,
25,
6770,
2648,
85079,
17511,
19524,
7925,
345,
197,
72104,
717,
39014,
25,
830,
345,
197,
532,
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... | 4 |
func TestMsgSell(t *testing.T) {
_, _, a1 := testdata.KeyTestPubAddr()
tests := map[string]struct {
src MsgSell
expErr bool
}{
"valid": {
src: MsgSell{
Owner: a1.String(),
Orders: []*MsgSell_Order{
{
BatchDenom: "A00-00000000-00000000-000",
Quantity: "1.5",
AskPrice: &sd... | explode_data.jsonl/65135 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1154
} | [
2830,
3393,
6611,
68533,
1155,
353,
8840,
836,
8,
341,
197,
6878,
8358,
264,
16,
1669,
1273,
691,
9610,
2271,
29162,
13986,
2822,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
41144,
262,
24205,
68533,
198,
197,
48558,
7747,
1807,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGet_archiveRooted(t *testing.T) {
dst := tempDir(t)
u := testModule("archive-rooted/archive.tar.gz")
if err := Get(dst, u); err != nil {
t.Fatalf("err: %s", err)
}
mainPath := filepath.Join(dst, "root", "hello.txt")
if _, err := os.Stat(mainPath); err != nil {
t.Fatalf("err: %s", err)
}
} | explode_data.jsonl/815 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 136
} | [
2830,
3393,
1949,
42873,
8439,
291,
1155,
353,
8840,
836,
8,
341,
52051,
1669,
2730,
6184,
1155,
340,
10676,
1669,
1273,
3332,
445,
16019,
39214,
291,
71627,
28048,
20963,
1138,
743,
1848,
1669,
2126,
30260,
11,
575,
1215,
1848,
961,
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... | 3 |
func TestPrivateActivityYesInvisibleForOtherUser(t *testing.T) {
defer prepareTestEnv(t)()
testPrivateActivityDoSomethingForActionEntries(t)
testPrivateActivityHelperEnablePrivateActivity(t)
session := loginUser(t, privateActivityTestOtherUser)
visible := testPrivateActivityHelperHasVisibleActivitiesFromSession(t... | explode_data.jsonl/51651 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 111
} | [
2830,
3393,
16787,
4052,
9454,
641,
12601,
2461,
11409,
1474,
1155,
353,
8840,
836,
8,
341,
16867,
10549,
2271,
14359,
1155,
8,
741,
18185,
16787,
4052,
5404,
23087,
2461,
2512,
24533,
1155,
340,
18185,
16787,
4052,
5511,
11084,
16787,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteEmailAddresses(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
// delete multiple email address
emails := make([]*EmailAddress, 2)
emails[0] = &EmailAddress{
UID: int64(2),
ID: int64(3),
Email: "user2@example.com",
LowerEmail: "user2@example.com",
}
em... | explode_data.jsonl/67889 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 251
} | [
2830,
3393,
6435,
4781,
52290,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
19905,
28770,
3380,
2271,
5988,
12367,
197,
322,
3698,
5248,
2551,
2621,
198,
197,
51376,
1669,
1281,
85288,
79986,
11,
220,
17,
340,
197,
51376,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestServiceEntry(t *testing.T) {
t.Logf("running performance test with the following parameters { Number of ServiceEntry: %d, Number of Envoys: %d, Total test time: %vs }",
*serviceEntryCount,
*envoyCount,
terminateAfter.Seconds())
t.Log("building & starting mock mcp server...")
mcpServer, err := runMcpS... | explode_data.jsonl/74663 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 602
} | [
2830,
3393,
1860,
5874,
1155,
353,
8840,
836,
8,
341,
3244,
98954,
445,
27173,
5068,
1273,
448,
279,
2701,
5029,
314,
5624,
315,
5362,
5874,
25,
1018,
67,
11,
5624,
315,
2925,
3334,
1047,
25,
1018,
67,
11,
10657,
1273,
882,
25,
1018... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBQMultipleCallsForTheSameRank(t *testing.T) {
lower, upper := -5.0, 5.0
bq := getNoiselessBQ(t, lower, upper)
for _, i := range createEntries() {
bq.Add(i)
}
for _, rank := range getRanks() {
got, err := bq.Result(rank)
if err != nil {
t.Fatalf("Couldn't compute dp result for rank=%f: %v", rank, ... | explode_data.jsonl/80637 | {
"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,
33,
48,
32089,
55292,
2461,
785,
19198,
22550,
1155,
353,
8840,
836,
8,
341,
8810,
1202,
11,
8416,
1669,
481,
20,
13,
15,
11,
220,
20,
13,
15,
198,
2233,
80,
1669,
633,
61819,
1717,
33,
48,
1155,
11,
4722,
11,
8416,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRgPyDumpReqs(t *testing.T) {
t.Parallel()
/**
* Success
*/
t.Run("should process command", func(t *testing.T) {
t.Parallel()
// Client
client := testClient{
rcv: []models.PyDumpReq{{
GearReqVersion: 1,
Name: "pandas",
IsDownloaded: "yes",
IsInstalled: "yes",
... | explode_data.jsonl/66884 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 777
} | [
2830,
3393,
49,
70,
13828,
51056,
693,
26358,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
1747,
197,
353,
13047,
198,
197,
735,
3244,
16708,
445,
5445,
1882,
3210,
497,
2915,
1155,
353,
8840,
836,
8,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRoaringBitmapBitmapOf(t *testing.T) {
array := []uint64{5580, 33722, 44031, 57276, 83097}
bmp := BitmapOf(array...)
assert.EqualValues(t, len(array), bmp.GetCardinality())
} | explode_data.jsonl/20323 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 76
} | [
2830,
3393,
38872,
3249,
16773,
16773,
2124,
1155,
353,
8840,
836,
8,
341,
11923,
1669,
3056,
2496,
21,
19,
90,
20,
20,
23,
15,
11,
220,
18,
18,
22,
17,
17,
11,
220,
19,
19,
15,
18,
16,
11,
220,
20,
22,
17,
22,
21,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInvalidateWhenSuccess(t *testing.T) {
// Given
options := store.InvalidateOptions{
Tags: []string{"tag1"},
}
store := &mocksStore.StoreInterface{}
store.On("Invalidate", options).Return(nil)
codec := New(store)
// When
err := codec.Invalidate(options)
// Then
assert.Nil(t, err)
assert.Equal(t... | explode_data.jsonl/29043 | {
"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,
641,
7067,
4498,
7188,
1155,
353,
8840,
836,
8,
341,
197,
322,
16246,
198,
35500,
1669,
3553,
5337,
7067,
3798,
515,
197,
10261,
2032,
25,
3056,
917,
4913,
4578,
16,
7115,
197,
630,
57279,
1669,
609,
16712,
82,
6093,
38047... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_SimpleScalarXmlProperties_awsEc2queryDeserialize(t *testing.T) {
cases := map[string]struct {
StatusCode int
Header http.Header
BodyMediaType string
Body []byte
ExpectResult *SimpleScalarXmlPropertiesOutput
}{
// Serializes simple scalar properties
"Ec2SimpleScalarPro... | explode_data.jsonl/3139 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1487
} | [
2830,
3393,
2959,
1098,
6456,
20639,
11593,
7903,
62,
8635,
50730,
17,
1631,
64465,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
15872,
262,
526,
198,
197,
197,
4047,
286,
1758,
15753,
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... | 6 |
func Test_MapToMap2(t *testing.T) {
type User struct {
Id int
Name string
}
params := g.Map{
"key": g.Map{
"id": 1,
"name": "john",
},
}
gtest.C(t, func(t *gtest.T) {
m := make(map[string]User)
err := gconv.MapToMap(params, &m)
t.Assert(err, nil)
t.Assert(len(m), 1)
t.Assert(m["key"].Id... | explode_data.jsonl/41426 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 540
} | [
2830,
3393,
56992,
1249,
2227,
17,
1155,
353,
8840,
836,
8,
341,
13158,
2657,
2036,
341,
197,
67211,
256,
526,
198,
197,
21297,
914,
198,
197,
532,
25856,
1669,
342,
10104,
515,
197,
197,
1,
792,
788,
342,
10104,
515,
298,
197,
2870... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadASN1IntegerUnsigned(t *testing.T) {
testData := []struct {
in []byte
out uint64
}{
{[]byte{2, 1, 0}, 0},
{[]byte{2, 1, 1}, 1},
{[]byte{2, 1, 2}, 2},
{[]byte{2, 1, 127}, 127},
{[]byte{2, 2, 0, 128}, 128},
{[]byte{2, 2, 1, 0}, 256},
{[]byte{2, 4, 0, 128, 0, 0}, 0x800000},
{[]byte{2, 8,... | explode_data.jsonl/16725 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 381
} | [
2830,
3393,
4418,
68134,
16,
3486,
56421,
1155,
353,
8840,
836,
8,
341,
18185,
1043,
1669,
3056,
1235,
341,
197,
17430,
220,
3056,
3782,
198,
197,
13967,
2622,
21,
19,
198,
197,
59403,
197,
197,
90,
1294,
3782,
90,
17,
11,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestCommitInWindows(t *testing.T) {
s := fmt.Sprintf(`cd /d %s & git pull & git add -A & git commit -m "%s"`, " E:/rox/roxliu.github.io", "publish post")
log.Println("Run the command in windows: " + s)
commitInWindows(s)
} | explode_data.jsonl/43092 | {
"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,
33441,
641,
13164,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
8879,
17305,
5809,
4385,
608,
67,
1018,
82,
609,
16345,
6815,
609,
16345,
912,
481,
32,
609,
16345,
5266,
481,
76,
5962,
82,
1,
7808,
330,
468,
14375,
54789,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSyncGroupByGroupKey(t *testing.T) {
type args []models.UserGroup
type result struct {
wantError bool
}
cases := []struct {
name string
in args
want result
}{
{
name: `normal test http group`,
in: args{
models.UserGroup{GroupName: "orange", GroupType: common.HTTPGroupType},
models... | explode_data.jsonl/73822 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 812
} | [
2830,
3393,
12154,
2808,
1359,
2808,
1592,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
3056,
6507,
7344,
2808,
198,
13158,
1102,
2036,
341,
197,
50780,
1454,
1807,
198,
197,
532,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.