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_medianSlidingWindow(t *testing.T) {
type args struct {
nums []int
k int
}
tests := []struct {
name string
args args
want []float64
}{
{name: "1", args: args{nums: []int{1, 3, -1, -3, 5, 3, 6, 7}, k: 3}, want: []float64{1, -1, -1, 3, 5, 6}},
}
for _, tt := range tests {
t.Run(tt.name, fu... | explode_data.jsonl/73049 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 249
} | [
2830,
3393,
83003,
7442,
6577,
4267,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
22431,
82,
3056,
396,
198,
197,
16463,
262,
526,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_Tokenize(t *testing.T) {
type expected struct {
tokens []string
err string
}
tests := []struct {
input string
expected expected
}{
{
input: "$",
expected: expected{
tokens: []string{
"$",
},
},
},
{
input: "@",
expected: expected{
tokens: []string{
... | explode_data.jsonl/45851 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2353
} | [
2830,
3393,
1139,
1679,
551,
1155,
353,
8840,
836,
8,
1476,
13158,
3601,
2036,
341,
197,
3244,
9713,
3056,
917,
198,
197,
9859,
262,
914,
198,
197,
630,
78216,
1669,
3056,
1235,
341,
197,
22427,
262,
914,
198,
197,
42400,
3601,
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... | 3 |
func TestSmall(t *testing.T) {
l := New()
el1 := l.PushBack(1)
el2 := l.PushBack(2)
el3 := l.PushBack(3)
if l.Len() != 3 {
t.Error("Expected len 3, got ", l.Len())
}
//fmt.Printf("%p %v\n", el1, el1)
//fmt.Printf("%p %v\n", el2, el2)
//fmt.Printf("%p %v\n", el3, el3)
r1 := l.Remove(el1)
/... | explode_data.jsonl/12512 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 480
} | [
2830,
3393,
25307,
1155,
353,
8840,
836,
8,
972,
8810,
1669,
1532,
3568,
59636,
16,
1669,
326,
34981,
3707,
7,
16,
1218,
59636,
17,
1669,
326,
34981,
3707,
7,
17,
1218,
59636,
18,
1669,
326,
34981,
3707,
7,
18,
1218,
743,
326,
65819... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLineInvalidArgs(t *testing.T) {
//
// Invalid pos arguments
//
type testElement struct {
bytes []byte
pos int
}
tests := []testElement{
{[]byte{'a', 'b'}, -2},
{[]byte{'a', 'b'}, -1},
{[]byte{'a', 'b'}, 2},
{[]byte{'a', 'b'}, 3},
}
for testI, test := range tests {
r := LineBreakAfter(te... | explode_data.jsonl/5996 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 495
} | [
2830,
3393,
2460,
7928,
4117,
1155,
353,
8840,
836,
8,
341,
197,
2289,
197,
322,
13882,
1133,
5977,
198,
197,
2289,
13158,
1273,
1691,
2036,
341,
197,
70326,
3056,
3782,
198,
197,
28164,
256,
526,
198,
197,
532,
78216,
1669,
3056,
194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestInitPolicyFromFile(t *testing.T) {
dir, err := ioutil.TempDir(os.TempDir(), "policy")
if err != nil {
t.Errorf("unexpected error: %v", err)
}
defer os.RemoveAll(dir)
for i, test := range []struct {
policy string
expectedPredicates sets.String
expectedPrioritizers sets.String
}{
... | explode_data.jsonl/24715 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 908
} | [
2830,
3393,
3803,
13825,
43633,
1155,
353,
8840,
836,
8,
341,
48532,
11,
1848,
1669,
43144,
65009,
6184,
9638,
65009,
6184,
1507,
330,
34790,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
53859,
1465,
25,
1018,
85,
497,
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... | 9 |
func TestResourceNotStarted(t *testing.T) {
tests := []struct {
name string
fn func(*Parser) error
}{
{"CNAMEResource", func(p *Parser) error { _, err := p.CNAMEResource(); return err }},
{"MXResource", func(p *Parser) error { _, err := p.MXResource(); return err }},
{"NSResource", func(p *Parser) error {... | explode_data.jsonl/60553 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 394
} | [
2830,
3393,
4783,
2623,
32527,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
40095,
256,
2915,
4071,
6570,
8,
1465,
198,
197,
59403,
197,
197,
4913,
28668,
1402,
640,
288,
919,
497,
2915,
1295,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateEdgeNode(t *testing.T) {
locationCache := LocationCache{}
nodeName := nodes[0]
locationCache.EdgeNodes.Store(nodeName, "")
tests := []struct {
name string
lc *LocationCache
want bool
}{
{
name: "TestUpdateEdgeNode() Case: Node status update to OK",
lc: &locationCache,
want: tru... | explode_data.jsonl/53307 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
4289,
11656,
1955,
1155,
353,
8840,
836,
8,
341,
53761,
8233,
1669,
9866,
8233,
16094,
20831,
675,
1669,
7798,
58,
15,
921,
53761,
8233,
13,
11656,
12288,
38047,
6958,
675,
11,
85617,
78216,
1669,
3056,
1235,
341,
197,
11609... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateContainer(t *testing.T) {
newPod := func(profile string) *api.Pod {
pod := &api.Pod{
Spec: api.PodSpec{
Containers: []api.Container{
api.Container{
Name: "test",
},
},
},
}
if profile != "" {
pod.Annotations = map[string]string{
api.SeccompContainerAnnotatio... | explode_data.jsonl/13179 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 968
} | [
2830,
3393,
17926,
4502,
1155,
353,
8840,
836,
8,
341,
8638,
23527,
1669,
2915,
36606,
914,
8,
353,
2068,
88823,
341,
197,
3223,
347,
1669,
609,
2068,
88823,
515,
298,
7568,
992,
25,
6330,
88823,
8327,
515,
571,
197,
74632,
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... | 2 |
func TestConvertBlkIOToIOWeightValue(t *testing.T) {
cases := map[uint16]uint64{
0: 0,
10: 1,
1000: 10000,
}
for i, expected := range cases {
got := ConvertBlkIOToIOWeightValue(i)
if got != expected {
t.Errorf("expected ConvertBlkIOToIOWeightValue(%d) to be %d, got %d", i, expected, got)
}
}
} | explode_data.jsonl/34409 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 143
} | [
2830,
3393,
12012,
4923,
74,
3810,
1249,
3810,
8295,
1130,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
2415,
58,
2496,
16,
21,
60,
2496,
21,
19,
515,
197,
197,
15,
25,
262,
220,
15,
345,
197,
197,
16,
15,
25,
256,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestEcPointBytes(t *testing.T) {
curve := btcec.S256()
point, err := NewScalarBaseMult(curve, big.NewInt(2))
require.NoError(t, err)
data := point.Bytes()
point2, err := PointFromBytesUncompressed(curve, data)
require.NoError(t, err)
if point.X.Cmp(point2.X) != 0 && point.Y.Cmp(point2.Y) != 0 {
t.Errorf(... | explode_data.jsonl/75667 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 474
} | [
2830,
3393,
50730,
2609,
7078,
1155,
353,
8840,
836,
8,
341,
33209,
586,
1669,
19592,
68955,
808,
17,
20,
21,
2822,
58474,
11,
1848,
1669,
1532,
20639,
3978,
40404,
17591,
586,
11,
2409,
7121,
1072,
7,
17,
1171,
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... | 7 |
func TestClient_Login_DNSKDCs(t *testing.T) {
test.Privileged(t)
//ns := os.Getenv("DNSUTILS_OVERRIDE_NS")
//if ns == "" {
// os.Setenv("DNSUTILS_OVERRIDE_NS", testdata.TEST_NS)
//}
c, _ := config.NewConfigFromString(testdata.TEST_KRB5CONF)
// Set to lookup KDCs in DNS
c.LibDefaults.DNSLookupKDC = true
//Blan... | explode_data.jsonl/5659 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 291
} | [
2830,
3393,
2959,
79232,
1557,
2448,
42,
5626,
82,
1155,
353,
8840,
836,
8,
341,
18185,
17947,
344,
68431,
1155,
692,
197,
322,
4412,
1669,
2643,
64883,
445,
61088,
36969,
50,
49372,
33777,
1138,
197,
322,
333,
12268,
621,
1591,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLoggerDebugSuppressed(t *testing.T) {
checkMessages(t, zapcore.InfoLevel, []Option{WithDebug()}, zapcore.DebugLevel, nil, func(logger *Logger) {
logger.Print("hello")
logger.Printf("world")
logger.Println("foo")
})
} | explode_data.jsonl/58461 | {
"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,
7395,
7939,
10048,
14318,
1155,
353,
8840,
836,
8,
341,
25157,
15820,
1155,
11,
32978,
2153,
20132,
4449,
11,
3056,
5341,
90,
2354,
7939,
76777,
32978,
2153,
20345,
4449,
11,
2092,
11,
2915,
37833,
353,
7395,
8,
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 |
func TestPublishWithoutEventTypeVersion(t *testing.T) {
payload := buildDefaultTestPayloadWithoutEventTypeVersion()
body, statusCode := performPublishRequest(t, publishServer.URL, payload)
assertExpectedError(t, body, statusCode, http.StatusBadRequest, api.FieldEventTypeVersion, api.ErrorTypeValidationViolation)
} | explode_data.jsonl/74413 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
50145,
26040,
47906,
5637,
1155,
353,
8840,
836,
8,
341,
76272,
1669,
1936,
3675,
2271,
29683,
26040,
47906,
5637,
741,
35402,
11,
35532,
1669,
2736,
50145,
1900,
1155,
11,
3415,
5475,
20893,
11,
7729,
340,
6948,
18896,
1454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestStmtCloseOrder(t *testing.T) {
db := newTestDB(t, "people")
defer closeDB(t, db)
db.SetMaxIdleConns(0)
setStrictFakeConnClose(t)
defer setStrictFakeConnClose(nil)
_, err := db.Query("SELECT|non_existent|name|")
if err == nil {
t.Fatal("Querying non-existent table should fail")
}
} | explode_data.jsonl/16013 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
31063,
7925,
4431,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
501,
2271,
3506,
1155,
11,
330,
16069,
1138,
16867,
3265,
3506,
1155,
11,
2927,
692,
20939,
4202,
5974,
41370,
1109,
4412,
7,
15,
340,
8196,
41857,
52317,
9701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildGenesis(t *testing.T) {
ss := CreateStaticService()
addrMap := map[string]string{}
for _, addrStr := range addrStrArray {
b, err := formatting.Decode(formatting.CB58, addrStr)
if err != nil {
t.Fatal(err)
}
addrMap[addrStr], err = formatting.FormatBech32(testHRP, b)
if err != nil {
t.Fa... | explode_data.jsonl/10750 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1145
} | [
2830,
3393,
11066,
84652,
1155,
353,
8840,
836,
8,
341,
34472,
1669,
4230,
11690,
1860,
741,
53183,
2227,
1669,
2415,
14032,
30953,
16094,
2023,
8358,
10789,
2580,
1669,
2088,
10789,
2580,
1857,
341,
197,
2233,
11,
1848,
1669,
36566,
5637... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvalidChecksum(t *testing.T) {
for _, test := range invalidChecksum {
hrp, data, err := bech32.Decode(test)
if err != nil {
t.Logf("Invalid checksum for %s : ok / hrp : %+v , data : %+v\n", test, hrp, data)
} else {
t.Errorf("Invalid checksum for %s : FAIL\n", test)
}
}
} | explode_data.jsonl/72629 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
7928,
73190,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
8318,
73190,
341,
197,
78847,
79,
11,
821,
11,
1848,
1669,
387,
331,
18,
17,
56372,
8623,
340,
197,
743,
1848,
961,
2092,
341,
298,
3244,
98954,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestIntegration(t *testing.T) {
fstests.Run(t, &fstests.Opt{
RemoteName: "TestB2:",
NilObject: (*Object)(nil),
ChunkedUpload: fstests.ChunkedUploadConfig{
MinChunkSize: minChunkSize,
},
})
} | explode_data.jsonl/81146 | {
"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,
52464,
1155,
353,
8840,
836,
8,
341,
1166,
267,
17966,
16708,
1155,
11,
609,
49494,
17966,
8382,
417,
515,
197,
197,
24703,
675,
25,
330,
2271,
33,
17,
55120,
197,
18317,
321,
1190,
25,
220,
4609,
1190,
2376,
8385,
1326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWipe(t *testing.T) {
t.Parallel()
// First, create a temporary directory to be used for the duration of
// this test.
tempDirName, err := ioutil.TempDir("", "channeldb")
if err != nil {
t.Fatalf("unable to create temp dir: %v", err)
}
defer os.RemoveAll(tempDirName)
// Next, open thereby creating c... | explode_data.jsonl/47871 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 386
} | [
2830,
3393,
54,
3444,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
5512,
11,
1855,
264,
13340,
6220,
311,
387,
1483,
369,
279,
8090,
315,
198,
197,
322,
419,
1273,
624,
16280,
6184,
675,
11,
1848,
1669,
43144,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClient_GetReceivers(t *testing.T) {
client, _ := newTestClient()
recs, err := client.GetReceivers(testNID)
assert.NoError(t, err)
assert.Equal(t, 4, len(recs))
assert.Equal(t, "receiver", recs[0].Name)
assert.Equal(t, "slack", recs[1].Name)
assert.Equal(t, "webhook", recs[2].Name)
assert.Equal(t, "emai... | explode_data.jsonl/63852 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
2959,
13614,
693,
346,
1945,
1155,
353,
8840,
836,
8,
341,
25291,
11,
716,
1669,
501,
2271,
2959,
741,
67904,
82,
11,
1848,
1669,
2943,
2234,
693,
346,
1945,
8623,
45,
915,
340,
6948,
35699,
1155,
11,
1848,
340,
6948,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestV3AuthenticateWithDomainIdAndTenantId(t *testing.T) {
ctx := context.Background()
if !isV3Api() {
return
}
c, rollback := makeConnection(t)
defer rollback()
c.Tenant = ""
c.Domain = ""
c.TenantId = os.Getenv("SWIFT_TENANT_ID")
c.DomainId = os.Getenv("SWIFT_API_DOMAIN_ID")
err := c.Authenticate(c... | explode_data.jsonl/12654 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 185
} | [
2830,
3393,
53,
18,
99087,
2354,
13636,
764,
3036,
71252,
764,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
743,
753,
285,
53,
18,
6563,
368,
341,
197,
853,
198,
197,
630,
1444,
11,
60414,
1669,
1281,
4526,
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... | 4 |
func TestGenerateConfigForDCACSVCandles(t *testing.T) {
fp := filepath.Join("..", "testdata", "binance_BTCUSDT_24h_2019_01_01_2020_01_01.csv")
cfg := Config{
Nickname: "ExampleStrategyDCACSVCandles",
Goal: "To demonstrate the DCA strategy using CSV candle data",
StrategySettings: StrategySettings{
Name: ... | explode_data.jsonl/58412 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 691
} | [
2830,
3393,
31115,
2648,
2461,
5626,
62687,
11287,
20125,
1155,
353,
8840,
836,
8,
341,
65219,
1669,
26054,
22363,
95032,
497,
330,
92425,
497,
330,
6863,
681,
1668,
7749,
2034,
10599,
62,
17,
19,
71,
62,
17,
15,
16,
24,
62,
15,
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... | 5 |
func TestMatNormalize(t *testing.T) {
src := NewMatWithSize(101, 102, MatTypeCV8U)
dst := NewMat()
Normalize(src, &dst, 0.0, 255.0, NormMixMax)
if dst.Empty() {
t.Error("TestMatNormalize dst should not be empty.")
}
} | explode_data.jsonl/81716 | {
"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,
11575,
87824,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
1532,
11575,
2354,
1695,
7,
16,
15,
16,
11,
220,
16,
15,
17,
11,
6867,
929,
19589,
23,
52,
340,
52051,
1669,
1532,
11575,
741,
197,
87824,
14705,
11,
609,
15658,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateDoubleSign(t *testing.T) {
stakedValidator := getStakedValidator()
type args struct {
validator types.Validator
increasedContext int64
maxMissed int64
}
type expected struct {
validator types.Validator
tombstoned bool
message string
pubKeyRelation bool
... | explode_data.jsonl/9980 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1125
} | [
2830,
3393,
17926,
7378,
7264,
1155,
353,
8840,
836,
8,
341,
18388,
7741,
14256,
1669,
633,
623,
7741,
14256,
2822,
13158,
2827,
2036,
341,
197,
197,
16112,
286,
4494,
13,
14256,
198,
197,
17430,
837,
1475,
1972,
526,
21,
19,
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... | 5 |
func TestFilterForeignOrgLeadershipMessages(t *testing.T) {
t.Parallel()
org1 := api.OrgIdentityType("org1")
org2 := api.OrgIdentityType("org2")
p1 := common.PKIidType("p1")
p2 := common.PKIidType("p2")
cs := &cryptoService{}
adapter := &gossipAdapterMock{}
relayedLeadershipMsgs := make(chan interface{}, 2)... | explode_data.jsonl/66334 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 878
} | [
2830,
3393,
5632,
58632,
42437,
92724,
2151,
15820,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
87625,
16,
1669,
6330,
8382,
1984,
18558,
929,
445,
1775,
16,
1138,
87625,
17,
1669,
6330,
8382,
1984,
18558,
929,
445,
1775,
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... | 1 |
func TestReadLoadConfigExternal(t *testing.T) {
LoadConfigExternal("read", "goapi", "password", "127.0.0.1", "3306", "goapi")
fmt.Printf("username: %v password: %v host: %v port %v database: %v\n", readUser, readPass, readHost, readPort, readDB)
} | explode_data.jsonl/68480 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 94
} | [
2830,
3393,
4418,
5879,
2648,
25913,
1155,
353,
8840,
836,
8,
1476,
197,
5879,
2648,
25913,
445,
878,
497,
330,
3346,
2068,
497,
330,
3833,
497,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
497,
330,
18,
18,
15,
21,
497,
330,
3346,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApiDevAuthGetTenantLimit(t *testing.T) {
t.Parallel()
// enforce specific field naming in errors returned by API
updateRestErrorFieldName()
tcases := []struct {
limit string
tenantId string
daLimit *model.Limit
daErr error
code int
body string
}{
{
limit: "max_devices",
ten... | explode_data.jsonl/639 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 657
} | [
2830,
3393,
6563,
14592,
5087,
1949,
71252,
16527,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
28162,
3151,
2070,
34948,
304,
5975,
5927,
553,
5333,
198,
27175,
12416,
1454,
51241,
2822,
3244,
23910,
1669,
3056,
1235,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFiles(t *testing.T) {
dir := filepath.Join("testdata", "files")
// Keep this synced with testdata/files directory.
exp := []string{
// dot.md is excluded.
filepath.Join(dir, "jack.txt"),
filepath.Join(dir, "phryne", "fisher.txt"),
}
ret, err := fileutil.Files(dir, ".txt")
if err != nil {
t.Erro... | explode_data.jsonl/16284 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 172
} | [
2830,
3393,
10809,
1155,
353,
8840,
836,
8,
341,
48532,
1669,
26054,
22363,
445,
92425,
497,
330,
7198,
5130,
197,
322,
13655,
419,
85028,
448,
1273,
691,
33220,
6220,
624,
48558,
1669,
3056,
917,
515,
197,
197,
322,
12756,
21324,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAssessMetricStatusCountReached(t *testing.T) {
count := intstr.FromInt(10)
metric := v1alpha1.Metric{
Name: "success-rate",
Count: &count,
}
result := v1alpha1.MetricResult{
Successful: 10,
Count: 10,
Measurements: []v1alpha1.Measurement{{
Value: "99",
Phase: v1alpha1.Analys... | explode_data.jsonl/75821 | {
"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,
5615,
433,
54310,
2522,
2507,
98526,
1155,
353,
8840,
836,
8,
341,
18032,
1669,
526,
495,
11439,
1072,
7,
16,
15,
340,
2109,
16340,
1669,
348,
16,
7141,
16,
1321,
16340,
515,
197,
21297,
25,
220,
330,
5630,
43026,
756,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestToBoolOrDefault(t *testing.T) {
type args struct {
s string
d bool
}
tests := []struct {
name string
args args
want bool
}{
{
name: "",
args: args{
s: "true",
d: false,
},
want: true,
},
{
name: "",
args: args{
s: "21a",
d: true,
},
want: true,
},
... | explode_data.jsonl/5487 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 339
} | [
2830,
3393,
1249,
11233,
14188,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1903,
914,
198,
197,
2698,
1807,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
1807,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_MsgDryRun(t *testing.T) {
tutils.CheckSkip(t, tutils.SkipTestArgs{Long: true})
t.Setenv("AIS_STREAM_DRY_RUN", "true")
// fill in common shared read-only bug
random := newRand(mono.NanoTime())
buf, slab := memsys.PageMM().AllocSize(cos.MiB)
defer slab.Free(buf)
random.Read(buf)
wg := &sync.WaitGroup{... | explode_data.jsonl/157 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 589
} | [
2830,
3393,
90653,
85215,
6727,
1155,
353,
8840,
836,
8,
341,
3244,
6031,
10600,
35134,
1155,
11,
259,
6031,
57776,
2271,
4117,
90,
6583,
25,
830,
3518,
3244,
4202,
3160,
445,
32,
1637,
23584,
1557,
11242,
24068,
497,
330,
1866,
5130,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrivateLinkHubID(t *testing.T) {
cases := []struct {
Input string
Valid bool
}{
{
// empty
Input: "",
Valid: false,
},
{
// missing SubscriptionId
Input: "/",
Valid: false,
},
{
// missing value for SubscriptionId
Input: "/subscriptions/",
Valid: false,
},
{
... | explode_data.jsonl/2954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 683
} | [
2830,
3393,
16787,
3939,
19316,
915,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
66588,
914,
198,
197,
197,
4088,
1807,
198,
197,
92,
4257,
197,
197,
515,
298,
197,
322,
4287,
198,
298,
66588,
25,
8324,
298... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSeekEmptyIndex(t *testing.T) {
dir, err := ioutil.TempDir("", "testdb")
if err != nil {
t.Fatal(err)
}
filePathPrefix := filepath.Join(dir, "")
defer os.RemoveAll(dir)
w := newTestWriter(t, filePathPrefix)
writerOpts := DataWriterOpenOptions{
BlockSize: testBlockSize,
Identifier: FileSetFileIdent... | explode_data.jsonl/10713 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 333
} | [
2830,
3393,
39350,
3522,
1552,
1155,
353,
8840,
836,
8,
341,
48532,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
1944,
1999,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
17661,
1820,
14335,
1669,
26054,
223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJsReturnStringWithEmbeddedNulls(t *testing.T) {
t.Parallel()
ctx := NewIsolate().NewContext()
res, err := ctx.Eval(`"foo\000bar"`, "test.js")
if err != nil {
t.Fatalf("Error evaluating javascript, err: %v", err)
}
if str := res.String(); str != "foo\000bar" {
t.Errorf("Expected 'foo\\000bar', got %q"... | explode_data.jsonl/81544 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 135
} | [
2830,
3393,
30480,
5598,
703,
2354,
83466,
3280,
82,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
1532,
3872,
33066,
1005,
3564,
1972,
741,
10202,
11,
1848,
1669,
5635,
5142,
831,
5809,
1,
7975,
59,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSugarAddCaller(t *testing.T) {
tests := []struct {
options []Option
pat string
}{
{opts(AddCaller()), `.+/sugar_test.go:[\d]+$`},
{opts(AddCaller(), AddCallerSkip(1), AddCallerSkip(-1)), `.+/zap/sugar_test.go:[\d]+$`},
{opts(AddCaller(), AddCallerSkip(1)), `.+/zap/common_test.go:[\d]+$`},
{op... | explode_data.jsonl/5028 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 366
} | [
2830,
3393,
83414,
2212,
58735,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
35500,
3056,
5341,
198,
197,
3223,
266,
257,
914,
198,
197,
59403,
197,
197,
90,
10518,
7,
2212,
58735,
11858,
74090,
40631,
82,
8566,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAttrsAppendErrorHTTP(t *testing.T) {
c := setupTest([]string{"append", "attrs", "--host", "orion", "--id", "urn:ngsi-ld:Product:010", "--data", "{\"specialOffer\":{\"value\": true}}"})
reqRes := helper.MockHTTPReqRes{}
reqRes.Res.StatusCode = http.StatusNoContent
reqRes.Path = "/v2/entities/urn:ngsi-ld:Pr... | explode_data.jsonl/33069 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 262
} | [
2830,
3393,
53671,
23877,
1454,
9230,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
6505,
2271,
10556,
917,
4913,
5090,
497,
330,
20468,
497,
14482,
3790,
497,
330,
269,
290,
497,
14482,
307,
497,
330,
399,
25,
968,
6321,
12,
507,
25,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestStartupAndShutdown(t *testing.T) {
opts := DefaultOptions()
s := RunServer(opts)
defer s.Shutdown()
if !s.isRunning() {
t.Fatal("Could not run server")
}
// Debug stuff.
numRoutes := s.NumRoutes()
if numRoutes != 0 {
t.Fatalf("Expected numRoutes to be 0 vs %d\n", numRoutes)
}
numRemotes := s... | explode_data.jsonl/3598 | {
"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,
39076,
3036,
62004,
1155,
353,
8840,
836,
8,
1476,
64734,
1669,
7899,
3798,
2822,
1903,
1669,
6452,
5475,
30885,
340,
16867,
274,
10849,
18452,
2822,
743,
753,
82,
2079,
18990,
368,
341,
197,
3244,
26133,
445,
12895,
537,
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... | 7 |
func TestLs_JSON(t *testing.T) {
assert := assert.New(t)
ls := &subcmd.LsCmd{
Path: "foo/bar/",
Json: true,
Page: 1,
Recursive: true,
}
driver := NewMockDriver(t)
printer := &MockPrinterImpl{}
driver.MockListOrTagSearch = func(path string, postNum int, recursive bool) ([]*model.Post, boo... | explode_data.jsonl/28553 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 552
} | [
2830,
3393,
43,
82,
25356,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
197,
4730,
1669,
609,
1966,
8710,
1214,
82,
15613,
515,
197,
69640,
25,
414,
330,
7975,
49513,
35075,
197,
86687,
25,
414,
830,
345,
197,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDecoderRaw(t *testing.T) {
source := "AAAAAA"
want := []byte{0, 0, 0, 0}
// Direct.
dec1, err := RawURLEncoding.DecodeString(source)
if err != nil || !bytes.Equal(dec1, want) {
t.Errorf("RawURLEncoding.DecodeString(%q) = %x, %v, want %x, nil", source, dec1, err, want)
}
// Through reader. Used to fa... | explode_data.jsonl/35064 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 369
} | [
2830,
3393,
20732,
20015,
1155,
353,
8840,
836,
8,
341,
47418,
1669,
330,
25699,
6029,
698,
50780,
1669,
3056,
3782,
90,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
630,
197,
322,
7139,
624,
197,
8169,
16,
11,
1848,
1669,
23022,
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... | 7 |
func TestHTTPPostInvalidParameter(t *testing.T) {
sender := NewHTTPSender("", "", false)
// Channels are not marshalable to JSON and generate an error
data := make(chan int)
continuePipeline, result := sender.HTTPPost(context, data)
assert.False(t, continuePipeline, "Pipeline should stop")
assert.Error(t, resul... | explode_data.jsonl/75581 | {
"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,
9230,
4133,
7928,
4971,
1155,
353,
8840,
836,
8,
1476,
1903,
1659,
1669,
1532,
9230,
20381,
19814,
7342,
895,
340,
197,
322,
62900,
525,
537,
60771,
480,
311,
4718,
323,
6923,
458,
1465,
198,
8924,
1669,
1281,
35190,
526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateAppOK(t *testing.T) {
testServer(func(s *core.Server) {
headers := make(map[string]string)
headers["X-Access-Token"] = accessToken
url := "/api/v1/developers/apps/" + apiToken
//make request
res, err := testHTTPRequestWithHeaders("PUT", url, `{"name":"traverik alpha","os":"iOS"}`, headers)
... | explode_data.jsonl/42215 | {
"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,
4289,
2164,
3925,
1155,
353,
8840,
836,
8,
1476,
18185,
5475,
18552,
1141,
353,
2153,
22997,
8,
1476,
197,
67378,
1669,
1281,
9147,
14032,
30953,
340,
197,
67378,
1183,
55,
12,
6054,
89022,
1341,
284,
37725,
271,
197,
19320,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNodeNumberCalculation(t *testing.T) {
var nodesUptoTests = []struct {
n uint64
expected uint64
}{
{1, 1},
{2, 3},
{3, 5},
{4, 8},
{5, 10},
{6, 13},
{7, 16},
{8, 20},
{9, 22},
{10, 25},
{11, 28},
{12, 32},
{13, 35},
{14, 39},
{15, 43},
{16, 48},
}
for _, tt := ran... | explode_data.jsonl/49657 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
1955,
2833,
47168,
2914,
1155,
353,
8840,
836,
8,
341,
2405,
7798,
52,
57991,
18200,
284,
3056,
1235,
341,
197,
9038,
286,
2622,
21,
19,
198,
197,
42400,
2622,
21,
19,
198,
197,
59403,
197,
197,
90,
16,
11,
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... | 2 |
func TestStruct_Nil(t *testing.T) {
err := Scrub(nil, []string{})
assert.Error(t, err)
var testItem *Person
err = Scrub(testItem, []string{"test"})
assert.Error(t, err)
err = Scrub(&testItem, []string{"test"})
assert.Error(t, err)
} | explode_data.jsonl/9421 | {
"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,
9422,
1604,
321,
1155,
353,
8840,
836,
8,
1476,
9859,
1669,
32134,
392,
27907,
11,
3056,
917,
37790,
6948,
6141,
1155,
11,
1848,
340,
2405,
1273,
1234,
353,
10680,
198,
9859,
284,
32134,
392,
8623,
1234,
11,
3056,
917,
491... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPreferredAffinityWithHardPodAffinitySymmetricWeight(t *testing.T) {
podLabelServiceS1 := map[string]string{
"service": "S1",
}
labelRgChina := map[string]string{
"region": "China",
}
labelRgIndia := map[string]string{
"region": "India",
}
labelAzAz1 := map[string]string{
"az": "az1",
}
hardPod... | explode_data.jsonl/74457 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2837
} | [
2830,
3393,
22482,
25841,
13489,
2354,
26907,
23527,
25841,
13489,
27912,
15903,
8295,
1155,
353,
8840,
836,
8,
341,
3223,
347,
2476,
1860,
50,
16,
1669,
2415,
14032,
30953,
515,
197,
197,
1,
7936,
788,
330,
50,
16,
756,
197,
532,
292... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOutOfRegionRangeEvent(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
wg := &sync.WaitGroup{}
ch1 := make(chan *cdcpb.ChangeDataEvent, 10)
srv1 := newMockChangeDataService(t, ch1)
server1, addr1 := newMockService(ctx, t, srv1, wg)
defer func() {
close(ch1)
server1.Stop()
w... | explode_data.jsonl/32879 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2585
} | [
2830,
3393,
31731,
14091,
6046,
1556,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
72079,
1669,
609,
12996,
28384,
2808,
31483,
23049,
16,
1669,
1281,
35190,
353,
4385,
4672,
65,
39348,
1043,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRollupNewRollupFuncError(t *testing.T) {
if nrf := getRollupFunc("non-existing-func"); nrf != nil {
t.Fatalf("expecting nil func; got %p", nrf)
}
f := func(funcName string, args []interface{}) {
t.Helper()
nrf := getRollupFunc(funcName)
rf, err := nrf(args)
if err == nil {
t.Fatalf("expecting... | explode_data.jsonl/23118 | {
"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,
32355,
454,
3564,
32355,
454,
9626,
1454,
1155,
353,
8840,
836,
8,
341,
743,
308,
8052,
1669,
633,
32355,
454,
9626,
445,
6280,
49357,
2220,
1347,
5038,
308,
8052,
961,
2092,
341,
197,
3244,
30762,
445,
17119,
287,
2092,
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... | 3 |
func Test_DeployHandler_Execution_Works(t *testing.T) {
release := MockRelease()
awsc := MockAwsClients(release)
state_machine := createTestStateMachine(t, awsc)
exec, err := state_machine.Execute(release)
output := exec.Output
assert.NoError(t, err)
assert.Equal(t, output["success"], true)
assert.NotRegexp(t... | explode_data.jsonl/62288 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 450
} | [
2830,
3393,
90680,
1989,
3050,
62,
20294,
2763,
73302,
1155,
353,
8840,
836,
8,
341,
17200,
1623,
1669,
14563,
16077,
741,
197,
672,
2388,
1669,
14563,
47359,
47174,
5801,
1623,
340,
24291,
38695,
1669,
1855,
2271,
94666,
1155,
11,
1360,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNullsTruncate(t *testing.T) {
for _, size := range pos {
n := NewNulls(BatchSize)
n.Truncate(uint16(size))
for i := uint16(0); i < BatchSize; i++ {
expected := uint64(i) >= size
require.Equal(t, expected, n.NullAt(i),
"NullAt(%d) should be %t after Truncate(%d)", i, expected, size)
}
}
} | explode_data.jsonl/37156 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
3280,
82,
1282,
26900,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1379,
1669,
2088,
1133,
341,
197,
9038,
1669,
1532,
3280,
82,
5349,
754,
1695,
340,
197,
9038,
8240,
26900,
8488,
16,
21,
6856,
1171,
197,
2023,
600,
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... | 3 |
func TestCreateImage(t *testing.T) {
const (
sizeX = 16
sizeY = 8
)
imgHexData := "89504e470d0a1a0a0000000d49484452000000100000000808020000007f14e8c00000001a49444154789c62e9e3f9c4400a602249f5a8062201200000ffff6d62019f6525f13f0000000049454e44ae426082"
if _, err := CreateImage(refClr, 0, sizeY); err == nil {
... | explode_data.jsonl/37827 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
4021,
1906,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
13832,
55,
284,
220,
16,
21,
198,
197,
13832,
56,
284,
220,
23,
198,
197,
692,
39162,
20335,
1043,
1669,
330,
23,
24,
20,
15,
19,
68,
19,
22,
15,
67,
15,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestRequest(t *testing.T) {
LastRequest = time.Time{}
SetRequestMutex(true)
RequestData()
if time.Since(LastRequest).Seconds() < 1 {
t.Error("Should have not updated the time")
}
SetRequestMutex(false)
RequestData()
if time.Since(LastRequest).Seconds() > 1 {
t.Error("Should have updated the time")
}... | explode_data.jsonl/66529 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 121
} | [
2830,
3393,
1900,
1155,
353,
8840,
836,
8,
341,
197,
5842,
1900,
284,
882,
16299,
31483,
22212,
1900,
38099,
3715,
340,
73806,
1043,
741,
743,
882,
93404,
4957,
559,
1900,
568,
15343,
368,
366,
220,
16,
341,
197,
3244,
6141,
445,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFixedSlice(t *testing.T) {
{
var v, r []int
v = []int{-1, 1}
if err := encdec(v, &r, func(code byte) bool {
return def.FixArray <= code && code <= def.FixArray+0x0f
}); err != nil {
t.Error(err)
}
}
{
var v, r []uint
v = []uint{0, 100}
if err := encdec(v, &r, func(code byte) bool {
... | explode_data.jsonl/64216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1411
} | [
2830,
3393,
13520,
33236,
1155,
353,
8840,
836,
8,
341,
197,
515,
197,
2405,
348,
11,
435,
3056,
396,
198,
197,
5195,
284,
3056,
396,
19999,
16,
11,
220,
16,
532,
197,
743,
1848,
1669,
3209,
8169,
3747,
11,
609,
81,
11,
2915,
1584... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrepare_MissingSchemaPrepare(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
s := createSession(t)
conn := getRandomConn(t, s)
defer s.Close()
insertQry := s.Query("INSERT INTO invalidschemaprep (val) VALUES (?)", 5)
if err := conn.executeQuery(ctx, insertQry).er... | explode_data.jsonl/11157 | {
"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,
50590,
1245,
13577,
8632,
50590,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
2822,
1903,
1669,
1855,
5283,
1155,
340,
32917,
1669,
52436,
9701,
1155,
11,
274,
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 TestGetProduct(t *testing.T) {
t.Parallel()
migration := sqltest.New(t, sqltest.Options{
Force: *force,
Path: "../../migrations",
})
pool := migration.Setup(context.Background(), "")
db := &DB{
Postgres: pool,
}
createProducts(t, db, []inventory.CreateProductParams{
{
ID: "product",
... | explode_data.jsonl/25451 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 831
} | [
2830,
3393,
1949,
4816,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2109,
5033,
1669,
5704,
1944,
7121,
1155,
11,
5704,
1944,
22179,
515,
197,
197,
18573,
25,
353,
8833,
345,
197,
69640,
25,
220,
10208,
76,
17824,
756,
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 TestSleepWithContext(t *testing.T) {
ctx := &awstesting.FakeContext{DoneCh: make(chan struct{})}
err := aws.SleepWithContext(ctx, 1*time.Millisecond)
if err != nil {
t.Errorf("expect context to not be canceled, got %v", err)
}
} | explode_data.jsonl/49372 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
41745,
91101,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
609,
672,
267,
59855,
991,
726,
1972,
90,
17453,
1143,
25,
1281,
35190,
2036,
28875,
630,
9859,
1669,
31521,
31586,
91101,
7502,
11,
220,
16,
77053,
71482,
340,
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 TestMigrationErrorFrom(t *testing.T) {
defer func(v []migration, s string) {
schemaMigrations = v
DbSchemaCurrent = s
}(schemaMigrations, DbSchemaCurrent)
DbSchemaCurrent = "koo-koo-schema"
shouldNotRun := false
schemaMigrations = []migration{
{name: "langur", fn: func(db *DB) error {
shouldNotRun ... | explode_data.jsonl/79613 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 531
} | [
2830,
3393,
20168,
1454,
3830,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
3747,
3056,
80227,
11,
274,
914,
8,
341,
197,
1903,
3416,
44,
17824,
284,
348,
198,
197,
197,
7994,
8632,
5405,
284,
274,
198,
197,
25547,
17349,
44,
17824,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDimensions(t *testing.T) {
t.Parallel()
ctx, cancel := testAllocate(t, "image.html")
defer cancel()
tests := []struct {
sel string
by QueryOption
width int64
height int64
}{
{`/html/body/img`, BySearch, 239, 239},
{`img`, ByQueryAll, 239, 239},
{`img`, ByQuery, 239, 239},
{`#icon... | explode_data.jsonl/59467 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 322
} | [
2830,
3393,
21351,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20985,
11,
9121,
1669,
1273,
75380,
1155,
11,
330,
1805,
2564,
1138,
16867,
9121,
2822,
78216,
1669,
3056,
1235,
341,
197,
1903,
301,
262,
914,
198,
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... | 5 |
func TestSub(t *testing.T) {
mux := new(TypeMux)
defer mux.Stop()
sub := mux.Subscribe(testEvent(0))
go func() {
if err := mux.Post(testEvent(5)); err != nil {
t.Errorf("Post returned unexpected error: %v", err)
}
}()
ev := <-sub.Chan()
if ev.Data.(testEvent) != testEvent(5) {
t.Errorf("Got %v (%T), e... | explode_data.jsonl/61573 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 168
} | [
2830,
3393,
3136,
1155,
353,
8840,
836,
8,
341,
2109,
2200,
1669,
501,
22498,
44,
2200,
340,
16867,
59807,
30213,
2822,
28624,
1669,
59807,
82628,
8623,
1556,
7,
15,
1171,
30680,
2915,
368,
341,
197,
743,
1848,
1669,
59807,
23442,
8623,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnvironmentVariableOverrideName(t *testing.T) {
var args struct {
Foo string `arg:"env:BAZ"`
}
setenv(t, "BAZ", "bar")
os.Args = []string{"example"}
MustParse(&args)
assert.Equal(t, "bar", args.Foo)
} | explode_data.jsonl/13036 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
12723,
7827,
2177,
675,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
12727,
2624,
914,
1565,
858,
2974,
3160,
25,
7064,
57,
8805,
197,
532,
8196,
3160,
1155,
11,
330,
7064,
57,
497,
330,
2257,
1138,
25078,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTicketBundleSubdigestsCanonicalDigest(t *testing.T) {
m := TicketBundleSubdigests{
TicketRequestDigest: [][]byte{
{1, 2, 3, 4, 5, 6, 7, 8, 9, 0},
{4, 5, 6, 7, 8, 9, 0, 1, 2, 3},
{7, 8, 9, 0, 1, 2, 3, 4, 5, 6},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
},
TicketL1Digest: [][]byte{
{1, 2, 3, 4, 5, 6,... | explode_data.jsonl/45217 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 566
} | [
2830,
3393,
34058,
8409,
3136,
36339,
82,
70914,
45217,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
28397,
8409,
3136,
36339,
82,
515,
197,
10261,
5897,
1900,
45217,
25,
52931,
3782,
515,
298,
197,
90,
16,
11,
220,
17,
11,
220,
18,
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 Test_nthRun(t *testing.T) {
type args struct {
n int
runlen int
b []byte
}
tests := []struct {
name string
args args
want int
}{
{"a", args{0, 2, []byte{0xC5}}, 3},
{"b", args{1, 2, []byte{0xC5}}, 0},
{"c", args{2, 2, []byte{0xC5}}, 1},
{"d", args{2, 4, []byte{0xAB, 0xCD}}, 12},
... | explode_data.jsonl/32821 | {
"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,
78342,
6727,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
9038,
414,
526,
198,
197,
56742,
2892,
526,
198,
197,
2233,
414,
3056,
3782,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_GetConfig_NotFound(t *testing.T) {
setup(t)
defer cleanup(t)
userID := makeUserID()
for _, c := range allClients {
w := requestAsUser(t, userID, "GET", c.Endpoint, "", nil)
assert.Equal(t, http.StatusNotFound, w.Code)
}
} | explode_data.jsonl/37308 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
13614,
2648,
60816,
6650,
1155,
353,
8840,
836,
8,
341,
84571,
1155,
340,
16867,
21290,
1155,
692,
19060,
915,
1669,
1281,
36899,
741,
2023,
8358,
272,
1669,
2088,
678,
47174,
341,
197,
6692,
1669,
1681,
2121,
1474,
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... | 2 |
func TestDecodeCmdMessageReleaseStream(t *testing.T) {
bin := []byte{
// nil
0x05,
// string: abc
0x02, 0x00, 0x03, 0x61, 0x62, 0x63,
}
r := bytes.NewReader(bin)
d := amf0.NewDecoder(r)
var v AMFConvertible
err := CmdBodyDecoderFor("releaseStream", 42)(r, d, &v)
assert.Nil(t, err)
assert.Equal(t, &NetC... | explode_data.jsonl/7727 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 172
} | [
2830,
3393,
32564,
15613,
2052,
16077,
3027,
1155,
353,
8840,
836,
8,
341,
2233,
258,
1669,
3056,
3782,
515,
197,
197,
322,
2092,
198,
197,
197,
15,
87,
15,
20,
345,
197,
197,
322,
914,
25,
39022,
198,
197,
197,
15,
87,
15,
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... | 1 |
func TestContentTypesServiceList(t *testing.T) {
var err error
assert := assert.New(t)
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
assert.Equal(r.Method, "GET")
assert.Equal(r.URL.Path, "/spaces/"+spaceID+"/content_types")
checkHeaders(r, assert)
w.WriteHeader(200)
fmt.Fpr... | explode_data.jsonl/66076 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
2762,
4173,
1860,
852,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
6948,
1669,
2060,
7121,
1155,
692,
53326,
1669,
1758,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6948,
12808,
2601,
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 TestMapProxy_Remove(t *testing.T) {
testKey := "testingKey"
testValue := "testingValue"
mp.Put(testKey, testValue)
removed, err := mp.Remove(testKey)
AssertEqualf(t, err, removed, testValue, "remove returned a wrong value")
size, err := mp.Size()
AssertEqualf(t, err, size, int32(0), "map size should be 0.")... | explode_data.jsonl/56965 | {
"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,
2227,
16219,
66843,
1155,
353,
8840,
836,
8,
341,
18185,
1592,
1669,
330,
8840,
1592,
698,
18185,
1130,
1669,
330,
8840,
1130,
698,
53230,
39825,
8623,
1592,
11,
1273,
1130,
340,
197,
45756,
11,
1848,
1669,
10490,
13270,
862... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRootHandlerFactory(t *testing.T) {
hand := RootHandlerFactory(nil, context.Background(), &signed.Ed25519{})
handler := hand(MockContextHandler)
if _, ok := interface{}(handler).(http.Handler); !ok {
t.Fatalf("A rootHandler must implement the http.Handler interface")
}
ts := httptest.NewServer(handler)
... | explode_data.jsonl/6726 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 183
} | [
2830,
3393,
8439,
3050,
4153,
1155,
353,
8840,
836,
8,
341,
9598,
437,
1669,
18854,
3050,
4153,
27907,
11,
2266,
19047,
1507,
609,
2215,
81333,
17,
20,
20,
16,
24,
37790,
53326,
1669,
1424,
66436,
1972,
3050,
340,
743,
8358,
5394,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewConfigService(t *testing.T) {
if service, err := NewConfigService(); service != nil || err == nil {
t.Errorf("no backend specified but service created: %v: %v", service, err)
}
if service, err := NewConfigService(WithMockBackend()); service == nil || err != nil {
t.Errorf("backend specified but serv... | explode_data.jsonl/16480 | {
"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,
3564,
2648,
1860,
1155,
353,
8840,
836,
8,
341,
743,
2473,
11,
1848,
1669,
1532,
2648,
1860,
2129,
2473,
961,
2092,
1369,
1848,
621,
2092,
341,
197,
3244,
13080,
445,
2152,
19163,
5189,
714,
2473,
3465,
25,
1018,
85,
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... | 5 |
func TestCollection_UpdateMany(t *testing.T) {
mgoClient := Ins()
result, err := mgoClient.C("test").UpdateMany(bson.M{"name": bson.M{"$ne": ""}}, bson.M{"$set": bson.M{"age": 18}})
if err != nil {
t.Errorf("UpdateMany error: %s", err)
t.FailNow()
}
t.Log("UpdateMany ok: ", result)
} | explode_data.jsonl/30108 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
6482,
47393,
8441,
1155,
353,
8840,
836,
8,
341,
2109,
3346,
2959,
1669,
9726,
2822,
9559,
11,
1848,
1669,
296,
3346,
2959,
727,
445,
1944,
1827,
4289,
8441,
1883,
930,
1321,
4913,
606,
788,
50980,
1321,
4913,
3,
811,
788,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_GetProcessInfo(t *testing.T) {
getInfo := &GetProcessInfoLinux{}
_, err := getInfo.GetInfo("/mnt/hgfs/Source/c++/iVideo/Source/APS/Bin/aps")
if nil != err {
t.Error(err)
}
} | explode_data.jsonl/33944 | {
"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,
13614,
7423,
1731,
1155,
353,
8840,
836,
8,
341,
10366,
1731,
1669,
609,
1949,
7423,
1731,
46324,
16094,
197,
6878,
1848,
1669,
91824,
2234,
1731,
4283,
40882,
7530,
70,
3848,
14,
3608,
2899,
1027,
14,
72,
10724,
14,
3608,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_aggregations_bucket_datehistogram_aggregation_51b40610ae05730b4c6afd25647d7ae0(t *testing.T) {
es, _ := elasticsearch.NewDefaultClient()
// tag:51b40610ae05730b4c6afd25647d7ae0[]
{
res, err := es.Index(
"my-index-000001",
strings.NewReader(`{
"date": "2015-10-01T05:30:00Z"
}`),
es.Index.W... | explode_data.jsonl/71454 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 727
} | [
2830,
3393,
20587,
7998,
804,
38749,
4164,
21158,
12958,
20587,
34442,
62,
20,
16,
65,
19,
15,
21,
16,
15,
5918,
15,
20,
22,
18,
15,
65,
19,
66,
21,
92139,
17,
20,
21,
19,
22,
67,
22,
5918,
15,
1155,
353,
8840,
836,
8,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestQualifyVariables(t *testing.T) {
assert := assert.New(t)
f := getRule(qualifyColumnsId)
sessionTable := memory.NewTable("@@session", sql.NewPrimaryKeySchema(sql.Schema{{Name: "autocommit", Type: sql.Int64, Source: "@@session"}}), nil)
globalTable := memory.NewTable("@@global", sql.NewPrimaryKeySchema(sql.... | explode_data.jsonl/58300 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 629
} | [
2830,
3393,
31029,
1437,
22678,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
1166,
1669,
633,
11337,
7,
1751,
1437,
13965,
764,
692,
25054,
2556,
1669,
4938,
7121,
2556,
10662,
31,
5920,
497,
5704,
7121,
25981,
8632,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_Pool_Package_Timeout(t *testing.T) {
p, _ := ports.PopRand()
s := gtcp.NewServer(fmt.Sprintf(`:%d`, p), func(conn *gtcp.Conn) {
defer conn.Close()
for {
data, err := conn.RecvPkg()
if err != nil {
break
}
time.Sleep(time.Second)
gtest.Assert(conn.SendPkg(data), nil)
}
})
go s.Run(... | explode_data.jsonl/26287 | {
"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,
1088,
1749,
1088,
1434,
39080,
411,
1155,
353,
8840,
836,
8,
341,
3223,
11,
716,
1669,
20325,
47424,
56124,
741,
1903,
1669,
25161,
4672,
7121,
5475,
28197,
17305,
5809,
7533,
67,
7808,
281,
701,
2915,
20571,
353,
5178,
4672... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAcquireIfSecond(t *testing.T) {
// GIVEN
permitFunction := func() bool {
return true
}
lock := state.NewLock(1)
handler := NewLockHandler(lock, timeout, permitFunction)
req, _ := http.NewRequest("GET", "/", nil)
prepareResponseRecorder(req, handler)
// WHEN
rr := prepareResponseRecorder(req, handl... | explode_data.jsonl/66022 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 136
} | [
2830,
3393,
11654,
984,
2679,
15666,
1155,
353,
8840,
836,
8,
341,
197,
322,
89836,
198,
197,
39681,
5152,
1669,
2915,
368,
1807,
341,
197,
853,
830,
198,
197,
630,
58871,
1669,
1584,
7121,
11989,
7,
16,
340,
53326,
1669,
1532,
11989,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAggregatorOneFunc(t *testing.T) {
testCases := []aggregatorTestCase{
{
input: tuples{
{0, 1},
},
expected: tuples{
{1},
},
name: "OneTuple",
outputBatchSize: 4,
},
{
input: tuples{
{0, 1},
{0, 1},
},
expected: tuples{
{2},
},
name: "OneGrou... | explode_data.jsonl/8882 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1934
} | [
2830,
3393,
9042,
58131,
3966,
9626,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
351,
58131,
16458,
515,
197,
197,
515,
298,
22427,
25,
45225,
515,
571,
197,
90,
15,
11,
220,
16,
1583,
298,
197,
1583,
298,
42400,
25,
452... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUint16ToBytes(t *testing.T) {
f := func(v ...byte) {
assert.Equal(t, v, uint16ToBytes(int(binary.BigEndian.Uint16(v))))
}
f(0x00, 0x01)
f(0x00, 0x11)
f(0x01, 0x01)
} | explode_data.jsonl/16990 | {
"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,
21570,
16,
21,
1249,
7078,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
2915,
3747,
2503,
3782,
8,
341,
197,
6948,
12808,
1155,
11,
348,
11,
2622,
16,
21,
1249,
7078,
1548,
63926,
69223,
43231,
71869,
16,
21,
3747,
22788,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetFile(t *testing.T) {
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
t.Errorf("Bad method: %s", r.Method)
}
if r.URL.Path != "/repos/k8s/kuber/contents/foo.txt" {
t.Errorf("Bad request path: %s", r.URL.Path)
}
if r.... | explode_data.jsonl/6281 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 396
} | [
2830,
3393,
1949,
1703,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
13470,
1220,
2836,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
743,
435,
20798,
961,
1758,
20798,
1949,
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 TestLang_English_Constellation(t *testing.T) {
assert := assert.New(t)
tests := []struct {
input string // 输入值
expected string // 期望值
}{
{"", ""},
{"0", ""},
{"0000-00-00", ""},
{"00:00:00", ""},
{"0000-00-00 00:00:00", ""},
{"2020-01-05", "Capricorn"},
{"2020-02-05", "Aquarius"},
{"202... | explode_data.jsonl/29471 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 385
} | [
2830,
3393,
26223,
2089,
968,
1672,
15100,
41137,
367,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
78216,
1669,
3056,
1235,
341,
197,
22427,
262,
914,
442,
69058,
25511,
198,
197,
42400,
914,
442,
220,
106076,
25511... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetBucketLocation(t *testing.T) {
for _, test := range s3LocationTests {
s := s3.New(unit.Session)
s.Handlers.Send.Clear()
s.Handlers.Send.PushBack(func(r *request.Request) {
reader := ioutil.NopCloser(bytes.NewReader([]byte(test.body)))
r.HTTPResponse = &http.Response{StatusCode: 200, Body: reade... | explode_data.jsonl/769 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
1949,
36018,
4707,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
274,
18,
4707,
18200,
341,
197,
1903,
1669,
274,
18,
7121,
24144,
20674,
340,
197,
1903,
35308,
9254,
20176,
13524,
741,
197,
1903,
35308,
9254,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdatePod(t *testing.T) {
ns := api.NamespaceDefault
requestPod := &api.Pod{
ObjectMeta: api.ObjectMeta{
Name: "foo",
ResourceVersion: "1",
Labels: map[string]string{
"foo": "bar",
"name": "baz",
},
},
Status: api.PodStatus{
Phase: api.PodRunning,
},
}
c := &testC... | explode_data.jsonl/36097 | {
"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,
4289,
23527,
1155,
353,
8840,
836,
8,
341,
84041,
1669,
6330,
46011,
3675,
198,
23555,
23527,
1669,
609,
2068,
88823,
515,
197,
23816,
12175,
25,
6330,
80222,
515,
298,
21297,
25,
310,
330,
7975,
756,
298,
79487,
5637,
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 TestSolution(t *testing.T) {
t.Parallel()
type in struct {
n int
a [][2]int
}
tests := []struct {
in in
want int
}{
{in: in{n: 10, a: [][2]int{{9, 4}, {4, 3}, {1, 1}, {4, 2}, {2, 4}, {5, 8}, {4, 0}, {5, 3}, {0, 5}, {5, 2}}}, want: 10},
}
for i, tt := range tests {
i, tt := i, tt
t.Run(fmt.Sp... | explode_data.jsonl/82188 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 278
} | [
2830,
3393,
36842,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
13158,
304,
2036,
341,
197,
9038,
526,
198,
197,
11323,
508,
1457,
17,
63025,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
17430,
256,
304,
198,
197,
50780,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAssignSDKServerToUser_SDKAlreadyAssigned(t *testing.T) {
setupTest()
u := &models.User{ID: 4}
u.LbrynetServerID.SetValid(55)
rt := sdkrouter.New(config.GetLbrynetServers())
l := logrus.NewEntry(logrus.New())
err := assignSDKServerToUser(boil.GetDB(), u, rt.RandomServer(), l)
assert.EqualError(t, err, "u... | explode_data.jsonl/1636 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 143
} | [
2830,
3393,
28933,
31534,
5475,
1249,
1474,
84197,
38370,
94025,
1155,
353,
8840,
836,
8,
341,
84571,
2271,
741,
10676,
1669,
609,
6507,
7344,
90,
915,
25,
220,
19,
532,
10676,
1214,
65,
884,
4711,
5475,
915,
4202,
4088,
7,
20,
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 TestAPICreateUserInvalidEmail(t *testing.T) {
defer prepareTestEnv(t)()
adminUsername := "user1"
session := loginUser(t, adminUsername)
token := getTokenForLoggedInUser(t, session)
urlStr := fmt.Sprintf("/api/v1/admin/users?token=%s", token)
req := NewRequestWithValues(t, "POST", urlStr, map[string]string{
... | explode_data.jsonl/71785 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
2537,
1317,
964,
1474,
7928,
4781,
1155,
353,
8840,
836,
8,
341,
16867,
10549,
2271,
14359,
1155,
8,
741,
64394,
11115,
1669,
330,
872,
16,
698,
25054,
1669,
87169,
1155,
11,
3986,
11115,
340,
43947,
1669,
54111,
2461,
28559... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPodSpecForKvdbAuthCerts(t *testing.T) {
fakeClient := fakek8sclient.NewSimpleClientset(
&v1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: "kvdb-auth-secret",
Namespace: "kube-test",
},
Data: map[string][]byte{
secretKeyKvdbCA: []byte("kvdb-ca-file"),
secretKeyKvdbCert: ... | explode_data.jsonl/55465 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 565
} | [
2830,
3393,
23527,
8327,
2461,
42,
85,
1999,
5087,
34,
15546,
1155,
353,
8840,
836,
8,
341,
1166,
726,
2959,
1669,
12418,
74,
23,
82,
2972,
7121,
16374,
2959,
746,
1006,
197,
197,
5,
85,
16,
74779,
515,
298,
23816,
12175,
25,
77520,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetIndexAndMarkPrice(t *testing.T) {
t.Parallel()
_, err := b.GetIndexAndMarkPrice(context.Background(), "", "BTCUSD")
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/76601 | {
"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,
1949,
1552,
3036,
8949,
6972,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
293,
2234,
1552,
3036,
8949,
6972,
5378,
19047,
1507,
7342,
330,
59118,
26749,
1138,
743,
1848,
961,
2092,
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
] | 2 |
func TestMultiMiddleware(t *testing.T) {
//per-manager middlwares are called separately, global middleware is called in each manager
namespace := "prod"
setupTestConfigWithNamespace(namespace)
rc := Config.Client
processed := make(chan *Args)
testJob := (func(message *Msg) error {
processed <- message.Args()
... | explode_data.jsonl/70778 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 467
} | [
2830,
3393,
20358,
24684,
1155,
353,
8840,
836,
8,
341,
197,
322,
712,
44896,
64603,
75,
37903,
525,
2598,
25156,
11,
3644,
29679,
374,
2598,
304,
1817,
6645,
198,
56623,
1669,
330,
19748,
698,
84571,
2271,
2648,
2354,
22699,
52397,
340... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_PostBlockSuccess(t *testing.T) {
chain, mock33 := createBlockChain(t)
ps := &bcMocks.PostService{}
ps.On("PostData", mock.Anything, mock.Anything, mock.Anything).Return(nil)
chain.push.postService = ps
subscribe := new(types.PushSubscribeReq)
subscribe.Name = "push-test"
subscribe.URL = "http://localh... | explode_data.jsonl/61724 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 426
} | [
2830,
3393,
66726,
4713,
7188,
1155,
353,
8840,
836,
8,
341,
197,
8819,
11,
7860,
18,
18,
1669,
1855,
4713,
18837,
1155,
340,
35009,
1669,
609,
8904,
72577,
23442,
1860,
16094,
35009,
8071,
445,
4133,
1043,
497,
7860,
13311,
1596,
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 TestElementWithAttributes(t *testing.T) {
e := Tags(struct{ a, b Tag }{})
root := e.a(e.b("b", Attrs{"c": "d", "e:f": "g"}), Attrs{"xmlns:e": "x.y.z"})
assert.Equal(t, `<a xmlns:e="x.y.z"><b c="d" e:f="g">b</b></a>`, marshal(root))
} | explode_data.jsonl/15616 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 123
} | [
2830,
3393,
1691,
2354,
10516,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
27683,
6163,
90,
264,
11,
293,
12353,
335,
37790,
33698,
1669,
384,
5849,
2026,
948,
445,
65,
497,
50943,
82,
4913,
66,
788,
330,
67,
497,
330,
68,
55477,
788,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCrudDistributionsWithFailures(t *testing.T) {
var res middleware.Responder
db := entity.NewTestDB()
c := &crud{}
defer db.Close()
defer gostub.StubFunc(&getDB, db).Reset()
c.CreateFlag(flag.CreateFlagParams{
Body: &models.CreateFlagRequest{
Description: util.StringPtr("funny flag"),
},
})
c.Cr... | explode_data.jsonl/19458 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1075
} | [
2830,
3393,
92061,
35,
17994,
2354,
19524,
1413,
1155,
353,
8840,
836,
8,
341,
2405,
592,
29679,
8377,
20328,
198,
20939,
1669,
5387,
7121,
2271,
3506,
741,
1444,
1669,
609,
53569,
31483,
16867,
2927,
10421,
741,
16867,
67934,
392,
7758,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_getSha256(t *testing.T) {
sha, err := getSha256([]byte("this is a test"))
assert.Equal(t, err, nil, "Unable to get sha")
assert.Equal(t, sha, "2e99758548972a8e8822ad47fa1017ff72f06f3ff6a016851f45c398732bc50c", "Unable to get sha")
} | explode_data.jsonl/67807 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
3062,
62316,
17,
20,
21,
1155,
353,
8840,
836,
8,
341,
197,
15247,
11,
1848,
1669,
633,
62316,
17,
20,
21,
10556,
3782,
445,
574,
374,
264,
1273,
5455,
6948,
12808,
1155,
11,
1848,
11,
2092,
11,
330,
17075,
311,
633,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileList(t *testing.T) {
is := is.New(t)
s := NewShell(shellUrl)
list, err := s.FileList(fmt.Sprintf("/ipfs/%s", examplesHash))
is.Nil(err)
is.Equal(list.Type, "Directory")
is.Equal(list.Size, 0)
is.Equal(len(list.Links), 7)
// TODO: document difference in sice betwen 'ipfs ls' and 'ipfs file ls -v'... | explode_data.jsonl/61080 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 704
} | [
2830,
3393,
1703,
852,
1155,
353,
8840,
836,
8,
341,
19907,
1669,
374,
7121,
1155,
340,
1903,
1669,
1532,
25287,
93558,
2864,
692,
14440,
11,
1848,
1669,
274,
8576,
852,
28197,
17305,
4283,
573,
3848,
12627,
82,
497,
10295,
6370,
1171,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_UpForbid(t *testing.T) {
Convey("UpForbid", t, func() {
_, err := d.UpForbid(context.TODO(), 1, 1, 1, 1)
So(err, ShouldBeNil)
})
} | explode_data.jsonl/48602 | {
"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,
88425,
2461,
20648,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2324,
2461,
20648,
497,
259,
11,
2915,
368,
341,
197,
197,
6878,
1848,
1669,
294,
60828,
2461,
20648,
5378,
90988,
1507,
220,
16,
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 |
func TestBadIPMask(t *testing.T) {
block, _ := pem.Decode([]byte(badIPMaskPEM))
_, err := ParseCertificate(block.Bytes)
if err == nil {
t.Fatalf("unexpected success")
}
const expected = "contained invalid mask"
if !strings.Contains(err.Error(), expected) {
t.Fatalf("expected %q in error but got: %s", expecte... | explode_data.jsonl/68019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
17082,
3298,
12686,
1155,
353,
8840,
836,
8,
341,
47996,
11,
716,
1669,
54184,
56372,
10556,
3782,
1883,
329,
3298,
12686,
1740,
44,
1171,
197,
6878,
1848,
1669,
14775,
33202,
18682,
36868,
340,
743,
1848,
621,
2092,
341,
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 TestMatchPath(t *testing.T) {
for k, c := range []struct {
path string
haystack []string
ok bool
}{
{path: "foo", haystack: []string{"foo", "bar"}, ok: true},
{path: "bar", haystack: []string{"foo", "bar"}, ok: true},
{path: "foo", haystack: []string{"foo/bar"}, ok: true},
{path: "bar", h... | explode_data.jsonl/48816 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 322
} | [
2830,
3393,
8331,
1820,
1155,
353,
8840,
836,
8,
341,
2023,
595,
11,
272,
1669,
2088,
3056,
1235,
341,
197,
26781,
257,
914,
198,
197,
9598,
352,
7693,
3056,
917,
198,
197,
59268,
981,
1807,
198,
197,
59403,
197,
197,
90,
2343,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestBasicClusterPubSub(t *testing.T) {
srvA, srvB, optsA, optsB := runServers(t)
defer srvA.Shutdown()
defer srvB.Shutdown()
clientA := createClientConn(t, optsA.Host, optsA.Port)
defer clientA.Close()
clientB := createClientConn(t, optsB.Host, optsB.Port)
defer clientB.Close()
sendA, expectA := setupCo... | explode_data.jsonl/5071 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 330
} | [
2830,
3393,
15944,
28678,
29162,
3136,
1155,
353,
8840,
836,
8,
341,
1903,
10553,
32,
11,
43578,
33,
11,
12185,
32,
11,
12185,
33,
1669,
1598,
78139,
1155,
340,
16867,
43578,
32,
10849,
18452,
741,
16867,
43578,
33,
10849,
18452,
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... | 2 |
func TestDestroyedFlagIsSetWhenDestroyed(t *testing.T) {
sm := NewNativeSM(config.Config{}, &dummySM{}, nil)
sm.Loaded()
sm.Offloaded()
if sm.loadedCount != 0 {
t.Errorf("loadedCount is not 0")
}
if sm.destroyed {
t.Errorf("destroyed flag unexpectedly set")
}
select {
case <-sm.DestroyedC():
t.Errorf("de... | explode_data.jsonl/62404 | {
"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,
85742,
12135,
3872,
1649,
4498,
85742,
1155,
353,
8840,
836,
8,
341,
72023,
1669,
1532,
20800,
9501,
8754,
10753,
22655,
609,
31390,
9501,
22655,
2092,
340,
72023,
13969,
291,
741,
72023,
13,
4596,
15589,
741,
743,
1525,
60879... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInclude(t *testing.T) {
testStr := `<?php
include "test.php"; ?>`
p := NewParser()
p.disableScoping = true
_, err := p.Parse("test.php", testStr)
if err != nil {
fmt.Println(err)
t.Fatalf("Did not parse include correctly")
}
} | explode_data.jsonl/28430 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
22283,
1155,
353,
8840,
836,
8,
341,
18185,
2580,
1669,
1565,
1316,
1208,
198,
220,
2924,
330,
1944,
2296,
5123,
3370,
3989,
3223,
1669,
1532,
6570,
741,
3223,
42628,
3326,
33707,
284,
830,
198,
197,
6878,
1848,
1669,
281,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMap(t *testing.T) {
var q = 5
p := &q
a := person{"deen", 22, 1, p}
mapA, err := Map(a, DefaultTagName)
ass := assert.New(t)
ass.NoError(err)
ass.Equal("deen", mapA["name"])
ass.Equal(22, mapA["age"])
var ok bool
_, ok = mapA["foo"]
ass.False(ok)
_, ok = mapA["cc"]
ass.False(ok)
} | explode_data.jsonl/18646 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
2227,
1155,
353,
8840,
836,
8,
341,
2405,
2804,
284,
220,
20,
198,
3223,
1669,
609,
80,
198,
11323,
1669,
1697,
4913,
64481,
497,
220,
17,
17,
11,
220,
16,
11,
281,
630,
19567,
32,
11,
1848,
1669,
5027,
2877,
11,
7899,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_CLG_Input_GetInformationIDError(t *testing.T) {
newCLG := MustNew()
newCtx := context.MustNew()
newInput := "test input"
informationIDKey := fmt.Sprintf("information-sequence:%s:information-id", newInput)
// Prepare the storage connection to fake a returned error.
c := redigomock.NewConn()
c.Command(... | explode_data.jsonl/52855 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 234
} | [
2830,
3393,
6843,
38,
48653,
13614,
14873,
915,
1454,
1155,
353,
8840,
836,
8,
341,
8638,
3140,
38,
1669,
15465,
3564,
741,
8638,
23684,
1669,
2266,
50463,
3564,
2822,
8638,
2505,
1669,
330,
1944,
1946,
698,
17430,
1627,
915,
1592,
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... | 2 |
func TestClient_Ping(t *testing.T) {
resp, err := client.Ping()
if err != nil {
t.Errorf("unexpected error. error: %+v", err)
return
}
if resp.Err() != nil {
t.Errorf("unexpected error. error: %+v", resp.Err())
return
}
if resp.RespData == nil {
t.Error("resp.RespData unexpected nil")
return
}
} | explode_data.jsonl/24784 | {
"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,
2959,
1088,
287,
1155,
353,
8840,
836,
8,
341,
34653,
11,
1848,
1669,
2943,
1069,
287,
741,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
53859,
1465,
13,
1465,
25,
68524,
85,
497,
1848,
340,
197,
853,
198,
197,
532,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestGetOfferByID(t *testing.T) {
tt := test.Start(t)
defer tt.Finish()
test.ResetHorizonDB(t, tt.HorizonDB)
q := &Q{tt.HorizonSession()}
err := insertOffer(q, eurOffer)
tt.Assert.NoError(err)
offer, err := q.GetOfferByID(eurOffer.OfferID)
tt.Assert.NoError(err)
tt.Assert.Equal(offer, eurOffer)
} | explode_data.jsonl/69693 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 147
} | [
2830,
3393,
1949,
39462,
60572,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
1273,
12101,
1155,
340,
16867,
17853,
991,
18176,
741,
18185,
36660,
39601,
16973,
3506,
1155,
11,
17853,
3839,
269,
16973,
3506,
340,
18534,
1669,
609,
48,
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 TestAttributeRestrictionsCovering(t *testing.T) {
escalationTest{
ownerRules: []authorizationapi.PolicyRule{
{Verbs: sets.NewString("create"), Resources: sets.NewString("builds"), AttributeRestrictions: &authorizationapi.IsPersonalSubjectAccessReview{}},
},
servantRules: []authorizationapi.PolicyRule{
... | explode_data.jsonl/9066 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1779
} | [
2830,
3393,
3907,
50360,
21439,
30896,
287,
1155,
353,
8840,
836,
8,
341,
80629,
278,
367,
2271,
515,
197,
197,
8118,
26008,
25,
3056,
39554,
2068,
1069,
8018,
11337,
515,
298,
197,
90,
10141,
1279,
25,
7289,
7121,
703,
445,
3182,
397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClient_DestroyExternalInitiator(t *testing.T) {
t.Parallel()
app := startNewApplication(t)
client, r := app.NewClientAndRenderer()
token := auth.NewToken()
exi, err := bridges.NewExternalInitiator(token,
&bridges.ExternalInitiatorRequest{Name: "name"},
)
require.NoError(t, err)
err = app.BridgeORM(... | explode_data.jsonl/5267 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 216
} | [
2830,
3393,
2959,
79266,
25913,
3803,
36122,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
28236,
1669,
1191,
3564,
4988,
1155,
340,
25291,
11,
435,
1669,
906,
7121,
2959,
3036,
11541,
2822,
43947,
1669,
4166,
7121,
3323,
741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.