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 TestBTree(t *testing.T) {
var tr btree
spanMemo := make(map[int]roachpb.Span)
// With degree == 16 (max-items/node == 31) we need 513 items in order for
// there to be 3 levels in the tree. The count here is comfortably above
// that.
const count = 768
// Add keys in sorted order.
for i := 0; i < count; ... | explode_data.jsonl/24880 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 581
} | [
2830,
3393,
33,
6533,
1155,
353,
8840,
836,
8,
341,
2405,
489,
293,
9344,
198,
197,
1480,
46402,
1669,
1281,
9147,
18640,
60,
64500,
16650,
85309,
692,
197,
322,
3085,
8381,
621,
220,
16,
21,
320,
2810,
17459,
37211,
621,
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,
1... | 9 |
func Test_AuthWithInvalidPassword_Gives403(t *testing.T) {
handler := func(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "<html><body>Hello World!</body></html>")
}
w := httptest.NewRecorder()
wantUser := "admin"
wantPassword := "test"
r := httptest.NewRequest(http.MethodGet, "http://localhost:... | explode_data.jsonl/27516 | {
"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,
1566,
940,
2354,
7928,
4876,
2646,
1886,
19,
15,
18,
1155,
353,
8840,
836,
8,
1476,
53326,
1669,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
53112,
44747,
3622,
11,
4055,
1551,
1784,
2599,
79497,
4337,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAttachVolumeFailureUnmarshal(t *testing.T) {
var error ErrorAttachVolumeFailure
err := yaml.Unmarshal([]byte(testutil.AttachVolumeFailureYaml), &error)
if err != nil {
t.Error(err)
}
if error.NodeUUID != testutil.AgentUUID {
t.Error("Wrong Node UUID field")
}
if error.InstanceUUID != testutil.Inst... | explode_data.jsonl/76409 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 201
} | [
2830,
3393,
30485,
18902,
17507,
1806,
27121,
1155,
353,
8840,
836,
8,
341,
2405,
1465,
4600,
30485,
18902,
17507,
198,
9859,
1669,
32246,
38097,
10556,
3782,
8623,
1314,
88284,
18902,
17507,
56,
9467,
701,
609,
841,
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... | 6 |
func TestGroupCleanup(t *testing.T) {
if os.Getuid() != 0 {
t.Skip("we need root for credential")
}
cmd := exec.Command("id")
cmd.SysProcAttr = &syscall.SysProcAttr{
Credential: &syscall.Credential{
Uid: 0,
Gid: 0,
},
}
out, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("Cmd failed with err ... | explode_data.jsonl/36119 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 292
} | [
2830,
3393,
2808,
67335,
1155,
353,
8840,
836,
8,
341,
743,
2643,
2234,
2423,
368,
961,
220,
15,
341,
197,
3244,
57776,
445,
896,
1184,
3704,
369,
40207,
1138,
197,
532,
25920,
1669,
3883,
12714,
445,
307,
1138,
25920,
59418,
24508,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMaxQuerySamples(t *testing.T) {
test, err := NewTest(t, `
load 10s
metric 1+1x100
bigmetric{a="1"} 1+1x100
bigmetric{a="2"} 1+1x100
`)
require.NoError(t, err)
defer test.Close()
err = test.Run()
require.NoError(t, err)
// These test cases should be touching the limit exactly (hence no exceeding).... | explode_data.jsonl/35555 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2335
} | [
2830,
3393,
5974,
2859,
39571,
1155,
353,
8840,
836,
8,
341,
18185,
11,
1848,
1669,
1532,
2271,
1155,
11,
22074,
1078,
220,
16,
15,
82,
198,
220,
18266,
220,
16,
10,
16,
87,
16,
15,
15,
198,
220,
2409,
15903,
90,
64,
428,
16,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDetachedHead(t *testing.T) {
detachedHead := "345c470bf286aa3ca8e8cb5d68361d4a685ba7d1"
expectedErr := fmt.Errorf("git is in detached HEAD state, HEAD is: %s", detachedHead)
res, err := abbreviatedHead(detachedHead)
if (err == nil) || (res != "") {
t.Errorf("Expected error for input %v but received %v",... | explode_data.jsonl/22101 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 172
} | [
2830,
3393,
17076,
3854,
12346,
1155,
353,
8840,
836,
8,
341,
2698,
295,
3854,
12346,
1669,
330,
18,
19,
20,
66,
19,
22,
15,
13233,
17,
23,
21,
5305,
18,
924,
23,
68,
23,
7221,
20,
67,
21,
23,
18,
21,
16,
67,
19,
64,
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,
1,
1,
1... | 4 |
func TestGetFileSDScrapeWork(t *testing.T) {
data := `
scrape_configs:
- job_name: foo
file_sd_configs:
- files: [testdata/file_sd.json]
`
var cfg Config
if err := cfg.parse([]byte(data), "sss"); err != nil {
t.Fatalf("cannot parase data: %s", err)
}
sws := cfg.getFileSDScrapeWork(nil)
if !equalStaticConfig... | explode_data.jsonl/13543 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 689
} | [
2830,
3393,
1949,
1703,
5491,
3326,
19842,
6776,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
22074,
2388,
19842,
59150,
510,
12,
2618,
1269,
25,
15229,
198,
220,
1034,
40168,
59150,
510,
220,
481,
3542,
25,
508,
92425,
23903,
40168,
4323,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStrArray_ContainsI(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
s := garray.NewStrArray()
s.Append("a", "b", "C")
t.Assert(s.Contains("A"), false)
t.Assert(s.Contains("a"), true)
t.Assert(s.ContainsI("A"), true)
})
} | explode_data.jsonl/53081 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
2580,
1857,
62,
23805,
40,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
1903,
1669,
342,
1653,
7121,
2580,
1857,
741,
197,
1903,
8982,
445,
64,
497,
330,
65,
497,
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 TestListRepositoriesRaw(t *testing.T) {
assert := assert.New(t)
bb, apiBaseURL, teardown := bitbucketTestClient(stubRepositoriesResponse)
defer teardown()
resp, err := bb.RawRequest("GET", apiBaseURL+"/projects/VID/repos", "")
if !assert.NoError(err) {
return
}
defer resp.Close()
assert.NotNil(resp)
b... | explode_data.jsonl/76092 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
852,
44814,
20015,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
2233,
65,
11,
6330,
3978,
3144,
11,
49304,
1669,
2699,
30410,
2271,
2959,
5895,
392,
44814,
2582,
340,
16867,
49304,
741,
34653,
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... | 2 |
func TestUnionUnknownVariantType(test *testing.T) {
v, err := parseRDLString(`type MyUnion Union<Blah>;`)
if err == nil {
test.Errorf("Invalid union variant not caught: %v", v)
}
} | explode_data.jsonl/74362 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 69
} | [
2830,
3393,
32658,
13790,
20746,
929,
8623,
353,
8840,
836,
8,
341,
5195,
11,
1848,
1669,
4715,
49,
16524,
703,
5809,
1313,
3017,
32658,
9145,
27,
4923,
1466,
65795,
24183,
743,
1848,
621,
2092,
341,
197,
18185,
13080,
445,
7928,
11300,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseValidTimeRange(t *testing.T) {
timeRange, err := NewTimeRange("23:12-01:30")
if err != nil {
t.Fatal(err.Error())
}
if timeRange.start.Hour() != 23 || timeRange.start.Minute() != 12 {
t.Fatal("Failed to parse Start Time")
}
if timeRange.end.Hour() != 1 || timeRange.end.Minute() != 30 {
t.Fa... | explode_data.jsonl/61794 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
14463,
4088,
1462,
6046,
1155,
353,
8840,
836,
8,
341,
21957,
6046,
11,
1848,
1669,
1532,
1462,
6046,
445,
17,
18,
25,
16,
17,
12,
15,
16,
25,
18,
15,
5130,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
6141,
2398... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatrixToValues(t *testing.T) {
// v0 is from t 0-500 counting all up from 0 to 500
v0 := make([]model.SamplePair, 500)
e0 := [][]float64{
make([]float64, 500),
make([]float64, 500),
}
for i := 0; i < cap(v0); i++ {
v0[i] = model.SamplePair{
Timestamp: model.Time(i * 1000),
Value: model.Sam... | explode_data.jsonl/48793 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1361
} | [
2830,
3393,
6689,
1249,
6227,
1155,
353,
8840,
836,
8,
341,
197,
322,
348,
15,
374,
504,
259,
220,
15,
12,
20,
15,
15,
25009,
678,
705,
504,
220,
15,
311,
220,
20,
15,
15,
198,
5195,
15,
1669,
1281,
10556,
2528,
76266,
12443,
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 TestRedoLogger(t *testing.T) {
provider, cleanup := redologTestSetup(t)
defer cleanup()
loggers := []*redoLogger{}
records := []*redoRecord{}
verifyLogRecords := func() {
for i := 0; i < len(loggers); i++ {
retrievedRec, err := loggers[i].load()
assert.NoError(t, err)
assert.Equal(t, records[i], ... | explode_data.jsonl/2697 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 581
} | [
2830,
3393,
6033,
78,
7395,
1155,
353,
8840,
836,
8,
341,
197,
19979,
11,
21290,
1669,
2518,
1609,
2271,
21821,
1155,
340,
16867,
21290,
2822,
6725,
10637,
1669,
29838,
63561,
7395,
16094,
197,
26203,
1669,
29838,
63561,
6471,
31483,
9358... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPodSpecForCSIWithOlderCSIVersion(t *testing.T) {
fakeClient := fakek8sclient.NewSimpleClientset()
coreops.SetInstance(coreops.New(fakeClient))
// Should use 0.3 csi version for k8s version less than 1.13
fakeClient.Discovery().(*fakediscovery.FakeDiscovery).FakedServerVersion = &version.Info{
GitVersion:... | explode_data.jsonl/55460 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 593
} | [
2830,
3393,
23527,
8327,
2461,
48407,
2354,
18284,
261,
6412,
3090,
1325,
1155,
353,
8840,
836,
8,
341,
1166,
726,
2959,
1669,
12418,
74,
23,
82,
2972,
7121,
16374,
2959,
746,
741,
71882,
3721,
4202,
2523,
47867,
3721,
7121,
74138,
2959... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetPlanFilename(t *testing.T) {
cases := []struct {
workspace string
maybeCfg *valid.Project
exp string
}{
{
"workspace",
nil,
"workspace.tfplan",
},
{
"workspace",
&valid.Project{},
"workspace.tfplan",
},
{
"workspace",
&valid.Project{
Name: String("project... | explode_data.jsonl/42529 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
1949,
20485,
20759,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
197,
42909,
914,
198,
197,
2109,
49791,
42467,
220,
353,
1891,
30944,
198,
197,
48558,
981,
914,
198,
197,
59403,
197,
197,
515,
298... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTagMissingColon(t *testing.T) {
var opts = struct {
Value bool `short`
}{}
assertParseFail(t, ErrTag, "expected `:' after key name, but got end of tag (in `short`)", &opts, "")
} | explode_data.jsonl/44075 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
5668,
25080,
88665,
1155,
353,
8840,
836,
8,
972,
2405,
12185,
284,
2036,
972,
197,
47399,
1807,
1565,
8676,
75679,
197,
15170,
2570,
6948,
14463,
19524,
1155,
11,
15495,
5668,
11,
330,
7325,
1565,
4884,
1283,
1376,
829,
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 |
func TestMatcherLookupByExtension(t *testing.T) {
// If we are not on CI skip the test.
if os.Getenv("CI") == "" {
t.Skip("Not on CI, skipping comby-dependent test")
}
t.Parallel()
input := map[string]string{
"file_without_extension": `
/* This foo(plain.empty) {} is in a Go comment should not match in Go, b... | explode_data.jsonl/5442 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1059
} | [
2830,
3393,
37554,
34247,
1359,
12049,
1155,
353,
8840,
836,
8,
341,
197,
322,
1416,
582,
525,
537,
389,
20694,
10706,
279,
1273,
624,
743,
2643,
64883,
445,
11237,
899,
621,
1591,
341,
197,
3244,
57776,
445,
2623,
389,
20694,
11,
426... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLocalKMS_ImportPrivateKey(t *testing.T) {
// create a real (not mocked) master key and secret lock to test the KMS end to end
sl := createMasterKeyAndSecretLock(t)
storeDB := make(map[string][]byte)
// test New()
kmsService, e := New(testMasterKeyURI, &mockProvider{
storage: mockstorage.NewCustomMockSt... | explode_data.jsonl/33101 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1842
} | [
2830,
3393,
7319,
42,
4826,
62,
11511,
75981,
1155,
353,
8840,
836,
8,
341,
197,
322,
1855,
264,
1931,
320,
1921,
46149,
8,
7341,
1376,
323,
6234,
5296,
311,
1273,
279,
730,
4826,
835,
311,
835,
198,
78626,
1669,
1855,
18041,
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... | 6 |
func TestExecValid(t *testing.T) {
tests := []Exec{
Exec{"/bin/httpd"},
Exec{"/app"},
Exec{"/app", "arg1", "arg2"},
Exec{"app"},
}
for i, tt := range tests {
if err := tt.assertValid(); err != nil {
t.Errorf("#%d: err == %v, want nil", i, err)
}
}
} | explode_data.jsonl/66659 | {
"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,
10216,
4088,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
10216,
515,
197,
197,
10216,
90,
3115,
6863,
15627,
67,
7115,
197,
197,
10216,
90,
3115,
676,
7115,
197,
197,
10216,
90,
3115,
676,
497,
330,
858,
16,
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... | 3 |
func TestLogin(t *testing.T) {
defer gock.Off()
tests := []struct {
user string
pass string
path string
auth string
tokens []*token
token *token
err error
}{
// Success, match found.
{
user: "janedoe",
pass: "password",
path: "/api/v1/users/janedoe/token",
auth: "Ba... | explode_data.jsonl/36375 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1391
} | [
2830,
3393,
6231,
1155,
353,
8840,
836,
8,
341,
16867,
728,
377,
13,
4596,
2822,
78216,
1669,
3056,
1235,
341,
197,
19060,
256,
914,
198,
197,
41431,
256,
914,
198,
197,
26781,
256,
914,
198,
197,
78011,
256,
914,
198,
197,
3244,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMergeConfigs(t *testing.T) {
fakeConfig := func(u string) *rest.Config { return &rest.Config{Username: u} }
cases := []struct {
name string
local *rest.Config
foreign map[string]rest.Config
current string
expected map[string]rest.Config
err bool
}{
{
name: "require at least on... | explode_data.jsonl/80357 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 949
} | [
2830,
3393,
52096,
84905,
1155,
353,
8840,
836,
8,
341,
1166,
726,
2648,
1669,
2915,
8154,
914,
8,
353,
3927,
10753,
314,
470,
609,
3927,
10753,
90,
11115,
25,
575,
92,
456,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFilterServiceInstancesByPlanName(t *testing.T) {
Convey("Test empty array return empty array", t, func() {
result := FilterServiceInstancesByPlanName([]ServiceInstance{}, "test")
So(result, ShouldResemble, []ServiceInstance{})
})
Convey("Test one matching by lowercase name instance returned from array"... | explode_data.jsonl/9315 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 371
} | [
2830,
3393,
5632,
1860,
42725,
1359,
20485,
675,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2271,
4287,
1334,
470,
4287,
1334,
497,
259,
11,
2915,
368,
341,
197,
9559,
1669,
12339,
1860,
42725,
1359,
20485,
675,
10556,
1860,
2523,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestActiveSendMSSLessThanMTU(t *testing.T) {
const maxPayload = 100
c := context.New(t, 65535)
defer c.Cleanup()
c.CreateConnectedWithRawOptions(context.TestInitialSequenceNumber, 30000, -1 /* epRcvBuf */, []byte{
header.TCPOptionMSS, 4, byte(maxPayload / 256), byte(maxPayload % 256),
})
testBrokenUpWrite... | explode_data.jsonl/75969 | {
"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,
5728,
11505,
44,
22594,
433,
26067,
8505,
52,
1155,
353,
8840,
836,
8,
341,
4777,
1932,
29683,
284,
220,
16,
15,
15,
198,
1444,
1669,
2266,
7121,
1155,
11,
220,
21,
20,
20,
18,
20,
340,
16867,
272,
727,
60639,
2822,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDamerauLevenshtein(t *testing.T) {
for _, row := range dlev_testdata {
res := DamerauLevenshtein(row[0], row[1])
expected, err := strconv.Atoi(row[2])
if err != nil {
t.Error("bad row in test data")
}
if res != expected {
t.Errorf("DamerauLevenshtein(%q, %q) => %d, expected %d", row[0], row[1]... | explode_data.jsonl/58058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
35,
3436,
84,
2304,
21097,
55499,
258,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
2802,
1669,
2088,
294,
3449,
4452,
691,
341,
197,
10202,
1669,
422,
3436,
84,
2304,
21097,
55499,
258,
7835,
58,
15,
1125,
2802,
58,
16,
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 TestCheckStringArray(t *testing.T) {
l := lua.NewState()
lua.DoString(l, `x = {"a=5", "b=6", "c=7"}`)
l.Global("x")
res := checkStringArray(l, -1)
if len(res) != 3 {
t.Fatal("Unexpected length of ", res)
}
if res[0] != "a=5" {
t.Error("First element has wrong value", res[0])
}
if res[1] != "b=6" {
... | explode_data.jsonl/40381 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
3973,
703,
1857,
1155,
353,
8840,
836,
8,
341,
8810,
1669,
20357,
7121,
1397,
741,
44822,
33596,
703,
2333,
11,
1565,
87,
284,
5212,
64,
28,
20,
497,
330,
65,
28,
21,
497,
330,
66,
28,
22,
1,
27085,
8810,
27381,
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... | 5 |
func TestIterStack(t *testing.T) {
f := func(i int) iterFrame { return iterFrame{pos: int16(i)} }
var is iterStack
for i := 1; i <= 2*len(iterStackArr{}); i++ {
var j int
for j = 0; j < i; j++ {
is.push(f(j))
}
require.Equal(t, j, is.len())
for j--; j >= 0; j-- {
require.Equal(t, f(j), is.pop())
}
... | explode_data.jsonl/24884 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
8537,
4336,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
2915,
1956,
526,
8,
5367,
4369,
314,
470,
5367,
4369,
90,
966,
25,
526,
16,
21,
1956,
9139,
456,
2405,
374,
5367,
4336,
198,
2023,
600,
1669,
220,
16,
26,
600,
2651... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapValidatingRefreshable(t *testing.T) {
r := refreshable.NewDefaultRefreshable("https://palantir.com:443")
vr, err := refreshable.NewMapValidatingRefreshable(r, func(i interface{}) (interface{}, error) {
return url.Parse(i.(string))
})
require.NoError(t, err)
require.NoError(t, vr.LastValidateErr())
r... | explode_data.jsonl/30065 | {
"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,
2227,
4088,
1095,
14567,
480,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
10408,
480,
7121,
3675,
14567,
480,
445,
2428,
1110,
19308,
517,
404,
905,
25,
19,
19,
18,
1138,
5195,
81,
11,
1848,
1669,
10408,
480,
7121,
2227,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetReadingsByDeviceAndValueDescriptor(t *testing.T) {
reset()
myMock := &dbMock.DBClient{}
myMock.On("ReadingsByDeviceAndValueDescriptor", mock.Anything, mock.Anything, mock.Anything).Return([]models.Reading{}, nil)
dbClient = myMock
_, err := getReadingsByDeviceAndValueDescriptor("valid", "valid", 0, ... | explode_data.jsonl/48185 | {
"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,
4418,
819,
1359,
6985,
3036,
1130,
11709,
1155,
353,
8840,
836,
8,
341,
70343,
741,
13624,
11571,
1669,
609,
1999,
11571,
22537,
2959,
31483,
13624,
11571,
8071,
445,
4418,
819,
1359,
6985,
3036,
1130,
11709,
497,
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... | 2 |
func TestMatInvert(t *testing.T) {
src := NewMatWithSize(4, 4, MatTypeCV32F) // only implemented for symm. Mats
defer src.Close()
dst := NewMat()
defer dst.Close()
Invert(src, &dst, 0)
if dst.Empty() {
t.Error("Invert dst should not be empty.")
}
} | explode_data.jsonl/81750 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
11575,
641,
1621,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
1532,
11575,
2354,
1695,
7,
19,
11,
220,
19,
11,
6867,
929,
19589,
18,
17,
37,
8,
442,
1172,
11537,
369,
7886,
76,
13,
67179,
198,
16867,
2286,
10421,
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... | 2 |
func TestMergePullRequestAction(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
user := AssertExistsAndLoadBean(t, &User{ID: 2}).(*User)
repo := AssertExistsAndLoadBean(t, &Repository{ID: 1, OwnerID: user.ID}).(*Repository)
repo.Owner = user
issue := AssertExistsAndLoadBean(t, &Issue{ID: 3, RepoID: repo.I... | explode_data.jsonl/74213 | {
"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,
52096,
36068,
1900,
2512,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
2271,
5988,
2398,
19060,
1669,
5319,
15575,
3036,
5879,
10437,
1155,
11,
609,
1474,
90,
915,
25,
220,
17,
16630,
4071,
1474,
340,
17200,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAsPatch(t *testing.T) {
r, _ := Prepare(mocks.NewRequest(), AsPatch())
if r.Method != "PATCH" {
t.Fatal("autorest: AsPatch failed to set HTTP method header to PATCH")
}
} | explode_data.jsonl/20957 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 74
} | [
2830,
3393,
2121,
43622,
1155,
353,
8840,
836,
8,
972,
7000,
11,
716,
1669,
31166,
1255,
25183,
75274,
1507,
1634,
43622,
13116,
743,
435,
20798,
961,
330,
31165,
1,
972,
197,
3244,
26133,
445,
2717,
41419,
25,
1634,
43622,
4641,
311,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetNotExistingKeyWithDefaultInt(t *testing.T) {
name, ok := Config().GetInt("XXXXX", 72)
if name != 72 {
t.Errorf("Expected 72 and got '%d'", name)
}
if ok {
t.Errorf("Expected ok=false and got ok=%+v", ok)
}
} | explode_data.jsonl/51567 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
1949,
2623,
53067,
1592,
2354,
3675,
1072,
1155,
353,
8840,
836,
8,
341,
11609,
11,
5394,
1669,
5532,
1005,
85097,
445,
23830,
55,
497,
220,
22,
17,
692,
743,
829,
961,
220,
22,
17,
341,
197,
3244,
13080,
445,
18896,
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... | 3 |
func TestAtKeyframes(t *testing.T) {
expectPrinted(t, "@keyframes {}", "@keyframes \"\" {\n}\n")
expectPrinted(t, "@keyframes name{}", "@keyframes name {\n}\n")
expectPrinted(t, "@keyframes name {}", "@keyframes name {\n}\n")
expectPrinted(t, "@keyframes name{0%,50%{color:red}25%,75%{color:blue}}",
"@keyframes na... | explode_data.jsonl/32629 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1155
} | [
2830,
3393,
1655,
1592,
23719,
1155,
353,
8840,
836,
8,
341,
24952,
8994,
291,
1155,
11,
8428,
792,
23719,
24689,
8428,
792,
23719,
7245,
2105,
28152,
77,
11035,
77,
1138,
24952,
8994,
291,
1155,
11,
8428,
792,
23719,
829,
42351,
8428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestError_Error(t *testing.T) {
var herr Error
// transaction failed happy path: with the appropriate extra fields
herr = Error{
Problem: problem.P{
Title: "Transaction Failed",
Type: "transaction_failed",
Extras: map[string]interface{}{
"result_codes": map[string]interface{}{
"transaction... | explode_data.jsonl/12137 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 564
} | [
2830,
3393,
1454,
28651,
1155,
353,
8840,
836,
8,
341,
2405,
54739,
4600,
271,
197,
322,
7745,
4641,
6247,
1815,
25,
448,
279,
8311,
4960,
5043,
198,
9598,
615,
284,
4600,
515,
197,
197,
31198,
25,
3491,
1069,
515,
298,
92233,
25,
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 TestNoArgs(t *testing.T) {
tests := []struct {
name string
args []string
wantErr bool
}{
{
name: "no args",
args: []string{},
wantErr: false,
},
{
name: "with args",
args: []string{"fail"},
wantErr: true,
},
}
for _, tt := range tests {
args := tt.args
want... | explode_data.jsonl/59317 | {
"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,
2753,
4117,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
3056,
917,
198,
197,
50780,
7747,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
262,
330,
2152,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWSClientPingPong(t *testing.T) {
cl, err := client.NewWS(tcpAddr, websocketEndpoint)
require.Nil(t, err)
cl.SetLogger(log.TestingLogger())
err = cl.Start()
require.Nil(t, err)
t.Cleanup(func() {
if err := cl.Stop(); err != nil {
t.Error(err)
}
})
time.Sleep(6 * time.Second)
} | explode_data.jsonl/62872 | {
"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,
7433,
2959,
69883,
47,
644,
1155,
353,
8840,
836,
8,
341,
39407,
11,
1848,
1669,
2943,
7121,
7433,
98203,
13986,
11,
58943,
27380,
340,
17957,
59678,
1155,
11,
1848,
340,
39407,
4202,
7395,
12531,
8787,
287,
7395,
2398,
9859... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTopDownIneqExpr(t *testing.T) {
tests := []struct {
note string
rule string
expected interface{}
}{
{"noteq", `p = true { 0 != 1; a[i] = x; x != 2 }`, "true"},
{"gt", `p = true { 1 > 0; a[i] = x; x > 2 }`, "true"},
{"gteq", `p = true { 1 >= 1; a[i] = x; x >= 4 }`, "true"},
{"lt", `p = ... | explode_data.jsonl/25198 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 378
} | [
2830,
3393,
5366,
4454,
641,
11006,
16041,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
9038,
1272,
257,
914,
198,
197,
7000,
1111,
257,
914,
198,
197,
42400,
3749,
16094,
197,
59403,
197,
197,
4913,
45299,
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... | 2 |
func TestDefaultBackoff(t *testing.T) {
tt := []struct {
nretry int
retryAfter string // Retry-After header
out time.Duration // expected min; max = min + jitter
}{
{-1, "", time.Second}, // verify the lower bound is 1
{0, "", time.Second}, // verify the lower bound is 1
{10... | explode_data.jsonl/38185 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 422
} | [
2830,
3393,
3675,
3707,
1847,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
3056,
1235,
341,
197,
9038,
44848,
257,
526,
198,
197,
17200,
1539,
6025,
914,
286,
442,
78870,
12,
6025,
4247,
198,
197,
13967,
286,
882,
33795,
442,
3601,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetHistoryWithBash(t *testing.T) {
commands, err := GetHistory("bash", 30)
if err != nil && commands == nil {
t.Error("Should have returned comamnds for Bash shell.")
}
} | explode_data.jsonl/48859 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 74
} | [
2830,
3393,
1949,
13424,
2354,
33,
988,
1155,
353,
8840,
836,
8,
341,
262,
11293,
11,
1848,
1669,
2126,
13424,
445,
46216,
497,
220,
18,
15,
340,
262,
421,
1848,
961,
220,
2092,
1009,
11293,
621,
2092,
341,
286,
259,
6141,
445,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransformFromCloudEventEmptyCloudEvent(t *testing.T) {
var cloudEvent cloudevents.Event
conv := NewConversion()
continuePipeline, result := conv.TransformFromCloudEvent(context, cloudEvent)
_, ok := result.(error)
assert.True(t, ok)
assert.NotNil(t, result)
assert.False(t, continuePipeline)
} | explode_data.jsonl/58246 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
8963,
3830,
16055,
1556,
3522,
16055,
1556,
1155,
353,
8840,
836,
8,
341,
2405,
9437,
1556,
1185,
283,
450,
47664,
6904,
198,
197,
12027,
1669,
1532,
48237,
741,
11664,
34656,
11,
1102,
1669,
5686,
45165,
3830,
16055,
1556,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetPastPublicTrades(t *testing.T) {
t.Parallel()
_, err := b.GetPastPublicTrades(context.Background(), currency.NewPairWithDelimiter("BTCUSD", "PERP", "_"), 5, 0)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/76598 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 84
} | [
2830,
3393,
1949,
50113,
12676,
1282,
3452,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
293,
2234,
50113,
12676,
1282,
3452,
5378,
19047,
1507,
11413,
7121,
12443,
2354,
91098,
445,
59118,
26749,
497,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestIssue282(t *testing.T) {
db := openTestConn(t)
defer db.Close()
var searchPath string
err := db.QueryRow(`
SET LOCAL search_path TO pg_catalog;
SET LOCAL search_path TO pg_catalog;
SHOW search_path`).Scan(&searchPath)
if err != nil {
t.Fatal(err)
}
if searchPath != "pg_catalog" {
t.Fatalf("un... | explode_data.jsonl/73494 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
42006,
17,
23,
17,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
1787,
2271,
9701,
1155,
340,
16867,
2927,
10421,
2822,
2405,
2711,
1820,
914,
198,
9859,
1669,
2927,
15685,
3102,
61528,
197,
52134,
42501,
2711,
2638,
5146,
1749... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccBalanceNotEnough(t *testing.T) {
AdjustGasUsed = false
trunk, root := prepareTruck()
defer closeTestCtx(root)
//only 1 runner
e := NewEbpTxExec(5, 5, 2, 10, &testcase.DumbSigner{})
e.SetContext(prepareCtx(trunk))
//2 tx
txs := prepareAccAndTx(e)
e.SetContext(prepareCtx(trunk))
for _, tx := range t... | explode_data.jsonl/58974 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 423
} | [
2830,
3393,
14603,
21190,
2623,
95801,
1155,
353,
8840,
836,
8,
341,
197,
38616,
58728,
22743,
284,
895,
198,
25583,
3122,
11,
3704,
1669,
10549,
1282,
1942,
741,
16867,
3265,
2271,
23684,
9206,
340,
197,
322,
3243,
220,
16,
22259,
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 TestExpandPrivateNiftyModifyAddressAttributeInput(t *testing.T) {
rd := schema.TestResourceDataRaw(t, newSchema(), map[string]interface{}{
"ip_type": true,
"private_ip": "192.168.0.1",
"description": "test_description",
})
rd.SetId("192.168.0.1")
tests := []struct {
name string
args *schema.Res... | explode_data.jsonl/35514 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 347
} | [
2830,
3393,
38946,
16787,
45,
38624,
44427,
4286,
3907,
2505,
1155,
353,
8840,
836,
8,
341,
92356,
1669,
10802,
8787,
4783,
1043,
20015,
1155,
11,
501,
8632,
1507,
2415,
14032,
31344,
67066,
197,
197,
1,
573,
1819,
788,
257,
830,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBlobberGRPCService_GetReferencePath_InvalidPaths(t *testing.T) {
req := &blobbergrpc.GetReferencePathRequest{
Context: &blobbergrpc.RequestContext{
Client: "client",
ClientKey: "",
Allocation: "",
},
Paths: `["something"]`,
Path: "",
Allocation: "",
}
mockStorageHandler :... | explode_data.jsonl/66835 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 359
} | [
2830,
3393,
37985,
652,
8626,
4872,
1860,
13614,
8856,
1820,
62,
7928,
26901,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
609,
35112,
652,
56585,
2234,
8856,
1820,
1900,
515,
197,
70871,
25,
609,
35112,
652,
56585,
9659,
1972,
515,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLog_GlobalLogger_FilterLevel(t *testing.T) {
defer SaveGlobalLoggerAndFilter(true)()
assert.NoError(t, SetLevel("debug"))
assert.NoError(t, SetGlobalLevelFilter(insolar.DebugLevel))
assertHelloWorld(t, capture(func() { Debug("HelloWorld") }))
assert.NoError(t, SetGlobalLevelFilter(insolar.InfoLevel))
as... | explode_data.jsonl/40296 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
2201,
93132,
7395,
68935,
4449,
1155,
353,
8840,
836,
8,
341,
16867,
10255,
11646,
7395,
3036,
5632,
3715,
8,
2822,
6948,
35699,
1155,
11,
2573,
4449,
445,
8349,
5455,
6948,
35699,
1155,
11,
2573,
11646,
4449,
5632,
56337,
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 TestMultipleCallsToStartAndStop(t *testing.T) {
called := 0
cfg := &conf.AdvancedConfig{
SplitUpdateQueueSize: 10000,
SegmentUpdateQueueSize: 10000,
}
logger := logging.NewLogger(nil)
synchronizer := &pushMocks.LocalSyncMock{}
token := &dtos.Token{
Token: `eyJhbGciOiJIUzI1NiIsImtpZCI6IjVZOU05US... | explode_data.jsonl/44444 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1410
} | [
2830,
3393,
32089,
55292,
1249,
3479,
3036,
10674,
1155,
353,
8840,
836,
8,
341,
1444,
4736,
1669,
220,
15,
198,
50286,
1669,
609,
6135,
17865,
88087,
2648,
515,
197,
7568,
2292,
4289,
7554,
1695,
25,
256,
220,
16,
15,
15,
15,
15,
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 TestCreateClaims(t *testing.T) {
claims, errClaims := createClaims(&testClaims, nil)
if claims == nil {
t.Fail()
t.Logf("claims should not be nil")
}
if errClaims != nil {
t.Fail()
t.Logf(errClaims.Error())
}
} | explode_data.jsonl/11046 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 99
} | [
2830,
3393,
4021,
51133,
1155,
353,
8840,
836,
8,
341,
197,
48561,
11,
1848,
51133,
1669,
1855,
51133,
2099,
1944,
51133,
11,
2092,
340,
743,
8186,
621,
2092,
341,
197,
3244,
57243,
741,
197,
3244,
98954,
445,
48561,
1265,
537,
387,
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 TestTransportCancelBeforeResponseHeaders(t *testing.T) {
t.Skip("Skipping flaky test; see Issue 11894")
defer afterTest(t)
serverConnCh := make(chan net.Conn, 1)
tr := &Transport{
Dial: func(network, addr string) (net.Conn, error) {
cc, sc := net.Pipe()
serverConnCh <- sc
return cc, nil
},
}
de... | explode_data.jsonl/4904 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 394
} | [
2830,
3393,
27560,
9269,
10227,
2582,
10574,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
445,
85945,
1320,
28100,
1273,
26,
1490,
25226,
220,
16,
16,
23,
24,
19,
1138,
16867,
1283,
2271,
1155,
692,
41057,
9701,
1143,
1669,
1281,
35190,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDeploymentConfigError(t *testing.T) {
mockRegistry := test.NewDeploymentConfigRegistry()
mockRegistry.Err = fmt.Errorf("bad")
storage := REST{registry: mockRegistry}
deploymentConfig, err := storage.Get(kapi.NewDefaultContext(), "foo")
if deploymentConfig != nil {
t.Errorf("Unexpected non-nil deploy... | explode_data.jsonl/66987 | {
"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,
1949,
75286,
2648,
1454,
1155,
353,
8840,
836,
8,
341,
77333,
15603,
1669,
1273,
7121,
75286,
2648,
15603,
741,
77333,
15603,
27862,
284,
8879,
13080,
445,
13855,
1138,
197,
16172,
1669,
25414,
90,
29172,
25,
7860,
15603,
630,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestLimitRangeList(t *testing.T) {
ns := api.NamespaceDefault
limitRangeList := &api.LimitRangeList{
Items: []api.LimitRange{
{
ObjectMeta: api.ObjectMeta{Name: "foo"},
},
},
}
c := &testClient{
Request: testRequest{
Method: "GET",
Path: testapi.ResourcePath(getLimitRangesResourceName(... | explode_data.jsonl/69629 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 217
} | [
2830,
3393,
16527,
6046,
852,
1155,
353,
8840,
836,
8,
341,
84041,
1669,
6330,
46011,
3675,
271,
8810,
2353,
6046,
852,
1669,
609,
2068,
1214,
2353,
6046,
852,
515,
197,
197,
4353,
25,
3056,
2068,
1214,
2353,
6046,
515,
298,
197,
515,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_builder_Unreachable(t *testing.T) {
cases := []struct {
name string
unreachable *bool
expected bool
}{
{
name: "unreachable unset",
expected: false,
},
{
name: "unreachable true",
unreachable: pointer.BoolPtr(true),
expected: true,
},
{
name: ... | explode_data.jsonl/35045 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 352
} | [
2830,
3393,
28532,
40687,
46550,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
20479,
46550,
353,
2641,
198,
197,
42400,
262,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
257... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShardBasic(t *testing.T) {
storagetest.Test(t, func(t *testing.T) (sto blobstore.Storage, cleanup func()) {
return newTestStorage(t).sto, nil
})
} | explode_data.jsonl/61165 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
2016,
567,
15944,
1155,
353,
8840,
836,
8,
341,
18388,
269,
351,
57824,
8787,
1155,
11,
2915,
1155,
353,
8840,
836,
8,
320,
33052,
23404,
4314,
43771,
11,
21290,
2915,
2140,
341,
197,
853,
501,
2271,
5793,
1155,
568,
33052... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFormatterJSON(test *testing.T) {
object := struct {
Value int
Message string
}{
Value: 4,
Message: "text",
}
formatted, err := formatter.Format("{p | json}", object)
assert.NoError(test, err)
assert.Equal(test, `{"Value":4,"Message":"text"}`, formatted)
} | explode_data.jsonl/39800 | {
"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,
14183,
5370,
8623,
353,
8840,
836,
8,
341,
35798,
1669,
2036,
341,
197,
47399,
256,
526,
198,
197,
46733,
914,
198,
197,
59403,
197,
47399,
25,
256,
220,
19,
345,
197,
46733,
25,
330,
1318,
756,
197,
630,
37410,
12127,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapInfoConstructor(t *testing.T) {
v := sml.NewMapInfo()
if v == nil {
t.Errorf("sml.NewMapInfo must return a non-nil value")
}
if err := v.Validate(); err != nil {
t.Errorf("newly constructed sml.MapInfo should validate: %s", err)
}
} | explode_data.jsonl/50962 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
2227,
1731,
13288,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
274,
1014,
7121,
2227,
1731,
741,
743,
348,
621,
2092,
341,
197,
3244,
13080,
445,
82,
1014,
7121,
2227,
1731,
1969,
470,
264,
2477,
83248,
897,
1138,
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... | 3 |
func TestPortConflictNodeDaemonDoesNotLaunchPod(t *testing.T) {
for _, strategy := range updateStrategies() {
podSpec := v1.PodSpec{
NodeName: "port-conflict",
Containers: []v1.Container{{
Ports: []v1.ContainerPort{{
HostPort: 666,
}},
}},
}
manager, podControl, _, err := newTestController(... | explode_data.jsonl/50318 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 304
} | [
2830,
3393,
7084,
57974,
1955,
89177,
21468,
2623,
32067,
23527,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
8282,
1669,
2088,
2647,
2580,
69388,
368,
341,
197,
3223,
347,
8327,
1669,
348,
16,
88823,
8327,
515,
298,
30217,
675,
25,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNodeID_hashAtDistance(t *testing.T) {
// we don't use quick.Check here because its output isn't
// very helpful when the test fails.
cfg := quickcfg()
for i := 0; i < cfg.MaxCount; i++ {
a := gen(common.Hash{}, cfg.Rand).(common.Hash)
dist := cfg.Rand.Intn(len(common.Hash{}) * 8)
result := hashAtDist... | explode_data.jsonl/49023 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 217
} | [
2830,
3393,
1955,
915,
8950,
1655,
14778,
1155,
353,
8840,
836,
8,
341,
197,
322,
582,
1513,
944,
990,
3974,
10600,
1588,
1576,
1181,
2550,
4436,
944,
198,
197,
322,
1602,
10950,
979,
279,
1273,
14525,
624,
50286,
1669,
3974,
14072,
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... | 3 |
func TestSubdomain(t *testing.T) {
//Test cases
cases := map[string]string{
"http://google.com": "",
"http://google.com/ding?true": "",
"google.com/?ding=false": "",
"google.com?ding=false": "",
"nonexist.***": "",
"google.com": "",
"google.co.uk": ... | explode_data.jsonl/30830 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 393
} | [
2830,
3393,
3136,
12204,
1155,
353,
8840,
836,
8,
341,
197,
322,
2271,
5048,
198,
1444,
2264,
1669,
2415,
14032,
30953,
515,
197,
197,
76932,
1110,
17485,
905,
788,
1843,
8324,
197,
197,
76932,
1110,
17485,
905,
3446,
287,
30,
1866,
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... | 3 |
func TestParseRequirements(t *testing.T) {
expReqs := []*Requirement{
{
Name: "dep1",
Constraint: "==",
Version: "2.3.2",
},
{
Name: "dep2",
Constraint: ">=",
Version: "1.0",
},
{
Name: "dep3",
Constraint: "",
Version: "",
},
{
Name: "dep4",
... | explode_data.jsonl/46891 | {
"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,
14463,
59202,
1155,
353,
8840,
836,
8,
341,
48558,
693,
26358,
1669,
29838,
75802,
515,
197,
197,
515,
298,
21297,
25,
981,
330,
14891,
16,
756,
298,
197,
17890,
25,
98651,
756,
298,
77847,
25,
262,
330,
17,
13,
18,
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... | 3 |
func TestScheduleSerialisation(t *testing.T) {
tests := []struct {
in, out string
err bool
}{
{"true:48", "true:48", false},
{"false:48", "false:48", false},
{"true:1,false:46,true:1", "true:1,false:46,true:1", false},
// {"false:500,false:45", "false:48", false},
// {"false:47,true:1", "false:47,... | explode_data.jsonl/59727 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 327
} | [
2830,
3393,
32210,
5915,
7923,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
17430,
11,
700,
914,
198,
197,
9859,
257,
1807,
198,
197,
59403,
197,
197,
4913,
1866,
25,
19,
23,
497,
330,
1866,
25,
19,
23,
497,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFieldStringValue(t *testing.T) {
f := newField("Name", "C", 5, 0)
f.Offset = 3
recordBuf := []byte(" Abc ")
v := f.stringValue(recordBuf, nil)
require.Equal(t, "Abc", v)
} | explode_data.jsonl/79449 | {
"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,
1877,
82696,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
1877,
445,
675,
497,
330,
34,
497,
220,
20,
11,
220,
15,
340,
1166,
61958,
284,
220,
18,
198,
71952,
15064,
1669,
3056,
3782,
445,
256,
3680,
66,
262,
14167,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_jsoniter_number(t *testing.T) {
should := require.New(t)
var arr []Number
err := Unmarshal([]byte(`[1]`), &arr)
should.Nil(err)
should.Equal(Number("1"), arr[0])
str, isNumber := CastJsonNumber(arr[0])
should.True(isNumber)
should.Equal("1", str)
} | explode_data.jsonl/51208 | {
"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,
9455,
2015,
5500,
1155,
353,
8840,
836,
8,
341,
197,
5445,
1669,
1373,
7121,
1155,
340,
2405,
2890,
3056,
2833,
198,
9859,
1669,
1230,
27121,
10556,
3782,
5809,
58,
16,
60,
63,
701,
609,
1118,
340,
197,
5445,
59678,
3964,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestJWKCacheEntry_Expired(t *testing.T) {
t.Run("should return true when entry is cached for more than cachePeriod", func(t *testing.T) {
// WHEN
entry := jwkCacheEntry{
key: "dummy",
expireAt: time.Now().Add(-1 * cachePeriod),
}
// THEN
require.True(t, entry.IsExpired())
})
t.Run("should... | explode_data.jsonl/29080 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 231
} | [
2830,
3393,
41,
68316,
8233,
5874,
62,
54349,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5445,
470,
830,
979,
4343,
374,
20579,
369,
803,
1091,
6500,
23750,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
322,
33633,
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... | 1 |
func TestShlibnameFiles(t *testing.T) {
pkgs := append([]string{}, minpkgs...)
pkgs = append(pkgs, "runtime/cgo")
for _, pkg := range pkgs {
shlibnamefile := filepath.Join(gorootInstallDir, pkg+".shlibname")
contentsb, err := ioutil.ReadFile(shlibnamefile)
if err != nil {
t.Errorf("error reading shlibnamefi... | explode_data.jsonl/24189 | {
"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,
2016,
2740,
606,
10809,
1155,
353,
8840,
836,
8,
341,
3223,
74,
5857,
1669,
8737,
10556,
917,
22655,
1308,
20819,
5857,
31218,
3223,
74,
5857,
284,
8737,
39928,
5857,
11,
330,
22255,
2899,
3346,
1138,
2023,
8358,
24793,
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... | 4 |
func TestResourceNameFor(t *testing.T) {
obj := &unstructured.Unstructured{
Object: map[string]interface{}{
"apiVersion": "tests/v1alpha1",
"kind": "Test",
"metadata": map[string]interface{}{
"name": "myname",
"namespace": "mynamespace",
},
},
}
fake := &ktesting.Fake{
Resources... | explode_data.jsonl/10849 | {
"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,
4783,
675,
2461,
1155,
353,
8840,
836,
8,
341,
22671,
1669,
609,
359,
51143,
10616,
51143,
515,
197,
23816,
25,
2415,
14032,
31344,
67066,
298,
197,
1,
2068,
5637,
788,
330,
23841,
5457,
16,
7141,
16,
756,
298,
197,
1,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestUserUsageStatistics_LogCodeIntelAction(t *testing.T) {
setupForTest(t)
user := types.User{
ID: 1,
}
err := LogActivity(true, user.ID, "test-cookie-id", "CODEINTEL")
if err != nil {
t.Fatal(err)
}
a, err := GetByUserID(user.ID)
if err != nil {
t.Fatal(err)
}
if want := int32(1); a.CodeIntellig... | explode_data.jsonl/27990 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
1474,
14783,
38599,
44083,
2078,
49099,
2512,
1155,
353,
8840,
836,
8,
341,
84571,
2461,
2271,
1155,
692,
19060,
1669,
4494,
7344,
515,
197,
29580,
25,
220,
16,
345,
197,
532,
9859,
1669,
2835,
4052,
3715,
11,
1196,
9910,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEtcdCreatePod(t *testing.T) {
ctx := api.NewDefaultContext()
fakeClient := tools.NewFakeEtcdClient(t)
fakeClient.TestIndex = true
key, _ := makePodKey(ctx, "foo")
fakeClient.Data[key] = tools.EtcdResponseWithError{
R: &etcd.Response{
Node: nil,
},
E: tools.EtcdErrorNotFound,
}
fakeClient.Set("/... | explode_data.jsonl/8140 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 704
} | [
2830,
3393,
31860,
4385,
4021,
23527,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6330,
7121,
3675,
1972,
741,
1166,
726,
2959,
1669,
7375,
7121,
52317,
31860,
4385,
2959,
1155,
340,
1166,
726,
2959,
8787,
1552,
284,
830,
198,
23634,
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... | 9 |
func TestNewGrpcClient_EtcdContentsGarbled(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 = oldGrpcDialC... | explode_data.jsonl/11504 | {
"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,
3564,
6464,
3992,
2959,
2089,
83,
4385,
14803,
43930,
37659,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPostfixIncDot(t *testing.T) {
const SCRIPT = `
var o = {x: 42};
var trace = "";
function F1() {
trace += "First!";
return o;
}
var rv = F1().x++;
rv += trace + o.x;
`
testScript(SCRIPT, asciiString("42First!43"), t)
} | explode_data.jsonl/75250 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 115
} | [
2830,
3393,
4133,
5743,
39245,
34207,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
2405,
297,
284,
314,
87,
25,
220,
19,
17,
2440,
2405,
11655,
284,
21238,
7527,
434,
16,
368,
341,
2760,
11655,
1421,
330,
5338,
26782,
2760,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDaemonEndpointsForHostname2(t *testing.T) { // Invalid hostname - single form
dEndpt, err := GetDaemonEndpointsFromString("XYZ:2000")
assert.NotNil(t, err)
assert.Nil(t, dEndpt)
} | explode_data.jsonl/49944 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 74
} | [
2830,
3393,
1949,
89177,
80786,
2461,
88839,
17,
1155,
353,
8840,
836,
8,
314,
442,
13882,
28115,
481,
3175,
1352,
198,
2698,
3727,
417,
11,
1848,
1669,
2126,
89177,
80786,
44491,
445,
32196,
25,
17,
15,
15,
15,
1138,
6948,
93882,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoggedIn_Hydra_Errors_invalid_state(t *testing.T) {
s, cfg, _, h, _, err := setupHydraTest(true)
if err != nil {
t.Fatalf("setupHydraTest() failed: %v", err)
}
pname := "dr_joe_elixir"
tests := []struct {
name string
code string
stateID string
respStatus int
}{
{
name: ... | explode_data.jsonl/18498 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 405
} | [
2830,
3393,
28559,
2039,
88,
22248,
93623,
1087,
31433,
4387,
1155,
353,
8840,
836,
8,
341,
1903,
11,
13286,
11,
8358,
305,
11,
8358,
1848,
1669,
6505,
30816,
22248,
2271,
3715,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAccountRetriever(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockNodeQuerier := mocks.NewMockNodeQuerier(mockCtrl)
accRetr := NewAccountRetriever(mockNodeQuerier)
addr := []byte("test")
bs, err := ModuleCdc.MarshalJSON(NewQueryAccountParams(addr))
require.NoError(t, err)... | explode_data.jsonl/53897 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 396
} | [
2830,
3393,
7365,
12020,
461,
2054,
1155,
353,
8840,
836,
8,
341,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
7860,
15001,
991,
18176,
2822,
77333,
1955,
2183,
261,
1268,
1669,
68909,
7121,
11571,
1955,
2183,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFieldErrors_ViaFieldIndex(t *testing.T) {
expected := cli.FieldErrors{
&field.Error{Field: "parent[2]"},
&field.Error{Field: "parent[2].field"},
&field.Error{Field: "parent[2][0]"},
}
actual := cli.FieldErrors{
&field.Error{Field: "[]"},
&field.Error{Field: "field"},
&field.Error{Field: "[0]"},
... | explode_data.jsonl/13213 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
1877,
13877,
2334,
685,
1877,
1552,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
21348,
17087,
13877,
515,
197,
197,
5,
2566,
6141,
90,
1877,
25,
330,
3765,
58,
17,
60,
7115,
197,
197,
5,
2566,
6141,
90,
1877,
25,
330,
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... | 2 |
func TestPasswordAuth_Valid(t *testing.T) {
req := bytes.NewBuffer(nil)
req.Write([]byte{2, NoAuth, UserPassAuth})
req.Write([]byte{1, 3, 'f', 'o', 'o', 3, 'b', 'a', 'r'})
var resp bytes.Buffer
cred := StaticCredentials{
"foo": "bar",
}
cator := UserPassAuthenticator{Credentials: cred}
s, _ := New(&Config{... | explode_data.jsonl/18559 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 336
} | [
2830,
3393,
4876,
5087,
97279,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
5820,
7121,
4095,
27907,
340,
24395,
4073,
10556,
3782,
90,
17,
11,
2308,
5087,
11,
2657,
12187,
5087,
3518,
24395,
4073,
10556,
3782,
90,
16,
11,
220,
18,
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... | 6 |
func TestIssue21447(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk1, tk2 := testkit.NewTestKit(t, store), testkit.NewTestKit(t, store)
tk1.MustExec("use test")
tk2.MustExec("use test")
tk1.MustExec("drop table if exists t1")
tk1.MustExec("create table t1(id int primary key, name va... | explode_data.jsonl/76270 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 425
} | [
2830,
3393,
42006,
17,
16,
19,
19,
22,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
16,
11,
17162,
17,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRelinquishmentRequestGenerator(t *testing.T) {
config := &active_mode.ActiveModeConfig{
Cbsd: &active_mode.Cbsd{
Id: "some_id",
Grants: []*active_mode.Grant{{
Id: "some_grant_id",
}},
},
}
g := sas.NewRelinquishmentRequestGenerator()
actual := g.GenerateRequests(config)
expected := []*req... | explode_data.jsonl/31661 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 204
} | [
2830,
3393,
6740,
52888,
16025,
1900,
12561,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
609,
3028,
7302,
28755,
3636,
2648,
515,
197,
6258,
51835,
25,
609,
3028,
7302,
727,
51835,
515,
298,
67211,
25,
330,
14689,
842,
756,
298,
197,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestShouldRedirectWhenSessionInactiveForTooLongAndRDParamProvided(t *testing.T) {
mock := mocks.NewMockAutheliaCtx(t)
defer mock.Close()
clock := mocks.TestingClock{}
clock.Set(time.Now())
mock.Ctx.Configuration.Session.Inactivity = testInactivity
// Reload the session provider since the configuration is i... | explode_data.jsonl/20195 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 495
} | [
2830,
3393,
14996,
17725,
4498,
5283,
72214,
2461,
31246,
6583,
3036,
36690,
2001,
35819,
291,
1155,
353,
8840,
836,
8,
341,
77333,
1669,
68909,
7121,
11571,
5087,
35929,
23684,
1155,
340,
16867,
7860,
10421,
2822,
84165,
1669,
68909,
8787,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreLoadWithContextOrDefaults(t *testing.T) {
defaultsConfig := ConfigMapFromTestFile(t, DefaultsConfigName)
config := FromContextOrDefaults(context.Background())
t.Run("defaults", func(t *testing.T) {
expected, _ := NewDefaultsConfigFromConfigMap(defaultsConfig)
if diff := cmp.Diff(expected, config.D... | explode_data.jsonl/45714 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 147
} | [
2830,
3393,
6093,
5879,
91101,
14188,
82,
1155,
353,
8840,
836,
8,
341,
11940,
82,
2648,
1669,
5532,
2227,
3830,
2271,
1703,
1155,
11,
35990,
2648,
675,
340,
25873,
1669,
5542,
1972,
14188,
82,
5378,
19047,
12367,
3244,
16708,
445,
2675... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPyModuleGetDict(t *testing.T) {
fmt.Println(assert.CallerInfo()[0])
assert.Nil(t, pymodule.GetDict(nil))
sys := pyimport.ImportModule("sys")
defer py.DecRef(sys)
sysRefCnt := py.RefCnt(sys)
defer func() { assert.Equal(t, sysRefCnt, py.RefCnt(sys)) }()
assert.NotNil(t, sys)
dic := pymodule.GetDict(sy... | explode_data.jsonl/33467 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 162
} | [
2830,
3393,
13828,
3332,
1949,
13448,
1155,
353,
8840,
836,
8,
341,
11009,
12419,
75846,
727,
13956,
1731,
10116,
15,
9604,
6948,
59678,
1155,
11,
45760,
1756,
2234,
13448,
27907,
4390,
41709,
1669,
4510,
474,
67275,
3332,
445,
7791,
1138... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLineComments(t *testing.T) {
segs := segments
if runtime.GOOS == "windows" {
segs = append(segs, winsegments...)
} else {
segs = append(segs, unixsegments...)
}
// make source
var src string
for _, e := range segs {
src += e.srcline
}
// verify scan
var S Scanner
file := fset.AddFile(filepat... | explode_data.jsonl/1840 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 304
} | [
2830,
3393,
2460,
17373,
1155,
353,
8840,
836,
8,
341,
84686,
5857,
1669,
20632,
198,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
341,
197,
84686,
5857,
284,
8737,
10478,
5857,
11,
3164,
56829,
31218,
197,
92,
770,
341,
197,
84686,
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... | 5 |
func TestAdmitPreferNonmutatingWhenPossible(t *testing.T) {
mutatingSCC := restrictiveSCC()
mutatingSCC.Name = "mutating-scc"
nonMutatingSCC := laxSCC()
nonMutatingSCC.Name = "non-mutating-scc"
simplePod := goodPod()
simplePod.Spec.Containers[0].Name = "simple-pod"
simplePod.Spec.Containers[0].Image = "test-i... | explode_data.jsonl/25932 | {
"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,
2589,
1763,
4703,
802,
8121,
6984,
1095,
4498,
65222,
1155,
353,
8840,
836,
8,
1476,
2109,
332,
1095,
3540,
34,
1669,
56996,
3540,
34,
741,
2109,
332,
1095,
3540,
34,
2967,
284,
330,
6984,
1095,
1331,
638,
1837,
197,
6280,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceTopologyReturnsCorrectLinksAndEquipment(t *testing.T) {
r := newTestResolver(t)
defer r.Close()
ctx := viewertest.NewContext(context.Background(), r.client)
mr := r.Mutation()
locType, _ := mr.AddLocationType(ctx, models.AddLocationTypeInput{
Name: "Room",
})
eqt, _ := mr.AddEquipmentType(ct... | explode_data.jsonl/7205 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1172
} | [
2830,
3393,
1860,
60954,
16446,
33092,
24089,
3036,
58276,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
501,
2271,
18190,
1155,
340,
16867,
435,
10421,
741,
20985,
1669,
1651,
83386,
7121,
1972,
5378,
19047,
1507,
435,
6581,
692,
2109,
81,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtensionsGet(t *testing.T) {
client, err := clients.NewIdentityV2Client()
if err != nil {
t.Fatalf("Unable to create an identity client: %v", err)
}
extension, err := extensions.Get(client, "OS-KSCRUD").Extract()
if err != nil {
t.Fatalf("Unable to get extension OS-KSCRUD: %v", err)
}
tools.Print... | explode_data.jsonl/18363 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
31282,
1949,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
8239,
7121,
18558,
53,
17,
2959,
741,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
17075,
311,
1855,
458,
9569,
2943,
25,
1018,
85,
497,
1848,
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... | 3 |
func TestAddElementInQueue(t *testing.T) {
q := newQueue()
q.Add("a")
q.Add("b")
q.Add("d")
q.Add("e")
fmt.Println("\n Queue elements ")
q.Print()
} | explode_data.jsonl/73784 | {
"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,
2212,
1691,
641,
7554,
1155,
353,
8840,
836,
8,
341,
18534,
1669,
501,
7554,
741,
18534,
1904,
445,
64,
1138,
18534,
1904,
445,
65,
1138,
18534,
1904,
445,
67,
1138,
18534,
1904,
445,
68,
1138,
11009,
12419,
4921,
77,
1874... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPtrTypeToType(t *testing.T) {
// Encode a *T, decode a T
type Type1 struct {
A uint
}
t1p := &Type1{17}
var t1 Type1
if err := encAndDec(t1, t1p); err != nil {
t.Error(err)
}
} | explode_data.jsonl/43384 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 94
} | [
2830,
3393,
5348,
929,
1249,
929,
1155,
353,
8840,
836,
8,
341,
197,
322,
56562,
264,
353,
51,
11,
16895,
264,
350,
198,
13158,
3990,
16,
2036,
341,
197,
22985,
2622,
198,
197,
532,
3244,
16,
79,
1669,
609,
929,
16,
90,
16,
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... | 2 |
func TestServer_SecurityHeaders_SelfServe(t *testing.T) {
s := Server{
cfg: Config{
Developing: false,
StaticURL: "/static",
},
}
rr := httptest.NewRecorder()
req := httptest.NewRequest("GET", "/", nil)
m := s.SecurityHeaders()
h := m(http.HandlerFunc(fakeHandler))
h.ServeHTTP(rr, req)
assert.Equ... | explode_data.jsonl/44435 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 292
} | [
2830,
3393,
5475,
1098,
18429,
10574,
1098,
490,
60421,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
8422,
515,
197,
50286,
25,
5532,
515,
298,
197,
20444,
287,
25,
895,
345,
298,
197,
11690,
3144,
25,
220,
3521,
1978,
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 TestRuntime_runServer(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
cfg := newDefaultStandaloneConfig(t)
cfg.StorageBase.GRPC.Port = 3903
standalone := NewStandaloneRuntime("test-version", &cfg)
s := standalone.(*runtime)
storage := server.NewMockService(ctrl)
s.storage = storage
br... | explode_data.jsonl/3483 | {
"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,
15123,
14007,
5475,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
50286,
1669,
501,
3675,
623,
84112,
2648,
1155,
340,
50286,
43771,
3978,
1224,
29528,
43013,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntegrationSend(t *testing.T) {
queueName, queuesClient, cleanup := newTestQueue(t, "receive")
defer cleanup()
tests := []struct {
label string
data []string
}{
{
label: "3 send, small payload",
data: []string{
"2Hey there!",
"2Hi there!",
"2Ho there!",
},
},
}
for _, tt :... | explode_data.jsonl/60648 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 702
} | [
2830,
3393,
52464,
11505,
1155,
353,
8840,
836,
8,
341,
46993,
675,
11,
48094,
2959,
11,
21290,
1669,
501,
2271,
7554,
1155,
11,
330,
41893,
1138,
16867,
21290,
2822,
78216,
1669,
3056,
1235,
341,
197,
29277,
914,
198,
197,
8924,
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... | 8 |
func TestRuleGetSidMsg(t *testing.T) {
for _, tt := range []struct {
name string
input Rule
want string
}{
{
name: "rule",
input: Rule{
SID: 1337,
Description: "foo",
},
want: `1337 || foo`,
},
{
name: "rule",
input: Rule{
SID: 1337,
Description: "foo",
... | explode_data.jsonl/59700 | {
"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,
1949,
67653,
6611,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
22427,
18100,
198,
197,
50780,
220,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
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 TestNetworkMemberString(t *testing.T) {
tests := []struct {
input NetworkMember
expected string
}{
{
input: NetworkMember{Endpoint: "endpoint", InternalEndpoint: "internal-endpoint", PKIid: common.PKIidType{0, 1, 2, 3}, Metadata: nil},
expected: "Endpoint: endpoint, InternalEndpoint: internal-e... | explode_data.jsonl/62256 | {
"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,
12320,
9366,
703,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
22427,
262,
8141,
9366,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
515,
298,
22427,
25,
262,
8141,
9366,
90,
27380,
25,
330,
32540,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSymbolizationPath(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("test assumes Unix paths")
}
// Save environment variables to restore after test
saveHome := os.Getenv(homeEnv())
savePath := os.Getenv("PPROF_BINARY_PATH")
tempdir, err := ioutil.TempDir("", "home")
if err != nil {
t.Fatal("c... | explode_data.jsonl/36294 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 791
} | [
2830,
3393,
15090,
2022,
1820,
1155,
353,
8840,
836,
8,
341,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
341,
197,
3244,
57776,
445,
1944,
21484,
46995,
12716,
1138,
197,
630,
197,
322,
10255,
4573,
7332,
311,
14952,
1283,
1273,
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 TestSGF(t *testing.T) {
k := NewKifu()
r := k.AddMove(NewMove(xy2posi(3, 3), Black), nil)
k.AddMove(NewMove(xy2posi(15, 15), White), r)
s := k.ToSGF()
k1 := NewKifu()
k1.LoadSGF(s)
m1 := k1.GetMove(0, 1)
m2 := k1.NextMove(m1)
if m1.MoveNum != 1 || m1.Posi != xy2posi(3, 3) || m1.Color != Black ||
m2.Mo... | explode_data.jsonl/67494 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 221
} | [
2830,
3393,
7783,
37,
1155,
353,
8840,
836,
8,
341,
16463,
1669,
1532,
42,
20850,
741,
7000,
1669,
595,
1904,
9860,
35063,
9860,
93219,
17,
966,
72,
7,
18,
11,
220,
18,
701,
5235,
701,
2092,
340,
16463,
1904,
9860,
35063,
9860,
9321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetStringFromEnv(t *testing.T) {
t.Parallel()
b := NewConfigReaderBuilder()
reader := b.AttachEnvPrefix("simple").WithConfigFile("testdata/config.yaml").Build()
os.Setenv("SIMPLE_GENCODE_DOWNSTREAM_FOO_SERVICEURL", "https://env.foo.example.com")
fooURL, err := reader.GetString("genCode.downstream.foo.ser... | explode_data.jsonl/53788 | {
"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,
48905,
3830,
14359,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
2233,
1669,
1532,
2648,
5062,
3297,
741,
61477,
1669,
293,
88284,
14359,
14335,
445,
22944,
1827,
2354,
2648,
1703,
445,
92425,
14730,
33406,
1827,
110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMonitorNodeHealthMarkPodsNotReady(t *testing.T) {
fakeNow := metav1.Date(2015, 1, 1, 12, 0, 0, 0, time.UTC)
table := []struct {
fakeNodeHandler *testutil.FakeNodeHandler
timeToPass time.Duration
newNodeStatus v1.NodeStatus
expectedPodStatusUpdate bool
}{
// Node crea... | explode_data.jsonl/9615 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2241
} | [
2830,
3393,
30098,
1955,
14542,
8949,
23527,
82,
2623,
19202,
1155,
353,
8840,
836,
8,
341,
1166,
726,
7039,
1669,
77520,
16,
8518,
7,
17,
15,
16,
20,
11,
220,
16,
11,
220,
16,
11,
220,
16,
17,
11,
220,
15,
11,
220,
15,
11,
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 TestIdleTimeoutAndUpdate(t *testing.T) {
setup()
defer tearDown()
defer func() {
buffer.ConnReadTimeout = types.DefaultConnReadTimeout
defaultIdleTimeout = types.DefaultIdleTimeout
}()
log.DefaultLogger.SetLogLevel(log.DEBUG)
buffer.ConnReadTimeout = time.Second
defaultIdleTimeout = 3 * time.Second
ad... | explode_data.jsonl/9408 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1242
} | [
2830,
3393,
41370,
7636,
56365,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
32825,
2822,
16867,
2915,
368,
341,
197,
31122,
50422,
4418,
7636,
284,
4494,
13275,
9701,
4418,
7636,
198,
197,
11940,
41370,
7636,
284,
4494,
13275,
41370,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConnectionUpsert(t *testing.T) {
assert := assert.New(t)
tx, err := Default().Begin()
assert.Nil(err)
defer tx.Rollback()
err = createUpserObjectTable(tx)
assert.Nil(err)
obj := &upsertObj{
UUID: uuid.V4().String(),
Timestamp: time.Now().UTC(),
Category: uuid.V4().String(),
}
err = Defau... | explode_data.jsonl/33843 | {
"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,
4526,
98778,
529,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
46237,
11,
1848,
1669,
7899,
1005,
11135,
741,
6948,
59678,
3964,
340,
16867,
9854,
88918,
2822,
9859,
284,
1855,
2324,
799,
1190,
2556,
2730... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccAWSS3BucketObject_updatesWithVersioning(t *testing.T) {
var originalObj, modifiedObj s3.GetObjectOutput
resourceName := "aws_s3_bucket_object.object"
rInt := acctest.RandInt()
sourceInitial := testAccAWSS3BucketObjectCreateTempFile(t, "initial versioned object state")
defer os.Remove(sourceInitial)
s... | explode_data.jsonl/64962 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 570
} | [
2830,
3393,
14603,
14419,
1220,
18,
36018,
1190,
57829,
2354,
5637,
287,
1155,
353,
8840,
836,
8,
341,
2405,
4024,
5261,
11,
10807,
5261,
274,
18,
25618,
5097,
198,
50346,
675,
1669,
330,
8635,
643,
18,
38749,
5314,
6035,
698,
7000,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewMCP23017DriverOdr(t *testing.T) {
b := NewMCP23017Driver(newI2cTestAdaptor(), WithMCP23017Odr(1))
gobottest.Assert(t, b.MCPConf.Odr, uint8(1))
} | explode_data.jsonl/42309 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 73
} | [
2830,
3393,
3564,
44,
7123,
17,
18,
15,
16,
22,
11349,
46,
3612,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
1532,
44,
7123,
17,
18,
15,
16,
22,
11349,
1755,
40,
17,
66,
2271,
2589,
32657,
1507,
3085,
44,
7123,
17,
18,
15,
16,
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 TestMountPropagation(t *testing.T) {
sharedLookupMountFn := func(string) (mount.Info, error) {
return mount.Info{
Mountpoint: "host-path",
Optional: "shared:",
}, nil
}
slaveLookupMountFn := func(string) (mount.Info, error) {
return mount.Info{
Mountpoint: "host-path",
Optional: "master:... | explode_data.jsonl/6412 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1508
} | [
2830,
3393,
16284,
35172,
1155,
353,
8840,
836,
8,
1476,
197,
6100,
34247,
16284,
24911,
1669,
2915,
3609,
8,
320,
16557,
20132,
11,
1465,
8,
341,
197,
853,
6470,
20132,
515,
298,
9209,
629,
2768,
25,
330,
3790,
33095,
756,
298,
65364... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLargeNumberOfKeyspaces(t *testing.T) {
dockerImages := []string{vttestserverMysql57image, vttestserverMysql80image}
for _, image := range dockerImages {
t.Run(image, func(t *testing.T) {
var keyspaces []string
var numShards []int
for i := 0; i < 100; i++ {
keyspaces = append(keyspaces, fmt.Spr... | explode_data.jsonl/54437 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 551
} | [
2830,
3393,
34253,
40619,
8850,
27338,
1155,
353,
8840,
836,
8,
341,
2698,
13659,
14228,
1669,
3056,
917,
90,
9708,
1944,
4030,
44,
14869,
20,
22,
1805,
11,
39105,
1944,
4030,
44,
14869,
23,
15,
1805,
532,
2023,
8358,
2168,
1669,
2088... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.