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 TestNewRegistry(t *testing.T) {
r := NewRegistry(info.NewRuntimeInfo())
compType := "my_component"
compName := "etcd"
r.Register(compType,
NewComponentFactory(compName, func() Component {
return nil
}),
)
_, err := r.Create(compType, compName)
if err != nil {
t.Fatalf("create mock store failed: %v"... | explode_data.jsonl/17977 | {
"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,
3564,
15603,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
15603,
14208,
7121,
15123,
1731,
2398,
197,
5689,
929,
1669,
330,
2408,
23406,
698,
197,
5689,
675,
1669,
330,
295,
4385,
698,
7000,
19983,
30008,
929,
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... | 1 |
func TestBytesPump(t *testing.T) {
w := &Websocket{}
w.init()
defer close(w.rxBytesChan)
go w.bytesPump()
payload := []byte("hello world")
refMsg := messageMeta{
service: serviceID(7),
command: commandID(11),
msgID: 15,
payload: payload}
enc, err := encodeMessage(int(refMsg.msgID), int(refMsg.refMsg... | explode_data.jsonl/13932 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 241
} | [
2830,
3393,
7078,
47,
1510,
1155,
353,
8840,
836,
8,
341,
6692,
1669,
609,
5981,
9556,
16094,
6692,
8271,
2822,
16867,
3265,
3622,
45348,
7078,
46019,
340,
30680,
289,
42697,
47,
1510,
2822,
76272,
1669,
3056,
3782,
445,
14990,
1879,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestInputService17ProtocolTestXMLAttributeCase1(t *testing.T) {
sess := session.New()
svc := NewInputService17ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
input := &InputService17TestShapeInputService17TestCaseOperation1Input{
Grant: &InputService17TestShapeGrant{
Grantee: &InputSe... | explode_data.jsonl/46491 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 430
} | [
2830,
3393,
2505,
1860,
16,
22,
20689,
2271,
10609,
3907,
4207,
16,
1155,
353,
8840,
836,
8,
341,
1903,
433,
1669,
3797,
7121,
741,
1903,
7362,
1669,
1532,
2505,
1860,
16,
22,
20689,
2271,
57223,
11,
609,
8635,
10753,
90,
27380,
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 TestValueBinder_BindError(t *testing.T) {
c := createTestContext("/api/user/999?nr=en&id=nope", nil, nil)
b := QueryParamsBinder(c)
id := int64(99)
nr := int64(88)
err := b.Int64("id", &id).
Int64("nr", &nr).
BindError()
assert.EqualError(t, err, "code=400, message=failed to bind field value to int64, ... | explode_data.jsonl/82533 | {
"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,
1130,
44055,
1668,
484,
1454,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1855,
2271,
1972,
4283,
2068,
11739,
14,
24,
24,
24,
30,
19618,
61757,
42621,
30315,
375,
497,
2092,
11,
2092,
340,
2233,
1669,
11361,
4870,
44055,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestArray_Unique(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
expect := []interface{}{1, 2, 3, 4, 5, 3, 2, 2, 3, 5, 5}
array := garray.NewArrayFrom(expect)
t.Assert(array.Unique().Slice(), []interface{}{1, 2, 3, 4, 5})
})
} | explode_data.jsonl/13890 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
1857,
62,
22811,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
24952,
1669,
3056,
4970,
6257,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIsSharedFailure(t *testing.T) {
errorTests := []struct {
name string
content string
}{
{
// the first line is too short
name: "too-short-line",
content: `62 0 253:0 / / rw,relatime
76 62 8:1 / /boot rw,relatime shared:29 - ext4 /dev/sda1 rw,seclabel,data=ordered
78 62 0:41 / /tmp rw,nosuid,... | explode_data.jsonl/76949 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 736
} | [
2830,
3393,
3872,
16997,
17507,
1155,
353,
8840,
836,
8,
341,
18290,
18200,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
27751,
914,
198,
197,
59403,
197,
197,
515,
298,
197,
322,
279,
1156,
1555,
374,
2238,
2805,
198,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestNamespaceExtractionRules(t *testing.T) {
c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{})
namespace := &api_v1.Namespace{
ObjectMeta: meta_v1.ObjectMeta{
Name: "auth-service-namespace-abc12-xyz3",
UID: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
Cre... | explode_data.jsonl/56854 | {
"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,
22699,
840,
26425,
26008,
1155,
353,
8840,
836,
8,
341,
1444,
11,
716,
1669,
501,
2271,
2959,
2354,
26008,
3036,
28351,
1155,
11,
94506,
26008,
22655,
45012,
6257,
692,
56623,
1669,
609,
2068,
2273,
16,
46011,
515,
197,
2381... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWriteThroughHeader(t *testing.T) {
t.Run("Slice", func(t *testing.T) {
s := []byte("Hello, checkptr!")[:5]
var alias []byte
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&alias))
hdr.Data = unsafe.Pointer(&s[0])
hdr.Cap = cap(s)
hdr.Len = len(s)
if !bytes.Equal(alias, s) {
t.Errorf("alias of ... | explode_data.jsonl/68577 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 358
} | [
2830,
3393,
7985,
23857,
4047,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
33236,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
1903,
1669,
3056,
3782,
445,
9707,
11,
1779,
3505,
88783,
3447,
20,
2533,
197,
2405,
15534,
3056,
3782... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCustomToUnstructured(t *testing.T) {
testcases := []struct {
Data string
Expected interface{}
}{
{Data: `null`, Expected: nil},
{Data: `true`, Expected: true},
{Data: `false`, Expected: false},
{Data: `[]`, Expected: []interface{}{}},
{Data: `[1]`, Expected: []interface{}{int64(1)}... | explode_data.jsonl/77965 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 496
} | [
2830,
3393,
10268,
1249,
1806,
51143,
1155,
353,
8840,
836,
8,
972,
18185,
23910,
1669,
3056,
1235,
972,
197,
40927,
257,
914,
319,
197,
197,
18896,
3749,
90,
1771,
197,
92,
1666,
197,
197,
90,
1043,
25,
1565,
2921,
7808,
31021,
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 Test_JoinSelf(t *testing.T) {
en := NewOnSlice("fs", "sf", "ff", "ss")
type args struct {
outer Enumerator[string]
inner Enumerator[string]
outerKeySelector func(string) rune
innerKeySelector func(string) rune
resultSelector func(string, string) string
}
tests := []struct {
... | explode_data.jsonl/67377 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 540
} | [
2830,
3393,
10598,
1961,
12092,
1155,
353,
8840,
836,
8,
341,
81848,
1669,
1532,
1925,
33236,
445,
3848,
497,
330,
17246,
497,
330,
542,
497,
330,
778,
1138,
13158,
2827,
2036,
341,
197,
197,
2676,
310,
76511,
14032,
921,
197,
197,
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 TestGMC2TwoSeriesV2(test *testing.T) {
gmc := NewGroupMemoryChunk2(2)
app, _ := gmc.Appender()
for i := 0; i < 4000; i += 5 {
app.AppendGroup(int64(i), []float64{float64(i), float64(i)})
}
it := gmc.IteratorGroup(2500, 0)
i := 2500
for it.Next() {
t, v := it.At()
testutil.Equals(test, int64(i), t)
... | explode_data.jsonl/36846 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 189
} | [
2830,
3393,
38,
11604,
17,
11613,
25544,
53,
17,
8623,
353,
8840,
836,
8,
341,
3174,
12887,
1669,
1532,
2808,
10642,
28304,
17,
7,
17,
340,
28236,
11,
716,
1669,
342,
12887,
5105,
1659,
741,
2023,
600,
1669,
220,
15,
26,
600,
366,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBadSecrets(t *testing.T) {
_, err := fixture(t, "invalid/bad-secrets.workflow")
pe := extractParserError(t, err)
assert.Equal(t, "d", pe.Actions[3].Identifier)
assert.Equal(t, []string{"-", "^", "9", "a", "0_o", "o_0"}, pe.Actions[3].Secrets)
assert.Equal(t, "e", pe.Actions[4].Identifier)
assert.Equal(t... | explode_data.jsonl/55680 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 242
} | [
2830,
3393,
17082,
19773,
82,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
12507,
1155,
11,
330,
11808,
3470,
329,
7806,
52710,
72774,
1138,
197,
375,
1669,
8649,
6570,
1454,
1155,
11,
1848,
340,
6948,
12808,
1155,
11,
330,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadASN1OptionalOctetString(t *testing.T) {
for _, test := range optionalOctetStringTestData {
t.Run(test.name, func(t *testing.T) {
in := String(test.in)
var out []byte
var present bool
ok := in.ReadOptionalASN1OctetString(&out, &present, test.tag)
if ok != test.ok || present != test.present... | explode_data.jsonl/16722 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 217
} | [
2830,
3393,
4418,
68134,
16,
15309,
18053,
295,
703,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
10101,
18053,
295,
703,
83920,
341,
197,
3244,
16708,
8623,
2644,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
17430,
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 TestServerUnreadRequestBodyLittle(t *testing.T) {
defer afterTest(t)
conn := new(testConn)
body := strings.Repeat("x", 100<<10)
conn.readBuf.Write([]byte(fmt.Sprintf(
"POST / HTTP/1.1\r\n"+
"Host: test\r\n"+
"Content-Length: %d\r\n"+
"\r\n", len(body))))
conn.readBuf.Write([]byte(body))
done := m... | explode_data.jsonl/22415 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 423
} | [
2830,
3393,
5475,
1806,
878,
33334,
38103,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
340,
32917,
1669,
501,
8623,
9701,
340,
35402,
1669,
9069,
2817,
10979,
445,
87,
497,
220,
16,
15,
15,
2442,
16,
15,
340,
32917,
4125,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestV13WithStateCouchdb(t *testing.T) {
env := newEnv(t)
defer env.cleanup()
ledgerFSRoot := env.initializer.Config.RootFSPath
// pass false so that 'ledgersData' directory will not be created when unzipped to ledgerFSRoot
require.NoError(t, testutil.Unzip("testdata/v13_statecouchdb/sample_ledgers/ledgersDat... | explode_data.jsonl/40435 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 955
} | [
2830,
3393,
53,
16,
18,
2354,
1397,
34,
3026,
1999,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
501,
14359,
1155,
340,
16867,
6105,
87689,
2822,
197,
50704,
8485,
8439,
1669,
6105,
17793,
3135,
10753,
45345,
8485,
1820,
198,
197,
322,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddMemberOk(t *testing.T) {
ctx := wasmsolo.NewSoloContext(t, dividend.ScName, dividend.OnLoad)
member1 := ctx.NewSoloAgent()
dividendMember(ctx, member1, 100)
require.NoError(t, ctx.Err)
} | explode_data.jsonl/31341 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
2212,
9366,
11578,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
572,
1011,
10011,
7121,
89299,
1972,
1155,
11,
45880,
18326,
675,
11,
45880,
8071,
5879,
692,
2109,
1377,
16,
1669,
5635,
7121,
89299,
16810,
741,
63278,
68850,
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 |
func TestSetChainConfigs(t *testing.T) {
tests := map[string]struct {
configs map[string]string
upgrades map[string]string
corethConfig string
errMessage string
expected map[string]chains.ChainConfig
}{
"no chain configs": {
configs: map[string]string{},
upgrades: map[string]string{}... | explode_data.jsonl/51975 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1733
} | [
2830,
3393,
1649,
18837,
84905,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
25873,
82,
414,
2415,
14032,
30953,
198,
197,
59810,
22340,
257,
2415,
14032,
30953,
198,
197,
71882,
339,
2648,
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... | 1 |
func TestIndexName(t *testing.T) {
tests := []struct {
name string
index string
nameProvider indexNameProvider
date time.Time
end time.Time
}{
{
name: "index prefix",
nameProvider: newIndexNameProvider("myindex", "production", false, false),
index: "... | explode_data.jsonl/67915 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 651
} | [
2830,
3393,
1552,
675,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
26327,
286,
914,
198,
197,
11609,
5179,
1922,
675,
5179,
198,
197,
44086,
260,
882,
16299,
198,
197,
6246,
688,
882,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldConvert(t *testing.T) {
t.Run("should not convert root element", func(t *testing.T) {
mapper := mapify.Mapper{
ShouldConvert: func(path string, value reflect.Value) (bool, error) {
if path == "" {
return false, nil
}
return true, nil
},
}
tests := map[string]interface{}{
... | explode_data.jsonl/71717 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1637
} | [
2830,
3393,
14996,
12012,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5445,
537,
5508,
3704,
2392,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
2109,
3106,
1669,
2415,
1437,
71892,
515,
298,
197,
14996,
12012,
25,
2915,
5581,
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... | 2 |
func TestSLIPluginLoader(t *testing.T) {
tests := map[string]struct {
pluginSrc string
pluginID string
meta map[string]string
labels map[string]string
options map[string]string
expPluginID string
expSLIQuery string
expErrLoad bool
expErr bool
}{
"Plugin without version s... | explode_data.jsonl/35569 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1407
} | [
2830,
3393,
7984,
40,
11546,
9181,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
9138,
20360,
256,
914,
198,
197,
197,
9138,
915,
262,
914,
198,
197,
84004,
286,
2415,
14032,
30953,
198,
197,
95143,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProvider(t *testing.T) {
test.IntegrationTest(t)
var (
kymaVersion = "main"
kymaComponent = "cluster-users"
)
log, err := logger.NewLogger(true)
require.NoError(t, err)
wsFactory, err := workspace.NewFactory("test", log)
require.NoError(t, err)
cleanupFct := func(t *testing.T) {
require.NoE... | explode_data.jsonl/64307 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 486
} | [
2830,
3393,
5179,
1155,
353,
8840,
836,
8,
341,
18185,
7371,
17376,
2271,
1155,
692,
2405,
2399,
197,
16463,
1600,
64,
5637,
256,
284,
330,
3817,
698,
197,
16463,
1600,
64,
2189,
284,
330,
18855,
43380,
698,
197,
692,
6725,
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... | 1 |
func TestApiTest_JSONBody(t *testing.T) {
type bodyStruct struct {
A int `json:"a"`
}
tests := map[string]struct {
body interface{}
}{
"string": {
body: `{"a": 12345}`,
},
"[]byte": {
body: []byte(`{"a": 12345}`),
},
"struct": {
body: bodyStruct{A: 12345},
},
"map": {
body: map[string... | explode_data.jsonl/54784 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 436
} | [
2830,
3393,
6563,
2271,
25356,
5444,
1155,
353,
8840,
836,
8,
341,
13158,
2487,
9422,
2036,
341,
197,
22985,
526,
1565,
2236,
2974,
64,
8805,
197,
630,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
35402,
3749,
16094,
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... | 2 |
func TestTrie_longestCommonPrefixLenght(t *testing.T) {
trie := NewTrie()
trie.prefix = []byte("1234567890")
switch {
case trie.longestCommonPrefixLength([]byte("")) != 0:
t.Fail()
case trie.longestCommonPrefixLength([]byte("12345")) != 5:
t.Fail()
case trie.longestCommonPrefixLength([]byte("123789")) != 3:
... | explode_data.jsonl/2373 | {
"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,
51,
7231,
17799,
477,
10839,
14335,
43,
70078,
1155,
353,
8840,
836,
8,
341,
197,
8927,
1669,
1532,
51,
7231,
741,
197,
8927,
38543,
284,
3056,
3782,
445,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
5130,
8961,
341,
2722,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func Test_GetStorageClasses(t *testing.T) {
type checkFn func(*testing.T, *v1.StorageClassList, error)
type connectFn func(*k8s.API) error
type configFn func() (*rest.Config, error)
check := func(fns ...checkFn) []checkFn { return fns }
hasNoError := func(t *testing.T, volumes *v1.StorageClassList, err error) {
... | explode_data.jsonl/29789 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1048
} | [
2830,
3393,
13614,
5793,
20077,
1155,
353,
8840,
836,
8,
341,
13158,
1779,
24911,
2915,
4071,
8840,
836,
11,
353,
85,
16,
43771,
1957,
852,
11,
1465,
340,
13158,
4564,
24911,
2915,
4071,
74,
23,
82,
24922,
8,
1465,
198,
13158,
2193,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRedirectURIsFromRoutes(t *testing.T) {
for _, test := range []struct {
name string
namespace string
names sets.String
routes []*routeapi.Route
expected map[string]redirectURIList
}{
{
name: "single route with single ingress",
namespace: "ns01",
names: sets.NewString... | explode_data.jsonl/54740 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2130
} | [
2830,
3393,
17725,
1511,
3872,
3830,
26653,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
56623,
914,
198,
197,
93940,
257,
7289,
6431,
198,
197,
7000,
5495,
262,
29838,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestArgv_Unquote_ShouldFail(t *testing.T) {
tests := []struct {
Name, Input string
Err error
}{
{
Name: "unterminated string #1",
Input: `"a`,
Err: "e.SyntaxError{
Msg: "unterminated quoted string",
Offset: 2,
},
},
{
Name: "unterminated string #2",
Input: `\`... | explode_data.jsonl/58697 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 493
} | [
2830,
3393,
2735,
85,
40687,
2949,
36578,
616,
19524,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
21297,
11,
5571,
914,
198,
197,
197,
7747,
260,
1465,
198,
197,
59403,
197,
197,
515,
298,
21297,
25,
220,
330,
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 TestFullRADIUSSessiontWithAnalyticsModules(t *testing.T) {
// Arrange
logger, err := zap.NewDevelopment()
require.NoError(t, err, "failed to get logger")
testParam := analyticsModuleTestEnvCreate(t, logger)
// Act & Assert
// step 1: Authorization, to establish the session
testFullRADIUSSessiontWithAnalyti... | explode_data.jsonl/59968 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 272
} | [
2830,
3393,
9432,
49,
33785,
52,
1220,
1338,
83,
2354,
60539,
28201,
1155,
353,
8840,
836,
8,
341,
197,
322,
40580,
198,
17060,
11,
1848,
1669,
32978,
7121,
39419,
741,
17957,
35699,
1155,
11,
1848,
11,
330,
16091,
311,
633,
5925,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBase64MimeEncoder(t *testing.T) {
dest := bytes.NewBufferString("")
encoder := NewBase64MimeEncoder(dest)
_, err := fmt.Fprint(encoder, "Hello World!")
if err != nil {
t.Log(err)
t.FailNow()
}
err = encoder.Close()
if err != nil {
t.Log(err)
t.FailNow()
}
output := dest.String()
t.Log(outpu... | explode_data.jsonl/60245 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 173
} | [
2830,
3393,
3978,
21,
19,
44,
545,
19921,
1155,
353,
8840,
836,
8,
341,
49616,
1669,
5820,
7121,
4095,
703,
31764,
197,
27008,
1669,
1532,
3978,
21,
19,
44,
545,
19921,
27010,
692,
197,
6878,
1848,
1669,
8879,
991,
1350,
92277,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestRetrieveEntityNotFound(t *testing.T) {
ts := httptest.NewServer(
http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
if strings.HasSuffix(r.URL.Path, "/v2") {
apiResourcesHandler(w, r)
} else {
if r.Header.Get("Accept") != "application/json" {
t.Fatal("Missing applica... | explode_data.jsonl/64659 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 574
} | [
2830,
3393,
87665,
3030,
10372,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
5475,
1006,
197,
28080,
89164,
1006,
298,
29244,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
571,
743,
9069,
16152,
40177,
2601,
208... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func Test_DefaultIstioPerformer_Uninstall(t *testing.T) {
kc := &mocks.Client{}
kc.On("Kubeconfig").Return("kubeconfig")
kc.On("Clientset").Return(fake.NewSimpleClientset(&corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{Name: "istio-system"},
}), nil)
log := logger.NewLogger(false)
t.Run("should not uninstall ... | explode_data.jsonl/67280 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 851
} | [
2830,
3393,
60336,
40,
267,
815,
3889,
34527,
40687,
12248,
1155,
353,
8840,
836,
8,
341,
16463,
66,
1669,
609,
16712,
82,
11716,
16094,
16463,
66,
8071,
445,
42,
3760,
1676,
1827,
5598,
445,
97717,
1676,
1138,
16463,
66,
8071,
445,
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 TestError(t *testing.T) {
baseError := errors.New("test error")
err := &Error{
Err: baseError,
Type: ErrorTypePrivate,
}
assert.Equal(t, err.Error(), baseError.Error())
assert.Equal(t, H{"error": baseError.Error()}, err.JSON())
assert.Equal(t, err.SetType(ErrorTypePublic), err)
assert.Equal(t, ErrorTy... | explode_data.jsonl/65424 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 523
} | [
2830,
3393,
1454,
1155,
353,
8840,
836,
8,
341,
24195,
1454,
1669,
5975,
7121,
445,
1944,
1465,
1138,
9859,
1669,
609,
1454,
515,
197,
197,
7747,
25,
220,
2331,
1454,
345,
197,
27725,
25,
4600,
929,
16787,
345,
197,
532,
6948,
12808,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFixerVirtualBoxGAAttach_Fix(t *testing.T) {
cases := []struct {
Input map[string]interface{}
Expected map[string]interface{}
}{
// No attach field
{
Input: map[string]interface{}{
"type": "virtualbox",
},
Expected: map[string]interface{}{
"type": "virtualbox",
},
},
// At... | explode_data.jsonl/33586 | {
"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,
25958,
261,
33026,
1611,
16128,
30485,
1400,
941,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
66588,
262,
2415,
14032,
31344,
16094,
197,
197,
18896,
2415,
14032,
31344,
16094,
197,
59403,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestGetDetailHandler_validate(t *testing.T) {
// database is nil
h := GetDetailHandler{}
err := h.validate()
require.EqualError(t, err, "database cannot be nil")
// success
db := dbtest.Open(t)
defer db.Close()
conn := db.Open()
defer conn.Close()
h = GetDetailHandler{DB: conn}
err = h.validate()
requ... | explode_data.jsonl/7622 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
1949,
10649,
3050,
42681,
1155,
353,
8840,
836,
8,
341,
197,
322,
4625,
374,
2092,
198,
9598,
1669,
2126,
10649,
3050,
16094,
9859,
1669,
305,
19520,
741,
17957,
12808,
1454,
1155,
11,
1848,
11,
330,
12216,
4157,
387,
2092,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDeleteUser(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer th.TearDown()
Client := th.Client
user := th.BasicUser
th.LoginBasic()
testUser := th.SystemAdminUser
_, resp := Client.DeleteUser(testUser.Id)
CheckForbiddenStatus(t, resp)
Client.Logout()
_, resp = Client.DeleteUser(u... | explode_data.jsonl/21532 | {
"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,
6435,
1474,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
1005,
3803,
2320,
7210,
741,
16867,
270,
836,
682,
4454,
2822,
71724,
1669,
270,
11716,
271,
19060,
1669,
270,
48868,
1474,
198,
70479,
32499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetPubKey(t *testing.T) {
// For testing purposes, use the aikblob if it exists. Otherwise, just skip
// this test. TODO(tmroeder): implement AIK creation so we can always run
// this test.
rwc := openTPMOrSkip(t)
defer rwc.Close()
// Get the key from aikblob, assuming it exists. Otherwise, skip the tes... | explode_data.jsonl/75351 | {
"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,
1949,
29162,
1592,
1155,
353,
8840,
836,
8,
341,
197,
322,
1752,
7497,
9895,
11,
990,
279,
264,
1579,
35112,
421,
432,
6724,
13,
18214,
11,
1101,
10706,
198,
197,
322,
419,
1273,
13,
5343,
64190,
299,
7294,
1648,
4211,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHashMapForeach(t *testing.T) {
hashMap := collections.NewHashMap()
hashMap.Put(0, "0")
hashMap.Put(1, "1")
hashMap.Put(2, "2")
hashMap.Foreach(func(key interface{}, value interface{}) bool {
if key == 0 && value != "0" {
t.Errorf("an error occured: v != 0")
}
if key == 1 && value != "1" {
t... | explode_data.jsonl/56485 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
18497,
37,
8539,
1155,
353,
8840,
836,
8,
220,
341,
50333,
2227,
1669,
15302,
7121,
18497,
741,
50333,
2227,
39825,
7,
15,
11,
330,
15,
1138,
50333,
2227,
39825,
7,
16,
11,
330,
16,
1138,
50333,
2227,
39825,
7,
17,
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 Test_gcpSecretUpdater_update(t *testing.T) {
testError := errors.New("test-error")
type fields struct {
connection secretDataCreator
config secretDataCreator
}
tests := map[string]struct {
fields fields
args *corev1.Secret
wantErr error
}{"CreateConnectionFailed": {
fields: fields{
conn... | explode_data.jsonl/53738 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 726
} | [
2830,
3393,
1889,
4672,
19773,
79854,
8882,
1155,
353,
8840,
836,
8,
341,
18185,
1454,
1669,
5975,
7121,
445,
1944,
18917,
1138,
13158,
5043,
2036,
341,
197,
54590,
6234,
1043,
31865,
198,
197,
25873,
257,
6234,
1043,
31865,
198,
197,
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 TestMetdatasString(t *testing.T) {
for _, tt := range []struct {
name string
input Metadatas
want string
}{
{
name: "one meta",
input: Metadatas{
&Metadata{
Key: "foo",
Value: "bar",
},
},
want: "metadata:foo bar;",
},
{
name: "three meta",
input: Metadatas{
... | explode_data.jsonl/59680 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 397
} | [
2830,
3393,
34673,
27240,
703,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
22427,
6212,
329,
19346,
198,
197,
50780,
220,
914,
198,
197,
59403,
197,
197,
515,
298,
1160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetHostPortConflicts(t *testing.T) {
pods := []*api.Pod{
{Spec: api.PodSpec{Containers: []api.Container{{Ports: []api.ContainerPort{{HostPort: 80}}}}}},
{Spec: api.PodSpec{Containers: []api.Container{{Ports: []api.ContainerPort{{HostPort: 81}}}}}},
{Spec: api.PodSpec{Containers: []api.Container{{Ports: ... | explode_data.jsonl/43324 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 317
} | [
2830,
3393,
1949,
9296,
7084,
15578,
56445,
1155,
353,
8840,
836,
8,
341,
3223,
29697,
1669,
29838,
2068,
88823,
515,
197,
197,
90,
8327,
25,
6330,
88823,
8327,
90,
74632,
25,
3056,
2068,
33672,
2979,
68273,
25,
3056,
2068,
33672,
7084,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUGetFundingHistory(t *testing.T) {
t.Parallel()
_, err := b.UGetFundingHistory(context.Background(), currency.NewPair(currency.BTC, currency.USDT), 1, time.Time{}, time.Time{})
if err != nil {
t.Error(err)
}
_, err = b.UGetFundingHistory(context.Background(), currency.NewPair(currency.LTC, currency.USDT... | explode_data.jsonl/76558 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
52,
1949,
37,
37189,
13424,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
293,
5255,
1949,
37,
37189,
13424,
5378,
19047,
1507,
11413,
7121,
12443,
90475,
1785,
7749,
11,
11413,
67672,
10599,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestReservedVariables(t *testing.T) {
_, err := fixture(t, "invalid/reserved-variables.workflow")
pe := extractParserError(t, err)
assert.Equal(t, "nope", pe.Actions[0].Env["GITHUB_FOO"])
assert.Equal(t, "yup", pe.Actions[0].Env["GITHUB_TOKEN"])
assert.Equal(t, []string{"GITHUB_BAR", "GITHUB_TOKEN"}, pe.Actio... | explode_data.jsonl/55699 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
53003,
22678,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
12507,
1155,
11,
330,
11808,
32426,
2771,
12,
18616,
72774,
1138,
197,
375,
1669,
8649,
6570,
1454,
1155,
11,
1848,
340,
6948,
12808,
1155,
11,
330,
2152,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFunction(t *testing.T) {
for _, tc := range []struct{
input []int
expected int
}{
{
[]int{},
5,
},
{
[]int{},
0,
},
}{
actual := 1
if actual != tc.expected {
t.Errorf("expected %v, got %v", tc.expected, actual)
}
}
} | explode_data.jsonl/47477 | {
"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,
5152,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
515,
197,
22427,
3056,
396,
198,
197,
42400,
526,
198,
197,
59403,
197,
197,
515,
298,
197,
1294,
396,
38837,
298,
197,
20,
345,
197,
197,
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 TestSentenceCase(t *testing.T) {
input := inputInfo{}
output := outputInfo{
Tags: map[string]string{
"Capitalized words": "capitalized words",
"Machine": "machine",
"Rise of the machines": "Rise Of The Machines",
"Chanson d'avant": "C... | explode_data.jsonl/68142 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 539
} | [
2830,
3393,
84564,
4207,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
1946,
1731,
16094,
21170,
1669,
2550,
1731,
515,
197,
10261,
2032,
25,
2415,
14032,
30953,
515,
298,
197,
1,
63593,
1506,
4244,
788,
2290,
330,
65063,
1506,
4244,
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... | 6 |
func TestE2e(t *testing.T) {
// Run tests through the Ginkgo runner with output to console + JUnit for reporting
var r []ginkgo.Reporter
if framework.TestContext.ReportDir != "" {
klog.Infof("Saving reports to %s", framework.TestContext.ReportDir)
// TODO: we should probably only be trying to create this directo... | explode_data.jsonl/76534 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
36,
17,
68,
1155,
353,
8840,
836,
8,
341,
197,
322,
6452,
7032,
1526,
279,
479,
766,
3346,
22259,
448,
2550,
311,
2339,
488,
619,
4562,
369,
12827,
198,
2405,
435,
3056,
70,
766,
3346,
25702,
261,
198,
743,
12626,
8787,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTLS_Opts(t *testing.T) {
type fields struct {
Enabled bool
Cert string
Key string
CA string
}
type want struct {
want []tls.Option
}
type test struct {
name string
fields fields
want want
checkFunc func(want, []tls.Option) error
beforeFunc func()
afterFun... | explode_data.jsonl/49614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 802
} | [
2830,
3393,
45439,
2232,
12754,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
5462,
1807,
198,
197,
6258,
529,
262,
914,
198,
197,
55242,
257,
914,
198,
197,
197,
5049,
414,
914,
198,
197,
532,
13158,
1366,
2036,
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 TestKubectlRender(t *testing.T) {
tests := []struct {
description string
builds []graph.Artifact
input string
expected string
}{
{
description: "normal render",
builds: []graph.Artifact{
{
ImageName: "gcr.io/k8s-skaffold/skaffold",
Tag: "gcr.io/k8s-skaffold/skaff... | explode_data.jsonl/52881 | {
"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,
42,
53380,
6750,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
42407,
914,
198,
197,
69371,
82,
414,
3056,
4439,
50064,
20754,
198,
197,
22427,
981,
914,
198,
197,
42400,
262,
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... | 1 |
func TestRouterGroupMatch(t *testing.T) {
// Create empty handler
h := new(Handler)
// Create empty context
c := new(Context)
c.Params = Params{}
// Create group
g := RouteGroup("/v1")
g.Add("/test/:param", h)
// Matching routes
rs := []string{"/v1/test/test", "/v1/test/:param/"}
// Check
for _, s := ra... | explode_data.jsonl/35810 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
9523,
2808,
8331,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
4287,
7013,
198,
9598,
1669,
501,
7,
3050,
692,
197,
322,
4230,
4287,
2266,
198,
1444,
1669,
501,
14001,
340,
1444,
58268,
284,
34352,
31483,
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... | 3 |
func TestAuthorizeWithLocksForLocalUser(t *testing.T) {
t.Parallel()
ctx := context.Background()
srv, err := NewTestAuthServer(TestAuthServerConfig{
Dir: t.TempDir(),
Clock: clockwork.NewFakeClock(),
})
require.NoError(t, err)
user, _, err := CreateUserAndRole(srv.AuthServer, "test-user", []string{})
req... | explode_data.jsonl/10803 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 641
} | [
2830,
3393,
37483,
2354,
11989,
82,
2461,
7319,
1474,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
2266,
19047,
2822,
1903,
10553,
11,
1848,
1669,
1532,
2271,
5087,
5475,
31159,
5087,
5475,
2648,
515,
197,
197,
618... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSequenceNoOverflow(t *testing.T) {
// Forcefully set the next sequence number to the maximum
backend := InitForTesting(DEBUG)
sequenceNo = ^uint64(0)
log := NewLogger("test")
log.Debug("test")
if MemoryRecordN(backend, 0).ID != 0 {
t.Errorf("Unexpected sequence no: %v", MemoryRecordN(backend, 0).ID)
... | explode_data.jsonl/76183 | {
"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,
14076,
2753,
42124,
1155,
353,
8840,
836,
8,
341,
197,
322,
11732,
3641,
738,
279,
1790,
8500,
1372,
311,
279,
7192,
198,
197,
20942,
1669,
15690,
2461,
16451,
52792,
340,
197,
15512,
2753,
284,
6306,
2496,
21,
19,
7,
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 TestJsonSamples(t *testing.T) {
bidder, buildErr := Builder(openrtb_ext.BidderRTBHouse, config.Adapter{
Endpoint: testsBidderEndpoint})
if buildErr != nil {
t.Fatalf("Builder returned unexpected error %v", buildErr)
}
adapterstest.RunJSONBidderTest(t, testsDir, bidder)
} | explode_data.jsonl/7139 | {
"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,
5014,
39571,
1155,
353,
8840,
836,
8,
341,
2233,
307,
1107,
11,
1936,
7747,
1669,
20626,
30981,
3342,
65,
9927,
1785,
307,
1107,
5350,
33,
28607,
11,
2193,
34190,
515,
197,
197,
27380,
25,
7032,
65452,
1107,
27380,
8824,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_extractFields(t *testing.T) {
r, err := http.NewRequest("GET", "/test?value1=1&value2=2", nil)
assert.NoError(t, err)
f := extractFields(r)
assert.Len(t, f, 2)
assert.Equal(t, "1", f["value1"])
assert.Equal(t, "2", f["value2"])
} | explode_data.jsonl/54951 | {
"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,
39123,
8941,
1155,
353,
8840,
836,
8,
341,
7000,
11,
1848,
1669,
1758,
75274,
445,
3806,
497,
3521,
1944,
30,
957,
16,
28,
16,
5,
957,
17,
28,
17,
497,
2092,
340,
6948,
35699,
1155,
11,
1848,
340,
1166,
1669,
8649,
894... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewSessionWithMissingSoftwareName(t *testing.T) {
if testing.Short() {
t.Skip("skip test in short mode")
}
sess, err := oonimkall.NewSession(&oonimkall.SessionConfig{
StateDir: "../testdata/oonimkall/state",
})
if err == nil || err.Error() != "AssetsDir is empty" {
t.Fatal("not the error we expected... | explode_data.jsonl/78948 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
3564,
5283,
2354,
25080,
19250,
675,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
20599,
1273,
304,
2805,
3856,
1138,
197,
532,
1903,
433,
11,
1848,
1669,
297,
263,
318,
74,
541,
7121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestMulNonCommutativeInt64(t *testing.T) {
f := func(x, y *Int64) bool {
// t.Logf("x = %v, y = %v", x, y)
l := new(Int64).Commutator(x, y)
zero := new(Int64)
return !l.Equals(zero)
}
if err := quick.Check(f, nil); err != nil {
t.Error(err)
}
} | explode_data.jsonl/29662 | {
"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,
59155,
8121,
1092,
6984,
1388,
1072,
21,
19,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
2915,
2075,
11,
379,
353,
1072,
21,
19,
8,
1807,
341,
197,
197,
322,
259,
98954,
445,
87,
284,
1018,
85,
11,
379,
284,
1018,
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... | 1 |
func TestRepoExpander_ExpandPlatform(t *testing.T) {
tests := []struct {
name string
input string
want string
}{
{
name: "github",
input: "g",
want: "github.com",
},
{
name: "default",
input: "",
want: "github.com",
},
{
name: "bitbucket",
input: "bb",
want: "bitbuck... | explode_data.jsonl/22609 | {
"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,
25243,
8033,
8199,
62,
38946,
17296,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
22427,
914,
198,
197,
50780,
220,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
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... | 2 |
func TestGetPendings_NilMsgPayload(t *testing.T) {
t.Parallel()
mc := minimock.NewController(t)
ctx := inslogger.TestContext(t)
meta := payload.Meta{
Polymorph: uint32(payload.TypeMeta),
Payload: nil,
}
handler := handle.NewGetPendings(nil, meta, false)
err := handler.Present(ctx, flow.NewFlowMock(mc))
... | explode_data.jsonl/68630 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
1949,
47,
408,
819,
1604,
321,
6611,
29683,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
97662,
1669,
21187,
1176,
7121,
2051,
1155,
692,
20985,
1669,
1640,
9786,
8787,
1972,
1155,
340,
84004,
1669,
7729,
58806,
515... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestModuleMarkdown_Init(t *testing.T) {
type args struct {
cbs *bfe_module.BfeCallbacks
whs *web_monitor.WebHandlers
cr string
wantErr bool
}
// normal test case
m := NewModuleMarkdown()
case0 := args{
cbs: bfe_module.NewBfeCallbacks(),
whs: web_monitor.NewWebHandlers(),
cr... | explode_data.jsonl/3777 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1074
} | [
2830,
3393,
3332,
68005,
15644,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1444,
1279,
257,
353,
65,
1859,
10750,
1785,
1859,
44461,
198,
197,
197,
1312,
82,
257,
353,
2911,
40112,
6473,
39949,
198,
197,
91492,
414,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewExifEditorEmpty(t *testing.T) {
tests := []bool{false, true}
for _, flag := range tests {
ee, err := NewExifEditorEmpty(flag)
if err != nil {
t.Errorf("Could not create empty exif editor with flag %v got error: %v", flag, err)
}
if ee.dirty != flag {
t.Errorf("Expected dirty to be %v got %v"... | explode_data.jsonl/79877 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
3564,
840,
333,
9410,
3522,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
2641,
90,
3849,
11,
830,
532,
2023,
8358,
5181,
1669,
2088,
7032,
341,
197,
197,
2127,
11,
1848,
1669,
1532,
840,
333,
9410,
3522,
33104,
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... | 5 |
func TestEnqueueAfter(t *testing.T) {
impl := NewImplWithStats(&nopReconciler{}, TestLogger(t), "Testing", &FakeStatsReporter{})
t.Cleanup(func() {
impl.WorkQueue().ShutDown()
})
// Enqueue two items with a long delay.
impl.EnqueueAfter(&Resource{
ObjectMeta: metav1.ObjectMeta{
Name: "for",
Namespa... | explode_data.jsonl/45283 | {
"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,
1702,
4584,
6025,
1155,
353,
8840,
836,
8,
341,
197,
6383,
1669,
1532,
9673,
2354,
16635,
2099,
62813,
693,
40446,
5769,
22655,
3393,
7395,
1155,
701,
330,
16451,
497,
609,
52317,
16635,
52766,
37790,
3244,
727,
60639,
18552,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestState_EachUser(t *testing.T) {
t.Parallel()
st := setupNewState()
st.addUser(users[0])
st.addUser(users[1])
i := 0
st.EachUser(func(u User) bool {
has := false
for _, user := range users {
if user == string(u.Host) {
has = true
break
}
}
if got, exp := has, true; exp != got {
t.... | explode_data.jsonl/32084 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 224
} | [
2830,
3393,
1397,
2089,
610,
1474,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18388,
1669,
6505,
3564,
1397,
741,
18388,
1364,
1474,
35438,
58,
15,
2546,
18388,
1364,
1474,
35438,
58,
16,
2546,
8230,
1669,
220,
15,
198,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestInvokeNOKInvokesNotExt(t *testing.T) {
t.Run("1.2Capability", func(t *testing.T) {
l, v, cleanup := setupLedgerAndValidatorWithV12Capabilities(t)
defer cleanup()
testInvokeNOKInvokesNotExt(t, l, v)
})
t.Run("1.3Capability", func(t *testing.T) {
l, v, cleanup := setupLedgerAndValidatorWithV13Capabi... | explode_data.jsonl/47809 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
17604,
45,
3925,
15174,
7940,
2623,
6756,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
16,
13,
17,
63746,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
8810,
11,
348,
11,
21290,
1669,
6505,
60850,
1389,
3036,
14256,
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 TestParseXML(t *testing.T) {
f, err := os.Open("./examples/xmind/content.xml.ok")
assert.NoError(t, err)
m, err := ParseXML(f)
assert.NoError(t, err)
spew.Dump(m)
} | explode_data.jsonl/30056 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 85
} | [
2830,
3393,
14463,
10609,
1155,
353,
8840,
836,
8,
341,
1166,
11,
1848,
1669,
2643,
12953,
13988,
51668,
10776,
37724,
27917,
9028,
18165,
1138,
6948,
35699,
1155,
11,
1848,
340,
2109,
11,
1848,
1669,
14775,
10609,
955,
340,
6948,
35699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoad(t *testing.T) {
tests := []struct {
name string
composeFile string
expConfig types.Config
expError error
}{
{
name: "invalid YAML",
composeFile: `version: "3"
ignoreme:
foo
bar:`,
expError: errors.NewFriendlyError(
"Failed to parse Compose file (docker-compose.yml)... | explode_data.jsonl/8480 | {
"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,
5879,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
32810,
2900,
1703,
914,
198,
197,
48558,
2648,
256,
4494,
10753,
198,
197,
48558,
1454,
262,
1465,
198,
197,
59403,
197,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_scheduler(t *testing.T) {
g := gomega.NewGomegaWithT(t)
t.Run("should schedule resources as wake and send the report", func(t *testing.T) {
config := &SchedulerConfig{
Report: Report{
SendReport: true,
Hour: 9,
},
Period: Period{
Pattern: officeHours,
},
TimeZone: "Europe... | explode_data.jsonl/14910 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1498
} | [
2830,
3393,
53646,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
692,
3244,
16708,
445,
5445,
9700,
4963,
438,
15156,
323,
3624,
279,
1895,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
25873,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_reconcileBEMemLimit(t *testing.T) {
type args struct {
podMeta *statesinformer.PodMeta
podCurMemLimit int64
containerCurMemLimit map[string]int64
wantPodMemLimit int64
wantContainerMemLimit map[string]int64
}
tests := []struct {
name string
args args
}{
{
nam... | explode_data.jsonl/38232 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1689
} | [
2830,
3393,
1288,
40446,
457,
33,
2716,
336,
16527,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
3223,
347,
12175,
2290,
353,
32069,
258,
34527,
88823,
12175,
198,
197,
3223,
347,
16704,
18816,
16527,
286,
526,
21,
19,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestNewLogsExporter_NilRequiredFields(t *testing.T) {
_, err := NewLogsProcessor(testCfg, exportertest.NewNopLogsExporter(), nil)
assert.Error(t, err)
_, err = NewLogsProcessor(testCfg, nil, newTestLProcessor(nil))
assert.Equal(t, componenterror.ErrNilNextConsumer, err)
} | explode_data.jsonl/4019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
3564,
51053,
88025,
1604,
321,
8164,
8941,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
1532,
51053,
22946,
8623,
42467,
11,
7485,
83386,
7121,
45,
453,
51053,
88025,
1507,
2092,
340,
6948,
6141,
1155,
11,
1848,
692,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEntropy(t *testing.T) {
_, _, pv := crypto.GenerateTestKeyPair()
signer := crypto.NewSigner(pv)
max := int64(500)
vrf := NewVRF(signer)
vrf.SetMax(max)
entropy := make([]bool, max)
for i := int64(0); i < max; i++ {
h := crypto.GenerateTestHash()
index, _ := vrf.Evaluate(h)
assert.LessOrEqual(t,... | explode_data.jsonl/2407 | {
"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,
97582,
1155,
353,
8840,
836,
8,
341,
197,
6878,
8358,
33491,
1669,
19028,
57582,
2271,
1592,
12443,
741,
69054,
261,
1669,
19028,
7121,
7264,
261,
1295,
85,
692,
22543,
1669,
526,
21,
19,
7,
20,
15,
15,
340,
5195,
8052,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFeature_String(t *testing.T) {
cases := []struct {
name string
id FeatureID
expected string
}{
{
name: "node",
id: NodeID(1).FeatureID(),
expected: "node/1",
},
{
name: "way",
id: WayID(3).FeatureID(),
expected: "way/3",
},
{
name: "relat... | explode_data.jsonl/54770 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 337
} | [
2830,
3393,
13859,
31777,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
15710,
981,
19998,
915,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
257,
330,
3509,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTokenizeAlterStatement(t *testing.T) {
parser := NewAlterTableParser()
{
alterStatement := "add column t int"
tokens, _ := parser.tokenizeAlterStatement(alterStatement)
test.S(t).ExpectTrue(reflect.DeepEqual(tokens, []string{"add column t int"}))
}
{
alterStatement := "add column t int, change colu... | explode_data.jsonl/71263 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 644
} | [
2830,
3393,
3323,
551,
74290,
8636,
1155,
353,
8840,
836,
8,
341,
55804,
1669,
1532,
74290,
2556,
6570,
741,
197,
515,
197,
197,
37277,
8636,
1669,
330,
718,
3250,
259,
526,
698,
197,
3244,
9713,
11,
716,
1669,
6729,
96790,
74290,
863... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGroupSnapshotWithNoSelector(t *testing.T) {
name := "test-group-snap-no-selector"
expected := "error: PVC label selectors must be provided"
cmdArgs := []string{"create", "groupsnapshots", name}
testCommon(t, cmdArgs, nil, expected, true)
} | explode_data.jsonl/20428 | {
"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,
2808,
15009,
2354,
2753,
5877,
1155,
353,
8840,
836,
8,
341,
11609,
1669,
330,
1944,
4351,
1331,
6861,
28366,
76127,
698,
42400,
1669,
330,
841,
25,
49866,
2383,
56037,
1969,
387,
3897,
698,
25920,
4117,
1669,
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 TestNoTunnelServerEndpointEds(t *testing.T) {
s := xds.NewFakeDiscoveryServer(t, xds.FakeOptions{})
// Add the test ads clients to list of service instances in order to test the context dependent locality coloring.
addTestClientEndpoints(s.Discovery)
s.Discovery.MemRegistry.AddHTTPService(edsIncSvc, edsIncVi... | explode_data.jsonl/7948 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 550
} | [
2830,
3393,
2753,
51,
40292,
5475,
27380,
2715,
82,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
856,
5356,
7121,
52317,
67400,
5475,
1155,
11,
856,
5356,
991,
726,
3798,
6257,
692,
197,
322,
2691,
279,
1273,
13740,
8239,
311,
1140,
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 TestIsIncludeMultibyte(t *testing.T) {
tests := []struct {
input string
expected bool
}{
{
"apple",
false,
},
{
"umbrella",
false,
},
{
"----",
false,
},
{
"林檎",
true,
},
{
"かさ",
true,
},
{
"○",
true,
},
{
"Goラング",
true,
},
}
for i, ... | explode_data.jsonl/5540 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 276
} | [
2830,
3393,
3872,
22283,
40404,
579,
78361,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
22427,
262,
914,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
515,
298,
197,
1,
22377,
756,
298,
36012,
345,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_sort(t *testing.T) {
input := SortableStrings{
"1",
"a",
"10",
"pony",
"11",
"3",
"went",
"2",
"to",
"4",
"market",
"y10",
"y1",
"y20",
"y2",
"z10x10",
"z10x2",
"z10x4",
"z10x3",
"z10x44",
"z10x33",
"z10x1",
}
output := SortableStrings{
"1",
"2",
"3",
"4... | explode_data.jsonl/40687 | {
"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,
18435,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
15967,
480,
20859,
515,
197,
197,
1,
16,
756,
197,
197,
56693,
756,
197,
197,
1,
16,
15,
756,
197,
197,
1,
618,
88,
756,
197,
197,
1,
16,
16,
756,
197,
197,
1,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestInjectFilePath(t *testing.T) {
var (
resourceFolder = filepath.Join("inject-filepath", "resources")
expectedFolder = filepath.Join("inject-filepath", "expected")
)
t.Run("read from files", func(t *testing.T) {
testCases := []injectFilePath{
{
resource: "nginx",
resourceFile: filepath.J... | explode_data.jsonl/22530 | {
"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,
13738,
19090,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
50346,
13682,
284,
26054,
22363,
445,
32133,
14203,
2343,
497,
330,
12745,
1138,
197,
42400,
13682,
284,
26054,
22363,
445,
32133,
14203,
2343,
497,
330,
7325,
1138,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandleNodeSelector(t *testing.T) {
testKubelet := newTestKubelet(t)
kl := testKubelet.kubelet
kl.nodeLister = testNodeLister{nodes: []api.Node{
{ObjectMeta: api.ObjectMeta{Name: testKubeletHostname, Labels: map[string]string{"key": "B"}}},
}}
kl.nodeInfo = testNodeInfo{nodes: []api.Node{
{ObjectMeta: ... | explode_data.jsonl/43326 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 617
} | [
2830,
3393,
6999,
1955,
5877,
1155,
353,
8840,
836,
8,
341,
18185,
42,
3760,
1149,
1669,
501,
2271,
42,
3760,
1149,
1155,
340,
197,
10561,
1669,
1273,
42,
3760,
1149,
5202,
3760,
1149,
198,
197,
10561,
12097,
852,
261,
284,
1273,
1955... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteSilence(t *testing.T) {
for _, tc := range []struct {
ID string
labelv string
upstream http.Handler
expCode int
expBody []byte
}{
{
// No "namespace" parameter returns an error.
expCode: http.StatusBadRequest,
},
{
// Missing silence ID.
ID: "",
labelv: "de... | explode_data.jsonl/75022 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1234
} | [
2830,
3393,
6435,
27571,
763,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
29580,
981,
914,
198,
197,
29277,
85,
256,
914,
198,
197,
59810,
4027,
1758,
31010,
271,
197,
48558,
2078,
526,
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... | 1 |
func TestFillTxMemoryWithMultiBuffer(t *testing.T) {
const bufferSize = 1500
c := newTestContext(t, 20000, bufferSize, localLinkAddr)
defer c.cleanup()
// Prepare to send a packet.
r := stack.Route{
RemoteLinkAddress: remoteLinkAddr,
}
buf := buffer.NewView(100)
// Each packet is uses up one buffer, so wri... | explode_data.jsonl/4237 | {
"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,
14449,
31584,
10642,
2354,
20358,
4095,
1155,
353,
8840,
836,
8,
341,
4777,
65158,
284,
220,
16,
20,
15,
15,
198,
1444,
1669,
501,
2271,
1972,
1155,
11,
220,
17,
15,
15,
15,
15,
11,
65158,
11,
2205,
3939,
13986,
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... | 5 |
func TestK8sPluginConfig_SetFlags(t *testing.T) {
actual := K8sPluginConfig{}
cmdFlags := actual.GetPFlagSet("")
assert.True(t, cmdFlags.HasFlags())
t.Run("Test_inject-finalizer", func(t *testing.T) {
t.Run("Override", func(t *testing.T) {
testValue := "1"
cmdFlags.Set("inject-finalizer", testValue)
i... | explode_data.jsonl/11287 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2528
} | [
2830,
3393,
42,
23,
82,
11546,
2648,
14812,
9195,
1155,
353,
8840,
836,
8,
341,
88814,
1669,
730,
23,
82,
11546,
2648,
16094,
25920,
9195,
1669,
5042,
2234,
47,
12135,
1649,
31764,
6948,
32443,
1155,
11,
5439,
9195,
16152,
9195,
12367,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewFormatter(t *testing.T) {
var tests = []struct {
verb string
format string
formatter fabenc.Formatter
errorMsg string
}{
{verb: "color", format: "", formatter: fabenc.ColorFormatter{}},
{verb: "color", format: "bold", formatter: fabenc.ColorFormatter{Bold: true}},
{verb: "color", fo... | explode_data.jsonl/10931 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 764
} | [
2830,
3393,
3564,
14183,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
197,
22328,
414,
914,
198,
197,
59416,
262,
914,
198,
197,
197,
32941,
9570,
954,
96291,
198,
197,
18290,
6611,
220,
914,
198,
197,
59403,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDirMethods(t *testing.T) {
d := Dir2{10, 12}
if d.X() != 10 {
t.Fatalf("expected 10 for x, got %v", d.X())
}
if d.Y() != 12 {
t.Fatalf("expected 12 for y, got %v", d.Y())
}
} | explode_data.jsonl/24002 | {
"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,
6184,
17856,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
30094,
17,
90,
16,
15,
11,
220,
16,
17,
532,
743,
294,
4338,
368,
961,
220,
16,
15,
341,
197,
3244,
30762,
445,
7325,
220,
16,
15,
369,
856,
11,
2684,
1018,
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... | 3 |
func TestPutByPattern(t *testing.T) {
mb, _ := mailbox.Create("PATTERN")
accessKey := mailbox.AccessKey{FullAccess: true}
accessKey.Create()
req := api.PutMessageRequest{Pattern: "P*"}
req.Sign(accessKey.Name, accessKey.Secret)
var resp api.PutMessageResponse
code := doRequest(t, req, &resp, "put")
count, err :... | explode_data.jsonl/15713 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 189
} | [
2830,
3393,
19103,
1359,
15760,
1155,
353,
8840,
836,
8,
341,
2109,
65,
11,
716,
1669,
45742,
7251,
445,
47,
34443,
1138,
197,
5211,
1592,
1669,
45742,
35645,
1592,
90,
9432,
6054,
25,
830,
532,
197,
5211,
1592,
7251,
741,
24395,
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... | 4 |
func TestSpanTags(t *testing.T) {
tracer := mocktracer.New()
for code := firstCode; code <= lastCode; code++ {
// Client error
tracer.Reset()
span := tracer.StartSpan("test-trace-client")
err := status.Error(code, "")
SetSpanTags(span, err, true)
span.Finish()
// Assert added tags
rawSpan := tracer.F... | explode_data.jsonl/37854 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 410
} | [
2830,
3393,
12485,
15930,
1155,
353,
8840,
836,
8,
341,
25583,
9584,
1669,
7860,
94941,
7121,
741,
2023,
2038,
1669,
1156,
2078,
26,
2038,
2651,
1537,
2078,
26,
2038,
1027,
341,
197,
197,
322,
8423,
1465,
198,
197,
25583,
9584,
36660,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewMCP23017Driver(t *testing.T) {
var bm interface{} = NewMCP23017Driver(newI2cTestAdaptor())
_, ok := bm.(*MCP23017Driver)
if !ok {
t.Errorf("NewMCP23017Driver() should have returned a *MCP23017Driver")
}
b := NewMCP23017Driver(newI2cTestAdaptor())
gobottest.Refute(t, b.Connection(), nil)
} | explode_data.jsonl/42303 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 128
} | [
2830,
3393,
3564,
44,
7123,
17,
18,
15,
16,
22,
11349,
1155,
353,
8840,
836,
8,
341,
2405,
34868,
3749,
6257,
284,
1532,
44,
7123,
17,
18,
15,
16,
22,
11349,
1755,
40,
17,
66,
2271,
2589,
32657,
2398,
197,
6878,
5394,
1669,
34868,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoteErrorWhileRequestingProducts(t *testing.T) {
// We setup a fake http server that mocks a registration server.
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
http.Error(w, "something bad happened", 500)
}))
defer ts.Close()
var cr Credentials
var ip Insta... | explode_data.jsonl/43078 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 199
} | [
2830,
3393,
24703,
1454,
7983,
1900,
287,
17746,
1155,
353,
8840,
836,
8,
341,
197,
322,
1205,
6505,
264,
12418,
1758,
3538,
429,
68909,
264,
12227,
3538,
624,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogsExporter_WithSpan_ReturnError(t *testing.T) {
set := componenttest.NewNopExporterCreateSettings()
sr := new(tracetest.SpanRecorder)
set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr))
otel.SetTracerProvider(set.TracerProvider)
defer otel.SetTracerProvider(trace.NewNoopTrace... | explode_data.jsonl/59611 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 217
} | [
2830,
3393,
51053,
88025,
62,
2354,
12485,
53316,
1454,
1155,
353,
8840,
836,
8,
341,
8196,
1669,
3692,
1944,
7121,
45,
453,
88025,
4021,
6086,
741,
1903,
81,
1669,
501,
7624,
580,
57824,
85309,
47023,
340,
8196,
8240,
9584,
5179,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHaltChainProcessing(t *testing.T) {
gossipChannel := func(c chan *proto.GossipMessage) <-chan *proto.GossipMessage {
return c
}
makeBlock := func(seq int) []byte {
b := &pcomm.Block{
Header: &pcomm.BlockHeader{
Number: uint64(seq),
},
Data: &pcomm.BlockData{
Data: [][]byte{},
},
M... | explode_data.jsonl/5639 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 719
} | [
2830,
3393,
39,
3145,
18837,
28892,
1155,
353,
8840,
836,
8,
341,
3174,
41473,
9629,
1669,
2915,
1337,
26023,
353,
15110,
1224,
41473,
2052,
8,
9119,
5658,
353,
15110,
1224,
41473,
2052,
341,
197,
853,
272,
198,
197,
532,
77438,
4713,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateExistingVPC(t *testing.T) {
validCases := []struct {
vpc string
subnets []string
}{
{"10.0.0.0/16", []string{"10.0.3.0/24", "10.0.4.0/24"}},
}
invalidCases := []struct {
vpc string
subnets []string
}{
// both subnets conflicts
{"10.0.0.0/16", []string{"10.0.1.0/24", "10.0.2.... | explode_data.jsonl/4377 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 696
} | [
2830,
3393,
17926,
53067,
53,
4872,
1155,
353,
8840,
836,
8,
341,
56322,
37302,
1669,
3056,
1235,
341,
197,
5195,
3992,
257,
914,
198,
197,
28624,
52861,
3056,
917,
198,
197,
59403,
197,
197,
4913,
16,
15,
13,
15,
13,
15,
13,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestCreateDeploymentConfigBadObject(t *testing.T) {
storage := REST{}
channel, err := storage.Create(kapi.NewDefaultContext(), &api.DeploymentList{})
if channel != nil {
t.Errorf("Expected nil, got %v", channel)
}
if strings.Index(err.Error(), "not a deploymentConfig") == -1 {
t.Errorf("Expected 'not a d... | explode_data.jsonl/66984 | {
"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,
4021,
75286,
2648,
17082,
1190,
1155,
353,
8840,
836,
8,
341,
197,
16172,
1669,
25414,
31483,
71550,
11,
1848,
1669,
5819,
7251,
5969,
2068,
7121,
3675,
1972,
1507,
609,
2068,
34848,
39130,
852,
37790,
743,
5496,
961,
2092,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSend(t *testing.T) {
is := is.New(t)
transport := newTestTransport()
defer func() {
transport.Stop()
<-transport.Done()
}()
testConsumer := NewNSQTestConsumer(t, "test_send", "test")
defer testConsumer.Stop()
select {
case transport.Send("test_send") <- []byte("hello vice"):
case <-time.After(1... | explode_data.jsonl/55187 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 287
} | [
2830,
3393,
11505,
1155,
353,
8840,
836,
8,
341,
19907,
1669,
374,
7121,
1155,
692,
197,
26445,
1669,
501,
2271,
27560,
741,
16867,
2915,
368,
341,
197,
197,
26445,
30213,
741,
197,
197,
45342,
26445,
60422,
741,
197,
66816,
18185,
2996... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildFieldSelectorConversions(t *testing.T) {
install := func(scheme *runtime.Scheme) error {
InstallInternalLegacyBuild(scheme)
return nil
}
apitesting.FieldKeyCheck{
SchemeBuilder: []func(*runtime.Scheme) error{install},
Kind: GroupVersion.WithKind("Build"),
// Ensure previously suppor... | explode_data.jsonl/32031 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
11066,
1877,
5877,
1109,
28290,
1155,
353,
8840,
836,
8,
341,
197,
12248,
1669,
2915,
1141,
8058,
353,
22255,
92719,
8,
1465,
341,
197,
197,
24690,
11569,
77415,
11066,
1141,
8058,
340,
197,
853,
2092,
198,
197,
630,
69898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHasDayOfWeek(t *testing.T) {
tests := []struct {
day time.Weekday
exists bool
sched *Schedule
}{
{
day: 0,
exists: false,
sched: &Schedule{
dayOfWeek: map[time.Weekday]bool{
1: true,
},
},
},
{
day: 1,
exists: true,
sched: &Schedule{
dayOfWeek: map[... | explode_data.jsonl/5944 | {
"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,
10281,
10159,
38353,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
98197,
262,
882,
22404,
1225,
1292,
198,
197,
8122,
1671,
1807,
198,
197,
1903,
2397,
220,
353,
32210,
198,
197,
59403,
197,
197,
515,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSentryMiddleware(t *testing.T) {
logger.ConfigureSentry("test", logger.EnvTest)
a := New(Opts{
Address: ":4999",
})
a.Router.HandleFunc("/error", func(w http.ResponseWriter, r *http.Request) {
if hub := sentry.GetHubFromContext(r.Context()); hub != nil {
hub.Scope().SetExtra("errored", "completely"... | explode_data.jsonl/72594 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 264
} | [
2830,
3393,
50,
4085,
24684,
1155,
353,
8840,
836,
8,
341,
17060,
78281,
50,
4085,
445,
1944,
497,
5925,
81214,
2271,
340,
11323,
1669,
1532,
19238,
12754,
515,
197,
98090,
25,
13022,
19,
24,
24,
24,
756,
197,
8824,
11323,
31413,
6362... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultiplicity(t *testing.T) {
Convey("Given a *String that represents the verbose graph traversal", t, func() {
g := NewGraph()
Convey("When 'Multiplicity' is called with a multiplicity", func() {
result := g.Multiplicity(m.Simple)
Convey("Then result should equal 'graph.multiplicity(SIMPLE)'", func(... | explode_data.jsonl/16187 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
93330,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
22043,
264,
353,
703,
429,
10868,
279,
13694,
4771,
56302,
497,
259,
11,
2915,
368,
341,
197,
3174,
1669,
1532,
11212,
741,
197,
93070,
5617,
445,
4498,
364,
93330,
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... | 1 |
func TestMapProxy_TryPutWithNonSerializableValue(t *testing.T) {
_, err := mp.TryPut("test", student{})
AssertErrorNotNil(t, err, "tryPut did not return an error for nonserializable value")
mp.Clear()
} | explode_data.jsonl/57045 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 71
} | [
2830,
3393,
2227,
16219,
1139,
884,
19103,
2354,
8121,
29268,
1130,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
10490,
19824,
19103,
445,
1944,
497,
5458,
37790,
18017,
1454,
96144,
1155,
11,
1848,
11,
330,
1539,
19103,
1521,
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 |
func TestJsonUnmarshalURL(t *testing.T) {
testCases := map[string]struct {
b []byte
want *URL
wantErr string
}{
"empty": {
wantErr: "unexpected end of JSON input",
},
"invalid format": {
b: []byte("%"),
wantErr: "invalid character '%' looking for beginning of value",
},
"relati... | explode_data.jsonl/71955 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 529
} | [
2830,
3393,
5014,
1806,
27121,
3144,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
2233,
981,
3056,
3782,
198,
197,
50780,
262,
353,
3144,
198,
197,
50780,
7747,
914,
198,
197,
59403,
197,
197,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestGetOnly(t *testing.T) {
tt := []struct {
methodType string
expectedStatus string
expectedStatusCode int
}{
{http.MethodGet, "StatusOK", http.StatusOK},
{http.MethodPost, "StatusMethodNotAllowed", http.StatusMethodNotAllowed},
{http.MethodPut, "StatusMethodNotAllowed", http.StatusMetho... | explode_data.jsonl/75699 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 293
} | [
2830,
3393,
1949,
7308,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
3056,
1235,
341,
197,
42257,
929,
260,
914,
198,
197,
42400,
2522,
257,
914,
198,
197,
42400,
15872,
526,
198,
197,
59403,
197,
197,
90,
1254,
20798,
1949,
11,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEscapeTextIOErrors(t *testing.T) {
expectErr := "unwritable"
err := EscapeText(errWriter{}, []byte{'A'})
if err == nil || err.Error() != expectErr {
t.Errorf("have %v, want %v", err, expectErr)
}
} | explode_data.jsonl/48627 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 89
} | [
2830,
3393,
48124,
1178,
3810,
13877,
1155,
353,
8840,
836,
8,
341,
24952,
7747,
1669,
330,
359,
86,
22533,
698,
9859,
1669,
45643,
1178,
3964,
6492,
22655,
3056,
3782,
13608,
32,
81645,
743,
1848,
621,
2092,
1369,
1848,
6141,
368,
961,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequestViaIntermediaryTimeout(t *testing.T) {
r, cfg := setup(t)
s := NewService(cfg)
fr := &IntermediaryFactRequest{
SelfID: "1234567890",
Intermediary: "intermediary",
Expiry: time.Millisecond,
Facts: []Fact{
{
Fact: FactDateOfBirth,
Sources: []string{Source... | explode_data.jsonl/25980 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 434
} | [
2830,
3393,
1900,
54428,
3306,
4404,
658,
7636,
1155,
353,
8840,
836,
8,
341,
7000,
11,
13286,
1669,
6505,
1155,
692,
1903,
1669,
1532,
1860,
28272,
692,
97714,
1669,
609,
3306,
4404,
658,
17417,
1900,
515,
197,
7568,
490,
915,
25,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFilter8(t *testing.T) {
t.Run("Add()", func(t *testing.T) {
t.Run("increments and returns the count for the value", func(t *testing.T) {
f := New8Bit(16, 0.1)
if expected, actual := uint(0), f.Count("hello"); expected != actual {
t.Errorf("Expected count of %d but got %d", expected, actual)
... | explode_data.jsonl/63808 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2656
} | [
2830,
3393,
5632,
23,
1155,
353,
8840,
836,
8,
1476,
3244,
16708,
445,
2212,
50514,
2915,
1155,
353,
8840,
836,
8,
1476,
197,
3244,
16708,
445,
56437,
323,
4675,
279,
1760,
369,
279,
897,
497,
2915,
1155,
353,
8840,
836,
8,
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... | 9 |
func TestArray_PopRights(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
array := garray.NewFrom(g.Slice{1, 2, 3})
t.Assert(array.PopRights(2), g.Slice{2, 3})
t.Assert(array.Len(), 1)
t.Assert(array.PopLefts(2), g.Slice{1})
t.Assert(array.Len(), 0)
})
} | explode_data.jsonl/13896 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
1857,
1088,
453,
81875,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11923,
1669,
342,
1653,
7121,
3830,
3268,
95495,
90,
16,
11,
220,
17,
11,
220,
18,
3518,
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... | 1 |
func TestMetricGroupData_toNumberDataPointEquivalence(t *testing.T) {
type scrape struct {
at int64
value float64
metric string
}
tests := []struct {
name string
labels labels.Labels
scrapes []*scrape
}{
{
name: "counter",
labels: labels.Labels{{Name: "a", Value: "A"}, {Name: "b", Val... | explode_data.jsonl/19398 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 864
} | [
2830,
3393,
54310,
2808,
1043,
2346,
2833,
1043,
2609,
24509,
88790,
1155,
353,
8840,
836,
8,
341,
13158,
57128,
2036,
341,
197,
35447,
257,
526,
21,
19,
198,
197,
16309,
220,
2224,
21,
19,
198,
197,
2109,
16340,
914,
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... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.