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 TestQuickQueueValue(t *testing.T) {
q := NewQuickQueue()
q.Add(15)
q.Add(11)
q.Add(19)
q.Add(12)
q.Add(8)
q.Add(1)
// len
require.Equal(t, 6, q.Len())
// Peek
require.Equal(t, 15, q.Peek())
require.Equal(t, 6, q.Len())
// Contains
require.True(t, q.Contains(19))
require.False(t, q.Contains(10000)... | explode_data.jsonl/42914 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 468
} | [
2830,
3393,
24318,
7554,
1130,
1155,
353,
8840,
836,
8,
341,
18534,
1669,
1532,
24318,
7554,
741,
18534,
1904,
7,
16,
20,
340,
18534,
1904,
7,
16,
16,
340,
18534,
1904,
7,
16,
24,
340,
18534,
1904,
7,
16,
17,
340,
18534,
1904,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSignEEATransaction_Execute(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockKeyManagerClient := qkmmock.NewMockKeyManagerClient(ctrl)
ctx := context.Background()
usecase := NewSignEEATransactionUseCase(mockKeyManagerClient)
signedRaw := utils.StringToHexBytes("0xf8d5018227108252... | explode_data.jsonl/52084 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1114
} | [
2830,
3393,
7264,
7099,
828,
33389,
1311,
83453,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
77333,
1592,
2043,
2959,
1669,
2804,
74,
3821,
1176,
7121,
11571,
1592,
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 TestPanicOnError(t *testing.T) {
// Set the address to an invalid value to induce a panic.
if err := os.Setenv("DB_INSTANCE_PROVIDER_ADDRESS", "invalid"); err != nil {
t.Fatal(err)
}
// This function detects whether the database instantiation panicked or not.
func() {
defer func() {
if r := recover();... | explode_data.jsonl/71935 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
47,
31270,
74945,
1155,
353,
8840,
836,
8,
341,
197,
322,
2573,
279,
2621,
311,
458,
8318,
897,
311,
48753,
264,
21975,
624,
743,
1848,
1669,
2643,
4202,
3160,
445,
3506,
42587,
62542,
20135,
497,
330,
11808,
5038,
1848,
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... | 2 |
func TestMustGetFullPath(ot *testing.T) {
wd := MustGetWd()
udwTest.Equal(MustGetFullPath("/tmp"), "/tmp")
udwTest.Equal(MustGetFullPath("tmp"), filepath.Join(wd, "tmp"))
udwTest.Equal(MustGetFullPath("."), wd)
udwTest.Equal(MustGetFullPath(".."), filepath.Dir(wd))
} | explode_data.jsonl/41480 | {
"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,
31776,
1949,
73220,
7,
354,
353,
8840,
836,
8,
341,
197,
6377,
1669,
15465,
1949,
54,
67,
741,
197,
661,
86,
2271,
12808,
3189,
590,
1949,
73220,
4283,
5173,
3975,
3521,
5173,
1138,
197,
661,
86,
2271,
12808,
3189,
590,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSteps(t *testing.T) {
var (
echo string
mockErr = errors.New("mock error")
)
wfCtx := newWorkflowContextForTest(t)
discover := providers.NewProviders()
discover.Register("test", map[string]providers.Handler{
"ok": func(ctx wfContext.Context, v *value.Value, act types.Action) error {
echo = e... | explode_data.jsonl/29834 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 886
} | [
2830,
3393,
33951,
1155,
353,
8840,
836,
8,
1476,
2405,
2399,
197,
5346,
262,
914,
198,
197,
77333,
7747,
284,
5975,
7121,
445,
16712,
1465,
1138,
197,
692,
6692,
69,
23684,
1669,
501,
62768,
1972,
2461,
2271,
1155,
340,
34597,
3688,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJWX(t *testing.T) {
e := echo.New()
handler := func(c echo.Context) error {
return c.String(http.StatusOK, "test")
}
token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"
validRawKey := []byte("sec... | explode_data.jsonl/55414 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3140
} | [
2830,
3393,
41,
65376,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
1687,
7121,
741,
53326,
1669,
2915,
1337,
1687,
9328,
8,
1465,
341,
197,
853,
272,
6431,
19886,
52989,
11,
330,
1944,
1138,
197,
532,
43947,
1669,
330,
84609,
49039,
38,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFillConfig(t *testing.T) {
c := Config{}
c.Fill()
assert.Equal(t, uint64(0), c.DeploymentID)
assert.Equal(t, defaultDataDir, c.DataDir)
assert.Equal(t, defaultServiceAddress, c.ServiceAddress)
assert.Equal(t, defaultServiceAddress, c.ServiceListenAddress)
assert.Equal(t, defaultRaftAddress, c.RaftAddre... | explode_data.jsonl/50731 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 206
} | [
2830,
3393,
14449,
2648,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
5532,
16094,
1444,
19495,
2822,
6948,
12808,
1155,
11,
2622,
21,
19,
7,
15,
701,
272,
34848,
39130,
915,
340,
6948,
12808,
1155,
11,
1638,
1043,
6184,
11,
272,
3336,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMsgRmPoolCreator_ValidateBasic(t *testing.T) {
tests := []struct {
name string
msg MsgRmPoolCreator
err error
}{
{
name: "invalid address",
msg: MsgRmPoolCreator{
Creator: "invalid_address",
},
err: sdkerrors.ErrInvalidAddress,
}, {
name: "valid address",
msg: MsgRmPoolCreat... | explode_data.jsonl/2716 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 280
} | [
2830,
3393,
6611,
49,
76,
10551,
31865,
62,
17926,
15944,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
21169,
220,
24205,
49,
76,
10551,
31865,
198,
197,
9859,
220,
1465,
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... | 2 |
func TestGetKeyById(t *testing.T) {
kring, _ := ReadKeyRing(readerFromHex(testKeys1And2Hex))
keys := kring.KeysById(0xa34d7e18c20c31bb)
if len(keys) != 1 || keys[0].Entity != kring[0] {
t.Errorf("bad result for 0xa34d7e18c20c31bb: %#v", keys)
}
keys = kring.KeysById(0xfd94408d4543314f)
if len(keys) != 1 || ke... | explode_data.jsonl/2276 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 193
} | [
2830,
3393,
1949,
1592,
2720,
1155,
353,
8840,
836,
8,
341,
197,
9855,
287,
11,
716,
1669,
4457,
1592,
43466,
21987,
3830,
20335,
8623,
8850,
16,
3036,
17,
20335,
4390,
80112,
1669,
595,
12640,
37863,
2720,
7,
15,
9591,
18,
19,
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... | 5 |
func TestParseStandardInformation(t *testing.T) {
input := decodeHex(t, "8d07703c89d7d5018d07703c89d6d5018d07703c89d6d5018d07703c89d6d501200000000000A30005000000010000000070000001100000000010000000000028820f4b05000000")
out, err := mft.ParseStandardInformation(input)
require.Nilf(t, err, "could not parse attribute: ... | explode_data.jsonl/8272 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 497
} | [
2830,
3393,
14463,
19781,
14873,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
16895,
20335,
1155,
11,
330,
23,
67,
15,
22,
22,
15,
18,
66,
23,
24,
67,
22,
67,
20,
15,
16,
23,
67,
15,
22,
22,
15,
18,
66,
23,
24,
67,
21,
67,
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 TestSignedEncryptedMessage(t *testing.T) {
for i, test := range signedEncryptedMessageTests {
expected := "Signed and encrypted message\n"
kring, _ := ReadKeyRing(readerFromHex(test.keyRingHex))
prompt := func(keys []Key, symmetric bool) ([]byte, error) {
if symmetric {
t.Errorf("prompt: message was ... | explode_data.jsonl/2280 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 623
} | [
2830,
3393,
49312,
7408,
14026,
2052,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1273,
1669,
2088,
8499,
7408,
14026,
2052,
18200,
341,
197,
42400,
1669,
330,
49312,
323,
24455,
1943,
1699,
698,
197,
197,
9855,
287,
11,
716,
1669,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestSkipLargeReplicaSnapshot(t *testing.T) {
defer leaktest.AfterTest(t)()
sCtx := TestStoreContext()
sCtx.TestingKnobs.DisableSplitQueue = true
store, _, stopper := createTestStoreWithContext(t, &sCtx)
defer stopper.Stop()
const snapSize = 1 << 20 // 1 MiB
cfg := config.DefaultZoneConfig()
cfg.RangeMaxBy... | explode_data.jsonl/44389 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 435
} | [
2830,
3393,
35134,
34253,
18327,
15317,
15009,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
1903,
23684,
1669,
3393,
6093,
1972,
741,
1903,
23684,
8787,
287,
36253,
5481,
10166,
480,
20193,
7554,
284,
830,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetYamlValuesContentLabels(t *testing.T) {
for _, tt := range []struct {
name string
deploymentLabelCMDFlags DeploymentLabelFlags
expectedResult string
}{{
name: "Knative Eventing",
deploymentLabelCMDFlags: DeploymentLabelFlags{
Key: "test-key",
Value: ... | explode_data.jsonl/69538 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 581
} | [
2830,
3393,
88300,
9467,
6227,
2762,
23674,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
11609,
503,
914,
198,
197,
197,
82213,
2476,
38680,
9195,
66292,
2476,
9195,
198,
197,
42400,
2077,
688,
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... | 1 |
func TestBytea32(t *testing.T) {
const sz = 32
var b [sz]byte
copy(b[:], makeOneBytes(sz))
Bytea32(&b)
err := checkZeroBytes(b[:])
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/62542 | {
"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,
7153,
64,
18,
17,
1155,
353,
8840,
836,
8,
341,
4777,
10038,
284,
220,
18,
17,
198,
2405,
293,
508,
14357,
90184,
198,
49124,
1883,
3447,
1125,
1281,
3966,
7078,
40571,
4390,
197,
7153,
64,
18,
17,
2099,
65,
692,
9859,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQpLineLength(t *testing.T) {
m := NewMessage()
m.SetHeader("From", "from@example.com")
m.SetHeader("To", "to@example.com")
m.SetBody("text/plain",
strings.Repeat("0", 76)+"\r\n"+
strings.Repeat("0", 75)+"à\r\n"+
strings.Repeat("0", 74)+"à\r\n"+
strings.Repeat("0", 73)+"à\r\n"+
strings.Repeat(... | explode_data.jsonl/31586 | {
"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,
48,
79,
2460,
4373,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
2052,
741,
2109,
4202,
4047,
445,
3830,
497,
330,
1499,
35487,
905,
1138,
2109,
4202,
4047,
445,
1249,
497,
330,
983,
35487,
905,
1138,
2109,
4202,
5444,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Hoverfly_GetSimulation_ReturnsBlankSimulation_ifThereIsNoData(t *testing.T) {
RegisterTestingT(t)
unit := NewHoverflyWithConfiguration(&Configuration{})
simulation, err := unit.GetSimulation()
Expect(err).To(BeNil())
Expect(simulation.RequestResponsePairs).To(HaveLen(0))
Expect(simulation.GlobalActio... | explode_data.jsonl/45366 | {
"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,
2039,
1975,
21642,
13614,
64554,
53316,
82,
22770,
64554,
11119,
3862,
3872,
2753,
1043,
1155,
353,
8840,
836,
8,
341,
79096,
16451,
51,
1155,
692,
81189,
1669,
1532,
34379,
21642,
2354,
7688,
2099,
7688,
6257,
692,
1903,
6036... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReceivesInitial(t *testing.T) {
dc := testdataclient.New([]*eskip.Route{{Id: "route1", Path: "/some-path", Backend: "https://www.example.org"}})
tr, err := newTestRouting(dc)
if err != nil {
t.Error(err)
}
defer tr.close()
if _, err := tr.checkGetRequest("https://www.example.com/some-path"); err != n... | explode_data.jsonl/58570 | {
"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,
693,
346,
1886,
6341,
1155,
353,
8840,
836,
8,
341,
87249,
1669,
1273,
691,
2972,
7121,
85288,
288,
13389,
58004,
2979,
764,
25,
330,
8966,
16,
497,
7933,
25,
3521,
14689,
33095,
497,
55260,
25,
330,
2428,
1110,
2136,
7724... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceCreateFileError(t *testing.T) {
_, _, _, err := fakeServiceCreate([]string{
"service", "create", "foo", "--filename", "filepath"}, false)
assert.Assert(t, util.ContainsAll(err.Error(), "no", "such", "file", "directory", "filepath"))
} | explode_data.jsonl/42462 | {
"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,
1860,
4021,
1703,
1454,
1155,
353,
8840,
836,
8,
341,
197,
6878,
8358,
8358,
1848,
1669,
12418,
1860,
4021,
10556,
917,
515,
197,
197,
1,
7936,
497,
330,
3182,
497,
330,
7975,
497,
14482,
8404,
497,
330,
44157,
14345,
895,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_postorderTraversal1(t *testing.T) {
ast := assert.New(t)
for _, tc := range tcs {
fmt.Printf("~~%v~~\n", tc)
root := PreIn2Tree(tc.pre, tc.in)
ast.Equal(tc.post, postorderTraversal1(root), "输入:%v", tc)
}
} | explode_data.jsonl/28336 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
6333,
1358,
76276,
16,
1155,
353,
8840,
836,
8,
341,
88836,
1669,
2060,
7121,
1155,
692,
2023,
8358,
17130,
1669,
2088,
259,
4837,
341,
197,
11009,
19367,
445,
5817,
4,
85,
5817,
59,
77,
497,
17130,
692,
197,
33698,
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 TestMultiplePatchesNoConflict(t *testing.T) {
th := makeTestHarness(t)
makeCommonFileForMultiplePatchTest(th)
th.WriteF("/app/overlay/staging/deployment-patch1.yaml", `
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: nginx
spec:
template:
spec:
containers:
- name: nginx
ima... | explode_data.jsonl/51161 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1347
} | [
2830,
3393,
32089,
47,
9118,
2753,
57974,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
1281,
2271,
74248,
1155,
340,
77438,
10839,
1703,
2461,
32089,
43622,
2271,
24365,
340,
70479,
4073,
37,
4283,
676,
14,
21118,
14272,
4118,
22549,
52799,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSpanFinishWithErrorNoDebugStack(t *testing.T) {
assert := assert.New(t)
err := errors.New("test error")
span := newBasicSpan("web.request")
span.Finish(WithError(err), NoDebugStack())
assert.Equal(int32(1), span.Error)
assert.Equal("test error", span.Meta[ext.ErrorMsg])
assert.Equal("*errors.errorStri... | explode_data.jsonl/42841 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 141
} | [
2830,
3393,
12485,
25664,
66102,
2753,
7939,
4336,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
9859,
1669,
5975,
7121,
445,
1944,
1465,
1138,
197,
1480,
1669,
501,
15944,
12485,
445,
2911,
8223,
1138,
197,
1480,
991... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEventDataPath(t *testing.T) {
Convey("Given a city of New York and a year of 2018", t, func() {
city := "New York"
year := "2018"
testContentPath := EventDataPath(GetWebdir(), city, year)
Convey("The response should be "+GetWebdir()+"/data/events/2018-new-york.yml", func() {
So(testContentPath, ... | explode_data.jsonl/50761 | {
"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,
65874,
1820,
1155,
353,
8840,
836,
8,
1476,
93070,
5617,
445,
22043,
264,
3283,
315,
1532,
4261,
323,
264,
1042,
315,
220,
17,
15,
16,
23,
497,
259,
11,
2915,
368,
341,
197,
1444,
487,
1669,
330,
3564,
4261,
698,
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 TestUserService_DeleteUser(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
apiName := "deleteUser"
response, err := ReadData(apiName, "UserService")
if err != nil {
t.Errorf("Failed to read response data due to: %v", err)
}
fmt.F... | explode_data.jsonl/60347 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 277
} | [
2830,
3393,
60004,
57418,
1474,
1155,
353,
8840,
836,
8,
341,
41057,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
38356,
1758,
37508,
11,
1681,
353,
1254,
9659,
8,
341,
197,
54299,
675,
1669,
330,
4542,
1474,
698,
197,
21735,
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 TestParseTokenRequestFull(t *testing.T) {
r := newRequestWithAuth("foo", "bar", map[string]string{
"grant_type": PasswordGrantType,
"scope": "foo bar",
"username": "baz",
"password": "qux",
"refresh_token": "bla",
"redirect_uri": "http://example.com",
"code": "blaa",
... | explode_data.jsonl/1723 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 341
} | [
2830,
3393,
14463,
3323,
1900,
9432,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
501,
1900,
2354,
5087,
445,
7975,
497,
330,
2257,
497,
2415,
14032,
30953,
515,
197,
197,
1,
51627,
1819,
788,
262,
12362,
67971,
929,
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,
1... | 1 |
func TestNoOpCmd(t *testing.T) {
is := is.New(t)
executedCommand := make(chan []string, 1)
output := "testoutput"
out, err := cmd.Execute([]string{"echo", "hello world"}, NoOp(executedCommand, output))
is.Equal(output+"\n", out) // output of command should be expected plus newline
is.NoErr(err) // ... | explode_data.jsonl/81460 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 260
} | [
2830,
3393,
2753,
7125,
15613,
1155,
353,
8840,
836,
8,
341,
19907,
1669,
374,
7121,
1155,
692,
67328,
2774,
4062,
1669,
1281,
35190,
3056,
917,
11,
220,
16,
340,
21170,
1669,
330,
1944,
3006,
1837,
13967,
11,
1848,
1669,
5439,
13827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckFirstPayload(t *testing.T) {
dumpPackets, err := utils.ReadDumpFile("../../godpi_example/dumps/http.cap")
if err != nil {
t.Fatal(err)
}
flow := types.NewFlow()
for packet := range dumpPackets {
packetCopy := packet
flow.AddPacket(packetCopy)
}
called := false
noDetections := checkFirstPayl... | explode_data.jsonl/61052 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 338
} | [
2830,
3393,
3973,
5338,
29683,
1155,
353,
8840,
836,
8,
341,
2698,
1510,
47,
18382,
11,
1848,
1669,
12439,
6503,
51056,
1703,
36800,
39711,
2493,
39304,
3446,
11793,
15627,
27388,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSidecarsNoCPULimits(t *testing.T) {
testConfig := Config{
ConfigReloaderImage: "jimmidyson/configmap-reload:latest",
ConfigReloaderCPU: "0",
ConfigReloaderMemory: "25Mi",
AlertmanagerDefaultBaseImage: "quay.io/prometheus/alertmanager",
}
sset, err := makeStatefulSet(&moni... | explode_data.jsonl/37689 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 328
} | [
2830,
3393,
16384,
50708,
2753,
7123,
1094,
22866,
1155,
353,
8840,
836,
8,
341,
18185,
2648,
1669,
5532,
515,
197,
66156,
6740,
39966,
1906,
25,
688,
330,
73,
12543,
42586,
930,
14730,
2186,
5504,
1078,
25,
19350,
756,
197,
66156,
6740... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateCleanDefault(t *testing.T) {
config := createValidTestConfig()
clientBuilder := NewDefaultClientConfig(*config, &ConfigOverrides{})
clientConfig, err := clientBuilder.ClientConfig()
if err != nil {
t.Fatalf("Unexpected error: %v", err)
}
matchStringArg(config.Clusters["clean"].Server, clientCon... | explode_data.jsonl/56166 | {
"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,
4021,
27529,
3675,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
1855,
4088,
2271,
2648,
741,
25291,
3297,
1669,
1532,
3675,
2959,
2648,
4071,
1676,
11,
609,
2648,
80010,
6257,
692,
25291,
2648,
11,
1848,
1669,
2943,
3297,
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 TestAdminAuthMiddleware(t *testing.T) {
WithServer(t, `
admin:
auth:
bearer:
- 'my-api-key'
`, func(deps *ServerDependencies) {}, func(deps *ServerDependencies, baseURL string) {
assert.Equal(t, `Bearer my-api-key`, AdminAuthHeaders(t, deps)["Authorization"])
// Pass
res := DoHTTPRequestWithHeaders(... | explode_data.jsonl/70689 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 514
} | [
2830,
3393,
7210,
5087,
24684,
1155,
353,
8840,
836,
8,
341,
197,
2354,
5475,
1155,
11,
22074,
2882,
510,
78011,
510,
197,
2233,
20786,
510,
298,
197,
12,
364,
2408,
23904,
16173,
1248,
197,
7808,
2915,
12797,
1690,
353,
5475,
48303,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHeadRequest(t *testing.T) {
setupServer()
defer teardownServer()
wantHeader := "foo"
mux.HandleFunc("/url", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("X-Foo", wantHeader)
})
req := URL("http://example.com/url")
if err := req.Head(); err != nil {
t.Error(err)
}
assertTextua... | explode_data.jsonl/24751 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 214
} | [
2830,
3393,
12346,
1900,
1155,
353,
8840,
836,
8,
341,
84571,
5475,
741,
16867,
49304,
5475,
2822,
50780,
4047,
1669,
330,
7975,
1837,
2109,
2200,
63623,
4283,
1085,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
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,
1,
1... | 1 |
func TestKraken_LimitSell(t *testing.T) {
ord, err := k.LimitSell("0.01", "6900", goex.BTC_USD)
assert.Nil(t, err)
t.Log(ord)
} | explode_data.jsonl/44492 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 65
} | [
2830,
3393,
81165,
3366,
2351,
2353,
68533,
1155,
353,
8840,
836,
8,
341,
197,
539,
11,
1848,
1669,
595,
1214,
2353,
68533,
445,
15,
13,
15,
16,
497,
330,
21,
24,
15,
15,
497,
728,
327,
1785,
7749,
13467,
35,
340,
6948,
59678,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreate(t *testing.T) {
storage, server := newStorage(t)
defer server.Terminate(t)
defer storage.Job.Store.DestroyFunc()
test := genericregistrytest.New(t, storage.Job.Store)
validJob := validNewJob()
validJob.ObjectMeta = metav1.ObjectMeta{}
test.TestCreate(
// valid
validJob,
// invalid (empty se... | explode_data.jsonl/53316 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 207
} | [
2830,
3393,
4021,
1155,
353,
8840,
836,
8,
341,
197,
16172,
11,
3538,
1669,
501,
5793,
1155,
340,
16867,
3538,
836,
261,
34016,
1155,
340,
16867,
5819,
45293,
38047,
57011,
9626,
741,
18185,
1669,
13954,
29172,
1944,
7121,
1155,
11,
581... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHTTPSListener(t *testing.T) {
listener, err := NewHTTPSListener("./httpcert/cert.pem", "./httpcert/key.pem", ":12341")
if err != nil {
t.Fatalf("NewHTTPSListener error: %s\n", err)
}
srv := &TestHTTPServer{}
httpSrv := &http.Server{Handler: srv}
var httpsErr error
go func() {
httpsErr = httpSrv.Se... | explode_data.jsonl/22526 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 351
} | [
2830,
3393,
82354,
2743,
1155,
353,
8840,
836,
8,
341,
14440,
798,
11,
1848,
1669,
1532,
82354,
2743,
13988,
1254,
12246,
2899,
529,
49373,
497,
5924,
1254,
12246,
68864,
49373,
497,
13022,
16,
17,
18,
19,
16,
1138,
743,
1848,
961,
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 TestCustomerListError(t *testing.T) {
key := "api key"
mockErrorResponse := new(APIError)
mockErrorResponse.Type = "invalid_request"
mockErrorResponse.Message = "You do not have permission to do that"
mockCustomerNumber := "CUST-33442"
server, err := invdmockserver.New(403, mockErrorResponse, "json", true... | explode_data.jsonl/15007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 238
} | [
2830,
3393,
12792,
852,
1454,
1155,
353,
8840,
836,
8,
341,
23634,
1669,
330,
2068,
1376,
1837,
77333,
55901,
1669,
501,
48953,
1454,
340,
77333,
55901,
10184,
284,
330,
11808,
7893,
698,
77333,
55901,
8472,
284,
330,
2610,
653,
537,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCACommon_GenerateECCCertificateRequest_Fail(t *testing.T) {
_, errCA = CAGenerateECCCertificateRequest(&CertRequest{
PrivateKeyData: priData,
CertificateRequestFilePath: filepath.Join(pathcarsapksc1512, caCertificateRequestFileName),
SignatureAlgorithm: x509.SHA256WithRSAPSS,
Subje... | explode_data.jsonl/24083 | {
"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,
5049,
10839,
2646,
13220,
36,
3706,
33202,
1900,
1400,
604,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
5049,
284,
356,
1890,
13220,
36,
3706,
33202,
1900,
2099,
36934,
1900,
515,
197,
197,
75981,
1043,
25,
1797,
12493,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Web_EarlyWrite(t *testing.T) {
Convey("Write early content to response", t, func() {
result := ""
m := New()
m.Use(func(res http.ResponseWriter) {
result += "foobar"
res.Write([]byte("Hello world"))
})
m.Use(func() {
result += "bat"
})
m.Get("/", func() {})
m.Action(func(res http.Res... | explode_data.jsonl/44978 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 263
} | [
2830,
3393,
62,
5981,
2089,
277,
398,
7985,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
7985,
4124,
2213,
311,
2033,
497,
259,
11,
2915,
368,
341,
197,
9559,
1669,
8389,
197,
2109,
1669,
1532,
741,
197,
2109,
9046,
18552,
4590,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStepVerifyRequirements(t *testing.T) {
t.Parallel()
tempDir, err := ioutil.TempDir("", "test-step-verify-requirements")
require.NoError(t, err)
testData := path.Join("test_data", "verify_requirements", "boot-config")
_, err = os.Stat(testData)
require.NoError(t, err)
err = util.CopyDir(testData, temp... | explode_data.jsonl/39205 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 460
} | [
2830,
3393,
8304,
32627,
59202,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
16280,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
1944,
29208,
12,
12446,
12,
70126,
1138,
17957,
35699,
1155,
11,
1848,
692,
18185,
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... | 2 |
func TestSelectableFieldLabelConversions(t *testing.T) {
apitesting.TestSelectableFieldLabelConversionsOfKind(t,
registered.GroupOrDie(api.GroupName).GroupVersion.String(),
"ServiceAccount",
SelectableFields(&api.ServiceAccount{}),
nil,
)
} | explode_data.jsonl/24904 | {
"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,
68707,
1877,
2476,
1109,
28290,
1155,
353,
8840,
836,
8,
341,
69898,
275,
59855,
8787,
68707,
1877,
2476,
1109,
28290,
2124,
10629,
1155,
345,
197,
29422,
291,
5407,
2195,
18175,
24827,
5407,
675,
568,
2808,
5637,
6431,
3148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetSetClearMapFields_KeyTypes(t *testing.T) {
fd, err := desc.LoadFileDescriptor("desc_test_field_types.proto")
testutil.Ok(t, err)
md := fd.FindSymbol("testprotos.MapKeyFields").(*desc.MessageDescriptor)
dm := NewMessage(md)
inputs := map[reflect.Kind]interface{}{
reflect.Bool: true,
reflect.Int32... | explode_data.jsonl/40954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2146
} | [
2830,
3393,
1949,
1649,
14008,
2227,
8941,
35253,
4173,
1155,
353,
8840,
836,
8,
341,
61721,
11,
1848,
1669,
6560,
13969,
1703,
11709,
445,
8614,
4452,
5013,
9763,
57322,
1138,
18185,
1314,
54282,
1155,
11,
1848,
340,
84374,
1669,
12414,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshalClientDisconnect(t *testing.T) {
tt := []struct {
packet mc.Packet
unmarshalledPacket mc.ClientBoundDisconnect
}{
{
packet: mc.Packet{
ID: 0x00,
Data: []byte{0x00},
},
unmarshalledPacket: mc.ClientBoundDisconnect{
Reason: mc.Chat(""),
},
},
{
packet... | explode_data.jsonl/45011 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 424
} | [
2830,
3393,
1806,
27121,
2959,
60651,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
3056,
1235,
341,
197,
68802,
1797,
19223,
93971,
198,
197,
20479,
36239,
4736,
16679,
19223,
11716,
19568,
60651,
198,
197,
59403,
197,
197,
515,
298,
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... | 4 |
func TestGlob(t *testing.T) {
t.Run("tmp/*", func(t *testing.T) {
chk := assert.New(t)
tmp := filepath.Join(os.TempDir(), "*")
hits, err := fscopy.Glob(tmp)
chk.NoError(err)
chk.NotEqual(0, len(hits))
})
t.Run("tmp/*, tmp/?* dedupes", func(t *testing.T) {
chk := assert.New(t)
a := filepath.Join(os.Temp... | explode_data.jsonl/64341 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 362
} | [
2830,
3393,
38,
1684,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5173,
1057,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
23049,
74,
1669,
2060,
7121,
1155,
340,
197,
20082,
1669,
26054,
22363,
9638,
65009,
6184,
1507,
15630,
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 TestServiceManagerOverridesStepError(t *testing.T) {
tests := map[string]struct {
givenReqParams internal.ProvisioningParameters
expErr string
}{
"return error when creds in request are not provided and overrides should not be applied": {
givenReqParams: internal.ProvisioningParameters{},
exp... | explode_data.jsonl/12553 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 530
} | [
2830,
3393,
1860,
2043,
80010,
8304,
1454,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
3174,
2071,
27234,
4870,
5306,
7763,
13013,
287,
9706,
198,
197,
48558,
7747,
260,
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 |
func TestTransportRejectsConnHeaders(t *testing.T) {
st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
var got []string
for k := range r.Header {
got = append(got, k)
}
sort.Strings(got)
w.Header().Set("Got-Header", strings.Join(got, ","))
}, optOnlyServer)
defer st.Close()
tr :=... | explode_data.jsonl/16116 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1140
} | [
2830,
3393,
27560,
78413,
82,
9701,
10574,
1155,
353,
8840,
836,
8,
341,
18388,
1669,
501,
5475,
58699,
1155,
11,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
2405,
2684,
3056,
917,
198,
197,
2023,
595,
1669,
2088,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccMinioIAMGroupPolicy_namePrefix(t *testing.T) {
var groupPolicy2 string
namePrefix := "tf-acc-test-"
rInt := acctest.RandInt()
resourceName := "minio_iam_group_policy.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProviderFactories: testAccProvid... | explode_data.jsonl/7180 | {
"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,
14603,
6217,
815,
73707,
2808,
13825,
1269,
14335,
1155,
353,
8840,
836,
8,
341,
2405,
1874,
13825,
17,
914,
198,
11609,
14335,
1669,
330,
8935,
12,
4475,
16839,
12,
698,
7000,
1072,
1669,
1613,
67880,
2013,
437,
1072,
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 |
func TestArm64Compiler_indirectCallWithTargetOnCallingConvReg(t *testing.T) {
env := newCompilerEnvironment()
table := make([]wasm.Reference, 1)
env.addTable(&wasm.TableInstance{References: table})
// Ensure that the module instance has the type information for targetOperation.TypeIndex,
// and the typeID matches... | explode_data.jsonl/79909 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 707
} | [
2830,
3393,
32913,
21,
19,
38406,
9122,
1226,
7220,
2354,
6397,
1925,
48853,
34892,
3477,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
501,
38406,
12723,
741,
26481,
1669,
1281,
10556,
86,
10530,
58416,
11,
220,
16,
340,
57538,
1364,
2556... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSwitchDefFirst(t *testing.T) {
const SCRIPT = `
function F(x) {
var i = 0;
switch (x) {
default:
i++;
case 0:
i++;
case 1:
i++;
case 2:
i++;
break;
case 3:
i++;
}
return i;
}
F(0) + F(1) + F(2) + F(4);
`
testScript1(SCRIPT, intToValue(10), t)
} | explode_data.jsonl/75295 | {
"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,
16837,
2620,
5338,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
7527,
434,
2075,
8,
341,
197,
2405,
600,
284,
220,
15,
280,
197,
8961,
320,
87,
8,
341,
197,
11940,
510,
298,
8230,
3507,
197,
2722,
220,
15,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMapSparseIterOrder(t *testing.T) {
// Run several rounds to increase the probability
// of failure. One is not enough.
NextRound:
for round := 0; round < 10; round++ {
m := make(map[int]bool)
// Add 1000 items, remove 980.
for i := 0; i < 1000; i++ {
m[i] = true
}
for i := 20; i < 1000; i++ {
... | explode_data.jsonl/19920 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 316
} | [
2830,
3393,
2227,
98491,
8537,
4431,
1155,
353,
8840,
836,
8,
341,
197,
322,
6452,
3807,
19531,
311,
5263,
279,
18927,
198,
197,
322,
315,
7901,
13,
3776,
374,
537,
3322,
624,
5847,
27497,
510,
2023,
4778,
1669,
220,
15,
26,
4778,
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... | 8 |
func TestDaoExpireReplyZSetRds(t *testing.T) {
convey.Convey("ExpireReplyZSetRds", t, func(ctx convey.C) {
var (
name = ""
oid = int64(0)
tp = int(0)
)
ctx.Convey("When everything goes positive", func(ctx convey.C) {
ok, err := d.ExpireReplyZSetRds(context.Background(), name, oid, tp)
ctx.Conve... | explode_data.jsonl/21790 | {
"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,
12197,
8033,
554,
20841,
57,
1649,
49,
5356,
1155,
353,
8840,
836,
8,
341,
37203,
5617,
4801,
5617,
445,
8033,
554,
20841,
57,
1649,
49,
5356,
497,
259,
11,
2915,
7502,
20001,
727,
8,
341,
197,
2405,
2399,
298,
11609,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetSymbolsDetails(t *testing.T) {
t.Parallel()
_, err := b.GetSymbolsDetails()
if err != nil {
t.Error("BitfinexGetSymbolsDetails init error: ", err)
}
} | explode_data.jsonl/79935 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 69
} | [
2830,
3393,
1949,
56213,
7799,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
6878,
1848,
1669,
293,
2234,
56213,
7799,
741,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
445,
8344,
5472,
327,
1949,
56213,
7799,
2930,
1465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestOperationADC(t *testing.T) {
cpu := testCPU
cpu.Reset()
cpu.a = byte(0x2)
cpu.addressAbs = Word(0x0100)
cpu.bus.CPUWrite(cpu.addressAbs, byte(0x3))
ADC(cpu)
assertFalse(t, cpu.StatusRegister(C))
assertEqualsB(t, byte(0x5), cpu.a)
} | explode_data.jsonl/73051 | {
"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,
8432,
31956,
1155,
353,
8840,
836,
8,
1476,
80335,
1669,
1273,
31615,
198,
80335,
36660,
2822,
80335,
5849,
284,
4922,
7,
15,
87,
17,
340,
80335,
13792,
27778,
284,
9322,
7,
15,
87,
15,
16,
15,
15,
340,
80335,
48067,
727... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOperator_RequiresGrad(t *testing.T) {
t.Run("with generics - float32", testOperatorRequiresGrad[float32])
t.Run("with generics - float64", testOperatorRequiresGrad[float64])
} | explode_data.jsonl/49577 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 61
} | [
2830,
3393,
18461,
62,
46961,
23999,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
4197,
95545,
481,
2224,
18,
17,
497,
1273,
18461,
46961,
23999,
95381,
18,
17,
2546,
3244,
16708,
445,
4197,
95545,
481,
2224,
21,
19,
497,
1273,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRoute_GetTTLSeconds(t *testing.T) {
route := Route{}
ttlSeconds := 120
route.ttlSeconds = &ttlSeconds
assert.Equal(t, 120, *route.GetTTLSeconds())
} | explode_data.jsonl/67794 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 68
} | [
2830,
3393,
4899,
13614,
51,
13470,
15343,
1155,
353,
8840,
836,
8,
341,
7000,
2133,
1669,
9572,
16094,
3244,
11544,
15343,
1669,
220,
16,
17,
15,
198,
7000,
2133,
734,
11544,
15343,
284,
609,
62858,
15343,
271,
6948,
12808,
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 |
func TestAddBeforeRunning(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
cron := New()
cron.AddFunc("* * * * * ?", func() { wg.Done() })
cron.Start()
defer cron.Stop()
// Give cron 2 seconds to run our job (which is always activated).
select {
case <-time.After(ONE_SECOND):
t.FailNow()
case <-wait(wg):... | explode_data.jsonl/10554 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
2212,
10227,
18990,
1155,
353,
8840,
836,
8,
341,
72079,
1669,
609,
12996,
28384,
2808,
16094,
72079,
1904,
7,
16,
692,
1444,
2248,
1669,
1532,
741,
1444,
2248,
1904,
9626,
29592,
353,
353,
353,
353,
42313,
2915,
368,
314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_FullLoggerNameGenerator_withString(t *testing.T) {
givenString := "123"
assert.ToBeEqual(t, givenString, FullLoggerNameGenerator(givenString))
assert.ToBeEqual(t, givenString, FullLoggerNameGenerator(&givenString))
} | explode_data.jsonl/57922 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
1400,
617,
7395,
675,
12561,
6615,
703,
1155,
353,
8840,
836,
8,
341,
3174,
2071,
703,
1669,
330,
16,
17,
18,
698,
6948,
3274,
3430,
2993,
1155,
11,
2661,
703,
11,
8627,
7395,
675,
12561,
3268,
2071,
703,
1171,
6948,
327... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkDoneProgressCreateParams(t *testing.T) {
t.Parallel()
const (
wantToken = int32(1569)
invalidToken = int32(1348)
)
var (
wantString = `{"token":"` + strconv.FormatInt(int64(wantToken), 10) + `"}`
wantInvalidString = `{"token":"` + strconv.FormatInt(int64(invalidToken), 10) + `"}`
w... | explode_data.jsonl/16162 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1835
} | [
2830,
3393,
6776,
17453,
9496,
4021,
4870,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
4777,
2399,
197,
50780,
3323,
262,
284,
526,
18,
17,
7,
16,
20,
21,
24,
340,
197,
197,
11808,
3323,
284,
526,
18,
17,
7,
16,
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,
1... | 3 |
func TestMakeReceiveAdapterNoNet(t *testing.T) {
src := &v1alpha1.KafkaSource{
ObjectMeta: metav1.ObjectMeta{
Name: "source-name",
Namespace: "source-namespace",
},
Spec: v1alpha1.KafkaSourceSpec{
ServiceAccountName: "source-svc-acct",
Topics: "topic1,topic2",
BootstrapServers: ... | explode_data.jsonl/46149 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2918
} | [
2830,
3393,
8078,
14742,
5940,
2753,
6954,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
609,
85,
16,
7141,
16,
11352,
21883,
3608,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
414,
330,
2427,
11494,
756,
298,
90823... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProcessLine(t *testing.T) {
curX := new(int)
curY := new(int)
for i, c := range processLineCases {
*curX, *curY = lookupKey(c.pad, c.startKey)
got := processLine(c.pad, curX, curY, c.line)
if got != c.want {
t.Fatalf("Case %d: Wanted %v, got %v", i+1, string(c.want), string(got))
}
}
} | explode_data.jsonl/42990 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
7423,
2460,
1155,
353,
8840,
836,
8,
341,
33209,
55,
1669,
501,
1548,
340,
33209,
56,
1669,
501,
1548,
340,
2023,
600,
11,
272,
1669,
2088,
1882,
2460,
37302,
341,
197,
197,
9,
2352,
55,
11,
353,
2352,
56,
284,
18615,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateReal(t *testing.T) {
s := beginTxWithFixtures()
defer s.AutoRollback()
var id int64
// Insert a George
err := s.InsertInto("people").Columns("name", "email").
Values("George", "george@whitehouse.gov").
Returning("id").
QueryScalar(&id)
assert.NoError(t, err)
// Rename our George to Barack
... | explode_data.jsonl/80346 | {
"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,
4289,
12768,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
3161,
31584,
2354,
25958,
18513,
741,
16867,
274,
6477,
32355,
1419,
2822,
2405,
877,
526,
21,
19,
198,
197,
322,
17101,
264,
9857,
198,
9859,
1669,
274,
23142,
26591,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test64BitReturnStdCall(t *testing.T) {
const (
VER_BUILDNUMBER = 0x0000004
VER_MAJORVERSION = 0x0000002
VER_MINORVERSION = 0x0000001
VER_PLATFORMID = 0x0000008
VER_PRODUCT_TYPE = 0x0000080
VER_SERVICEPACKMAJOR = 0x0000020
VER_SERVICEPACKMINOR = 0x0000010
VER_SUITENAME ... | explode_data.jsonl/54655 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 819
} | [
2830,
3393,
21,
19,
8344,
5598,
22748,
7220,
1155,
353,
8840,
836,
8,
1476,
4777,
2399,
197,
197,
3763,
37491,
51639,
414,
284,
220,
15,
87,
15,
15,
15,
15,
15,
15,
19,
198,
197,
197,
3763,
52045,
17636,
257,
284,
220,
15,
87,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNonMoveHelpers(t *testing.T) {
DEBUGAPPLYMOVE = false
DEBUGCIRCUIT = false
vec1 := [2]float64{1.0, 1.0}
vec2 := [2]float64{0.5, 0.5}
vec3 := [2]float64{3.4, 1.8}
vec4 := [2]float64{0.0, 0.7777}
vec5 := [2]float64{0.0, 1.0}
s1 := [][2]float64{vec1, vec2}
s2 := [][2]float64{vec3, vec4}
s3 := [][2]flo... | explode_data.jsonl/46080 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 316
} | [
2830,
3393,
8121,
9860,
28430,
1155,
353,
8840,
836,
8,
1476,
52346,
2537,
24834,
29116,
284,
895,
198,
52346,
34,
2801,
16799,
952,
284,
895,
198,
40213,
16,
1669,
508,
17,
60,
3649,
21,
19,
90,
16,
13,
15,
11,
220,
16,
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... | 1 |
func TestRowTableAddGeometryNoStyle(t *testing.T) {
map_dao := &TableRowAddGeomImpl{&DaoImpl{}, "polygon", false, false, false}
service := service.MakeTableRowService(map_dao)
uri_params := map[string]string{"table_id": "42"}
values := url.Values{}
values.Set("with_geometry", "1")
values.Set("geometry", "SRID=432... | explode_data.jsonl/15449 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 381
} | [
2830,
3393,
3102,
2556,
2212,
20787,
2753,
2323,
1155,
353,
8840,
836,
8,
341,
19567,
814,
3441,
1669,
609,
38558,
2212,
78708,
9673,
90,
5,
12197,
9673,
22655,
330,
65012,
497,
895,
11,
895,
11,
895,
532,
52934,
1669,
2473,
50133,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPiecewiseCubicFitWithDerivatives(t *testing.T) {
t.Parallel()
xs := []float64{-1, 0, 1}
ys := make([]float64, 3)
dydxs := make([]float64, 3)
leftPoly := func(x float64) float64 {
return x*x - x + 1
}
leftPolyDerivative := func(x float64) float64 {
return 2*x - 1
}
rightPoly := func(x float64) floa... | explode_data.jsonl/44080 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 602
} | [
2830,
3393,
31209,
4482,
34,
41181,
23346,
2354,
22171,
344,
5859,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
10225,
82,
1669,
3056,
3649,
21,
19,
19999,
16,
11,
220,
15,
11,
220,
16,
532,
197,
1047,
1669,
1281,
10556,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBox(t *testing.T) {
config := `
space[0].enabled = 1
space[0].index[0].type = "HASH"
space[0].index[0].unique = 1
space[0].index[0].key_field[0].fieldno = 0
space[0].index[0].key_field[0].type = "NUM"
`
box, err := NewBox(config)
require.NoError(t, err)
box.Close()
} | explode_data.jsonl/67825 | {
"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,
1611,
1155,
353,
8840,
836,
8,
1476,
25873,
1669,
22074,
1903,
1306,
58,
15,
936,
15868,
284,
220,
16,
198,
1903,
1306,
58,
15,
936,
1252,
58,
15,
936,
1313,
284,
330,
70707,
698,
1903,
1306,
58,
15,
936,
1252,
58,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTxStmt(t *testing.T) {
db := newTestDB(t, "")
defer closeDB(t, db)
exec(t, db, "CREATE|t1|name=string,age=int32,dead=bool")
stmt, err := db.Prepare("INSERT|t1|name=?,age=?")
if err != nil {
t.Fatalf("Stmt, err = %v, %v", stmt, err)
}
defer stmt.Close()
tx, err := db.Begin()
if err != nil {
t.Fatal... | explode_data.jsonl/15971 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 304
} | [
2830,
3393,
31584,
31063,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
501,
2271,
3506,
1155,
11,
14676,
16867,
3265,
3506,
1155,
11,
2927,
340,
67328,
1155,
11,
2927,
11,
330,
22599,
91,
83,
16,
91,
606,
28,
917,
11,
424,
16563,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestNewRemoveCommandErrors(t *testing.T) {
testCases := []struct {
name string
args []string
expectedError string
imageRemoveFunc func(image string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error)
}{
{
name: "wrong args",
expectedError: ... | explode_data.jsonl/26900 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 414
} | [
2830,
3393,
3564,
13021,
4062,
13877,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
31215,
310,
3056,
917,
198,
197,
42400,
1454,
256,
914,
198,
197,
31426,
13021,
9626,
2915,
10075,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreatePdb(t *testing.T) {
pdbName := "my-pdb"
tf := cmdtesting.NewTestFactory().WithNamespace("test")
defer tf.Cleanup()
ns := scheme.Codecs
tf.Client = &fake.RESTClient{
GroupVersion: schema.GroupVersion{Group: "policy", Version: "v1beta1"},
NegotiatedSerializer: ns,
Client: fake.CreateHT... | explode_data.jsonl/37305 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 588
} | [
2830,
3393,
4021,
47,
1999,
1155,
353,
8840,
836,
8,
341,
3223,
90881,
1669,
330,
2408,
2268,
1999,
698,
3244,
69,
1669,
5439,
8840,
7121,
2271,
4153,
1005,
2354,
22699,
445,
1944,
1138,
16867,
6409,
727,
60639,
2822,
84041,
1669,
12859... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrepareCacheIndexScan(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
orgEnable := core.PreparedPlanCacheEnabled()
defer core.SetPreparedPlanCache(orgEnable)
core.SetPreparedPlanCache(true)
se, err := session.CreateSession4TestWithOpt(store, &session.Opt{
PreparedPlanCache: kvc... | explode_data.jsonl/5496 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 418
} | [
2830,
3393,
50590,
8233,
1552,
26570,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
741,
87625,
11084,
1669,
6200,
28770,
7212,
20485,
8233,
5462,
741,
16867,
6200,
4202,
4703,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestVerifies_InvalidFileType(t *testing.T) {
path, err := os.MkdirTemp("", "verify-tombstone")
require.NoError(t, err)
_, err = os.CreateTemp(path, "verifytombstonetest*"+".txt")
require.NoError(t, err)
defer os.RemoveAll(path)
verify := NewVerifyTombstoneCommand()
verify.SetArgs([]string{"--engine-path",... | explode_data.jsonl/24019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 210
} | [
2830,
3393,
10141,
9606,
62,
7928,
71873,
1155,
353,
8840,
836,
8,
341,
26781,
11,
1848,
1669,
2643,
1321,
12438,
12151,
19814,
330,
12446,
2385,
2855,
10812,
1138,
17957,
35699,
1155,
11,
1848,
692,
197,
6878,
1848,
284,
2643,
7251,
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 TestVoteVerify(t *testing.T) {
privVal := NewMockPV()
pubkey := privVal.GetPubKey()
vote := examplePrevote()
vote.ValidatorAddress = pubkey.Address()
err := vote.Verify("test_chain_id", ed25519.GenPrivKey().PubKey())
if assert.Error(t, err) {
assert.Equal(t, ErrVoteInvalidValidatorAddress, err)
}
err ... | explode_data.jsonl/54536 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
41412,
32627,
1155,
353,
8840,
836,
8,
341,
71170,
2208,
1669,
1532,
11571,
48469,
741,
62529,
792,
1669,
6095,
2208,
2234,
29162,
1592,
2822,
5195,
1272,
1669,
3110,
4703,
29358,
741,
5195,
1272,
13,
14256,
4286,
284,
95116,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoSamplingConfig(t *testing.T) {
jaeger := v1alpha1.NewJaeger("TestNoSamplingConfig")
config := NewConfig(jaeger)
cm := config.Get()
assert.NotNil(t, cm)
assert.Equal(t, defaultSamplingStrategy, cm.Data["sampling"])
} | explode_data.jsonl/52376 | {
"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,
2753,
98622,
2648,
1155,
353,
8840,
836,
8,
341,
197,
5580,
1878,
1669,
348,
16,
7141,
16,
7121,
52445,
1878,
445,
2271,
2753,
98622,
2648,
5130,
25873,
1669,
1532,
2648,
3325,
64,
1878,
340,
98316,
1669,
2193,
2234,
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 |
func TestConfigSourceManager_Simple(t *testing.T) {
ctx := context.Background()
manager, err := NewManager(nil)
require.NoError(t, err)
manager.configSources = map[string]configsource.ConfigSource{
"tstcfgsrc": &testConfigSource{
ValueMap: map[string]valueEntry{
"test_selector": {Value: "test_value"},
}... | explode_data.jsonl/34666 | {
"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,
2648,
3608,
2043,
1098,
6456,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
92272,
11,
1848,
1669,
1532,
2043,
27907,
340,
17957,
35699,
1155,
11,
1848,
340,
92272,
5423,
32200,
284,
2415,
14032,
60,
1676,
242... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCopyDirContents(t *testing.T) {
f1 := filepath.Join("testdata", "files")
f2 := filepath.Join("testdata", "files2")
if err := fileutil.CopyDirContents(f1, f2); err != nil {
t.Error(err)
}
t.Cleanup(remove(t, f2))
} | explode_data.jsonl/16281 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
12106,
6184,
14803,
1155,
353,
8840,
836,
8,
341,
1166,
16,
1669,
26054,
22363,
445,
92425,
497,
330,
7198,
1138,
1166,
17,
1669,
26054,
22363,
445,
92425,
497,
330,
7198,
17,
5130,
743,
1848,
1669,
1034,
1314,
31770,
6184,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCreateSeries(t *testing.T) {
timescale, cleanup := insightsdbtesting.TimescaleDB(t)
defer cleanup()
now := time.Now().Truncate(time.Microsecond).Round(0)
store := NewInsightStore(timescale)
store.Now = func() time.Time {
return now
}
ctx := context.Background()
t.Run("test create series", func(t *... | explode_data.jsonl/33311 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 634
} | [
2830,
3393,
4021,
25544,
1155,
353,
8840,
836,
8,
341,
3244,
1733,
2246,
11,
21290,
1669,
25709,
1999,
8840,
836,
1733,
2246,
3506,
1155,
340,
16867,
21290,
741,
80922,
1669,
882,
13244,
1005,
1282,
26900,
9730,
1321,
2754,
5569,
568,
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 TestRemittanceOriginatorPostCodeAlphaNumeric(t *testing.T) {
ro := mockRemittanceOriginator()
ro.RemittanceData.PostCode = "®"
err := ro.Validate()
require.EqualError(t, err, fieldError("PostCode", ErrNonAlphanumeric, ro.RemittanceData.PostCode).Error())
} | explode_data.jsonl/32928 | {
"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,
6590,
87191,
13298,
850,
4133,
2078,
19384,
36296,
1155,
353,
8840,
836,
8,
341,
197,
299,
1669,
7860,
6590,
87191,
13298,
850,
741,
197,
299,
11398,
87191,
1043,
23442,
2078,
284,
330,
11909,
1837,
9859,
1669,
926,
47667,
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 TestGetG(t *testing.T) {
withTestProcess("testprog", t, func(p *proc.Target, fixture protest.Fixture) {
testGSupportFunc("nocgo", t, p, fixture)
})
// On OSX with Go < 1.5 CGO is not supported due to: https://github.com/golang/go/issues/8973
if !goversion.VersionAfterOrEqual(runtime.Version(), 1, 5) {
ski... | explode_data.jsonl/56220 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 212
} | [
2830,
3393,
1949,
38,
1155,
353,
8840,
836,
8,
341,
46948,
2271,
7423,
445,
1944,
32992,
497,
259,
11,
2915,
1295,
353,
15782,
35016,
11,
12507,
8665,
991,
12735,
8,
341,
197,
18185,
38,
7916,
9626,
445,
47991,
3346,
497,
259,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCacheQueryer_getSelector(t *testing.T) {
selector := &metav1.LabelSelector{
MatchLabels: map[string]string{"foo": "bar"},
}
cases := []struct {
name string
object runtime.Object
expected *metav1.LabelSelector
isErr bool
}{
{
name: "cron job",
object: &batchv1beta1.CronJob{... | explode_data.jsonl/45675 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 833
} | [
2830,
3393,
8233,
2859,
261,
3062,
5877,
1155,
353,
8840,
836,
8,
341,
197,
8925,
1669,
609,
4059,
402,
16,
4679,
5877,
515,
197,
197,
8331,
23674,
25,
2415,
14032,
30953,
4913,
7975,
788,
330,
2257,
7115,
197,
630,
1444,
2264,
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 TestClientFollowRedirects(t *testing.T) {
t.Parallel()
s := &Server{
Handler: func(ctx *RequestCtx) {
switch string(ctx.Path()) {
case "/foo":
u := ctx.URI()
u.Update("/xy?z=wer")
ctx.Redirect(u.String(), StatusFound)
case "/xy":
u := ctx.URI()
u.Update("/bar")
ctx.Redirect(u.... | explode_data.jsonl/79360 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 951
} | [
2830,
3393,
2959,
12480,
17725,
82,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1903,
1669,
609,
5475,
515,
197,
197,
3050,
25,
2915,
7502,
353,
1900,
23684,
8,
341,
298,
8961,
914,
7502,
17474,
2140,
341,
298,
2722,
3521,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidatePersistentVolumes(t *testing.T) {
scenarios := map[string]struct {
isExpectedFailure bool
volume *api.PersistentVolume
}{
"good-volume": {
isExpectedFailure: false,
volume: testVolume("foo", "", api.PersistentVolumeSpec{
Capacity: api.ResourceList{
api.ResourceName(ap... | explode_data.jsonl/62784 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1366
} | [
2830,
3393,
17926,
53194,
96325,
1155,
353,
8840,
836,
8,
1476,
29928,
60494,
1669,
2415,
14032,
60,
1235,
341,
197,
19907,
18896,
17507,
1807,
198,
197,
5195,
4661,
310,
353,
2068,
61655,
18902,
198,
197,
59403,
197,
197,
1,
18536,
667... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCloneUser(t *testing.T) {
tests := []struct {
name string
u *User
}{
{"nil_logins", &User{}},
{"zero_logins", &User{Logins: make([]LoginID, 0)}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
u2 := tt.u.Clone()
if !reflect.DeepEqual(tt.u, u2) {
t.Errorf("not equal"... | explode_data.jsonl/48391 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 171
} | [
2830,
3393,
37677,
1474,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
10676,
262,
353,
1474,
198,
197,
59403,
197,
197,
4913,
8385,
5224,
1330,
497,
609,
1474,
6257,
1583,
197,
197,
4913,
1415... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPeerConnection_GetStats(t *testing.T) {
offerPC, answerPC, err := newPair()
assert.NoError(t, err)
baseLineReportPCOffer := offerPC.GetStats()
baseLineReportPCAnswer := answerPC.GetStats()
connStatsOffer := getConnectionStats(t, baseLineReportPCOffer, offerPC)
connStatsAnswer := getConnectionStats(t, b... | explode_data.jsonl/37904 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1729
} | [
2830,
3393,
30888,
4526,
13614,
16635,
1155,
353,
8840,
836,
8,
341,
197,
25077,
4872,
11,
4226,
4872,
11,
1848,
1669,
501,
12443,
741,
6948,
35699,
1155,
11,
1848,
692,
24195,
2460,
10361,
4872,
39462,
1669,
3010,
4872,
2234,
16635,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSessionCacheGetTagging(t *testing.T) {
testGetAWSClient(
t, "Tagging",
func(t *testing.T, cache *sessionCache, region *string, role Role) {
iface := cache.GetTagging(region, role)
if iface == nil {
t.Fail()
return
}
})
} | explode_data.jsonl/18776 | {
"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,
5283,
8233,
1949,
5668,
3173,
1155,
353,
8840,
836,
8,
341,
18185,
1949,
36136,
2959,
1006,
197,
3244,
11,
330,
5668,
3173,
756,
197,
29244,
1155,
353,
8840,
836,
11,
6500,
353,
5920,
8233,
11,
5537,
353,
917,
11,
3476,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFailFirst(t *testing.T) {
var count int
f := func(ctx context.Context, p peer.ID) (*Conn, error) {
if count > 0 {
return new(Conn), nil
}
count++
return nil, fmt.Errorf("gophers ate the modem")
}
ds := NewDialSync(f)
p := peer.ID("testing")
ctx, cancel := context.WithTimeout(context.Backgro... | explode_data.jsonl/41484 | {
"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,
19524,
5338,
1155,
353,
8840,
836,
8,
341,
2405,
1760,
526,
198,
1166,
1669,
2915,
7502,
2266,
9328,
11,
281,
14397,
9910,
8,
4609,
9701,
11,
1465,
8,
341,
197,
743,
1760,
861,
220,
15,
341,
298,
853,
501,
7,
9701,
701... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPageWithDateFields(t *testing.T) {
assert := require.New(t)
pageWithDate := `---
title: P%d
weight: %d
%s: 2017-10-13
---
Simple Page With Some Date`
hasDate := func(p page.Page) bool {
return p.Date().Year() == 2017
}
datePage := func(field string, weight int) string {
return fmt.Sprintf(pageWithDa... | explode_data.jsonl/60611 | {
"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,
2665,
2354,
1916,
8941,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
1373,
7121,
1155,
340,
35272,
2354,
1916,
1669,
1565,
10952,
2102,
25,
393,
14841,
198,
4765,
25,
1018,
67,
198,
12952,
25,
220,
17,
15,
16,
22,
12,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewModulesCallModuleFactory(t *testing.T) {
logp.TestingSetup()
r := NewRegister()
r.MustAddMetricSet("foo", "bar", newMetricSetWithOption)
r.SetSecondarySource(NewLightModulesSource("testdata/lightmodules"))
called := false
r.AddModule("foo", func(base BaseModule) (Module, error) {
called = true
r... | explode_data.jsonl/9718 | {
"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,
3564,
28201,
7220,
3332,
4153,
1155,
353,
8840,
836,
8,
341,
6725,
79,
8787,
287,
21821,
2822,
7000,
1669,
1532,
8690,
741,
7000,
50463,
2212,
54310,
1649,
445,
7975,
497,
330,
2257,
497,
501,
54310,
1649,
2354,
5341,
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 TestParseConfig(t *testing.T) {
testcases := []struct {
cfgNet string
cfgAddr string
cfgDBName string
expHost string
expPortPathOrID string
expDatabaseName string
}{
{
cfgDBName: "mydb",
expDatabaseName: "mydb",
},
{
cfgNet: "unixgram",
... | explode_data.jsonl/58472 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1044
} | [
2830,
3393,
14463,
2648,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
50286,
6954,
688,
914,
198,
197,
50286,
13986,
260,
914,
198,
197,
50286,
3506,
675,
981,
914,
198,
197,
48558,
9296,
260,
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... | 5 |
func TestGetMessageHTML(t *testing.T) {
item := feed.Item{
Title: "\tPodcast\n\t",
Description: "<p>News <a href='/test'>Podcast Link</a></p>\n",
Enclosure: feed.Enclosure{
URL: "https://example.com",
},
Link: "https://example.com/xyz",
}
expected := "<a href=\"https://example.com/xyz\">Podcast</... | explode_data.jsonl/50727 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
1949,
2052,
5835,
1155,
353,
8840,
836,
8,
341,
22339,
1669,
5395,
9399,
515,
197,
92233,
25,
981,
2917,
83,
23527,
3829,
1699,
4955,
756,
197,
47414,
25,
4055,
79,
29,
14373,
366,
64,
1801,
21301,
1944,
6270,
23527,
3829,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplicationResolver_ApplicationEnabledMappingServices(t *testing.T) {
// GIVEN
const (
serviceIdOne = "abe498d4-dc37-46f1-9f87-db1ddd55b409"
serviceIdTwo = "952404e7-f7b9-44ac-9f5d-eeb695c3c46e"
serviceIdThree = "afcd698b-968c-4d1c-a3c8-5d96968a139e"
serviceIdFour = "eccbfd17-00e0-440c-b... | explode_data.jsonl/28769 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1079
} | [
2830,
3393,
4988,
18190,
96579,
5462,
6807,
11025,
1155,
353,
8840,
836,
8,
341,
197,
322,
89836,
198,
4777,
2399,
197,
52934,
764,
3966,
257,
284,
330,
8229,
19,
24,
23,
67,
19,
1737,
66,
18,
22,
12,
19,
21,
69,
16,
12,
24,
69,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestErrors_templates(t *testing.T) {
os.Chdir("testdata/templates")
defer os.Chdir("../..")
c := &up.Config{
Name: "app",
ErrorPages: config.ErrorPages{
Enable: true,
},
}
assert.NoError(t, c.Default(), "default")
assert.NoError(t, c.Validate(), "validate")
test(t, c)
} | explode_data.jsonl/45492 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 127
} | [
2830,
3393,
13877,
49526,
1155,
353,
8840,
836,
8,
341,
25078,
6353,
3741,
445,
92425,
38941,
1138,
16867,
2643,
6353,
3741,
17409,
496,
5130,
1444,
1669,
609,
454,
10753,
515,
197,
21297,
25,
330,
676,
756,
197,
58421,
17713,
25,
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 TestGetOrRegisterMeter(t *testing.T) {
r := NewRegistry()
NewRegisteredMeter("foo", r).Mark(47)
if m := GetOrRegisterMeter("foo", r); 47 != m.Count() {
t.Fatal(m)
}
} | explode_data.jsonl/10858 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
1949,
2195,
8690,
68224,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
15603,
741,
197,
3564,
41430,
68224,
445,
7975,
497,
435,
568,
8949,
7,
19,
22,
340,
743,
296,
1669,
2126,
2195,
8690,
68224,
445,
7975,
497,
435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildTrafficConfiguration_EmptyAndFailedConfigurations(t *testing.T) {
expected := &Config{
Targets: map[string]RevisionTargets{},
Configurations: map[string]*v1.Configuration{
emptyConfig.Name: emptyConfig,
failedConfig.Name: failedConfig,
},
Revisions: map[string]*v1.Revision{},
}
expectedE... | explode_data.jsonl/17619 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 357
} | [
2830,
3393,
11066,
87229,
7688,
76060,
1595,
3036,
9408,
2648,
21449,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
609,
2648,
515,
197,
197,
49030,
25,
2415,
14032,
60,
33602,
49030,
38837,
197,
66156,
21449,
25,
2415,
14032,
8465,
85,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestACL_AllowOperation(t *testing.T) {
t.Run("root-ns", func(t *testing.T) {
t.Parallel()
testACLAllowOperation(t, namespace.RootNamespace)
})
} | explode_data.jsonl/15271 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
55393,
53629,
363,
8432,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
2888,
12,
4412,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3244,
41288,
7957,
741,
197,
18185,
55393,
18605,
8432,
1155,
11,
4473,
45345,
22699,
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 |
func TestManagerSimpleRun(t *testing.T) {
ts := memorytopo.NewServer("cell1")
m := NewManager(ts)
// Run the manager in the background.
wg, _, cancel := StartManager(m)
// Create a Sleep job.
uuid, err := m.Create(context.Background(), sleepFactoryName, []string{"-duration", "60"})
if err != nil {
t.Fatalf("... | explode_data.jsonl/75109 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 236
} | [
2830,
3393,
2043,
16374,
6727,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
4938,
3481,
78,
7121,
5475,
445,
5873,
16,
1138,
2109,
1669,
1532,
2043,
35864,
692,
197,
322,
6452,
279,
6645,
304,
279,
4004,
624,
72079,
11,
8358,
9121,
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 TestGetPadWidths(t *testing.T) {
type scenario struct {
stringArrays [][]string
expected []int
}
scenarios := []scenario{
{
[][]string{{""}, {""}},
[]int{},
},
{
[][]string{{"a"}, {""}},
[]int{},
},
{
[][]string{{"aa", "b", "ccc"}, {"c", "d", "e"}},
[]int{2, 1},
},
}
fo... | explode_data.jsonl/11579 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
1949,
13731,
3327,
82,
1155,
353,
8840,
836,
8,
341,
13158,
15048,
2036,
341,
197,
11357,
22182,
52931,
917,
198,
197,
42400,
257,
3056,
396,
198,
197,
630,
29928,
60494,
1669,
3056,
61422,
515,
197,
197,
515,
298,
197,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAsStructuredWatcherErrorConverting(t *testing.T) {
unstructuredCh := make(chan watch.Event)
nwf := func(ctx context.Context, lo metav1.ListOptions) (watch.Interface, error) {
return watch.NewProxyWatcher(unstructuredCh), nil
}
wf := duck.AsStructuredWatcher(context.Background(), nwf, &badObject{})
wi,... | explode_data.jsonl/51702 | {
"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,
2121,
97457,
47248,
1454,
1109,
49417,
1155,
353,
8840,
836,
8,
341,
20479,
51143,
1143,
1669,
1281,
35190,
3736,
6904,
340,
9038,
43083,
1669,
2915,
7502,
2266,
9328,
11,
775,
77520,
16,
5814,
3798,
8,
320,
14321,
41065,
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_getBechKeyOut(t *testing.T) {
type args struct {
bechPrefix string
}
tests := []struct {
name string
args args
want bechKeyOutFn
wantErr bool
}{
{"empty", args{""}, nil, true},
{"wrong", args{"???"}, nil, true},
{"acc", args{sdk.PrefixAccount}, keys.Bech32KeyOutput, false},
{"va... | explode_data.jsonl/45326 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 448
} | [
2830,
3393,
3062,
3430,
331,
1592,
2662,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
73142,
331,
14335,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
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... | 3 |
func TestEntryAddTimedMetricTooEarly(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
e, _, now := testEntry(ctrl, testEntryOptions{
options: testOptions(ctrl).SetVerboseErrors(true),
})
e.opts = e.opts.SetBufferForFutureTimedMetric(time.Second)
inputs := []struct {
timeNanos int64
... | explode_data.jsonl/24236 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 478
} | [
2830,
3393,
5874,
2212,
20217,
291,
54310,
31246,
41198,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
7727,
11,
8358,
1431,
1669,
1273,
5874,
62100,
11,
1273,
5874,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCreateGroupGroupLabel(t *testing.T) {
mux, server, client := setup(t)
defer teardown(server)
mux.HandleFunc("/api/v4/groups/1/labels", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodPost)
fmt.Fprint(w, `{"id":1, "name": "My / GroupLabel", "color" : "#11FF22"}`)
})
l := &C... | explode_data.jsonl/34990 | {
"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,
4021,
2808,
2808,
2476,
1155,
353,
8840,
836,
8,
341,
2109,
2200,
11,
3538,
11,
2943,
1669,
6505,
1155,
340,
16867,
49304,
21421,
692,
2109,
2200,
63623,
4283,
2068,
5457,
19,
77685,
14,
16,
14,
16873,
497,
2915,
3622,
175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStream_ReadArray(t *testing.T) {
t.Run("test ok", func(t *testing.T) {
assert := base.NewAssert(t)
testRange := getTestRange(streamPosBody, 3*streamBlockSize, 80, 80, 61)
for _, testData := range streamTestSuccessCollections["array"] {
for _, i := range testRange {
stream := NewStream()
strea... | explode_data.jsonl/21226 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1163
} | [
2830,
3393,
3027,
38381,
1857,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
5394,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6948,
1669,
2331,
7121,
8534,
1155,
340,
197,
18185,
6046,
1669,
633,
2271,
6046,
20574,
4859,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVersion(t *testing.T) {
serverConfig := &Config{
Certificates: testConfig.Certificates,
MaxVersion: VersionTLS11,
}
clientConfig := &Config{
InsecureSkipVerify: true,
}
state, err := testHandshake(clientConfig, serverConfig)
if err != nil {
t.Fatalf("handshake failed: %s", err)
}
if state.Ver... | explode_data.jsonl/80551 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
5637,
1155,
353,
8840,
836,
8,
341,
41057,
2648,
1669,
609,
2648,
515,
197,
6258,
529,
24405,
25,
1273,
2648,
727,
529,
24405,
345,
197,
197,
5974,
5637,
25,
256,
6079,
45439,
16,
16,
345,
197,
532,
25291,
2648,
1669,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestScaleUpdate(t *testing.T) {
storage, server := newStorage(t)
defer server.Terminate(t)
defer storage.CustomResource.Store.DestroyFunc()
name := "foo"
var cr unstructured.Unstructured
ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault)
key := "/noxus/" + meta... | explode_data.jsonl/71533 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 671
} | [
2830,
3393,
6947,
4289,
1155,
353,
8840,
836,
8,
341,
197,
16172,
11,
3538,
1669,
501,
5793,
1155,
340,
16867,
3538,
836,
261,
34016,
1155,
340,
16867,
5819,
27649,
4783,
38047,
57011,
9626,
2822,
11609,
1669,
330,
7975,
1837,
2405,
156... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.