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 Test_SequenceTimeoutDelayedTask(t *testing.T) {
projectName := "sequence-timeout-delay"
serviceName := "my-service"
sequenceStateShipyardFilePath, err := CreateTmpShipyardFile(sequenceTimeoutWithTriggeredAfterShipyard)
require.Nil(t, err)
defer os.Remove(sequenceStateShipyardFilePath)
t.Logf("creating proje... | explode_data.jsonl/59554 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 639
} | [
2830,
3393,
26920,
4375,
7636,
57361,
6262,
1155,
353,
8840,
836,
8,
341,
72470,
675,
1669,
330,
15512,
7246,
411,
45171,
698,
52934,
675,
1669,
330,
2408,
23461,
698,
197,
15512,
1397,
29624,
17428,
19090,
11,
1848,
1669,
4230,
35986,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPluginDhcp1(t *testing.T) {
a := &DhcpTestBase{
testname: "dhcp1",
dropAll: false,
monitor: false,
match: 0,
capture: true,
duration: 120 * time.Second,
clientsToSim: 1,
}
a.Run(t)
} | explode_data.jsonl/80096 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
11546,
35,
62169,
16,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
609,
35,
62169,
2271,
3978,
515,
197,
18185,
606,
25,
257,
330,
96220,
16,
756,
197,
2698,
887,
2403,
25,
414,
895,
345,
197,
197,
32225,
25,
414,
895,
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 TestValidateBridgeType(t *testing.T) {
t.Parallel()
store, cleanup := cltest.NewStore(t)
defer cleanup()
tests := []struct {
description string
request models.BridgeTypeRequest
want error
}{
{
"no adapter name",
models.BridgeTypeRequest{
URL: cltest.WebURL(t, "https://denergy.et... | explode_data.jsonl/75329 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1027
} | [
2830,
3393,
17926,
32848,
929,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
57279,
11,
21290,
1669,
1185,
1944,
7121,
6093,
1155,
340,
16867,
21290,
2822,
78216,
1669,
3056,
1235,
341,
197,
42407,
914,
198,
197,
23555,
257,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNetworksPruneError(t *testing.T) {
client := &Client{
client: newMockClient(errorMock(http.StatusInternalServerError, "Server error")),
version: "1.25",
}
filters := filters.NewArgs()
_, err := client.NetworksPrune(context.Background(), filters)
if err == nil || err.Error() != "Error response from ... | explode_data.jsonl/41334 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 173
} | [
2830,
3393,
12320,
82,
3533,
2886,
1454,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
609,
2959,
515,
197,
25291,
25,
220,
501,
11571,
2959,
6390,
11571,
19886,
66760,
11,
330,
5475,
1465,
30154,
197,
74954,
25,
330,
16,
13,
17,
20,
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... | 4 |
func TestGetSCSIIdLun(t *testing.T) {
tests := []struct {
index int
expectedScsiID int
expectedLun int
}{
{0, 0, 0},
{1, 0, 1},
{2, 0, 2},
{255, 0, 255},
{256, 1, 0},
{257, 1, 1},
{258, 1, 2},
{512, 2, 0},
{513, 2, 1},
}
for _, test := range tests {
scsiID, lun, err := GetSCSI... | explode_data.jsonl/8213 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 314
} | [
2830,
3393,
1949,
3540,
13817,
764,
43,
359,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
26327,
688,
526,
198,
197,
42400,
3326,
6321,
915,
526,
198,
197,
42400,
43,
359,
262,
526,
198,
197,
59403,
197,
197,
90,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestSchemaRegistryClient_JsonSchemaParses(t *testing.T) {
{
server, call := mockServerWithSchemaResponse(t, "test1-value", "latest", schemaResponse{
Subject: "test1",
Version: 1,
Schema: "{\"type\": \"object\",\n\"properties\": {\n \"f1\": {\n \"type\": \"string\"\n }}}",
ID: ... | explode_data.jsonl/73768 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 509
} | [
2830,
3393,
8632,
15603,
2959,
62,
5014,
8632,
47,
1561,
288,
1155,
353,
8840,
836,
8,
341,
197,
515,
197,
41057,
11,
1618,
1669,
7860,
5475,
2354,
8632,
2582,
1155,
11,
330,
1944,
16,
19083,
497,
330,
19350,
497,
10802,
2582,
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 TestCloudProviderNodeShutdown(t *testing.T) {
testCases := []struct {
testName string
node *v1.Node
shutdown bool
}{
{
testName: "node shutdowned add taint",
shutdown: true,
node: &v1.Node{
ObjectMeta: metav1.ObjectMeta{
Name: "node0",
CreationTimestamp: metav1.Da... | explode_data.jsonl/9612 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1526
} | [
2830,
3393,
16055,
5179,
1955,
62004,
1155,
353,
8840,
836,
8,
1476,
18185,
37302,
1669,
3056,
1235,
341,
197,
18185,
675,
914,
198,
197,
20831,
257,
353,
85,
16,
21714,
198,
197,
36196,
18452,
1807,
198,
197,
59403,
197,
197,
515,
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 TestSerialize(t *testing.T) {
t.Log(`Should serialize todos correctly`)
mockNow := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
todo := Todo{
ID: 1,
Title: MakeNullString("example title"),
Note: MakeNullString("example note"),
CreatedAt: mockNow,
ModifiedAt: mockN... | explode_data.jsonl/44573 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 826
} | [
2830,
3393,
15680,
1155,
353,
8840,
836,
8,
341,
3244,
5247,
5809,
14996,
24235,
15519,
12440,
24183,
77333,
7039,
1669,
882,
8518,
7,
17,
15,
15,
24,
11,
882,
2067,
859,
1377,
11,
220,
16,
15,
11,
220,
17,
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... | 4 |
func TestGooseFSEngine_calculateMountPointsChanges(t *testing.T) {
testCases := map[string]struct {
mounted []string
current []string
expect map[string][]string
}{
"calculate mount point changes test case 1": {
mounted: []string{"hadoop3.3.0"},
current: []string{"hadoopcurrent", "hadoop3.3.0"},
exp... | explode_data.jsonl/70293 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 725
} | [
2830,
3393,
10850,
960,
37,
925,
70891,
24005,
11207,
16284,
11411,
11317,
1155,
353,
8840,
836,
8,
1476,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
2109,
629,
291,
3056,
917,
198,
197,
20121,
3056,
917,
198,
197,
24952,
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... | 4 |
func TestWaitForCompletionFailed(t *testing.T) {
size := 2
done := make(chan bool, size)
totalWaitTime = time.Second
assert.False(t, waitForCompletion(done))
totalWaitTime = 60 * time.Second
} | explode_data.jsonl/62013 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 69
} | [
2830,
3393,
14190,
2461,
33190,
9408,
1155,
353,
8840,
836,
8,
341,
13832,
1669,
220,
17,
198,
40495,
1669,
1281,
35190,
1807,
11,
1379,
340,
34493,
14190,
1462,
284,
882,
32435,
198,
6948,
50757,
1155,
11,
52223,
33190,
34232,
1171,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestBuildTrafficConfiguration_MissingConfig(t *testing.T) {
expected := &Config{
Targets: map[string]RevisionTargets{},
Configurations: map[string]*v1.Configuration{
goodConfig.Name: goodConfig,
},
Revisions: map[string]*v1.Revision{
goodOldRev.Name: goodOldRev,
goodNewRev.Name: goodNewRev,
},
... | explode_data.jsonl/17615 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 499
} | [
2830,
3393,
11066,
87229,
7688,
1245,
13577,
2648,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
609,
2648,
515,
197,
197,
49030,
25,
2415,
14032,
60,
33602,
49030,
38837,
197,
66156,
21449,
25,
2415,
14032,
8465,
85,
16,
17334,
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... | 4 |
func TestValidateWorks(t *testing.T) {
if isValidEndpoint(&hostPortPair{}) {
t.Errorf("Didn't fail for empty set")
}
if isValidEndpoint(&hostPortPair{host: "foobar"}) {
t.Errorf("Didn't fail with invalid port")
}
if isValidEndpoint(&hostPortPair{host: "foobar", port: -1}) {
t.Errorf("Didn't fail with a negat... | explode_data.jsonl/66171 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 177
} | [
2830,
3393,
17926,
37683,
1155,
353,
8840,
836,
8,
341,
743,
26171,
27380,
2099,
3790,
7084,
12443,
28875,
341,
197,
3244,
13080,
445,
86519,
944,
3690,
369,
4287,
738,
1138,
197,
532,
743,
26171,
27380,
2099,
3790,
7084,
12443,
90,
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... | 5 |
func TestDevConfigChange(t *testing.T) {
testutil.Run(t, "test config change", func(t *testutil.T) {
mockRunner := &mockConfigChangeRunner{}
t.Override(&createRunner, func(config.SkaffoldOptions) (runner.Runner, *latest.SkaffoldConfig, error) {
return mockRunner, &latest.SkaffoldConfig{}, nil
})
t.Override... | explode_data.jsonl/2040 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 263
} | [
2830,
3393,
14592,
2648,
4072,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
16708,
1155,
11,
330,
1944,
2193,
2297,
497,
2915,
1155,
353,
1944,
1314,
836,
8,
341,
197,
77333,
19486,
1669,
609,
16712,
2648,
4072,
19486,
31483,
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... | 1 |
func TestCopyFileBackupDir(t *testing.T) {
ctx := context.Background()
ci := fs.GetConfig(ctx)
r := fstest.NewRun(t)
defer r.Finalise()
if !operations.CanServerSideMove(r.Fremote) {
t.Skip("Skipping test as remote does not support server-side move or copy")
}
oldBackupDir := ci.BackupDir
ci.BackupDir = r.Fre... | explode_data.jsonl/51943 | {
"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,
12106,
1703,
56245,
6184,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
72,
1669,
8619,
2234,
2648,
7502,
340,
7000,
1669,
48434,
477,
7121,
6727,
1155,
340,
16867,
435,
991,
977,
1064,
741,
743,
753,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGravatar(t *testing.T) {
Convey("Gravatar", t, func() {
url := Gravatar("fuxiaohei@vip.qq.com", 50)
targetURL := "https://www.gravatar.com/avatar/f72f7454ce9d710baa506394f68f4132?size=50"
So(url, ShouldEqual, targetURL)
url2 := Gravatar("fuxiaohei@vip.qq.com", 0)
targetURL = "https://www.gravatar.c... | explode_data.jsonl/17752 | {
"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,
6464,
11962,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
6464,
11962,
497,
259,
11,
2915,
368,
341,
197,
19320,
1669,
2825,
11962,
445,
69,
2200,
22516,
60852,
31,
64197,
60239,
905,
497,
220,
20,
15,
340,
197,
28861,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPaymentControlSubscribeFail(t *testing.T) {
t.Parallel()
t.Run("register attempt", func(t *testing.T) {
testPaymentControlSubscribeFail(t, true)
})
t.Run("no register attempt", func(t *testing.T) {
testPaymentControlSubscribeFail(t, false)
})
} | explode_data.jsonl/37952 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
20188,
3273,
28573,
19524,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3244,
16708,
445,
6343,
4774,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
18185,
20188,
3273,
28573,
19524,
1155,
11,
830,
340,
197,
3518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLookupValue(t *testing.T) {
values := map[string]interface{}{
"foo": map[string]interface{}{
"bar": "baz",
},
"very": map[string]interface{}{
"very": map[string]interface{}{
"very": map[string]interface{}{
"very": "deep",
},
},
},
"a": "b",
}
for key, expectedResult := range ... | explode_data.jsonl/3663 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 451
} | [
2830,
3393,
34247,
1130,
1155,
353,
8840,
836,
8,
341,
45939,
1669,
2415,
14032,
31344,
67066,
197,
197,
1,
7975,
788,
2415,
14032,
31344,
67066,
298,
197,
1,
2257,
788,
330,
42573,
756,
197,
197,
1583,
197,
197,
1,
1204,
788,
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 TestScopeResolutionOperator(t *testing.T) {
testStr := `<?
MyClass::myfunc($var);
echo MyClass::myconst;
echo $var::myfunc();`
p := NewParser()
p.disableScoping = true
a, _ := p.Parse("test.php", testStr)
tree := []ast.Node{
ast.ExprStmt{
Expr: &ast.ClassExpr{
Receiver: &ast.Identifier{Value: "... | explode_data.jsonl/28450 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 518
} | [
2830,
3393,
10803,
38106,
18461,
1155,
353,
8840,
836,
8,
341,
18185,
2580,
1669,
1565,
53075,
220,
83826,
486,
2408,
2830,
699,
947,
317,
220,
1687,
83826,
486,
2408,
1024,
280,
220,
1687,
400,
947,
486,
2408,
2830,
2129,
3989,
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... | 4 |
func TestAdmin_ReadOnly(t *testing.T) {
ts, srv, teardown := startupT(t)
defer teardown()
c1 := store.Comment{Text: "test test #1", Locator: store.Locator{SiteID: "radio-t",
URL: "https://radio-t.com/blah"}, User: store.User{Name: "user1 name", ID: "user1"}}
c2 := store.Comment{Text: "test test #2", ParentID: "p... | explode_data.jsonl/51828 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1148
} | [
2830,
3393,
7210,
62,
20914,
1155,
353,
8840,
836,
8,
341,
57441,
11,
43578,
11,
49304,
1669,
20567,
51,
1155,
340,
16867,
49304,
2822,
1444,
16,
1669,
3553,
56730,
90,
1178,
25,
330,
1944,
1273,
671,
16,
497,
98653,
25,
3553,
1214,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandleCVRun(t *testing.T) {
t.Parallel()
ctx := testutil.TestingContext()
Convey(`Test CVRunPubSubHandler`, t, func() {
Convey(`non chromium cv run is ignored`, func() {
ctx, skdr := tq.TestingContext(ctx, nil)
psRun := &cvv1.PubSubRun{
Id: "projects/fake/runs/run_id",
Status: cvv1.Run_... | explode_data.jsonl/70801 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1398
} | [
2830,
3393,
6999,
19589,
6727,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
1273,
1314,
8787,
287,
1972,
2822,
93070,
5617,
5809,
2271,
14165,
6727,
29162,
3136,
3050,
7808,
259,
11,
2915,
368,
341,
197,
93070,
561... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSendError(t *testing.T) {
var resp string
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusInternalServerError)
w.Header().Set("Content-Type", "application/json")
w.Write([]byte(resp))
}))
defer ts.Close()
ctx := context.Background()
... | explode_data.jsonl/70176 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 297
} | [
2830,
3393,
11505,
1454,
1155,
353,
8840,
836,
8,
341,
2405,
9039,
914,
198,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6692,
69794,
19886,
66760,
340,
197,
6692... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_setFilter(t *testing.T) {
testcases := []struct {
answer string
want string
}{
{answer: "example", want: "Filters: ok"},
{answer: "", want: "Filters: regular expression cleared"},
{answer: "\n", want: "Filters: regular expression cleared"},
{answer: "[0-", want: "Filters: error parsing regexp:... | explode_data.jsonl/69227 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
3393,
2602,
5632,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
72570,
914,
198,
197,
50780,
256,
914,
198,
197,
59403,
197,
197,
90,
9217,
25,
330,
8687,
497,
1366,
25,
330,
28351,
25,
5394,
7115,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCrMergedMakeFilesInRenamedDir(t *testing.T) {
test(t,
users("alice", "bob"),
as(alice,
mkdir("a/b"),
),
as(bob,
disableUpdates(),
),
as(alice,
write("a/b/c", "hello"),
write("a/b/d", "goodbye"),
),
as(bob, noSync(),
rename("a/b", "b"),
reenableUpdates(),
lsdir("a", m{}),
... | explode_data.jsonl/31372 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 304
} | [
2830,
3393,
16001,
44,
51525,
8078,
10809,
641,
34625,
3606,
6184,
1155,
353,
8840,
836,
8,
341,
18185,
1155,
345,
197,
90896,
445,
63195,
497,
330,
47086,
4461,
197,
60451,
17643,
558,
345,
298,
88650,
445,
64,
3470,
4461,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHookFileWillBeUploaded(t *testing.T) {
t.Run("rejected", func(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
var mockAPI plugintest.API
mockAPI.On("LoadPluginConfiguration", mock.Anything).Return(nil)
mockAPI.On("LogDebug", "testhook.txt").Return(nil)
mockAPI.On("LogDebug", "input... | explode_data.jsonl/30307 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2723
} | [
2830,
3393,
31679,
1703,
9945,
3430,
62061,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
95353,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
197,
16867,
270,
836,
682,
4454,
2822,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIssue6081(t *testing.T) {
db := newTestDB(t, "people")
defer closeDB(t, db)
drv := db.Driver().(*fakeDriver)
drv.mu.Lock()
opens0 := drv.openCount
closes0 := drv.closeCount
drv.mu.Unlock()
stmt, err := db.Prepare("SELECT|people|name|")
if err != nil {
t.Fatal(err)
}
setRowsCloseHook(func(rows *R... | explode_data.jsonl/16022 | {
"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,
42006,
21,
15,
23,
16,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
501,
2271,
3506,
1155,
11,
330,
16069,
1138,
16867,
3265,
3506,
1155,
11,
2927,
692,
2698,
10553,
1669,
2927,
41768,
1005,
4071,
30570,
11349,
340,
2698,
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... | 1 |
func Test_isTest(t *testing.T) {
t.Parallel()
type args struct {
s string
}
tests := []struct {
name string
args args
want bool
}{
{
name: "appveyor",
args: args{
s: "appveyor",
},
want: true,
},
{
name: "circleci",
args: args{
s: "circleci",
},
want: true,
},
{
... | explode_data.jsonl/77207 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 761
} | [
2830,
3393,
6892,
2271,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
13158,
2827,
2036,
341,
197,
1903,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
1807,
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 Test_JsonFieldWithDefault_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
t.Parallel()
parameters := gopter.DefaultTestParameters()
parameters.MaxSize = 10
properties := gopter.NewProperties(parameters)
properties.Property(
"Round trip of JsonFieldWithDefault via JSON returns original",
prop.ForA... | explode_data.jsonl/39629 | {
"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,
62,
5014,
1877,
2354,
3675,
62,
4498,
77521,
78967,
98054,
2848,
4756,
2121,
2993,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
67543,
1669,
728,
73137,
13275,
2271,
9706,
741,
67543,
14535,
1695,
284,
220,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestConstantTimeLessOrEq(t *testing.T) {
for i, test := range lessOrEqTests {
result := ConstantTimeLessOrEq(test.x, test.y)
if result != test.result {
t.Errorf("#%d: %d <= %d gave %d, expected %d", i, test.x, test.y, result, test.result)
}
}
} | explode_data.jsonl/79471 | {
"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,
15472,
1462,
27451,
2195,
27312,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1273,
1669,
2088,
2686,
2195,
27312,
18200,
341,
197,
9559,
1669,
19305,
1462,
27451,
2195,
27312,
8623,
1993,
11,
1273,
2384,
340,
197,
743,
1102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCVTGray(t *testing.T) {
sources := GrayPaths
targets := CVTPaths
for index, source := range sources {
if index >= len(targets) {
return
}
img, err := imagex.LoadImage(RunningDir+"/"+source, formatx.Auto)
if nil != err {
fmt.Println(err)
continue
}
fmt.Println("读取的图像内存类型(img):", reflect.... | explode_data.jsonl/63317 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 290
} | [
2830,
3393,
19589,
51,
28174,
1155,
353,
8840,
836,
8,
341,
1903,
2360,
1669,
23366,
26901,
198,
28861,
82,
1669,
14165,
51,
26901,
198,
2023,
1922,
11,
2530,
1669,
2088,
8173,
341,
197,
743,
1922,
2604,
2422,
85120,
8,
341,
298,
853,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_Service_ErrorEcho(t *testing.T) {
bkoff := backoff.NewExponentialBackOff()
bkoff.MaxElapsedTime = time.Second * 15
err := backoff.Retry(func() error {
logger, _ := test.NewNullLogger()
logger.SetLevel(logrus.DebugLevel)
c := service.NewContainer(logger)
c.Register(ID, &Service{})
err := c.Init... | explode_data.jsonl/34500 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 806
} | [
2830,
3393,
52548,
28651,
74994,
1155,
353,
8840,
836,
8,
341,
2233,
74,
1847,
1669,
1182,
1847,
7121,
840,
59825,
3707,
4596,
741,
2233,
74,
1847,
14535,
98483,
284,
882,
32435,
353,
220,
16,
20,
271,
9859,
1669,
1182,
1847,
2013,
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... | 3 |
func TestNegateNonBool(t *testing.T) {
fg := newFlagGroup()
f := fg.Flag("b", "")
f.Int()
fg.init()
tokens := tokenize([]string{"--no-b"})
_, err := fg.parse(tokens)
assert.Error(t, err)
} | explode_data.jsonl/74859 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
47800,
349,
8121,
11233,
1155,
353,
8840,
836,
8,
341,
1166,
70,
1669,
501,
12135,
2808,
741,
1166,
1669,
29799,
80911,
445,
65,
497,
14676,
1166,
7371,
741,
1166,
70,
8271,
741,
3244,
9713,
1669,
77651,
10556,
917,
4913,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEphemeralVolumeOwnerCheck(t *testing.T) {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.GenericEphemeralVolume, true)()
// create dswp
pod, pv, pvc := createEphemeralVolumeObjects("dswp-test-pod", "dswp-test-volume-name", false /* not owned */)
dswp, fakePod... | explode_data.jsonl/45751 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 293
} | [
2830,
3393,
36,
59941,
3253,
18902,
13801,
3973,
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,
4419,
4341,
36,
59941,
3253,
18902,
11,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCheckCreateAliasWithProofs(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 := createCreateAliasWithProofs(t)
info := defaultCheckerInfo(t)
_, err := to.... | explode_data.jsonl/63093 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 441
} | [
2830,
3393,
3973,
4021,
22720,
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,
4185,
727,
2675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_ApplyConfigMap(t *testing.T) {
namespace := "some-namespace"
name := "some-name"
currentConfigMap := corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{Name: name},
Data: map[string]string{"key1": "value1", "key2": "value2"},
}
desiredConfigMap := corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{... | explode_data.jsonl/55316 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 548
} | [
2830,
3393,
36117,
398,
2648,
2227,
1155,
353,
8840,
836,
8,
341,
56623,
1669,
330,
14689,
12,
2231,
698,
11609,
1669,
330,
14689,
11494,
698,
20121,
2648,
2227,
1669,
6200,
85,
16,
10753,
2227,
515,
197,
23816,
12175,
25,
77520,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMergeJoinerMultiBatch(t *testing.T) {
ctx := context.Background()
for _, groupSize := range []int{1, 2, coldata.BatchSize / 4, coldata.BatchSize / 2} {
for _, numInputBatches := range []int{1, 2, 16} {
for _, outBatchSize := range []uint16{1, 16, coldata.BatchSize} {
t.Run(fmt.Sprintf("groupSize=%d/... | explode_data.jsonl/16867 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 976
} | [
2830,
3393,
52096,
12292,
261,
20358,
21074,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
2023,
8358,
1874,
1695,
1669,
2088,
3056,
396,
90,
16,
11,
220,
17,
11,
1375,
691,
45791,
1695,
608,
220,
19,
11,
1375,
691,
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... | 7 |
func TestAccountDetail(t *testing.T) {
hmock := httptest.NewClient()
client := &Client{
HorizonURL: "https://localhost/",
HTTP: hmock,
}
// no parameters
accountRequest := AccountRequest{}
hmock.On(
"GET",
"https://localhost/accounts/GCLWGQPMKXQSPF776IU33AH4PZNOOWNAWGGKVTBQMIC5IMKUNP3E6NVU",
).Ret... | explode_data.jsonl/34851 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1083
} | [
2830,
3393,
7365,
10649,
1155,
353,
8840,
836,
8,
341,
9598,
16712,
1669,
54320,
70334,
7121,
2959,
741,
25291,
1669,
609,
2959,
515,
197,
13292,
269,
16973,
3144,
25,
330,
2428,
1110,
8301,
35075,
197,
197,
9230,
25,
981,
305,
16712,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadPublicKey(t *testing.T) {
type test struct {
caseDesc string
inputFile string
errorFound bool
}
tests := []test{
{caseDesc: "Not a valid public key file", inputFile: "testdata/hello_world.txt.minisig", errorFound: true},
{caseDesc: "Valid public key (minisign)", inputFile: "testdata/minisi... | explode_data.jsonl/24853 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 301
} | [
2830,
3393,
4418,
61822,
1155,
353,
8840,
836,
8,
341,
13158,
1273,
2036,
341,
197,
2722,
11065,
256,
914,
198,
197,
22427,
1703,
220,
914,
198,
197,
18290,
6650,
1807,
198,
197,
630,
78216,
1669,
3056,
1944,
515,
197,
197,
90,
5638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRecentlyTriedPodsGoBack(t *testing.T) {
c := clock.NewFakeClock(time.Now())
q := NewTestQueue(context.Background(), newDefaultQueueSort(), WithClock(c))
// Add a few pods to priority queue.
for i := 0; i < 5; i++ {
p := v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("test-pod-%v", i... | explode_data.jsonl/68198 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 716
} | [
2830,
3393,
45137,
51,
4487,
23527,
82,
10850,
3707,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
8866,
7121,
52317,
26104,
9730,
13244,
2398,
18534,
1669,
1532,
2271,
7554,
5378,
19047,
1507,
501,
3675,
7554,
10231,
1507,
3085,
26104,
1337,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWebSocketTLS(t *testing.T) {
testSrv := getTestServer(t, "127.0.0.1:8000")
defer testSrv.Close()
cert := base64.StdEncoding.EncodeToString([]byte(certPem))
key := base64.StdEncoding.EncodeToString([]byte(keyPem))
wsYaml := `
kind: WebSocketServer
name: websocket-demo
port: 10081
https: true
backend: wss:... | explode_data.jsonl/65816 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 294
} | [
2830,
3393,
61238,
45439,
1155,
353,
8840,
836,
8,
341,
18185,
50,
10553,
1669,
633,
2271,
5475,
1155,
11,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
23,
15,
15,
15,
1138,
16867,
1273,
50,
10553,
10421,
2822,
1444,
529,
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 TestMessageToQueryParametersRecursive(t *testing.T) {
type test struct {
MsgDescs []*descriptorpb.DescriptorProto
Message string
}
tests := []test{
// First test:
// Here we test that a message that references it self through a field will return an error.
// Example proto:
// message DirectRecursi... | explode_data.jsonl/32784 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1688
} | [
2830,
3393,
2052,
1249,
2859,
9706,
78542,
1155,
353,
8840,
836,
8,
341,
13158,
1273,
2036,
341,
197,
197,
6611,
11065,
82,
29838,
53132,
16650,
23548,
6820,
31549,
198,
197,
46733,
220,
914,
198,
197,
630,
78216,
1669,
3056,
1944,
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... | 6 |
func TestConnector_AttemptTimeout(t *testing.T) {
listener, err := net.Listen("unix", "@1234")
require.NoError(t, err)
store := newStore(t, []string{listener.Addr().String()})
config := protocol.Config{
AttemptTimeout: 100 * time.Millisecond,
RetryLimit: 1,
}
connector := protocol.NewConnector(0, store, ... | explode_data.jsonl/39280 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
35954,
55581,
4213,
7636,
1155,
353,
8840,
836,
8,
341,
14440,
798,
11,
1848,
1669,
4179,
68334,
445,
56646,
497,
8428,
16,
17,
18,
19,
1138,
17957,
35699,
1155,
11,
1848,
692,
57279,
1669,
501,
6093,
1155,
11,
3056,
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 TestConfigLoadConfigurationFailMissingShim(t *testing.T) {
tmpdir, err := ioutil.TempDir(testDir, "runtime-config-")
assert.NoError(t, err)
defer os.RemoveAll(tmpdir)
testLoadConfiguration(t, tmpdir,
func(config testRuntimeConfig, configFile string, ignoreLogging bool) (bool, error) {
expectFail := true
... | explode_data.jsonl/5119 | {
"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,
2648,
5879,
7688,
19524,
25080,
2016,
318,
1155,
353,
8840,
836,
8,
341,
20082,
3741,
11,
1848,
1669,
43144,
65009,
6184,
8623,
6184,
11,
330,
22255,
25130,
12,
1138,
6948,
35699,
1155,
11,
1848,
340,
16867,
2643,
84427,
103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReplaceEdgeReturnOld(t *testing.T) {
var ctx context.Context
c := createClientFromEnv(t, true)
skipBelowVersion(c, "3.4", t) // See https://github.com/arangodb/arangodb/issues/2363
db := ensureDatabase(ctx, c, "edge_test", nil, t)
prefix := "replace_edge_returnOld_"
g := ensureGraph(ctx, db, prefix+"grap... | explode_data.jsonl/26402 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 541
} | [
2830,
3393,
23107,
11656,
5598,
18284,
1155,
353,
8840,
836,
8,
341,
2405,
5635,
2266,
9328,
198,
1444,
1669,
1855,
2959,
3830,
14359,
1155,
11,
830,
340,
1903,
13389,
38214,
5637,
1337,
11,
330,
18,
13,
19,
497,
259,
8,
442,
3496,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReExportFSNode(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
export {fs as f} from './foo'
export {readFileSync as rfs} from './foo'
`,
"/foo.js": `
export * as fs from 'fs'
export {readFileSync} from 'fs'
`,
},
entryPaths: [... | explode_data.jsonl/38501 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 224
} | [
2830,
3393,
693,
16894,
8485,
1955,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
4085,
2857,
788,
22074,
571,
59440,
314,
3848,
438,
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 TestIntArray_Range(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
value1 := []int{0, 1, 2, 3, 4, 5, 6}
array1 := garray.NewIntArrayFrom(value1)
array2 := garray.NewIntArrayFrom(value1, true)
t.Assert(array1.Range(0, 1), []int{0})
t.Assert(array1.Range(1, 2), []int{1})
t.Assert(array1.Range(0, 2), []int... | explode_data.jsonl/47599 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 226
} | [
2830,
3393,
95338,
2568,
844,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
16309,
16,
1669,
3056,
396,
90,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBuildWithoutTag(t *testing.T) {
runWithDindSwarmAndRegistry(t, func(info dindSwarmAndRegistryInfo) {
cmd := info.configuredCmd
testDir := path.Join("testdata", "build")
cmd.Command = dockerCli.Command("app", "build", "-f", path.Join(testDir, "single.dockerapp"), testDir)
icmd.RunCmd(cmd).Assert(t, ic... | explode_data.jsonl/72003 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 438
} | [
2830,
3393,
11066,
26040,
5668,
1155,
353,
8840,
836,
8,
341,
56742,
2354,
35,
484,
13218,
2178,
3036,
15603,
1155,
11,
2915,
14208,
294,
484,
13218,
2178,
3036,
15603,
1731,
8,
341,
197,
25920,
1669,
3546,
5423,
3073,
15613,
271,
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 TestThingSave(t *testing.T) {
thingCache := redis.NewThingCache(redisClient)
key, err := uuid.New().ID()
require.Nil(t, err, fmt.Sprintf("got unexpected error: %s", err))
id := "123"
id2 := "124"
err = thingCache.Save(context.Background(), key, id2)
require.Nil(t, err, fmt.Sprintf("Save thing to cache: exp... | explode_data.jsonl/44672 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 340
} | [
2830,
3393,
52940,
8784,
1155,
353,
8840,
836,
8,
341,
197,
1596,
8233,
1669,
20870,
7121,
52940,
8233,
97676,
2959,
340,
23634,
11,
1848,
1669,
16040,
7121,
1005,
915,
741,
17957,
59678,
1155,
11,
1848,
11,
8879,
17305,
445,
22390,
165... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOptPort(t *testing.T) {
assert := assert.New(t)
var app App
assert.Nil(OptPort(9999)(&app))
assert.Equal(":9999", app.Config.BindAddr)
assert.Equal(9999, app.Config.Port)
} | explode_data.jsonl/7707 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
21367,
7084,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
2405,
906,
1845,
198,
6948,
59678,
19238,
417,
7084,
7,
24,
24,
24,
24,
8,
2099,
676,
1171,
6948,
12808,
18893,
24,
24,
24,
24,
497,
906,
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 |
func TestAdapterReturn(t *testing.T) {
a := assert.New(t)
ctx := context.Background()
response := &mavsdk_rpc_action.ReturnToLaunchResponse{
ActionResult: &mavsdk_rpc_action.ActionResult{
Result: mavsdk_rpc_action.ActionResult_SUCCESS,
},
}
actionMock := &actionServiceClientMock{}
actionMock.On("ReturnTo... | explode_data.jsonl/76178 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
5940,
5598,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
692,
20985,
1669,
2266,
19047,
2822,
21735,
1669,
609,
76,
38751,
7584,
60799,
7931,
46350,
1249,
32067,
2582,
515,
197,
197,
17301,
25,
609,
76,
38751... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDatabaseClient(t *testing.T) {
timestamp, err := time.Parse(time.RFC3339, "2021-05-24T05:06:34.827Z")
if err != nil {
t.Fatal(err)
}
t.Run("Get", func(t *testing.T) {
tests := []struct {
name string
filePath string
statusCode int
id notionapi.DatabaseID
want *notio... | explode_data.jsonl/51706 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2845
} | [
2830,
3393,
5988,
2959,
1155,
353,
8840,
836,
8,
341,
3244,
4702,
11,
1848,
1669,
882,
8937,
9730,
2013,
6754,
18,
18,
18,
24,
11,
330,
17,
15,
17,
16,
12,
15,
20,
12,
17,
19,
51,
15,
20,
25,
15,
21,
25,
18,
19,
13,
23,
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... | 3 |
func TestDB_Update_ManualCommit(t *testing.T) {
db := MustOpenDB()
defer db.MustClose()
var panicked bool
if err := db.Update(func(tx *bolt.Tx) error {
func() {
defer func() {
if r := recover(); r != nil {
panicked = true
}
}()
if err := tx.Commit(); err != nil {
t.Fatal(err)
}
}(... | explode_data.jsonl/27480 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
3506,
47393,
71628,
928,
33441,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
15465,
5002,
3506,
741,
16867,
2927,
50463,
7925,
2822,
2405,
93010,
1807,
198,
743,
1848,
1669,
2927,
16689,
18552,
27301,
353,
52433,
81362,
8,
1465,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVault_StoreAndRetrieve(t *testing.T) {
testVaultItems := []vault.VaultItem{
{
ItemType: vault.PrivateKeyWithMnemonic,
Value: "SomePrivateKey",
},
}
storeVaultMock := func(w http.ResponseWriter, r *http.Request) {
_, _ = w.Write([]byte(`{}`))
}
serverMock := func() *httptest.Server {
han... | explode_data.jsonl/11925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 756
} | [
2830,
3393,
79177,
92684,
3036,
87665,
1155,
353,
8840,
836,
8,
341,
18185,
79177,
4353,
1669,
3056,
82983,
5058,
945,
1234,
515,
197,
197,
515,
298,
61574,
929,
25,
34584,
87738,
1592,
2354,
44,
70775,
345,
298,
47399,
25,
262,
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 TestRunAfterSuccessCanRun(t *testing.T) {
tests := []struct {
name string
parent *kube.ProwJob
child *kube.ProwJob
changes []github.PullRequestChange
err error
expected bool
}{
{
name: "child does not require specific changes",
parent: &kube.ProwJob{
Spec: kube.ProwJobSpec{
J... | explode_data.jsonl/72990 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1146
} | [
2830,
3393,
6727,
6025,
7188,
6713,
6727,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
271,
197,
24804,
353,
97717,
1069,
651,
12245,
198,
197,
58391,
220,
353,
97717,
1069,
651,
12245,
271,
197,
197,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestVppAddArpTerminationTableEntry(t *testing.T) {
ctx, bdHandler, _ := bdTestSetup(t)
defer ctx.TeardownTestCtx()
ctx.MockVpp.MockReply(&vpp_l2.BdIPMacAddDelReply{})
err := bdHandler.AddArpTerminationTableEntry(
4, "FF:FF:FF:FF:FF:FF", "192.168.4.4")
Expect(err).ShouldNot(HaveOccurred())
Expect(ctx.Moc... | explode_data.jsonl/12045 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 336
} | [
2830,
3393,
53,
602,
2212,
6953,
79,
21209,
32096,
2556,
5874,
1155,
353,
8840,
836,
8,
341,
20985,
11,
21486,
3050,
11,
716,
1669,
21486,
2271,
21821,
1155,
340,
16867,
5635,
94849,
37496,
2271,
23684,
2822,
20985,
24664,
53,
602,
2466... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestList(t *testing.T) {
l := MapItem{}
l.Empty()
m := NewMap(&l)
if 0 != len(m.Items()) {
t.Error()
}
for _, e := range list {
m.Set(e.k, &MapItem{Value: e}, e.f)
}
if len(list) != len(m.Items()) {
t.Error()
}
newlist := make([]int, len(list))
i := 0
l.Iterate(func(list, item *MapItem) bool {... | explode_data.jsonl/74884 | {
"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,
852,
1155,
353,
8840,
836,
8,
341,
8810,
1669,
5027,
1234,
16094,
8810,
11180,
2822,
2109,
1669,
1532,
2227,
2099,
75,
340,
743,
220,
15,
961,
2422,
1255,
12054,
2140,
341,
197,
3244,
6141,
741,
197,
630,
2023,
8358,
384,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFleetWithLongLabelsAnnotations(t *testing.T) {
t.Parallel()
ctx := context.Background()
client := framework.AgonesClient.AgonesV1()
fleetSize := int32(1)
flt := defaultFleet(framework.Namespace)
flt.Spec.Replicas = fleetSize
normalLengthName := strings.Repeat("f", validation.LabelValueMaxLength)
longN... | explode_data.jsonl/15431 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1182
} | [
2830,
3393,
37,
18973,
2354,
6583,
23674,
21418,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
2266,
19047,
2822,
25291,
1669,
12626,
49850,
3154,
2959,
49850,
3154,
53,
16,
741,
1166,
18973,
1695,
1669,
526,
18,
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... | 2 |
func TestSuperHashSetGet(t *testing.T) {
hashmap := New()
k1, k2, k3, value := 1, true, 3, 4
hashmap.Set(k1, k2, k3, value)
if hashmap.Get(k1, k2, k3) != value {
t.Error("invalid value for keys")
}
} | explode_data.jsonl/82207 | {
"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,
19284,
44601,
1949,
1155,
353,
8840,
836,
8,
341,
50333,
2186,
1669,
1532,
741,
16463,
16,
11,
595,
17,
11,
595,
18,
11,
897,
1669,
220,
16,
11,
830,
11,
220,
18,
11,
220,
19,
198,
50333,
2186,
4202,
5969,
16,
11,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMarshalAppendWithContext(t *testing.T) {
for _, tc := range marshalingTestCases {
t.Run(tc.name, func(t *testing.T) {
dst := make([]byte, 0, 1024)
var reg *bsoncodec.Registry
if tc.reg != nil {
reg = tc.reg
} else {
reg = DefaultRegistry
}
ec := bsoncodec.EncodeContext{Registry: re... | explode_data.jsonl/12824 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 263
} | [
2830,
3393,
55438,
23877,
91101,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
31996,
6132,
2271,
37302,
341,
197,
3244,
16708,
44415,
2644,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
52051,
1669,
1281,
10556,
3782,
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 TestAsIs(t *testing.T) {
eRR := errors.New("foobar")
ee := Wrap(eRR)
eee := Wrap(ee)
eeee := Wrap(eee)
e := Wrap(eeee)
// non-wrapped pointer with as should fail
if As(eRR, ErrMadNetType()) {
t.Fatal("")
}
// pointer with as should not fail for type
if !As(e, ErrMadNetType()) {
t.Fatal("")
}
// poi... | explode_data.jsonl/54725 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 281
} | [
2830,
3393,
2121,
3872,
1155,
353,
8840,
836,
8,
341,
7727,
8106,
1669,
5975,
7121,
445,
50267,
1138,
197,
2127,
1669,
42187,
2026,
8106,
340,
197,
34063,
1669,
42187,
2026,
68,
340,
197,
68616,
1669,
42187,
2026,
2127,
340,
7727,
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... | 7 |
func TestClientSpanDropped(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
w.Write([]byte(req.Header.Get("Elastic-Apm-Traceparent")))
}))
defer server.Close()
tracer, transport := transporttest.NewRecorderTracer()
defer tracer.Close()
tracer.SetMa... | explode_data.jsonl/49616 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 483
} | [
2830,
3393,
2959,
12485,
35,
41716,
1155,
353,
8840,
836,
8,
341,
41057,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
4232,
353,
1254,
9659,
8,
341,
197,
6692,
4073,
10556,
3782,
6881,
15753,
2234,
445,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBadReplicaValues(t *testing.T) {
g := gomega.NewGomegaWithT(t)
kfsvc := TFExampleKFService.DeepCopy()
kfsvc.Spec.MinReplicas = -1
g.Expect(kfsvc.ValidateCreate()).Should(gomega.MatchError("MinReplicas cannot be less than 0"))
kfsvc.Spec.MinReplicas = 1
kfsvc.Spec.MaxReplicas = -1
g.Expect(kfsvc.Validate... | explode_data.jsonl/50836 | {
"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,
17082,
18327,
15317,
6227,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
340,
16463,
69,
58094,
1669,
29145,
13314,
65008,
1860,
55602,
12106,
741,
16463,
69,
58094,
36473,
17070,
18327... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCertStoreMismatchedIdentity(t *testing.T) {
mismatchedIdentity := func(nonce uint64) proto.ReceivedMessage {
return createUpdateMessage(nonce, createMismatchedUpdateMessage())
}
pm, cs, _ := createObjects(mismatchedIdentity, nil)
defer pm.Stop()
defer cs.stop()
testCertificateUpdate(t, false, cs)
} | explode_data.jsonl/52300 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
36934,
6093,
82572,
291,
18558,
1155,
353,
8840,
836,
8,
341,
2109,
24976,
291,
18558,
1669,
2915,
1445,
13184,
2622,
21,
19,
8,
18433,
2817,
8771,
2052,
341,
197,
853,
1855,
4289,
2052,
1445,
13184,
11,
1855,
82572,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNew(t *testing.T) {
ctx, _ := SetupFakeContext(t)
c := NewController(ctx, configmap.NewStaticWatcher())
if c == nil {
t.Fatal("Expected NewController to return a non-nil value")
}
} | explode_data.jsonl/10605 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 72
} | [
2830,
3393,
3564,
1155,
353,
8840,
836,
8,
341,
20985,
11,
716,
1669,
18626,
52317,
1972,
1155,
692,
1444,
1669,
1532,
2051,
7502,
11,
2193,
2186,
7121,
11690,
47248,
12367,
743,
272,
621,
2092,
341,
197,
3244,
26133,
445,
18896,
1532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExternalIPs(t *testing.T) {
ipt := iptablestest.NewFake()
ipvs := ipvstest.NewFake()
ipset := ipsettest.NewFake(testIPSetVersion)
fp := NewFakeProxier(ipt, ipvs, ipset, nil, nil, v1.IPv4Protocol)
svcIP := "10.20.30.41"
svcPort := 80
svcExternalIPs := sets.NewString("50.60.70.81", "2012::51", "127.0.0.1"... | explode_data.jsonl/44355 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 941
} | [
2830,
3393,
25913,
3298,
82,
1155,
353,
8840,
836,
8,
341,
8230,
417,
1669,
66068,
480,
267,
477,
7121,
52317,
741,
46531,
11562,
1669,
45475,
267,
477,
7121,
52317,
741,
46531,
746,
1669,
5997,
746,
1944,
7121,
52317,
8623,
3298,
1649,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewWriterSizeIdempotent(t *testing.T) {
const BufSize = 1000
b := NewWriterSize(new(bytes.Buffer), BufSize)
// Does it recognize itself?
b1 := NewWriterSize(b, BufSize)
if b1 != b {
t.Error("NewWriterSize did not detect underlying Writer")
}
// Does it wrap if existing buffer is too small?
b2 := NewW... | explode_data.jsonl/2880 | {
"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,
3564,
6492,
1695,
764,
3262,
63532,
1155,
353,
8840,
836,
8,
341,
4777,
69013,
1695,
284,
220,
16,
15,
15,
15,
198,
2233,
1669,
1532,
6492,
1695,
1755,
23158,
22622,
701,
69013,
1695,
340,
197,
322,
12553,
432,
15282,
5086... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStateChanges(t *testing.T) {
stateTestWrapper, state := createFreshDBAndConstructState(t)
// add keys
state.TxBegin("txUuid")
state.Set("chaincode1", "key1", []byte("value1"))
state.Set("chaincode1", "key2", []byte("value2"))
state.TxFinish("txUuid", true)
//chehck in-memory
testutil.AssertEquals(t, st... | explode_data.jsonl/69014 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 653
} | [
2830,
3393,
1397,
11317,
1155,
353,
8840,
836,
8,
341,
24291,
2271,
11542,
11,
1584,
1669,
1855,
55653,
3506,
3036,
28468,
1397,
1155,
340,
197,
322,
912,
6894,
198,
24291,
81362,
11135,
445,
3998,
38431,
1138,
24291,
4202,
445,
8819,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPGPPullOne(t *testing.T) {
tc := SetupEngineTest(t, "pgp_pull")
defer tc.Cleanup()
sigVersion := libkb.GetDefaultSigVersion(tc.G)
users := []string{"t_alice", "t_bob"}
fu := createUserWhoTracks(tc, users, sigVersion)
defer untrackUserList(tc, fu, users, sigVersion)
gpgClient := createGpgClient(tc)
as... | explode_data.jsonl/44546 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 239
} | [
2830,
3393,
11383,
4406,
617,
3966,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
18626,
4571,
2271,
1155,
11,
330,
3517,
79,
65693,
1138,
16867,
17130,
727,
60639,
741,
84841,
5637,
1669,
3051,
21310,
2234,
3675,
47246,
5637,
44415,
1224,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBundlingFilesOutsideOfOutbase(t *testing.T) {
splitting_suite.expectBundled(t, bundled{
files: map[string]string{
"/src/entry.js": `
console.log('test')
`,
},
entryPaths: []string{"/src/entry.js"},
options: config.Options{
Mode: config.ModeBundle,
CodeSplitting: true,
Outpu... | explode_data.jsonl/38604 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
33,
1241,
2718,
10809,
41365,
2124,
2662,
3152,
1155,
353,
8840,
836,
8,
341,
1903,
2292,
1280,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
3548,
14,
4085,
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... | 1 |
func TestFormatterForegroundBrightColors(test *testing.T) {
formatted, err := formatter.Format("{cyan | bright | foreground}cyan{normal}")
assert.NoError(test, err)
assert.Equal(test, "\x1b[96mcyan\x1b[0m", formatted)
} | explode_data.jsonl/39766 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 84
} | [
2830,
3393,
14183,
25982,
74676,
13108,
8623,
353,
8840,
836,
8,
341,
37410,
12127,
11,
1848,
1669,
24814,
9978,
13976,
69746,
760,
9906,
760,
39305,
92,
69746,
90,
8252,
55266,
6948,
35699,
8623,
11,
1848,
340,
6948,
12808,
8623,
11,
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 |
func TestValidateBirthYear(t *testing.T) {
if !ValidateBirthYear("1920") {
t.Error("1920")
t.FailNow()
}
if !ValidateBirthYear("1930") {
t.Error("1930")
t.FailNow()
}
if !ValidateBirthYear("2002") {
t.Error("2002")
t.FailNow()
}
if ValidateBirthYear("2003") {
t.Error("2003")
t.FailNow()
}
if Va... | explode_data.jsonl/24409 | {
"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,
17926,
31478,
9490,
1155,
353,
8840,
836,
8,
341,
743,
753,
17926,
31478,
9490,
445,
16,
24,
17,
15,
899,
341,
197,
3244,
6141,
445,
16,
24,
17,
15,
1138,
197,
3244,
57243,
7039,
741,
197,
532,
743,
753,
17926,
31478,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdate(t *testing.T) {
f := newFixture(t)
defer f.teardown()
t1 := time.Unix(1, 0)
f.resource("foo", "true", t1)
f.step()
f.assertStatus("foo", model.RuntimeStatusOK, 1)
t2 := time.Unix(2, 0)
f.resource("foo", "false", t2)
f.step()
f.assertStatus("foo", model.RuntimeStatusOK, 2)
f.assertNoAction("... | explode_data.jsonl/53807 | {
"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,
4289,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
340,
16867,
282,
31853,
37496,
2822,
3244,
16,
1669,
882,
10616,
941,
7,
16,
11,
220,
15,
340,
1166,
24013,
445,
7975,
497,
330,
1866,
497,
259,
16,
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 TestCT_ColorTransformConstructor(t *testing.T) {
v := diagram.NewCT_ColorTransform()
if v == nil {
t.Errorf("diagram.NewCT_ColorTransform must return a non-nil value")
}
if err := v.Validate(); err != nil {
t.Errorf("newly constructed diagram.CT_ColorTransform should validate: %s", err)
}
} | explode_data.jsonl/63104 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
1162,
43387,
8963,
13288,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
13549,
7121,
1162,
43387,
8963,
741,
743,
348,
621,
2092,
341,
197,
3244,
13080,
445,
8579,
5745,
7121,
1162,
43387,
8963,
1969,
470,
264,
2477,
83248,
897,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResolveIdentifyImplicitTeamWithDuplicates(t *testing.T) {
tt := newTeamTester(t)
defer tt.cleanup()
alice := tt.addUser("abc")
g := alice.tc.G
bob := tt.addUser("bob")
iTeamNameCreate := strings.Join([]string{alice.username, bob.username}, ",")
// simple duplicate
iTeamNameLookup1 := strings.Join([]... | explode_data.jsonl/42661 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 675
} | [
2830,
3393,
56808,
28301,
1437,
59558,
14597,
2354,
76851,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
501,
14597,
58699,
1155,
340,
16867,
17853,
87689,
2822,
197,
63195,
1669,
17853,
1364,
1474,
445,
13683,
1138,
3174,
1669,
70433,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileSetModTime(t *testing.T) {
r := fstest.NewRun(t)
if !canSetModTime(t, r) {
return
}
defer r.Finalise()
vfs, file, file1 := fileCreate(t, r, vfscommon.CacheModeOff)
err := file.SetModTime(t2)
require.NoError(t, err)
file1.ModTime = t2
fstest.CheckItems(t, r.Fremote, file1)
vfs.Opt.ReadOnly = ... | explode_data.jsonl/9732 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
1703,
1649,
4459,
1462,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
48434,
477,
7121,
6727,
1155,
340,
743,
753,
4814,
1649,
4459,
1462,
1155,
11,
435,
8,
341,
197,
853,
198,
197,
532,
16867,
435,
991,
977,
1064,
741,
5195... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWrapperGetActiveOrders(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test: api keys not set or canManipulateRealOrders set to false")
}
p, err := currency.NewPairFromString("EOS-USDT")
if err != nil {
t.Error(err)
}
_, err = b.GetActiveOrders(con... | explode_data.jsonl/76669 | {
"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,
11542,
1949,
5728,
24898,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
1369,
753,
4814,
92876,
6334,
12768,
24898,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
25,
6330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSlackAddToEPStep(t *testing.T) {
t.Parallel()
sql := `
insert into escalation_policies (id, name)
values
({{uuid "eid"}}, 'esc policy');
insert into services (id, escalation_policy_id, name)
values
({{uuid "sid"}}, {{uuid "eid"}}, 'service');
`
h := harness.NewHarness(t, sql, "slack-user-link")... | explode_data.jsonl/24833 | {
"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,
7442,
473,
2212,
1249,
9197,
8304,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
30633,
1669,
22074,
59847,
1119,
70289,
620,
42038,
320,
307,
11,
829,
8,
715,
45939,
198,
197,
197,
2306,
90,
17128,
330,
61878,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestAddLogMultiWithExtKeyErr(t *testing.T) {
mockdb := &mockMongo{
data: nil,
err: errors.New("mock error, TestAddLogMultiWithExtKeyErr"),
errTrigger: 1,
errTriggerStep: 0,
}
DB = mockdb
contents := []auditoplog.AuditLogExt{
auditoplog.AuditLogExt{ID: 1, Content: "row1", Ext... | explode_data.jsonl/56520 | {
"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,
2212,
2201,
20358,
2354,
6756,
1592,
7747,
1155,
353,
8840,
836,
8,
341,
77333,
1999,
1669,
609,
16712,
54998,
515,
197,
8924,
25,
1843,
2092,
345,
197,
9859,
25,
310,
5975,
7121,
445,
16712,
1465,
11,
3393,
2212,
2201,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDelete(t *testing.T) {
//Test should create the file before deleting it
path := "k8s://namespace/pod/container/path/to/delete/from"
if err := skbn.Delete(path, 1); err != nil {
log.Fatal(err)
}
} | explode_data.jsonl/13930 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
6435,
1155,
353,
8840,
836,
8,
341,
197,
322,
2271,
1265,
1855,
279,
1034,
1573,
33011,
432,
198,
26781,
1669,
330,
74,
23,
82,
1110,
2231,
4322,
347,
83897,
50976,
32429,
32275,
91106,
698,
743,
1848,
1669,
1901,
11081,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequirementsVersionStream(t *testing.T) {
t.Parallel()
o := TestUpgradeBootOptions{}
o.setup()
vs, err := o.requirementsVersionStream()
require.NoError(t, err, "could not get requirements version stream")
assert.Equal(t, "2367726d02b8c", vs.Ref, "RequirementsVersionStream Ref")
assert.Equal(t, "https... | explode_data.jsonl/29839 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
59202,
5637,
3027,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
22229,
1669,
3393,
43861,
17919,
3798,
16094,
22229,
25338,
2822,
5195,
82,
11,
1848,
1669,
297,
23712,
1368,
5637,
3027,
741,
17957,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLaunchInstance(t *testing.T) {
machine, err := stubMachine()
if err != nil {
t.Fatalf("Unable to build test machine manifest: %v", err)
}
credSecretName := fmt.Sprintf("%s-%s", credentialsSecretName, rand.String(nameLength))
providerConfig := stubProviderConfig(credSecretName)
cases := []struct {
na... | explode_data.jsonl/36618 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 778
} | [
2830,
3393,
32067,
2523,
1155,
353,
8840,
836,
8,
341,
2109,
3814,
11,
1848,
1669,
13633,
21605,
741,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
17075,
311,
1936,
1273,
5662,
14455,
25,
1018,
85,
497,
1848,
340,
197,
532,
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 TestUpdateServiceMapHeadless(t *testing.T) {
fp := newFakeProxier()
makeServiceMap(fp,
makeTestService("ns2", "headless", func(svc *v1.Service) {
svc.Spec.Type = v1.ServiceTypeClusterIP
svc.Spec.ClusterIP = v1.ClusterIPNone
svc.Spec.Ports = addTestPort(svc.Spec.Ports, "rpc", "UDP", 1234, 0, 0)
}),
... | explode_data.jsonl/22230 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 404
} | [
2830,
3393,
4289,
1860,
2227,
12346,
1717,
1155,
353,
8840,
836,
8,
341,
65219,
1669,
501,
52317,
1336,
87,
1268,
2822,
77438,
1860,
2227,
17815,
345,
197,
77438,
2271,
1860,
445,
4412,
17,
497,
330,
1983,
1717,
497,
2915,
1141,
7362,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_BlindSignature(t *testing.T) {
p := new(eccutil.Point)
p.X, p.Y = new(big.Int), new(big.Int)
n := NewBlindSignature(p)
n.R.X, n.R.Y = new(big.Int), new(big.Int)
n.S.X, n.S.Y = new(big.Int), new(big.Int)
b, err := n.Marshal()
if err != nil {
t.Fatalf("Marshalling failed: %s", err)
}
_, err = n.Unmar... | explode_data.jsonl/8840 | {
"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,
56947,
484,
25088,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
501,
2026,
638,
1314,
3775,
340,
3223,
4338,
11,
281,
7507,
284,
501,
75616,
7371,
701,
501,
75616,
7371,
340,
9038,
1669,
1532,
4923,
484,
25088,
1295,
340,
903... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddNotExisting(t *testing.T) {
kv := secretmanager.NewInMemoryClient("cl-test", "notfoo", "bar")
cmdOpts := addCommand{Positional: addCommandPositional{"cl-test", "foo"}, Data: "baz", Labels: map[string]string{"a": "b"}, client: kv}
err := cmdOpts.Execute([]string{})
assert.NoError(t, err)
secret, _ := kv... | explode_data.jsonl/60320 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 158
} | [
2830,
3393,
2212,
2623,
53067,
1155,
353,
8840,
836,
8,
341,
16463,
85,
1669,
6234,
13297,
7121,
641,
10642,
2959,
445,
564,
16839,
497,
330,
1921,
7975,
497,
330,
2257,
1138,
25920,
43451,
1669,
912,
4062,
90,
3812,
278,
25,
912,
406... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPartialValuesPython(t *testing.T) {
integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: filepath.Join("partial_values", "python"),
Dependencies: []string{
path.Join("..", "..", "sdk", "python", "env", "src"),
},
AllowEmptyPreviewChanges: true,
})
} | explode_data.jsonl/76376 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
37314,
6227,
30280,
1155,
353,
8840,
836,
8,
341,
2084,
17376,
80254,
2271,
1155,
11,
609,
60168,
80254,
2271,
3798,
515,
197,
197,
6184,
25,
26054,
22363,
445,
37420,
9146,
497,
330,
12669,
4461,
197,
197,
48303,
25,
3056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWith_outputDir(t *testing.T) {
tmpDir, err := ioutil.TempDir("", "")
require.NoError(t, err)
defer os.RemoveAll(tmpDir)
// Use env to enable this like a user would.
os.Setenv("DD_PROFILING_OUTPUT_DIR", tmpDir)
defer os.Unsetenv("DD_PROFILING_OUTPUT_DIR")
p, err := unstartedProfiler()
require.NoError(... | explode_data.jsonl/18539 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 383
} | [
2830,
3393,
2354,
7645,
6184,
1155,
353,
8840,
836,
8,
341,
20082,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
14676,
17957,
35699,
1155,
11,
1848,
340,
16867,
2643,
84427,
10368,
6184,
692,
197,
322,
5443,
6105,
311,
7283,
419,
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... | 2 |
func TestReferenceRenderer(t *testing.T) {
files, err := ioutil.ReadDir(testdataPath)
if err != nil {
t.Fatalf("could not read test data: %v", err)
}
for _, f := range files {
if filepath.Ext(f.Name()) != ".json" {
continue
}
t.Run(f.Name(), func(t *testing.T) {
path := filepath.Join(testdataPath, f... | explode_data.jsonl/64855 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 676
} | [
2830,
3393,
8856,
11541,
1155,
353,
8840,
836,
8,
341,
74075,
11,
1848,
1669,
43144,
6503,
6184,
8623,
691,
1820,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
28077,
537,
1349,
1273,
821,
25,
1018,
85,
497,
1848,
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... | 3 |
func TestOn(t *testing.T) {
c := New(Config{
BotToken: "sdkjfhdksfhskdjfhdkfjsd",
DisableCache: true,
})
t.Run("normal Session", func(t *testing.T) {
defer func() {
if r := recover(); r != nil {
t.Errorf("should not have triggered a panic")
}
}()
c.Gateway().ChannelCreate(func(s Session, e ... | explode_data.jsonl/41652 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 420
} | [
2830,
3393,
1925,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
33687,
515,
197,
12791,
354,
3323,
25,
257,
330,
51295,
96423,
15990,
2787,
31104,
4886,
77504,
31104,
7584,
69,
2519,
67,
756,
197,
197,
25479,
8233,
25,
830,
345,
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 TestCleanupNS(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
ecscniClient := NewClient(&Config{})
libcniClient := mock_libcni.NewMockCNI(ctrl)
ecscniClient.(*cniClient).libcni = libcniClient
// This will be called for both bridge and eni plugin
libcniClient.EXPECT().DelNetwork(gomock.... | explode_data.jsonl/30397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 280
} | [
2830,
3393,
67335,
2448,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
197,
757,
2388,
7751,
2959,
1669,
1532,
2959,
2099,
2648,
37790,
197,
55576,
7751,
2959,
1669,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateModel_DocString(t *testing.T) {
funcMap := FuncMapFunc(DefaultLanguageFunc())
templ := template.Must(template.New("docstring").Funcs(funcMap).Parse(string(assets["docstring.gotmpl"])))
tt := templateTest{t, templ}
var gmp GenSchema
gmp.Title = "The title of the property"
gmp.Description = "The d... | explode_data.jsonl/2492 | {
"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,
31115,
1712,
1557,
509,
703,
1155,
353,
8840,
836,
8,
341,
29244,
2227,
1669,
18016,
2227,
9626,
87874,
13806,
9626,
2398,
197,
74860,
1669,
3811,
50463,
29963,
7121,
445,
5236,
917,
1827,
9626,
82,
18552,
2227,
568,
14463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBatchModeParseFunc(t *testing.T) {
defer func() {
if err := recover(); err != nil {
t.Errorf("panic in test is not acceptable")
}
}()
f, ok := mapParse[BatchMode]
if !ok {
t.Errorf("Cannot found parse-function")
}
if f == nil {
t.Errorf("Parse-function is nil")
}
// TODO
} | explode_data.jsonl/13455 | {
"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,
21074,
3636,
14463,
9626,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
368,
341,
197,
743,
1848,
1669,
11731,
2129,
1848,
961,
2092,
341,
298,
3244,
13080,
445,
19079,
304,
1273,
374,
537,
21555,
1138,
197,
197,
532,
197,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateServiceAgreement(t *testing.T) {
t.Parallel()
store, cleanup := cltest.NewStore(t)
defer cleanup()
err := store.KeyStore.Unlock(cltest.Password)
_, fromAddress := cltest.MustAddRandomKeyToKeystore(t, store, 0)
assert.NoError(t, err)
_, err = store.KeyStore.NewAccount()
assert.NoError(t, err)
... | explode_data.jsonl/75333 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 793
} | [
2830,
3393,
17926,
1860,
9042,
17150,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
57279,
11,
21290,
1669,
1185,
1944,
7121,
6093,
1155,
340,
16867,
21290,
741,
9859,
1669,
3553,
9610,
6093,
39188,
9849,
1944,
25690,
340,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMultiplicationProofFake(t *testing.T) {
g, gok := buildGroup(big.NewInt(47))
require.True(t, gok, "Failed to setup group for Multiplication proof testing")
s := newMultiplicationProofStructure("m1", "m2", "mod", "result", 3)
proof := s.fakeProof(g)
assert.True(t, s.verifyProofStructure(proof), "Fake pr... | explode_data.jsonl/56445 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
57251,
1693,
31076,
52317,
1155,
353,
8840,
836,
8,
341,
3174,
11,
342,
562,
1669,
1936,
2808,
75616,
7121,
1072,
7,
19,
22,
1171,
17957,
32443,
1155,
11,
342,
562,
11,
330,
9408,
311,
6505,
1874,
369,
58712,
1693,
11064,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileStore_getPrivateKey(t *testing.T) {
type fields struct {
fs afero.Fs
rand io.Reader
logger io.Writer
}
type args struct {
encryptedKey *keystore.EncryptedKey
deriveKeyOptions multi.OptionsBuilders
}
tests := []struct {
name string
fields fields
args args
want cryp... | explode_data.jsonl/59573 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1564
} | [
2830,
3393,
1703,
6093,
3062,
75981,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
53584,
257,
264,
802,
78,
991,
82,
198,
197,
7000,
437,
256,
6399,
47431,
198,
197,
17060,
6399,
47838,
198,
197,
532,
13158,
2827,
2036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNopStoreVisitAll(t *testing.T) {
ns := NopStore{}
for i := 0; i < 5; i++ {
id := strconv.FormatInt(int64(i), 10)
err := ns.Set(id, NopSession{})
assert.NoError(t, err)
}
var visitedIds []string
ns.VisitAll(func(id string, _ interface{}) bool {
visitedIds = append(visitedIds, id)
return true
}... | explode_data.jsonl/82375 | {
"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,
45,
453,
6093,
26218,
2403,
1155,
353,
8840,
836,
8,
341,
84041,
1669,
451,
453,
6093,
31483,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
20,
26,
600,
1027,
341,
197,
15710,
1669,
33317,
9978,
1072,
1548,
21,
19,
1956,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckExpire2(t *testing.T) {
q, mem := initEnv(0)
defer q.Close()
defer mem.Close()
// add tx
err := add4Tx(mem.client)
if err != nil {
t.Error("add tx error", err.Error())
return
}
mem.setHeader(&types.Header{Height: 50, BlockTime: 1e9 + 1})
msg := mem.client.NewMessage("mempool", types.EventTxL... | explode_data.jsonl/16831 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 247
} | [
2830,
3393,
3973,
8033,
554,
17,
1155,
353,
8840,
836,
8,
341,
18534,
11,
1833,
1669,
2930,
14359,
7,
15,
340,
16867,
2804,
10421,
741,
16867,
1833,
10421,
2822,
197,
322,
912,
9854,
198,
9859,
1669,
912,
19,
31584,
39908,
6581,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestSortBackups(t *testing.T) {
tests := []struct {
name string
backupList *v1.BackupList
expected []v1.Backup
}{
{
name: "non-timestamped backups",
backupList: &v1.BackupList{Items: []v1.Backup{
{ObjectMeta: metav1.ObjectMeta{Name: "a"}},
{ObjectMeta: metav1.ObjectMeta{Name: "c"}},... | explode_data.jsonl/71485 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 946
} | [
2830,
3393,
10231,
3707,
8602,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
197,
31371,
852,
353,
85,
16,
8864,
454,
852,
198,
197,
42400,
256,
3056,
85,
16,
8864,
454,
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... | 3 |
func TestDownloadExtraction(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
HandleDownloadObjectSuccessfully(t)
response := Download(fake.ServiceClient(), "testContainer", "testObject", nil)
// Check []byte extraction
bytes, err := response.ExtractContent()
th.AssertNoErr(t, err)
th.CheckEquals(t, "Suc... | explode_data.jsonl/30747 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
11377,
840,
26425,
1155,
353,
8840,
836,
8,
341,
70479,
39820,
9230,
741,
16867,
270,
94849,
37496,
9230,
741,
197,
6999,
11377,
1190,
35959,
1155,
692,
21735,
1669,
8577,
74138,
13860,
2959,
1507,
330,
1944,
4502,
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 TestSnakeCase(t *testing.T) {
var tests = map[string]string{
"": "",
"ID": "id",
"ColumnName": "column_name",
"COLUMN_NAME": "column_name",
"column_name": "column_name",
"UserID": "user_id",
"UserNameRaw": "user_name_raw",
}
for i, e := range tests {
if v := SnakeCase(... | explode_data.jsonl/65314 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
83420,
4207,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
2415,
14032,
30953,
515,
197,
197,
28796,
310,
8324,
197,
197,
1,
915,
788,
688,
330,
307,
756,
197,
197,
1,
26162,
788,
220,
330,
6229,
1269,
756,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestDNSProvider_Cleanup(t *testing.T) {
provider, mux := setupTest(t)
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, http.MethodGet, r.Method, "method")
q := r.URL.Query()
assert.Equal(t, q.Get("key"), fakeAPIKey, "key mismatch")
assert.Equal(t, q.Get("cmd"), "dns-re... | explode_data.jsonl/52236 | {
"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,
61088,
5179,
920,
60639,
1155,
353,
8840,
836,
8,
341,
197,
19979,
11,
59807,
1669,
6505,
2271,
1155,
692,
2109,
2200,
63623,
35460,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6948,
12808,
1155,
11,
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... | 2 |
func TestDispatchGenAttrs_Failure(t *testing.T) {
h := &mockHandler{err: errors.New("handler is not interested in generating attributes")}
bag := attribute.GetFakeMutableBagForTesting(defaultApaAttributes)
mapper := template.NewOutputMapperFn(map[string]compiled.Expression{})
_, err := executeDispatchGenAttrs(t, ... | explode_data.jsonl/64998 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
11283,
9967,
53671,
1400,
9373,
1155,
353,
8840,
836,
8,
341,
9598,
1669,
609,
16712,
3050,
90,
615,
25,
5975,
7121,
445,
17905,
374,
537,
8014,
304,
23163,
8201,
899,
630,
2233,
351,
1669,
7035,
2234,
52317,
11217,
12933,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.