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 TestState_UpdateNickSelfNilMaps(t *testing.T) {
t.Parallel()
st := setupNewState()
ev := &irc.Event{
Name: irc.NICK,
Sender: users[0],
Args: []string{nicks[1]},
}
st.addUser(users[0])
st.Update(ev)
_, ok := st.userChannels[nicks[0]]
if got, exp := ok, false; exp != got {
t.Errorf("Expected: %... | explode_data.jsonl/32092 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 221
} | [
2830,
3393,
1397,
47393,
30356,
12092,
19064,
36562,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18388,
1669,
6505,
3564,
1397,
741,
74837,
1669,
609,
2437,
6904,
515,
197,
21297,
25,
256,
79923,
2067,
10685,
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... | 3 |
func TestSafeWriteConfigWithExistingFile(t *testing.T) {
v := New()
fs := afero.NewMemMapFs()
fs.Create("/test/c.yaml")
v.SetFs(fs)
v.AddConfigPath("/test")
v.SetConfigName("c")
v.SetConfigType("yaml")
err := v.SafeWriteConfig()
require.Error(t, err)
_, ok := err.(ConfigFileAlreadyExistsError)
assert.True(t,... | explode_data.jsonl/9912 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
25663,
7985,
2648,
2354,
53067,
1703,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
1532,
741,
53584,
1669,
264,
802,
78,
7121,
18816,
2227,
48300,
741,
53584,
7251,
4283,
1944,
2899,
33406,
1138,
5195,
4202,
48300,
31856,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOpenShiftClusterStaticValidateMasterProfile(t *testing.T) {
tests := []*validateTest{
{
name: "valid",
},
{
name: "vmSize unsupported",
modify: func(oc *OpenShiftCluster) {
oc.Properties.MasterProfile.VMSize = VMSizeStandardD2sV3
},
wantErr: "400: InvalidParameter: properties.masterPr... | explode_data.jsonl/39083 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 505
} | [
2830,
3393,
5002,
24841,
28678,
11690,
17926,
18041,
8526,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
29838,
7067,
2271,
515,
197,
197,
515,
298,
11609,
25,
330,
1891,
756,
197,
197,
1583,
197,
197,
515,
298,
11609,
25,
330,
7338,
169... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEndToEnd(t *testing.T) {
receiverConfig := loadConfigAssertNoError(t, config.NewComponentIDWithName(typeStr, "end_to_end_test/2"))
// e2e test with port undefined by user
endToEndScrapeTest(t, receiverConfig, "end-to-end port not defined")
} | explode_data.jsonl/1739 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
3727,
66573,
1155,
353,
8840,
836,
8,
341,
17200,
12862,
2648,
1669,
2795,
2648,
8534,
2753,
1454,
1155,
11,
2193,
7121,
2189,
915,
54523,
5808,
2580,
11,
330,
408,
2346,
6213,
4452,
14,
17,
28075,
197,
322,
384,
17,
68,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccessibleReposEnv_Repos(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
org := AssertExistsAndLoadBean(t, &User{ID: 3}).(*User)
testSuccess := func(userID int64, expectedRepoIDs []int64) {
env, err := org.AccessibleReposEnv(userID)
assert.NoError(t, err)
repos, err := env.Repos(1, 100)
ass... | explode_data.jsonl/71075 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 274
} | [
2830,
3393,
55390,
693,
966,
14359,
50693,
966,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
2271,
5988,
2398,
87625,
1669,
5319,
15575,
3036,
5879,
10437,
1155,
11,
609,
1474,
90,
915,
25,
220,
18,
16630,
4071,
1474,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDevice_FromPb(t *testing.T) {
a := New(t)
p := testDev.ToPb()
dev := FromPb(p)
a.So(dev.AppID, ShouldEqual, testDev.AppID)
a.So(dev.DevID, ShouldEqual, testDev.DevID)
a.So(dev.Latitude, ShouldEqual, testDev.Latitude)
a.So(dev.Longitude, ShouldEqual, testDev.Longitude)
a.So(dev.Altitude, ShouldEqual, t... | explode_data.jsonl/53525 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 171
} | [
2830,
3393,
6985,
53157,
47,
65,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
1532,
1155,
692,
3223,
1669,
1273,
14592,
3274,
47,
65,
741,
27302,
1669,
5542,
47,
65,
1295,
340,
11323,
46387,
17622,
5105,
915,
11,
12260,
2993,
11,
1273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigDefaultNPSPluginState(t *testing.T) {
t.Run("should enable NPS plugin by default", func(t *testing.T) {
c1 := Config{}
c1.SetDefaults()
assert.True(t, c1.PluginSettings.PluginStates["com.mattermost.nps"].Enable)
})
t.Run("should enable NPS plugin if diagnostics are enabled", func(t *testing.T)... | explode_data.jsonl/50677 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 469
} | [
2830,
3393,
2648,
3675,
45,
5012,
11546,
1397,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5445,
7283,
451,
5012,
9006,
553,
1638,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
1444,
16,
1669,
5532,
16094,
197,
1444,
16,
4202,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetting_Runtime(t *testing.T) {
t.Parallel()
now := time.Date(2019, 12, 31, 12, 12, 13, 0, time.Local) // Tuesday
tests := []struct {
name string
start, end time.Time
startTime, endTime int
dayOfWeek []time.Weekday
expected time.Time
}{
{
name: ... | explode_data.jsonl/13336 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1280
} | [
2830,
3393,
15400,
63422,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
80922,
1669,
882,
8518,
7,
17,
15,
16,
24,
11,
220,
16,
17,
11,
220,
18,
16,
11,
220,
16,
17,
11,
220,
16,
17,
11,
220,
16,
18,
11,
220,
15,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDSNReformat(t *testing.T) {
for i, tst := range testDSNs {
dsn1 := tst.in
cfg1, err := ParseDSN(dsn1)
if err != nil {
t.Error(err.Error())
continue
}
cfg1.tls = nil // pointer not static
res1 := fmt.Sprintf("%+v", cfg1)
dsn2 := cfg1.FormatDSN()
cfg2, err := ParseDSN(dsn2)
... | explode_data.jsonl/70843 | {
"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,
5936,
45,
693,
2243,
1155,
353,
8840,
836,
8,
972,
2023,
600,
11,
71707,
1669,
2088,
1273,
5936,
47360,
972,
197,
2698,
9613,
16,
1669,
71707,
1858,
319,
197,
50286,
16,
11,
1848,
1669,
14775,
5936,
45,
1500,
9613,
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... | 5 |
func TestCreateJob_EmptyPipelineSpec(t *testing.T) {
store := NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch())
defer store.Close()
manager := NewResourceManager(store)
job := &api.Job{
Name: "pp 1",
Enabled: true,
PipelineSpec: &api.PipelineSpec{
Parameters: []*api.Parameter{
{Name: "param1",... | explode_data.jsonl/28377 | {
"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,
4021,
12245,
76060,
1595,
34656,
8327,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
1532,
52317,
2959,
2043,
2195,
62396,
67811,
7121,
52317,
1462,
2461,
44338,
2398,
16867,
3553,
10421,
741,
92272,
1669,
1532,
32498,
31200,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestExifEditor_IsDirty(t *testing.T) {
je, _ := NewExifEditorEmpty(true)
if !je.IsDirty() {
t.Errorf("Expected editor to not be dirty")
}
je, _ = NewExifEditorEmpty(false)
if je.IsDirty() {
t.Errorf("Expected editor to not be dirty")
}
//edit a field which should set the editor to dirty
err := je.SetIm... | explode_data.jsonl/79880 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 193
} | [
2830,
3393,
840,
333,
9410,
31879,
36485,
1155,
353,
8840,
836,
8,
341,
197,
3756,
11,
716,
1669,
1532,
840,
333,
9410,
3522,
3715,
340,
743,
753,
3756,
4506,
36485,
368,
341,
197,
3244,
13080,
445,
18896,
6440,
311,
537,
387,
18595,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCrJournalCreateDirRenameFileRemoveUnmerged(t *testing.T) {
test(t, journal(),
users("alice", "bob"),
as(alice,
mkdir("a"),
write("a/b", "hello"),
),
as(bob,
enableJournal(),
pauseJournal(),
mkdir("x"),
),
as(alice,
rm("a/b"),
),
as(bob,
mkdir("c"),
mkfile("c/d", ""),
... | explode_data.jsonl/31383 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 368
} | [
2830,
3393,
16001,
43494,
4021,
6184,
88757,
1703,
13021,
1806,
40354,
1155,
353,
8840,
836,
8,
341,
18185,
1155,
11,
8322,
3148,
197,
90896,
445,
63195,
497,
330,
47086,
4461,
197,
60451,
17643,
558,
345,
298,
88650,
445,
64,
4461,
298... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMarkTodoAsComplete(t *testing.T) {
t.Log(`Should mark a single todo as done`)
mockDB, mock, err := sqlmock.New()
if err != nil {
t.Error(err)
t.Fail()
}
defer mockDB.Close()
userID := uint(1)
todoID := uint(1)
currentTime := time.Now()
mock.ExpectExec(`UPDATE todos.+`).
WithArgs(todoID, userI... | explode_data.jsonl/44579 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 275
} | [
2830,
3393,
8949,
24176,
2121,
12548,
1155,
353,
8840,
836,
8,
341,
3244,
5247,
5809,
14996,
1868,
264,
3175,
11804,
438,
2814,
24183,
77333,
3506,
11,
7860,
11,
1848,
1669,
5704,
16712,
7121,
741,
743,
1848,
961,
2092,
341,
197,
3244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestGetRemoteTags(t *testing.T) {
r := spawnTestRegistrySession(t)
tags, err := r.GetRemoteTags([]string{makeURL("/v1/")}, REPO)
if err != nil {
t.Fatal(err)
}
assertEqual(t, len(tags), 2, "Expected two tags")
assertEqual(t, tags["latest"], imageID, "Expected tag latest to map to "+imageID)
assertEqual(t,... | explode_data.jsonl/13102 | {
"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,
1949,
24703,
15930,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
18042,
2271,
15603,
5283,
1155,
340,
3244,
2032,
11,
1848,
1669,
435,
2234,
24703,
15930,
10556,
917,
90,
6927,
3144,
4283,
85,
16,
97112,
2137,
3596,
2045,
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... | 3 |
func TestBQInvariantToPreClamping(t *testing.T) {
lower, upper := -1.0, 1.0
bq1 := getNoiselessBQ(t, lower, upper)
bq2 := getNoiselessBQ(t, lower, upper)
for _, i := range createEntries() {
bq1.Add(i)
bq2.Add(math.Min(math.Max(-1.0, i), 1.0))
}
for _, rank := range getRanks() {
got, err := bq1.Result(rank)... | explode_data.jsonl/80639 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 318
} | [
2830,
3393,
33,
48,
76621,
1249,
4703,
5066,
30457,
1155,
353,
8840,
836,
8,
341,
8810,
1202,
11,
8416,
1669,
481,
16,
13,
15,
11,
220,
16,
13,
15,
198,
2233,
80,
16,
1669,
633,
61819,
1717,
33,
48,
1155,
11,
4722,
11,
8416,
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... | 6 |
func TestLayer3RouterCreateDelete(t *testing.T) {
client, err := clients.NewNetworkV2Client()
th.AssertNoErr(t, err)
network, err := networking.CreateNetwork(t, client)
th.AssertNoErr(t, err)
defer networking.DeleteNetwork(t, client, network.ID)
router, err := CreateRouter(t, client, network.ID)
th.AssertNoErr... | explode_data.jsonl/22104 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 481
} | [
2830,
3393,
9188,
18,
9523,
4021,
6435,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
8239,
7121,
12320,
53,
17,
2959,
741,
70479,
11711,
2753,
7747,
1155,
11,
1848,
692,
9038,
2349,
11,
1848,
1669,
28030,
7251,
12320,
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... | 3 |
func TestRouterParams(t *testing.T) {
r := NewTestRouter(t)
r.Resource("/test",
PathParam("id", "desc"),
QueryParam("i", "desc", int16(0)),
QueryParam("f32", "desc", float32(0.0)),
QueryParam("f64", "desc", 0.0),
QueryParam("schema", "desc", "test", Schema(schema.Schema{Pattern: "^a-z+$"})),
QueryParam("... | explode_data.jsonl/66543 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1016
} | [
2830,
3393,
9523,
4870,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
2271,
9523,
1155,
692,
7000,
20766,
4283,
1944,
756,
197,
69640,
2001,
445,
307,
497,
330,
8614,
4461,
197,
60362,
2001,
445,
72,
497,
330,
8614,
497,
526,
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 Test_createS3Client(t *testing.T) {
assert := assert.New(t)
type args struct {
region string
id string
secret string
}
tests := []struct {
name string
args args
wantNil bool
wantErr bool
}{
{
"success-without-credentials",
args{
"region",
"",
"",
},
false,
... | explode_data.jsonl/14342 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 422
} | [
2830,
3393,
8657,
50,
18,
2959,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
13158,
2827,
2036,
341,
197,
197,
3943,
914,
198,
197,
15710,
257,
914,
198,
197,
197,
20474,
914,
198,
197,
532,
78216,
1669,
3056,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSocketSend(t *testing.T) {
expected := "Hello unit test"
ctx, sys := setupMockScriptEnv(`
name="send"
type="testing"
function vertical(ctx, domain)
local conn, err = socket.connect(ctx, "127.0.0.1", 8080, "tcp")
if (err ~= nil and err ~= "") then
log(ctx, err)
end
local n
n, err = ... | explode_data.jsonl/51389 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 737
} | [
2830,
3393,
10286,
11505,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
330,
9707,
4982,
1273,
698,
20985,
11,
5708,
1669,
6505,
11571,
5910,
14359,
61528,
197,
11609,
428,
6681,
698,
197,
13158,
428,
8840,
1837,
197,
7527,
12140,
7502,
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 TestLeftV1(t *testing.T) {
cases := []struct {
start int64
now int64
period int64
total int64
tenThousandth int64
expect int64
}{
{10000, 10001, 10, 10000, 2, 9998},
{10000, 10011, 10, 10000, 2, 9996},
{10000, 10001, 10, 1e17, 2, 9998 * 1e13},
{10000, 1... | explode_data.jsonl/22552 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 685
} | [
2830,
3393,
5415,
53,
16,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
21375,
260,
526,
21,
19,
198,
197,
80922,
1843,
526,
21,
19,
198,
197,
197,
19304,
286,
526,
21,
19,
198,
197,
34493,
260,
526,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandshakeContextHierarchy(t *testing.T) {
c, s := localPipe(t)
clientErr := make(chan error, 1)
clientConfig := testConfig.Clone()
serverConfig := testConfig.Clone()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
key := struct{}{}
ctx = context.WithValue(ctx, key, true)
go func... | explode_data.jsonl/36362 | {
"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,
2314,
29661,
1972,
85264,
1155,
353,
8840,
836,
8,
341,
1444,
11,
274,
1669,
2205,
34077,
1155,
340,
25291,
7747,
1669,
1281,
35190,
1465,
11,
220,
16,
340,
25291,
2648,
1669,
1273,
2648,
64463,
741,
41057,
2648,
1669,
1273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAllocValue(t *testing.T) {
y := newY(nil, nil, nil)
for e := 0xe000; e <= 0xf8ff; e++ {
if y.allocatedValues[e] {
continue
}
if g := y.allocValue(); g != e {
t.Fatal(g, e)
}
}
for e := 0xf0000; e <= 0xffffd; e++ {
if g := y.allocValue(); g != e {
t.Fatal(g, e)
}
}
for e := 0x100000;... | explode_data.jsonl/28788 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 289
} | [
2830,
3393,
25154,
1130,
1155,
353,
8840,
836,
8,
341,
14522,
1669,
80384,
27907,
11,
2092,
11,
2092,
340,
2023,
384,
1669,
220,
15,
8371,
15,
15,
15,
26,
384,
2651,
220,
15,
5848,
23,
542,
26,
384,
1027,
341,
197,
743,
379,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAnonymousField(t *testing.T) {
user := User{Name: "anonymous_field", Company: Company{Name: "company"}}
DB.Save(&user)
var user2 User
DB.First(&user2, "name = ?", "anonymous_field")
DB.Model(&user2).Related(&user2.Company)
if user2.Company.Name != "company" {
t.Errorf("Should be able to get anonymous ... | explode_data.jsonl/6070 | {
"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,
32684,
1877,
1155,
353,
8840,
836,
8,
341,
19060,
1669,
2657,
63121,
25,
330,
25280,
5013,
497,
8188,
25,
8188,
63121,
25,
330,
10139,
95642,
45409,
13599,
2099,
872,
692,
2405,
1196,
17,
2657,
198,
45409,
15926,
2099,
872,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIterateMapInMap(t *testing.T) {
const idx = uint32(1)
parent := createMapInMap(t, ArrayOfMaps)
defer parent.Close()
a := createArray(t)
defer a.Close()
if err := parent.Put(idx, a); err != nil {
t.Fatal(err)
}
var (
key uint32
m *Map
entries = parent.Iterate()
)
defer m.Close()
... | explode_data.jsonl/21669 | {
"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,
8537,
349,
2227,
641,
2227,
1155,
353,
8840,
836,
8,
341,
4777,
7187,
284,
2622,
18,
17,
7,
16,
692,
24804,
1669,
1855,
2227,
641,
2227,
1155,
11,
2910,
2124,
36562,
340,
16867,
2681,
10421,
2822,
11323,
1669,
1855,
1857,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_NewMqMsgStream(t *testing.T) {
f := &fixture{t: t}
parameters := f.setup()
defer f.teardown()
factory := &ProtoUDFactory{}
for i := range parameters {
func(client mqclient.Client) {
_, err := NewMqMsgStream(context.Background(), 100, 100, client, factory.NewUnmarshalDispatcher())
assert.Nil(t, e... | explode_data.jsonl/55276 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
39582,
44,
80,
6611,
3027,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
609,
59612,
90,
83,
25,
259,
532,
67543,
1669,
282,
25338,
741,
16867,
282,
31853,
37496,
2822,
1166,
2919,
1669,
609,
31549,
4656,
4153,
16094,
2023,
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... | 1 |
func TestStartServerPortUnavailable(t *testing.T) {
s, err := NewServer()
require.NoError(t, err)
// Listen on the next available port
listener, err := net.Listen("tcp", ":0")
require.NoError(t, err)
// Attempt to listen on the port used above.
s.UpdateConfig(func(cfg *model.Config) {
*cfg.ServiceSettings.Li... | explode_data.jsonl/47828 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 154
} | [
2830,
3393,
3479,
5475,
7084,
92928,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
1532,
5475,
741,
17957,
35699,
1155,
11,
1848,
692,
197,
322,
32149,
389,
279,
1790,
2500,
2635,
198,
14440,
798,
11,
1848,
1669,
4179,
68334,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAuthService_CreateUser_DuplicateHandling(t *testing.T) {
u := st.User{ID: -1, Username: "alle", FirstName: "Alle", LastName: "Alle", Email: "alle@alle.com", Password: "pwd"}
dao := dao.MockUserDao{}
dao.On("GetByUsername", u.Username).Return(&u, nil)
s := AuthService{&mailer, &dao, createTestConfig()}
e... | explode_data.jsonl/18890 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 167
} | [
2830,
3393,
90466,
34325,
1474,
1557,
14070,
38606,
1155,
353,
8840,
836,
8,
341,
10676,
1669,
357,
7344,
90,
915,
25,
481,
16,
11,
29545,
25,
330,
5054,
497,
49467,
25,
330,
70451,
497,
48946,
25,
330,
70451,
497,
8299,
25,
330,
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 TestUname(t *testing.T) {
var utsname unix.Utsname
err := unix.Uname(&utsname)
if err != nil {
t.Fatalf("Uname: %v", err)
}
// conversion from []byte to string, golang.org/issue/20753
t.Logf("OS: %s/%s %s", string(utsname.Sysname[:]), string(utsname.Machine[:]), string(utsname.Release[:]))
} | explode_data.jsonl/35463 | {
"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,
52,
606,
1155,
353,
8840,
836,
8,
341,
2405,
220,
6128,
606,
51866,
5255,
2576,
606,
198,
9859,
1669,
51866,
5255,
606,
2099,
6128,
606,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
52,
606,
25,
1018,
85,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSyncPodCreatesNetAndContainerPullsImage(t *testing.T) {
dm, fakeDocker := newTestDockerManagerWithRealImageManager()
dm.podInfraContainerImage = "foo/infra_image:v1"
puller := dm.dockerPuller.(*FakeDockerPuller)
puller.HasImages = []string{}
dm.podInfraContainerImage = "foo/infra_image:v1"
pod := makePod... | explode_data.jsonl/31162 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 468
} | [
2830,
3393,
12154,
23527,
54868,
6954,
3036,
4502,
36068,
82,
1906,
1155,
353,
8840,
836,
8,
341,
2698,
76,
11,
12418,
35,
13659,
1669,
501,
2271,
35,
13659,
2043,
2354,
12768,
1906,
2043,
741,
2698,
76,
556,
347,
19433,
956,
4502,
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... | 5 |
func TestEvents(t *testing.T) {
mt := NewMockTerminal(2)
testEvent := termbox.Event{Type: termbox.EventKey, Key: termbox.KeyCtrlC}
mt.PutEvent(testEvent)
mt.PutEvent(termbox.Event{Type: termbox.EventKey, Key: termbox.KeyTab})
event, err := mt.TimeoutEvent(time.Second)
if err != nil {
t.Errorf("unexpected error ... | explode_data.jsonl/80612 | {
"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,
7900,
1155,
353,
8840,
836,
8,
341,
2109,
83,
1669,
1532,
11571,
47890,
7,
17,
340,
18185,
1556,
1669,
4647,
2011,
6904,
90,
929,
25,
4647,
2011,
6904,
1592,
11,
5309,
25,
4647,
2011,
9610,
15001,
34,
532,
2109,
83,
3982... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunHooks(t *testing.T) {
t.Run(
"no error multiple hooks",
func(t *testing.T) {
var ctrl = gomock.NewController(t)
defer ctrl.Finish()
reset()
Init(DefaultConfig())
var ran = [4]bool{}
RegisterLoader(
NewMockLoader(ctrl),
func(Store) error {
ran[0] = true
return nil
... | explode_data.jsonl/35310 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1439
} | [
2830,
3393,
6727,
67769,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
1006,
197,
197,
1,
2152,
1465,
5248,
29677,
756,
197,
29244,
1155,
353,
8840,
836,
8,
341,
298,
2405,
23743,
284,
342,
316,
1176,
7121,
2051,
1155,
340,
298,
16867,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLightMetricSet_VerifyHostDataURI(t *testing.T) {
const hostEndpoint = "ceph-restful:8003"
const sampleHttpsEndpoint = "https://" + hostEndpoint
r := NewRegister()
r.MustAddMetricSet("http", "json", newMetricSetWithOption,
WithHostParser(func(module Module, host string) (HostData, error) {
u, err := u... | explode_data.jsonl/9715 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 389
} | [
2830,
3393,
13911,
54310,
1649,
2334,
261,
1437,
9296,
1043,
10301,
1155,
353,
8840,
836,
8,
341,
4777,
3468,
27380,
284,
330,
58722,
76233,
1262,
25,
23,
15,
15,
18,
698,
4777,
6077,
92869,
27380,
284,
330,
2428,
52136,
488,
3468,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDNS(t *testing.T) {
dns := filter.NewBuilder().
LD(filter.Word, filter.IMM, 20).
LDX(filter.Byte, filter.MSH, 0).
ADD(filter.Index, 0).
TAX().
Label("lb_0").
LD(filter.Word, filter.IND, 0).
JEQ(filter.Const, "", "lb_1", 0x07657861).
LD(filter.... | explode_data.jsonl/11714 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 411
} | [
2830,
3393,
61088,
1155,
353,
8840,
836,
8,
341,
262,
44077,
1669,
4051,
7121,
3297,
25829,
286,
28877,
19704,
64969,
11,
4051,
47929,
44,
11,
220,
17,
15,
4292,
286,
444,
16591,
19704,
32119,
11,
4051,
1321,
8590,
11,
220,
15,
4292,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSyncPodsDeletes(t *testing.T) {
kubelet, _, fakeDocker := makeTestKubelet(t)
fakeDocker.containerList = []docker.APIContainers{
{
// the k8s prefix is required for the kubelet to manage the container
Names: []string{"/k8s--foo--bar.test"},
ID: "1234",
},
{
// network container
Names: ... | explode_data.jsonl/2831 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 405
} | [
2830,
3393,
12154,
23527,
82,
61317,
1155,
353,
8840,
836,
8,
341,
16463,
3760,
1149,
11,
8358,
12418,
35,
13659,
1669,
1281,
2271,
42,
3760,
1149,
1155,
340,
1166,
726,
35,
13659,
18357,
852,
284,
3056,
28648,
24922,
74632,
515,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestCreateDefaultConfig(t *testing.T) {
factory := NewFactory()
cfg := factory.CreateDefaultConfig()
assert.NotNil(t, cfg, "failed to create default config")
assert.NoError(t, configtest.CheckConfigStruct(cfg))
} | explode_data.jsonl/73106 | {
"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,
4021,
3675,
2648,
1155,
353,
8840,
836,
8,
341,
1166,
2919,
1669,
1532,
4153,
741,
50286,
1669,
8633,
7251,
3675,
2648,
741,
6948,
93882,
1155,
11,
13286,
11,
330,
16091,
311,
1855,
1638,
2193,
1138,
6948,
35699,
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 |
func TestEmptyImport(t *testing.T) {
p, err := Import("", Default.GOROOT, FindOnly)
if err == nil {
t.Fatal(`Import("") returned nil error.`)
}
if p == nil {
t.Fatal(`Import("") returned nil package.`)
}
if p.ImportPath != "" {
t.Fatalf("ImportPath=%q, want %q.", p.ImportPath, "")
}
} | explode_data.jsonl/513 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 127
} | [
2830,
3393,
3522,
11511,
1155,
353,
8840,
836,
8,
341,
3223,
11,
1848,
1669,
13213,
19814,
7899,
1224,
868,
53837,
11,
7379,
7308,
340,
743,
1848,
621,
2092,
341,
197,
3244,
26133,
5809,
11511,
39047,
5927,
2092,
1465,
14908,
340,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestCreatePassiveSellOfferValidateSellingAsset(t *testing.T) {
kp0 := newKeypair0()
kp1 := newKeypair1()
sourceAccount := NewSimpleAccount(kp1.Address(), int64(41137196761100))
createPassiveOffer := CreatePassiveSellOffer{
Selling: CreditAsset{"ABCD0123456789", kp0.Address()},
Buying: NativeAsset{},
Am... | explode_data.jsonl/29367 | {
"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,
4021,
12187,
533,
68533,
39462,
17926,
50,
6293,
16604,
1155,
353,
8840,
836,
8,
341,
16463,
79,
15,
1669,
501,
6608,
1082,
1310,
15,
741,
16463,
79,
16,
1669,
501,
6608,
1082,
1310,
16,
741,
47418,
7365,
1669,
1532,
16374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSplitCheckKubeServerVersion(t *testing.T) {
defer func() {
executeCommandFunc = keptnutils.ExecuteCommand
}()
var executeOutput string
var executeError error
executeCommandFunc = func(string, []string) (string, error) {
return executeOutput, executeError
}
for _, tt := range checkSplitTests {
t.Ru... | explode_data.jsonl/67735 | {
"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,
20193,
3973,
42,
3760,
5475,
5637,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
368,
341,
197,
8122,
3068,
4062,
9626,
284,
8604,
77,
6031,
13827,
4062,
198,
197,
69826,
2405,
9026,
5097,
914,
198,
2405,
9026,
1454,
1465,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWaiter(t *testing.T) {
var (
w = newWaiter()
waitTime = time.Second
startTime = time.Now()
doneTime time.Time
done = make(chan struct{})
)
go func() {
defer close(done)
if err := w.wait(10 * time.Second); err != nil {
t.Errorf("failed to wait: %v", err)
return
}
doneT... | explode_data.jsonl/42294 | {
"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,
14190,
261,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
6692,
260,
284,
501,
14190,
261,
741,
197,
48750,
1462,
220,
284,
882,
32435,
198,
197,
21375,
1462,
284,
882,
13244,
741,
197,
40495,
1462,
220,
882,
16299,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestTreapPutGetDelete(t *testing.T) {
treap := NewTreap()
_, ok := treap.Get(c(3))
if ok {
t.Error("should not contain 3")
}
treap.Put(c(3), 44)
v, ok := treap.Get(c(3))
if !ok {
t.Error("should contain 3")
}
if v != 44 {
t.Error("should be 44")
}
v, ok = treap.Delete(c(3))
if !ok {
t.Error("sh... | explode_data.jsonl/51549 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 278
} | [
2830,
3393,
65775,
391,
19103,
1949,
6435,
1155,
353,
8840,
836,
8,
341,
3244,
265,
391,
1669,
1532,
65775,
391,
741,
197,
6878,
5394,
1669,
4258,
391,
2234,
1337,
7,
18,
1171,
743,
5394,
341,
197,
3244,
6141,
445,
5445,
537,
6644,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInsert5AndRemove1AndRootShouldBeNode4(t *testing.T) {
tree := NewArtTree()
for i := 0; i < 5; i++ {
tree.Insert([]byte{byte(i)}, []byte{byte(i)})
}
tree.Remove([]byte{1})
res := *(tree.root.FindChild(byte(1)))
if res != nil {
t.Error("Did not expect to find child after removal")
}
if tree.size !... | explode_data.jsonl/43959 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
13780,
20,
3036,
13021,
16,
3036,
8439,
14996,
3430,
1955,
19,
1155,
353,
8840,
836,
8,
341,
51968,
1669,
1532,
9286,
6533,
2822,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
20,
26,
600,
1027,
341,
197,
51968,
23142,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequiredWithoutAll(t *testing.T) {
fieldVal := "test"
test := struct {
Field1 string `validate:"omitempty" json:"field_1"`
Field2 *string `validate:"required_without_all=Field1" json:"field_2"`
Field3 map[string]string `validate:"required_without_all=Field2" json:"field_3"`
Fiel... | explode_data.jsonl/77370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 629
} | [
2830,
3393,
8164,
26040,
2403,
1155,
353,
8840,
836,
8,
1476,
39250,
2208,
1669,
330,
1944,
698,
18185,
1669,
2036,
341,
197,
94478,
16,
914,
310,
1565,
7067,
2974,
19967,
1,
2951,
2974,
2566,
62,
16,
8805,
197,
94478,
17,
353,
917,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNiceConfig_GetInt(t *testing.T) {
container := tests.InitBaseContainer()
container.Bind(&env.NiceEnvProvider{})
Convey("test nice env normal case", t, func() {
appService := container.MustMake(contract.AppKey).(contract.App)
envService := container.MustMake(contract.EnvKey).(contract.Env)
folder := fi... | explode_data.jsonl/62522 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 204
} | [
2830,
3393,
44978,
2648,
13614,
1072,
1155,
353,
8840,
836,
8,
341,
53290,
1669,
7032,
26849,
3978,
4502,
741,
53290,
32451,
2099,
3160,
2067,
558,
14359,
5179,
37790,
93070,
5617,
445,
1944,
6419,
6105,
4622,
1142,
497,
259,
11,
2915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCatalog_ListNodes_NodeMetaFilter(t *testing.T) {
t.Parallel()
dir1, s1 := testServer(t)
defer os.RemoveAll(dir1)
defer s1.Shutdown()
codec := rpcClient(t, s1)
defer codec.Close()
testrpc.WaitForLeader(t, s1.RPC, "dc1")
// Add a new node with the right meta k/v pair
node := &structs.Node{Node: "foo",... | explode_data.jsonl/49222 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 742
} | [
2830,
3393,
41606,
27104,
12288,
41340,
12175,
5632,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
48532,
16,
11,
274,
16,
1669,
1273,
5475,
1155,
340,
16867,
2643,
84427,
14161,
16,
340,
16867,
274,
16,
10849,
18452,
741,
43343... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_trie_MarshalBinary(t *testing.T) {
tree := newTrieTree()
tree.Add("hello", 9)
tree.Add("world", 12)
tree.Reset()
trie := tree.(*trieTree)
assert.Len(t, trie.nodesBuf1, 0)
assert.Len(t, trie.nodesBuf2, 0)
assert.Len(t, trie.root.children, 0)
tree.Add("eleme", 1)
tree.Add("eleme", 1)
tree.Add("elem... | explode_data.jsonl/2672 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 350
} | [
2830,
3393,
3547,
645,
1245,
28423,
21338,
1155,
353,
8840,
836,
8,
341,
51968,
1669,
501,
51,
7231,
6533,
741,
51968,
1904,
445,
14990,
497,
220,
24,
340,
51968,
1904,
445,
14615,
497,
220,
16,
17,
692,
51968,
36660,
741,
197,
8927,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFirestoreBatchGetDocuments(t *testing.T) {
var missing string = "missing1069449574"
var transaction []byte = []byte("-34")
var expectedResponse = &firestorepb.BatchGetDocumentsResponse{
Result: &firestorepb.BatchGetDocumentsResponse_Missing{
Missing: missing,
},
Transaction: transaction,
}
mockF... | explode_data.jsonl/27380 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 434
} | [
2830,
3393,
48513,
21074,
1949,
27143,
1155,
353,
8840,
836,
8,
341,
2405,
7402,
914,
284,
330,
30616,
16,
15,
21,
24,
19,
19,
24,
20,
22,
19,
698,
2405,
7745,
3056,
3782,
284,
3056,
3782,
13645,
18,
19,
1138,
2405,
3601,
2582,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileServerCleanPath(t *testing.T) {
tests := []struct {
path string
wantCode int
wantOpen []string
}{
{"/", 200, []string{"/", "/index.html"}},
{"/dir", 301, []string{"/dir"}},
{"/dir/", 200, []string{"/dir", "/dir/index.html"}},
}
for _, tt := range tests {
var log []string
rr := httpt... | explode_data.jsonl/48241 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 312
} | [
2830,
3393,
1703,
5475,
27529,
1820,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
26781,
257,
914,
198,
197,
50780,
2078,
526,
198,
197,
50780,
5002,
3056,
917,
198,
197,
59403,
197,
197,
90,
3115,
497,
220,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateNodeAffinitySort(t *testing.T) {
assert := assert.New(t)
//unsort labels gives sorted result
nodeAffinity := createNodeAffinity(map[string]string{
"B": "value2",
"A": "value1",
"D": "value4",
"E": "value5",
"C": "value3",
})
assert.Equal(nodeAffinity.RequiredDuringSchedulingIgnoredDuring... | explode_data.jsonl/54107 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 531
} | [
2830,
3393,
4021,
1955,
25841,
13489,
10231,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
197,
322,
359,
6860,
9201,
6696,
10615,
1102,
198,
20831,
25841,
13489,
1669,
1855,
1955,
25841,
13489,
9147,
14032,
30953,
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 TestStringArrFlag(t *testing.T) {
tests := []struct {
init []string
def string
in []string
expected []string
}{
{nil, "test", nil, []string{"test"}},
{nil, "test", []string{"new"}, []string{"new"}},
{nil, "test", []string{"a", "b"}, []string{"a", "b"}},
{[]string{"default"}, "newde... | explode_data.jsonl/32976 | {
"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,
703,
8838,
12135,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
28248,
257,
3056,
917,
198,
197,
7452,
414,
914,
198,
197,
17430,
981,
3056,
917,
198,
197,
42400,
3056,
917,
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... | 4 |
func TestZKGroupStorageClaimAndGetAndReleasePartition(t *testing.T) {
zk := newZKGroupStorage([]string{"127.0.0.1:2181"}, 6*time.Second)
err := zk.claimPartition(testGroup, testTopic, 0, testConsumerID)
if err != nil {
t.Error(err)
}
err = zk.releasePartition(testGroup, testTopic, 0)
if err != nil {
t.Error... | explode_data.jsonl/5650 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 362
} | [
2830,
3393,
57,
42,
2808,
5793,
45544,
97726,
3036,
16077,
49978,
1155,
353,
8840,
836,
8,
341,
20832,
74,
1669,
501,
57,
42,
2808,
5793,
10556,
917,
4913,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
17,
16,
23,
16,
14345,
220,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequiredPositionalMultiple(t *testing.T) {
var args struct {
Input string `arg:"positional"`
Multiple []string `arg:"positional,required"`
}
err := parse("foo", &args)
assert.Error(t, err)
} | explode_data.jsonl/13003 | {
"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,
8164,
3812,
278,
32089,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
66588,
262,
914,
256,
1565,
858,
2974,
966,
3005,
8805,
197,
9209,
12229,
3056,
917,
1565,
858,
2974,
966,
3005,
11,
6279,
8805,
197,
532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestStoreSafeGetOnSafeReference(t *testing.T) {
st, closer := makeStore()
defer closer()
firstKey := []byte(`firstKey`)
firstValue := []byte(`firstValue`)
firstTag := []byte(`firstTag`)
secondTag := []byte(`secondTag`)
firstItem, err := st.Set(schema.KeyValue{Key: firstKey, Value: firstValue})
assert.NoE... | explode_data.jsonl/77971 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 937
} | [
2830,
3393,
6093,
25663,
1949,
1925,
25663,
8856,
1155,
353,
8840,
836,
8,
341,
18388,
11,
12128,
1669,
1281,
6093,
741,
16867,
12128,
2822,
42190,
1592,
1669,
3056,
3782,
5809,
3896,
1592,
24183,
42190,
1130,
1669,
3056,
3782,
5809,
3896... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPerms(t *testing.T) {
conn, err := dbtest.Connect()
if err != nil {
t.Error(err)
return
}
defer func() {
dbtest.Reset(conn)
dbtest.Disconnect(conn)
}()
// seeds the database with a dummy user account.
auser := &core.User{Login: "spaceghost"}
users := user.New(conn)
err = users.Create(noContex... | explode_data.jsonl/19315 | {
"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,
3889,
1011,
1155,
353,
8840,
836,
8,
341,
32917,
11,
1848,
1669,
2927,
1944,
43851,
741,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
853,
198,
197,
532,
16867,
2915,
368,
341,
197,
20939,
1944,
36660,
20571... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtractLabelsFromKubeEnv(t *testing.T) {
poolLabel := "cloud.google.com/gke-nodepool"
preemptibleLabel := "cloud.google.com/gke-preemptible"
expectedLabels := map[string]string{
"a": "b",
"c": "d",
poolLabel: "pool-3",
preemptibleLabel: "true",
}
cases := []struct ... | explode_data.jsonl/50921 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 820
} | [
2830,
3393,
28959,
23674,
3830,
42,
3760,
14359,
1155,
353,
8840,
836,
8,
341,
85273,
2476,
1669,
330,
12361,
5713,
905,
4846,
440,
39054,
10285,
698,
40346,
20968,
1238,
2476,
1669,
330,
12361,
5713,
905,
4846,
440,
21334,
20968,
1238,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetUserTokensMultiple(t *testing.T) {
requests := []*http.Request{}
ts := httptest.NewTLSServer(
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if len(requests) == 0 {
fmt.Fprintln(w, getUserTokensPage1Response)
} else {
fmt.Fprintln(w, getUserTokensPage2Response)
}
req... | explode_data.jsonl/61414 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 311
} | [
2830,
3393,
1949,
1474,
29300,
32089,
1155,
353,
8840,
836,
8,
341,
23555,
82,
1669,
29838,
1254,
9659,
16094,
57441,
1669,
54320,
70334,
7121,
13470,
1220,
2836,
1006,
197,
28080,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExpandWithExprsSuccess(t *testing.T) {
f := func(q, qExpected string) {
t.Helper()
for i := 0; i < 3; i++ {
qExpanded, err := ExpandWithExprs(q)
if err != nil {
t.Fatalf("unexpected error when expanding %q: %s", q, err)
}
if qExpanded != qExpected {
t.Fatalf("unexpected expanded expres... | explode_data.jsonl/19190 | {
"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,
38946,
2354,
16041,
82,
7188,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
2915,
10583,
11,
2804,
18896,
914,
8,
341,
197,
3244,
69282,
741,
197,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
18,
26,
600,
1027,
341,
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... | 4 |
func TestRemoveSigningMethod(t *testing.T) {
RegisterSigningMethod(MySigningMethod)
if GetSigningMethod("SuperSignerAlgorithm1000") == nil {
t.Error("Expected SuperSignerAlgorithm1000, got nil")
}
RemoveSigningMethod(MySigningMethod)
if a := GetSigningMethod("SuperSignerAlgorithm1000"); a != nil {
t.Errorf(... | explode_data.jsonl/33942 | {
"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,
13021,
93358,
3523,
1155,
353,
8840,
836,
8,
341,
79096,
93358,
3523,
37485,
93358,
3523,
692,
743,
2126,
93358,
3523,
445,
19284,
7264,
261,
27847,
16,
15,
15,
15,
899,
621,
2092,
341,
197,
3244,
6141,
445,
18896,
7297,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSpanStatusCode(t *testing.T) {
td := NewTraces()
status := td.ResourceSpans().AppendEmpty().InstrumentationLibrarySpans().AppendEmpty().Spans().AppendEmpty().Status()
// Check handling of deprecated status code, see spec here:
// https://github.com/open-telemetry/opentelemetry-proto/blob/59c488bfb8fb6d045... | explode_data.jsonl/79477 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 563
} | [
2830,
3393,
12485,
15872,
1155,
353,
8840,
836,
8,
341,
76373,
1669,
1532,
1282,
2434,
741,
23847,
1669,
17941,
20766,
6406,
596,
1005,
23877,
3522,
1005,
56324,
367,
16915,
6406,
596,
1005,
23877,
3522,
1005,
6406,
596,
1005,
23877,
3522... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseCommandLine2(t *testing.T) {
g := NewWithT(t)
cmdLine := utils.ParseCommandLine("go test ./test/integration -test.timeout 300s -count 1 --run \"^(TestNSMHealLocalDieNSMD)$\" --tags \"basic recover usecase\" --test.v")
g.Expect(len(cmdLine)).To(Equal(12))
} | explode_data.jsonl/59870 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
14463,
71885,
17,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
2354,
51,
1155,
692,
25920,
2460,
1669,
12439,
8937,
71885,
445,
3346,
1273,
12991,
1944,
31114,
17376,
481,
1944,
36110,
220,
18,
15,
15,
82,
481,
1830,
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 TestExcelizeImage(t *testing.T) {
f := excelize.NewFile()
// 插入图片
if err := f.AddPicture("Sheet1", "A2", "image.png", ""); err != nil {
fmt.Println(err)
}
// 在工作表中插入图片,并设置图片的缩放比例
if err := f.AddPicture("Sheet1", "E2", "image.jpeg", `{
"x_scale": 0.5,
"y_scale": 0.5
}`); err != nil {
f... | explode_data.jsonl/475 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 440
} | [
2830,
3393,
20055,
551,
1906,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
3438,
19412,
7121,
1703,
741,
197,
322,
55059,
240,
17254,
45930,
198,
743,
1848,
1669,
282,
1904,
24669,
445,
10541,
16,
497,
330,
32,
17,
497,
330,
1805,
3508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoTLSCertificate(t *testing.T) {
// Scenario: The node is sent a message by another node that doesn't
// connect with mutual TLS, thus doesn't provide a TLS certificate
node1 := newTestNode(t)
defer node1.stop()
node1.c.Configure(testChannel, []cluster.RemoteNode{node1.nodeInfo})
clientConfig := comm_u... | explode_data.jsonl/39838 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 414
} | [
2830,
3393,
2753,
13470,
3540,
20962,
1155,
353,
8840,
836,
8,
341,
197,
322,
58663,
25,
576,
2436,
374,
3208,
264,
1943,
553,
2441,
2436,
429,
3171,
944,
198,
197,
322,
4564,
448,
26750,
41654,
11,
8450,
3171,
944,
3410,
264,
41654,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSocketPVPubKey(t *testing.T) {
for _, tc := range socketTestCases(t) {
func() {
var (
chainID = cmn.RandStr(12)
validatorEndpoint, serviceEndpoint = testSetupSocketPair(
t,
chainID,
types.NewMockPV(),
tc.addr,
tc.dialer)
)
defer validatorE... | explode_data.jsonl/77979 | {
"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,
10286,
47,
13378,
392,
1592,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
7575,
2271,
37302,
1155,
8,
341,
197,
29244,
368,
341,
298,
2405,
2399,
571,
197,
8819,
915,
999,
284,
9961,
77,
2013,
437,
2580,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccAWSDBInstance_portUpdate(t *testing.T) {
var v rds.DBInstance
rName := acctest.RandString(5)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSDBInstanceDestroy,
Steps: []resource.TestStep{
{
Conf... | explode_data.jsonl/33927 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 361
} | [
2830,
3393,
14603,
36136,
3506,
2523,
8716,
4289,
1155,
353,
8840,
836,
8,
341,
2405,
348,
435,
5356,
22537,
2523,
271,
7000,
675,
1669,
1613,
67880,
2013,
437,
703,
7,
20,
692,
50346,
8787,
1155,
11,
5101,
31363,
515,
197,
197,
4703,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFibonacciNegative(t *testing.T) {
var test_values = []int{-1, -2, -3, -10, -1000, -1000000, math.MinInt64}
for _, i := range test_values {
if _, err := NewGenerator(i); err == nil {
t.Errorf("Expected NewGenerator to return error when asked for %d iterations", i)
}
}
} | explode_data.jsonl/44340 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 116
} | [
2830,
3393,
37,
579,
39345,
38489,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
9146,
284,
3056,
396,
19999,
16,
11,
481,
17,
11,
481,
18,
11,
481,
16,
15,
11,
481,
16,
15,
15,
15,
11,
481,
16,
15,
15,
15,
15,
15,
15,
11,
6888,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStaticDriverInfo(t *testing.T) {
for _, tc := range []struct {
Scenario string
input string
needsMac bool
driver string
boot string
management string
power string
raid string
vendor string
}{
{
Scenario: "ipmi",
input: "ipmi://192.168.122.1:6... | explode_data.jsonl/11830 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1407
} | [
2830,
3393,
11690,
11349,
1731,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
197,
54031,
256,
914,
198,
197,
22427,
414,
914,
198,
197,
197,
55245,
19552,
256,
1807,
198,
197,
33652,
257,
914,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestGCAfterPin(t *testing.T) {
chunkCount := 50
db := newTestDB(t, &Options{
Capacity: 100,
})
pinAddrs := make([]swarm.Address, 0)
// upload random chunks
for i := 0; i < chunkCount; i++ {
ch := generateTestRandomChunk()
// call unreserve on the batch with radius 0 so that
// localstore is aware... | explode_data.jsonl/11631 | {
"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,
38,
5049,
1046,
19861,
1155,
353,
8840,
836,
8,
1476,
23049,
3122,
2507,
1669,
220,
20,
15,
271,
20939,
1669,
501,
2271,
3506,
1155,
11,
609,
3798,
515,
197,
6258,
391,
4018,
25,
220,
16,
15,
15,
345,
197,
8824,
3223,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLexMode(t *testing.T) {
cases := []struct {
Input string
Mode lexModeValue
}{
{
"",
lexModeHcl,
},
{
"foo",
lexModeHcl,
},
{
"{}",
lexModeJson,
},
{
" {}",
lexModeJson,
},
}
for i, tc := range cases {
actual := lexMode(tc.Input)
if actual != tc.Mode {
... | explode_data.jsonl/34507 | {
"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,
47778,
3636,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
66588,
914,
198,
197,
197,
3636,
220,
22429,
3636,
1130,
198,
197,
59403,
197,
197,
515,
298,
197,
39680,
298,
197,
2571,
3636,
39,
564,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAlphaValidateVolumeDevices(t *testing.T) {
volumes := []core.Volume{
{Name: "abc", VolumeSource: core.VolumeSource{PersistentVolumeClaim: &core.PersistentVolumeClaimVolumeSource{ClaimName: "testclaim1"}}},
{Name: "abc-123", VolumeSource: core.VolumeSource{PersistentVolumeClaim: &core.PersistentVolumeClaim... | explode_data.jsonl/1018 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1177
} | [
2830,
3393,
19384,
17926,
18902,
40835,
1155,
353,
8840,
836,
8,
341,
5195,
19705,
1669,
3056,
2153,
79106,
515,
197,
197,
63121,
25,
330,
13683,
497,
20265,
3608,
25,
6200,
79106,
3608,
90,
53194,
18902,
45544,
25,
609,
2153,
61655,
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... | 6 |
func TestToFromOtlp(t *testing.T) {
otlp := &otlptrace.TracesData{}
td := TracesFromInternalRep(internal.TracesFromOtlp(otlp))
assert.EqualValues(t, NewTraces(), td)
assert.EqualValues(t, otlp, internal.TracesToOtlp(td.InternalRep()))
// More tests in ./tracedata/traces_test.go. Cannot have them here because of
/... | explode_data.jsonl/79478 | {
"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,
1249,
3830,
46,
11544,
79,
1155,
353,
8840,
836,
8,
341,
197,
354,
13545,
1669,
609,
354,
75,
3505,
578,
8240,
2434,
1043,
16094,
76373,
1669,
1163,
2434,
3830,
11569,
18327,
98364,
8240,
2434,
3830,
46,
11544,
79,
7,
354,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetServiceCert(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
type testCase struct {
certName string
certChain []byte
privKey []byte
expectError bool
}
testCases := []testCase{
{"foo", []byte("cert-chain"), []byte("priv-key"), false},
{"bar", []byte("cer... | explode_data.jsonl/56036 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 390
} | [
2830,
3393,
1949,
1860,
36934,
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,
1444,
529,
675,
262,
914,
198,
197,
1444,
529,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldUpdateApplicationConfigTerraformResourceStateFromModelWhenTagFilterIsProvided(t *testing.T) {
fullLabel := "prefix label suffix"
applicationConfig := restapi.ApplicationConfig{
ID: applicationConfigID,
Label: fullLabel,
TagFilterExpression: defaultTagFilterModel,
... | explode_data.jsonl/64945 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 430
} | [
2830,
3393,
14996,
4289,
4988,
2648,
51,
13886,
627,
4783,
1397,
3830,
1712,
4498,
5668,
5632,
3872,
35819,
291,
1155,
353,
8840,
836,
8,
341,
94042,
2476,
1669,
330,
11849,
2383,
20525,
698,
197,
5132,
2648,
1669,
2732,
2068,
17521,
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 TestBlobberGRPCService_GetFileMetaData_FileNotExist(t *testing.T) {
req := &blobbergrpc.GetFileMetaDataRequest{
Context: &blobbergrpc.RequestContext{
Client: "client",
ClientKey: "",
Allocation: "",
},
Path: "path",
PathHash: "path_hash",
AuthToken: "testval",
Allocation: "somet... | explode_data.jsonl/66827 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 508
} | [
2830,
3393,
37985,
652,
8626,
4872,
1860,
13614,
1703,
37307,
34061,
45535,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
609,
35112,
652,
56585,
2234,
1703,
37307,
1900,
515,
197,
70871,
25,
609,
35112,
652,
56585,
9659,
1972,
515,
298,
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... | 2 |
func TestMarathonSDRunAndStop(t *testing.T) {
var (
refreshInterval = model.Duration(time.Millisecond * 10)
conf = SDConfig{Servers: testServers, RefreshInterval: refreshInterval}
ch = make(chan []*targetgroup.Group)
doneCh = make(chan error)
)
md, err := NewDiscovery(conf, n... | explode_data.jsonl/73165 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 343
} | [
2830,
3393,
12061,
23941,
5491,
6727,
3036,
10674,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
197,
17168,
10256,
284,
1614,
33795,
9730,
71482,
353,
220,
16,
15,
340,
197,
67850,
310,
284,
8030,
2648,
90,
78139,
25,
1273,
78139,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWSJWTCookieUser(t *testing.T) {
nucSigFunc := func() *jwt.UserClaims { return newJWTTestUserClaims() }
nucBearerFunc := func() *jwt.UserClaims {
ret := newJWTTestUserClaims()
ret.BearerToken = true
return ret
}
o := testWSOptions()
setupAddTrusted(o)
setupAddCookie(o)
s := RunServer(o)
buildMem... | explode_data.jsonl/42736 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1574
} | [
2830,
3393,
7433,
41,
54,
7749,
9619,
1474,
1155,
353,
8840,
836,
8,
1476,
9038,
1754,
47246,
9626,
1669,
2915,
368,
353,
41592,
7344,
51133,
314,
470,
501,
55172,
2271,
1474,
51133,
368,
456,
9038,
1754,
26399,
9626,
1669,
2915,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsNotFound_nested(t *testing.T) {
t.Parallel()
testCases := []struct {
name string
err error
expectMatch bool
}{
{
name: "direct match",
err: requestError{ClientError: ClientError{Errors: []clientErrorSubError{{Message: "status code 404"}}}},
expectMatch: true,... | explode_data.jsonl/6267 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 504
} | [
2830,
3393,
3872,
10372,
66279,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
9859,
260,
1465,
198,
197,
24952,
8331,
1807,
198,
197,
59403,
197,
197,
515,
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 TestAllocsInterfaceBig(t *testing.T) {
if testing.Short() {
t.Skip("skipping malloc count in short mode")
}
v := ValueOf(S{})
if allocs := testing.AllocsPerRun(100, func() { v.Interface() }); allocs > 0 {
t.Error("allocs:", allocs)
}
} | explode_data.jsonl/29617 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
25154,
82,
5051,
15636,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
15731,
1760,
304,
2805,
3856,
1138,
197,
532,
5195,
1669,
5162,
2124,
3759,
37790,
743,
5574,
82,
1669,
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 TestInfluxDB(t *testing.T) {
Convey("InfluxDB", t, func() {
datasource := &models.DataSource{
Url: "http://awesome-influxdb:1337",
Database: "awesome-db",
JsonData: simplejson.New(),
}
query := "SELECT awesomeness FROM somewhere"
e := &InfluxDBExecutor{
QueryParser: &InfluxdbQueryParse... | explode_data.jsonl/76125 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 687
} | [
2830,
3393,
641,
36706,
3506,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
641,
36706,
3506,
497,
259,
11,
2915,
368,
341,
197,
2698,
19346,
919,
1669,
609,
6507,
21698,
515,
298,
197,
2864,
25,
414,
330,
1254,
1110,
16875,
3419,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExportMultiplexing(t *testing.T) {
metricSink := newMetricAppender()
_, port, doneFn := ocReceiverOnGRPCServer(t, metricSink)
defer doneFn()
metricsClient, metricsClientDoneFn, err := makeMetricsServiceClient(port)
require.NoError(t, err, "Failed to create the gRPC MetricsService_ExportClient: %v", err)... | explode_data.jsonl/1887 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1683
} | [
2830,
3393,
16894,
57251,
2571,
287,
1155,
353,
8840,
836,
8,
341,
2109,
16340,
45094,
1669,
501,
54310,
2164,
1659,
2822,
197,
6878,
2635,
11,
2814,
24911,
1669,
17796,
25436,
1925,
8626,
4872,
5475,
1155,
11,
18266,
45094,
340,
16867,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExternalTable(t *testing.T) {
if testing.Short() {
t.Skip()
}
execStatements(t, []string{
"create database external",
"create table external.ext(id int, val varbinary(128), primary key(id))",
})
defer execStatements(t, []string{
"drop database external",
})
engine.se.Reload(context.Background()... | explode_data.jsonl/10423 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 238
} | [
2830,
3393,
25913,
2556,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
630,
67328,
93122,
1155,
11,
3056,
917,
515,
197,
197,
1,
3182,
4625,
9250,
756,
197,
197,
1,
3182,
1965,
9250,
9220,
372... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHelmHookWeight(t *testing.T) {
Given(t).
Path("hook").
When().
// this create a weird hook, that runs during sync - but before the pod, and because it'll fail - the pod will never be created
PatchFile("hook.yaml", `[
{"op": "replace", "path": "/metadata/annotations", "value": {"argocd.argoproj.io/hoo... | explode_data.jsonl/69393 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
39,
23162,
31679,
8295,
1155,
353,
8840,
836,
8,
341,
9600,
2071,
1155,
4292,
197,
69640,
445,
20873,
38609,
197,
197,
4498,
25829,
197,
197,
322,
419,
1855,
264,
16283,
9704,
11,
429,
8473,
2337,
12811,
481,
714,
1573,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestExamplesComplete(t *testing.T) {
t.Parallel()
terraformOptions := &terraform.Options{
// The path to where our Terraform code is located
TerraformDir: "../../examples/complete",
Upgrade: true,
// Variables to pass to our Terraform code using -var-file options
VarFiles: []string{"fixtures.us-e... | explode_data.jsonl/18791 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 581
} | [
2830,
3393,
40381,
12548,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
61385,
3798,
1669,
609,
61385,
22179,
515,
197,
197,
322,
576,
1815,
311,
1380,
1039,
49426,
627,
2038,
374,
7407,
198,
197,
10261,
13886,
627,
6184,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDelegationSerialization(t *testing.T) {
require := require.New(t)
// NOTE: These cases should be synced with tests in runtime/src/consensus/staking.rs.
for _, tc := range []struct {
rr Delegation
expectedBase64 string
}{
{Delegation{}, "oWZzaGFyZXNA"},
{
Delegation{Shares: mustInitQ... | explode_data.jsonl/36025 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 279
} | [
2830,
3393,
1912,
87566,
35865,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
692,
197,
322,
16743,
25,
4220,
5048,
1265,
387,
85028,
448,
7032,
304,
15592,
13437,
14,
6254,
13626,
14272,
1765,
25638,
624,
2023,
8358,
171... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientNonIdempotentRetry(t *testing.T) {
t.Parallel()
dialsCount := 0
c := &Client{
Dial: func(addr string) (net.Conn, error) {
dialsCount++
switch dialsCount {
case 1, 2:
return &readErrorConn{}, nil
case 3:
return &singleReadConn{
s: "HTTP/1.1 345 OK\r\nContent-Type: foobar\r\n... | explode_data.jsonl/79369 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 550
} | [
2830,
3393,
2959,
8121,
764,
3262,
63532,
51560,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
2698,
10309,
2507,
1669,
220,
15,
198,
1444,
1669,
609,
2959,
515,
197,
10957,
530,
25,
2915,
24497,
914,
8,
320,
4711,
50422,
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 TestRoutes_userRoutes(t *testing.T) {
t.Parallel()
m := mux.NewRouter()
userRoutes(m, nil)
cases := []struct {
req *http.Request
vars map[string]string
}{
{
req: httptest.NewRequest("GET", "/new", nil),
},
{
req: httptest.NewRequest("GET", "/import", nil),
},
{
req: httptest.NewReque... | explode_data.jsonl/41248 | {
"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,
26653,
3317,
26653,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
2109,
1669,
59807,
7121,
9523,
741,
19060,
26653,
1255,
11,
2092,
692,
1444,
2264,
1669,
3056,
1235,
341,
197,
24395,
220,
353,
1254,
9659,
198,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestContinuousVestingAccountMarshal(t *testing.T) {
pubkey := secp256k1.GenPrivKey().PubKey()
addr := sdk.AccAddress(pubkey.Address())
coins := sdk.NewCoins(sdk.NewInt64Coin("test", 5))
baseAcc := authtypes.NewBaseAccount(addr, pubkey, 50)
baseVesting := types.NewBaseVestingAccount(baseAcc, coins, time.Now()... | explode_data.jsonl/31297 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
94780,
53,
59855,
7365,
55438,
1155,
353,
8840,
836,
8,
341,
62529,
792,
1669,
511,
4672,
17,
20,
21,
74,
16,
65384,
32124,
1592,
1005,
29162,
1592,
741,
53183,
1669,
45402,
77538,
4286,
74186,
792,
26979,
2398,
197,
29609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListen(t *testing.T) {
pair, err := unix.Socketpair(unix.AF_UNIX, unix.SOCK_STREAM, 0)
if err != nil {
t.Fatalf("unix.Socket(unix.AF_UNIX, unix.SOCK_STREAM, 0) => %v", err)
}
ctx := contexttest.Context(t)
sfile1, err := newSocket(ctx, pair[0], false)
if err != nil {
t.Fatalf("newSocket(%v) => %v", pa... | explode_data.jsonl/255 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 663
} | [
2830,
3393,
38714,
1155,
353,
8840,
836,
8,
341,
3223,
1310,
11,
1848,
1669,
51866,
52089,
12670,
18364,
941,
70860,
82754,
11,
51866,
78922,
23584,
11,
220,
15,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
56646,
52089,
18364... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConditions(t *testing.T) {
client := enttest.Open(t, "sqlite3", "file:ent?mode=memory&cache=shared&_fk=1", enttest.WithMigrateOptions(migrate.WithGlobalUniqueID(true)))
defer client.Close()
var calls int
defer func() { require.Equal(t, 2, calls) }()
client.Card.Use(hook.If(func(next ent.Mutator) ent.Muta... | explode_data.jsonl/36052 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 562
} | [
2830,
3393,
35435,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
1197,
1944,
12953,
1155,
11,
330,
37042,
18,
497,
330,
1192,
25,
306,
30,
8516,
28,
17269,
5,
9360,
28,
6100,
85047,
41718,
28,
16,
497,
1197,
1944,
26124,
44,
34479,
379... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHTTPProxyRouteWithAServiceWeight(t *testing.T) {
rh, cc, done := setup(t)
defer done()
rh.OnAdd(&v1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: "kuard",
Namespace: "default",
},
Spec: v1.ServiceSpec{
Ports: []v1.ServicePort{{
Protocol: "TCP",
Port: 80,
TargetPort: ... | explode_data.jsonl/70766 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 900
} | [
2830,
3393,
9230,
16219,
4899,
2354,
32,
1860,
8295,
1155,
353,
8840,
836,
8,
341,
7000,
71,
11,
12527,
11,
2814,
1669,
6505,
1155,
340,
16867,
2814,
2822,
7000,
71,
8071,
2212,
2099,
85,
16,
13860,
515,
197,
23816,
12175,
25,
77520,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntegrationHTTPDoUnknownDNS(t *testing.T) {
ctx := context.Background()
results := HTTPDo(ctx, HTTPDoConfig{
URL: "http://ooni.io",
DNSServerNetwork: "antani",
})
if !strings.HasSuffix(results.Error.Error(), "unsupported network value") {
t.Fatal("not the error that we expected")
}
} | explode_data.jsonl/53534 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 123
} | [
2830,
3393,
52464,
9230,
5404,
13790,
61088,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
55497,
1669,
10130,
5404,
7502,
11,
10130,
5404,
2648,
515,
197,
79055,
25,
1060,
330,
1254,
1110,
9009,
72,
4245,
756,
197,
10957... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContextMatches(t *testing.T) {
for repo, presubmits := range c.PresubmitsStatic {
for _, p := range presubmits {
checkContext(t, repo, p)
}
}
} | explode_data.jsonl/55573 | {
"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,
1972,
42470,
1155,
353,
8840,
836,
8,
341,
2023,
15867,
11,
1652,
392,
44703,
1669,
2088,
272,
1069,
416,
392,
44703,
11690,
341,
197,
2023,
8358,
281,
1669,
2088,
1652,
392,
44703,
341,
298,
25157,
1972,
1155,
11,
15867,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBasic(t *testing.T) {
blob, err := JSON("test/a/b")
assert.For(t).ThatActual(err).IsNil()
compareBlobTo(t, blob, "expected_a_b.json")
} | explode_data.jsonl/6315 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 67
} | [
2830,
3393,
15944,
1155,
353,
8840,
836,
8,
341,
2233,
1684,
11,
1848,
1669,
4718,
445,
1944,
14186,
3470,
5130,
6948,
26676,
1155,
568,
4792,
28123,
3964,
568,
3872,
19064,
2822,
197,
18948,
37985,
1249,
1155,
11,
23404,
11,
330,
7325,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWriterDict(t *testing.T) {
const (
dict = "hello world"
text = "hello again world"
)
var b bytes.Buffer
w, err := NewWriter(&b, 5)
if err != nil {
t.Fatalf("NewWriter: %v", err)
}
w.Write([]byte(dict))
w.Flush()
b.Reset()
w.Write([]byte(text))
w.Close()
var b1 bytes.Buffer
w, _ = NewWriterD... | explode_data.jsonl/81410 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
6492,
13448,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
2698,
849,
284,
330,
14990,
1879,
698,
197,
15425,
284,
330,
14990,
1549,
1879,
698,
197,
340,
2405,
293,
5820,
22622,
198,
6692,
11,
1848,
1669,
1532,
6492,
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 TestValidateKubernetesLabelValue(t *testing.T) {
validLabelValues := []string{"", "a", "a1", "this--valid--label--is--exactly--sixty--three--characters--long", "123456", "my-label_valid.com"}
invalidLabelValues := []string{"a$$b", "-abc", "not.valid.", "This____long____label___is______sixty______four_____charar... | explode_data.jsonl/17871 | {
"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,
17926,
42,
29827,
2476,
1130,
1155,
353,
8840,
836,
8,
1476,
56322,
2476,
6227,
1669,
3056,
917,
4913,
497,
330,
64,
497,
330,
64,
16,
497,
330,
574,
313,
1891,
313,
1502,
313,
285,
313,
327,
32739,
313,
50364,
1881,
313... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestCheckUnorderedExchangeV2WithProofs(t *testing.T) {
to, path := createCheckerTestObjects(t)
defer func() {
to.stor.close(t)
err := common.CleanTemporaryDirs(path)
assert.NoError(t, err, "failed to clean test data dirs")
}()
tx := createUnorderedExchangeWithProofs(t, 2)
info := defaultCheckerInfo(t... | explode_data.jsonl/63086 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 329
} | [
2830,
3393,
3973,
1806,
10544,
31564,
53,
17,
2354,
31076,
82,
1155,
353,
8840,
836,
8,
341,
31709,
11,
1815,
1669,
1855,
35188,
2271,
11543,
1155,
692,
16867,
2915,
368,
341,
197,
31709,
1236,
269,
4653,
1155,
692,
197,
9859,
1669,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFailFastWorkflowLauncher(t *testing.T) {
ctx := context.TODO()
f := NewFailFastLaunchPlanExecutor()
t.Run("getStatus", func(t *testing.T) {
a, err := f.GetStatus(ctx, &core.WorkflowExecutionIdentifier{
Project: "p",
Domain: "d",
Name: "n",
})
assert.Nil(t, a)
assert.Error(t, err)
})
... | explode_data.jsonl/13093 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 439
} | [
2830,
3393,
19524,
32174,
62768,
91176,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
90988,
741,
1166,
1669,
1532,
19524,
32174,
32067,
20485,
25255,
741,
3244,
16708,
445,
68873,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
11323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBlkioBFQStats(t *testing.T) {
helper := NewCgroupTestUtil("blkio", t)
defer helper.cleanup()
helper.writeFileContents(blkioBFQStatsTestFiles)
blkio := &BlkioGroup{}
actualStats := *cgroups.NewStats()
err := blkio.GetStats(helper.CgroupPath, &actualStats)
if err != nil {
t.Fatal(err)
}
expectedStats... | explode_data.jsonl/45838 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 448
} | [
2830,
3393,
4923,
74,
815,
19883,
48,
16635,
1155,
353,
8840,
836,
8,
341,
9598,
2947,
1669,
1532,
34,
4074,
2271,
2742,
445,
34989,
815,
497,
259,
340,
16867,
13137,
87689,
741,
9598,
2947,
70007,
14803,
29811,
74,
815,
19883,
48,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestStatusCompletion(t *testing.T) {
rels := []*release.Release{
{
Name: "athos",
Namespace: "default",
Info: &release.Info{
Status: release.StatusDeployed,
},
Chart: &chart.Chart{
Metadata: &chart.Metadata{
Name: "Athos-chart",
Version: "1.2.3",
},
},
}, {
N... | explode_data.jsonl/50601 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 754
} | [
2830,
3393,
2522,
33190,
1155,
353,
8840,
836,
8,
341,
197,
53783,
1669,
29838,
22998,
58693,
515,
197,
197,
515,
298,
21297,
25,
414,
330,
587,
436,
756,
298,
90823,
25,
330,
2258,
756,
298,
197,
1731,
25,
609,
22998,
20132,
515,
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... | 1 |
func TestInstanceMysql(t *testing.T) {
t.Run("test instance mysql", func(t *testing.T) {
mysql := Instance()
if mysql == nil {
t.Error("mysql instance is nil")
}
})
} | explode_data.jsonl/19486 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 73
} | [
2830,
3393,
2523,
44,
14869,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
2867,
10564,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
56955,
1669,
19283,
741,
197,
743,
10564,
621,
2092,
341,
298,
3244,
6141,
445,
12272,
2867,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClusterServiceBrokerDoesNotExist(t *testing.T) {
// GIVEN
require.NoError(t, v1beta1.AddToScheme(scheme.Scheme))
cli := fake.NewFakeClientWithScheme(scheme.Scheme)
sut := NewClusterBrokersFacade(cli, fixWorkingNs(), fixService(), fixBrokerName(), logrus.New())
// WHEN
ex, err := sut.Exist()
// THEN
re... | explode_data.jsonl/74976 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
28678,
1860,
65545,
21468,
45535,
1155,
353,
8840,
836,
8,
341,
197,
322,
89836,
198,
17957,
35699,
1155,
11,
348,
16,
19127,
16,
1904,
1249,
28906,
1141,
8058,
92719,
1171,
86448,
1669,
12418,
7121,
52317,
2959,
2354,
28906,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultiDoc(t *testing.T) {
f := Yaml{}
yaml := ` apiVersion: batch/v1
kind: Job
metadata:
name: pi
spec:
trolo:
lolo: lo
---
apiVersion: batch/v1
kind: Job
metadata:
name: pi2
spec:
trolo:
lolo: lo
---
apiVersion: batch/v1
kind: Job
metadata:
name: pi3
... | explode_data.jsonl/34054 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 507
} | [
2830,
3393,
20358,
9550,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
809,
9467,
16094,
14522,
9467,
1669,
1565,
220,
6330,
5637,
25,
7162,
5457,
16,
198,
220,
3093,
25,
12011,
198,
220,
11160,
510,
262,
829,
25,
8938,
198,
220,
1398,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.