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 TestUserStringWith(t *testing.T) {
user := tgbotapi.User{
ID: 0,
FirstName: "Test",
LastName: "Test",
UserName: "",
LanguageCode: "en",
IsBot: false,
}
if user.String() != "Test Test" {
t.Fail()
}
} | explode_data.jsonl/25792 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
1474,
703,
2354,
1155,
353,
8840,
836,
8,
341,
19060,
1669,
53188,
6331,
2068,
7344,
515,
197,
29580,
25,
1843,
220,
15,
345,
197,
197,
26584,
25,
262,
330,
2271,
756,
197,
197,
27920,
25,
257,
330,
2271,
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... | 2 |
func TestTarDestinationName(t *testing.T) {
dir, err := ioutil.TempDir(os.TempDir(), "input")
dir2, err2 := ioutil.TempDir(os.TempDir(), "output")
if err != nil || err2 != nil {
t.Errorf("unexpected error: %v | %v", err, err2)
t.FailNow()
}
defer func() {
if err := os.RemoveAll(dir); err != nil {
t.Errorf... | explode_data.jsonl/58289 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 675
} | [
2830,
3393,
62733,
33605,
675,
1155,
353,
8840,
836,
8,
341,
48532,
11,
1848,
1669,
43144,
65009,
6184,
9638,
65009,
6184,
1507,
330,
1355,
1138,
48532,
17,
11,
1848,
17,
1669,
43144,
65009,
6184,
9638,
65009,
6184,
1507,
330,
3006,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRepo(t *testing.T) {
repo := &model.Repository{
GitHubRepo: model.GitHubRepo{
Owner: "tower",
RepoName: "div",
},
URL: "https://xxx",
DefaultBranch: "blue",
InstallID: 9,
}
branch := &model.Branch{
GitHubBranch: model.GitHubBranch{
Branch: "blue",
},
LastScannedAt: ... | explode_data.jsonl/79215 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1339
} | [
2830,
3393,
25243,
1155,
353,
8840,
836,
8,
341,
17200,
5368,
1669,
609,
2528,
25170,
515,
197,
9600,
275,
19316,
25243,
25,
1614,
1224,
275,
19316,
25243,
515,
298,
197,
13801,
25,
262,
330,
77578,
756,
298,
197,
25243,
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... | 1 |
func TestDeletionHeaders(t *testing.T) {
world, ri, _, blockingSender, _, _, tlf := setupTest(t, 1)
defer world.Cleanup()
u := world.GetUsers()[0]
trip := newConvTriple(t, tlf, u.Username)
res, err := ri.NewConversationRemote2(context.TODO(), chat1.NewConversationRemote2Arg{
IdTriple: trip,
TLFMessage: chat1.... | explode_data.jsonl/50758 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1202
} | [
2830,
3393,
1912,
52625,
10574,
1155,
353,
8840,
836,
8,
341,
76508,
11,
24185,
11,
8358,
22188,
20381,
11,
8358,
8358,
259,
11008,
1669,
6505,
2271,
1155,
11,
220,
16,
340,
16867,
1879,
727,
60639,
2822,
10676,
1669,
1879,
2234,
7137,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPopulateCluster_TopologyInvalidValue_Required(t *testing.T) {
c := buildMinimalCluster()
c.Spec.Topology.Masters = "123"
c.Spec.Topology.Nodes = "abc"
expectErrorFromPopulateCluster(t, c, "topology")
} | explode_data.jsonl/75044 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
11598,
6334,
28678,
94819,
2449,
7928,
1130,
62,
8164,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1936,
88328,
28678,
741,
1444,
36473,
17557,
2449,
1321,
14199,
284,
330,
16,
17,
18,
698,
1444,
36473,
17557,
2449,
52184,
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 |
func TestExec(t *testing.T) {
for _, conf := range configs(overlay) {
t.Logf("Running test with conf: %+v", conf)
const uid = 343
spec := testutil.NewSpecWithArgs("sleep", "100")
rootDir, bundleDir, err := testutil.SetupContainer(spec, conf)
if err != nil {
t.Fatalf("error setting up container: %v", err... | explode_data.jsonl/48919 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 889
} | [
2830,
3393,
10216,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
2335,
1669,
2088,
42309,
7,
21118,
8,
341,
197,
3244,
98954,
445,
18990,
1273,
448,
2335,
25,
68524,
85,
497,
2335,
692,
197,
4777,
14617,
284,
220,
18,
19,
18,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNestListOfMaps(t *testing.T) {
callErr, funcErr, assert, callBuffer, funcBuffer := testOpenAPITypeWriter(t, `
package foo
// Blah is a test.
// +k8s:openapi-gen=true
// +k8s:openapi-gen=x-kubernetes-type-tag:type_test
type Blah struct {
// Nested list of maps
NestedListOfMaps [][]map[string]string
}
`)
if... | explode_data.jsonl/3361 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 587
} | [
2830,
3393,
45,
477,
64090,
36562,
1155,
353,
8840,
836,
8,
341,
67288,
7747,
11,
2915,
7747,
11,
2060,
11,
1618,
4095,
11,
2915,
4095,
1669,
1273,
5002,
7082,
929,
6492,
1155,
11,
22074,
1722,
15229,
271,
322,
2502,
1466,
374,
264,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplication_FindCepNotFoundNoSaveCepNotFounr(t *testing.T) {
cr := new(CepRepositoryMock)
s := "12345678"
cr.On("GetCep", s).Return(nil, true)
cr.On("SaveCep", s).Return(nil, false)
app := GetInstance(cr)
_, err := app.FindCep(s)
cr.AssertExpectations(t)
assert.Error(t, err, "cep_not_found")
} | explode_data.jsonl/58369 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
4988,
95245,
34,
747,
10372,
2753,
8784,
34,
747,
2623,
37,
1624,
81,
1155,
353,
8840,
836,
8,
341,
91492,
1669,
501,
3025,
747,
4624,
11571,
340,
1903,
1669,
330,
16,
17,
18,
19,
20,
21,
22,
23,
698,
91492,
8071,
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 TestNonResourceCoversWildcard(t *testing.T) {
escalationTest{
ownerRules: []authorizationapi.PolicyRule{
{Verbs: sets.NewString("get", "post"), NonResourceURLs: sets.NewString("/foo/*", "/bar/*")},
},
servantRules: []authorizationapi.PolicyRule{
{Verbs: sets.NewString("get", "post"), NonResourceURLs: ... | explode_data.jsonl/9062 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 227
} | [
2830,
3393,
8121,
4783,
34,
8969,
92988,
1155,
353,
8840,
836,
8,
341,
80629,
278,
367,
2271,
515,
197,
197,
8118,
26008,
25,
3056,
39554,
2068,
1069,
8018,
11337,
515,
298,
197,
90,
10141,
1279,
25,
7289,
7121,
703,
445,
455,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTagSuccess(t *testing.T) {
testRepo := newTestRepo(t)
defer testRepo.cleanup(t)
testTag := "testTag"
require.Nil(t, testRepo.sut.Tag(testTag, "message"))
tags, err := testRepo.sut.TagsForBranch(testRepo.branchName)
require.Nil(t, err)
require.Contains(t, tags, testTag)
} | explode_data.jsonl/14044 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
5668,
7188,
1155,
353,
8840,
836,
8,
341,
18185,
25243,
1669,
501,
2271,
25243,
1155,
340,
16867,
1273,
25243,
87689,
1155,
692,
18185,
5668,
1669,
330,
1944,
5668,
698,
17957,
59678,
1155,
11,
1273,
25243,
514,
332,
23676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefaultPost(t *testing.T) {
assert.NotEqual(t, "NYC", Get("state"))
SetDefault("state", "NYC")
assert.Equal(t, "NYC", Get("state"))
} | explode_data.jsonl/5548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 60
} | [
2830,
3393,
3675,
4133,
1155,
353,
8840,
836,
8,
341,
6948,
15000,
2993,
1155,
11,
330,
23054,
34,
497,
2126,
445,
2454,
5455,
22212,
3675,
445,
2454,
497,
330,
23054,
34,
1138,
6948,
12808,
1155,
11,
330,
23054,
34,
497,
2126,
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 |
func TestDeleteValid(t *testing.T) {
storage := makeClusterTestStorage()
ctx := kapi.WithUser(kapi.WithNamespace(kapi.NewContext(), ""), &user.DefaultInfo{Name: "system:admin"})
obj, err := storage.Delete(ctx, "cluster-admins", nil)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
switch r := obj.(type... | explode_data.jsonl/80718 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 196
} | [
2830,
3393,
6435,
4088,
1155,
353,
8840,
836,
8,
341,
197,
16172,
1669,
1281,
28678,
2271,
5793,
2822,
20985,
1669,
595,
2068,
26124,
1474,
5969,
2068,
26124,
22699,
5969,
2068,
7121,
1972,
1507,
77130,
609,
872,
13275,
1731,
63121,
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 TestSendEthereumClaims(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockCosmos := mocks.NewMockCosmosClient(mockCtrl)
mockCosmos.EXPECT().FromAddress().Return(sdk.AccAddress{}).AnyTimes()
biggerNonceMatcher := HasBiggerNonce(0)
mockCosmos.EXPECT().SyncBroadcastMsg(biggerNonc... | explode_data.jsonl/19860 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 693
} | [
2830,
3393,
11505,
36,
18532,
372,
51133,
1155,
353,
8840,
836,
8,
1476,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
7860,
15001,
991,
18176,
2822,
77333,
54224,
8631,
1669,
68909,
7121,
11571,
54224,
8631,
2959,
303... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWatcherUnsubscribe(t *testing.T) {
var err error
timeout := 100 * time.Millisecond * timeMultiplier
// test an error is returned without subscription
t.Run("no subscription", func(t *testing.T) {
w := NewWatcher(nil, nil)
if err := w.Unsubscribe("non-existent"); err == nil {
t.Errorf("did not retur... | explode_data.jsonl/38177 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 445
} | [
2830,
3393,
47248,
1806,
9384,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
78395,
1669,
220,
16,
15,
15,
353,
882,
71482,
353,
882,
66873,
271,
197,
322,
1273,
458,
1465,
374,
5927,
2041,
15142,
198,
3244,
16708,
445,
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 TestDcodeStruct(t *testing.T) {
//t.Skip("skipping TestDcodeStruct")
u := User{}
_ = CodecDecode("82a249640aa44e616d65aa6861727279206461796f", &u)
if u.ID != 10 {
t.Errorf("CodecDecode result: %+v", u)
}
} | explode_data.jsonl/30440 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 101
} | [
2830,
3393,
35,
1851,
9422,
1155,
353,
8840,
836,
8,
341,
197,
322,
83,
57776,
445,
4886,
5654,
3393,
35,
1851,
9422,
5130,
10676,
1669,
2657,
16094,
197,
62,
284,
67077,
32564,
445,
23,
17,
64,
17,
19,
24,
21,
19,
15,
5305,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_New(t *testing.T) {
table := []Ident{
{"", []string{}},
{"widget", []string{"widget"}},
{"widget_id", []string{"widget", "ID"}},
{"WidgetID", []string{"Widget", "ID"}},
{"Widget_ID", []string{"Widget", "ID"}},
{"widget_ID", []string{"widget", "ID"}},
{"widget/ID", []string{"widget", "ID"}},
{... | explode_data.jsonl/82649 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 730
} | [
2830,
3393,
39582,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
3056,
28301,
515,
197,
197,
4913,
497,
3056,
917,
6257,
1583,
197,
197,
4913,
9797,
497,
3056,
917,
4913,
9797,
48085,
197,
197,
4913,
9797,
842,
497,
3056,
917,
4913,
9797... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTeamsService_RemoveTeamRepoBySlug(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
mux.HandleFunc("/orgs/org/teams/slug/repos/owner/repo", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "DELETE")
w.WriteHeader(http.StatusNoContent)
})
ctx := context.Background()
... | explode_data.jsonl/4541 | {
"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,
60669,
1860,
66843,
14597,
25243,
1359,
54968,
1155,
353,
8840,
836,
8,
341,
25291,
11,
59807,
11,
8358,
49304,
1669,
6505,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
1775,
82,
41361,
14,
38496,
2687,
43213,
49505,
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 TestHTTP_BuildingURL(t *testing.T) {
t.Parallel()
baseUrl := "http://example.com"
cases := []struct {
name string
startingUrl string
path string
queryParams string
expectedURL string
}{
{
"one of each",
baseUrl,
`"one"`,
`"firstKey=firstVal"`,
"http://example.com/one?... | explode_data.jsonl/36143 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 939
} | [
2830,
3393,
9230,
96686,
287,
3144,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
24195,
2864,
1669,
330,
1254,
1110,
8687,
905,
1837,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
21375,
287,
2864,
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 |
func TestPluginErrorNoResult(t *testing.T) {
ctx := context.Background()
manager, _ := plugins.New(nil, "test-instance-id", inmem.New())
backend := &testPlugin{}
manager.Register("test_plugin", backend)
config, err := ParseConfig([]byte(`{"plugin": "test_plugin"}`), nil, []string{"test_plugin"})
if err != nil {... | explode_data.jsonl/2169 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 250
} | [
2830,
3393,
11546,
1454,
2753,
2077,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
92272,
11,
716,
1669,
17215,
7121,
27907,
11,
330,
1944,
73655,
12897,
497,
304,
10536,
7121,
12367,
197,
20942,
1669,
609,
1944,
11546,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConditions(t *testing.T) {
cases := []struct {
in WhereConditions
source string
tags map[string]string
fields map[string]interface{}
pass bool
}{
{ // multi conditions
fields: map[string]interface{}{"a": int64(2), "c": "xyz"},
in: WhereConditions{
&WhereCondition{
condition... | explode_data.jsonl/57795 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1389
} | [
2830,
3393,
35435,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
17430,
257,
10967,
35435,
198,
197,
47418,
914,
198,
197,
3244,
2032,
256,
2415,
14032,
30953,
198,
197,
55276,
2415,
14032,
31344,
16094,
197,
414... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTagCreation(t *testing.T) {
blame := blameutils.SetupBlame(t)
t.Run("GitOrgTagCreation", func(t *testing.T) {
tag := GitOrgTag{}
valueTag := EvaluateTag(t, &tag, blame)
assert.Equal(t, "git_org", valueTag.GetKey())
assert.Equal(t, blameutils.Org, valueTag.GetValue())
})
t.Run("GitRepoTagCreation",... | explode_data.jsonl/75476 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 874
} | [
2830,
3393,
5668,
32701,
1155,
353,
8840,
836,
8,
341,
96421,
373,
1669,
18555,
6031,
39820,
4923,
373,
1155,
340,
3244,
16708,
445,
46562,
42437,
5668,
32701,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
60439,
1669,
21120,
42437,
566... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewBoltDB(t *testing.T) {
testdb, err = NewBoltDB("test.db")
if err != nil {
t.Fatalf("Could not create/open database file. %v", err)
}
} | explode_data.jsonl/51081 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
3564,
33,
6181,
3506,
1155,
353,
8840,
836,
8,
341,
18185,
1999,
11,
1848,
284,
1532,
33,
6181,
3506,
445,
1944,
7076,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
12895,
537,
1855,
37644,
4625,
1034,
13,
1018,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestNodeListH(t *testing.T) {
stg, _ := storage.Get("mock")
envs.Get().SetStorage(stg)
viper.Set("verbose", 0)
var (
n1 = getNodeAsset("test1", "", true)
n2 = getNodeAsset("test2", "", false)
nl = types.NewNodeList()
)
nl.Items = append(nl.Items, &n1)
nl.Items = append(nl.Items, &n2)
v, err := v1... | explode_data.jsonl/47394 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 885
} | [
2830,
3393,
1955,
852,
39,
1155,
353,
8840,
836,
8,
1476,
18388,
70,
11,
716,
1669,
5819,
2234,
445,
16712,
1138,
57538,
82,
2234,
1005,
1649,
5793,
5895,
70,
340,
5195,
12858,
4202,
445,
14883,
497,
220,
15,
692,
2405,
2399,
197,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHeaderStorage(t *testing.T) {
db := NewMemoryDatabase()
// Create a test header to move around the database and make sure it's really new
header := &model.Header{Number: big.NewInt(42), Extra: []byte("test header"), ClaudeCtxHash: &model.ClaudeContextHash{}}
if entry := ReadHeader(db, header.Hash(), heade... | explode_data.jsonl/72779 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 446
} | [
2830,
3393,
4047,
5793,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
1532,
10642,
5988,
2822,
197,
322,
4230,
264,
1273,
4247,
311,
3271,
2163,
279,
4625,
323,
1281,
2704,
432,
594,
2167,
501,
198,
20883,
1669,
609,
2528,
15753,
90,
283... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplication_StartUnified(t *testing.T) {
factories, err := defaults.Components()
assert.Nil(t, err)
app := New(factories)
portArg := []string{
"metrics-port",
}
addresses := getMultipleAvailableLocalAddresses(t, uint(len(portArg)))
for i, addr := range addresses {
_, port, err := net.SplitHostPort... | explode_data.jsonl/63208 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 515
} | [
2830,
3393,
4988,
38056,
85379,
1155,
353,
8840,
836,
8,
341,
1166,
52893,
11,
1848,
1669,
16674,
59788,
741,
6948,
59678,
1155,
11,
1848,
692,
28236,
1669,
1532,
955,
52893,
692,
52257,
2735,
1669,
3056,
917,
515,
197,
197,
1,
43262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewUID(t *testing.T) {
uid, e := NewUID()
if e != nil {
t.Fatal(e)
}
t.Logf("length: %d, uuid: %s", len(uid), uid)
for i := 0; i < 100000; i++ {
u, _ := NewUID()
if u == uid {
t.Fatal("same uuid")
}
}
} | explode_data.jsonl/37080 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
3564,
6463,
1155,
353,
8840,
836,
8,
341,
197,
2423,
11,
384,
1669,
1532,
6463,
2822,
743,
384,
961,
2092,
341,
197,
3244,
26133,
2026,
340,
197,
630,
3244,
98954,
445,
4129,
25,
1018,
67,
11,
16040,
25,
1018,
82,
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 TestConvertRun(t *testing.T) {
tests := map[string]struct {
config common.MapStr
input beat.Event
expected beat.Event
fail bool
errContains string
}{
"missing field": {
config: common.MapStr{
"fields": []common.MapStr{
{"from": "port", "type": "integer"},
{"from"... | explode_data.jsonl/13566 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1195
} | [
2830,
3393,
12012,
6727,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
25873,
414,
4185,
10104,
2580,
198,
197,
22427,
981,
9382,
6904,
198,
197,
42400,
262,
9382,
6904,
198,
197,
63052,
286,
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... | 5 |
func TestValidateS3BucketLifecycleStorageClass(t *testing.T) {
validStorageClass := []string{
"STANDARD_IA",
"GLACIER",
}
for _, v := range validStorageClass {
_, errors := validateS3BucketLifecycleStorageClass(v, "storage_class")
if len(errors) != 0 {
t.Fatalf("%q should be valid storage class: %q", v, ... | explode_data.jsonl/78575 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 234
} | [
2830,
3393,
17926,
50,
18,
36018,
62731,
5793,
1957,
1155,
353,
8840,
836,
8,
341,
56322,
5793,
1957,
1669,
3056,
917,
515,
197,
197,
1,
784,
38635,
87490,
756,
197,
197,
1,
3825,
1706,
16289,
756,
197,
630,
2023,
8358,
348,
1669,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestURLString(t *testing.T) {
testCases := map[string]struct {
t *URL
want string
}{
"nil": {},
"empty": {
t: &URL{},
want: "",
},
"relative": {
t: &URL{Path: "/path/to/something"},
want: "/path/to/something",
},
"nopath": {
t: HTTPS("foo"),
want: "https://foo",
},... | explode_data.jsonl/71960 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 400
} | [
2830,
3393,
3144,
703,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
3244,
262,
353,
3144,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
79925,
788,
14573,
197,
197,
1,
3194,
788,
341,
298,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestFormProps(t *testing.T) {
testUnit := dbus.UnitStatus{
Name: "test.service",
LoadState: "loaded",
ActiveState: "active",
SubState: "running",
}
testprops := Properties{
ExecMainPID: 0,
ExecMainStatus: 0,
ExecMainCode: 1,
ActiveEnterTimestamp: 15718501290000... | explode_data.jsonl/79843 | {
"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,
1838,
5992,
1155,
353,
8840,
836,
8,
341,
18185,
4562,
1669,
73696,
25159,
2522,
515,
197,
21297,
25,
286,
330,
1944,
5736,
756,
197,
197,
5879,
1397,
25,
256,
330,
15589,
756,
197,
197,
5728,
1397,
25,
330,
3028,
756,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDocMarshal(t *testing.T) {
result, err := Marshal(docData)
if err != nil {
t.Fatal(err)
}
if !bytes.Equal(result, marshalTestToml) {
t.Errorf("Bad marshal: expected\n-----\n%s\n-----\ngot\n-----\n%s\n-----\n", marshalTestToml, result)
}
} | explode_data.jsonl/46306 | {
"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,
9550,
55438,
1155,
353,
8840,
836,
8,
341,
9559,
11,
1848,
1669,
35667,
19153,
1043,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
743,
753,
9651,
12808,
4456,
11,
60771,
2271,
24732,
75,
8,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSafePerfGroupLeaderMap(t *testing.T) {
sm := safePerfGroupLeaderMap{}
_, p := sm.lookup(8)
equals(t, false, p)
sm.removeInPlace(map[uint64]struct{}{1: struct{}{}, 2: struct{}{}, 3: struct{}{}})
equals(t, 0, len(sm.getMap()))
sm.remove(map[uint64]struct{}{1: struct{}{}, 2: struct{}{}, 3: struct{}{}})
e... | explode_data.jsonl/17389 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 655
} | [
2830,
3393,
25663,
3889,
69,
2808,
52621,
2227,
1155,
353,
8840,
836,
8,
341,
72023,
1669,
6092,
3889,
69,
2808,
52621,
2227,
16094,
197,
6878,
281,
1669,
1525,
39937,
7,
23,
340,
197,
7176,
1155,
11,
895,
11,
281,
692,
72023,
4850,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetURLParameters(t *testing.T) {
mainRouter := Router{}
postsRouter := Router{}
bag := newURLParameterBag(2)
bag.add("id", "100")
bag.add("name", "dummy")
f := assertRequestHasParameterHandler(t, bag)
_ = mainRouter.Register(http.MethodGet, "/path1/{id}/{name:[a-z]{1,5}}", f)
bag2 := newURLParameterB... | explode_data.jsonl/31720 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 517
} | [
2830,
3393,
1949,
3144,
9706,
1155,
353,
8840,
836,
8,
341,
36641,
9523,
1669,
10554,
16094,
197,
12664,
9523,
1669,
10554,
31483,
2233,
351,
1669,
501,
3144,
4971,
12933,
7,
17,
340,
2233,
351,
1364,
445,
307,
497,
330,
16,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCalSegment(t *testing.T) {
t2, _ := ParseTimestamp("20190702", "20060102")
calc := dayCalculator
t1, _ := calc.ParseSegmentTime("20190702")
assert.Equal(t, t2, t1)
t2, _ = ParseTimestamp("201907", "200601")
calc = monthCalculator
t1, _ = calc.ParseSegmentTime("201907")
assert.Equal(t, t2, t1)
t2, _ ... | explode_data.jsonl/75705 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 198
} | [
2830,
3393,
8851,
21086,
1155,
353,
8840,
836,
8,
341,
3244,
17,
11,
716,
1669,
14775,
20812,
445,
17,
15,
16,
24,
15,
22,
15,
17,
497,
330,
17,
15,
15,
21,
15,
16,
15,
17,
1138,
1444,
16927,
1669,
1899,
55743,
198,
3244,
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 TestRedefineBuiltin(t *testing.T) {
gopClTest(t, `
func main() {
const a = append + len
}
const (
append = iota
len
)
`, `package main
const (
append = iota
len
)
func main() {
const a = append + len
}
`)
} | explode_data.jsonl/73575 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
49,
4219,
482,
33,
25628,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
22074,
2830,
1887,
368,
341,
4777,
264,
284,
8737,
488,
2422,
198,
630,
1024,
2399,
82560,
284,
81910,
198,
33111,
198,
340,
7808,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetCreateCASTemplate(t *testing.T) {
sc := &v1_storage.StorageClass{}
sc.Annotations = make(map[string]string)
tests := map[string]struct {
scCreateCASAnnotation string
scCASTypeAnnotation string
envJivaCAST string
envCStorCAST string
expectedCAST string
}{
"CAST a... | explode_data.jsonl/561 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 713
} | [
2830,
3393,
1949,
4021,
34163,
3708,
1155,
353,
8840,
836,
8,
341,
29928,
1669,
609,
85,
16,
23310,
43771,
1957,
16094,
29928,
91172,
284,
1281,
9147,
14032,
30953,
340,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
29928,
4021,
87516,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRoute_GetDeployment(t *testing.T) {
route := Route{}
route.deployment = "example"
got := route.GetDeployment()
if got != route.deployment {
t.Errorf("GetDeployment() = %s, want %s", got, route.deployment)
}
} | explode_data.jsonl/67781 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 87
} | [
2830,
3393,
4899,
13614,
75286,
1155,
353,
8840,
836,
8,
341,
7000,
2133,
1669,
9572,
16094,
7000,
2133,
2285,
52799,
284,
330,
8687,
698,
3174,
354,
1669,
6021,
2234,
75286,
2822,
743,
2684,
961,
6021,
2285,
52799,
341,
197,
3244,
1308... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQueryInterfaceNoParam(t *testing.T) {
assert.NoError(t, prepareEngine())
type GetVar5 struct {
Id int64 `xorm:"autoincr pk"`
Msg bool `xorm:"bit"`
}
assert.NoError(t, testEngine.Sync2(new(GetVar5)))
var data = GetVar5{
Msg: false,
}
_, err := testEngine.Insert(data)
assert.NoError(t, err)
... | explode_data.jsonl/70220 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 346
} | [
2830,
3393,
2859,
5051,
2753,
2001,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
10549,
4571,
12367,
13158,
2126,
3962,
20,
2036,
341,
197,
67211,
220,
526,
21,
19,
1565,
87,
493,
2974,
3902,
98428,
22458,
8805,
197,
197,
6611... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValueUndefined(t *testing.T) {
t.Parallel()
ctx, cancel := testAllocate(t, "form.html")
defer cancel()
var value string
err := Run(ctx, Value("foo", &value, ByID))
want := `could not retrieve attribute "value": encountered an undefined value`
got := fmt.Sprint(err)
if !strings.Contains(got, want) {
... | explode_data.jsonl/59473 | {
"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,
1130,
30571,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20985,
11,
9121,
1669,
1273,
75380,
1155,
11,
330,
627,
2564,
1138,
16867,
9121,
2822,
2405,
897,
914,
198,
9859,
1669,
6452,
7502,
11,
5162,
445,
7975,
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 TestRequireTxt(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
console.log(require('./test.txt'))
`,
"/test.txt": `This is a test.`,
},
entryPaths: []string{"/entry.js"},
options: config.Options{
Mode: config.ModeBundle,
AbsOutpu... | explode_data.jsonl/38478 | {
"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,
17959,
35629,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
4085,
2857,
788,
22074,
571,
12160,
1665,
23482,
8283,
1944,
3909... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateFromPartialFile(t *testing.T) {
partialApp :=
`metadata:
labels:
labels.local/from-file: file
labels.local/from-args: file
annotations:
annotations.local/from-file: file
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
syncPolicy:
automated:
prune: true
`
pa... | explode_data.jsonl/35664 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 443
} | [
2830,
3393,
4021,
3830,
37314,
1703,
1155,
353,
8840,
836,
8,
341,
3223,
20894,
2164,
19687,
197,
197,
63,
17637,
510,
220,
9201,
510,
262,
9201,
11033,
91106,
14203,
25,
1034,
198,
262,
9201,
11033,
91106,
12,
2116,
25,
1034,
198,
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 TestCache(t *testing.T) {
// Register the test.
NewWithT(t)
// Init dinero client.
client := NewClient(appID, "AUD", 1*time.Minute)
// Get latest forex rates.
response1, err := client.Rates.List()
if err != nil {
if strings.HasPrefix(err.Error(), setBaseNotAllowedResponsePrefix) {
t.Skipf("skipping t... | explode_data.jsonl/72017 | {
"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,
8233,
1155,
353,
8840,
836,
8,
341,
197,
322,
8451,
279,
1273,
624,
197,
3564,
2354,
51,
1155,
692,
197,
322,
15690,
65808,
2943,
624,
25291,
1669,
1532,
2959,
11462,
915,
11,
330,
61278,
497,
220,
16,
77053,
75770,
692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestInitialBoardAdvanceP1Wins(t *testing.T) {
b := InitialBoard()
b.P1.Direction = Right
b.P2.Direction = Right
w, _ := b.Advance()
assert.Equal(t, w, (Winner)(P1Wins))
} | explode_data.jsonl/7801 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
6341,
11932,
95027,
47,
16,
96186,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
4127,
11932,
2822,
2233,
1069,
16,
47282,
284,
10083,
198,
2233,
1069,
17,
47282,
284,
10083,
271,
6692,
11,
716,
1669,
293,
17865,
85,
681,
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 |
func TestCreateNewTasks(t *testing.T) {
t.Parallel()
req := &swarming.SwarmingRpcsNewTaskRequest{Name: "hello!"}
expectReq := &swarming.SwarmingRpcsTaskRequest{Name: "hello!"}
c := context.Background()
Convey(`Test fatal response`, t, func() {
service := &testService{
newTask: func(c context.Context, req *s... | explode_data.jsonl/27127 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 605
} | [
2830,
3393,
4021,
3564,
25449,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
24395,
1669,
609,
2280,
32902,
808,
86,
32902,
49,
47313,
3564,
6262,
1900,
63121,
25,
330,
14990,
8958,
532,
24952,
27234,
1669,
609,
2280,
32902,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestArrayComprehensions(t *testing.T) {
nestedTerm := `[{"x": [a[i] | xs = [{"a": ["baz", j]} | q[p]; p.a != "bar"; j = "foo"]; xs[j].a[k] = "foo"]}]`
nestedExpected := ArrayTerm(
ObjectTerm(Item(
StringTerm("x"),
ArrayComprehensionTerm(
RefTerm(VarTerm("a"), VarTerm("i")),
NewBody(
Equalit... | explode_data.jsonl/50465 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 488
} | [
2830,
3393,
1857,
1092,
30782,
4664,
1155,
353,
8840,
836,
8,
1476,
9038,
9980,
17249,
1669,
77644,
4913,
87,
788,
508,
64,
989,
60,
760,
11943,
284,
61753,
64,
788,
4383,
42573,
497,
502,
13989,
760,
2804,
11407,
5265,
281,
5849,
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... | 1 |
func TestIntegration_WriterContentType(t *testing.T) {
ctx := context.Background()
client, bucket := testConfig(ctx, t)
defer client.Close()
obj := client.Bucket(bucket).Object("content")
testCases := []struct {
content string
setType, wantType string
}{
{
content: "It was the best of times, ... | explode_data.jsonl/8903 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 521
} | [
2830,
3393,
52464,
2763,
2542,
29504,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
25291,
11,
15621,
1669,
1273,
2648,
7502,
11,
259,
340,
16867,
2943,
10421,
2822,
22671,
1669,
2943,
1785,
11152,
58934,
568,
1190,
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 TestApplyProfiles(t *testing.T) {
tests := []struct {
description string
config SkaffoldConfig
profile string
expectedConfig SkaffoldConfig
shouldErr bool
}{
{
description: "unknown profile",
config: SkaffoldConfig{},
profile: "profile",
shouldErr: true,
... | explode_data.jsonl/16739 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1863
} | [
2830,
3393,
28497,
62719,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
42407,
262,
914,
198,
197,
25873,
260,
4818,
2649,
813,
2648,
198,
197,
197,
5365,
286,
914,
198,
197,
42400,
2648,
4818,
2649,
813,
2648,
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 TestContextWithClient(t *testing.T) {
testCases := []struct {
desc string
input context.Context
expected client.Info
}{
{
desc: "no peer information, empty client",
input: context.Background(),
expected: client.Info{},
},
{
desc: "existing client with IP, no peer information... | explode_data.jsonl/80335 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 698
} | [
2830,
3393,
1972,
2354,
2959,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
257,
914,
198,
197,
22427,
262,
2266,
9328,
198,
197,
42400,
2943,
20132,
198,
197,
59403,
197,
197,
515,
298,
41653,
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... | 1 |
func TestQueryHeader1(t *testing.T) {
var token string
g := newServer(Options{
Secret: "secret123",
})
g.GET("/login", func(c *gin.Context) {
token = GetToken(c)
})
g.POST("/login", func(c *gin.Context) {
c.String(http.StatusOK, "OK")
})
r1 := request(g, requestOptions{URL: "/login"})
r2 := request(g,... | explode_data.jsonl/22731 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 252
} | [
2830,
3393,
2859,
4047,
16,
1155,
353,
8840,
836,
8,
341,
2405,
3950,
914,
198,
3174,
1669,
501,
5475,
7,
3798,
515,
197,
7568,
50856,
25,
330,
20474,
16,
17,
18,
756,
197,
8824,
3174,
17410,
4283,
3673,
497,
2915,
1337,
353,
8163,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClusterPeerURLs(t *testing.T) {
tests := []struct {
mems []*Member
wurls []string
}{
// single peer with a single address
{
mems: []*Member{
newTestMember(1, []string{"http://192.0.2.1"}, "", nil),
},
wurls: []string{"http://192.0.2.1"},
},
// single peer with a single address with... | explode_data.jsonl/52332 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 657
} | [
2830,
3393,
28678,
30888,
3144,
82,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
2109,
11852,
220,
29838,
9366,
198,
197,
6692,
20502,
3056,
917,
198,
197,
59403,
197,
197,
322,
3175,
14397,
448,
264,
3175,
2621,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSign(t *testing.T) {
message := []byte("Hello world!")
priv, err := rsa.GenerateKey(rand.Reader, 1024)
if err != nil {
t.Errorf("Failed to generate keys %s\n", err)
}
signature, err := util.Sign(message, priv)
if err != nil {
t.Errorf("Failed to sign message %s\n", err)
}
if util.VerifySignatur... | explode_data.jsonl/37607 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 239
} | [
2830,
3393,
7264,
1155,
353,
8840,
836,
8,
341,
24753,
1669,
3056,
3782,
445,
9707,
1879,
66506,
71170,
11,
1848,
1669,
68570,
57582,
1592,
37595,
47431,
11,
220,
16,
15,
17,
19,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
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 TestWriteRecord(t *testing.T) {
b := &walpb.Record{}
typ := int64(0xABCD)
d := []byte("Hello world!")
buf := new(bytes.Buffer)
e := newEncoder(buf, 0, 0)
e.encode(&walpb.Record{Type: typ, Data: d})
e.flush()
decoder := newDecoder(ioutil.NopCloser(buf))
err := decoder.decode(b)
if err != nil {
t.Errorf(... | explode_data.jsonl/36705 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 236
} | [
2830,
3393,
7985,
6471,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
609,
26397,
16650,
49959,
16094,
25314,
1669,
526,
21,
19,
7,
15,
78146,
6484,
340,
2698,
1669,
3056,
3782,
445,
9707,
1879,
22988,
26398,
1669,
501,
23158,
22622,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestStore_CreateShardSnapShot(t *testing.T) {
s := MustOpenStore()
defer s.Close()
// Create a new shard and verify that it exists.
if err := s.CreateShard("db0", "rp0", 1, true); err != nil {
t.Fatal(err)
} else if sh := s.Shard(1); sh == nil {
t.Fatalf("expected shard")
} else if di := s.DatabaseIndex... | explode_data.jsonl/44150 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
6093,
34325,
2016,
567,
61871,
36402,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
15465,
5002,
6093,
741,
16867,
274,
10421,
2822,
197,
322,
4230,
264,
501,
52069,
323,
10146,
429,
432,
6724,
624,
743,
1848,
1669,
274,
7251,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSuspendResume(t *testing.T) {
controller := newController()
wfcset := controller.wfclientset.ArgoprojV1alpha1().Workflows("")
wf := unmarshalWF(stepsTemplateParallelismLimit)
wf, err := wfcset.Create(wf)
assert.NoError(t, err)
// suspend the workflow
err = util.SuspendWorkflow(wfcset, wf.ObjectMeta.Nam... | explode_data.jsonl/54364 | {
"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,
50,
12758,
28563,
1155,
353,
8840,
836,
8,
341,
61615,
1669,
501,
2051,
741,
6692,
8316,
746,
1669,
6461,
1418,
69,
2972,
746,
18979,
45926,
73,
53,
16,
7141,
16,
1005,
6776,
38140,
31764,
6692,
69,
1669,
650,
27121,
32131... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplyStackPolicy(t *testing.T) {
stackName := "StackName"
policyPath := "./test_resources/test_stackpolicy.json"
ctx := stack_mocks.SetupContext(t, []string{"cmd", "set-stack-policy", stackName, policyPath})
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockAWSPI := stack_mocks.NewMockClou... | explode_data.jsonl/19686 | {
"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,
28497,
4336,
13825,
1155,
353,
8840,
836,
8,
341,
48227,
675,
1669,
330,
4336,
675,
698,
3223,
8018,
1820,
1669,
5924,
1944,
35569,
12697,
15528,
34790,
4323,
698,
20985,
1669,
5611,
717,
25183,
39820,
1972,
1155,
11,
3056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtractOverwrittenFile(t *testing.T) {
img, err := tarball.ImageFromPath("testdata/overwritten_file.tar", nil)
if err != nil {
t.Fatalf("Error loading image: %v", err)
}
tr := tar.NewReader(mutate.Extract(img))
for {
header, err := tr.Next()
if errors.Is(err, io.EOF) {
break
}
name := header.... | explode_data.jsonl/3087 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 220
} | [
2830,
3393,
28959,
1918,
25569,
1703,
1155,
353,
8840,
836,
8,
341,
39162,
11,
1848,
1669,
12183,
3959,
7528,
3830,
1820,
445,
92425,
14,
1975,
25569,
2458,
28048,
497,
2092,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
1454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequestRateLimit(t *testing.T) {
tc := &testTime{now: time.Now()}
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if tc.slept == 0 {
w.Header().Set("X-RateLimit-Remaining", "0")
w.Header().Set("X-RateLimit-Reset", strconv.Itoa(int(tc.now.Add(time.Second).Un... | explode_data.jsonl/6243 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 315
} | [
2830,
3393,
1900,
11564,
16527,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
609,
1944,
1462,
90,
3328,
25,
882,
13244,
23509,
57441,
1669,
54320,
70334,
7121,
13470,
1220,
2836,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_parseOutput2(t *testing.T) {
case2 := `DISK OK - free space: /root 3326 MB (56%); | /root=2643MB;5948;5958;0;5968`
expectedServiceOutput := "DISK OK - free space: /root 3326 MB (56%); "
expectedLongServiceOutput := ""
expectedServicePerfData := map[string]float64{
"/root": 2643.0,
}
serviceOutput, l... | explode_data.jsonl/8925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 191
} | [
2830,
3393,
21039,
5097,
17,
1155,
353,
8840,
836,
8,
341,
2722,
17,
1669,
1565,
21202,
42,
10402,
481,
1910,
3550,
25,
608,
2888,
220,
18,
18,
17,
21,
13339,
320,
20,
21,
4,
1215,
760,
608,
2888,
28,
17,
21,
19,
18,
8412,
26,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mjHandler_runAnalysisMajsoulMessageTask(t *testing.T) {
debugMode = true
startLo := 33020
endLo := 33369
h := &mjHandler{
majsoulMessageQueue: make(chan []byte, 1000),
majsoulRoundData: &majsoulRoundData{accountID: gameConf.MajsoulAccountID},
majsoulRecordMap: map[string]*majsoulRecordBaseIn... | explode_data.jsonl/48429 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 474
} | [
2830,
3393,
717,
73,
3050,
14007,
26573,
44,
23720,
10965,
2052,
6262,
1155,
353,
8840,
836,
8,
341,
39730,
3636,
284,
830,
271,
21375,
4262,
1669,
220,
18,
18,
15,
17,
15,
198,
6246,
4262,
1669,
220,
18,
18,
18,
21,
24,
271,
9598... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildConfig(t *testing.T) {
mockWsRoot := "/root/dir"
testCases := map[string]struct {
inBuild BuildArgsOrString
wantedBuild DockerBuildArgs
}{
"simple case: BuildString path to dockerfile": {
inBuild: BuildArgsOrString{
BuildString: aws.String("my/Dockerfile"),
},
wantedBuild: Docker... | explode_data.jsonl/79733 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1308
} | [
2830,
3393,
11066,
2648,
1155,
353,
8840,
836,
8,
341,
77333,
74733,
8439,
1669,
3521,
2888,
88226,
698,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
17430,
11066,
257,
7854,
4117,
2195,
703,
198,
197,
6692,
7566,
11066,
40549,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parseCiid(t *testing.T) {
log.SetLevel(log.TraceLevel)
A := &StdMiid{
sn: "A",
vn: "1.1",
va: "",
t: 22,
}
B := &StdMiid{
sn: "B",
vn: "1.1",
va: "",
t: 22,
}
C := &StdMiid{
sn: "C",
vn: "1.1",
va: "",
t: 22,
}
D := &StdMiid{
sn: "D",
vn: "1.1",
va: "",
t: 22,
}
... | explode_data.jsonl/64796 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2046
} | [
2830,
3393,
21039,
34,
54483,
1155,
353,
8840,
836,
8,
341,
6725,
4202,
4449,
12531,
46920,
4449,
692,
22985,
1669,
609,
22748,
41887,
307,
515,
197,
48251,
25,
330,
32,
756,
197,
5195,
77,
25,
330,
16,
13,
16,
756,
197,
53911,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetFileType(t *testing.T) {
mounter := New("fake/path")
testCase := []struct {
name string
expectedType FileType
setUp func() (string, string, error)
}{
{
"Directory Test",
FileTypeDirectory,
func() (string, string, error) {
tempDir, err := ioutil.TempDir("", "test-get-f... | explode_data.jsonl/48689 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 510
} | [
2830,
3393,
1949,
71873,
1155,
353,
8840,
836,
8,
341,
2109,
39914,
1669,
1532,
445,
30570,
50976,
5130,
18185,
4207,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
42400,
929,
93238,
198,
197,
8196,
2324,
286,
2915,
368,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCanSupport(t *testing.T) {
tmpDir, err := utiltesting.MkTmpdir("glusterfs_test")
if err != nil {
t.Fatalf("error creating temp dir: %v", err)
}
defer os.RemoveAll(tmpDir)
plugMgr := volume.VolumePluginMgr{}
plugMgr.InitPlugins(ProbeVolumePlugins(), volumetest.NewFakeVolumeHost(tmpDir, nil, nil))
plug... | explode_data.jsonl/48308 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 331
} | [
2830,
3393,
6713,
7916,
1155,
353,
8840,
836,
8,
341,
20082,
6184,
11,
1848,
1669,
4094,
8840,
1321,
74,
35986,
3741,
445,
6072,
4993,
3848,
4452,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
841,
6825,
2730,
5419,
25,
1018... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestParseOptDomainSearchList(t *testing.T) {
data := []byte{
7, 'e', 'x', 'a', 'm', 'p', 'l', 'e', 3, 'c', 'o', 'm', 0,
6, 's', 'u', 'b', 'n', 'e', 't', 7, 'e', 'x', 'a', 'm', 'p', 'l', 'e', 3, 'o', 'r', 'g', 0,
}
opt, err := ParseOptDomainSearchList(data)
require.NoError(t, err)
require.Equal(t, OptionDo... | explode_data.jsonl/53131 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 284
} | [
2830,
3393,
14463,
21367,
13636,
5890,
852,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
3056,
3782,
515,
197,
197,
22,
11,
364,
68,
516,
364,
87,
516,
364,
64,
516,
364,
76,
516,
364,
79,
516,
364,
75,
516,
364,
68,
516,
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 |
func TestDeleteNoName(t *testing.T) {
cmdArgs := []string{"delete", "groupsnapshots"}
expected := "error: at least one argument needs to be provided for groupsnapshot name"
testCommon(t, cmdArgs, nil, expected, true)
} | explode_data.jsonl/20433 | {
"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,
6435,
2753,
675,
1155,
353,
8840,
836,
8,
341,
25920,
4117,
1669,
3056,
917,
4913,
4542,
497,
330,
16753,
6861,
27634,
16707,
42400,
1669,
330,
841,
25,
518,
3245,
825,
5693,
3880,
311,
387,
3897,
369,
5203,
9601,
829,
698... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAllowsReferencedSecret(t *testing.T) {
ns := "myns"
admit := NewServiceAccount()
informerFactory := informers.NewSharedInformerFactory(nil, controller.NoResyncPeriodFunc())
admit.SetExternalKubeInformerFactory(informerFactory)
admit.LimitSecretReferences = true
admit.RequireAPIToken = false
// Add the... | explode_data.jsonl/61349 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 988
} | [
2830,
3393,
79595,
47447,
5767,
19773,
1155,
353,
8840,
836,
8,
341,
84041,
1669,
330,
76,
1872,
82,
1837,
98780,
1763,
1669,
1532,
1860,
7365,
741,
17430,
34527,
4153,
1669,
6051,
388,
7121,
16997,
641,
34527,
4153,
27907,
11,
6461,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestList_Run(t *testing.T) {
ctrl := gomock.NewController(t)
mockStore := mocks.NewMockProjectUsersLister(ctrl)
defer ctrl.Finish()
var expected []mongodbatlas.AtlasUser
listOpts := &ListOpts{
store: mockStore,
}
mockStore.
EXPECT().
ProjectUsers(listOpts.ProjectID, listOpts.NewListOptions()).
Re... | explode_data.jsonl/46219 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 177
} | [
2830,
3393,
852,
84158,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
77333,
6093,
1669,
68909,
7121,
11571,
7849,
7137,
852,
261,
62100,
340,
16867,
23743,
991,
18176,
2822,
2405,
3601,
3056,
71155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDomainList(t *testing.T) {
args := testutil.Args
scenarios := []testutil.TestScenario{
{
Args: args("domain list --service-id 123 --version 1"),
API: mock.API{
ListVersionsFn: testutil.ListVersions,
ListDomainsFn: listDomainsOK,
},
WantOutput: listDomainsShortOutput,
},
{
Args: ... | explode_data.jsonl/17440 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 741
} | [
2830,
3393,
13636,
852,
1155,
353,
8840,
836,
8,
341,
31215,
1669,
1273,
1314,
51015,
198,
29928,
60494,
1669,
3056,
1944,
1314,
8787,
54031,
515,
197,
197,
515,
298,
197,
4117,
25,
2827,
445,
12204,
1140,
1177,
7936,
12897,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMessageExportSetDefaultsExportEnabledExportFromTimestampNil(t *testing.T) {
// Test retained as protection against regression of MM-13185
mes := &MessageExportSettings{
EnableExport: NewBool(true),
}
mes.SetDefaults()
require.True(t, *mes.EnableExport)
require.Equal(t, "01:00", *mes.DailyRunTime)
req... | explode_data.jsonl/50691 | {
"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,
2052,
16894,
1649,
16273,
16894,
5462,
16894,
3830,
20812,
19064,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
34263,
438,
9135,
2348,
30549,
315,
21665,
12,
16,
18,
16,
23,
20,
198,
2109,
288,
1669,
609,
2052,
16894,
608... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconnectOFSwitch(t *testing.T) {
br := "br07"
err := PrepareOVSBridge(br)
require.Nil(t, err, fmt.Sprintf("Failed to prepare OVS bridge: %v", err))
defer DeleteOVSBridge(br)
bridge := binding.NewOFBridge(br)
reconnectCh := make(chan struct{})
var connectCount int
go func() {
for range reconnectCh {... | explode_data.jsonl/23788 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 376
} | [
2830,
3393,
693,
6459,
46,
8485,
5539,
1155,
353,
8840,
836,
8,
341,
80255,
1669,
330,
1323,
15,
22,
698,
9859,
1669,
31166,
38957,
16680,
11183,
41237,
340,
17957,
59678,
1155,
11,
1848,
11,
8879,
17305,
445,
9408,
311,
10549,
506,
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 TestRemoveSubAddressing_Normalize(t *testing.T) {
tests := []struct {
tags map[string]string
email string
want string
}{
{
tags: map[string]string{"email.com": "+"},
email: "a@email.com",
want: "a@email.com",
},
{
tags: map[string]string{"email.com": "+"},
email: "a+b+c@email.com"... | explode_data.jsonl/57366 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 420
} | [
2830,
3393,
13021,
3136,
4286,
287,
74900,
551,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
3244,
2032,
220,
2415,
14032,
30953,
198,
197,
57549,
914,
198,
197,
50780,
220,
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... | 2 |
func TestPolicySafeToEvict(t *testing.T) {
ctx := context.Background()
tests := []struct {
name string
podSpec corev1.PodSpec
annotations map[string]string
violations int
}{
{
name: "allow with annotation and volume",
violations: 0,
podSpec: corev1.PodSpec{
Volumes: []corev1... | explode_data.jsonl/71772 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1142
} | [
2830,
3393,
13825,
25663,
1249,
34112,
849,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
3223,
347,
8327,
257,
6200,
85,
16,
88823,
8327,
198,
197,
197,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateCron(t *testing.T) {
testCases := map[string]struct {
input string
shouldPass bool
}{
"valid cron expression": {
input: "* * * * *",
shouldPass: true,
},
"invalid cron": {
input: "* * * * ? *",
shouldPass: false,
},
"valid schedule descriptor": {
input: ... | explode_data.jsonl/34554 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 401
} | [
2830,
3393,
17926,
34,
2248,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
22427,
414,
914,
198,
197,
197,
5445,
12187,
1807,
198,
197,
59403,
197,
197,
1,
1891,
46582,
7493,
788,
341,
298,
22427,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLabelShardedMetaFilter_Filter_Basic(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
defer cancel()
relabelContentYaml := `
- action: drop
regex: "A"
source_labels:
- cluster
- action: keep
regex: "keepme"
source_labels:
-... | explode_data.jsonl/67636 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 709
} | [
2830,
3393,
2476,
2016,
20958,
12175,
5632,
68935,
1668,
5971,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
220,
16,
17,
15,
77053,
32435,
340,
16867,
9121,
2822,
17200,
1502,
2762,
56,
9467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCancelRetry(t *testing.T) {
sr := &snowflakeRestful{
TokenAccessor: getSimpleTokenAccessor(),
FuncPost: postTestQueryNotExecuting,
FuncCancelQuery: cancelTestRetry,
}
ctx := context.Background()
err := cancelQuery(ctx, sr, getOrGenerateRequestIDFromContext(ctx), time.Second)
if err != nil {... | explode_data.jsonl/44749 | {
"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,
9269,
51560,
1155,
353,
8840,
836,
8,
341,
1903,
81,
1669,
609,
74478,
63456,
12416,
1262,
515,
197,
33299,
29889,
25,
256,
633,
16374,
3323,
29889,
3148,
197,
197,
9626,
4133,
25,
286,
1736,
2271,
2859,
2623,
51853,
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... | 2 |
func TestBuildInvalidTarget(t *testing.T) {
folder := testlib.Mktmp(t)
writeGoodMain(t, folder)
target := "linux"
config := config.Project{
Builds: []config.Build{
{
ID: "foo",
Binary: "foo",
Targets: []string{target},
},
},
}
ctx := context.New(config)
ctx.Git.CurrentTag = "5.6.7"
b... | explode_data.jsonl/54145 | {
"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,
11066,
7928,
6397,
1155,
353,
8840,
836,
8,
341,
1166,
2018,
1669,
1273,
2740,
1321,
74,
5173,
1155,
340,
24945,
15216,
6202,
1155,
11,
8527,
340,
28861,
1669,
330,
14210,
698,
25873,
1669,
2193,
30944,
515,
197,
197,
11066,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLDSIngressRouteOutsideRootNamespaces(t *testing.T) {
rh, cc, done := setup(t, func(reh *contour.ResourceEventHandler) {
reh.IngressRouteRootNamespaces = []string{"roots"}
})
defer done()
// assert that there is only a static listener
assertEqual(t, &v2.DiscoveryResponse{
VersionInfo: "0",
Resources... | explode_data.jsonl/22828 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 483
} | [
2830,
3393,
43,
5936,
641,
2483,
4899,
41365,
8439,
7980,
27338,
1155,
353,
8840,
836,
8,
341,
7000,
71,
11,
12527,
11,
2814,
1669,
6505,
1155,
11,
2915,
5801,
71,
353,
772,
413,
20766,
17945,
8,
341,
197,
197,
11063,
5337,
2483,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_getMods(t *testing.T) {
if strings.Join(getMods(781), "") != "[NoFail TouchDevice Hidden HalfTime]" {
t.Fatal("Expected \"[NoFail TouchDevice Hidden HalfTime]\" but got \"" + strings.Join(getMods(781), "") + "\".")
}
} | explode_data.jsonl/66164 | {
"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,
3062,
81500,
1155,
353,
8840,
836,
8,
341,
743,
9069,
22363,
5433,
81500,
7,
22,
23,
16,
701,
11700,
961,
10545,
2753,
19524,
19338,
6985,
34242,
25839,
1462,
19177,
341,
197,
3244,
26133,
445,
18896,
7245,
58,
2753,
19524,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInference(t *testing.T) {
log.SetLogLevel(logger.DebugLevel)
act := NewActivity(getActivityMetadata())
tc := test.NewTestActivityContext(getActivityMetadata())
var data interface{}
_ = json.Unmarshal([]byte("{\"device\":\"RESTDevice\",\"gateway\":\"HelloWorldGroup\",\"id\":\"fa9f3c8d-e4ec-4d48-b6f0-def1... | explode_data.jsonl/70799 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2191
} | [
2830,
3393,
641,
2202,
1155,
353,
8840,
836,
8,
341,
6725,
4202,
72676,
37833,
20345,
4449,
692,
92699,
1669,
1532,
4052,
32090,
14610,
2398,
78255,
1669,
1273,
7121,
2271,
4052,
1972,
32090,
14610,
12367,
2405,
821,
3749,
16094,
197,
62,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_addOnEmpty(t *testing.T) {
dir, err := ioutil.TempDir("", "")
if err != nil {
t.Fatal(err)
}
if err := os.RemoveAll(dir); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(dir)
sshConfig := filepath.Join(dir, "config")
if err := add(sshConfig, "test.okteto", model.Localhost, 8080); err != nil {
... | explode_data.jsonl/53873 | {
"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,
2891,
1925,
3522,
1155,
353,
8840,
836,
8,
341,
48532,
11,
1848,
1669,
43144,
65009,
6184,
19814,
14676,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
743,
1848,
1669,
2643,
84427,
14161,
1215,
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... | 7 |
func TestParseExpressions(t *testing.T) {
for _, test := range testExpr {
t.Run(test.input, func(t *testing.T) {
expr, err := ParseExpr(test.input)
// Unexpected errors are always caused by a bug.
require.NotEqual(t, err, errUnexpected, "unexpected error occurred")
if !test.fail {
require.NoError(t... | explode_data.jsonl/3392 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 459
} | [
2830,
3393,
14463,
40315,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
1273,
16041,
341,
197,
3244,
16708,
8623,
10046,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
8122,
649,
11,
1848,
1669,
14775,
16041,
8623,
10046,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListArtifact(t *testing.T) {
ctx := context.Background()
datastore := createInmemoryDataStore(t, mockScope.NewTestScope())
testStoragePrefix, err := datastore.ConstructReference(ctx, datastore.GetBaseContainerFQN(ctx), "test")
assert.NoError(t, err)
dcRepo := &mocks.DataCatalogRepo{
MockDatasetRepo: &... | explode_data.jsonl/20014 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2351
} | [
2830,
3393,
852,
85578,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
8924,
4314,
1669,
1855,
641,
17269,
1043,
6093,
1155,
11,
7860,
10803,
7121,
2271,
10803,
2398,
18185,
5793,
14335,
11,
1848,
1669,
64986,
4801,
1235,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_packetConnLocalAddr(t *testing.T) {
deadbeefHW := net.HardwareAddr{0xde, 0xad, 0xbe, 0xef, 0xde, 0xad}
p := &packetConn{
ifi: &net.Interface{
HardwareAddr: deadbeefHW,
},
}
if want, got := deadbeefHW, p.LocalAddr().(*Addr).HardwareAddr; !bytes.Equal(want, got) {
t.Fatalf("unexpected hardware ad... | explode_data.jsonl/35214 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
21078,
9701,
7319,
13986,
1155,
353,
8840,
836,
8,
341,
197,
33754,
1371,
823,
38252,
1669,
4179,
3839,
37750,
13986,
90,
15,
56185,
11,
220,
15,
55254,
11,
220,
15,
42459,
11,
220,
15,
47510,
11,
220,
15,
56185,
11,
220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRESTClientPodCPU(t *testing.T) {
targetTimestamp := 1
window := 30 * time.Second
tc := restClientTestCase{
desiredMetricValues: PodMetricsInfo{
"test-pod-0": {Value: 5000, Timestamp: offsetTimestampBy(targetTimestamp), Window: window},
"test-pod-1": {Value: 5000, Timestamp: offsetTimestampBy(targetT... | explode_data.jsonl/64897 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 251
} | [
2830,
3393,
38307,
2959,
23527,
31615,
1155,
353,
8840,
836,
8,
341,
28861,
20812,
1669,
220,
16,
198,
23545,
1669,
220,
18,
15,
353,
882,
32435,
198,
78255,
1669,
2732,
2959,
16458,
515,
197,
52912,
2690,
54310,
6227,
25,
16821,
27328,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTx_ChangeToAddress(t *testing.T) {
t.Run("missing address and nil fees", func(t *testing.T) {
tx := bt.NewTx()
assert.NotNil(t, tx)
err := tx.From(
"07912972e42095fe58daaf09161c5a5da57be47c2054dc2aaa52b30fefa1940b",
0,
"76a914af2590a45ae401651fdbdf59a76ad43d1862534088ac",
4000000)
assert.N... | explode_data.jsonl/28744 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 690
} | [
2830,
3393,
31584,
27588,
844,
1249,
4286,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
30616,
2621,
323,
2092,
12436,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
46237,
1669,
19592,
7121,
31584,
741,
197,
6948,
93882,
1155,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFallbackSCSV(t *testing.T) {
test := &serverTest{
name: "FallbackSCSV",
// OpenSSL 1.0.1j is needed for the -fallback_scsv option.
command: []string{"openssl", "s_client", "-fallback_scsv"},
expectHandshakeErrorIncluding: "inppropriate protocol fallback",
}
runServerTestTLS11(t, test)
} | explode_data.jsonl/80567 | {
"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,
87206,
3540,
17803,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
609,
4030,
2271,
515,
197,
11609,
25,
330,
87206,
3540,
17803,
756,
197,
197,
322,
65617,
220,
16,
13,
15,
13,
16,
73,
374,
4362,
369,
279,
481,
73311,
13171... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddParagraph(t *testing.T) {
doc := document.New()
if len(doc.Paragraphs()) != 0 {
t.Errorf("expected 0 paragraphs, got %d", len(doc.Paragraphs()))
}
doc.AddParagraph()
if len(doc.Paragraphs()) != 1 {
t.Errorf("expected 1 paragraphs, got %d", len(doc.Paragraphs()))
}
doc.AddParagraph()
if len(doc.P... | explode_data.jsonl/61207 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
2212,
42165,
1155,
353,
8840,
836,
8,
341,
59536,
1669,
2197,
7121,
741,
743,
2422,
19153,
41288,
9216,
82,
2140,
961,
220,
15,
341,
197,
3244,
13080,
445,
7325,
220,
15,
42643,
11,
2684,
1018,
67,
497,
2422,
19153,
41288,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestComponentManager_NoCallStopIfNoCallStart(t *testing.T) {
c := Component3{}
cm := Manager{}
cm.Inject(&c)
err := cm.Stop(context.Background())
require.NoError(t, err)
require.False(t, c.stopped)
require.False(t, c.started)
err = cm.Start(context.Background())
require.NoError(t, err)
require.False(t, ... | explode_data.jsonl/35608 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
2189,
2043,
36989,
7220,
10674,
2679,
2753,
7220,
3479,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
5578,
18,
16094,
98316,
1669,
10567,
16094,
98316,
41046,
2099,
66,
340,
9859,
1669,
9961,
30213,
5378,
19047,
2398,
17957,
3569... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadArtifact_WorkflowNoStatus_NotFound(t *testing.T) {
store, manager, job := initWithJob(t)
defer store.Close()
// report workflow
workflow := util.NewWorkflow(&v1alpha1.Workflow{
ObjectMeta: v1.ObjectMeta{
Name: "MY_NAME",
Namespace: "MY_NAMESPACE",
UID: "run... | explode_data.jsonl/28399 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 365
} | [
2830,
3393,
4418,
85578,
87471,
4965,
2753,
2522,
60816,
6650,
1155,
353,
8840,
836,
8,
341,
57279,
11,
6645,
11,
2618,
1669,
13864,
12245,
1155,
340,
16867,
3553,
10421,
741,
197,
322,
1895,
28288,
198,
197,
56249,
1669,
4094,
7121,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestURLTemplate(t *testing.T) {
testcases := []struct {
name string
jobType prowapi.ProwJobType
org string
repo string
job string
build string
expect string
k8sOnly bool
}{
{
name: "k8s presubmit",
jobType: prowapi.PresubmitJob,
org: "kubernetes",
repo: "k... | explode_data.jsonl/55572 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1895
} | [
2830,
3393,
3144,
7275,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
68577,
929,
47558,
2068,
1069,
651,
12245,
929,
198,
197,
87625,
257,
914,
198,
197,
17200,
5368,
262,
914,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestEncode(t *testing.T) {
for _, p := range pairs {
buf := make([]byte, StdEncoding.EncodedLen(len(p.decoded)))
StdEncoding.Encode(buf, []byte(p.decoded))
testEqual(t, "Encode(%q) = %q, want %q", p.decoded, string(buf), p.encoded)
}
} | explode_data.jsonl/43938 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
32535,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
281,
1669,
2088,
13530,
341,
197,
26398,
1669,
1281,
10556,
3782,
11,
42517,
14690,
26598,
6737,
11271,
6901,
1295,
28020,
6737,
5929,
197,
197,
22748,
14690,
50217,
10731,
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 TestRequirementConstructor(t *testing.T) {
requirementConstructorTests := []struct {
Key string
Op Operator
Vals sets.String
Success bool
}{
{"x", InOperator, nil, false},
{"x", NotInOperator, sets.NewString(), false},
{"x", InOperator, sets.NewString("foo"), true},
{"x", NotInOperato... | explode_data.jsonl/66796 | {
"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,
75802,
13288,
1155,
353,
8840,
836,
8,
341,
17957,
478,
13288,
18200,
1669,
3056,
1235,
341,
197,
55242,
257,
914,
198,
197,
197,
7125,
414,
28498,
198,
197,
17446,
1127,
262,
7289,
6431,
198,
197,
197,
7188,
1807,
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... | 6 |
func TestNamespaceIndexHighConcurrentQueriesWithoutTimeouts(t *testing.T) {
testNamespaceIndexHighConcurrentQueries(t,
testNamespaceIndexHighConcurrentQueriesOptions{
withTimeouts: false,
})
} | explode_data.jsonl/34830 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 65
} | [
2830,
3393,
22699,
1552,
11976,
1109,
3231,
55261,
26040,
7636,
82,
1155,
353,
8840,
836,
8,
341,
18185,
22699,
1552,
11976,
1109,
3231,
55261,
1155,
345,
197,
18185,
22699,
1552,
11976,
1109,
3231,
55261,
3798,
515,
298,
46948,
7636,
82,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestThresholdIsCorrectlyCalledForCount(t *testing.T) {
count := getMockCount(t)
for i := 0; i < 10; i++ {
count.Increment()
}
count.ThresholdedResult(20) // will fail if parameters are wrong
} | explode_data.jsonl/57753 | {
"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,
37841,
3872,
33092,
398,
20960,
2461,
2507,
1155,
353,
8840,
836,
8,
341,
18032,
1669,
633,
11571,
2507,
1155,
340,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
26,
600,
1027,
341,
197,
18032,
5337,
13477,
741,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrFlows(t *testing.T) {
bldr := &nop.Builder{Err: errors.New("not okay")}
expectedErrEventMsg := "Warning BuildExecuteFailed Failed to execute Build"
build := newBuild("test")
f := &fixture{
t: t,
objects: []runtime.Object{build},
kubeobjects: nil,
client: fake.NewSimpleClients... | explode_data.jsonl/30873 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 400
} | [
2830,
3393,
7747,
3882,
4241,
1155,
353,
8840,
836,
8,
341,
2233,
72377,
1669,
609,
62813,
15641,
90,
7747,
25,
5975,
7121,
445,
1921,
16910,
42132,
42400,
7747,
1556,
6611,
1669,
330,
12087,
7854,
17174,
9408,
21379,
311,
9026,
7854,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCollisionSystemAddByInterface(t *testing.T) {
engo.Mailbox = &engo.MessageManager{}
sys := &CollisionSystem{}
sys.New(nil)
phys := &PhysicsSystem{VelocityIterations: 3, PositionIterations: 8}
basic := ecs.NewBasic()
space := common.SpaceComponent{
Width: 10,
Height: 10,
}
entityBodyDef := box2d.... | explode_data.jsonl/58614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 470
} | [
2830,
3393,
32280,
2320,
2212,
1359,
5051,
1155,
353,
8840,
836,
8,
341,
197,
64653,
73103,
2011,
284,
609,
64653,
8472,
2043,
16094,
41709,
1669,
609,
32280,
2320,
16094,
41709,
7121,
27907,
692,
197,
41205,
1669,
609,
33899,
2320,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCountWithSample(t *testing.T) {
result := (&Metric{
Name: "test",
Value: 1.11111,
Type: Counter,
SampleRate: 0.33,
}).String()
if expected := "test:1.11111|c|@0.33"; expected != result {
t.Errorf("metric string is different.\nExpected: \"%s\".\n Got: \"%s\"", expected, result... | explode_data.jsonl/14847 | {
"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,
2507,
2354,
17571,
1155,
353,
8840,
836,
8,
341,
9559,
1669,
15899,
54310,
515,
197,
21297,
25,
981,
330,
1944,
756,
197,
47399,
25,
414,
220,
16,
13,
16,
16,
16,
16,
16,
345,
197,
27725,
25,
981,
19735,
345,
197,
7568... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStartStop(t *testing.T) {
n := New("teststartstop", lookupFunc)
n.Start()
if err := n.Stop(); err != nil {
t.Fatalf("Address Manager failed to stop: %v", err)
}
} | explode_data.jsonl/26474 | {
"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,
3479,
10674,
1155,
353,
8840,
836,
8,
341,
9038,
1669,
1532,
445,
1944,
2468,
9495,
497,
18615,
9626,
340,
9038,
12101,
741,
743,
1848,
1669,
308,
30213,
2129,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
4286,
10567,
4641,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRetryPolicySuccessNoDownload(t *testing.T) {
srv, close := mock.NewServer()
defer close()
srv.SetResponse(mock.WithStatusCode(http.StatusOK), mock.WithBody([]byte("response body")))
pl := NewPipeline(srv, NewRetryPolicy(nil))
req, err := NewRequest(context.Background(), http.MethodGet, srv.URL())
if err ... | explode_data.jsonl/24389 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
51560,
13825,
7188,
2753,
11377,
1155,
353,
8840,
836,
8,
341,
1903,
10553,
11,
3265,
1669,
7860,
7121,
5475,
741,
16867,
3265,
741,
1903,
10553,
4202,
2582,
30389,
26124,
15872,
19886,
52989,
701,
7860,
26124,
5444,
10556,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBot_LogOut(t *testing.T) {
type fields struct {
Configuration Configuration
apiClient apiClient
BotUser User
messageMHs []matcherHandler
editedMessageMHs []matcherHandler
channelPostMHs []matcherHandler
editedChannelPostMHs []matcherHandl... | explode_data.jsonl/46085 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 846
} | [
2830,
3393,
23502,
44083,
2662,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
7688,
260,
12221,
198,
197,
54299,
2959,
1797,
6330,
2959,
198,
197,
12791,
354,
1474,
2290,
2657,
198,
197,
24753,
48202,
82,
310,
3056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.