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 TestReadSpawnXYZ(t *testing.T) {
level, err := readLevelBytes(10, 0, 0, 10, 0, 4, 'D', 'a', 't', 'a', 3, 0, 6, 'S', 'p', 'a', 'w', 'n', 'X', 0, 0, 0, 13, 3, 0, 6, 'S', 'p', 'a', 'w', 'n', 'Y', 0, 0, 0, 14, 3, 0, 6, 'S', 'p', 'a', 'w', 'n', 'Z', 0, 0, 0, 15, 0, 0)
checkError(t, err, nil)
if level == nil {
t.... | explode_data.jsonl/79911 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
4418,
41005,
32196,
1155,
353,
8840,
836,
8,
341,
53743,
11,
1848,
1669,
1349,
4449,
7078,
7,
16,
15,
11,
220,
15,
11,
220,
15,
11,
220,
16,
15,
11,
220,
15,
11,
220,
19,
11,
364,
35,
516,
364,
64,
516,
364,
83,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRouterGroupCatchAll(t *testing.T) {
// Create empty handler
h := new(Handler)
// Create empty context
c := new(Context)
c.Params = Params{}
// Create group
g := RouteGroup("/v1")
g.Add("/test/*", h)
// Matching routes
rs := []string{"/v1/test/test", "/v1/test/:param/", "/v1/test/this/is/a/wild/car... | explode_data.jsonl/35811 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 185
} | [
2830,
3393,
9523,
2808,
57760,
2403,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
4287,
7013,
198,
9598,
1669,
501,
7,
3050,
692,
197,
322,
4230,
4287,
2266,
198,
1444,
1669,
501,
14001,
340,
1444,
58268,
284,
34352,
31483,
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... | 3 |
func TestHandlerDeleteHandler(t *testing.T) {
conf := internal.NewConfigurationWithDefaults()
viper.Set(configuration.ViperKeyIssuerURL, "http://hydra.localhost")
reg := internal.NewRegistryMemory(t, conf)
cm := reg.ClientManager()
store := reg.OAuth2Storage()
h := oauth2.NewHandler(reg, conf)
deleteRequest :... | explode_data.jsonl/12554 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 562
} | [
2830,
3393,
3050,
6435,
3050,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
5306,
7121,
7688,
2354,
16273,
741,
5195,
12858,
4202,
48724,
5058,
12858,
1592,
98902,
3144,
11,
330,
1254,
1110,
8503,
22248,
13,
8301,
1138,
37013,
1669,
5306,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRPCGetProcessesMsgIndent(t *testing.T) {
msg := CreateGetProcessesMsg(core.GenerateRandomID(), 1, 2)
jsonString, err := msg.ToJSONIndent()
assert.Nil(t, err)
msg2, err := CreateGetProcessesMsgFromJSON(jsonString + "error")
assert.NotNil(t, err)
msg2, err = CreateGetProcessesMsgFromJSON(jsonString)
ass... | explode_data.jsonl/36211 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
29528,
1949,
92727,
6611,
42729,
1155,
353,
8840,
836,
8,
341,
21169,
1669,
4230,
1949,
92727,
6611,
47867,
57582,
13999,
915,
1507,
220,
16,
11,
220,
17,
340,
30847,
703,
11,
1848,
1669,
3750,
3274,
5370,
42729,
741,
6948,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestConverter_ToGraphQL(t *testing.T) {
// given
testCases := []struct {
Name string
Input *model.Auth
Expected *graphql.Auth
Error error
}{
{
Name: "All properties given",
Input: fixDetailedAuth(),
Expected: fixDetailedGQLAuth(),
},
{
Name: "Empty",
Input: &... | explode_data.jsonl/55980 | {
"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,
14920,
38346,
88637,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
18185,
37302,
1669,
3056,
1235,
341,
197,
21297,
257,
914,
198,
197,
66588,
262,
353,
2528,
25233,
198,
197,
197,
18896,
353,
38294,
25233,
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... | 1 |
func TestNewRandomChillHandler(t *testing.T) {
rch := NewRandomChillHandler("phrase1", "phrase2").(randomChillHandler)
assert.Len(t, rch.phrases, 2, "Phrases not of length 2")
assert.Equal(t, []string{"phrase1", "phrase2"}, rch.phrases, "Phrase list unequal")
} | explode_data.jsonl/18885 | {
"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,
3564,
13999,
1143,
483,
3050,
1155,
353,
8840,
836,
8,
341,
7000,
331,
1669,
1532,
13999,
1143,
483,
3050,
445,
27710,
16,
497,
330,
27710,
17,
1827,
7,
11463,
1143,
483,
3050,
340,
6948,
65819,
1155,
11,
435,
331,
2131,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateTaskRunResult(t *testing.T) {
for _, c := range []struct {
desc string
podStatus corev1.PodStatus
taskRunStatus *v1alpha1.TaskRunStatus
wantResults []v1alpha1.TaskRunResult
want []v1alpha1.PipelineResourceResult
}{{
desc: "test result with pipeline result",
podStat... | explode_data.jsonl/888 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 701
} | [
2830,
3393,
4289,
6262,
6727,
2077,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
272,
1669,
2088,
3056,
1235,
341,
197,
41653,
688,
914,
198,
197,
3223,
347,
2522,
257,
6200,
85,
16,
88823,
2522,
198,
197,
49115,
6727,
2522,
353,
85,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetReadingsByCreationTimeError(t *testing.T) {
reset()
myMock := &dbMock.DBClient{}
myMock.On("ReadingsByCreationTime", mock.Anything, mock.Anything, mock.Anything).Return([]models.Reading{}, fmt.Errorf("some error"))
dbClient = myMock
_, err := getReadingsByCreationTime(0xDEADBEEF, 0, 0, logger.NewMoc... | explode_data.jsonl/48184 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 151
} | [
2830,
3393,
1949,
4418,
819,
1359,
32701,
1462,
1454,
1155,
353,
8840,
836,
8,
341,
70343,
741,
13624,
11571,
1669,
609,
1999,
11571,
22537,
2959,
31483,
13624,
11571,
8071,
445,
4418,
819,
1359,
32701,
1462,
497,
7860,
13311,
1596,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_Filter(t *testing.T) {
in := []int{1, 2, 3, 4, 5, 6}
expected := []int{2, 4, 6}
condition := func(i int) bool {
return i%2 == 0
}
actual := Filter(in, condition)
assert.Equal(t, expected, actual)
} | explode_data.jsonl/58332 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
68935,
1155,
353,
8840,
836,
8,
341,
17430,
1669,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
532,
42400,
1669,
3056,
396,
90,
17,
11,
220,
19,
11,
220,
21,
532,
197,
9056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAgent_Members_WAN(t *testing.T) {
t.Parallel()
a := NewTestAgent(t.Name(), "")
defer a.Shutdown()
req, _ := http.NewRequest("GET", "/v1/agent/members?wan=true", nil)
obj, err := a.srv.AgentMembers(nil, req)
if err != nil {
t.Fatalf("Err: %v", err)
}
val := obj.([]serf.Member)
if len(val) == 0 {
t... | explode_data.jsonl/33600 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 202
} | [
2830,
3393,
16810,
1245,
7062,
2763,
1093,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
1669,
1532,
2271,
16810,
1155,
2967,
1507,
14676,
16867,
264,
10849,
18452,
2822,
24395,
11,
716,
1669,
1758,
75274,
445,
3806,
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... | 4 |
func TestLintSimple(t *testing.T) {
ctx := context.TODO()
for _, err := range eclint.Lint(ctx, "testdata/simple/simple.txt") {
if err != nil {
t.Errorf("no errors where expected, got %s", err)
}
}
} | explode_data.jsonl/82387 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
47556,
16374,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
90988,
2822,
2023,
8358,
1848,
1669,
2088,
59958,
396,
1214,
396,
7502,
11,
330,
92425,
67195,
67195,
3909,
899,
341,
197,
743,
1848,
961,
2092,
341,
298,
3244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 3 |
func TestServer_Push_RejectForbiddenMethod(t *testing.T) {
testServer_Push_RejectSingleRequest(t,
func(p http.Pusher, r *http.Request) error {
if err := p.Push("https://"+r.Host+"/pushed", &http.PushOptions{Method: "POST"}); err == nil {
return errors.New("Push() should have failed (cannot promise a POST)")
... | explode_data.jsonl/1976 | {
"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,
5475,
1088,
1116,
50693,
583,
69115,
3523,
1155,
353,
8840,
836,
8,
341,
18185,
5475,
1088,
1116,
50693,
583,
10888,
1900,
1155,
345,
197,
29244,
1295,
1758,
34981,
261,
11,
435,
353,
1254,
9659,
8,
1465,
341,
298,
743,
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... | 2 |
func TestQuerySequencesStatsN1ql(t *testing.T) {
if base.UnitTestUrlIsWalrus() || base.TestsDisableGSI() {
t.Skip("This test is Couchbase Server and UseViews=false only")
}
db := setupTestDB(t)
defer db.Close()
// docID -> Sequence
docSeqMap := make(map[string]uint64, 20)
// Add docs without channel assign... | explode_data.jsonl/2706 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1248
} | [
2830,
3393,
2859,
1514,
43945,
16635,
45,
16,
1470,
1155,
353,
8840,
836,
8,
1476,
743,
2331,
25159,
2271,
2864,
3872,
88298,
20341,
368,
1369,
2331,
37133,
25479,
38,
13817,
368,
341,
197,
3244,
57776,
445,
1986,
1273,
374,
61128,
3152... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDependency_Validate(t *testing.T) {
testcases := []struct {
name string
dep Dependency
wantError string
}{
{"version in tag", Dependency{Tag: "deislabs/azure-mysql:5.7"}, ""},
{"version ranges", Dependency{Tag: "deislabs/azure-mysql", Versions: []string{"5.7.x-6"}}, ""},
{"missing tag"... | explode_data.jsonl/37725 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 322
} | [
2830,
3393,
36387,
62,
17926,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
197,
14891,
981,
32977,
198,
197,
50780,
1454,
914,
198,
197,
59403,
197,
197,
4913,
4366,
304,
4772,
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... | 2 |
func TestUserAgentWithExplicitValue(t *testing.T) {
txp := httptransport.UserAgentTransport{
RoundTripper: httptransport.FakeTransport{
Resp: &http.Response{StatusCode: 200},
},
}
req := &http.Request{URL: &url.URL{
Scheme: "https",
Host: "www.google.com",
Path: "/",
}}
req.Header = http.Header{"U... | explode_data.jsonl/65211 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 235
} | [
2830,
3393,
1474,
16810,
2354,
98923,
1130,
1155,
353,
8840,
836,
8,
341,
3244,
35725,
1669,
1758,
26445,
7344,
16810,
27560,
515,
197,
11143,
795,
21884,
6922,
25,
1758,
26445,
991,
726,
27560,
515,
298,
197,
36555,
25,
609,
1254,
1257... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtractTags(t *testing.T) {
var te TagExtracter
te.LoadDictionary("../dict.txt")
te.LoadIdf("idf.txt")
for index, sentence := range testContents {
result := te.ExtractTags(sentence, 20)
if len(result) != len(Tags[index]) {
t.Fatalf("%s = %v", sentence, result)
}
for i, tag := range result {
... | explode_data.jsonl/38383 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
28959,
15930,
1155,
353,
8840,
836,
8,
341,
2405,
1013,
12353,
28959,
261,
198,
197,
665,
13969,
8517,
17409,
8477,
3909,
1138,
197,
665,
13969,
764,
69,
445,
77004,
3909,
5130,
2023,
1922,
11,
11652,
1669,
2088,
1273,
14803... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContext2Plan_listOrder(t *testing.T) {
m := testModule(t, "plan-list-order")
p := testProvider("aws")
p.ApplyFn = testApplyFn
p.DiffFn = testDiffFn
p.GetSchemaReturn = &ProviderSchema{
ResourceTypes: map[string]*configschema.Block{
"aws_instance": {
Attributes: map[string]*configschema.Attribute{... | explode_data.jsonl/28719 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 493
} | [
2830,
3393,
1972,
17,
20485,
2019,
4431,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1273,
3332,
1155,
11,
330,
10393,
9029,
23810,
1138,
3223,
1669,
1273,
5179,
445,
8635,
1138,
3223,
36051,
24911,
284,
1273,
28497,
24911,
198,
3223,
980... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapToSlice(t *testing.T) {
for _, item := range []struct {
s map[string]struct{}
want []string
}{
{map[string]struct{}{"甲": {}, "乙": {}, "丙": {}}, []string{"甲", "乙", "丙"}},
{map[string]struct{}{"foo": {}, "bar": {}}, []string{"foo", "bar"}},
{map[string]struct{}{}, []string{}},
} {
got := gsl... | explode_data.jsonl/8977 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
2227,
1249,
33236,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1509,
1669,
2088,
3056,
1235,
341,
197,
1903,
262,
2415,
14032,
60,
1235,
16094,
197,
50780,
3056,
917,
198,
197,
59403,
197,
197,
90,
2186,
14032,
60,
1235,
625... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMaterializerNoSourceTable(t *testing.T) {
ms := &vtctldatapb.MaterializeSettings{
Workflow: "workflow",
SourceKeyspace: "sourceks",
TargetKeyspace: "targetks",
TableSettings: []*vtctldatapb.TableMaterializeSettings{{
TargetTable: "t1",
SourceExpression: "select * from t1",
CreateDd... | explode_data.jsonl/61878 | {
"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,
13415,
3135,
2753,
3608,
2556,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
609,
9708,
302,
507,
266,
391,
65,
44253,
551,
6086,
515,
197,
197,
62768,
25,
981,
330,
56249,
756,
197,
197,
3608,
8850,
1306,
25,
330,
2427,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRecord_Tx_empty(t *testing.T) {
r := Record{}
if err := r.Tx(nil, nil); err != nil {
t.Fatal(err)
}
if len(r.Ops) != 1 {
t.Fatal(r.Ops)
}
if err := r.Tx([]byte{'a', 'b'}, nil); err != nil {
t.Fatal(err)
}
if len(r.Ops) != 2 {
t.Fatal(r.Ops)
}
if r.Tx([]byte{'a', 'b'}, []byte{'d'}) == nil {
... | explode_data.jsonl/44851 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 215
} | [
2830,
3393,
6471,
1139,
87,
15124,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
13583,
16094,
743,
1848,
1669,
435,
81362,
27907,
11,
2092,
1215,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
743,
2422,
2601,
8382,
1690,
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... | 7 |
func TestRunFail(t *testing.T) {
attemptNumber := 0
// Create a mock job that will fail despite 2 retry attempts.
mJob := &mock.Job{
RunFunc: func(jobData map[string]interface{}) (job.Return, error) {
defer func() { attemptNumber += 1 }()
switch attemptNumber {
case 0, 1, 2:
return job.Return{State: p... | explode_data.jsonl/72729 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 467
} | [
2830,
3393,
6727,
19524,
1155,
353,
8840,
836,
8,
341,
35447,
4213,
2833,
1669,
220,
15,
198,
197,
322,
4230,
264,
7860,
2618,
429,
686,
3690,
8818,
220,
17,
22683,
13553,
624,
2109,
12245,
1669,
609,
16712,
45293,
515,
197,
85952,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandler_CheckDocID(t *testing.T) {
type args struct {
c echo.Context
}
tests := []struct {
name string
h *Handler
args args
wantErr bool
}{
// TODO: Add test cases.
}
t.Error("rulebases.Handler.CheckDocID() tests not implemented")
for _, tt := range tests {
if err := tt.h.CheckD... | explode_data.jsonl/72531 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 206
} | [
2830,
3393,
3050,
28188,
9550,
915,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1444,
1687,
9328,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
9598,
981,
353,
3050,
198,
197,
31215,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProviderFromStruct(t *testing.T) {
pfs := &ProviderFromStruct{Deserializer: &mockDeserializer{}}
p, err := pfs.NewPolicy(nil)
assert.Nil(t, p)
assert.Error(t, err)
p, err = pfs.NewPolicy(&cb.SignaturePolicyEnvelope{})
assert.Nil(t, p)
assert.Error(t, err)
p, err = pfs.NewPolicy(SignedByMspPeer("primu... | explode_data.jsonl/51385 | {
"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,
5179,
3830,
9422,
1155,
353,
8840,
836,
8,
341,
3223,
3848,
1669,
609,
5179,
3830,
9422,
90,
80097,
25,
609,
16712,
80097,
6257,
532,
3223,
11,
1848,
1669,
281,
3848,
7121,
13825,
27907,
340,
6948,
59678,
1155,
11,
281,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAccGitRepo_Create_IncorrectInitialization(t *testing.T) {
projectName := testutils.GenerateResourceName()
gitRepoName := testutils.GenerateResourceName()
azureGitRepoResource := fmt.Sprintf(`
resource "azuredevops_git_repository" "repository" {
project_id = azuredevops_project.project.id
name ... | explode_data.jsonl/59076 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 311
} | [
2830,
3393,
14603,
46562,
25243,
34325,
25972,
19928,
61928,
1155,
353,
8840,
836,
8,
341,
72470,
675,
1669,
1273,
6031,
57582,
4783,
675,
741,
90731,
25243,
675,
1669,
1273,
6031,
57582,
4783,
675,
741,
197,
39495,
46562,
25243,
4783,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNumber(t *testing.T) {
const SCRIPT = `
(new Number(100111122133144155)).toString()
`
testScript1(SCRIPT, asciiString("100111122133144160"), t)
} | explode_data.jsonl/10455 | {
"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,
2833,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
197,
1755,
5624,
7,
16,
15,
15,
16,
16,
16,
16,
17,
17,
16,
18,
18,
16,
19,
19,
16,
20,
20,
4579,
6575,
741,
197,
19324,
18185,
5910,
16,
7,
24787,
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 TestGetStorageAccountType(t *testing.T) {
validPremiumVMSize := "Standard_DS2_v2"
validStandardVMSize := "Standard_D2_v2"
expectedPremiumTier := "Premium_LRS"
expectedStandardTier := "Standard_LRS"
invalidVMSize := "D2v2"
// test premium VMSize returns premium managed disk tier
premiumTier, err := getStora... | explode_data.jsonl/21310 | {
"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,
1949,
5793,
7365,
929,
1155,
353,
8840,
836,
8,
341,
56322,
66467,
11187,
1695,
1669,
330,
19781,
51901,
17,
2273,
17,
698,
56322,
19781,
11187,
1695,
1669,
330,
19781,
1557,
17,
2273,
17,
698,
42400,
66467,
70684,
1669,
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... | 6 |
func TestSimplePutWithTesting(t *testing.T) {
fakeService := httpfake.New(httpfake.WithTesting(t))
defer fakeService.Close()
// register a handler for our fake service
fakeService.NewHandler().
Put("/users/1").
AssertBody([]byte(`{"username": "dreamer"}`)).
Reply(200).
BodyString(`{"id": 1,"username": "dre... | explode_data.jsonl/63190 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 389
} | [
2830,
3393,
16374,
19103,
2354,
16451,
1155,
353,
8840,
836,
8,
341,
1166,
726,
1860,
1669,
1758,
30570,
7121,
19886,
30570,
26124,
16451,
1155,
1171,
16867,
12418,
1860,
10421,
2822,
197,
322,
4161,
264,
7013,
369,
1039,
12418,
2473,
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 TestBuildPipeline(t *testing.T) {
tests := []struct {
name string
fillFS func(afero.Fs)
expectedResult *Pipeline
expectedError bool
}{
{
name: "empty",
fillFS: func(fs afero.Fs) {
fs.Mkdir("/", 0700)
fs.Mkdir("/jobs", 0700)
fs.Mkdir("/resources", 0700)
fs.Mkdir(... | explode_data.jsonl/10841 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1356
} | [
2830,
3393,
11066,
34656,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
65848,
8485,
260,
2915,
2877,
802,
78,
991,
82,
340,
197,
42400,
2077,
353,
34656,
198,
197,
42400,
1454,
220,
1807... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDcrdCmds(t *testing.T) {
t.Parallel()
testID := int(1)
tests := []struct {
name string
newCmd func() (interface{}, error)
staticCmd func() interface{}
marshalled string
unmarshalled interface{}
}{
{
name: "debuglevel",
newCmd: func() (interface{}, error) {... | explode_data.jsonl/158 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1534
} | [
2830,
3393,
35,
5082,
67,
15613,
82,
1155,
353,
8840,
836,
8,
972,
3244,
41288,
7957,
18005,
18185,
915,
1669,
526,
7,
16,
1218,
78216,
1669,
3056,
1235,
972,
197,
11609,
260,
914,
319,
197,
8638,
15613,
981,
2915,
368,
320,
4970,
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 TestLookupCommandInfo(t *testing.T) {
for _, n := range []string{"watch", "WATCH", "wAtch"} {
if lookupCommandInfo(n) == (commandInfo{}) {
t.Errorf("LookupCommandInfo(%q) = CommandInfo{}, expected non-zero value", n)
}
}
} | explode_data.jsonl/58890 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
34247,
4062,
1731,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
308,
1669,
2088,
3056,
917,
4913,
14321,
497,
330,
64492,
497,
330,
86,
1655,
331,
9207,
341,
197,
743,
18615,
4062,
1731,
1445,
8,
621,
320,
5631,
1731,
28875,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateBundle(t *testing.T) {
var table = []struct {
description string
directory string
hasError bool
errString string
}{
{
description: "registryv1 bundle/valid bundle",
directory: "./testdata/valid_bundle",
hasError: false,
},
{
description: "registryv1 bundle/invali... | explode_data.jsonl/6872 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 740
} | [
2830,
3393,
17926,
8409,
1155,
353,
8840,
836,
8,
341,
2405,
1965,
284,
3056,
1235,
341,
197,
42407,
914,
198,
197,
2698,
4758,
256,
914,
198,
197,
63255,
1454,
262,
1807,
198,
197,
9859,
703,
256,
914,
198,
197,
59403,
197,
197,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestInvalidAlgorithmsRSA(t *testing.T) {
_, err := newRSARecipient("XYZ", nil)
if err != ErrUnsupportedAlgorithm {
t.Error("should return error on invalid algorithm")
}
_, err = newRSASigner("XYZ", nil)
if err != ErrUnsupportedAlgorithm {
t.Error("should return error on invalid algorithm")
}
enc := ne... | explode_data.jsonl/63199 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 368
} | [
2830,
3393,
7928,
2101,
18980,
73564,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
501,
73564,
74432,
445,
32196,
497,
2092,
340,
743,
1848,
961,
15495,
41884,
27847,
341,
197,
3244,
6141,
445,
5445,
470,
1465,
389,
8318,
12111,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCustomParser(t *testing.T) {
type foo struct {
name string
}
type bar struct {
Name string `env:"OTHER"`
Foo *foo `env:"BLAH"`
}
type config struct {
Var foo `env:"VAR"`
Foo *foo `env:"BLAH"`
Other *bar
}
os.Setenv("VAR", "test")
defer os.Unsetenv("VAR")
os.Setenv("OTHER", "test... | explode_data.jsonl/78784 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 367
} | [
2830,
3393,
10268,
6570,
1155,
353,
8840,
836,
8,
341,
13158,
15229,
2036,
341,
197,
11609,
914,
198,
197,
630,
13158,
3619,
2036,
341,
197,
21297,
914,
1565,
3160,
2974,
30267,
8805,
197,
12727,
2624,
220,
353,
7975,
256,
1565,
3160,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConcurrencyUnmarshalling(t *testing.T) {
config := safeConfig{
Viper: viper.New(),
}
config.SetDefault("foo", map[string]string{})
config.SetDefault("BAR", "test")
config.SetDefault("baz", "test")
var wg sync.WaitGroup
wg.Add(2)
go func() {
defer wg.Done()
for n := 0; n <= 1000; n++ {
config... | explode_data.jsonl/610 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
79611,
1806,
36239,
16740,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
6092,
2648,
515,
197,
17446,
12858,
25,
95132,
7121,
3148,
197,
532,
25873,
4202,
3675,
445,
7975,
497,
2415,
14032,
30953,
37790,
25873,
4202,
3675,
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... | 2 |
func TestGetAssetTypeFromTableName(t *testing.T) {
str := "spot/candle300s:BTC-USDT"
spot := o.GetAssetTypeFromTableName(str)
if !strings.EqualFold(spot.String(), asset.Spot.String()) {
t.Errorf("Error, expected 'SPOT', received: '%v'", spot)
}
} | explode_data.jsonl/30192 | {
"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,
1949,
16604,
929,
3830,
33227,
1155,
353,
8840,
836,
8,
341,
11355,
1669,
330,
18648,
2899,
3316,
18,
15,
15,
82,
25,
59118,
32340,
10599,
698,
1903,
19099,
1669,
297,
2234,
16604,
929,
3830,
33227,
4199,
340,
743,
753,
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... | 2 |
func TestPreFilterStateClone(t *testing.T) {
source := &preFilterState{
existingAntiAffinityCounts: topologyToMatchedTermCount{
{key: "name", value: "machine1"}: 1,
{key: "name", value: "machine2"}: 1,
},
affinityCounts: topologyToMatchedTermCount{
{key: "name", value: "nodeA"}: 1,
{key: "name", valu... | explode_data.jsonl/62836 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 276
} | [
2830,
3393,
4703,
5632,
1397,
37677,
1155,
353,
8840,
836,
8,
341,
47418,
1669,
609,
1726,
5632,
1397,
515,
197,
8122,
11083,
32649,
25841,
13489,
63731,
25,
44882,
1249,
8331,
291,
17249,
2507,
515,
298,
197,
90,
792,
25,
330,
606,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestGroupMatch(t *testing.T) {
group := &Group{
Paths: map[string]bool{
"foo": true,
"bar/": true,
"foo/bar": true,
},
PathPrefixes: map[string]bool{
"kubernetes/generated": true,
},
FileNames: map[string]bool{
"generated.txt": true,
},
FilePrefixes: map[string]bool{
"mygen"... | explode_data.jsonl/23375 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 639
} | [
2830,
3393,
2808,
8331,
1155,
353,
8840,
836,
8,
341,
44260,
1669,
609,
2808,
515,
197,
197,
26901,
25,
2415,
14032,
96436,
515,
298,
197,
1,
7975,
788,
257,
830,
345,
298,
197,
1,
2257,
14,
788,
262,
830,
345,
298,
197,
1,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenesisStateValidate_Valid(t *testing.T) {
pk := ed25519.GenPrivKey()
evidence := make([]exported.Evidence, 100)
for i := 0; i < 100; i++ {
sv := types.TestVote{
ValidatorAddress: pk.PubKey().Address(),
Height: int64(i),
Round: 0,
}
sig, err := pk.Sign(sv.SignBytes("test... | explode_data.jsonl/34624 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 298
} | [
2830,
3393,
84652,
1397,
17926,
97279,
1155,
353,
8840,
836,
8,
341,
3223,
74,
1669,
1578,
17,
20,
20,
16,
24,
65384,
32124,
1592,
2822,
7727,
27480,
1669,
1281,
10556,
1533,
291,
5142,
27480,
11,
220,
16,
15,
15,
340,
2023,
600,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestChannelMemberIsValid(t *testing.T) {
o := ChannelMember{}
require.Error(t, o.IsValid(), "should be invalid")
o.ChannelId = NewId()
require.Error(t, o.IsValid(), "should be invalid")
o.NotifyProps = GetDefaultChannelNotifyProps()
o.UserId = NewId()
/*o.Roles = "missing"
o.NotifyProps = GetDefaultChan... | explode_data.jsonl/80898 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 395
} | [
2830,
3393,
9629,
9366,
55470,
1155,
353,
8840,
836,
8,
341,
22229,
1669,
13434,
9366,
31483,
17957,
6141,
1155,
11,
297,
28992,
1507,
330,
5445,
387,
8318,
5130,
22229,
38716,
764,
284,
1532,
764,
741,
17957,
6141,
1155,
11,
297,
28992... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefragWallet(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
t.Parallel()
wt, err := createWalletTester(t.Name(), modules.ProdDependencies)
if err != nil {
t.Fatal(err)
}
defer func() {
if err := wt.closeWt(); err != nil {
t.Fatal(err)
}
}()
// mine defragThreshold blocks, resulting in ... | explode_data.jsonl/64327 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 485
} | [
2830,
3393,
2620,
4101,
38259,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
7039,
741,
197,
532,
3244,
41288,
7957,
741,
6692,
83,
11,
1848,
1669,
1855,
38259,
58699,
1155,
2967,
1507,
13454,
7763,
67,
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... | 2 |
func TestRebuildInstance(t *testing.T) {
rebuildArgs := &RebuildInstanceArgs{
ImageId: BBC_TestImageId,
AdminPass: BBC_TestAdminPass,
IsPreserveData: true,
RaidId: BBC_TestRaidId,
SysRootSize: 20,
}
err := BBC_CLIENT.RebuildInstance(BBC_TestBbcId, true, rebuildArgs)
ExpectEqual(t.Er... | explode_data.jsonl/4043 | {
"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,
5834,
2523,
1155,
353,
8840,
836,
8,
341,
17200,
5834,
4117,
1669,
609,
693,
5834,
2523,
4117,
515,
197,
53397,
764,
25,
286,
18096,
32541,
1906,
764,
345,
197,
197,
7210,
12187,
25,
414,
18096,
32541,
7210,
12187,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestChecksumFailure(t *testing.T) {
// reset configWatcher before each test
configWatcher = nil
MockSchedulerConfigByData([]byte("abc"))
cw := CreateConfigWatcher("rm-id", "p-group", 3*time.Second)
reloader := &FakeConfigReloader{}
cw.RegisterCallback(reloader)
// verify initial fields are correct
assert... | explode_data.jsonl/26851 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 262
} | [
2830,
3393,
73190,
17507,
1155,
353,
8840,
836,
8,
341,
197,
322,
7585,
2193,
47248,
1573,
1817,
1273,
198,
25873,
47248,
284,
2092,
198,
9209,
1176,
38878,
2648,
1359,
1043,
10556,
3782,
445,
13683,
28075,
1444,
86,
1669,
4230,
2648,
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 TestNoSupportedAuth(t *testing.T) {
req := bytes.NewBuffer(nil)
req.Write([]byte{1, NoAuth})
var resp bytes.Buffer
cred := StaticCredentials{
"foo": "bar",
}
cator := UserPassAuthenticator{Credentials: cred}
s, _ := New(&Config{AuthMethods: []Authenticator{cator}})
ctx, err := s.authenticate(&resp, re... | explode_data.jsonl/18561 | {
"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,
2753,
34636,
5087,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
5820,
7121,
4095,
27907,
340,
24395,
4073,
10556,
3782,
90,
16,
11,
2308,
5087,
3518,
2405,
9039,
5820,
22622,
271,
197,
10844,
1669,
23105,
27025,
515,
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... | 4 |
func TestNamespaceTruncate(t *testing.T) {
ctrl := xtest.NewController(t)
defer ctrl.Finish()
ns, closer := newTestNamespace(t)
defer closer()
for _, shard := range testShardIDs {
mockShard := NewMockdatabaseShard(ctrl)
mockShard.EXPECT().NumSeries().Return(int64(shard.ID()))
mockShard.EXPECT().ID().Return(... | explode_data.jsonl/35363 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 247
} | [
2830,
3393,
22699,
1282,
26900,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
856,
1944,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
84041,
11,
12128,
1669,
501,
2271,
22699,
1155,
340,
16867,
12128,
741,
2023,
8358,
52069,
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... | 2 |
func TestReserveStats(t *testing.T) {
db, tsv := setupTabletServerTest(t, "")
defer tsv.StopService()
defer db.Close()
target := querypb.Target{TabletType: topodatapb.TabletType_PRIMARY}
callerID := &querypb.VTGateCallerID{
Username: "test",
}
ctx := callerid.NewContext(context.Background(), nil, callerID)
... | explode_data.jsonl/80028 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 986
} | [
2830,
3393,
1061,
5852,
16635,
1155,
353,
8840,
836,
8,
341,
20939,
11,
259,
3492,
1669,
6505,
2556,
83,
5475,
2271,
1155,
11,
14676,
16867,
259,
3492,
30213,
1860,
741,
16867,
2927,
10421,
2822,
28861,
1669,
3239,
16650,
35016,
90,
255... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFuturesChangeMarginType(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test: api keys not set or canManipulateRealOrders set to false")
}
_, err := b.FuturesChangeMarginType(context.Background(), currency.NewPairWithDelimiter("BTCUSD", "PERP", "_"), "I... | explode_data.jsonl/76627 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
37,
74606,
4072,
21681,
929,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
1369,
753,
4814,
92876,
6334,
12768,
24898,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
25,
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... | 4 |
func TestResolvePublicKey(t *testing.T) {
prov := getProvider(t)
t.Run("resolve key from did:key", func(t *testing.T) {
ctx := getContext(t, &prov, kms.ED25519Type, kms.X25519ECDHKWType, transport.MediaTypeRFC0019EncryptedEnvelope)
keyBytes := []byte("12345678123456781234567812345678")
didKey, _ := fingerprin... | explode_data.jsonl/2104 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 974
} | [
2830,
3393,
56808,
61822,
1155,
353,
8840,
836,
8,
341,
197,
42947,
1669,
633,
5179,
1155,
692,
3244,
16708,
445,
17325,
1376,
504,
1521,
64849,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
20985,
1669,
66175,
1155,
11,
609,
42947,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResultStructHelp(t *testing.T) {
t.Parallel()
tests := []struct {
name string
reflectType reflect.Type
expected []string
}{
{
name: "empty struct",
reflectType: func() reflect.Type {
type s struct{}
return reflect.TypeOf(s{})
}(),
expected: nil,
},
{
name: "stru... | explode_data.jsonl/14411 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1326
} | [
2830,
3393,
2077,
9422,
12689,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
197,
34913,
929,
8708,
10184,
198,
197,
42400,
262,
3056,
917,
198,
197,
59403,
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 TestHTTPHandlerPutLevel(t *testing.T) {
lvl, _ := newHandler()
code, body := makeRequest(t, "PUT", lvl, strings.NewReader(`{"level":"warn"}`))
assertCodeOK(t, code)
assertResponse(t, lvl.Level(), body)
} | explode_data.jsonl/7602 | {
"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,
9230,
3050,
19103,
4449,
1155,
353,
8840,
836,
8,
341,
8810,
14536,
11,
716,
1669,
501,
3050,
2822,
43343,
11,
2487,
1669,
1281,
1900,
1155,
11,
330,
6221,
497,
46129,
11,
9069,
68587,
5809,
4913,
3294,
3252,
33481,
1,
554... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDescendants(t *testing.T) {
Convey("Given an initial Tree with any valid name", t, func() {
chart := New("normal")
Convey("When I insert nodes to create a complex tree", func() {
rootNode, _ := chart.GetRoot()
aNode := Node{ID: "a"}
bNode := Node{ID: "b"}
cNode := Node{ID: "c"}
dNode :=... | explode_data.jsonl/43717 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1146
} | [
2830,
3393,
1949,
11065,
28310,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
22043,
458,
2856,
8942,
448,
894,
2697,
829,
497,
259,
11,
2915,
368,
341,
197,
197,
15941,
1669,
1532,
445,
8252,
5130,
197,
93070,
5617,
445,
4498,
358,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewLifeCycleSysCC(t *testing.T) {
scc := New(NewMockProvider(), mockAclProvider)
assert.NotNil(t, scc)
stub := shim.NewMockStub("lscc", scc)
res := stub.MockInit("1", nil)
assert.Equal(t, int32(shim.OK), res.Status, res.Message)
res = stub.MockInvokeWithSignedProposal("1", [][]byte{[]byte("barf")}, nil)... | explode_data.jsonl/46561 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 185
} | [
2830,
3393,
3564,
25749,
44820,
32792,
3706,
1155,
353,
8840,
836,
8,
341,
1903,
638,
1669,
1532,
35063,
11571,
5179,
1507,
7860,
32,
564,
5179,
340,
6948,
93882,
1155,
11,
274,
638,
340,
18388,
392,
1669,
62132,
7121,
11571,
33838,
445... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDependencies(t *testing.T) {
if !testenv.HasSrc() {
// Tests run in a limited file system and we do not
// provide access to every source file.
t.Skipf("skipping on %s/%s, missing full GOROOT", runtime.GOOS, runtime.GOARCH)
}
ctxt := Default
all, err := listStdPkgs(ctxt.GOROOT)
if err != nil {
t.... | explode_data.jsonl/55073 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 524
} | [
2830,
3393,
48303,
1155,
353,
8840,
836,
8,
341,
743,
753,
1944,
3160,
16152,
20360,
368,
341,
197,
197,
322,
20150,
1598,
304,
264,
7199,
1034,
1849,
323,
582,
653,
537,
198,
197,
197,
322,
3410,
2615,
311,
1449,
2530,
1034,
624,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkflowDone(t *testing.T) {
ctx := rulebot.NewContext(nil, nil, nil, nil,
nil, nil, nil, nil,
nil, nil, nil)
in := result.DoneResult()
Workflow(ctx, in)
} | explode_data.jsonl/55327 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 71
} | [
2830,
3393,
62768,
17453,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
5912,
6331,
7121,
1972,
27907,
11,
2092,
11,
2092,
11,
2092,
345,
197,
84131,
11,
2092,
11,
2092,
11,
2092,
345,
197,
84131,
11,
2092,
11,
2092,
692,
17430,
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 |
func TestDisableUserAccessToken(t *testing.T) {
t.Run("disable user token", func(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableUserAccessTokens = true })
th.App.UpdateUserRoles(th.BasicUser.Id, model.SystemUserRoleId+" ... | explode_data.jsonl/47551 | {
"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,
25479,
1474,
37649,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
18015,
1196,
3950,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
197,
16867,
270,
836,
682,
4454,
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... | 1 |
func TestListList_MarshalBinaryWithIndex(t *testing.T) {
ROOT := grammemes.NewGrammeme("", "ROOT", "", "")
TAG1 := grammemes.NewGrammeme("ROOT", "TAG1", "", "")
TAG2 := grammemes.NewGrammeme("ROOT", "TAG2", "", "")
TAG3 := grammemes.NewGrammeme("ROOT", "TAG3", "", "")
TAG4 := grammemes.NewGrammeme("", "TAG4", "", ... | explode_data.jsonl/61361 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 975
} | [
2830,
3393,
852,
852,
1245,
28423,
21338,
2354,
1552,
1155,
353,
8840,
836,
8,
341,
197,
23888,
1669,
68125,
15660,
7121,
64225,
76,
3894,
19814,
330,
23888,
497,
7342,
14676,
10261,
1890,
16,
1669,
68125,
15660,
7121,
64225,
76,
3894,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateMissingContextNoDefault(t *testing.T) {
const expectedErrorContains = "Context was not found for specified context"
config := createValidTestConfig()
clientBuilder := NewNonInteractiveClientConfig(*config, "not-present", &ConfigOverrides{}, nil)
_, err := clientBuilder.ClientConfig()
if err == nil ... | explode_data.jsonl/56168 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
4021,
25080,
1972,
2753,
3675,
1155,
353,
8840,
836,
8,
341,
4777,
3601,
1454,
23805,
284,
330,
1972,
572,
537,
1730,
369,
5189,
2266,
698,
25873,
1669,
1855,
4088,
2271,
2648,
741,
25291,
3297,
1669,
1532,
8121,
71686,
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... | 2 |
func TestGetCredentialsEndpointWhenCredentialsAreNotSet(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
credentialsManager := mock_credentials.NewMockManager(ctrl)
task := Task{
Containers: []*apicontainer.Container{
{
Name: "c1",
Environment: make(map[string]string),
},
... | explode_data.jsonl/37193 | {
"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,
1949,
27025,
27380,
4498,
27025,
11526,
2623,
1649,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
741,
197,
32353,
2043,
1669,
7860,
47396,
7121,
11571,
2043,
62100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTSArrow(t *testing.T) {
expectPrintedTS(t, "(a?) => {}", "(a) => {\n};\n")
expectPrintedTS(t, "(a?: number) => {}", "(a) => {\n};\n")
expectPrintedTS(t, "(a?: number = 0) => {}", "(a = 0) => {\n};\n")
expectParseErrorTS(t, "(a? = 0) => {}", "<stdin>: error: Unexpected \"=\"\n")
expectPrintedTS(t, "(a?, b... | explode_data.jsonl/82327 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1867
} | [
2830,
3393,
9951,
25914,
1155,
353,
8840,
836,
8,
341,
24952,
8994,
291,
9951,
1155,
11,
11993,
64,
10170,
589,
24689,
11993,
64,
8,
589,
28152,
77,
11061,
59,
77,
1138,
24952,
8994,
291,
9951,
1155,
11,
11993,
64,
4820,
1372,
8,
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 Test_After(t *testing.T) {
select {
case <-After(time.Second):
}
ResetPrecision(time.Millisecond*10, true)
select {
case <-After(time.Second * 3):
}
select {
case <-After(time.Millisecond * 100):
}
ResetPrecision(time.Millisecond*100, true)
} | explode_data.jsonl/74921 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
1566,
1046,
1155,
353,
8840,
836,
8,
341,
38010,
341,
2722,
9119,
6025,
9730,
32435,
982,
197,
630,
197,
14828,
55501,
9730,
71482,
9,
16,
15,
11,
830,
340,
38010,
341,
2722,
9119,
6025,
9730,
32435,
353,
220,
18,
982,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStartTimeMetric(t *testing.T) {
targets := []*testData{
{
name: "target1",
pages: []mockPrometheusResponse{
{code: 200, data: startTimeMetricPage},
},
validateFunc: verifyStartTimeMetricPage,
},
}
testEndToEnd(t, targets, true)
} | explode_data.jsonl/32320 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
40203,
54310,
1155,
353,
8840,
836,
8,
341,
28861,
82,
1669,
29838,
1944,
1043,
515,
197,
197,
515,
298,
11609,
25,
330,
5657,
16,
756,
298,
3223,
1134,
25,
3056,
16712,
35186,
39705,
2582,
515,
571,
197,
90,
1851,
25,
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 TestCollectInter(t *testing.T) {
v := &Value{data: []interface{}{interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something"), interface{}("something")}}
collected := v.CollectInter(func(index int, val interface{}) interface{} {
return index... | explode_data.jsonl/23383 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 241
} | [
2830,
3393,
47504,
3306,
1155,
353,
8840,
836,
8,
1476,
5195,
1669,
609,
1130,
90,
691,
25,
3056,
4970,
6257,
90,
4970,
6257,
445,
33331,
3975,
3749,
6257,
445,
33331,
3975,
3749,
6257,
445,
33331,
3975,
3749,
6257,
445,
33331,
3975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConverterMap(t *testing.T) {
fieldMap := make(map[string]codegen.FieldMapperEntry)
fieldMap["One"] = codegen.FieldMapperEntry{
QualifiedName: "Two",
Override: true,
}
fieldMap["Two"] = codegen.FieldMapperEntry{
QualifiedName: "One",
Override: true,
}
lines, err := convertTypes(
"Foo"... | explode_data.jsonl/62061 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 263
} | [
2830,
3393,
14920,
2227,
1155,
353,
8840,
836,
8,
341,
39250,
2227,
1669,
1281,
9147,
14032,
60,
95859,
17087,
10989,
5874,
340,
39250,
2227,
1183,
3966,
1341,
284,
2038,
4370,
17087,
10989,
5874,
515,
197,
16995,
928,
1870,
675,
25,
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 TestAbsInt32(t *testing.T) {
x := AbsInt32(10)
assert.Equal(t, int32(10), x)
x = AbsInt32(0)
assert.Equal(t, int32(0), x)
x = AbsInt32(-10)
assert.Equal(t, int32(10), x)
} | explode_data.jsonl/40494 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
27778,
1072,
18,
17,
1155,
353,
8840,
836,
8,
341,
10225,
1669,
22080,
1072,
18,
17,
7,
16,
15,
340,
6948,
12808,
1155,
11,
526,
18,
17,
7,
16,
15,
701,
856,
692,
10225,
284,
22080,
1072,
18,
17,
7,
15,
340,
6948,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCheckGoVersion(t *testing.T) {
defer func() { errValueUsable = nil }()
var goVer string
goVer, errValueUsable = checkGoVersion(runtime.Version())
assert.NoError(t, errValueUsable)
t.Logf("raw=%s, pure=%s", runtime.Version(), goVer)
goVer, errValueUsable = checkGoVersion("go1.15")
assert.NoError(t, errV... | explode_data.jsonl/29651 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 351
} | [
2830,
3393,
3973,
10850,
5637,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
368,
314,
1848,
1130,
3558,
480,
284,
2092,
50746,
2405,
728,
10141,
914,
198,
30680,
10141,
11,
1848,
1130,
3558,
480,
284,
1779,
10850,
5637,
89467,
35842,
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... | 1 |
func TestCloudHypervisorHotplugAddBlockDevice(t *testing.T) {
assert := assert.New(t)
clhConfig, err := newClhConfig()
assert.NoError(err)
clh := &cloudHypervisor{}
clh.config = clhConfig
clh.APIClient = &clhClientMock{}
clh.devicesIds = make(map[string]string)
clh.config.BlockDeviceDriver = config.VirtioBlo... | explode_data.jsonl/68504 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 274
} | [
2830,
3393,
16055,
39,
1082,
31396,
20170,
47474,
2212,
4713,
6985,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
39407,
71,
2648,
11,
1848,
1669,
501,
5066,
71,
2648,
741,
6948,
35699,
3964,
692,
39407,
71,
1669,
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 TestOptsThirdParty(t *testing.T) {
testInputs(t, `
/img$third-party
`,
[]TestInput{
{URL: "http://foo.com/img", Matched: true},
{URL: "http://foo.com/img", Matched: true, OriginDomain: "bar.com"},
{URL: "http://foo.com/img", Matched: false, OriginDomain: "foo.com"},
{URL: "http://foo.com/img", Match... | explode_data.jsonl/81619 | {
"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,
43451,
36975,
37361,
1155,
353,
8840,
836,
8,
341,
18185,
31946,
1155,
11,
22074,
13670,
3,
31727,
24031,
198,
12892,
197,
197,
1294,
2271,
2505,
515,
298,
197,
90,
3144,
25,
330,
1254,
1110,
7975,
905,
13670,
497,
14152,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResponseTypesEqual(t *testing.T) {
tests := []struct {
r1, r2 string
want bool
}{
{"code", "code", true},
{"id_token", "code", false},
{"code token", "token code", true},
{"code token", "code token", true},
{"foo", "bar code", false},
{"code token id_token", "token id_token code", true},
... | explode_data.jsonl/569 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 289
} | [
2830,
3393,
2582,
4173,
2993,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
7000,
16,
11,
435,
17,
914,
198,
197,
50780,
256,
1807,
198,
197,
59403,
197,
197,
4913,
1851,
497,
330,
1851,
497,
830,
1583,
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... | 4 |
func TestClient_CreateRealm(t *testing.T) {
// given
handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
assert.Equal(t, RealmsCreatePath, req.URL.Path)
w.WriteHeader(201)
})
server := httptest.NewServer(handler)
defer server.Close()
client := Client{
requester: server.Client(),
... | explode_data.jsonl/49872 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 207
} | [
2830,
3393,
2959,
34325,
64290,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
53326,
1669,
1758,
89164,
18552,
3622,
1758,
37508,
11,
4232,
353,
1254,
9659,
8,
341,
197,
6948,
12808,
1155,
11,
8800,
1011,
4021,
1820,
11,
4232,
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... | 1 |
func TestColorMInit(t *testing.T) {
var m ebiten.ColorM
for i := 0; i < ebiten.ColorMDim-1; i++ {
for j := 0; j < ebiten.ColorMDim; j++ {
got := m.Element(i, j)
want := 0.0
if i == j {
want = 1
}
if want != got {
t.Errorf("m.Element(%d, %d) = %f, want %f", i, j, got, want)
}
}
}
m.Set... | explode_data.jsonl/48447 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 328
} | [
2830,
3393,
1636,
44,
3803,
1155,
353,
8840,
836,
8,
341,
2405,
296,
384,
4489,
268,
6669,
44,
198,
2023,
600,
1669,
220,
15,
26,
600,
366,
384,
4489,
268,
6669,
6076,
318,
12,
16,
26,
600,
1027,
341,
197,
2023,
502,
1669,
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... | 9 |
func TestOpenURL(t *testing.T) {
db, err := openTestConnConninfo("postgres://")
if err != nil {
t.Fatal(err)
}
defer db.Close()
// database/sql might not call our Open at all unless we do something with
// the connection
txn, err := db.Begin()
if err != nil {
t.Fatal(err)
}
txn.Rollback()
} | explode_data.jsonl/63419 | {
"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,
5002,
3144,
1155,
353,
8840,
836,
8,
341,
20939,
11,
1848,
1669,
1787,
2271,
9701,
9701,
2733,
445,
43070,
1110,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
2927,
10421,
741,
197,
322,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHTTPRead(t *testing.T) {
u, _ := url.Parse("http://test.url/test")
sr, fg := getHttpReader()
rc, err := sr.Read(u)
if rc != fg.body {
t.Errorf("Unexpected readcloser returned: %#v", rc)
}
if err != nil {
t.Errorf("Unexpected error returned: %v", err)
}
} | explode_data.jsonl/20553 | {
"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,
9230,
4418,
1155,
353,
8840,
836,
8,
341,
10676,
11,
716,
1669,
2515,
8937,
445,
1254,
1110,
1944,
7315,
12697,
1138,
1903,
81,
11,
29799,
1669,
633,
2905,
5062,
741,
30295,
11,
1848,
1669,
18962,
6503,
8154,
340,
743,
101... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConnectDeleteCounters(t *testing.T) {
err := Connect("./db/mstat.db")
if err != nil {
t.Fatal(err)
} else {
deleted := DelCounter("stat1")
if deleted > 1 {
t.Fatal("keys deleted: ", deleted)
}
deleted2 := DelCounter("stat3")
if deleted2 > 1 {
t.Fatal("keys deleted: ", deleted2)
... | explode_data.jsonl/1818 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
14611,
6435,
2507,
388,
1155,
353,
8840,
836,
8,
1476,
9859,
1669,
13015,
13988,
1999,
3183,
9878,
7076,
5130,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
92,
770,
1476,
197,
197,
26521,
1669,
7313,
14099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProxyAllowedGroups(t *testing.T) {
tests := []struct {
name string
allowedGroups []string
groups []string
expectUnauthorized bool
}{
{"NoAllowedGroups", []string{}, []string{}, false},
{"NoAllowedGroupsUserHasGroups", []string{}, []string{"a", "b"}, false},
{"User... | explode_data.jsonl/36426 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 742
} | [
2830,
3393,
16219,
35382,
22173,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
2290,
914,
198,
197,
197,
20967,
22173,
414,
3056,
917,
198,
197,
44260,
82,
1797,
3056,
917,
198,
197,
24952,
51181,
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... | 1 |
func TestDeterminePublicIPName(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
testCases := []struct {
desc string
loadBalancerIP string
existingPIPs []network.PublicIPAddress
expectedIP string
expectedError bool
}{
{
desc: "determinePublicIpName shall get public... | explode_data.jsonl/34001 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 894
} | [
2830,
3393,
35,
24308,
12676,
3298,
675,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
1843,
914,
198,
197,
49386,
9382... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIDPCanHandleRequestWithNewSession(t *testing.T) {
test := NewIdentifyProviderTest(t)
test.IDP.SessionProvider = &mockSessionProvider{
GetSessionFunc: func(w http.ResponseWriter, r *http.Request, req *IdpAuthnRequest) *Session {
fmt.Fprintf(w, "RelayState: %s\nSAMLRequest: %s",
req.RelayState, req.Re... | explode_data.jsonl/19823 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 358
} | [
2830,
3393,
915,
4872,
276,
6999,
1900,
2354,
3564,
5283,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
1532,
28301,
1437,
5179,
2271,
1155,
340,
18185,
9910,
47,
20674,
5179,
284,
609,
16712,
5283,
5179,
515,
197,
37654,
5283,
9626,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestABlockEntryFields(t *testing.T) {
a := new(adminBlock.ForwardCompatibleEntry)
a.Size = 0
a.Data = []byte{}
a.AdminIDType = 0x0D
TestABlockEntryFunctions(a, a, t)
} | explode_data.jsonl/2725 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
1867,
1023,
5874,
8941,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
501,
35677,
4713,
26676,
1606,
29161,
5874,
340,
11323,
2465,
284,
220,
15,
198,
11323,
3336,
284,
3056,
3782,
16094,
11323,
39469,
915,
929,
284,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestFloat(t *testing.T) {
var tests = []struct {
num32 float32
num64 float64
}{
{12.3, 3.21},
{0.0, 10000},
}
for _, test := range tests {
actual32, err := Marshal(test.num32)
if err != nil {
t.Fatalf("return err %v", err.Error())
}
actual64, err := Marshal(test.num64)
if err != nil {
t... | explode_data.jsonl/21638 | {
"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,
5442,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
22431,
18,
17,
2224,
18,
17,
198,
197,
22431,
21,
19,
2224,
21,
19,
198,
197,
59403,
197,
197,
90,
16,
17,
13,
18,
11,
220,
18,
13,
17,
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... | 6 |
func TestChangeDefaultLanguage(t *testing.T) {
t.Parallel()
assert := require.New(t)
b := newMultiSiteTestBuilder(t, "", "", map[string]interface{}{
"DefaultContentLanguage": "fr",
"DefaultContentLanguageInSubdir": false,
})
b.CreateSites().Build(BuildCfg{})
b.AssertFileContent("public/sect/doc1/in... | explode_data.jsonl/16240 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 355
} | [
2830,
3393,
4072,
3675,
13806,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
6948,
1669,
1373,
7121,
1155,
692,
2233,
1669,
501,
20358,
17597,
2271,
3297,
1155,
11,
7342,
7342,
2415,
14032,
31344,
67066,
197,
197,
1,
3675,
2762... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrimitive(t *testing.T) {
// These tests are designed to verify that primitive dictionary reduction is
// doing sensible things, therefore we construct a dictionary algorithm with a
// decomposer that's going to have obvious results. We'll use the run length
// decomposer.
a := NewAlgorithm(
RunLength{T... | explode_data.jsonl/75063 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 591
} | [
2830,
3393,
33313,
1155,
353,
8840,
836,
8,
341,
197,
322,
4220,
7032,
525,
6188,
311,
10146,
429,
27594,
10997,
13951,
374,
198,
197,
322,
3730,
37661,
2513,
11,
8916,
582,
9245,
264,
10997,
12111,
448,
264,
198,
197,
322,
28502,
200... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_New(t *testing.T) {
code := NewErrCode("ERR_CODE")
serr := New(code, "hi")
assert.Equal(t, "ERR_CODE hi", serr.Error())
assert.Equal(t, serr.String(), serr.Error())
assert.Equal(t, 0, serr.Len())
assert.Nil(t, serr.ErrorOrNil())
} | explode_data.jsonl/65960 | {
"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,
39582,
1155,
353,
8840,
836,
8,
341,
43343,
1669,
1532,
7747,
2078,
445,
2650,
10020,
1138,
1903,
615,
1669,
1532,
15842,
11,
330,
6023,
5130,
6948,
12808,
1155,
11,
330,
2650,
10020,
15588,
497,
61934,
6141,
2398,
6948,
128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRuleOrderByRand(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := []string{
"select col from tbl where id = 1 order by rand()",
}
for _, sql := range sqls {
q, err := NewQuery4Audit(sql)
if err == nil {
rule := q.RuleOrderByRand()
if rule.Item != "CLA.0... | explode_data.jsonl/76746 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
11337,
34605,
56124,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
3056,
917,
515,
197,
197,
1,
1742,
1375,
504,
21173,
1380,
877,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestComputeStatsForKeySpan(t *testing.T) {
defer leaktest.AfterTest(t)()
mtc := &multiTestContext{}
defer mtc.Stop()
mtc.Start(t, 3)
// Create a number of ranges using splits.
splitKeys := []string{"a", "c", "e", "g", "i"}
for _, k := range splitKeys {
key := roachpb.Key(k)
repl := mtc.stores[0].Lookup... | explode_data.jsonl/62539 | {
"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,
46254,
16635,
14954,
12485,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
2109,
10413,
1669,
609,
26268,
2271,
1972,
16094,
16867,
296,
10413,
30213,
741,
2109,
10413,
12101,
1155,
11,
220,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRejectCanaryModelSpecMissing(t *testing.T) {
g := gomega.NewGomegaWithT(t)
isvc := makeTestInferenceService()
isvc.Spec.Canary = &EndpointSpec{
Predictor: PredictorSpec{},
}
g.Expect(isvc.validate(c)).Should(gomega.MatchError(ExactlyOnePredictorViolatedError))
} | explode_data.jsonl/1490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
78413,
6713,
658,
1712,
8327,
25080,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
340,
19907,
7362,
1669,
1281,
2271,
641,
2202,
1860,
741,
19907,
7362,
36473,
53280,
658,
284,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Finalizer_RemoveObject(t *testing.T) {
// Arrange
handler, mock := newErrorsFakeHandler(mockErrorsArangoClientBackup{})
obj, deployment := newObjectSet(backupApi.ArangoBackupStateReady)
obj.Finalizers = []string{
backupApi.FinalizerArangoBackup,
}
time := meta.Now()
obj.DeletionTimestamp = &time
... | explode_data.jsonl/5627 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 431
} | [
2830,
3393,
77072,
3135,
66843,
1190,
1155,
353,
8840,
836,
8,
341,
197,
322,
40580,
198,
53326,
11,
7860,
1669,
501,
13877,
52317,
3050,
30389,
13877,
6953,
5170,
2959,
56245,
6257,
692,
22671,
11,
23172,
1669,
501,
1190,
1649,
7,
3137... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAtomicMap(t *testing.T) {
m := AtomicMap()
var wg sync.WaitGroup
for i := 0; i < 10; i++ {
wg.Add(1)
go func(a int) {
m.Store(a, "a")
m.LoadOrStore(a, "b")
m.Len()
m.Delete(a)
m.Len()
m.LoadOrStore(a, "b")
m.Store(a, "a")
m.Len()
wg.Done()
}(i)
}
wg.Wait()
if a := m.Len... | explode_data.jsonl/60934 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 404
} | [
2830,
3393,
65857,
2227,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
30316,
2227,
741,
2405,
63581,
12811,
28384,
2808,
198,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
26,
600,
1027,
341,
197,
72079,
1904,
7,
16,
340,
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 TestAnalyzeAndDetectDevfile(t *testing.T) {
var mockClient MockAlizerClient
tests := []struct {
name string
clonePath string
repo string
token string
registryURL string
wantDevfile bool
wantDevfileEndpoint string
wantErr ... | explode_data.jsonl/63858 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1367
} | [
2830,
3393,
2082,
55856,
3036,
57193,
14592,
1192,
1155,
353,
8840,
836,
8,
1476,
2405,
7860,
2959,
14563,
2101,
3135,
2959,
271,
78216,
1669,
3056,
1235,
341,
197,
11609,
394,
914,
198,
197,
197,
19982,
1820,
1843,
914,
198,
197,
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... | 8 |
func TestIsNPathElement(t *testing.T) {
tests := []struct {
desc string
in string
expect bool
}{
{
desc: "empty",
in: "",
expect: false,
},
{
desc: "negative",
in: "[-45]",
expect: false,
},
{
desc: "negative-1",
in: "[-1]",
expect: true,
},
{
... | explode_data.jsonl/70568 | {
"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,
3872,
45,
1820,
1691,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
41653,
256,
914,
198,
197,
17430,
257,
914,
198,
197,
24952,
1807,
198,
197,
59403,
197,
197,
515,
298,
41653,
25,
256,
330,
3194,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransportPrefersResponseOverWriteError(t *testing.T) {
if testing.Short() {
t.Skip("skipping in short mode")
}
defer afterTest(t)
const contentLengthLimit = 1024 * 1024 // 1MB
ts := httptest.NewServer(HandlerFunc(func(w ResponseWriter, r *Request) {
if r.ContentLength >= contentLengthLimit {
w.Writ... | explode_data.jsonl/4926 | {
"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,
27560,
29978,
388,
2582,
1918,
7985,
1454,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
304,
2805,
3856,
1138,
197,
532,
16867,
1283,
2271,
1155,
340,
4777,
2213,
4373,
16527,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAction_Validate_RequireMixinDeclaration(t *testing.T) {
c := NewTestConfig(t)
c.SetupPorterHome()
c.TestContext.AddTestFile("testdata/simple.porter.yaml", Name)
err := c.LoadManifest()
require.NoError(t, err)
// Sabotage!
c.Manifest.Mixins = []string{}
err = c.Manifest.Install.Validate(c.Manifest)
... | explode_data.jsonl/10946 | {
"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,
2512,
62,
17926,
62,
17959,
38456,
24489,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
2271,
2648,
1155,
340,
1444,
39820,
7084,
261,
7623,
2822,
1444,
8787,
1972,
1904,
2271,
1703,
445,
92425,
67195,
14598,
261,
33406,
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 TestClusterReconciler_reconcilePhase(t *testing.T) {
cluster := &clusterv1.Cluster{
ObjectMeta: metav1.ObjectMeta{
Name: "test-cluster",
},
Status: clusterv1.ClusterStatus{},
Spec: clusterv1.ClusterSpec{},
}
createClusterError := capierrors.CreateClusterError
failureMsg := "Create failed"
tests ... | explode_data.jsonl/66910 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1530
} | [
2830,
3393,
28678,
693,
40446,
5769,
1288,
40446,
457,
30733,
1155,
353,
8840,
836,
8,
341,
197,
18855,
1669,
609,
564,
590,
648,
16,
72883,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
330,
1944,
93208,
756,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWatchReplaceTargets(t *testing.T) {
t.Skipf("skipping known-flaky test: see https://go.dev/issue/50748")
WithOptions(
ProxyFiles(workspaceProxy),
WorkspaceFolders("pkg"),
).Run(t, workspaceModule, func(t *testing.T, env *Env) {
// Add a replace directive and expect the files that gopls is watching
... | explode_data.jsonl/37361 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 266
} | [
2830,
3393,
14247,
23107,
49030,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
69,
445,
4886,
5654,
3881,
12276,
28100,
1273,
25,
1490,
3703,
1110,
3346,
21523,
14,
11159,
14,
20,
15,
22,
19,
23,
5130,
197,
74238,
1006,
197,
197,
16219,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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(t *testing.T) {
// Don't use the normal connection setup, this is intended to
// blow up in the startup packet from a non-existent user.
db, err := openTestConnConninfo("user=thisuserreallydoesntexist")
if err != nil {
t.Fatal(err)
}
defer db.Close()
_, err = db.Begin()
if err == nil {
t.Fat... | explode_data.jsonl/63426 | {
"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,
1454,
1155,
353,
8840,
836,
8,
341,
197,
322,
4320,
944,
990,
279,
4622,
3633,
6505,
11,
419,
374,
10602,
311,
198,
197,
322,
12244,
705,
304,
279,
20567,
10151,
504,
264,
2477,
59828,
1196,
624,
20939,
11,
1848,
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... | 4 |
func TestAndroidBuild(t *testing.T) {
if runtime.GOOS == "android" || runtime.GOOS == "ios" {
t.Skipf("not available on %s", runtime.GOOS)
}
buf := new(bytes.Buffer)
defer func() {
xout = os.Stderr
buildN = false
buildX = false
}()
xout = buf
buildN = true
buildX = true
buildO = "basic.apk"
buildTarge... | explode_data.jsonl/33974 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 382
} | [
2830,
3393,
21831,
11066,
1155,
353,
8840,
836,
8,
341,
743,
15592,
97574,
3126,
621,
330,
5954,
1,
1369,
15592,
97574,
3126,
621,
330,
3530,
1,
341,
197,
3244,
57776,
69,
445,
1921,
2500,
389,
1018,
82,
497,
15592,
97574,
3126,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestApplicationContext_BeanNotFound(t *testing.T) {
c := gs.New()
c.Provide(func(i *int) bool { return false }, "")
err := c.Refresh()
assert.Error(t, err, "can't find bean, bean:\"\" type:\"\\*int\"")
} | explode_data.jsonl/17421 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 85
} | [
2830,
3393,
19736,
1668,
5307,
10372,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
28081,
7121,
741,
1444,
7763,
19448,
18552,
1956,
353,
396,
8,
1807,
314,
470,
895,
2470,
14676,
9859,
1669,
272,
49841,
741,
6948,
6141,
1155,
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 |
func TestEndpointUpdateParent(t *testing.T) {
if !testutils.IsRunningInContainer() {
defer testutils.SetupTestOSContext(t)()
}
n, err := createTestNetwork("bridge", "testnetwork", options.Generic{
netlabel.GenericData: options.Generic{
"BridgeName": "testnetwork",
},
}, nil, nil)
if err != nil {
t.Fata... | explode_data.jsonl/6370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 601
} | [
2830,
3393,
27380,
4289,
8387,
1155,
353,
8840,
836,
8,
341,
743,
753,
1944,
6031,
4506,
18990,
641,
4502,
368,
341,
197,
16867,
1273,
6031,
39820,
2271,
3126,
1972,
1155,
8,
741,
197,
630,
9038,
11,
1848,
1669,
1855,
2271,
12320,
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... | 2 |
func TestAttachedServiceAccount(t *testing.T) {
username, password := "foo", "bar"
client := fakeclient.NewSimpleClientset(&corev1.ServiceAccount{
ObjectMeta: metav1.ObjectMeta{
Name: "svcacct",
Namespace: "ns",
},
ImagePullSecrets: []corev1.LocalObjectReference{{
Name: "secret",
}},
}, &corev1... | explode_data.jsonl/76049 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 577
} | [
2830,
3393,
65987,
1860,
7365,
1155,
353,
8840,
836,
8,
341,
72358,
11,
3552,
1669,
330,
7975,
497,
330,
2257,
698,
25291,
1669,
12418,
2972,
7121,
16374,
2959,
746,
2099,
98645,
16,
13860,
7365,
515,
197,
23816,
12175,
25,
77520,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestFetchMetrics(t *testing.T) {
openFd = TestOpenFd{}
var fd ProcfdPlugin
stat, _ := fd.FetchMetrics()
if actual := stat["max_fd"].(uint64); actual != 100 {
t.Errorf("FetchMetrics(): max_fd(%d) should be 100", actual)
}
} | explode_data.jsonl/25527 | {
"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,
20714,
27328,
1155,
353,
8840,
836,
8,
341,
52199,
74476,
284,
3393,
5002,
74476,
16094,
2405,
12414,
41087,
6902,
11546,
198,
78085,
11,
716,
1669,
12414,
78506,
27328,
2822,
743,
5042,
1669,
2793,
1183,
2810,
17676,
84588,
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... | 2 |
func TestGC_NoEvictDirty(t *testing.T) {
// lower the maximal number of chunks in a single
// gc batch to ensure multiple batches.
t.Cleanup(setWithinRadiusFunc(func(_ *DB, _ shed.Item) bool { return false }))
defer func(s uint64) { gcBatchSize = s }(gcBatchSize)
gcBatchSize = 1
chunkCount := 10
db := newTestD... | explode_data.jsonl/11637 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1463
} | [
2830,
3393,
22863,
36989,
34112,
849,
36485,
1155,
353,
8840,
836,
8,
341,
197,
322,
4722,
279,
53129,
1372,
315,
26757,
304,
264,
3175,
198,
197,
322,
22122,
7162,
311,
5978,
5248,
44792,
624,
3244,
727,
60639,
14171,
41961,
8289,
9626... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIterator(t *testing.T) {
var keys []InternalKey
var vals [][]byte
newIter := func(seqNum uint64, opts IterOptions) *Iterator {
cmp := DefaultComparer.Compare
equal := DefaultComparer.Equal
split := func(a []byte) int { return len(a) }
// NB: Use a mergingIter to filter entries newer than seqNum.
... | explode_data.jsonl/53971 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 831
} | [
2830,
3393,
11951,
1155,
353,
8840,
836,
8,
341,
2405,
6894,
3056,
11569,
1592,
198,
2405,
28356,
52931,
3782,
271,
8638,
8537,
1669,
2915,
34820,
4651,
2622,
21,
19,
11,
12185,
13704,
3798,
8,
353,
11951,
341,
197,
1444,
1307,
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 TestCondition(t *testing.T) {
logp.TestingSetup()
tests := []struct {
config ConditionConfig
result bool
}{
{
config: ConditionConfig{
Equals: &ConditionFields{fields: map[string]interface{}{
"type": "process",
}},
},
result: true,
},
{
config: ConditionConfig{
Equals: &C... | explode_data.jsonl/21714 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1164
} | [
2830,
3393,
10547,
1155,
353,
8840,
836,
8,
341,
6725,
79,
8787,
287,
21821,
2822,
78216,
1669,
3056,
1235,
341,
197,
25873,
15180,
2648,
198,
197,
9559,
1807,
198,
197,
59403,
197,
197,
515,
298,
25873,
25,
15180,
2648,
515,
571,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.