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 TestLogicRunner_OnPulse_Order(t *testing.T) {
ctx := inslogger.TestContext(t)
lr, err := NewLogicRunner(&configuration.LogicRunner{}, nil, nil)
require.NoError(t, err)
mc := minimock.NewController(t)
defer mc.Wait(time.Second)
orderChan := make(chan OnPulseCallOrderEnum, 6)
lr.WriteController = writecont... | explode_data.jsonl/67710 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 654
} | [
2830,
3393,
26751,
19486,
35482,
47,
17217,
53267,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
1640,
9786,
8787,
1972,
1155,
340,
8810,
81,
11,
1848,
1669,
1532,
26751,
19486,
2099,
21138,
90347,
19486,
22655,
2092,
11,
2092,
340,
17957,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInsertBookmarks(t *testing.T) {
doc := document.New()
if len(doc.Bookmarks()) != 0 {
t.Errorf("expected 0 bookmarks, got %d", len(doc.Bookmarks()))
}
p := doc.AddParagraph()
p.AddBookmark("bookmark1")
p.AddBookmark("bookmark2")
if len(doc.Bookmarks()) != 2 {
t.Errorf("expected 2 bookmarks, got %d"... | explode_data.jsonl/61212 | {
"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,
13780,
7134,
15544,
1155,
353,
8840,
836,
8,
341,
59536,
1669,
2197,
7121,
741,
743,
2422,
19153,
55253,
15544,
2140,
961,
220,
15,
341,
197,
3244,
13080,
445,
7325,
220,
15,
60919,
11,
2684,
1018,
67,
497,
2422,
19153,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPSPDirectoryTableHeaderSize(t *testing.T) {
const expectedPSPDirectoryTableHeaderSize = 0x10
actualSize := binary.Size(PSPDirectoryTableHeader{})
if actualSize != expectedPSPDirectoryTableHeaderSize {
t.Errorf("BIOSDirectoryTableHeader is incorrect: %d, expected %d", actualSize, expectedPSPDirectoryTableH... | explode_data.jsonl/22535 | {
"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,
47,
4592,
9310,
2556,
4047,
1695,
1155,
353,
8840,
836,
8,
341,
4777,
3601,
47,
4592,
9310,
2556,
4047,
1695,
284,
220,
15,
87,
16,
15,
198,
88814,
1695,
1669,
7868,
2465,
5304,
4592,
9310,
2556,
4047,
37790,
743,
5042,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPlayer_ClanTag(t *testing.T) {
pl := playerWithResourceProperty("m_szClan", st.PropertyValue{StringVal: "SuperClan"})
assert.Equal(t, "SuperClan", pl.ClanTag())
} | explode_data.jsonl/12199 | {
"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,
4476,
920,
10715,
5668,
1155,
353,
8840,
836,
8,
341,
72213,
1669,
2781,
2354,
4783,
3052,
445,
76,
33945,
5066,
276,
497,
357,
15727,
1130,
90,
703,
2208,
25,
330,
19284,
5066,
276,
1,
8824,
6948,
12808,
1155,
11,
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 |
func TestLog_run_found(t *testing.T) {
clock := clockwork.NewFakeClock()
pdata := []*v1alpha1.Pipeline{
tb.Pipeline("pipeline",
tb.PipelineNamespace("ns"),
cb.PipelineCreationTimestamp(clock.Now().Add(-15*time.Minute)),
),
}
prdata := []*v1alpha1.PipelineRun{
tb.PipelineRun("pipelinerun-1",
tb.Pipeli... | explode_data.jsonl/14856 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 623
} | [
2830,
3393,
2201,
14007,
21480,
1155,
353,
8840,
836,
8,
341,
84165,
1669,
8866,
1778,
7121,
52317,
26104,
741,
3223,
691,
1669,
29838,
85,
16,
7141,
16,
1069,
8790,
515,
197,
62842,
1069,
8790,
445,
51258,
756,
298,
62842,
1069,
8790,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCommander(t *testing.T) {
cmder := testCommander{T: t}
m, r := cmder.args("--log", "log-file", "remaining")
require.Equal(t, []string{"remaining"}, r)
require.Equal(t, map[string]string{
"log": "log-file",
}, m)
} | explode_data.jsonl/16418 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
3393,
4062,
261,
1155,
353,
8840,
836,
8,
341,
98316,
1107,
1669,
1273,
4062,
261,
76025,
25,
259,
630,
2109,
11,
435,
1669,
9961,
1107,
16365,
21549,
839,
497,
330,
839,
14203,
497,
330,
43436,
5130,
17957,
12808,
1155,
11,
305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadChunks(t *testing.T) {
tests := []struct {
Name string
Size int64
ChunkSize int64
EncryptOnUpload bool
DataShards int
ParityShards int
}{
// size < chunk_size
{Name: "Size_Less_ChunkSize", Size: KB*64 - KB*1, ChunkSize: KB * 64, DataShards: 2, ParityShards: 1, EncryptO... | explode_data.jsonl/15409 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2114
} | [
2830,
3393,
4418,
89681,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
21297,
414,
914,
198,
197,
91224,
414,
526,
21,
19,
198,
197,
197,
28304,
1695,
526,
21,
19,
271,
197,
197,
61520,
1925,
13844,
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... | 7 |
func TestTooManyHyphens(t *testing.T) {
var args struct {
TooManyHyphens string `arg:"---x"`
}
err := parse("--foo -", &args)
assert.Error(t, err)
} | explode_data.jsonl/13066 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
31246,
8441,
30816,
759,
724,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
197,
31246,
8441,
30816,
759,
724,
914,
1565,
858,
2974,
4421,
87,
8805,
197,
532,
9859,
1669,
4715,
21549,
7975,
481,
497,
609,
2116,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetTimestamp(t *testing.T) {
t1 := GetTimestamp()
if t1 >= MAX_TIMESTAMP {
t.Errorf("Got timestamp %d > Max value(%d)", t1, MAX_TIMESTAMP)
}
time.Sleep(time.Second)
t2 := GetTimestamp()
if t2-t1 > 1005 || t2-t1 < 995 {
t.Errorf("Timestamp accuracy error, t2 - t1: %d", t2-t1)
}
} | explode_data.jsonl/45171 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
1949,
20812,
1155,
353,
8840,
836,
8,
341,
3244,
16,
1669,
2126,
20812,
741,
743,
259,
16,
2604,
8334,
47854,
341,
197,
3244,
13080,
445,
32462,
11441,
1018,
67,
861,
7487,
897,
15238,
67,
11583,
259,
16,
11,
8334,
47854,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNormalizeUIArchiveButton(t *testing.T) {
tests := []struct {
uiOpts map[string]interface{}
sOpts map[string]string
expected map[string]interface{}
}{
{},
{
uiOpts: map[string]interface{}{},
sOpts: map[string]string{"es-archive.enabled": "false"},
expected: map[string]interface{}{... | explode_data.jsonl/21862 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 419
} | [
2830,
3393,
87824,
2275,
42502,
1567,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
37278,
43451,
256,
2415,
14032,
31344,
16094,
197,
1903,
43451,
262,
2415,
14032,
30953,
198,
197,
42400,
2415,
14032,
31344,
16094,
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 TestReadRecord(t *testing.T) {
badInfoRecord := make([]byte, len(infoRecord))
copy(badInfoRecord, infoRecord)
badInfoRecord[len(badInfoRecord)-1] = 'a'
tests := []struct {
data []byte
wr *walpb.Record
we error
}{
{infoRecord, &walpb.Record{Type: 1, Crc: crc32.Checksum(infoData, crcTable), Data: i... | explode_data.jsonl/36704 | {
"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,
4418,
6471,
1155,
353,
8840,
836,
8,
341,
2233,
329,
1731,
6471,
1669,
1281,
10556,
3782,
11,
2422,
14208,
6471,
1171,
49124,
1883,
329,
1731,
6471,
11,
3546,
6471,
340,
2233,
329,
1731,
6471,
24693,
1883,
329,
1731,
6471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAutomaticWorkspaceModule_Interdependent(t *testing.T) {
const multiModule = `
-- moda/a/go.mod --
module a.com
require b.com v1.2.3
-- moda/a/go.sum --
b.com v1.2.3 h1:tXrlXP0rnjRpKNmkbLYoWBdq0ikb3C3bKK9//moAWBI=
b.com v1.2.3/go.mod h1:D+J7pfFBZK5vdIdZEFquR586vKKIkqG7Qjw9AxG5BQ8=
-- moda/a/a.go --
package a
... | explode_data.jsonl/37362 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 406
} | [
2830,
3393,
62790,
45981,
3332,
79717,
37555,
1155,
353,
8840,
836,
8,
341,
4777,
7299,
3332,
284,
22074,
313,
90668,
14186,
25525,
10929,
39514,
4352,
264,
905,
271,
4310,
293,
905,
348,
16,
13,
17,
13,
18,
198,
313,
90668,
14186,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_scsi_RescanSCSIDeviceByHCTL(t *testing.T) {
type args struct {
ctx context.Context
h HCTL
}
ctx := context.Background()
defaultArgs := args{ctx: ctx, h: getValidHCTL()}
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mock := mh.MockHelper{
Ctrl: ctrl,
OSOpenFileCallPath: fmt.Sprintf(
... | explode_data.jsonl/65980 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1173
} | [
2830,
3393,
643,
63229,
92815,
4814,
3540,
36499,
63924,
1359,
39,
23871,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
20985,
2266,
9328,
198,
197,
9598,
256,
472,
23871,
198,
197,
630,
20985,
1669,
2266,
19047,
2822,
1194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStandard(t *testing.T) {
cfDeploymentHome, err := helpers.SetPath()
if err != nil {
t.Fatalf("setup: %v", err)
}
suite := helpers.NewSuiteTest(cfDeploymentHome, testDirectory, standardTests)
suite.EnsureTestCoverage(t)
suite.ReadmeTest(t)
suite.InterpolateTest(t)
} | explode_data.jsonl/35132 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
19781,
1155,
353,
8840,
836,
8,
341,
96989,
75286,
7623,
11,
1848,
1669,
30187,
4202,
1820,
741,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
15188,
25,
1018,
85,
497,
1848,
340,
197,
630,
96572,
1669,
30187,
7121,
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... | 2 |
func TestStatefulSetControlRollingUpdate(t *testing.T) {
type testcase struct {
name string
invariants func(set *apps.StatefulSet, spc *fakeStatefulPodControl) error
initial func() *apps.StatefulSet
update func(set *apps.StatefulSet) *apps.StatefulSet
validate func(set *apps.StatefulSet, pods ... | explode_data.jsonl/28894 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2398
} | [
2830,
3393,
1397,
1262,
1649,
3273,
32355,
287,
4289,
1155,
353,
8840,
836,
8,
341,
13158,
70080,
2036,
341,
197,
11609,
981,
914,
198,
197,
17430,
54611,
2915,
14171,
353,
27635,
18942,
1262,
1649,
11,
978,
66,
353,
30570,
1397,
1262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestReverse(t *testing.T) {
t.Parallel()
for _, s := range [][]float64{
{0},
{1, 0},
{2, 1, 0},
{3, 2, 1, 0},
{9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
} {
Reverse(s)
for i, v := range s {
if v != float64(i) {
t.Errorf("unexpected values for element %d: got:%v want:%v", i, v, i)
}
}
}
} | explode_data.jsonl/1236 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 178
} | [
2830,
3393,
45695,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2023,
8358,
274,
1669,
2088,
52931,
3649,
21,
19,
515,
197,
197,
90,
15,
1583,
197,
197,
90,
16,
11,
220,
15,
1583,
197,
197,
90,
17,
11,
220,
16,
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... | 4 |
func TestIndex(t *testing.T) {
xs := []byte{1, 2, 3, 4, 5, 6, 7, 8}
v := ValueOf(xs).Index(3).Interface().(byte)
if v != xs[3] {
t.Errorf("xs.Index(3) = %v; expected %v", v, xs[3])
}
xa := [8]byte{10, 20, 30, 40, 50, 60, 70, 80}
v = ValueOf(xa).Index(2).Interface().(byte)
if v != xa[2] {
t.Errorf("xa.Index(2... | explode_data.jsonl/29576 | {
"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,
1552,
1155,
353,
8840,
836,
8,
341,
10225,
82,
1669,
3056,
3782,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
532,
5195,
1669,
5162,
2124,
53322,
568,
1552,
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 TestCustomer_SendStatementText(t *testing.T) {
key := "test api key"
var mockTextResponse [1]invdendpoint.TextResponse
mockResponse := new(invdendpoint.TextResponse)
mockResponse.Id = "abcdef"
mockResponse.Message = "hello text"
mockResponse.CreatedAt = time.Now().UnixNano()
mockTextResponse[0] = *mockR... | explode_data.jsonl/15012 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
12792,
46267,
8636,
1178,
1155,
353,
8840,
836,
8,
341,
23634,
1669,
330,
1944,
6330,
1376,
1837,
2405,
7860,
1178,
2582,
508,
16,
60,
14057,
67,
32540,
1979,
2582,
271,
77333,
2582,
1669,
501,
5900,
16598,
32540,
1979,
2582... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestFloatGenerator(t *testing.T) {
g, err := NewFloatGenerator(-28.0168595, 52.5388779)
CheckTrue(t, err == nil, "Should not fail to convert integer")
c := g.Generate()
actual := []string{string(<-c), string(<-c), string(<-c), string(<-c), string(<-c), string(<-c), string(<-c), string(<-c)}
// check all gener... | explode_data.jsonl/12228 | {
"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,
5442,
12561,
1155,
353,
8840,
836,
8,
341,
3174,
11,
1848,
1669,
1532,
5442,
12561,
4080,
17,
23,
13,
15,
16,
21,
23,
20,
24,
20,
11,
220,
20,
17,
13,
20,
18,
23,
23,
22,
22,
24,
340,
69472,
2514,
1155,
11,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestValidateDDBName(t *testing.T) {
testCases := map[string]testCase{
"good case": {
input: "dynamo_table-1",
want: nil,
},
"too short": {
input: "p",
want: errDDBValueBadSize,
},
"too long": {
input: "i-met-a-traveller-from-an-antique-land-who-said_two-vast-and-trunkless-legs-of-stone_... | explode_data.jsonl/34546 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 407
} | [
2830,
3393,
17926,
35,
3506,
675,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
66194,
515,
197,
197,
1,
18536,
1142,
788,
341,
298,
22427,
25,
330,
67,
85608,
5237,
12,
16,
756,
298,
50780,
25,
220,
2092,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOverlappingStatefulSets(t *testing.T) {
sets := make([]*appsv1alpha1.StatefulSet, 10)
perm := rand.Perm(10)
for i, v := range perm {
sets[i] = newStatefulSet(10)
sets[i].CreationTimestamp = metav1.NewTime(sets[i].CreationTimestamp.Add(time.Duration(v) * time.Second))
}
sort.Sort(overlappingStatefulSet... | explode_data.jsonl/68374 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 283
} | [
2830,
3393,
1918,
90619,
1397,
1262,
30175,
1155,
353,
8840,
836,
8,
341,
197,
4917,
1669,
1281,
85288,
676,
3492,
16,
7141,
16,
18942,
1262,
1649,
11,
220,
16,
15,
340,
197,
19913,
1669,
10382,
1069,
4195,
7,
16,
15,
340,
2023,
600... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTxSimulatorWithNoExistingData(t *testing.T) {
// run the tests for each environment configured in pkg_test.go
for _, testEnv := range testEnvs {
t.Logf("Running test for TestEnv = %s", testEnv.getName())
testLedgerID := "testtxsimulatorwithnoexistingdata"
testEnv.init(t, testLedgerID, nil)
testTxSimu... | explode_data.jsonl/63601 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
31584,
14027,
10511,
2354,
2753,
53067,
1043,
1155,
353,
8840,
836,
8,
341,
197,
322,
1598,
279,
7032,
369,
1817,
4573,
19755,
304,
24793,
4452,
18002,
198,
2023,
8358,
1273,
14359,
1669,
2088,
1273,
1702,
11562,
341,
197,
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 TestGetConfigValueNullApolloConfig(t *testing.T) {
client := createMockApolloConfig(120)
//test getValue
value := client.GetValue("joe")
Assert(t, "", Equal(value))
//test GetStringValue
defaultValue := "j"
//test default
v := client.GetStringValue("joe", defaultValue)
Assert(t, defaultValue, Equal(v)... | explode_data.jsonl/17961 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 114
} | [
2830,
3393,
1949,
2648,
1130,
3280,
95909,
2648,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
1855,
11571,
95909,
2648,
7,
16,
17,
15,
340,
197,
322,
1944,
31720,
198,
16309,
1669,
2943,
25816,
445,
73,
4644,
5130,
18017,
1155,
11,
7342... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBlock1(t *testing.T) {
dir := testutils.InitTestEnv(ModuleName, t)
colCnt := 4
indexCnt := make(map[int]int)
for col := 0; col < colCnt; col++ {
indexCnt[col] = 2
}
var block file.Block
id := common.NextGlobalSeqNum()
seg := SegmentFactory.Build(dir, id).(*segmentFile)
block = newBlock(common.NextGl... | explode_data.jsonl/63305 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 638
} | [
2830,
3393,
4713,
16,
1155,
353,
8840,
836,
8,
341,
48532,
1669,
1273,
6031,
26849,
2271,
14359,
75295,
675,
11,
259,
340,
46640,
33747,
1669,
220,
19,
198,
26327,
33747,
1669,
1281,
9147,
18640,
63025,
340,
2023,
1375,
1669,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestConvertList(t *testing.T) {
res := MustConvertList([]bson.M{
{
"foo": "bar",
},
{
"baz": bson.D{
bson.E{Key: "foo", Value: bson.M{
"foo": "bar",
}},
},
},
})
assert.Equal(t, List{
&bson.D{
bson.E{Key: "foo", Value: "bar"},
},
&bson.D{
bson.E{Key: "baz", Value: bson.... | explode_data.jsonl/18438 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 257
} | [
2830,
3393,
12012,
852,
1155,
353,
8840,
836,
8,
341,
10202,
1669,
15465,
12012,
852,
10556,
91723,
1321,
515,
197,
197,
515,
298,
197,
1,
7975,
788,
330,
2257,
756,
197,
197,
1583,
197,
197,
515,
298,
197,
1,
42573,
788,
50980,
909... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckLabel(t *testing.T) {
k1 := GenerateRandomKey()
label := "zarb"
f := util.TempFilePath()
assert.NoError(t, EncryptKeyToFile(k1, f, "secret", label))
ek, err := NewEncryptedKey(f)
assert.NoError(t, err)
assert.Equal(t, ek.Label, label)
} | explode_data.jsonl/79084 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 107
} | [
2830,
3393,
3973,
2476,
1155,
353,
8840,
836,
8,
341,
16463,
16,
1669,
19813,
13999,
1592,
741,
29277,
1669,
330,
55900,
65,
698,
1166,
1669,
4094,
65009,
19090,
741,
6948,
35699,
1155,
11,
55459,
1592,
41550,
5969,
16,
11,
282,
11,
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 TestReflection(t *testing.T) {
o := js.Global.Call("eval", "({ answer: 42 })")
if reflect.ValueOf(o).Interface().(*js.Object) != o {
t.Fail()
}
type S struct {
Field *js.Object
}
s := S{o}
v := reflect.ValueOf(&s).Elem()
if v.Field(0).Interface().(*js.Object).Get("answer").Int() != 42 {
t.Fail()
}... | explode_data.jsonl/56800 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 282
} | [
2830,
3393,
44238,
1155,
353,
8840,
836,
8,
341,
22229,
1669,
6994,
27381,
27017,
445,
14170,
497,
330,
2306,
4226,
25,
220,
19,
17,
6413,
1138,
743,
8708,
6167,
2124,
10108,
568,
5051,
1005,
4071,
2519,
8348,
8,
961,
297,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestS3Artifact(t *testing.T) {
a := &S3Artifact{Key: "my-key", S3Bucket: S3Bucket{Endpoint: "my-endpoint", Bucket: "my-bucket"}}
assert.True(t, a.HasLocation())
assert.NoError(t, a.SetKey("my-key"))
key, err := a.GetKey()
assert.NoError(t, err)
assert.Equal(t, "my-key", key)
} | explode_data.jsonl/26025 | {
"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,
50,
18,
85578,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
609,
50,
18,
85578,
90,
1592,
25,
330,
2408,
16173,
497,
328,
18,
36018,
25,
328,
18,
36018,
90,
27380,
25,
330,
2408,
13068,
2768,
497,
47768,
25,
330,
2408,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBucketHandler_CreateIfDoesntExist(t *testing.T) {
t.Run("SuccessRegion", func(t *testing.T) {
// Given
g := gomega.NewGomegaWithT(t)
bucketName := "bucket"
region := "region"
cfg := bucket.Config{
Region: region,
}
minioCli := &automock.BucketClient{}
handler := bucket.NewHandler(minioCli... | explode_data.jsonl/67221 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 987
} | [
2830,
3393,
36018,
3050,
34325,
2679,
21468,
406,
25613,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
7188,
14091,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
322,
16246,
198,
197,
3174,
1669,
342,
32696,
7121,
38,
32696,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNonResourceMatchStar(t *testing.T) {
test := &nonResourceMatchTest{
url: "first/second",
matcher: "first/*",
expectedResult: true,
}
test.run(t)
} | explode_data.jsonl/45777 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 83
} | [
2830,
3393,
8121,
4783,
8331,
12699,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
609,
6280,
4783,
8331,
2271,
515,
197,
19320,
25,
310,
330,
3896,
14,
5569,
756,
197,
2109,
28058,
25,
286,
330,
3896,
1057,
756,
197,
42400,
2077,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestAzureDevOpsProject_CreateProject_ReportsErrorIfNoSuccessForLongTime(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
coreClient := azdosdkmocks.NewMockCoreClient(ctrl)
operationsClient := azdosdkmocks.NewMockOperationsClient(ctrl)
clients := &config.AggregatedClient{
CoreClient: ... | explode_data.jsonl/3732 | {
"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,
78107,
14592,
38904,
7849,
34325,
7849,
62,
23748,
1454,
2679,
2753,
7188,
2461,
6583,
1462,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
71882,
2959,
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 TestValidateLogGroupName(t *testing.T) {
validNames := []string{
"ValidLogGroupName",
"ValidLogGroup.Name",
"valid/Log-group",
"1234",
"YadaValid#0123",
"Also_valid-name",
strings.Repeat("W", 512),
}
for _, v := range validNames {
_, errors := validateLogGroupName(v, "name")
if len(errors) != ... | explode_data.jsonl/78570 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 323
} | [
2830,
3393,
17926,
2201,
50569,
1155,
353,
8840,
836,
8,
341,
56322,
7980,
1669,
3056,
917,
515,
197,
197,
1,
4088,
2201,
50569,
756,
197,
197,
1,
4088,
2201,
2808,
2967,
756,
197,
197,
1,
1891,
14,
2201,
4351,
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,
1,
1... | 5 |
func TestBatch(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
d := newTestDag()
b := NewBatch(ctx, d)
for i := 0; i < 1000; i++ {
// It would be great if we could use *many* different nodes here
// but we can't add any dependencies and I don't feel like adding
// any ... | explode_data.jsonl/47776 | {
"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,
21074,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
2822,
2698,
1669,
501,
2271,
35,
351,
741,
2233,
1669,
1532,
21074,
7502,
11,
294,
340,
2023,
600,
1669,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestConfigMySQLVersion(t *testing.T) {
assert := asrt.New(t)
versionsToTest := nodeps.ValidMySQLVersions
pwd, _ := os.Getwd()
// Create a temporary directory and switch to it.
testDir := testcommon.CreateTmpDir(t.Name())
_ = os.Chdir(testDir)
t.Cleanup(func() {
err := os.Chdir(pwd)
assert.NoError(err... | explode_data.jsonl/76715 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 845
} | [
2830,
3393,
2648,
59224,
5637,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
438,
3342,
7121,
1155,
340,
197,
28290,
1249,
2271,
1669,
2436,
1690,
47156,
59224,
69015,
271,
3223,
6377,
11,
716,
1669,
2643,
2234,
6377,
2822,
197,
322,
4230,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApiTest_AddsBasicAuthToRequest(t *testing.T) {
handler := http.NewServeMux()
handler.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) {
username, password, ok := r.BasicAuth()
if !ok {
w.WriteHeader(http.StatusBadRequest)
return
}
if username != "username" || password != "passw... | explode_data.jsonl/54794 | {
"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,
6563,
2271,
21346,
82,
15944,
5087,
1249,
1900,
1155,
353,
8840,
836,
8,
341,
53326,
1669,
1758,
7121,
60421,
44,
2200,
741,
53326,
63623,
4283,
14990,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
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 TestHttpParser_RedactAuthorization_raw(t *testing.T) {
http := httpModForTests(nil)
http.redactAuthorization = true
http.parserConfig.sendHeaders = false
http.parserConfig.sendAllHeaders = false
data := []byte("POST / HTTP/1.1\r\n" +
"user-agent: curl/7.35.0\r\n" + "host: localhost:9000\r\n" +
"accept: *... | explode_data.jsonl/16511 | {
"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,
2905,
6570,
92940,
531,
18124,
16067,
1155,
353,
8840,
836,
8,
341,
28080,
1669,
1758,
4459,
2461,
18200,
27907,
340,
28080,
17335,
531,
18124,
284,
830,
198,
28080,
25617,
2648,
5219,
10574,
284,
895,
198,
28080,
25617,
2648,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoteBearerTokenAcquirerCaching(t *testing.T) {
assert := assert.New(t)
count := 0
server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
auth := SimpleBearer{
Token: fmt.Sprintf("gopher%v", count),
ExpiresInSeconds: 3600, //1 hour
}
count++
... | explode_data.jsonl/60510 | {
"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,
24703,
26399,
3323,
11654,
50792,
34,
11829,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
18032,
1669,
220,
15,
198,
41057,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
2601,
86,
1758,
37508,
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 TestCIDRValidation(t *testing.T) {
tests := []struct {
param string
expected bool
}{
{"10.0.0.0/0", true},
{"10.0.0.1/8", true},
{"172.16.0.1/16", true},
{"192.168.0.1/24", true},
{"192.168.255.254/24", true},
{"192.168.255.254/48", false},
{"192.168.255.256/24", false},
{"172.16.255.254/1... | explode_data.jsonl/77239 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 517
} | [
2830,
3393,
54146,
49,
13799,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
36037,
262,
914,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
4913,
16,
15,
13,
15,
13,
15,
13,
15,
14,
15,
497,
830,
1583,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestTxn_Apply_ACLDeny(t *testing.T) {
dir1, s1 := testServerWithConfig(t, func(c *Config) {
c.ACLDatacenter = "dc1"
c.ACLMasterToken = "root"
c.ACLDefaultPolicy = "deny"
})
defer os.RemoveAll(dir1)
defer s1.Shutdown()
codec := rpcClient(t, s1)
defer codec.Close()
testutil.WaitForLeader(t, s1.RPC, "dc... | explode_data.jsonl/35113 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1799
} | [
2830,
3393,
31584,
77,
36117,
398,
97627,
23619,
88,
1155,
353,
8840,
836,
8,
341,
48532,
16,
11,
274,
16,
1669,
1273,
5475,
2354,
2648,
1155,
11,
2915,
1337,
353,
2648,
8,
341,
197,
1444,
875,
3140,
1043,
3057,
284,
330,
7628,
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 TestPlaceMultipleMarginOrdersOverPairLimits(t *testing.T) {
ord := okgroup.PlaceOrderRequest{
InstrumentID: spotCurrency,
Type: order.Limit.Lower(),
Side: order.Buy.Lower(),
MarginTrading: "1",
Size: "-100",
Notional: "100",
}
request := []okgroup.PlaceOrderRequest{... | explode_data.jsonl/30183 | {
"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,
17371,
32089,
21681,
24898,
1918,
12443,
94588,
1155,
353,
8840,
836,
8,
341,
197,
539,
1669,
5394,
4074,
86675,
4431,
1900,
515,
197,
197,
56324,
915,
25,
220,
7702,
26321,
345,
197,
27725,
25,
688,
1973,
1214,
2353,
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... | 3 |
func TestCoordinatorToFilterOutPvtRWSetsWithWrongHash(t *testing.T) {
peerSelfSignedData := protoutil.SignedData{
Identity: []byte{0, 1, 2},
Signature: []byte{3, 4, 5},
Data: []byte{6, 7, 8},
}
expectedPvtData := map[uint64]*ledger.TxPvtData{
0: {SeqInBlock: 0, WriteSet: &rwset.TxPvtReadWriteSet{
... | explode_data.jsonl/68550 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1384
} | [
2830,
3393,
64304,
1249,
5632,
2662,
47,
9708,
49,
7433,
1415,
2354,
29185,
6370,
1155,
353,
8840,
836,
8,
341,
1572,
197,
16537,
12092,
49312,
1043,
1669,
1724,
30158,
808,
1542,
1043,
515,
197,
197,
18558,
25,
220,
3056,
3782,
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,
1... | 1 |
func TestNewNormalChol(t *testing.T) {
for _, test := range []struct {
mean []float64
cov *mat.SymDense
}{
{
mean: []float64{2, 3},
cov: mat.NewSymDense(2, []float64{1, 0.1, 0.1, 1}),
},
} {
var chol mat.Cholesky
ok := chol.Factorize(test.cov)
if !ok {
panic("bad test")
}
n := NewNormalC... | explode_data.jsonl/12020 | {
"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,
3564,
12206,
1143,
337,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
3056,
1235,
341,
197,
2109,
5307,
3056,
3649,
21,
19,
198,
197,
1444,
859,
220,
353,
8470,
808,
1600,
35,
1117,
198,
197,
59403,
197,
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... | 3 |
func TestLeaseStore(t *testing.T) {
const metadata = `
# HELP kube_lease_owner Information about the Lease's owner.
# TYPE kube_lease_owner gauge
# HELP kube_lease_renew_time Kube lease renew time.
# TYPE kube_lease_renew_time gauge
`
var (
cases = []generateMetricsTestCase{
{
... | explode_data.jsonl/22544 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 660
} | [
2830,
3393,
2304,
519,
6093,
1155,
353,
8840,
836,
8,
341,
4777,
11160,
284,
22074,
286,
671,
55471,
80958,
62,
1623,
29027,
8085,
911,
279,
80651,
594,
6372,
624,
286,
671,
12454,
80958,
62,
1623,
29027,
30890,
198,
286,
671,
55471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIgnoreNonTargetMessage(t *testing.T) {
testConvert(t, `
file_to_generate: "foo.proto"
proto_file <
name: "foo.proto"
package: "example_package.nested"
message_type <
name: "FooProto"
field < name: "i1" number: 1 type: TYPE_INT32 label: LABEL_OPTIONAL >
>
message_type <
... | explode_data.jsonl/41112 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 377
} | [
2830,
3393,
12497,
8121,
6397,
2052,
1155,
353,
8840,
836,
8,
341,
18185,
12012,
1155,
11,
22074,
298,
17661,
2346,
48851,
25,
330,
7975,
57322,
698,
298,
197,
15110,
2458,
77565,
571,
11609,
25,
330,
7975,
57322,
698,
571,
197,
1722,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEviction(t *testing.T) {
require, ctx := require.New(t), context.Background()
cfg := DefaultCoherentConfig
cfg.KeysLimit = 3
cfg.NewBlockWait = 0
c := New(cfg)
db := memdb.NewTestDB(t)
k1, k2 := [20]byte{1}, [20]byte{2}
var id uint64
_ = db.Update(ctx, func(tx kv.RwTx) error {
_ = tx.Put(kv.PlainSt... | explode_data.jsonl/11839 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 801
} | [
2830,
3393,
34112,
2479,
1155,
353,
8840,
836,
8,
341,
17957,
11,
5635,
1669,
1373,
7121,
1155,
701,
2266,
19047,
741,
50286,
1669,
7899,
7339,
37538,
2648,
198,
50286,
37863,
16527,
284,
220,
18,
198,
50286,
7121,
4713,
14190,
284,
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 TestInitEngine(t *testing.T) {
tests := map[string]struct {
engine chaosTypes.EngineInfo
isErr bool
}{
"Test Positive-1": {
engine: chaosTypes.EngineInfo{
Instance: &v1alpha1.ChaosEngine{
ObjectMeta: metav1.ObjectMeta{
Name: "engine-init-p1",
Namespace: "default",
},
... | explode_data.jsonl/32130 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 945
} | [
2830,
3393,
3803,
4571,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
80118,
26915,
4173,
54424,
1731,
198,
197,
19907,
7747,
220,
1807,
198,
197,
59403,
197,
197,
1,
2271,
43903,
12,
16,
788,
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... | 5 |
func TestSumPartitionSelectionInt(t *testing.T) {
for _, tc := range sumPartitionSelectionTestCases {
t.Run(tc.name, func(t *testing.T) {
// Verify that entriesPerPartition is sensical.
if tc.entriesPerPartition <= 0 {
t.Fatalf("Invalid test case: entriesPerPartition must be positive. Got: %d", tc.entriesP... | explode_data.jsonl/42971 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 749
} | [
2830,
3393,
9190,
49978,
11177,
1072,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
2629,
49978,
11177,
2271,
37302,
341,
197,
3244,
16708,
44415,
2644,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
197,
322,
25429,
429,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplyTransform(t *testing.T) {
p, s := beam.NewPipelineWithRoot()
tests := []struct {
input beam.PCollection
wantReversed []interface{}
wantToUpper []interface{}
}{
{
input: beam.Create(s, "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"),
wantReversed: []interface... | explode_data.jsonl/33137 | {
"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,
28497,
8963,
1155,
353,
8840,
836,
8,
341,
3223,
11,
274,
1669,
23418,
7121,
34656,
2354,
8439,
741,
78216,
1669,
3056,
1235,
341,
197,
22427,
286,
23418,
1069,
6482,
198,
197,
50780,
693,
43776,
3056,
4970,
16094,
197,
5078... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTxStmtDeadlock(t *testing.T) {
db := newTestDB(t, "people")
defer closeDB(t, db)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
tx, err := db.BeginTx(ctx, nil)
if err != nil {
t.Fatal(err)
}
stmt, err := tx.Prepare("SELECT|people|name,age|age=?")
if err != nil {
t.Fatal(e... | explode_data.jsonl/16016 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 256
} | [
2830,
3393,
31584,
31063,
28320,
1023,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
501,
2271,
3506,
1155,
11,
330,
16069,
1138,
16867,
3265,
3506,
1155,
11,
2927,
692,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestExternalIDSet(t *testing.T) {
createdInstanceCredential := getTestInstanceCredential()
creatorUserName := "creator"
createContext := sctestutil.ContextWithUserName(creatorUserName)
bindingRESTStrategies.PrepareForCreate(createContext, createdInstanceCredential)
if createdInstanceCredential.Spec.ExternalI... | explode_data.jsonl/80702 | {
"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,
25913,
915,
1649,
1155,
353,
8840,
836,
8,
341,
197,
7120,
2523,
48265,
1669,
633,
2271,
2523,
48265,
741,
197,
32398,
18856,
1669,
330,
32398,
698,
39263,
1972,
1669,
274,
67880,
1314,
9328,
2354,
18856,
7,
32398,
18856,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCatalog_Register_NodeID(t *testing.T) {
t.Parallel()
dir1, s1 := testServer(t)
defer os.RemoveAll(dir1)
defer s1.Shutdown()
codec := rpcClient(t, s1)
defer codec.Close()
arg := structs.RegisterRequest{
Datacenter: "dc1",
ID: "nope",
Node: "foo",
Address: "127.0.0.1",
Service:... | explode_data.jsonl/49208 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 413
} | [
2830,
3393,
41606,
73124,
41340,
915,
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,
66,
1669,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestImportFSNodeCommonJS(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
import 'fs'
import * as fs from 'fs'
import defaultValue from 'fs'
import {readFileSync} from 'fs'
console.log(fs, readFileSync, defaultValue)
`,
},
entryPaths:... | explode_data.jsonl/38497 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 227
} | [
2830,
3393,
11511,
8485,
1955,
10839,
12545,
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,
21918,
364,
3848,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGather(t *testing.T) {
DefaultRegistry = NewRegistry()
tests := []struct {
name string
want warp10.GTSList
}{{
name: "main",
want: warp10.GTSList{},
}}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := Gather()
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("Gather... | explode_data.jsonl/47648 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
38,
1856,
1155,
353,
8840,
836,
8,
341,
91084,
15603,
284,
1532,
15603,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
50780,
46320,
16,
15,
1224,
9951,
852,
198,
197,
15170,
515,
197,
11609,
25,
330,
3817,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFindCheckpointDefinition_Markdown(t *testing.T) {
result := []string{}
for _, def := range AllCheckpoints {
row := "## " + def.Name + "\n* 前缀:`${" + def.Prefix + "}`\n* 描述:" + def.Description
if def.HasParams {
row += "\n* 是否有子参数:YES"
paramOptions := def.Instance.ParamOptions()
if paramOptions ... | explode_data.jsonl/13551 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 328
} | [
2830,
3393,
9885,
92688,
10398,
1245,
838,
2923,
1155,
353,
8840,
836,
8,
341,
9559,
1669,
3056,
917,
16094,
2023,
8358,
707,
1669,
2088,
2009,
3973,
7706,
341,
197,
33967,
1669,
330,
565,
330,
488,
707,
2967,
488,
2917,
77,
9,
4891,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDontSyncDeploymentsWithEmptyPodSelector(t *testing.T) {
f := newFixture(t)
d := newDeployment("foo", 1, nil, nil, nil, map[string]string{"foo": "bar"})
d.Spec.Selector = &metav1.LabelSelector{}
f.dLister = append(f.dLister, d)
f.objects = append(f.objects, d)
// Normally there should be a status update... | explode_data.jsonl/66038 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 163
} | [
2830,
3393,
35,
544,
12154,
69464,
1368,
2354,
3522,
23527,
5877,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
692,
2698,
1669,
501,
75286,
445,
7975,
497,
220,
16,
11,
2092,
11,
2092,
11,
2092,
11,
2415,
14032,
30953,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hexTraceIDToOCTraceID(t *testing.T) {
tests := []struct {
name string
hexStr string
want []byte
wantErr error
}{
{
name: "empty hex string",
hexStr: "",
want: nil,
wantErr: errHexTraceIDWrongLen,
},
{
name: "wrong length",
hexStr: "000000000000000010",
wa... | explode_data.jsonl/9084 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 599
} | [
2830,
3393,
32655,
6550,
915,
1249,
46,
1162,
41183,
915,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
9598,
327,
2580,
220,
914,
198,
197,
50780,
262,
3056,
3782,
198,
197,
50780,
7747,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccAWSIAMOpenIDConnectProvider_basic(t *testing.T) {
rString := acctest.RandString(5)
url := "accounts.testle.com/" + rString
resourceName := "aws_iam_openid_connect_provider.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
... | explode_data.jsonl/82094 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 755
} | [
2830,
3393,
14603,
36136,
73707,
5002,
915,
14611,
5179,
34729,
1155,
353,
8840,
836,
8,
341,
7000,
703,
1669,
1613,
67880,
2013,
437,
703,
7,
20,
340,
19320,
1669,
330,
26206,
5958,
273,
905,
11225,
488,
435,
703,
198,
50346,
675,
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 TestStandardCheckMtricFail(t *testing.T) {
v := failCheck.Metric()
if v.Status != check.Success {
t.Errorf("Wrong status: %d", v.Status)
}
if v.Output != "" {
t.Errorf("Wrong message: %s", v.Output)
}
} | explode_data.jsonl/49834 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
19781,
3973,
44,
376,
292,
19524,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
3690,
3973,
1321,
16340,
2822,
743,
348,
10538,
961,
1779,
33320,
341,
197,
3244,
13080,
445,
29185,
2639,
25,
1018,
67,
497,
348,
10538,
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 TestCapabilities_GetBool(t *testing.T) {
t.Parallel()
var tests = []struct {
capabilities *Capabilities
brfcID string
alternateID string
expectedValue bool
}{
{&Capabilities{
StandardResponse: StandardResponse{StatusCode: http.StatusOK, Tracing: resty.TraceInfo{TotalTime: 200}},
BsvAl... | explode_data.jsonl/54219 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1207
} | [
2830,
3393,
55315,
13614,
11233,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
2405,
7032,
284,
3056,
1235,
341,
197,
1444,
391,
8456,
220,
353,
55315,
198,
197,
80255,
8316,
915,
286,
914,
198,
197,
197,
75362,
915,
256,
914... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestStore_fsync(t *testing.T) {
for _, s := range stores {
store, err := s.Factory(s.Path, true)
if err != nil {
//os.RemoveAll(s.Path)
t.Fatal(err)
}
t.Run(s.Name, wrapfsync(testStore, store, true))
//os.RemoveAll(s.Path)
}
} | explode_data.jsonl/12270 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
6093,
761,
12996,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
274,
1669,
2088,
10533,
341,
197,
57279,
11,
1848,
1669,
274,
51008,
1141,
17474,
11,
830,
340,
197,
743,
1848,
961,
2092,
341,
298,
197,
322,
436,
84427,
1141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPatch_rmLink(t *testing.T) {
is := is.New(t)
s := NewShell(shellUrl)
newRoot, err := s.Patch(examplesHash, "rm-link", "about")
is.Nil(err)
is.Equal(newRoot, "QmPmCJpciopaZnKcwymfQyRAEjXReR6UL2rdSfEscZfzcp")
} | explode_data.jsonl/61084 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 115
} | [
2830,
3393,
43622,
58537,
3939,
1155,
353,
8840,
836,
8,
341,
19907,
1669,
374,
7121,
1155,
340,
1903,
1669,
1532,
25287,
93558,
2864,
340,
8638,
8439,
11,
1848,
1669,
274,
1069,
754,
5463,
4023,
6370,
11,
330,
8719,
8965,
497,
330,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAccAWSS3BucketObject_updates(t *testing.T) {
var originalObj, modifiedObj s3.GetObjectOutput
resourceName := "aws_s3_bucket_object.object"
rInt := acctest.RandInt()
sourceInitial := testAccAWSS3BucketObjectCreateTempFile(t, "initial object state")
defer os.Remove(sourceInitial)
sourceModified := testAcc... | explode_data.jsonl/64960 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 703
} | [
2830,
3393,
14603,
14419,
1220,
18,
36018,
1190,
57829,
1155,
353,
8840,
836,
8,
341,
2405,
4024,
5261,
11,
10807,
5261,
274,
18,
25618,
5097,
198,
50346,
675,
1669,
330,
8635,
643,
18,
38749,
5314,
6035,
698,
7000,
1072,
1669,
1613,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDescribeUnstructuredContent(t *testing.T) {
testCases := []struct {
expected string
unexpected string
}{
{
expected: `API Version: v1
Dummy 2: present
Items:
Item Bool: true
Item Int: 42
Kind: Test
Metadata:
Creation Timestamp: 2017-04-01T00:00:00Z
Name: MyName
Namespace: MyNamespace
R... | explode_data.jsonl/34946 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 853
} | [
2830,
3393,
74785,
1806,
51143,
2762,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
42400,
256,
914,
198,
197,
20479,
7325,
914,
198,
197,
59403,
197,
197,
515,
298,
42400,
25,
1565,
7082,
6079,
25,
5195,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestHandler(t *testing.T) {
topoProvider := xtest.TopoProviderFromFile(t, "testdata/topology.json")
type testDef struct {
name string
req *path_mgmt.IFStateReq
expected *path_mgmt.IFStateInfos
result *infra.HandlerResult
}
rev102, err := path_mgmt.NewSignedRevInfo(&path_mgmt.RevInfo{
IfI... | explode_data.jsonl/22044 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1030
} | [
2830,
3393,
3050,
1155,
353,
8840,
836,
8,
341,
42118,
78,
5179,
1669,
856,
1944,
17557,
78,
5179,
43633,
1155,
11,
330,
92425,
35282,
2449,
4323,
5130,
13158,
1273,
2620,
2036,
341,
197,
11609,
257,
914,
198,
197,
24395,
414,
353,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInputService3ProtocolTestNestedStructuresCase2(t *testing.T) {
sess := session.New()
svc := NewInputService3ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
input := &InputService3TestShapeInputShape{
Description: aws.String("baz"),
SubStructure: &InputService3TestShapeSubStructure{... | explode_data.jsonl/46473 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 354
} | [
2830,
3393,
2505,
1860,
18,
20689,
2271,
71986,
9422,
1413,
4207,
17,
1155,
353,
8840,
836,
8,
341,
1903,
433,
1669,
3797,
7121,
741,
1903,
7362,
1669,
1532,
2505,
1860,
18,
20689,
2271,
57223,
11,
609,
8635,
10753,
90,
27380,
25,
315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBucketFillThrottleCloseBeforeTick(t *testing.T) {
t.Parallel()
b := NewBucket(0, time.Minute)
time.AfterFunc(time.Second, func() { b.Close() })
if _, err := b.FillThrottle(func(int64) (int64, error) {
t.Fatal("FillThrottle(): executed func after close, want skipped")
return 0, nil
}); err != errFill... | explode_data.jsonl/74399 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
36018,
14449,
1001,
27535,
7925,
10227,
22213,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
2233,
1669,
1532,
36018,
7,
15,
11,
882,
75770,
340,
21957,
36892,
9626,
9730,
32435,
11,
2915,
368,
314,
293,
10421,
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 Test_decodeBitString2(t *testing.T) {
value := []byte{0x9A, 0xBC, 0xD4} // 22 bits
bsC := newBitStringFromBytes(value, 3, 2)
protoBitString, err := decodeBitString(bsC)
assert.NilError(t, err)
//assert.Assert(t, protoBitString != nil)
assert.Equal(t, int(protoBitString.Len), 22, "unexpected bit string lengt... | explode_data.jsonl/66719 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 258
} | [
2830,
3393,
15227,
8344,
703,
17,
1155,
353,
8840,
836,
8,
341,
16309,
1669,
3056,
3782,
90,
15,
87,
24,
32,
11,
220,
15,
80979,
11,
220,
15,
15764,
19,
92,
442,
220,
17,
17,
9472,
198,
93801,
34,
1669,
501,
8344,
703,
3830,
707... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFormat(t *testing.T) {
const godelYML = `exclude:
names:
- "\\..+"
- "vendor"
paths:
- "godel"
`
pluginProvider, err := pluginapitester.NewPluginProviderFromLocator(formatPluginLocator, formatPluginResolver)
require.NoError(t, err)
assetPath, err := products.Bin("ptimports-asset")
requir... | explode_data.jsonl/17623 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2815
} | [
2830,
3393,
4061,
1155,
353,
8840,
836,
8,
341,
4777,
342,
720,
56,
2668,
284,
1565,
32413,
510,
220,
5036,
510,
262,
481,
26468,
496,
10,
698,
262,
481,
330,
19213,
698,
220,
12716,
510,
262,
481,
330,
70,
720,
698,
19324,
197,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGithub_Override_ImageName(t *testing.T) {
ci := &Github{Common: &Common{}, CIBuildName: "/home/runner/work/name"}
ci.SetImageName("override")
assert.Equal(t, "override", ci.BuildName())
} | explode_data.jsonl/53499 | {
"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,
78717,
62,
2177,
45949,
675,
1155,
353,
8840,
836,
8,
341,
1444,
72,
1669,
609,
78717,
90,
10839,
25,
609,
10839,
22655,
356,
3256,
1498,
675,
25,
3521,
5117,
14,
41736,
35062,
75992,
16707,
1444,
72,
4202,
1906,
675,
445,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestAuthBasicAuthErrorPassword(t *testing.T) {
authBasicAuth := NewAuthBasicAuth(map[string]string{
"Password": "pass",
})
assert.NotNil(t, authBasicAuth)
authMethod, err := authBasicAuth.Create()
assert.Error(t, err)
assert.Nil(t, authMethod)
} | explode_data.jsonl/26422 | {
"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,
5087,
15944,
5087,
1454,
4876,
1155,
353,
8840,
836,
8,
341,
78011,
15944,
5087,
1669,
1532,
5087,
15944,
5087,
9147,
14032,
30953,
515,
197,
197,
1,
4876,
788,
330,
6385,
756,
197,
3518,
6948,
93882,
1155,
11,
4166,
15944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tailFile_notFound(t *testing.T) {
b, err := tailFile("/non/existing/path", 1024)
require.Nil(t, err)
require.Len(t, b, 0)
} | explode_data.jsonl/74742 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 59
} | [
2830,
3393,
35471,
1703,
7913,
6650,
1155,
353,
8840,
836,
8,
341,
2233,
11,
1848,
1669,
9787,
1703,
4283,
6280,
25815,
11083,
50976,
497,
220,
16,
15,
17,
19,
340,
17957,
59678,
1155,
11,
1848,
340,
17957,
65819,
1155,
11,
293,
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 |
func TestRetryUnary(t *testing.T) {
defer enableRetry()()
i := -1
ss := &stubServer{
emptyCall: func(context.Context, *testpb.Empty) (*testpb.Empty, error) {
i++
switch i {
case 0, 2, 5:
return &testpb.Empty{}, nil
case 6, 8, 11:
return nil, status.New(codes.Internal, "non-retryable error").Err... | explode_data.jsonl/64032 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 791
} | [
2830,
3393,
51560,
94545,
1155,
353,
8840,
836,
8,
341,
16867,
7283,
51560,
368,
741,
8230,
1669,
481,
16,
198,
34472,
1669,
609,
59398,
5475,
515,
197,
197,
3194,
7220,
25,
2915,
5378,
9328,
11,
353,
1944,
16650,
11180,
8,
4609,
1944... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFlowMapKey(t *testing.T) {
_ = map[gopacket.Flow]bool{}
_ = map[gopacket.Endpoint]bool{}
_ = map[[2]gopacket.Flow]bool{}
} | explode_data.jsonl/42249 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
18878,
2227,
1592,
1155,
353,
8840,
836,
8,
341,
197,
62,
284,
2415,
32512,
453,
5709,
60732,
96436,
16094,
197,
62,
284,
2415,
32512,
453,
5709,
90409,
96436,
16094,
197,
62,
284,
2415,
15505,
17,
60,
70,
453,
5709,
60732... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetFundingBook(t *testing.T) {
t.Parallel()
_, err := b.GetFundingBook("USD")
if err != nil {
t.Error("Testing Failed - GetFundingBook() error")
}
_, err = b.GetFundingBook("wigwham")
if err == nil {
t.Error("Testing Failed - GetFundingBook() error")
}
} | explode_data.jsonl/79929 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
1949,
37,
37189,
7134,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
293,
2234,
37,
37189,
7134,
445,
26749,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
445,
16451,
21379,
481,
2126,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestProcessTrade(t *testing.T) {
setTestTradeConfig()
type TestData struct {
Instructions [][]string `json:"instructions"`
}
type TestResult StateFormatter
var testcases []Testcase
testcases = append(testcases, processTradeTestcases...)
for _, testcase := range testcases {
t.Run(testcase.Na... | explode_data.jsonl/16344 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 323
} | [
2830,
3393,
7423,
39173,
1155,
353,
8840,
836,
8,
972,
8196,
2271,
39173,
2648,
3568,
13158,
93200,
2036,
972,
197,
197,
55291,
52931,
917,
1565,
2236,
2974,
62295,
39917,
319,
197,
2570,
13158,
3393,
2077,
3234,
14183,
871,
2405,
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 TestAllocation_EncryptAndUpdateFile(t *testing.T) {
const (
mockLocalPath = "1.txt"
mockTmpPath = "/tmp"
)
require := require.New(t)
if teardown := setupMockFile(t, mockLocalPath); teardown != nil {
defer teardown(t)
}
a := &Allocation{
Tx: "TestAllocation_EncryptAndUpdateFile",
ParityS... | explode_data.jsonl/4707 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 327
} | [
2830,
3393,
78316,
93529,
3571,
56365,
1703,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
77333,
7319,
1820,
284,
330,
16,
3909,
698,
197,
77333,
35986,
1820,
256,
284,
3521,
5173,
698,
197,
340,
17957,
1669,
1373,
7121,
1155,
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 TestValidate_FragmentsOnCompositeTypes_ScalarIsInvalidFragmentType(t *testing.T) {
testutil.ExpectFailsRule(t, graphql.FragmentsOnCompositeTypesRule, `
fragment scalarFragment on Boolean {
bad
}
`, []gqlerrors.FormattedError{
testutil.RuleError(`Fragment "scalarFragment" cannot condition... | explode_data.jsonl/56012 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
17926,
1400,
41956,
1925,
41685,
4173,
1098,
59153,
3872,
7928,
9488,
929,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
81893,
37,
6209,
11337,
1155,
11,
48865,
991,
41956,
1925,
41685,
4173,
11337,
11,
22074,
414,
12289,
17274,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHttpParser_splitResponse_midHeaderName(t *testing.T) {
http := httpModForTests(nil)
http.parserConfig.sendHeaders = true
http.parserConfig.sendAllHeaders = true
data1 := "HTTP/1.1 200 OK\r\n" +
"Date: Tue, 14 Aug 2012 22:31:45 GMT\r\n" +
"Expires: -1\r\n" +
"Cache-Control: private, max-age=0\r\n" +
... | explode_data.jsonl/16494 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 452
} | [
2830,
3393,
2905,
6570,
17052,
2582,
43733,
4047,
675,
1155,
353,
8840,
836,
8,
341,
28080,
1669,
1758,
4459,
2461,
18200,
27907,
340,
28080,
25617,
2648,
5219,
10574,
284,
830,
198,
28080,
25617,
2648,
5219,
2403,
10574,
284,
830,
271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCosisignatureTransactionSigning(t *testing.T) {
rtx := "{\"meta\":{\"hash\":\"671653C94E2254F2A23EFEDB15D67C38332AED1FBD24B063C0A8E675582B6A96\",\"height\":[18160,0],\"id\":\"5A0069D83F17CF0001777E55\",\"index\":0,\"merkleComponentHash\":\"81E5E7AE49998802DABC816EC10158D3A7879702FF29084C2C992CD1289877A7\"},\"... | explode_data.jsonl/69189 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 984
} | [
2830,
3393,
34,
10704,
622,
1568,
8070,
93358,
1155,
353,
8840,
836,
8,
341,
55060,
87,
1669,
54734,
5490,
92729,
8296,
23488,
21,
22,
16,
21,
20,
18,
34,
24,
19,
36,
17,
17,
20,
19,
37,
17,
32,
17,
18,
14884,
1479,
33,
16,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_Download(t *testing.T) {
testCases := []struct {
testName string
expectedError error
}{
{
"Success when file is downloaded and opened",
nil,
},
{
"Error when file can not be downloaded",
errors.New("Can not download file"),
},
{
"Error when file can not be downloaded",
e... | explode_data.jsonl/57087 | {
"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,
1557,
37702,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
18185,
675,
414,
914,
198,
197,
42400,
1454,
1465,
198,
197,
59403,
197,
197,
515,
298,
197,
1,
7188,
979,
1034,
374,
23293,
323,
8930,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfirming_CanTransitionTo(t *testing.T) {
st := &confirming{}
require.Equal(t, stateNameConfirming, st.Name())
require.True(t, st.CanTransitionTo(&abandoning{}))
require.True(t, st.CanTransitionTo(&done{}))
require.False(t, st.CanTransitionTo(&noOp{}))
require.False(t, st.CanTransitionTo(&start{}))
r... | explode_data.jsonl/66247 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 245
} | [
2830,
3393,
16728,
287,
920,
276,
21768,
1249,
1155,
353,
8840,
836,
8,
341,
18388,
1669,
609,
13800,
287,
16094,
17957,
12808,
1155,
11,
1584,
675,
16728,
287,
11,
357,
2967,
12367,
17957,
32443,
1155,
11,
357,
53280,
21768,
1249,
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... | 1 |
func TestPushAction(t *testing.T) {
t.Skip()
client := NewClient(&Config{
URL: "https://api-kylin.eosasia.one",
Debug: true,
})
action := &Action{
ActionName: "placeorder",
AccountName: "helloworld54",
Permissions: "helloworld54@active",
ActionData: struct {
Sender string `json:"sender"`
Price... | explode_data.jsonl/58352 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 332
} | [
2830,
3393,
16644,
2512,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
741,
25291,
1669,
1532,
2959,
2099,
2648,
515,
197,
79055,
25,
256,
330,
2428,
1110,
2068,
12,
7891,
3732,
1734,
436,
35159,
30973,
756,
197,
34424,
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 TestMapProxy_IsLockedWithNilKey(t *testing.T) {
_, err := mp.IsLocked(nil)
AssertErrorNotNil(t, err, "isLocked did not return an error for nil key")
mp.Clear()
} | explode_data.jsonl/56989 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 68
} | [
2830,
3393,
2227,
16219,
31879,
49010,
2354,
19064,
1592,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
10490,
4506,
49010,
27907,
340,
18017,
1454,
96144,
1155,
11,
1848,
11,
330,
285,
49010,
1521,
537,
470,
458,
1465,
369,
2092... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestOCMProvider_InstallAddon(t *testing.T) {
type fields struct {
ocmClient ocm.Client
}
type args struct {
clusterSpec *types.ClusterSpec
addonID string
}
internalId := "test-internal-id"
spec := &types.ClusterSpec{
InternalID: internalId,
ExternalID: "",
Status: "",
Addi... | explode_data.jsonl/4840 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1144
} | [
2830,
3393,
7612,
44,
5179,
62,
24690,
84312,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
509,
76,
2959,
297,
6226,
11716,
198,
197,
532,
13158,
2827,
2036,
341,
197,
197,
18855,
8327,
353,
9242,
72883,
8327,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMissingTokenLookup(t *testing.T) {
authMiddleware, err := New(&GinJWTMiddleware{
Realm: "test zone",
Key: key,
Authenticator: defaultAuthenticator,
})
assert.NoError(t, err)
assert.Equal(t, "header:Authorization", authMiddleware.TokenLookup)
} | explode_data.jsonl/64433 | {
"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,
25080,
3323,
34247,
1155,
353,
8840,
836,
8,
341,
78011,
24684,
11,
1848,
1669,
1532,
2099,
38,
258,
55172,
24684,
515,
197,
197,
64290,
25,
260,
330,
1944,
10143,
756,
197,
55242,
25,
1843,
1376,
345,
197,
197,
5087,
6139... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkflowFoundButMissingParameters(t *testing.T) {
dataStore := store.NewDataStoreMock()
router := NewRouter(dataStore)
w := httptest.NewRecorder()
workflow := model.Workflow{
Name: "test",
InputParameters: []string{
"param1",
"param2",
"param3",
},
}
_, err := dataStore.InsertWorkflows(wo... | explode_data.jsonl/74600 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 360
} | [
2830,
3393,
62768,
6650,
3983,
25080,
9706,
1155,
353,
8840,
836,
8,
341,
8924,
6093,
1669,
3553,
7121,
1043,
6093,
11571,
741,
67009,
1669,
1532,
9523,
2592,
6093,
692,
6692,
1669,
54320,
70334,
7121,
47023,
741,
197,
56249,
1669,
1614,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContainerPortsFromString(t *testing.T) {
tests := map[string]struct {
portString string
expectedPorts []corev1.ContainerPort
expectedError string
}{
"single port": {
portString: "80",
expectedPorts: []corev1.ContainerPort{
{ContainerPort: 80, HostPort: 0},
},
},
"single port with ... | explode_data.jsonl/17591 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 714
} | [
2830,
3393,
4502,
68273,
44491,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
52257,
703,
262,
914,
198,
197,
42400,
68273,
3056,
98645,
16,
33672,
7084,
198,
197,
42400,
1454,
914,
198,
197,
59403,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestValidateControlPlanePods(t *testing.T) {
pod := func(name string, phase corev1.PodPhase, ready bool) corev1.Pod {
return corev1.Pod{
ObjectMeta: metav1.ObjectMeta{Name: name},
Status: corev1.PodStatus{
Phase: phase,
ContainerStatuses: []corev1.ContainerStatus{
{
Name: strings.Split... | explode_data.jsonl/19142 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1996
} | [
2830,
3393,
17926,
3273,
34570,
23527,
82,
1155,
353,
8840,
836,
8,
341,
3223,
347,
1669,
2915,
3153,
914,
11,
10262,
6200,
85,
16,
88823,
30733,
11,
5527,
1807,
8,
6200,
85,
16,
88823,
341,
197,
853,
6200,
85,
16,
88823,
515,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIssue_ResolveMentions(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
testSuccess := func(owner, repo, doer string, mentions []string, expected []int64) {
o := unittest.AssertExistsAndLoadBean(t, &User{LowerName: owner}).(*User)
r := unittest.AssertExistsAndLoadBean(t, &Repository{Owne... | explode_data.jsonl/46848 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 556
} | [
2830,
3393,
42006,
62,
56808,
44,
63701,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
19905,
28770,
3380,
2271,
5988,
12367,
18185,
7188,
1669,
2915,
39805,
11,
15867,
11,
653,
261,
914,
11,
33845,
3056,
917,
11,
3601,
3056,
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 TestDeviceClassOIDs_readOID(t *testing.T) {
var ifIndexOidReader MockOIDReader
var ifDescrOidReader MockOIDReader
ctx := context.Background()
ifIndexOidReader.
On("readOID", ctx, []value.Value(nil), true).
Return(map[int]interface{}{
1: value.New(1),
2: value.New(2),
3: value.New(3),
}, nil)
i... | explode_data.jsonl/68084 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 472
} | [
2830,
3393,
6985,
1957,
29805,
82,
6443,
29805,
1155,
353,
8840,
836,
8,
341,
2405,
421,
1552,
46,
307,
5062,
14563,
29805,
5062,
198,
2405,
421,
11065,
81,
46,
307,
5062,
14563,
29805,
5062,
198,
20985,
1669,
2266,
19047,
2822,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBech32(t *testing.T) {
tests := []struct {
str string
valid bool
}{
{"A12UEL5L", true},
{"an83characterlonghumanreadablepartthatcontainsthenumber1andtheexcludedcharactersbio1tt5tgs", true},
{"abcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lmqqqxw", true},
{"11qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq... | explode_data.jsonl/16675 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1118
} | [
2830,
3393,
3430,
331,
18,
17,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11355,
256,
914,
198,
197,
56322,
1807,
198,
197,
59403,
197,
197,
4913,
32,
16,
17,
67095,
20,
43,
497,
830,
1583,
197,
197,
4913,
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... | 8 |
func TestTLSHandshakeTimeout(t *testing.T) {
if runtime.GOOS == "plan9" {
t.Skip("skipping test; see https://golang.org/issue/7237")
}
setParallel(t)
defer afterTest(t)
ts := httptest.NewUnstartedServer(HandlerFunc(func(w ResponseWriter, r *Request) {}))
errc := make(chanWriter, 10) // but only expecting 1
ts.... | explode_data.jsonl/22409 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 415
} | [
2830,
3393,
45439,
2314,
29661,
7636,
1155,
353,
8840,
836,
8,
341,
743,
15592,
97574,
3126,
621,
330,
10393,
24,
1,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
26,
1490,
3703,
1110,
70,
37287,
2659,
14,
11159,
14,
22,
17,
18,
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 TestSuccessLatestTagForBranchRelease(t *testing.T) {
testRepo := newTestRepo(t)
defer testRepo.cleanup(t)
version, err := testRepo.sut.LatestTagForBranch("release-1.17")
require.Nil(t, err)
require.Equal(t, testRepo.thirdTagName, util.SemverToTagString(version))
} | explode_data.jsonl/13999 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
7188,
31992,
5668,
2461,
18197,
16077,
1155,
353,
8840,
836,
8,
341,
18185,
25243,
1669,
501,
2271,
25243,
1155,
340,
16867,
1273,
25243,
87689,
1155,
692,
74954,
11,
1848,
1669,
1273,
25243,
514,
332,
1214,
13893,
5668,
2461,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBindPFlagsStringSlice(t *testing.T) {
tests := []struct {
Expected []string
Value string
}{
{[]string{}, ""},
{[]string{"jeden"}, "jeden"},
{[]string{"dwa", "trzy"}, "dwa,trzy"},
{[]string{"cztery", "piec , szesc"}, "cztery,\"piec , szesc\""},
}
v := New() // create independent Viper object... | explode_data.jsonl/9893 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 516
} | [
2830,
3393,
9950,
47,
9195,
703,
33236,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
197,
18896,
3056,
917,
198,
197,
47399,
262,
914,
198,
197,
59403,
197,
197,
90,
1294,
917,
22655,
77496,
197,
197,
90,
1294,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestResolveErr(t *testing.T) {
cnt := 0
r := &Resolver{
cache: make(map[string]*cacheRecord),
resolve: func(name string) ([]net.IP, error) {
cnt++
if cnt == 2 {
return nil, fmt.Errorf("time to return error, cnt: %d", cnt)
}
return []net.IP{net.ParseIP("0.0.0.0")}, nil
},
}
refreshed := ma... | explode_data.jsonl/27869 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 800
} | [
2830,
3393,
56808,
7747,
1155,
353,
8840,
836,
8,
341,
60553,
1669,
220,
15,
198,
7000,
1669,
609,
18190,
515,
197,
52680,
25,
1281,
9147,
14032,
8465,
9360,
6471,
1326,
197,
87778,
25,
2915,
3153,
914,
8,
34923,
4711,
46917,
11,
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 TestSkipsConfigMapUpdateWhenMetadataIsTheSame(t *testing.T) {
t.Parallel()
existingService := &creator_v1.Service{
ObjectMeta: meta_v1.ObjectMeta{
Name: serviceName,
},
Spec: creator_v1.ServiceSpec{
ResourceOwner: "somebody",
BusinessUnit: "some unit",
Metadata: creator_v1.ServiceMetadata{
... | explode_data.jsonl/4271 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 979
} | [
2830,
3393,
19290,
3077,
2648,
2227,
4289,
4498,
14610,
3872,
785,
19198,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
8122,
11083,
1860,
1669,
609,
32398,
2273,
16,
13860,
515,
197,
23816,
12175,
25,
8823,
2273,
16,
80222,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHandleRealmsAdd(t *testing.T) {
t.Parallel()
ctx := project.TestContext(t)
harness := envstest.NewServerConfig(t, testDatabaseInstance)
c := admin.New(harness.Config, harness.Cacher, harness.Database, harness.AuthProvider, harness.RateLimiter, harness.Renderer)
handler := harness.WithCommonMiddlewares(c... | explode_data.jsonl/53832 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1337
} | [
2830,
3393,
6999,
12768,
1011,
2212,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20985,
1669,
2390,
8787,
1972,
1155,
340,
9598,
23518,
1669,
6105,
267,
477,
7121,
5475,
2648,
1155,
11,
1273,
5988,
2523,
692,
1444,
1669,
3986... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientDoTimeoutError(t *testing.T) {
t.Parallel()
c := &Client{
Dial: func(addr string) (net.Conn, error) {
return &readTimeoutConn{t: time.Second}, nil
},
}
testClientDoTimeoutError(t, c, 100)
} | explode_data.jsonl/79367 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 86
} | [
2830,
3393,
2959,
5404,
7636,
1454,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
1669,
609,
2959,
515,
197,
10957,
530,
25,
2915,
24497,
914,
8,
320,
4711,
50422,
11,
1465,
8,
341,
298,
853,
609,
878,
7636,
9701,
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... | 1 |
func TestEditEquipmentTypeWithPortsAndPositions(t *testing.T) {
r := newTestResolver(t)
defer r.drv.Close()
ctx := viewertest.NewContext(r.client)
mr := r.Mutation()
bandwidth := "b1"
label := "v1"
strPortType := models.EquipmentPortInput{
Name: "str_prop",
Bandwidth: &bandwidth,
VisibleLabel: ... | explode_data.jsonl/440 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 927
} | [
2830,
3393,
4036,
58276,
929,
2354,
68273,
3036,
45793,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
501,
2271,
18190,
1155,
340,
16867,
435,
950,
10553,
10421,
741,
20985,
1669,
1651,
83386,
7121,
1972,
2601,
6581,
692,
2109,
81,
1669,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPipe_ReadAndWrite(t *testing.T) {
pipe := NewPipeBuffer(0)
var w sync.WaitGroup
bbs := []byte("aaabbbbvvvbbbbvvv")
w.Add(1)
go func() {
defer w.Done()
bs := make([]byte, len(bbs))
_, _ = pipe.Read(bs)
if !bytes.Equal(bs, bbs) {
t.Fatalf("test failed")
}
}()
_, _ = pipe.Write(bbs)
w.Wait()
... | explode_data.jsonl/24064 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 161
} | [
2830,
3393,
34077,
38381,
3036,
7985,
1155,
353,
8840,
836,
8,
341,
197,
13768,
1669,
1532,
34077,
4095,
7,
15,
340,
2405,
289,
12811,
28384,
2808,
198,
2233,
1279,
1669,
3056,
3782,
445,
5305,
370,
53151,
33075,
85,
87609,
33075,
85,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.