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 TestLibraryVariableSetAddGetAndDelete(t *testing.T) {
libraryVariableSet := createTestLibraryVariableSet(t, getRandomName())
defer cleanLibraryVariableSet(t, libraryVariableSet.ID)
getLibraryVariableSet, err := client.LibraryVariableSet.Get(libraryVariableSet.ID)
assert.Nil(t, err, "there was an error raised ... | explode_data.jsonl/65965 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
16915,
7827,
1649,
2212,
1949,
3036,
6435,
1155,
353,
8840,
836,
8,
341,
197,
18065,
7827,
1649,
1669,
1855,
2271,
16915,
7827,
1649,
1155,
11,
52436,
675,
2398,
16867,
4240,
16915,
7827,
1649,
1155,
11,
6733,
7827,
1649,
99... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExpiredGet(t *testing.T) {
fakeClock := clock.NewFakeClock(time.Now())
c := NewLRUExpireCacheWithClock(10, fakeClock)
c.Add("short-lived", "12345", 1*time.Millisecond)
// ensure the entry expired
fakeClock.Step(2 * time.Millisecond)
expectNotEntry(t, c, "short-lived")
} | explode_data.jsonl/44519 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
54349,
1949,
1155,
353,
8840,
836,
8,
341,
1166,
726,
26104,
1669,
8866,
7121,
52317,
26104,
9730,
13244,
2398,
1444,
1669,
1532,
20117,
52,
8033,
554,
8233,
2354,
26104,
7,
16,
15,
11,
12418,
26104,
340,
1444,
1904,
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 TestDriver(t *testing.T) {
// Create a new context
ctx := context.Background() // nolint staticcheck
// TODO: add test
t.SkipNow()
// Init logger
conf := logger.Configuration{}
log, err := logger.NewLogger(logger.Zap, conf)
if err != nil {
assert.Nil(t, err, "Error init a logger")
t.Fatal()
}
sock... | explode_data.jsonl/67191 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 490
} | [
2830,
3393,
11349,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
264,
501,
2266,
198,
20985,
1669,
2266,
19047,
368,
442,
308,
337,
396,
1099,
2028,
271,
197,
322,
5343,
25,
912,
1273,
198,
3244,
57776,
7039,
2822,
197,
322,
15690,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMutatorCreateOrReplace(t *testing.T) {
defaultCtx := testutil.NewContext(
testutil.ContextWithNamespace("default"),
)
badMut := types.FixtureMutator("bad")
badMut.Name = "!@#!#$@#^$%&$%&$&$%&%^*%&(%@###"
tests := []struct {
name string
ctx context.Context
argument *... | explode_data.jsonl/12866 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 757
} | [
2830,
3393,
51440,
850,
4021,
2195,
23107,
1155,
353,
8840,
836,
8,
341,
11940,
23684,
1669,
1273,
1314,
7121,
1972,
1006,
197,
18185,
1314,
9328,
2354,
22699,
445,
2258,
4461,
197,
692,
2233,
329,
51440,
1669,
4494,
991,
12735,
51440,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResetMatch(t *testing.T) {
scenario := NewInMemoryScenarioStore()
comparator := payload.NewDefaultComparator()
tester := NewTester(comparator, scenario)
msr := NewInMemoryTransactionStore(tester, 10)
m1 := Transaction{Request: &mock.Request{Host: "TEST1"}}
msr.Save(m1)
m2 := Transaction{Request: &mock... | explode_data.jsonl/44245 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 325
} | [
2830,
3393,
14828,
8331,
1155,
353,
8840,
836,
8,
1476,
29928,
20413,
1669,
1532,
641,
10642,
54031,
6093,
741,
32810,
12356,
1669,
7729,
7121,
3675,
38658,
741,
18185,
261,
1669,
1532,
58699,
14094,
12356,
11,
15048,
692,
47691,
81,
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... | 5 |
func TestAccKeycloakOpenidClientOptionalScopes_validateDuplicateScopeAssignment(t *testing.T) {
realm := "terraform-realm-" + acctest.RandString(10)
client := "terraform-client-" + acctest.RandString(10)
clientScope := "terraform-client-scope-" + acctest.RandString(10)
defaultClientScopes := append(preAssignedDefa... | explode_data.jsonl/31492 | {
"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,
14603,
1592,
88751,
5002,
307,
2959,
15309,
3326,
18523,
42681,
53979,
10803,
41613,
1155,
353,
8840,
836,
8,
341,
17200,
7673,
1669,
330,
61385,
5504,
7673,
27651,
488,
1613,
67880,
2013,
437,
703,
7,
16,
15,
340,
25291,
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 TestStateTimestamp_ProposalNotMatch(t *testing.T) {
config := configSetup(t)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
cs1, vss := makeState(ctx, t, makeStateArgs{config: config})
height, round := cs1.Height, cs1.Round
vs2, vs3, vs4 := vss[1], vss[2], vss[3]
proposalCh := subs... | explode_data.jsonl/54296 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 620
} | [
2830,
3393,
1397,
20812,
1088,
887,
32556,
2623,
8331,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
2193,
21821,
1155,
340,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
2822,
71899,
16,
11,
348,
778,
1669,
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 TestLogoutIfRevokedNoop(t *testing.T) {
tc := SetupEngineTest(t, "rev")
defer tc.Cleanup()
u := CreateAndSignupFakeUser(tc, "rev")
AssertLoggedIn(tc)
if err := tc.G.LogoutIfRevoked(); err != nil {
t.Fatal(err)
}
AssertLoggedIn(tc)
f := func() libkb.SecretUI {
return u.NewSecretUI()
}
msg := []b... | explode_data.jsonl/40409 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
27958,
2679,
36184,
10823,
2753,
453,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
18626,
4571,
2271,
1155,
11,
330,
7282,
1138,
16867,
17130,
727,
60639,
2822,
10676,
1669,
4230,
3036,
56246,
52317,
1474,
44415,
11,
330,
7282,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Mock_findExpectedCall_Respects_Repeatability(t *testing.T) {
m := new(Mock)
m.On("One", 1).Return("one")
m.On("Two", 2).Return("two").Once()
m.On("Two", 3).Return("three").Twice()
m.On("Two", 3).Return("three").Times(8)
f, c := m.findExpectedCall("Two", 3)
if assert.Equal(t, 2, f) {
if ... | explode_data.jsonl/8590 | {
"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,
1245,
1176,
21814,
18896,
7220,
92815,
7973,
50693,
375,
2096,
1403,
1155,
353,
8840,
836,
8,
8022,
2109,
1669,
501,
66436,
1218,
2109,
8071,
445,
3966,
497,
220,
16,
568,
5598,
445,
603,
6060,
2109,
8071,
445,
11613,
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... | 3 |
func TestHelmCrdHook(t *testing.T) {
SkipOnEnv(t, "HELM")
Given(t).
Path("helm-crd").
When().
Create().
Sync().
Then().
Expect(OperationPhaseIs(OperationSucceeded)).
Expect(HealthIs(health.HealthStatusHealthy)).
Expect(SyncStatusIs(SyncStatusCodeSynced)).
Expect(ResourceResultNumbering(2))
} | explode_data.jsonl/69403 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 129
} | [
2830,
3393,
39,
23162,
34,
6498,
31679,
1155,
353,
8840,
836,
8,
341,
7568,
13389,
1925,
14359,
1155,
11,
330,
1799,
10994,
1138,
9600,
2071,
1155,
4292,
197,
69640,
445,
51899,
1786,
6498,
38609,
197,
197,
4498,
25829,
197,
75569,
2582... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCoverFunc(t *testing.T) {
// go tool cover -func ./testdata/profile.cov
cmd := exec.Command(testenv.GoToolPath(t), "tool", "cover", "-func", coverProfile)
out, err := cmd.Output()
if err != nil {
if ee, ok := err.(*exec.ExitError); ok {
t.Logf("%s", ee.Stderr)
}
t.Fatal(err)
}
if got, err := re... | explode_data.jsonl/67873 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 210
} | [
2830,
3393,
30896,
9626,
1155,
353,
8840,
836,
8,
341,
197,
322,
728,
5392,
3421,
481,
2830,
12991,
92425,
23580,
520,
859,
198,
25920,
1669,
3883,
12714,
8623,
3160,
67131,
7740,
1820,
1155,
701,
330,
14172,
497,
330,
3688,
497,
6523,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseForStatementInitConditionStatement(t *testing.T) {
p := createParser(`for x = 0; x < 5; x++ {}`)
bvmUtils.Assert(t, isForStatement(p), "should detect for statement")
parseForStatement(p)
bvmUtils.Assert(t, len(p.errs) == 0, "should be error-free")
bvmUtils.AssertNow(t, p.scope != nil, "Asteroid Error... | explode_data.jsonl/49718 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 332
} | [
2830,
3393,
14463,
2461,
8636,
3803,
10547,
8636,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1855,
6570,
5809,
1958,
856,
284,
220,
15,
26,
856,
366,
220,
20,
26,
856,
1027,
4687,
24183,
2233,
7338,
4209,
11711,
1155,
11,
374,
2461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewGenericProxy(t *testing.T) {
var testCases = []struct {
description string
endpoint string
query string
expected *url.URL
}{
{
description: "Endpoint with path",
endpoint: "http://awesome.kubesphere-system.svc:8080/api",
query: "/kapis/test.kubesphere.io/v1/foo/bar?... | explode_data.jsonl/70524 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 620
} | [
2830,
3393,
3564,
19964,
16219,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
37302,
284,
3056,
1235,
341,
197,
42407,
914,
198,
197,
6246,
2768,
262,
914,
198,
197,
27274,
981,
914,
198,
197,
42400,
262,
353,
1085,
20893,
198,
197,
59403... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHealthcheckCmd(t *testing.T) {
b := &Builder{flags: &BFlags{flags: make(map[string]*Flag)}, runConfig: &container.Config{}, disableCommit: true}
if err := healthcheck(b, []string{"CMD", "curl", "-f", "http://localhost/", "||", "exit", "1"}, nil, ""); err != nil {
t.Fatalf("Error should be empty, got: %s",... | explode_data.jsonl/28282 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
14542,
2028,
15613,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
609,
3297,
90,
11161,
25,
609,
33,
9195,
90,
11161,
25,
1281,
9147,
14032,
8465,
12135,
42419,
1598,
2648,
25,
609,
3586,
10753,
22655,
11156,
33441,
25,
830,
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 TestGetAccountSuccess(t *testing.T) {
svcCache.Invalidate(AccountsKey, "success")
if _, status := getAccount(log.NewLogger(), mockAccountUUIDMiddlewareAccSvc(false, true), "mail eq 'success'"); status != 0 {
t.Errorf("expected an account")
}
} | explode_data.jsonl/33789 | {
"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,
1949,
7365,
7188,
1155,
353,
8840,
836,
8,
341,
1903,
7362,
8233,
5337,
7067,
65360,
82,
1592,
11,
330,
5630,
1138,
743,
8358,
2639,
1669,
633,
7365,
12531,
7121,
7395,
1507,
7860,
7365,
24754,
24684,
14603,
92766,
3576,
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 TestGetGlobalCfgPath(t *testing.T) {
homeDir := "/user/bheni"
expected := filepath.Join(homeDir, dbfactory.DoltDir, globalConfig)
actual, _ := getGlobalCfgPath(func() (string, error) {
return homeDir, nil
})
if actual != expected {
t.Error(actual, "!=", expected)
}
} | explode_data.jsonl/82219 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
1949,
11646,
42467,
1820,
1155,
353,
8840,
836,
8,
341,
197,
5117,
6184,
1669,
3521,
872,
3470,
12032,
72,
698,
42400,
1669,
26054,
22363,
63194,
6184,
11,
2927,
21618,
909,
6181,
6184,
11,
3644,
2648,
340,
88814,
11,
716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCancelJob(t *testing.T) {
t.Parallel()
definedJobExperimentJSON, err := os.ReadFile("testdata/defined-job-experiment.json")
if err != nil {
t.Fatal(err)
}
const (
definedJobID = "11423cdd520000"
definedJobName = "jobs/legacy-" + definedJobID
)
ts := startFakeLegacyServer(t, map[string]string{
... | explode_data.jsonl/53294 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 916
} | [
2830,
3393,
9269,
12245,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
7452,
1589,
12245,
77780,
5370,
11,
1848,
1669,
2643,
78976,
445,
92425,
14,
9711,
69948,
10187,
14329,
4323,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestChangingArgs(t *testing.T) {
ResetForTesting(func() { t.Fatal("bad parse") })
oldArgs := os.Args
defer func() { os.Args = oldArgs }()
os.Args = []string{"cmd", "-before", "subcmd", "-after", "args"}
before := Bool("before", false, "")
if err := CommandLine.Parse(os.Args[1:]); err != nil {
t.Fatal(err)
... | explode_data.jsonl/53997 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
59046,
4117,
1155,
353,
8840,
836,
8,
341,
197,
14828,
2461,
16451,
18552,
368,
314,
259,
26133,
445,
13855,
4715,
899,
2751,
61828,
4117,
1669,
2643,
51015,
198,
16867,
2915,
368,
314,
2643,
51015,
284,
2310,
4117,
50746,
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 TestDownload(t *testing.T) {
tests := []struct {
name string
args test.Args
}{
{
name: "normal test",
args: test.Args{
URL: "https://www.ixigua.com/6909412821625209357",
Title: "赌场上十赌九输,想知道你赢不了的原因吗?这部电影告诉你答案!",
},
}, {
name: "episode test",
args: test.Args{
URL: "https://ww... | explode_data.jsonl/1124 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 359
} | [
2830,
3393,
11377,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
1273,
51015,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
8252,
1273,
756,
298,
31215,
25,
1273,
51015,
515,
571,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHashBundleFiles(t *testing.T) {
h, _ := NewSignatureHasher(SHA256)
tests := map[string]struct {
data map[string]interface{}
manifest Manifest
wasm []byte
exp int
}{
"no_content": {map[string]interface{}{}, Manifest{}, []byte{}, 2},
"data": {map... | explode_data.jsonl/55387 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 453
} | [
2830,
3393,
6370,
8409,
10809,
1155,
353,
8840,
836,
8,
341,
9598,
11,
716,
1669,
1532,
25088,
6370,
261,
3759,
17020,
17,
20,
21,
692,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
8924,
257,
2415,
14032,
31344,
16094,
197,
197,
4231... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVariables_ObjectsAndNullability_UsingVariables_ErrorsOnNullForNestedNonNull(t *testing.T) {
params := map[string]interface{}{
"input": map[string]interface{}{
"a": "foo",
"b": "bar",
"c": nil,
},
}
expected := &graphql.Result{
Data: nil,
Errors: []gqlerrors.FormattedError{
{
Message:... | explode_data.jsonl/6436 | {
"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,
22678,
62,
11543,
3036,
3280,
2897,
62,
16429,
22678,
93623,
1087,
1925,
3280,
2461,
71986,
16834,
1155,
353,
8840,
836,
8,
341,
25856,
1669,
2415,
14032,
31344,
67066,
197,
197,
1,
1355,
788,
2415,
14032,
31344,
67066,
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... | 3 |
func TestAccKubermaticNodeDeployment_AWS_Basic(t *testing.T) {
var nodedepl models.NodeDeployment
testName := randomTestName()
accessKeyID := os.Getenv(testEnvAWSAccessKeyID)
accessKeySecret := os.Getenv(testAWSSecretAccessKey)
vpcID := os.Getenv(testEnvAWSVPCID)
nodeDC := os.Getenv(testEnvAWSNodeDC)
instanceTy... | explode_data.jsonl/38979 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 771
} | [
2830,
3393,
14603,
42,
392,
4195,
774,
1955,
75286,
1566,
7433,
1668,
5971,
1155,
353,
8840,
836,
8,
341,
2405,
308,
6737,
68,
500,
4119,
21714,
75286,
198,
18185,
675,
1669,
4194,
2271,
675,
2822,
197,
5211,
1592,
915,
1669,
2643,
64... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewClientFromEnv(t *testing.T) {
os.Setenv("VINYLDNS_ACCESS_KEY", "accessKey")
os.Setenv("VINYLDNS_SECRET_KEY", "secretKey")
os.Setenv("VINYLDNS_HOST", "https://vinyldns-api.com")
client := NewClientFromEnv()
if client.AccessKey != "accessKey" {
t.Error("NewClientFromEnv should set an AccessKey from t... | explode_data.jsonl/4358 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 330
} | [
2830,
3393,
3564,
2959,
3830,
14359,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
53,
64953,
12335,
2448,
24420,
6600,
497,
330,
5211,
1592,
1138,
25078,
4202,
3160,
445,
53,
64953,
12335,
2448,
31408,
6600,
497,
330,
20474,
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... | 5 |
func TestDownloadSchemeManager(t *testing.T) {
client, _ := parseStorage(t)
defer test.ClearTestStorage(t)
// Remove irma-demo scheme manager as we need to test adding it
irmademo := irma.NewSchemeManagerIdentifier("irma-demo")
require.Contains(t, client.Configuration.SchemeManagers, irmademo)
require.NoError(t,... | explode_data.jsonl/70007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 704
} | [
2830,
3393,
11377,
28906,
2043,
1155,
353,
8840,
836,
8,
341,
25291,
11,
716,
1669,
4715,
5793,
1155,
340,
16867,
1273,
13524,
2271,
5793,
1155,
692,
197,
322,
10783,
6216,
1728,
58893,
12859,
6645,
438,
582,
1184,
311,
1273,
7842,
432,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStateFromMsgType(t *testing.T) {
t.Run("invited", func(t *testing.T) {
expected := &invited{}
actual, err := stateFromMsgType(InvitationMsgType)
require.NoError(t, err)
require.Equal(t, expected.Name(), actual.Name())
})
t.Run("requested", func(t *testing.T) {
expected := &requested{}
actual, er... | explode_data.jsonl/2091 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 408
} | [
2830,
3393,
1397,
3830,
6611,
929,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
14057,
1608,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
42400,
1669,
609,
14057,
1608,
16094,
197,
88814,
11,
1848,
1669,
1584,
3830,
6611,
929,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCollectionRouteWhenNoneFound(t *testing.T) {
setupDataFileForTest()
router := setupAPI()
w := httptest.NewRecorder()
req, _ := http.NewRequest("GET", "/derp", nil)
router.ServeHTTP(w, req)
if w.Code != 404 {
t.Errorf("Response was incorrect, got: %d, want: 404.", w.Code)
}
} | explode_data.jsonl/81909 | {
"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,
6482,
4899,
4498,
4064,
6650,
1155,
353,
8840,
836,
8,
341,
84571,
1043,
1703,
2461,
2271,
741,
67009,
1669,
6505,
7082,
2822,
6692,
1669,
54320,
70334,
7121,
47023,
741,
24395,
11,
716,
1669,
1758,
75274,
445,
3806,
497,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMacServiceImpl_RemoveMac(t *testing.T) {
a := assert.New(t)
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockMr := database.NewMockMacRepository(ctrl)
id := int64(1)
{
// success
ipi := NewMacServiceImpl(mockMr)
if ipi == nil {
t.FailNow()
}
mockMr.EXPECT().RemoveMac(id).Return(nil)
... | explode_data.jsonl/55042 | {
"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,
19552,
50603,
66843,
19552,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
340,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
741,
77333,
12275,
1669,
4625,
7121,
11571,
19552,
462... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunCommand(t *testing.T) {
// Given
var outputBuffer bytes.Buffer
var errorBuffer bytes.Buffer
dockerClient, debugVolume := test.GetDockerClientWithDebugVolume()
defer test.RemoveVolume(dockerClient, debugVolume)
state := &command.GlobalState{
DockerClient: dockerClient,
InputStream: nil,
Outpu... | explode_data.jsonl/78058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 822
} | [
2830,
3393,
6727,
4062,
1155,
353,
8840,
836,
8,
1476,
197,
322,
16246,
198,
2405,
2550,
4095,
5820,
22622,
198,
2405,
1465,
4095,
5820,
22622,
271,
2698,
13659,
2959,
11,
7390,
18902,
1669,
1273,
2234,
35,
13659,
2959,
2354,
7939,
1890... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGroupsWhichShouldSupportHistory(t *testing.T) {
groups := map[string]struct{}{
"wg-leads@knative.team": {},
}
found := make(map[string]struct{})
for _, group := range cfg.Groups {
emailId := group.EmailId
found[emailId] = struct{}{}
if _, ok := groups[emailId]; ok {
allowedWebPosting, ok := gr... | explode_data.jsonl/24795 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 359
} | [
2830,
3393,
22173,
23085,
14996,
7916,
13424,
1155,
353,
8840,
836,
8,
341,
44260,
82,
1669,
2415,
14032,
60,
1235,
67066,
197,
197,
1,
45540,
30207,
7664,
31,
19095,
1388,
27963,
788,
14573,
197,
630,
58102,
1669,
1281,
9147,
14032,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSubscribeStreamInvalidInitialResponse(t *testing.T) {
subscription := subscriptionPartition{"projects/123456/locations/us-central1-b/subscriptions/my-sub", 0}
verifiers := test.NewVerifiers(t)
stream := test.NewRPCVerifier(t)
stream.Push(initSubReqCommit(subscription), seekResp(0), nil) // Seek instead of... | explode_data.jsonl/31639 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 240
} | [
2830,
3393,
28573,
3027,
7928,
6341,
2582,
1155,
353,
8840,
836,
8,
341,
28624,
12124,
1669,
15142,
49978,
4913,
17161,
14,
16,
17,
18,
19,
20,
21,
14,
31309,
62431,
84081,
16,
1455,
37885,
29966,
34198,
17967,
497,
220,
15,
630,
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 TestSubscriptionRemoveNonExistingItem(t *testing.T) {
items := testEntityWithOneItem()
infoLogger := log.New(ioutil.Discard, "", log.Ldate|log.Ltime|log.Lshortfile)
assert.False(t, items.Remove("blah", infoLogger))
} | explode_data.jsonl/58989 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 83
} | [
2830,
3393,
33402,
13021,
8121,
53067,
1234,
1155,
353,
8840,
836,
8,
341,
46413,
1669,
1273,
3030,
2354,
3966,
1234,
741,
27043,
7395,
1669,
1487,
7121,
1956,
30158,
909,
47560,
11,
7342,
1487,
1214,
1028,
91,
839,
1214,
1678,
91,
839,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateJsonnetManifestInDir(t *testing.T) {
service := newService(".")
q := apiclient.ManifestRequest{
Repo: &argoappv1.Repository{},
ApplicationSource: &argoappv1.ApplicationSource{
Path: "./testdata/jsonnet",
Directory: &argoappv1.ApplicationSourceDirectory{
Jsonnet: argoappv1.ApplicationSo... | explode_data.jsonl/5667 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 334
} | [
2830,
3393,
31115,
5014,
4711,
38495,
641,
6184,
1155,
353,
8840,
836,
8,
341,
52934,
1669,
501,
1860,
445,
31225,
18534,
1669,
1443,
292,
1451,
72272,
1900,
515,
197,
197,
25243,
25,
609,
12088,
676,
85,
16,
25170,
38837,
197,
78329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_BuildLabels_WithAnnotations(t *testing.T) {
// Test each combination of nil/non-nil annotation + label
tables := []struct {
name string
label map[string]string
annotation map[string]string
result map[string]string
}{
{"Empty label and annotations returns empty table map", nil, nil,... | explode_data.jsonl/20890 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 546
} | [
2830,
3393,
96686,
23674,
62,
2354,
21418,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
1817,
10601,
315,
2092,
91130,
83248,
21223,
488,
2383,
198,
26481,
82,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
29277,
414,
2415,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCachedSecretKey(t *testing.T) {
tc := SetupEngineTest(t, "login")
defer tc.Cleanup()
u := CreateAndSignupFakeUser(tc, "login")
assertNotCachedSecretKey(tc, libkb.DeviceSigningKeyType)
assertNotCachedSecretKey(tc, libkb.DeviceEncryptionKeyType)
msg := []byte("test message")
_, err := SignED25519(tc.G,... | explode_data.jsonl/16765 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 268
} | [
2830,
3393,
70293,
19773,
1592,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
18626,
4571,
2271,
1155,
11,
330,
3673,
1138,
16867,
17130,
727,
60639,
2822,
10676,
1669,
4230,
3036,
56246,
52317,
1474,
44415,
11,
330,
3673,
5130,
6948,
2623,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFoldersService_GetFolder(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
mux.HandleFunc("/folder/457", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w,
`{
"id": "457",
"name": "Updated Folder Name",
"orderindex": 0,
"override_s... | explode_data.jsonl/51559 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 526
} | [
2830,
3393,
92779,
1860,
13614,
13682,
1155,
353,
8840,
836,
8,
341,
25291,
11,
59807,
11,
8358,
49304,
1669,
6505,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
17668,
14,
19,
20,
22,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApp(t *testing.T) {
c := NewCtx(t)
defer c.Close()
c.expectOK(c.GET("/test1"))
apiClient1 := c.makeClient(client1, key1, false)
apiClient2 := c.makeClient(client2, key2, false)
c.expectFail("unknown api method", apiClient1.Query("unsupported_method", nil, nil))
c.client.LogError("name", "msg %s", "arg... | explode_data.jsonl/391 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 634
} | [
2830,
3393,
2164,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
23684,
1155,
340,
16867,
272,
10421,
2822,
1444,
25952,
3925,
1337,
17410,
4283,
1944,
16,
28075,
54299,
2959,
16,
1669,
272,
10117,
2959,
12805,
16,
11,
1376,
16,
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 TestFilters(t *testing.T) {
type cEntry struct {
Name string
Other string
Labels map[string]string
}
corpusS := []cEntry{
{
Name: "foo",
Labels: map[string]string{
"foo": "true",
},
},
{
Name: "bar",
},
{
Name: "foo",
Labels: map[string]string{
"foo": ... | explode_data.jsonl/804 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2981
} | [
2830,
3393,
28351,
1155,
353,
8840,
836,
8,
341,
13158,
272,
5874,
2036,
341,
197,
21297,
256,
914,
198,
197,
197,
11409,
220,
914,
198,
197,
197,
23674,
2415,
14032,
30953,
198,
197,
630,
1444,
269,
17820,
50,
1669,
3056,
66,
5874,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListJob(t *testing.T) {
t.Parallel()
listResponseJSON, err := os.ReadFile("testdata/example-list-response.json")
if err != nil {
t.Fatal(err)
}
ts := startFakeLegacyServer(t, map[string]string{
"/api/jobs": string(listResponseJSON),
})
defer ts.Close()
ctx := context.Background()
Convey("Given a... | explode_data.jsonl/53295 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 455
} | [
2830,
3393,
852,
12245,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
14440,
2582,
5370,
11,
1848,
1669,
2643,
78976,
445,
92425,
65182,
9029,
58469,
4323,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTxExecutorPrepareRedoBeginFail(t *testing.T) {
txe, tsv, db := newTestTxExecutor(t)
defer db.Close()
defer tsv.StopService()
txid := newTxForPrep(tsv)
db.AddRejectedQuery("begin", errors.New("begin fail"))
err := txe.Prepare(txid, "aa")
defer txe.RollbackPrepared("aa", 0)
require.Error(t, err)
require... | explode_data.jsonl/25163 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 147
} | [
2830,
3393,
31584,
25255,
50590,
6033,
78,
11135,
19524,
1155,
353,
8840,
836,
8,
341,
3244,
8371,
11,
259,
3492,
11,
2927,
1669,
501,
2271,
31584,
25255,
1155,
340,
16867,
2927,
10421,
741,
16867,
259,
3492,
30213,
1860,
741,
46237,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_lookupWord(t *testing.T) {
type args struct {
lang string
s string
}
tests := []struct {
name string
args args
want int
wantErr bool
}{
// test the first, second, and last words, plus one in the niddle, plus
// one that's not there
{"a", args{"en", "abandon"}, 0, false},
{"... | explode_data.jsonl/32826 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 374
} | [
2830,
3393,
27464,
10879,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
197,
5205,
914,
198,
197,
1903,
262,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
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 TestScrapeMetricsDataOp(t *testing.T) {
doneFn, err := obsreporttest.SetupRecordedMetricsTest()
require.NoError(t, err)
defer doneFn()
sr := new(oteltest.SpanRecorder)
tp := oteltest.NewTracerProvider(oteltest.WithSpanRecorder(sr))
otel.SetTracerProvider(tp)
defer otel.SetTracerProvider(trace.NewNoopTracer... | explode_data.jsonl/9547 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 927
} | [
2830,
3393,
3326,
19842,
27328,
1043,
7125,
1155,
353,
8840,
836,
8,
341,
40495,
24911,
11,
1848,
1669,
7448,
11736,
1944,
39820,
6471,
291,
27328,
2271,
741,
17957,
35699,
1155,
11,
1848,
340,
16867,
2814,
24911,
2822,
1903,
81,
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... | 6 |
func TestCheck_ToUSI(t *testing.T) {
cases := []struct {
opt *Check
want string
}{
{
&Check{Name: "test", Value: true, Default: false},
"setoption name test value true",
},
{
&Check{Name: "test", Value: false, Default: false},
"setoption name test value false",
},
}
for i, c := range cases... | explode_data.jsonl/57624 | {
"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,
3973,
38346,
2034,
40,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
64838,
220,
353,
3973,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
515,
298,
197,
5,
3973,
63121,
25,
330,
1944,
497,
5162... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemittanceOriginatorNameRequired(t *testing.T) {
ro := mockRemittanceOriginator()
ro.RemittanceData.Name = ""
err := ro.Validate()
require.EqualError(t, err, fieldError("Name", ErrFieldRequired).Error())
} | explode_data.jsonl/32946 | {
"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,
6590,
87191,
13298,
850,
675,
8164,
1155,
353,
8840,
836,
8,
341,
197,
299,
1669,
7860,
6590,
87191,
13298,
850,
741,
197,
299,
11398,
87191,
1043,
2967,
284,
35829,
9859,
1669,
926,
47667,
2822,
17957,
12808,
1454,
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 |
func TestOrderedNodesIterate(t *testing.T) {
for _, test := range orderedNodesTests {
it := iterator.NewOrderedNodes(test.nodes)
for i := 0; i < 2; i++ {
if it.Len() != len(test.nodes) {
t.Errorf("unexpected iterator length for round %d: got:%d want:%d", i, it.Len(), len(test.nodes))
}
var got []graph... | explode_data.jsonl/31422 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 253
} | [
2830,
3393,
54384,
12288,
8537,
349,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
11457,
12288,
18200,
341,
197,
23374,
1669,
15091,
7121,
54384,
12288,
8623,
21697,
340,
197,
2023,
600,
1669,
220,
15,
26,
600,
366,
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... | 6 |
func TestRegister(t *testing.T) {
type registerTest struct {
name string
params *Params
err error
}
tests := []struct {
name string
register []registerTest
}{
{
name: "default networks",
register: []registerTest{
{
name: "duplicate mainnet",
params: &MainnetParams,
e... | explode_data.jsonl/58874 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 758
} | [
2830,
3393,
8690,
1155,
353,
8840,
836,
8,
341,
13158,
4161,
2271,
2036,
341,
197,
11609,
256,
914,
198,
197,
25856,
353,
4870,
198,
197,
9859,
262,
1465,
198,
197,
630,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
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... | 4 |
func TestClientOptions_CustomDialer(t *testing.T) {
td := &testDialer{d: &net.Dialer{}}
opts := clientopt.Dialer(td)
client, err := newClient(testutil.ConnString(t), opts)
require.NoError(t, err)
err = client.Connect(context.Background())
require.NoError(t, err)
_, err = client.ListDatabases(context.Background()... | explode_data.jsonl/16 | {
"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,
2959,
3798,
57402,
35,
530,
261,
1155,
353,
8840,
836,
8,
341,
76373,
1669,
609,
1944,
35,
530,
261,
90,
67,
25,
609,
4711,
98462,
261,
6257,
532,
64734,
1669,
2943,
2912,
98462,
261,
61241,
340,
25291,
11,
1848,
1669,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNewElasticsearchCRWhenResourcesAreDefined(t *testing.T) {
cluster := &logging.ClusterLogging{
Spec: logging.ClusterLoggingSpec{
LogStore: &logging.LogStoreSpec{
Type: "elasticsearch",
ElasticsearchSpec: logging.ElasticsearchSpec{
Resources: newResourceRequirements("120Gi", "", "100Gi", "500m... | explode_data.jsonl/72370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 736
} | [
2830,
3393,
3564,
36,
51179,
1836,
8973,
4498,
11277,
11526,
29361,
1155,
353,
8840,
836,
8,
341,
197,
18855,
1669,
609,
25263,
72883,
34575,
515,
197,
7568,
992,
25,
8392,
72883,
34575,
8327,
515,
298,
24201,
6093,
25,
609,
25263,
5247... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCalcMultiSigStats(t *testing.T) {
t.Parallel()
tests := []struct {
name string
script string
err error
}{
{
name: "short script",
script: "0x046708afdb0fe5548271967f1a67130b7105cd6a828" +
"e03909a67962e0ea1f61d",
err: ErrNotMultisigScript,
},
{
name: "stack underflow",
s... | explode_data.jsonl/29685 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 460
} | [
2830,
3393,
47168,
20358,
47246,
16635,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
86956,
914,
198,
197,
9859,
262,
1465,
198,
197,
59403,
197,
197,
515,
298,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestGetOutboundTCPFilter(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
type testCase struct {
name string
trafficMatch trafficpolicy.TrafficMatch
expectedTCPProxyConfig *xds_tcp_proxy.TcpProxy
expectError bool
}
testCases := []test... | explode_data.jsonl/10272 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1166
} | [
2830,
3393,
1949,
2662,
10891,
49896,
5632,
1155,
353,
8840,
836,
8,
341,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
7860,
15001,
991,
18176,
2822,
13158,
54452,
2036,
341,
197,
11609,
4293,
914,
198,
197,
197,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewActivation(t *testing.T) {
activation := NewActivation(map[string]interface{}{"a": true})
if val, found := activation.ResolveName("a"); !found || val != types.True {
t.Error("Activation failed to resolve 'a'")
}
} | explode_data.jsonl/50240 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
3564,
61460,
1155,
353,
8840,
836,
8,
341,
197,
23002,
1669,
1532,
61460,
9147,
14032,
31344,
6257,
4913,
64,
788,
830,
3518,
743,
1044,
11,
1730,
1669,
15099,
57875,
675,
445,
64,
5038,
753,
15105,
1369,
1044,
961,
4494,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetOrderbook(t *testing.T) {
t.Parallel()
_, err := c.GetOrderbook(spotTestPair, 100)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/42921 | {
"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,
1949,
4431,
2190,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
272,
2234,
4431,
2190,
1141,
19099,
2271,
12443,
11,
220,
16,
15,
15,
340,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestCountLines_Counts0LinesInEmptyInput(t *testing.T) {
t.Parallel()
want := 0
got, err := script.Echo("").CountLines()
if err != nil {
t.Fatal(err)
}
if got != want {
t.Errorf("want %d, got %d", want, got)
}
} | explode_data.jsonl/51522 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
2507,
16794,
50775,
82,
15,
16794,
641,
3522,
2505,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50780,
1669,
220,
15,
198,
3174,
354,
11,
1848,
1669,
5316,
5142,
958,
80821,
2507,
16794,
741,
743,
1848,
961,
2092... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCharges(t *testing.T) {
charge, err := client.Charge(&Charge{
ExpiresIn: 30 * 60,
Amount: "123000",
Description: "a test invoice",
InternalID: "testx",
CallbackURL: "https://example.com/callback",
})
if err != nil {
t.Errorf("got error from .Charge(): %s", err)
}
if charge.ExpiresAt.Af... | explode_data.jsonl/42386 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 525
} | [
2830,
3393,
1143,
58240,
1155,
353,
8840,
836,
8,
341,
7450,
709,
11,
1848,
1669,
2943,
6353,
2744,
2099,
55363,
515,
197,
197,
65331,
641,
25,
256,
220,
18,
15,
353,
220,
21,
15,
345,
197,
197,
10093,
25,
414,
330,
16,
17,
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 TestSchema_Delete(t *testing.T) {
var (
serviceId string
)
t.Run("register service and instance", func(t *testing.T) {
respCreateService, err := datasource.GetMetadataManager().RegisterService(getContext(), &pb.CreateServiceRequest{
Service: &pb.MicroService{
AppId: "delete_schema_group_ms",
... | explode_data.jsonl/49819 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 979
} | [
2830,
3393,
8632,
57418,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
52934,
764,
914,
198,
197,
692,
3244,
16708,
445,
6343,
2473,
323,
2867,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
34653,
4021,
1860,
11,
1848,
1669,
69156,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientSetHeaderVerbatim(t *testing.T) {
ts := createPostServer(t)
defer ts.Close()
c := dc().
SetHeaderVerbatim("header-lowercase", "value_lowercase").
SetHeader("header-lowercase", "value_standard")
assertEqual(t, "value_lowercase", strings.Join(c.Header["header-lowercase"], "")) //nolint
assertEqu... | explode_data.jsonl/39347 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 135
} | [
2830,
3393,
2959,
1649,
4047,
10141,
54748,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
1855,
4133,
5475,
1155,
340,
16867,
10591,
10421,
2822,
1444,
1669,
19402,
25829,
197,
22212,
4047,
10141,
54748,
445,
2708,
2852,
1202,
5638,
497,
330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStatusReleases(t *testing.T) {
expectedArgs := []string{"list"}
expectedSatusMap := map[string]string{
"jenkins-x": "DEPLOYED",
"jx-production": "DEPLOYED",
"jx-staging": "DEPLOYED",
"jxing": "DEPLOYED",
"vault-operator": "DEPLOYED",
}
helm, runner := createHelm(t, nil, listRel... | explode_data.jsonl/4652 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 268
} | [
2830,
3393,
2522,
693,
28299,
1155,
353,
8840,
836,
8,
341,
42400,
4117,
1669,
3056,
917,
4913,
1607,
16707,
42400,
50,
1000,
2227,
1669,
2415,
14032,
30953,
515,
197,
197,
1,
23166,
11704,
6558,
788,
414,
330,
1150,
71824,
1479,
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... | 2 |
func TestCreateDaisyInflater_File_SetsSizesFromInspectedFile(t *testing.T) {
tests := []struct {
physicalSize int64
virtualSize int64
expectedInflated string
expectedScratch string
}{
{
virtualSize: 1,
expectedInflated: "10",
expectedScratch: "10",
},
{
physicalSize: 8,
... | explode_data.jsonl/75634 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 525
} | [
2830,
3393,
4021,
35,
49056,
12342,
34061,
1098,
1415,
34930,
3830,
15474,
4046,
1703,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
197,
46592,
1695,
257,
526,
21,
19,
198,
197,
9558,
1695,
414,
526,
21,
19,
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 TestCreateValidationError(t *testing.T) {
storage := makeTestStorage()
roleBinding := &authorizationapi.RoleBinding{}
ctx := kapi.WithUser(kapi.WithNamespace(kapi.NewContext(), "unittest"), &user.DefaultInfo{Name: "system:admin"})
_, err := storage.Create(ctx, roleBinding)
if err == nil {
t.Errorf("Expecte... | explode_data.jsonl/9640 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 121
} | [
2830,
3393,
4021,
80553,
1155,
353,
8840,
836,
8,
341,
197,
16172,
1669,
1281,
2271,
5793,
741,
197,
5778,
15059,
1669,
609,
39554,
2068,
35955,
15059,
31483,
20985,
1669,
595,
2068,
26124,
1474,
5969,
2068,
26124,
22699,
5969,
2068,
7121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestTranscodingAVI(t *testing.T) {
var inputPath = "/tmp/ffmpeg/avi"
var outputPath = "/tmp/ffmpeg/out/avi.mp4"
trans := new(transcoder.Transcoder)
err := trans.Initialize(inputPath, outputPath)
assert.Nil(t, err)
done := trans.Run(false)
err = <-done
assert.Nil(t, err)
} | explode_data.jsonl/57658 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
3167,
48367,
8093,
40,
1155,
353,
8840,
836,
8,
1476,
2405,
1946,
1820,
284,
3521,
5173,
14,
72422,
14,
6190,
698,
2405,
95017,
284,
3521,
5173,
14,
72422,
48316,
14,
6190,
16870,
19,
1837,
72453,
1669,
501,
33089,
40170,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidatePersistentVolumeClaim(t *testing.T) {
scenarios := map[string]struct {
isExpectedFailure bool
claim *api.PersistentVolumeClaim
}{
"good-claim": {
isExpectedFailure: false,
claim: testVolumeClaim("foo", "ns", api.PersistentVolumeClaimSpec{
AccessModes: []api.PersistentVolu... | explode_data.jsonl/62785 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1037
} | [
2830,
3393,
17926,
53194,
18902,
45544,
1155,
353,
8840,
836,
8,
1476,
29928,
60494,
1669,
2415,
14032,
60,
1235,
341,
197,
19907,
18896,
17507,
1807,
198,
197,
197,
7859,
1797,
353,
2068,
61655,
18902,
45544,
198,
197,
59403,
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... | 6 |
func TestReconcileServiceInstanceAppliesDefaultProvisioningParams(t *testing.T) {
err := utilfeature.DefaultMutableFeatureGate.Set(fmt.Sprintf("%v=true", scfeatures.ServicePlanDefaults))
if err != nil {
t.Fatalf("Could not enable ServicePlanDefaults feature flag.")
}
_, fakeCatalogClient, _, testController, shar... | explode_data.jsonl/58135 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 997
} | [
2830,
3393,
693,
40446,
457,
1860,
2523,
10611,
7202,
3675,
1336,
13013,
287,
4870,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
4094,
12753,
13275,
11217,
13859,
42318,
4202,
28197,
17305,
4430,
85,
11265,
497,
1136,
20304,
13860,
20485,
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 TestQueryHint1(t *testing.T) {
db := DB.New()
_, err := db.Model(User{}).Raw("select 1").Rows()
if err != nil {
t.Error("Unexpected error on query count with query_option")
}
} | explode_data.jsonl/28073 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 74
} | [
2830,
3393,
2859,
26987,
16,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
5952,
7121,
2822,
197,
6878,
1848,
1669,
2927,
5659,
13087,
6257,
568,
20015,
445,
1742,
220,
16,
1827,
9024,
2822,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func Test_Web_Handlers(t *testing.T) {
Convey("Add custom handlers", t, func() {
result := ""
batman := func(c *Context) {
result += "batman!"
}
m := New()
m.Use(func(c *Context) {
result += "foo"
c.Next()
result += "ban"
})
m.Handlers(
batman,
batman,
batman,
)
Convey("Add not... | explode_data.jsonl/44977 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 372
} | [
2830,
3393,
62,
5981,
2039,
437,
9254,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2212,
2526,
24083,
497,
259,
11,
2915,
368,
341,
197,
9559,
1669,
8389,
197,
2233,
266,
1515,
1669,
2915,
1337,
353,
1972,
8,
341,
298,
9559,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_existingVariable_Existent(t *testing.T) {
tests := []struct {
title string
value string
}{
{
title: "Variable exist and set",
value: "example",
},
{
title: "Variable exist but unset",
value: "",
},
}
key := "env_var"
expectedBool := true
for _, test := range tests {
t.Run(tes... | explode_data.jsonl/11981 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
62630,
7827,
62531,
18128,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
24751,
914,
198,
197,
16309,
914,
198,
197,
59403,
197,
197,
515,
298,
24751,
25,
330,
7827,
3000,
323,
738,
756,
298,
16309,
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 TestSolution(t *testing.T) {
// 测试用例
cases := []struct {
name string
queries []int
m int
expect []int
}{
{"TestCase", []int{3, 1, 2, 1}, 5, []int{2, 1, 2, 1}},
{"TestCase", []int{4, 1, 2, 2}, 4, []int{3, 1, 2, 0}},
{"TestCase", []int{7, 5, 5, 8, 3}, 8, []int{6, 5, 0, 7, 5}},
}
// 开始测试... | explode_data.jsonl/64980 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 325
} | [
2830,
3393,
36842,
1155,
353,
8840,
836,
8,
341,
197,
322,
197,
81705,
11622,
26355,
198,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
197,
42835,
3056,
396,
198,
197,
2109,
981,
526,
198,
197,
24952,
220,
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... | 2 |
func TestStopFuture(t *testing.T) {
ID := "UniqueID"
{
props := FromProducer(func() Actor { return &ShortLivingActor{} })
a, _ := SpawnNamed(props, ID)
fut := a.StopFuture()
res, errR := fut.Result()
if errR != nil {
assert.Fail(t, "Failed to wait stop actor %s", errR)
return
}
_, ok := res.(*T... | explode_data.jsonl/77580 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 209
} | [
2830,
3393,
10674,
24206,
1155,
353,
8840,
836,
8,
341,
29580,
1669,
330,
22811,
915,
698,
197,
515,
197,
77691,
1669,
5542,
45008,
18552,
368,
24718,
314,
470,
609,
12472,
44505,
18870,
6257,
2751,
197,
11323,
11,
716,
1669,
47361,
158... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRGBColor(t *testing.T) {
buf := forceOpenColorRender()
defer resetColorRender()
is := assert.New(t)
// empty
c := RGBColor{3: 99}
is.True(c.IsEmpty())
is.Equal("", c.String())
// bg
c = RGB(204, 204, 204, true)
is.False(c.IsEmpty())
is.Equal("48;2;204;204;204", c.String())
// fg
c = RGB(204, 20... | explode_data.jsonl/7009 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 513
} | [
2830,
3393,
18184,
1636,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
5344,
5002,
1636,
6750,
741,
16867,
7585,
1636,
6750,
741,
19907,
1669,
2060,
7121,
1155,
692,
197,
322,
4287,
198,
1444,
1669,
20978,
1636,
90,
18,
25,
220,
24,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDatabaseIsBootstrappedAndDurable(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
var (
validIsBootstrapped = true
validShardSetAssignedAt = time.Now()
validLastBootstrapCompletionTime = validShardSetAssignedAt.Add(time.Second)
validLastSuccessfu... | explode_data.jsonl/46548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2123
} | [
2830,
3393,
5988,
3872,
17919,
495,
5677,
3036,
35,
18329,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
2405,
2399,
197,
56322,
3872,
17919,
495,
5677,
1698,
284,
830,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDequeueIndexSkipsLocked(t *testing.T) {
if testing.Short() {
t.Skip()
}
dbtesting.SetupGlobalTestDB(t)
db := testDB()
t1 := time.Unix(1587396557, 0).UTC()
t2 := t1.Add(time.Minute)
t3 := t2.Add(time.Minute)
insertIndexes(
t,
dbconn.Global,
Index{ID: 1, State: "queued", QueuedAt: t1},
Index{I... | explode_data.jsonl/11074 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 490
} | [
2830,
3393,
1912,
4584,
1552,
19290,
3077,
49010,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
532,
20939,
8840,
39820,
11646,
2271,
3506,
1155,
340,
20939,
1669,
1273,
3506,
2822,
3244,
16,
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 TestGetInvalidDevice(t *testing.T) {
client, _, device, err := test.NewClientServer()
if err != nil {
t.Fatal(err)
}
assert := assert.New(t)
_, err = client.GetDeviceByName(device.Name + "-invalid")
assert.Error(err)
assert.True(api.IsErrorWithStatusCode(err, 404))
_, err = client.GetDeviceByIF("invali... | explode_data.jsonl/34119 | {
"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,
1949,
7928,
6985,
1155,
353,
8840,
836,
8,
341,
25291,
11,
8358,
3671,
11,
1848,
1669,
1273,
7121,
2959,
5475,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
6948,
1669,
2060,
7121,
1155,
692,
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 TestCheckDiskCapacity_V1(t *testing.T) {
d, _ := NewFakeDriver(t)
size := int32(10)
diskName := "unit-test"
resourceGroup := "unit-test"
disk := compute.Disk{
DiskProperties: &compute.DiskProperties{
DiskSizeGB: &size,
},
}
d.getCloud().DisksClient.(*mockdiskclient.MockInterface).EXPECT().Get(gomock.... | explode_data.jsonl/16677 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 217
} | [
2830,
3393,
3973,
47583,
29392,
2334,
16,
1155,
353,
8840,
836,
8,
341,
2698,
11,
716,
1669,
1532,
52317,
11349,
1155,
340,
13832,
1669,
526,
18,
17,
7,
16,
15,
340,
2698,
3187,
675,
1669,
330,
3843,
16839,
698,
50346,
2808,
1669,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRewriteRemoveCustom(t *testing.T) {
content := `<div>Lorem Ipsum <span class="spam">I dont want to see this</span><span class="ads keep">Super important info</span></div>`
expected := `<div>Lorem Ipsum <span class="ads keep">Super important info</span></div>`
output := Rewriter("https://example.org/article"... | explode_data.jsonl/21491 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
58465,
1247,
13021,
10268,
1155,
353,
8840,
836,
8,
341,
27751,
1669,
30586,
611,
67939,
61362,
366,
1480,
536,
428,
75545,
755,
40,
15522,
1366,
311,
1490,
419,
522,
1480,
1784,
1480,
536,
428,
7664,
2506,
755,
19284,
2989,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBalancerUnderServerShutdownGetSerializable(t *testing.T) {
testBalancerUnderServerShutdownImmutable(t, func(cli *clientv3.Client, ctx context.Context) error {
_, err := cli.Get(ctx, "foo", clientv3.WithSerializable())
return err
}, 2*time.Second)
} | explode_data.jsonl/29451 | {
"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,
93825,
16250,
5475,
62004,
1949,
29268,
1155,
353,
8840,
836,
8,
341,
18185,
93825,
16250,
5475,
62004,
58890,
1155,
11,
2915,
70249,
353,
2972,
85,
18,
11716,
11,
5635,
2266,
9328,
8,
1465,
341,
197,
197,
6878,
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 |
func TestTranslateAsHtml(t *testing.T) {
assert.EqualValues(t, "<p><strong><i>foo</i></strong></p>", TranslateAsHtml(i18n.TranslateFunc(htmlTestTranslationBundle.MustTfunc("en")), "foo.bold", map[string]interface{}{
"Foo": "<i>foo</i>",
}))
} | explode_data.jsonl/53386 | {
"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,
27473,
2121,
13591,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
6227,
1155,
11,
4055,
79,
1784,
4519,
5789,
4832,
4696,
15361,
26,
7975,
32480,
20560,
72,
15361,
11347,
4519,
1472,
79,
21156,
37740,
2121,
13591,
1956,
16,
23,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDoInTransactionEtcdDataRace(t *testing.T) {
e := integrationetcd.NewEtcdClient(t)
defer e.Close(t)
client, err := etcd.NewClient(&etcd.Config{
Client: e.Client,
ServiceName: t.Name(),
})
require.NoError(t, err)
collectKeyHistory := e.WatchKey(testResourceKey)
// Set initial state
err = clie... | explode_data.jsonl/3488 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 802
} | [
2830,
3393,
5404,
641,
8070,
31860,
4385,
1043,
55991,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
17590,
295,
4385,
7121,
31860,
4385,
2959,
1155,
340,
16867,
384,
10421,
1155,
692,
25291,
11,
1848,
1669,
1842,
4385,
7121,
2959,
2099,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContainerSpecWithExtraMounts(t *testing.T) {
testID := "test-id"
testSandboxID := "sandbox-id"
testPid := uint32(1234)
containerConfig, sandboxConfig, imageConfig, specCheck := getCreateContainerTestData()
ociRuntime := config.Runtime{}
c := newTestCRIService()
mountInConfig := &runtime.Mount{
// Test... | explode_data.jsonl/6408 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 785
} | [
2830,
3393,
4502,
8327,
2354,
11612,
16284,
82,
1155,
353,
8840,
836,
8,
341,
18185,
915,
1669,
330,
1944,
12897,
698,
18185,
50,
31536,
915,
1669,
330,
76756,
12897,
698,
18185,
32339,
1669,
2622,
18,
17,
7,
16,
17,
18,
19,
340,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFuzzManyPeers(t *testing.T) {
peerCount := 500
if race.WithRace() {
peerCount = 100
}
for i := 0; i < peerCount; i++ {
ctx, cancel := context.WithCancel(context.Background())
_, err := FullMeshConnected(ctx, 2)
cancel()
if err != nil {
t.Fatal(err)
}
}
} | explode_data.jsonl/10783 | {
"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,
37,
8889,
8441,
10197,
388,
1155,
353,
8840,
836,
8,
341,
197,
16537,
2507,
1669,
220,
20,
15,
15,
198,
743,
6957,
26124,
55991,
368,
341,
197,
197,
16537,
2507,
284,
220,
16,
15,
15,
198,
197,
532,
2023,
600,
1669,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestApplyRequiresFieldManager(t *testing.T) {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, genericfeatures.ServerSideApply, true)()
_, client, closeFn := setup(t)
defer closeFn()
obj := []byte(`{
"apiVersion": "v1",
"kind": "ConfigMap",
"metadata": {
"name": "... | explode_data.jsonl/53472 | {
"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,
28497,
46961,
1877,
2043,
1155,
353,
8840,
836,
8,
341,
16867,
4565,
70,
266,
57824,
287,
4202,
13859,
42318,
16014,
2271,
1155,
11,
4094,
12753,
13275,
13859,
42318,
11,
13954,
20304,
22997,
16384,
28497,
11,
830,
8,
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... | 3 |
func TestTransportResponseBodyWritableOnProtocolSwitch(t *testing.T) {
setParallel(t)
defer afterTest(t)
done := make(chan struct{})
defer close(done)
cst := newClientServerTest(t, h1Mode, HandlerFunc(func(w ResponseWriter, r *Request) {
conn, _, err := w.(Hijacker).Hijack()
if err != nil {
t.Error(err)
... | explode_data.jsonl/14178 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 614
} | [
2830,
3393,
27560,
29637,
39623,
1925,
20689,
16837,
1155,
353,
8840,
836,
8,
341,
8196,
16547,
1155,
340,
16867,
1283,
2271,
1155,
340,
40495,
1669,
1281,
35190,
2036,
37790,
16867,
3265,
34232,
340,
1444,
267,
1669,
501,
2959,
5475,
227... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSlashWithUnbondingDelegation(t *testing.T) {
app, ctx, addrDels, addrVals := bootstrapSlashTest(t, 10)
consAddr := sdk.ConsAddress(PKs[0].Address())
fraction := sdk.NewDecWithPrec(5, 1)
// set an unbonding delegation with expiration timestamp beyond which the
// unbonding delegation shouldn't be slashed... | explode_data.jsonl/25503 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1821
} | [
2830,
3393,
88004,
2354,
1806,
64239,
287,
1912,
87566,
1155,
353,
8840,
836,
8,
341,
28236,
11,
5635,
11,
10789,
35,
2010,
11,
10789,
52452,
1669,
26925,
88004,
2271,
1155,
11,
220,
16,
15,
692,
197,
6254,
13986,
1669,
45402,
94594,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCleanUp(t *testing.T) {
table := &db.RoutingTable{TimeToLive: 1, Readers: []string{"router1"}}
pool := &poolFake{
borrow: func(names []string, cancel context.CancelFunc, _ log.BoltLogger) (db.Connection, error) {
return &testutil.ConnFake{Table: table}, nil
},
}
now := time.Now()
router := New("rou... | explode_data.jsonl/40055 | {
"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,
27529,
2324,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
609,
1999,
2013,
10909,
2556,
90,
1462,
1249,
20324,
25,
220,
16,
11,
64414,
25,
3056,
917,
4913,
9937,
16,
95642,
85273,
1669,
609,
10285,
52317,
515,
197,
2233,
776... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultipleLedgerBasicRW(t *testing.T) {
env := newTestEnv(t)
defer env.cleanup()
numLedgers := 10
provider := testutilNewProvider(t)
ledgers := make([]lgr.PeerLedger, numLedgers)
for i := 0; i < numLedgers; i++ {
bg, gb := testutil.NewBlockGenerator(t, constructTestLedgerID(i), false)
l, err := provide... | explode_data.jsonl/2821 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 557
} | [
2830,
3393,
32089,
60850,
1389,
15944,
56368,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
501,
2271,
14359,
1155,
340,
16867,
6105,
87689,
741,
22431,
60850,
10637,
1669,
220,
16,
15,
198,
197,
19979,
1669,
1273,
1314,
3564,
5179,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestGlobal(t *testing.T) {
testStr := `<?
global $var, $otherVar;`
p := NewParser()
p.disableScoping = true
a, _ := p.Parse("test.php", testStr)
tree := &ast.GlobalDeclaration{
Identifiers: []*ast.Variable{
ast.NewVariable("var"),
ast.NewVariable("otherVar"),
},
}
if !assertEquals(a.Nodes[0], tr... | explode_data.jsonl/28453 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
11646,
1155,
353,
8840,
836,
8,
341,
18185,
2580,
1669,
1565,
53075,
220,
3644,
400,
947,
11,
400,
1575,
3962,
26,
3989,
3223,
1669,
1532,
6570,
741,
3223,
42628,
3326,
33707,
284,
830,
198,
11323,
11,
716,
1669,
281,
8937... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCertFile(t *testing.T) {
root := pki.NewRootCertificateAuthority()
assert.NilError(t, root.Generate())
instance := pki.NewLeafCertificate("instance.pod-dns", nil, nil)
assert.NilError(t, instance.Generate(root))
data, err := certFile(instance.PrivateKey, instance.Certificate)
assert.NilError(t, err)
... | explode_data.jsonl/63107 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
36934,
1703,
1155,
353,
8840,
836,
8,
341,
33698,
1669,
281,
6642,
7121,
8439,
33202,
45532,
741,
6948,
59678,
1454,
1155,
11,
3704,
57582,
12367,
56256,
1669,
281,
6642,
7121,
31461,
33202,
445,
4851,
556,
347,
1737,
4412,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStreamServerInterceptorWithDummyRequestId(t *testing.T) {
dummyRequestID := newRequestID()
handler := func(srv interface{}, stream grpc.ServerStream) error {
reqID, exists := FromContext(stream.Context())
if !exists || reqID != dummyRequestID {
t.Errorf("expected requestID: %q, returned requestId: %q"... | explode_data.jsonl/74065 | {
"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,
3027,
5475,
32786,
2354,
43344,
61774,
1155,
353,
8840,
836,
8,
341,
2698,
8574,
1900,
915,
1669,
501,
1900,
915,
741,
53326,
1669,
2915,
1141,
10553,
3749,
22655,
4269,
47900,
22997,
3027,
8,
1465,
341,
197,
24395,
915,
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... | 3 |
func TestIssue17898(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t0")
tk.MustExec("create table t0(a char(10), b int as ((a)));")
tk.MustExec("insert into t0(a) values(\"0.5\");")
tk.MustQu... | explode_data.jsonl/65540 | {
"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,
42006,
16,
22,
23,
24,
23,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUploadBufferStrategy(t *testing.T) {
cases := map[string]struct {
PartSize int64
Size int64
Strategy s3manager.ReadSeekerWriteToProvider
callbacks int
}{
"NoBuffer": {
PartSize: s3manager.DefaultUploadPartSize,
Strategy: nil,
},
"SinglePart": {
PartSize: s3manager.DefaultUpload... | explode_data.jsonl/55657 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1092
} | [
2830,
3393,
13844,
4095,
19816,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
5800,
1695,
220,
526,
21,
19,
198,
197,
91224,
414,
526,
21,
19,
198,
197,
197,
19816,
220,
274,
18,
13297,
6503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConsecutiveBreaker(t *testing.T) {
cb := NewConsecutiveBreaker(3)
if cb.Tripped() {
t.Fatal("expected consecutive breaker to be open")
}
cb.Fail()
cb.Success()
cb.Fail()
cb.Fail()
if cb.Tripped() {
t.Fatal("expected consecutive breaker to be open")
}
cb.Fail()
if !cb.Tripped() {
t.Fatal("exp... | explode_data.jsonl/60801 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
1109,
85780,
22524,
261,
1155,
353,
8840,
836,
8,
341,
63810,
1669,
1532,
1109,
85780,
22524,
261,
7,
18,
692,
743,
9858,
836,
461,
6924,
368,
341,
197,
3244,
26133,
445,
7325,
23921,
66767,
311,
387,
1787,
1138,
197,
630,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_listHandler_Comparator(t *testing.T) {
now := v1.Now()
tomorrow := v1.Time{Time: now.Add(1 * time.Hour)}
createPipelineRun := func(name string, creationTime v1.Time, startTime *v1.Time) *v1alpha3.PipelineRun {
return &v1alpha3.PipelineRun{
ObjectMeta: v1.ObjectMeta{
Name: name,
Cr... | explode_data.jsonl/24616 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1111
} | [
2830,
3393,
2019,
3050,
16946,
12356,
1155,
353,
8840,
836,
8,
341,
80922,
1669,
348,
16,
13244,
741,
3244,
316,
7768,
1669,
348,
16,
16299,
90,
1462,
25,
1431,
1904,
7,
16,
353,
882,
73550,
10569,
39263,
34656,
6727,
1669,
2915,
3153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSelectionGroupByTransfrom(t *testing.T) {
tests := []struct {
name string
plan planners.IPlan
source []interface{}
expect *datablocks.DataBlock
}{
{
name: "simple",
plan: planners.NewSelectionPlan(
planners.NewMapPlan(
planners.NewVariablePlan("name"),
planners.NewUnaryExpre... | explode_data.jsonl/14292 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1151
} | [
2830,
3393,
11177,
2808,
1359,
3167,
1499,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
197,
10393,
256,
67452,
2447,
20485,
198,
197,
47418,
3056,
4970,
16094,
197,
24952,
353,
67,
2096,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJetStreamNotAccountEnabled(t *testing.T) {
conf := createConfFile(t, []byte(`
listen: 127.0.0.1:-1
no_auth_user: rip
jetstream: {max_mem_store: 64GB, max_file_store: 10TB}
accounts: {
JS: {
jetstream: enabled
users: [ {user: dlc, password: foo} ]
},
IU: {
users: [ {user: rip, pass... | explode_data.jsonl/29155 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 337
} | [
2830,
3393,
35641,
3027,
2623,
7365,
5462,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
1855,
15578,
1703,
1155,
11,
3056,
3782,
61528,
197,
14440,
268,
25,
220,
16,
17,
22,
13,
15,
13,
15,
13,
16,
10944,
16,
198,
197,
72104,
14014,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetValuePtr(t *testing.T) {
a := assert.New(t)
obj := myStruct{InferredName: "Hello."}
meta := getCachedColumnCollectionFromInstance(obj)
col := meta.Lookup()["pointer_col"]
a.NotNil(col)
myValue := 21
err := col.SetValue(&obj, &myValue)
a.Nil(err)
a.NotNil(obj.PointerColumn)
a.Equal(21, *obj.Pointe... | explode_data.jsonl/58399 | {
"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,
48068,
5348,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
340,
22671,
1669,
847,
9422,
90,
641,
5554,
675,
25,
330,
9707,
1189,
532,
84004,
1669,
43099,
3854,
2933,
6482,
3830,
2523,
6779,
692,
46640,
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 TestPtrPointTo(t *testing.T) {
var ip *int32
var i int32 = 1234
vip := ValueOf(&ip)
vi := ValueOf(&i).Elem()
vip.Elem().Set(vi.Addr())
if *ip != 1234 {
t.Errorf("got %d, want 1234", *ip)
}
ip = nil
vp := ValueOf(&ip).Elem()
vp.Set(Zero(vp.Type()))
if ip != nil {
t.Errorf("got non-nil (%p), want nil... | explode_data.jsonl/29525 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
5348,
2609,
1249,
1155,
353,
8840,
836,
8,
341,
2405,
5997,
353,
396,
18,
17,
198,
2405,
600,
526,
18,
17,
284,
220,
16,
17,
18,
19,
198,
5195,
573,
1669,
5162,
2124,
2099,
573,
340,
5195,
72,
1669,
5162,
2124,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEventWatcherCancel(t *testing.T) {
watcher := NewEventWatcher(newFakeEventHandler(),
WithEventFilter(EventFilter{KeptnContext: "ctx1"}),
WithInterval(time.NewTicker(1)),
)
stream, cancel := watcher.Watch(context.Background())
cancel()
for ev := range stream {
fmt.Println(ev)
}
_, ok := <-stream
... | explode_data.jsonl/75645 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 141
} | [
2830,
3393,
1556,
47248,
9269,
1155,
353,
8840,
836,
8,
341,
6692,
28058,
1669,
1532,
1556,
47248,
1755,
52317,
17945,
3148,
197,
197,
2354,
1556,
5632,
30469,
5632,
90,
6608,
417,
77,
1972,
25,
330,
3773,
16,
67432,
197,
197,
2354,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateUpstreamsFails(t *testing.T) {
tests := []struct {
upstreams []v1.Upstream
expectedUpstreamNames sets.String
msg string
}{
{
upstreams: []v1.Upstream{
{
Name: "@upstream1",
Service: "test-1",
Port: ... | explode_data.jsonl/65824 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3076
} | [
2830,
3393,
17926,
2324,
60975,
37,
6209,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
59810,
60975,
1797,
3056,
85,
16,
60828,
4027,
198,
197,
42400,
2324,
4027,
7980,
7289,
6431,
198,
197,
21169,
4293,
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... | 4 |
func TestBuildMetricBlocklist(t *testing.T) {
userProvidedBlocklist := []string{
"user.defined.a",
"user.defined.b",
}
expected := []string{
"user.defined.a",
"user.defined.b",
invocationsMetric,
}
result := buildMetricBlocklist(userProvidedBlocklist)
assert.Equal(t, expected, result)
} | explode_data.jsonl/50625 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
11066,
54310,
4713,
1607,
1155,
353,
8840,
836,
8,
341,
19060,
35819,
291,
4713,
1607,
1669,
3056,
917,
515,
197,
197,
76522,
13,
9711,
5849,
756,
197,
197,
76522,
13,
9711,
948,
756,
197,
532,
42400,
1669,
3056,
917,
515,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestModifyManifests(t *testing.T) {
conf, cleanup := testutil.InitConfig(t)
defer cleanup(t)
mo := testutil.DummyManifestOptions()
manifest := conf.AddManifest(mo)
require.NotNil(t, manifest)
mo.TargetPath += stringDelta
err := conf.ModifyManifest(manifest, mo)
require.NoError(t, err)
mo.CommitHash = "... | explode_data.jsonl/57916 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 231
} | [
2830,
3393,
44427,
38495,
82,
1155,
353,
8840,
836,
8,
341,
67850,
11,
21290,
1669,
1273,
1314,
26849,
2648,
1155,
340,
16867,
21290,
1155,
692,
2109,
78,
1669,
1273,
1314,
909,
8574,
38495,
3798,
741,
197,
42315,
1669,
2335,
1904,
3849... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateSaveSSH(t *testing.T) {
translator := &i18n.Translator{
Locale: nil,
}
username := "test_user"
outputDirectory := "unit_tests"
expectedFile := outputDirectory + "/" + username + "_rsa"
defer os.Remove(expectedFile)
_, _, err := CreateSaveSSH(username, outputDirectory, translator)
if err != n... | explode_data.jsonl/7031 | {
"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,
4021,
8784,
62419,
1155,
353,
8840,
836,
8,
341,
197,
44357,
1669,
609,
72,
16,
23,
77,
11815,
21829,
515,
197,
197,
19231,
25,
2092,
345,
197,
532,
72358,
1669,
330,
1944,
3317,
698,
21170,
9310,
1669,
330,
3843,
32509,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequestBaseUrl(t *testing.T) {
req := defaultRequest("GET", "http://localhost", nil, t)
urlBase := req.BaseUrl()
urlString := urlBase.String()
expected := "http://localhost"
if urlString != expected {
t.Error(expected + " was the expected URL base, but instead got " + urlString)
}
} | explode_data.jsonl/31839 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
1900,
71587,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
1638,
1900,
445,
3806,
497,
330,
1254,
1110,
8301,
497,
2092,
11,
259,
340,
19320,
3978,
1669,
4232,
13018,
2864,
741,
19320,
703,
1669,
2515,
3978,
6431,
2822,
42400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListWithListResponderError(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
resourceID := "/subscriptions/subscriptionID/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines"
armClient := mockarmclient.NewMockInterface(ctrl)
vmList := []compute.VirtualMachine{getTestVM("vm1"),... | explode_data.jsonl/16690 | {
"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,
852,
2354,
852,
30884,
1454,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
50346,
915,
1669,
3521,
72560,
14,
34404,
915,
53100,
22173,
14,
1984,
82543,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.