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 TestRowLock(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk1 := testkit.NewTestKit(t, store)
tk1.MustExec("use test")
tk2 := testkit.NewTestKit(t, store)
tk2.MustExec("use test")
tk.MustExec("drop table i... | explode_data.jsonl/5801 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 504
} | [
2830,
3393,
3102,
11989,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
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 TestGetBlobChannel(t *testing.T) {
img := NewMatWithSize(100, 100, 5+16)
defer img.Close()
blob := BlobFromImage(img, 1.0, image.Pt(0, 0), NewScalar(0, 0, 0, 0), true, false)
defer blob.Close()
ch2 := GetBlobChannel(blob, 0, 1)
defer ch2.Close()
if ch2.Empty() {
t.Errorf("GetBlobChannel failed to retri... | explode_data.jsonl/31269 | {
"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,
1949,
37985,
9629,
1155,
353,
8840,
836,
8,
341,
39162,
1669,
1532,
11575,
2354,
1695,
7,
16,
15,
15,
11,
220,
16,
15,
15,
11,
220,
20,
10,
16,
21,
340,
16867,
4964,
10421,
2822,
2233,
1684,
1669,
49439,
3830,
1906,
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 TestCanSupport(t *testing.T) {
pluginMgr := volume.VolumePluginMgr{}
tempDir, host := newTestHost(t, nil)
defer os.RemoveAll(tempDir)
pluginMgr.InitPlugins(ProbeVolumePlugins(), host)
plugin, err := pluginMgr.FindPluginByName(secretPluginName)
if err != nil {
t.Errorf("Can't find the plugin by name")
}
... | explode_data.jsonl/15324 | {
"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,
6713,
7916,
1155,
353,
8840,
836,
8,
341,
197,
9138,
25567,
1669,
8123,
79106,
11546,
25567,
16094,
16280,
6184,
11,
3468,
1669,
501,
2271,
9296,
1155,
11,
2092,
340,
16867,
2643,
84427,
9758,
6184,
340,
197,
9138,
25567,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExample1(t *testing.T) {
assert := assert.New(t)
rancher := NewRancherMockClient()
rancher.AddEnvironment(client.Project{Name: "prod", Resource: client.Resource{Id: "1a5"}})
rancher.AddEnvironment(client.Project{Name: "dev", Resource: client.Resource{Id: "1a6"}})
prod1 := client.Host{Hostname: "prod01.... | explode_data.jsonl/48867 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1101
} | [
2830,
3393,
13314,
16,
1155,
353,
8840,
836,
8,
1476,
6948,
1669,
2060,
7121,
1155,
340,
7000,
3497,
261,
1669,
1532,
49,
3497,
261,
11571,
2959,
2822,
7000,
3497,
261,
1904,
12723,
12805,
30944,
63121,
25,
330,
19748,
497,
11765,
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 TestSigstruct(t *testing.T) {
require := require.New(t)
var mrEnclave sgx.MrEnclave
err := mrEnclave.UnmarshalHex("c50673624a6cb17c1c6c2a4e6906f47a170c4629b8723781d1017ef376f1a75d")
require.NoError(err, "MrEnclave.UnmarshalHex")
privateKey, err := loadTestPrivateKey()
require.NoError(err, "x509.ParsePKCS1P... | explode_data.jsonl/75797 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 484
} | [
2830,
3393,
47246,
1235,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
692,
2405,
17317,
1702,
40533,
30673,
87,
1321,
81,
1702,
40533,
198,
9859,
1669,
17317,
1702,
40533,
38097,
20335,
445,
66,
20,
15,
21,
22,
18,
21,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStatefulSetControllerAddPod(t *testing.T) {
ssc, spc, _ := newFakeStatefulSetController()
set1 := newStatefulSet(3)
set2 := newStatefulSet(3)
pod1 := newStatefulSetPod(set1, 0)
pod2 := newStatefulSetPod(set2, 0)
spc.setsIndexer.Add(set1)
spc.setsIndexer.Add(set2)
ssc.addPod(pod1)
key, done := ssc.que... | explode_data.jsonl/18611 | {
"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,
1397,
1262,
1649,
2051,
2212,
23527,
1155,
353,
8840,
836,
8,
341,
34472,
66,
11,
978,
66,
11,
716,
1669,
501,
52317,
1397,
1262,
1649,
2051,
741,
8196,
16,
1669,
36848,
1262,
1649,
7,
18,
340,
8196,
17,
1669,
36848,
126... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCommentBodyMatches(t *testing.T) {
var testcases = []struct {
repo string
body string
expectedJobs []string
}{
{
"org/repo",
"this is a random comment",
[]string{},
},
{
"org/repo",
"/ok-to-test",
[]string{"gce", "unit"},
},
{
"org/repo",
"/test all",
... | explode_data.jsonl/36536 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1534
} | [
2830,
3393,
10677,
5444,
42470,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
23910,
284,
3056,
1235,
341,
197,
17200,
5368,
260,
914,
198,
197,
35402,
260,
914,
198,
197,
42400,
40667,
3056,
917,
198,
197,
59403,
197,
197,
515,
298,
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... | 8 |
func Test_InjectEnvoyContainerVG(t *testing.T) {
type args struct {
ms *appmesh.Mesh
vg *appmesh.VirtualGateway
pod *corev1.Pod
}
type expected struct {
containers int
xray bool
}
tests := []struct {
name string
conf Config
args args
want expected
wantErr error
}{
{
na... | explode_data.jsonl/80315 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1080
} | [
2830,
3393,
62,
13738,
14359,
2253,
4502,
46641,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
47691,
220,
353,
676,
23506,
50155,
198,
197,
5195,
70,
220,
353,
676,
23506,
95979,
40709,
198,
197,
3223,
347,
353,
98645,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMotorDriverToggle(t *testing.T) {
d := initTestMotorDriver()
d.Off()
d.Toggle()
gobottest.Assert(t, d.IsOn(), true)
d.Toggle()
gobottest.Assert(t, d.IsOn(), false)
} | explode_data.jsonl/23133 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
33577,
11349,
18897,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
2930,
2271,
33577,
11349,
741,
2698,
13,
4596,
741,
2698,
80700,
741,
3174,
674,
1716,
477,
11711,
1155,
11,
294,
4506,
1925,
1507,
830,
340,
2698,
80700,
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 |
func TestTimeStamp(t *testing.T) {
var event events.Generic
ts := time.Date(2018, 8, 10, 17, 35, 16, 538978048, time.UTC)
event.SetTimestamp(ts)
ensure.DeepEqual(t, event.GetTimestamp(), ts)
event.Timestamp = 1546899001.019501
ensure.DeepEqual(t, event.GetTimestamp(),
time.Date(2019, 1, 7, 22, 10, 01, 19501056... | explode_data.jsonl/69101 | {
"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,
66146,
1155,
353,
8840,
836,
8,
341,
2405,
1538,
4357,
4341,
198,
57441,
1669,
882,
8518,
7,
17,
15,
16,
23,
11,
220,
23,
11,
220,
16,
15,
11,
220,
16,
22,
11,
220,
18,
20,
11,
220,
16,
21,
11,
220,
20,
18,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWithHeader(t *testing.T) {
const headerKey = "X-Foo"
const headerVal = "Bar"
req := NewRequest("/").WithHeader(headerKey, headerVal)
header := req.Header.Get(headerKey)
if header != headerVal {
t.Errorf("bad Header, got: %v, want: %v", header, headerVal)
}
} | explode_data.jsonl/55923 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
2354,
4047,
1155,
353,
8840,
836,
8,
341,
220,
733,
4247,
1592,
284,
330,
55,
7276,
2624,
698,
220,
733,
4247,
2208,
284,
330,
3428,
1837,
220,
4232,
1669,
1532,
1900,
4283,
1827,
2354,
4047,
25534,
1592,
11,
4247,
2208,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientSuccessAndErrorResponses(t *testing.T) {
// Service that succeeds only if requested size is 1, otherwise errors
h := PickyHatmaker(1)
s := httptest.NewServer(NewHaberdasherServer(h, nil))
defer s.Close()
// Clients
protoCli := NewHaberdasherProtobufClient(s.URL, &http.Client{})
jsonCli := NewHabe... | explode_data.jsonl/613 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 528
} | [
2830,
3393,
2959,
7188,
3036,
1454,
70743,
1155,
353,
8840,
836,
8,
341,
197,
322,
5362,
429,
50081,
1172,
421,
11223,
1379,
374,
220,
16,
11,
5937,
5975,
198,
9598,
1669,
393,
18964,
72287,
25766,
7,
16,
340,
1903,
1669,
54320,
70334... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDomains_AllRecordsForDomainName(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc("/v2/domains/example.com/records", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodGet)
fmt.Fprint(w, `{"domain_records":[{"id":1},{"id":2}]}`)
})
records, _, err := client.Domains.Reco... | explode_data.jsonl/22674 | {
"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,
74713,
53629,
25876,
2461,
13636,
675,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
85,
17,
71344,
1735,
65182,
905,
14,
26203,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDominatorsDeadCode(t *testing.T) {
c := testConfig(t)
fun := Fun(c, "entry",
Bloc("entry",
Valu("mem", OpInitMem, TypeMem, 0, nil),
Valu("p", OpConstBool, TypeBool, 0, nil),
If("p", "b3", "b5")),
Bloc("b2", Exit("mem")),
Bloc("b3", Goto("b2")),
Bloc("b4", Goto("b2")),
Bloc("b5", Goto("b2")... | explode_data.jsonl/77584 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 253
} | [
2830,
3393,
71541,
2973,
28320,
2078,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1273,
2648,
1155,
340,
90126,
1669,
16071,
1337,
11,
330,
4085,
756,
197,
12791,
1074,
445,
4085,
756,
298,
197,
2208,
84,
445,
10536,
497,
10672,
3803,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewInMemory_Purge(t *testing.T) {
t.Parallel()
m := containable.NewInMemory()
for i := 0; i < 6; i++ {
id := []byte(`eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9`)
id = strconv.AppendInt(id, int64(i), 10)
assert.NoError(t, m.Set(id, time.Second))
time.Sleep(time.Second) // bit lame this test but so far ok, ... | explode_data.jsonl/42546 | {
"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,
641,
10642,
1088,
39823,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2109,
1669,
6644,
480,
7121,
641,
10642,
741,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
21,
26,
600,
1027,
341,
197,
15710,
1669,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkflowTemplateServer_UpdateClusterWorkflowTemplate(t *testing.T) {
server, ctx := getClusterWorkflowTemplateServer()
t.Run("Labelled", func(t *testing.T) {
req := &clusterwftmplpkg.ClusterWorkflowTemplateUpdateRequest{
Template: cwftObj2.DeepCopy(),
}
req.Template.Spec.Templates[0].Container.Image... | explode_data.jsonl/48141 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 283
} | [
2830,
3393,
62768,
7275,
5475,
47393,
28678,
62768,
7275,
1155,
353,
8840,
836,
8,
341,
41057,
11,
5635,
1669,
633,
28678,
62768,
7275,
5475,
741,
3244,
16708,
445,
2476,
832,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
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... | 2 |
func TestPrintReplicationController(t *testing.T) {
tests := []struct {
rc api.ReplicationController
options printers.GenerateOptions
expected []metav1.TableRow
}{
// Basic print replication controller without replicas or status.
{
rc: api.ReplicationController{
ObjectMeta: metav1.ObjectMeta{
... | explode_data.jsonl/21622 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1861
} | [
2830,
3393,
8994,
18327,
1693,
2051,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
30295,
981,
6330,
2817,
79,
1693,
2051,
198,
197,
35500,
220,
55953,
57582,
3798,
198,
197,
42400,
3056,
4059,
402,
16,
18257,
3102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFacadeError(t *testing.T) {
st, ok := status.FromError(facade.Error(codes.Internal, "ohno"))
require.True(t, ok, "error is not a gRPC status")
assert.Equal(t, codes.Internal, st.Code())
assert.Equal(t, "type(name): ohno", st.Message())
} | explode_data.jsonl/30820 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
55331,
1454,
1155,
353,
8840,
836,
8,
341,
18388,
11,
5394,
1669,
2639,
11439,
1454,
955,
580,
1021,
6141,
1337,
2539,
32579,
11,
330,
2267,
2152,
5455,
17957,
32443,
1155,
11,
5394,
11,
330,
841,
374,
537,
264,
342,
29528... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReturnsErrorWithNoPod(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
defer cancel()
defer leaktest.Check(t)()
r, _ := http.NewRequest("GET", "/latest/meta-data/iam/security-credentials/role", nil)
rr := httptest.NewRecorder()
client := st.NewStubClient().WithCre... | explode_data.jsonl/19348 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 271
} | [
2830,
3393,
16446,
1454,
2354,
2753,
23527,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
882,
32435,
9,
20,
340,
16867,
9121,
741,
16867,
23352,
1944,
10600,
1155,
8,
2822,
7000,
11,
716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSlimTrie_String_empty(t *testing.T) {
ta := require.New(t)
keys := []string{}
values := makeI32s(len(keys))
st, err := NewSlimTrie(encode.I32{}, keys, values)
ta.NoError(err)
want := trim(`
`)
dd(st)
ta.Equal(want, st.String())
testUnknownKeysGRS(t, st, randVStrings(100, 0, 10))
testPresentKeysG... | explode_data.jsonl/62315 | {
"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,
87208,
51,
7231,
31777,
15124,
1155,
353,
8840,
836,
8,
1476,
197,
2565,
1669,
1373,
7121,
1155,
692,
80112,
1669,
3056,
917,
16094,
45939,
1669,
1281,
40,
18,
17,
82,
6901,
36131,
1171,
18388,
11,
1848,
1669,
1532,
87208,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCard_Layout(t *testing.T) {
test.NewApp()
test.ApplyTheme(t, theme.LightTheme())
for name, tt := range map[string]struct {
title, subtitle string
icon *canvas.Image
content fyne.CanvasObject
}{
"title": {
title: "Title",
subtitle: "",
icon: nil,
content: nil,... | explode_data.jsonl/77607 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 922
} | [
2830,
3393,
5770,
62,
2175,
1155,
353,
8840,
836,
8,
341,
18185,
7121,
2164,
741,
18185,
36051,
12594,
1155,
11,
6912,
50791,
12594,
12367,
2023,
829,
11,
17853,
1669,
2088,
2415,
14032,
60,
1235,
341,
197,
24751,
11,
31735,
914,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestError(t *testing.T) {
errorMessage := "sentinel error"
input := errors.New(errorMessage)
inputGRPCCode := codes.Unauthenticated
inputGRPC := status.Error(inputGRPCCode, errorMessage)
for _, tc := range []struct {
desc string
errorf func(err error) error
code codes.Code
}{
{
desc: "Inter... | explode_data.jsonl/42907 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 621
} | [
2830,
3393,
1454,
1155,
353,
8840,
836,
8,
341,
18290,
2052,
1669,
330,
24512,
29708,
1465,
698,
22427,
1669,
5975,
7121,
70130,
340,
22427,
8626,
4872,
2078,
1669,
13912,
10616,
57707,
198,
22427,
8626,
4872,
1669,
2639,
6141,
5384,
8626... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCharsetRemoveAll(t *testing.T) {
c := NewCharset()
c.MakeFromBytes([]byte("\\x01-\\x05a-c\\k-m"))
c.RemoveAll()
str := c.StringAsInt()
test.EXPECT_EQ(t, str, "", "")
test.EXPECT_EQ(t, c.Size(), uint32(0), "")
} | explode_data.jsonl/51963 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
78172,
13021,
2403,
1155,
353,
8840,
836,
8,
972,
1444,
1669,
1532,
78172,
3568,
1444,
50133,
3830,
7078,
10556,
3782,
29710,
87,
15,
16,
12,
3422,
87,
15,
20,
64,
1786,
3422,
74,
1448,
26043,
1444,
84427,
3568,
11355,
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... | 1 |
func TestKubeadmConfigReconciler_ClusterToKubeadmConfigs(t *testing.T) {
_ = feature.MutableGates.Set("MachinePool=true")
g := NewWithT(t)
cluster := newCluster("my-cluster")
objs := []client.Object{cluster}
expectedNames := []string{}
for i := 0; i < 3; i++ {
m := newMachine(cluster, fmt.Sprintf("my-machine-%... | explode_data.jsonl/44329 | {
"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,
42,
392,
3149,
76,
2648,
693,
40446,
5769,
85110,
4993,
1249,
42,
392,
3149,
76,
84905,
1155,
353,
8840,
836,
8,
341,
197,
62,
284,
4565,
74028,
38,
973,
4202,
445,
21605,
10551,
11265,
1138,
3174,
1669,
1532,
2354,
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... | 7 |
func TestMeanStdDev(t *testing.T) {
src := NewMatWithSize(101, 102, MatTypeCV8U)
dst := NewMat()
dstStdDev := NewMat()
MeanStdDev(src, &dst, &dstStdDev)
if dst.Empty() {
t.Error("TestMeanStdDev dst should not be empty.")
}
if dstStdDev.Empty() {
t.Error("TestMeanStdDev dstStdDev should not be empty.")
}
} | explode_data.jsonl/81713 | {
"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,
18783,
22748,
14592,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
1532,
11575,
2354,
1695,
7,
16,
15,
16,
11,
220,
16,
15,
17,
11,
6867,
929,
19589,
23,
52,
340,
52051,
1669,
1532,
11575,
741,
52051,
22748,
14592,
1669,
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 TestLocalDockerComposeWithMultipleComposeFiles(t *testing.T) {
composeFiles := []string{
"testresources/docker-compose-simple.yml",
"testresources/docker-compose-postgres.yml",
"testresources/docker-compose-override.yml",
}
identifier := strings.ToLower(uuid.New().String())
compose := NewLocalDockerCom... | explode_data.jsonl/43636 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 400
} | [
2830,
3393,
7319,
35,
13659,
70492,
2354,
32089,
70492,
10809,
1155,
353,
8840,
836,
8,
341,
32810,
2900,
10809,
1669,
3056,
917,
515,
197,
197,
1,
1944,
12745,
61764,
65070,
65957,
33936,
756,
197,
197,
1,
1944,
12745,
61764,
65070,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHeartbeatsGoToAllStreams(t *testing.T) {
heartbeatInterval := time.Millisecond * 20
sp := &mockStreamProvider{credentialOfDesiredType: config.SDKKey("")}
store := makeMockStore(nil, nil)
es := NewEnvStreams([]StreamProvider{sp}, store, heartbeatInterval, ldlog.NewDisabledLoggers())
defer es.Close()
sd... | explode_data.jsonl/69851 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 278
} | [
2830,
3393,
45384,
1371,
1862,
10850,
1249,
2403,
73576,
1155,
353,
8840,
836,
8,
341,
197,
72471,
10256,
1669,
882,
71482,
353,
220,
17,
15,
271,
41378,
1669,
609,
16712,
3027,
5179,
90,
66799,
2124,
4896,
2690,
929,
25,
2193,
46822,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNormalizeExpr(t *testing.T) {
tables := []struct {
key string
op metav1.LabelSelectorOperator
values []string
expName string
}{
{
"role",
metav1.LabelSelectorOpIn,
[]string{"db", "app"},
fmt.Sprintf("%s %s %s", "role", metav1.LabelSelectorOpIn, []string{"db", "app"}),
},
{... | explode_data.jsonl/82437 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 297
} | [
2830,
3393,
87824,
16041,
1155,
353,
8840,
836,
8,
341,
26481,
82,
1669,
3056,
1235,
341,
197,
23634,
257,
914,
198,
197,
39703,
414,
77520,
16,
4679,
5877,
18461,
198,
197,
45939,
220,
3056,
917,
198,
197,
48558,
675,
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... | 3 |
func TestRangeLookupUseReverse(t *testing.T) {
defer leaktest.AfterTest(t)
store, stopper := createTestStore(t)
defer stopper.Stop()
// Init test ranges:
// ["","a"), ["a","c"), ["c","e"), ["e","g") and ["g","\xff\xff").
splits := []roachpb.AdminSplitRequest{
adminSplitArgs(roachpb.Key("g"), roachpb.Key("g")),... | explode_data.jsonl/8002 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1566
} | [
2830,
3393,
6046,
34247,
10253,
45695,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
340,
57279,
11,
2936,
712,
1669,
1855,
2271,
6093,
1155,
340,
16867,
2936,
712,
30213,
2822,
197,
322,
15690,
1273,
21283,
510,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGocloak_AddRealmRoleToUser_DeleteRealmRoleFromUser(t *testing.T) {
t.Parallel()
cfg := GetConfig(t)
client := NewClientWithDebug(t)
token := GetAdminToken(t, client)
tearDownUser, userID := CreateUser(t, client)
defer tearDownUser()
tearDownRole, roleName := CreateRealmRole(t, client)
defer tearDownRo... | explode_data.jsonl/79548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 325
} | [
2830,
3393,
38,
509,
385,
585,
21346,
64290,
9030,
1249,
1474,
57418,
64290,
9030,
3830,
1474,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50286,
1669,
2126,
2648,
1155,
340,
25291,
1669,
1532,
2959,
2354,
7939,
1155,
340,
439... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCharsetDecoderError(t *testing.T) {
dec := &WordDecoder{
CharsetReader: func(charset string, input io.Reader) (io.Reader, error) {
return nil, errors.New("Test error")
},
}
if _, err := dec.DecodeHeader("=?charset?Q?foo?="); err == nil {
t.Error("DecodeHeader should return an error")
}
} | explode_data.jsonl/36207 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 123
} | [
2830,
3393,
78172,
20732,
1454,
1155,
353,
8840,
836,
8,
341,
197,
8169,
1669,
609,
10879,
20732,
515,
197,
197,
78172,
5062,
25,
2915,
6933,
746,
914,
11,
1946,
6399,
47431,
8,
320,
815,
47431,
11,
1465,
8,
341,
298,
853,
2092,
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 TestParseConnectedSlaveString(t *testing.T) {
tsts := []slaveData{
{k: "slave0", v: "ip=10.254.11.1,port=6379,state=online,offset=1751844676,lag=0", offset: 1751844676, ip: "10.254.11.1", port: "6379", state: "online", ok: true, lag: 0},
{k: "slave0", v: "ip=2a00:1450:400e:808::200e,port=6379,state=online,off... | explode_data.jsonl/46985 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 687
} | [
2830,
3393,
14463,
21146,
95960,
703,
1155,
353,
8840,
836,
8,
341,
3244,
36279,
1669,
3056,
52505,
1043,
515,
197,
197,
69094,
25,
330,
52505,
15,
497,
348,
25,
330,
573,
28,
16,
15,
13,
17,
20,
19,
13,
16,
16,
13,
16,
96898,
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... | 8 |
func TestFormatParDoError(t *testing.T) {
got := formatParDoError(testFunction, 2, 1)
want := "beam.testFunction has 2 outputs, but ParDo requires 1 outputs, use ParDo2 instead."
if !strings.Contains(got, want) {
t.Errorf("formatParDoError(testFunction,2,1) = %v, want = %v", got, want)
}
} | explode_data.jsonl/29427 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
4061,
4272,
5404,
1454,
1155,
353,
8840,
836,
8,
341,
3174,
354,
1669,
3561,
4272,
5404,
1454,
8623,
5152,
11,
220,
17,
11,
220,
16,
340,
50780,
1669,
330,
53871,
5958,
5152,
702,
220,
17,
16275,
11,
714,
4270,
5404,
746... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProductDb_Save(t *testing.T){
setUp()
defer Db.Close()
productDb := db.NewProductDb(Db)
product := application.NewProduct()
product.Name = "Product Test"
product.Price = 25
productResult, err := productDb.Save(product)
require.Nil(t, err)
require.Equal(t, product.Name, productResult.GetName())
r... | explode_data.jsonl/58346 | {
"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,
4816,
7994,
78746,
1155,
353,
8840,
836,
1264,
8196,
2324,
741,
16867,
11988,
10421,
741,
69288,
7994,
1669,
2927,
7121,
4816,
7994,
52169,
692,
69288,
1669,
3766,
7121,
4816,
741,
1572,
69288,
2967,
284,
330,
4816,
3393,
698,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestText(t *testing.T) {
t.Parallel()
ctx, cancel := testAllocate(t, "form.html")
defer cancel()
tests := []struct {
sel string
by QueryOption
exp string
}{
{"#foo", ByID, "insert"},
{"body > form > span", ByQueryAll, "insert"},
{"body > form > span:nth-child(2)", ByQuery, "keyword"},
{"/html... | explode_data.jsonl/59468 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 327
} | [
2830,
3393,
1178,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20985,
11,
9121,
1669,
1273,
75380,
1155,
11,
330,
627,
2564,
1138,
16867,
9121,
2822,
78216,
1669,
3056,
1235,
341,
197,
1903,
301,
914,
198,
197,
197,
1694,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestSliceList(t *testing.T) {
l := SliceList[int]([]int{1, 2, 3, 4, 5})
testutil.Equal(t, 5, l.Len())
l.Append(6)
testutil.Equal(t, 6, l.Len())
v, _ := l.Pop()
testutil.Equal(t, 5, l.Len())
testutil.Equal(t, 6, v)
v, _ = l.PopFront()
testutil.Equal(t, 4, l.Len())
testutil.Equal(t, 1, v)
v = l.Remove(... | explode_data.jsonl/3737 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 313
} | [
2830,
3393,
33236,
852,
1155,
353,
8840,
836,
8,
341,
8810,
1669,
56476,
852,
18640,
9533,
1294,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
3518,
18185,
1314,
12808,
1155,
11,
220,
20,
11,
326,
65819,
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... | 1 |
func TestClosestPoint(t *testing.T) {
b0, b1 := newBody(NewBox(0.5, 0.5, 0.5)), newBody(NewBox(1, 1, 1))
b0.World().Loc.SetS(0, 0, 1.49)
con := newContactPair(b0, b1)
_, _, pocs := collideBoxBox(b0, b1, con.pocs[0:4])
con.pocs = pocs
for _, cp := range pocs {
cp.prepForSolver(con)
}
cp0, cp2 := pocs[0], pocs[... | explode_data.jsonl/4954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 248
} | [
2830,
3393,
7925,
267,
2609,
1155,
353,
8840,
836,
8,
341,
2233,
15,
11,
293,
16,
1669,
501,
5444,
35063,
1611,
7,
15,
13,
20,
11,
220,
15,
13,
20,
11,
220,
15,
13,
20,
5731,
501,
5444,
35063,
1611,
7,
16,
11,
220,
16,
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... | 4 |
func TestOverrideAndroidTest(t *testing.T) {
ctx, _ := testJava(t, `
android_app {
name: "foo",
srcs: ["a.java"],
package_name: "com.android.foo",
sdk_version: "current",
}
override_android_app {
name: "bar",
base: "foo",
package_name: "com.android.bar",
}
android_test {
name: "foo_... | explode_data.jsonl/58499 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1115
} | [
2830,
3393,
2177,
21831,
2271,
1155,
353,
8840,
836,
8,
341,
20985,
11,
716,
1669,
1273,
15041,
1155,
11,
22074,
197,
197,
5954,
8191,
341,
298,
11609,
25,
330,
7975,
756,
298,
41144,
82,
25,
4383,
64,
10848,
8097,
298,
197,
1722,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestInsertNode(t *testing.T) {
root := new(dag.ProtoNode)
e := NewDagEditor(root, nil)
testInsert(t, e, "a", "anodefortesting", false, "")
testInsert(t, e, "a/b", "data", false, "")
testInsert(t, e, "a/b/c/d/e", "blah", false, "no link by that name")
testInsert(t, e, "a/b/c/d/e", "foo", true, "")
testInser... | explode_data.jsonl/51622 | {
"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,
13780,
1955,
1155,
353,
8840,
836,
8,
341,
33698,
1669,
501,
1500,
351,
7763,
983,
1955,
340,
7727,
1669,
1532,
35,
351,
9410,
9206,
11,
2092,
692,
18185,
13780,
1155,
11,
384,
11,
330,
64,
497,
330,
276,
534,
3969,
5985... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenesisAccountValidate(t *testing.T) {
addr := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address())
tests := []struct {
name string
acc GenesisAccount
expErr error
}{
{
"valid account",
NewGenesisAccountRaw(addr, sdk.NewCoins(), sdk.NewCoins(), 0, 0, "", ""),
nil,
},
{
"val... | explode_data.jsonl/48813 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 688
} | [
2830,
3393,
84652,
7365,
17926,
1155,
353,
8840,
836,
8,
341,
53183,
1669,
45402,
77538,
4286,
10478,
4672,
17,
20,
21,
74,
16,
65384,
32124,
1592,
1005,
29162,
1592,
1005,
4286,
2398,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUpdateBuilder(t *testing.T) {
test.CmdValidator(
t,
UpdateBuilder(),
0,
[]string{flag.Output, flag.ProjectID, flag.Username, flag.Password, flag.Status, flag.SSL, flag.Encryption, flag.ExcludedNamespace,
flag.IncludedNamespace, flag.Provisioned, flag.AuthMechanism, flag.StorageEngine, flag.SyncSour... | explode_data.jsonl/36620 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
4289,
3297,
1155,
353,
8840,
836,
8,
341,
18185,
64512,
14256,
1006,
197,
3244,
345,
197,
70064,
3297,
3148,
197,
197,
15,
345,
197,
197,
1294,
917,
90,
9903,
34246,
11,
5181,
30944,
915,
11,
5181,
42777,
11,
5181,
25690,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJolokia2_MetricMbeanMatching(t *testing.T) {
config := `
[jolokia2_agent]
urls = ["%s"]
[[jolokia2_agent.metric]]
name = "mbean_name_and_object_keys"
mbean = "test1:foo=bar,fizz=buzz"
[[jolokia2_agent.metric]]
name = "mbean_name_and_unordered_object_keys"
mbean = "test2:fizz=buzz,foo=bar"
[[j... | explode_data.jsonl/5358 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1069
} | [
2830,
3393,
41,
337,
27552,
17,
1245,
16340,
44,
17479,
64430,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
22074,
197,
3809,
337,
27552,
17,
25730,
921,
197,
19320,
82,
284,
4383,
4,
82,
25912,
197,
15505,
73,
337,
27552,
17,
25730,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEmphasisMix(t *testing.T) {
var tests = []string{
"***triple emphasis***\n",
"<p><strong><em>triple emphasis</em></strong></p>\n",
"***triple\nemphasis***\n",
"<p><strong><em>triple\nemphasis</em></strong></p>\n",
"___triple emphasis___\n",
"<p><strong><em>triple emphasis</em></strong></p>\n",
... | explode_data.jsonl/57349 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 342
} | [
2830,
3393,
2269,
54149,
58083,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
917,
515,
197,
197,
1,
12210,
376,
3778,
24654,
12210,
59,
77,
756,
197,
197,
22476,
79,
1784,
4519,
1784,
336,
29,
376,
3778,
24654,
522,
336,
147... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrepareWithWindowFunction(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("set @@tidb_enable_window_function = 1")
defer tk.MustExec("set @@tidb_enable_window_function = 0")
tk.MustExec("use test")
tk.MustExec("create table window_p... | explode_data.jsonl/5506 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 325
} | [
2830,
3393,
50590,
2354,
4267,
5152,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
741,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvalidCertInIngress(t *testing.T) {
rh, cc, done := setup(t)
defer done()
// Create an invalid TLS secret
secret := &v1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: "example-tls",
Namespace: "default",
},
Type: "kubernetes.io/tls",
Data: secretdata("wrong", RSA_PRIVATE_KEY),
}
rh.OnA... | explode_data.jsonl/70754 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 999
} | [
2830,
3393,
7928,
36934,
641,
641,
2483,
1155,
353,
8840,
836,
8,
341,
7000,
71,
11,
12527,
11,
2814,
1669,
6505,
1155,
340,
16867,
2814,
2822,
197,
322,
4230,
458,
8318,
41654,
6234,
198,
197,
20474,
1669,
609,
85,
16,
74779,
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 TestCreateAPITracesExporter(t *testing.T) {
server := testutils.DatadogServerMock()
defer server.Close()
logger := zap.NewNop()
factories, err := componenttest.ExampleComponents()
require.NoError(t, err)
factory := NewFactory()
factories.Exporters[configmodels.Type(typeStr)] = factory
cfg, err := config... | explode_data.jsonl/73029 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 306
} | [
2830,
3393,
4021,
2537,
952,
81,
2434,
88025,
1155,
353,
8840,
836,
8,
341,
41057,
1669,
1273,
6031,
909,
266,
329,
538,
5475,
11571,
741,
16867,
3538,
10421,
2822,
17060,
1669,
32978,
7121,
45,
453,
2822,
1166,
52893,
11,
1848,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWhereFloat32(t *testing.T) {
v := &Value{data: []float32{float32(1), float32(1), float32(1), float32(1), float32(1), float32(1)}}
selected := v.WhereFloat32(func(i int, val float32) bool {
return i%2 == 0
}).MustFloat32Slice()
assert.Equal(t, 3, len(selected))
} | explode_data.jsonl/23508 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 115
} | [
2830,
3393,
9064,
5442,
18,
17,
1155,
353,
8840,
836,
8,
1476,
5195,
1669,
609,
1130,
90,
691,
25,
3056,
3649,
18,
17,
90,
3649,
18,
17,
7,
16,
701,
2224,
18,
17,
7,
16,
701,
2224,
18,
17,
7,
16,
701,
2224,
18,
17,
7,
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 TestInitializeContainerOrderingWithError(t *testing.T) {
containerWithVolumeError := &apicontainer.Container{
Name: "myName",
Image: "image:tag",
VolumesFrom: []apicontainer.VolumeFrom{{SourceContainer: "dummyContainer"}},
}
containerWithLinkError1 := &apicontainer.Container{
Name: "myNam... | explode_data.jsonl/37263 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 501
} | [
2830,
3393,
9928,
4502,
4431,
287,
66102,
1155,
353,
8840,
836,
8,
341,
53290,
2354,
18902,
1454,
1669,
609,
391,
51160,
1743,
33672,
515,
197,
21297,
25,
286,
330,
2408,
675,
756,
197,
53397,
25,
981,
330,
1805,
25,
4578,
756,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTransferInputNotState(t *testing.T) {
intf := interface{}(&TransferInput{})
if _, ok := intf.(verify.State); ok {
t.Fatalf("shouldn't be marked as state")
}
} | explode_data.jsonl/31626 | {
"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,
21970,
2505,
2623,
1397,
1155,
353,
8840,
836,
8,
341,
2084,
69,
1669,
3749,
6257,
2099,
21970,
2505,
37790,
743,
8358,
5394,
1669,
93706,
12832,
12446,
18942,
1215,
5394,
341,
197,
3244,
30762,
445,
5445,
77,
944,
387,
1286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBadRefresh(t *testing.T) {
s2 := zktest.New()
z, ch, _ := s2.Connect()
badForce := errors.New("nope")
c := 0
z.SetErrorCheck(func(s string) error {
if s == "childrenw" {
c++
}
if c > 2 && s == "childrenw" {
return badForce
}
return nil
})
zkConnFunc := ZkConnCreatorFunc(func() (ZkConn,... | explode_data.jsonl/46865 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 616
} | [
2830,
3393,
17082,
14567,
1155,
353,
8840,
836,
8,
341,
1903,
17,
1669,
94528,
1944,
7121,
741,
20832,
11,
521,
11,
716,
1669,
274,
17,
43851,
2822,
2233,
329,
18573,
1669,
5975,
7121,
445,
2152,
375,
1138,
1444,
1669,
220,
15,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestEventfNoNamespace(t *testing.T) {
testPod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
SelfLink: "/api/version/pods/foo",
Name: "foo",
UID: "bar",
},
}
testRef, err := ref.GetPartialReference(scheme.Scheme, testPod, "spec.containers[2]")
if err != nil {
t.Fatal(err)
}
table := []str... | explode_data.jsonl/25870 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1205
} | [
2830,
3393,
1556,
69,
2753,
22699,
1155,
353,
8840,
836,
8,
341,
18185,
23527,
1669,
609,
85,
16,
88823,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
7568,
490,
3939,
25,
3521,
2068,
64413,
4322,
29697,
60555,
756,
298,
212... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSpanSlice_CopyTo(t *testing.T) {
dest := NewSpanSlice()
// Test CopyTo to empty
NewSpanSlice().CopyTo(dest)
assert.EqualValues(t, NewSpanSlice(), dest)
// Test CopyTo larger slice
generateTestSpanSlice().CopyTo(dest)
assert.EqualValues(t, generateTestSpanSlice(), dest)
// Test CopyTo same size slice
... | explode_data.jsonl/63257 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
12485,
33236,
77637,
1249,
1155,
353,
8840,
836,
8,
341,
49616,
1669,
1532,
12485,
33236,
741,
197,
322,
3393,
14540,
1249,
311,
4287,
198,
197,
3564,
12485,
33236,
1005,
12106,
1249,
27010,
340,
6948,
12808,
6227,
1155,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseBuildTargetFlag(t *testing.T) {
androidArchs := strings.Join(allArchs("android"), ",")
iosArchs := strings.Join(allArchs("ios"), ",")
tests := []struct {
in string
wantErr bool
wantOS string
wantArchs string
}{
{"android", false, "android", androidArchs},
{"android,android/arm... | explode_data.jsonl/33975 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 531
} | [
2830,
3393,
14463,
11066,
6397,
12135,
1155,
353,
8840,
836,
8,
341,
197,
5954,
18727,
82,
1669,
9069,
22363,
20388,
18727,
82,
445,
5954,
3975,
3670,
1138,
197,
3530,
18727,
82,
1669,
9069,
22363,
20388,
18727,
82,
445,
3530,
3975,
155... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBoringServerCipherSuites(t *testing.T) {
serverConfig := testConfig.Clone()
serverConfig.CipherSuites = allCipherSuites()
serverConfig.Certificates = make([]Certificate, 1)
for _, id := range allCipherSuites() {
if isECDSA(id) {
serverConfig.Certificates[0].Certificate = [][]byte{testECDSACertificate... | explode_data.jsonl/9397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 538
} | [
2830,
3393,
33,
5503,
5475,
79460,
62898,
288,
1155,
353,
8840,
836,
8,
341,
41057,
2648,
1669,
1273,
2648,
64463,
741,
41057,
2648,
727,
10558,
62898,
288,
284,
678,
79460,
62898,
288,
741,
41057,
2648,
727,
529,
24405,
284,
1281,
1055... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRow(t *testing.T) {
user1 := User{Name: "RowUser1", Age: 1, Birthday: parseTime("2000-1-1")}
user2 := User{Name: "RowUser2", Age: 10, Birthday: parseTime("2010-1-1")}
user3 := User{Name: "RowUser3", Age: 20, Birthday: parseTime("2020-1-1")}
DB.Save(&user1).Save(&user2).Save(&user3)
row := DB.Table("users... | explode_data.jsonl/28046 | {
"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,
3102,
1155,
353,
8840,
836,
8,
341,
19060,
16,
1669,
2657,
63121,
25,
330,
3102,
1474,
16,
497,
13081,
25,
220,
16,
11,
36240,
25,
4715,
1462,
445,
17,
15,
15,
15,
12,
16,
12,
16,
42132,
19060,
17,
1669,
2657,
63121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAtomicUpdate(t *testing.T) {
fakeClient := NewFakeEtcdClient(t)
fakeClient.TestIndex = true
codec := scheme
helper := EtcdHelper{fakeClient, codec, runtime.NewJSONBaseResourceVersioner()}
// Create a new node.
fakeClient.ExpectNotFoundGet("/some/key")
obj := &TestResource{JSONBase: api.JSONBase{ID: "fo... | explode_data.jsonl/28146 | {
"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,
65857,
4289,
1155,
353,
8840,
836,
8,
341,
1166,
726,
2959,
1669,
1532,
52317,
31860,
4385,
2959,
1155,
340,
1166,
726,
2959,
8787,
1552,
284,
830,
198,
43343,
66,
1669,
12859,
198,
9598,
2947,
1669,
18888,
4385,
5511,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTransformEnums(t *testing.T) {
schema := []byte(`
syntax = "proto3";
package test;
enum Corpus {
UNIVERSAL = 0;
WEB = 1;
IMAGES = 2;
LOCAL = 3;
NEWS = 4;
PRODUCTS = 5;
VIDEO = 6;
}
`)
input := new(bytes.Buffer)
input.Write(schema)
output := new(bytes.Buffer)
transformer :=... | explode_data.jsonl/2069 | {
"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,
8963,
71586,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
1669,
3056,
3782,
61528,
197,
1903,
13662,
284,
330,
15110,
18,
876,
197,
197,
1722,
1273,
401,
197,
37777,
75734,
341,
298,
76143,
38510,
969,
284,
220,
15,
280,
298,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_DecodeVaultConfig(t *testing.T) {
cases := map[string]struct {
yaml string
expected *secrets.VaultConfig
}{
"happy path - userpass auth": {
yaml: userpassYaml,
expected: &secrets.VaultConfig{
Enabled: true,
Url: "https://vault.com",
AuthMethod: "USERPASS",
Usernam... | explode_data.jsonl/4150 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 655
} | [
2830,
3393,
78668,
534,
79177,
2648,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
2415,
14032,
60,
1235,
341,
197,
14522,
9467,
914,
198,
197,
42400,
353,
325,
52710,
5058,
945,
2648,
198,
197,
59403,
197,
197,
1,
56521,
1815,
481,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetAgentValue(t *testing.T) {
// Test nil safe
var attrs *Attributes
outstr, outother := attrs.GetAgentValue(attributeRequestURI, destTxnTrace)
if outstr != "" || outother != nil {
t.Error(outstr, outother)
}
c := sampleAttributeConfigInput
c.TransactionTracer.Exclude = []string{"request.uri"}
cfg :... | explode_data.jsonl/20605 | {
"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,
1949,
16810,
1130,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
2092,
6092,
198,
2405,
16204,
353,
10516,
198,
13967,
495,
11,
700,
1575,
1669,
16204,
2234,
16810,
1130,
45407,
1900,
10301,
11,
3201,
31584,
77,
6550,
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... | 9 |
func TestRouteNameFuncs(t *testing.T) {
v4CIDR := "10.0.0.1/16"
v6CIDR := "fd3e:5f02:6ec0:30ba::/64"
nodeName := "thisNode"
routeName := mapNodeNameToRouteName(types.NodeName(nodeName), v4CIDR)
outNodeName := mapRouteNameToNodeName(routeName)
assert.Equal(t, string(outNodeName), nodeName)
routeName = mapNodeNa... | explode_data.jsonl/70936 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 191
} | [
2830,
3393,
4899,
675,
9626,
82,
1155,
353,
8840,
836,
8,
341,
5195,
19,
54146,
49,
1669,
330,
16,
15,
13,
15,
13,
15,
13,
16,
14,
16,
21,
698,
5195,
21,
54146,
49,
1669,
330,
6902,
18,
68,
25,
20,
69,
15,
17,
25,
21,
757,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFailGracefullyMissingArg(t *testing.T) {
err := add("localboot", []string{})
if err.Error() != "you need to provide method" {
t.Error("error message should be: you need to provide method")
}
err = add("localboot", []string{"path"})
if err.Error() != "you need to pass DeviceGUID and Kernel path" {
t.E... | explode_data.jsonl/25076 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 312
} | [
2830,
3393,
19524,
86543,
3641,
25080,
2735,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
912,
445,
2438,
4619,
497,
3056,
917,
37790,
743,
1848,
6141,
368,
961,
330,
9330,
1184,
311,
3410,
1714,
1,
341,
197,
3244,
6141,
445,
841,
1943,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStream_GetCallbackID(t *testing.T) {
t.Run("test", func(t *testing.T) {
assert := base.NewAssert(t)
for i := 0; i < 1000; i++ {
v := NewStream()
id := rand.Uint64()
v.SetCallbackID(id)
assert(v.GetCallbackID()).Equals(id)
v.Release()
}
})
} | explode_data.jsonl/21178 | {
"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,
3027,
13614,
7494,
915,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6948,
1669,
2331,
7121,
8534,
1155,
340,
197,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestTaskUpdateNoCert(t *testing.T) {
gd, err := startDispatcher(DefaultConfig())
assert.NoError(t, err)
defer gd.Close()
testTask1 := &api.Task{
ID: "testTask1",
}
err = gd.Store.Update(func(tx store.Tx) error {
assert.NoError(t, store.CreateTask(tx, testTask1))
return nil
})
assert.NoError(t, err)
... | explode_data.jsonl/13856 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 336
} | [
2830,
3393,
6262,
4289,
2753,
36934,
1155,
353,
8840,
836,
8,
341,
3174,
67,
11,
1848,
1669,
1191,
21839,
87874,
2648,
2398,
6948,
35699,
1155,
11,
1848,
340,
16867,
32630,
10421,
2822,
18185,
6262,
16,
1669,
609,
2068,
28258,
515,
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 TestApplyAndReturnValidatorSetUpdatesMultipleValueChange(t *testing.T) {
app, ctx, addrs, _ := bootstrapValidatorTest(t, 1000, 20)
powers := []int64{10, 20}
var validators [2]types.Validator
for i, power := range powers {
validators[i] = types.NewValidator(sdk.ValAddress(addrs[i]), PKs[i], types.Descriptio... | explode_data.jsonl/6105 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 520
} | [
2830,
3393,
28497,
3036,
5598,
14256,
1649,
37091,
32089,
1130,
4072,
1155,
353,
8840,
836,
8,
341,
28236,
11,
5635,
11,
912,
5428,
11,
716,
1669,
26925,
14256,
2271,
1155,
11,
220,
16,
15,
15,
15,
11,
220,
17,
15,
692,
3223,
15965,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConsoleSocket(t *testing.T) {
for name, conf := range configs(t, all...) {
t.Run(name, func(t *testing.T) {
spec := testutil.NewSpecWithArgs("true")
spec.Process.Terminal = true
_, bundleDir, cleanup, err := testutil.SetupContainer(spec, conf)
if err != nil {
t.Fatalf("error setting up conta... | explode_data.jsonl/61626 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 451
} | [
2830,
3393,
12372,
10286,
1155,
353,
8840,
836,
8,
341,
2023,
829,
11,
2335,
1669,
2088,
42309,
1155,
11,
678,
32574,
341,
197,
3244,
16708,
3153,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
98100,
1669,
1273,
1314,
7121,
8327,
2354,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTerragruntRemoteStateCodegenDoesNotGenerateWithSkip(t *testing.T) {
t.Parallel()
generateTestCase := filepath.Join(TEST_FIXTURE_CODEGEN_PATH, "remote-state", "skip")
cleanupTerraformFolder(t, generateTestCase)
cleanupTerragruntFolder(t, generateTestCase)
runTerragrunt(t, fmt.Sprintf("terragrunt apply -... | explode_data.jsonl/10171 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 177
} | [
2830,
3393,
51402,
68305,
3850,
24703,
1397,
2078,
4370,
21468,
2623,
31115,
2354,
35134,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3174,
13220,
16458,
1669,
26054,
22363,
50320,
42635,
41486,
10020,
11085,
7944,
11,
330,
18147... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_GetOneOrder(t *testing.T) {
ord, err := k.GetOneOrder("ODCRMQ-RDEID-CY334C", goex.BTC_USD)
assert.Nil(t, err)
t.Log(ord)
} | explode_data.jsonl/44497 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 70
} | [
2830,
3393,
81165,
3366,
13614,
3966,
4431,
1155,
353,
8840,
836,
8,
341,
197,
539,
11,
1848,
1669,
595,
2234,
3966,
4431,
445,
2069,
8973,
35169,
10911,
1150,
915,
7658,
56,
18,
18,
19,
34,
497,
728,
327,
1785,
7749,
13467,
35,
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 |
func TestSetInitialVersion(t *testing.T) {
db := dbm.NewMemDB()
multi := newMultiStoreWithMounts(db, types.PruneNothing)
require.NoError(t, multi.LoadLatestVersion())
multi.SetInitialVersion(5)
require.Equal(t, int64(5), multi.initialVersion)
multi.Commit()
require.Equal(t, int64(5), multi.LastCommitID().Vers... | explode_data.jsonl/44878 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
1649,
6341,
5637,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
2927,
76,
7121,
18816,
3506,
741,
2109,
7068,
1669,
501,
20358,
6093,
2354,
16284,
82,
9791,
11,
4494,
17947,
2886,
23780,
692,
17957,
35699,
1155,
11,
7299,
13969... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAllSchemesMet(t *testing.T) {
// Create of a map of scheme names and whether they are met
schemes := map[string]bool{
"a": true,
"b": true,
"c": false,
}
// Create the test cases
tc := []struct {
name string
error bool
}{
{
name: "/ok",
error: false,
},
{
name: "/error",
e... | explode_data.jsonl/41698 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 905
} | [
2830,
3393,
2403,
50,
66346,
34673,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
315,
264,
2415,
315,
12859,
5036,
323,
3425,
807,
525,
2270,
198,
1903,
66346,
1669,
2415,
14032,
96436,
515,
197,
197,
56693,
788,
830,
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... | 8 |
func TestAbstractClassMethod(t *testing.T) {
src := `<? abstract class Foo{ abstract public function bar(); }`
expected := &node.Root{
Position: &position.Position{
StartLine: 1,
EndLine: 1,
StartPos: 4,
EndPos: 56,
},
Stmts: []node.Node{
&stmt.Class{
Position: &position.Position{
... | explode_data.jsonl/65931 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1233
} | [
2830,
3393,
15949,
1957,
3523,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
1565,
1316,
8115,
536,
33428,
90,
8115,
584,
729,
3619,
2129,
335,
19324,
42400,
1669,
609,
3509,
45345,
515,
197,
197,
3812,
25,
609,
3487,
21954,
515,
298,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetSpotBillDetailsForCurrency(t *testing.T) {
request := okgroup.GetSpotBillDetailsForCurrencyRequest{
Currency: currency.BTC.String(),
Limit: 100,
}
_, err := o.GetSpotBillDetailsForCurrency(request)
testStandardErrorHandling(t, err)
} | explode_data.jsonl/30153 | {
"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,
1949,
47049,
27476,
7799,
2461,
26321,
1155,
353,
8840,
836,
8,
341,
23555,
1669,
5394,
4074,
2234,
47049,
27476,
7799,
2461,
26321,
1900,
515,
197,
6258,
5088,
25,
11413,
1785,
7749,
6431,
3148,
197,
15070,
2353,
25,
262,
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 TestSizeGenerateConstArg(t *testing.T) {
target, rs, iters := initRandomTargetTest(t, "test", "64")
r := newRand(target, rs)
ForeachType(target.Syscalls, func(typ Type, ctx *TypeCtx) {
if _, ok := typ.(*IntType); !ok {
return
}
bits := typ.TypeBitSize()
limit := uint64(1<<bits - 1)
for i := 0; i < ... | explode_data.jsonl/73780 | {
"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,
1695,
31115,
19167,
2735,
1155,
353,
8840,
836,
8,
341,
28861,
11,
10036,
11,
432,
388,
1669,
2930,
13999,
6397,
2271,
1155,
11,
330,
1944,
497,
330,
21,
19,
1138,
7000,
1669,
501,
56124,
8637,
11,
10036,
340,
12727,
8539,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_Token_TextNotEquals(t *testing.T) {
token := Token{
text: []Text{
[]byte("one"),
[]byte("two"),
},
}
assert.False(t, token.TextEquals("one-two"))
} | explode_data.jsonl/78429 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 76
} | [
2830,
3393,
1139,
1679,
20550,
2623,
4315,
1155,
353,
8840,
836,
8,
341,
43947,
1669,
9660,
515,
197,
15425,
25,
3056,
1178,
515,
298,
197,
1294,
3782,
445,
603,
4461,
298,
197,
1294,
3782,
445,
19789,
4461,
197,
197,
1583,
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 |
func TestExists(t *testing.T) {
client := setupTestClientAndCreateIndexAndAddDocs(t) //, SetTraceLog(log.New(os.Stdout, "", 0)))
exists, err := client.Exists().Index(testIndexName).Type("comment").Id("1").Parent("tweet").Do()
if err != nil {
t.Fatal(err)
}
if !exists {
t.Fatal("expected document to exist")
}... | explode_data.jsonl/43657 | {
"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,
15575,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
6505,
2271,
2959,
3036,
4021,
1552,
3036,
2212,
63107,
1155,
8,
442,
11,
2573,
6550,
2201,
12531,
7121,
9638,
83225,
11,
7342,
220,
15,
19235,
8122,
1671,
11,
1848,
1669,
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 TestServerKeepAliveAfterWriteError(t *testing.T) {
if testing.Short() {
t.Skip("skipping in -short mode")
}
defer afterTest(t)
const numReq = 3
addrc := make(chan string, numReq)
ts := httptest.NewUnstartedServer(HandlerFunc(func(w ResponseWriter, r *Request) {
addrc <- r.RemoteAddr
time.Sleep(500 * ti... | explode_data.jsonl/22479 | {
"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,
5475,
19434,
32637,
6025,
7985,
1454,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
304,
481,
8676,
3856,
1138,
197,
532,
16867,
1283,
2271,
1155,
340,
4777,
1629,
27234,
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 TestClustersReplicationFactorMaxLower(t *testing.T) {
ctx := context.Background()
if nClusters < 5 {
t.Skip("Need at least 5 peers")
}
clusters, mock := createClusters(t)
defer shutdownClusters(t, clusters, mock)
for _, c := range clusters {
c.config.ReplicationFactorMin = 1
c.config.ReplicationFactor... | explode_data.jsonl/66613 | {
"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,
94992,
18327,
1693,
20661,
5974,
9053,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
743,
308,
94992,
366,
220,
20,
341,
197,
3244,
57776,
445,
23657,
518,
3245,
220,
20,
25029,
1138,
197,
630,
39407,
14605,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestARP(t *testing.T) {
arp := filter.NewBuilder().
LD(filter.Half, filter.ABS, 12).
JEQ(filter.Const, "", "fail", 0x806).
RET(filter.Const, 0x40000).
Label("fail").
RET(filter.Const, 0x0).
Build()
if arp.String() != test_arp {
t.Fatalf("Program mism... | explode_data.jsonl/11713 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
42793,
1155,
353,
8840,
836,
8,
341,
262,
98598,
1669,
4051,
7121,
3297,
25829,
286,
28877,
19704,
3839,
3104,
11,
4051,
875,
7347,
11,
220,
16,
17,
4292,
286,
619,
54007,
19704,
4801,
267,
11,
7342,
330,
18403,
497,
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 TestDevAutoSync(t *testing.T) {
MarkIntegrationTest(t, CanRunWithoutGcp)
dir := "examples/jib-sync/"
tests := []struct {
description string
configFile string
profiles []string
uniqueStr string
}{
{
description: "jib maven auto sync",
configFile: "skaffold-maven.yaml",
uniqueStr: "... | explode_data.jsonl/4865 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1192
} | [
2830,
3393,
14592,
13253,
12154,
1155,
353,
8840,
836,
8,
341,
197,
8949,
52464,
2271,
1155,
11,
2980,
6727,
26040,
38,
4672,
692,
48532,
1669,
330,
51668,
4437,
579,
65034,
85312,
78216,
1669,
3056,
1235,
341,
197,
42407,
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 TestIssue26977(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
result := tk.MustQuery("select a + 1 as f from (select cast(0xfffffffffffffff0 as unsigned) as a union select cast(1 as unsigned)) t having f != 2;")
result.Check(testkit.Rows("184467440... | explode_data.jsonl/65606 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
42006,
17,
21,
24,
22,
22,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
9559,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNgramEditDist(t *testing.T) {
argument1 := "example text"
argument2 := "exampl text"
want := 1
got := ngramEditDist(argument1, argument2)
if got != want {
t.Errorf("ngramEditDist(%#v, %#v) = %d, wanted %d", argument1, argument2, got, want)
}
} | explode_data.jsonl/11614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
45,
1520,
4036,
23356,
1155,
353,
8840,
836,
8,
341,
197,
14479,
16,
1669,
330,
8687,
1467,
698,
197,
14479,
17,
1669,
330,
41616,
500,
1467,
698,
50780,
1669,
220,
16,
198,
3174,
354,
1669,
308,
1520,
4036,
23356,
68485,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTicker_C4(t *testing.T) {
//return
product := "btc_" + common.NativeToken
timeMap := GetTimes()
kline15s := prepareKlineMx(product, 15*60, 100.0, 100.0, 100.0, 100.0, []float64{100}, timeMap["-24h"], timeMap["-60m"])
kline1s1 := prepareKlineMx(product, 60, 40.0, 40.0, 40.0, 40.0, []float64{40, 60}, timeM... | explode_data.jsonl/37823 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 914
} | [
2830,
3393,
87278,
920,
19,
1155,
353,
8840,
836,
8,
341,
197,
322,
689,
271,
69288,
1669,
330,
92634,
18771,
488,
4185,
68624,
3323,
198,
21957,
2227,
1669,
2126,
18889,
741,
16463,
1056,
16,
20,
82,
1669,
10549,
42,
1056,
44,
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... | 5 |
func Test_TransactionLostRequest(t *testing.T) {
mct := newMemcacheTest(defaultConfig)
trans := mct.genTransaction(
nil,
textParseNoFail(t, "STORED\r\n"),
)
assert.Equal(t, common.CLIENT_ERROR_STATUS, trans.Status)
assert.Equal(t, uint64(0), trans.BytesOut)
assert.Equal(t, uint64(8), trans.BytesIn)
assert.Eq... | explode_data.jsonl/15062 | {
"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,
34932,
1311,
47253,
1900,
1155,
353,
8840,
836,
8,
341,
2109,
302,
1669,
501,
18816,
9360,
2271,
18978,
2648,
340,
72453,
1669,
296,
302,
22822,
8070,
1006,
197,
84131,
345,
197,
15425,
14463,
2753,
19524,
1155,
11,
330,
439... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrintRoleBindingRestriction(t *testing.T) {
buf := bytes.NewBuffer([]byte{})
rbrs := mockRoleBindingRestriction()
tests := []struct {
name string
rbr *authorizationapi.RoleBindingRestriction
expectedOut string
expectedErr error
}{
{
name: "output check",
rbr: ... | explode_data.jsonl/61176 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 334
} | [
2830,
3393,
8994,
9030,
15059,
50360,
2479,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
5820,
7121,
4095,
10556,
3782,
37790,
7000,
1323,
82,
1669,
7860,
9030,
15059,
50360,
2479,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
286,
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... | 4 |
func TestMongoDB_ConfigSvrDSN(t *testing.T) {
mongodb := &MongoDB{
ObjectMeta: metav1.ObjectMeta{
Name: "demo-name",
Namespace: "demo",
Labels: map[string]string{
"app": "kubedb",
},
},
Spec: MongoDBSpec{
Version: "3.6-v2",
ShardTopology: &MongoDBShardingTopology{
Shard: MongoDBSha... | explode_data.jsonl/37754 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 590
} | [
2830,
3393,
54998,
3506,
35412,
50,
18920,
5936,
45,
1155,
353,
8840,
836,
8,
341,
2109,
21225,
1669,
609,
54998,
3506,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
414,
330,
25762,
11494,
756,
298,
90823,
25,
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... | 1 |
func TestTypeSystem_SchemaMustHaveObjectRootTypes_AcceptsASchemaWhoseQueryAndMutationTypesAreObjectType(t *testing.T) {
mutationObject := graphql.NewObject(graphql.ObjectConfig{
Name: "Mutation",
Fields: graphql.Fields{
"edit": &graphql.Field{
Type: graphql.String,
},
},
})
_, err := graphql.NewSchem... | explode_data.jsonl/79137 | {
"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,
929,
2320,
1098,
3416,
31776,
12116,
1190,
8439,
4173,
1566,
66,
57771,
1911,
3416,
1639,
960,
2859,
3036,
53998,
4173,
11526,
49530,
1155,
353,
8840,
836,
8,
341,
2109,
22705,
1190,
1669,
48865,
7121,
1190,
24312,
1470,
8348,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidationNotEqualError_Error(t *testing.T) {
tests := []struct {
name string
v ValidationNotEqualError
want string
}{
{"Test Error", ValidationNotEqualError{}, "validation error"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.v.Error(); got != tt.want {
... | explode_data.jsonl/32121 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
13799,
2623,
2993,
1454,
28651,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
5195,
262,
18954,
2623,
2993,
1454,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
4913,
2271,
4600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAgent_PassCheck_ACLDeny(t *testing.T) {
t.Parallel()
a := NewTestAgent(t.Name(), TestACLConfig())
defer a.Shutdown()
chk := &structs.HealthCheck{Name: "test", CheckID: "test"}
chkType := &structs.CheckType{TTL: 15 * time.Second}
if err := a.AddCheck(chk, chkType, false, ""); err != nil {
t.Fatalf("err... | explode_data.jsonl/33618 | {
"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,
16810,
1088,
395,
3973,
97627,
23619,
88,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
1669,
1532,
2271,
16810,
1155,
2967,
1507,
3393,
55393,
2648,
2398,
16867,
264,
10849,
18452,
2822,
23049,
74,
1669,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewMetric(t *testing.T) {
framework.
NewTest(t).
RequiresEnvironment(environment.Kube).
Run(func(ctx framework.TestContext) {
ctx.ApplyConfigOrFail(ctx, "",
bookinfo.DoubleMetric.LoadOrFail(ctx))
defer ctx.DeleteConfigOrFail(ctx, "",
bookinfo.DoubleMetric.LoadOrFail(ctx))
util.AllowRul... | explode_data.jsonl/51139 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 365
} | [
2830,
3393,
3564,
54310,
1155,
353,
8840,
836,
8,
341,
1166,
5794,
624,
197,
197,
3564,
2271,
1155,
4292,
197,
197,
46961,
12723,
67591,
11352,
3760,
4292,
197,
85952,
18552,
7502,
12626,
8787,
1972,
8,
341,
298,
20985,
36051,
2648,
460... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEndOfStreamError_Error(t *testing.T) {
tests := []struct {
name string
e EndOfStreamError
want string
}{
{"Test Error", EndOfStreamError{}, "unexpected end of stream"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.e.Error(); got != tt.want {
t.Errorf("En... | explode_data.jsonl/32119 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 168
} | [
2830,
3393,
3727,
2124,
3027,
1454,
28651,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
7727,
262,
3972,
2124,
3027,
1454,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
4913,
2271,
4600,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNodeToStringNoProperties(t *testing.T) {
node := neo4j.Node{
Id: 2,
Labels: []string{`Something`},
Props: map[string]interface{}{},
}
actual := input.ToString(node)
expected := `(:Something)`
if actual != expected {
t.Fatalf(`expected '%v' but got '%v'`, expected, actual)
}
} | explode_data.jsonl/7073 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
1955,
5870,
2753,
7903,
1155,
353,
8840,
836,
8,
341,
20831,
1669,
35082,
19,
73,
21714,
515,
197,
67211,
25,
257,
220,
17,
345,
197,
197,
23674,
25,
3056,
917,
90,
63,
23087,
63,
1583,
197,
197,
5992,
25,
220,
2415,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCheckSavepointHappyCase(t *testing.T) {
httpmock.Activate()
defer httpmock.DeactivateAndReset()
ctx := context.Background()
response := SavepointResponse{
SavepointStatus: SavepointStatusResponse{
Status: SavePointInProgress,
},
}
responder, _ := httpmock.NewJsonResponder(200, response)
httpmock.... | explode_data.jsonl/32360 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
3973,
8784,
2768,
32847,
4207,
1155,
353,
8840,
836,
8,
341,
28080,
16712,
14140,
731,
741,
16867,
1758,
16712,
8934,
16856,
3036,
14828,
741,
20985,
1669,
2266,
19047,
741,
21735,
1669,
10255,
2768,
2582,
515,
197,
7568,
523,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAssertionUnmarshaledFromYAML(t *testing.T) {
assertionsYAML := `
- equal:
- notEqual:
- matchRegex:
- notMatchRegex:
- contains:
- notContains:
- isNull:
- isNotNull:
- isEmpty:
- isNotEmpty:
- isKind:
- isAPIVersion:
- hasDocuments:
`
assertionsAsMap := make([]map[string]interface{}, 13)
yaml.Unmarshal([]b... | explode_data.jsonl/62919 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 253
} | [
2830,
3393,
68639,
1806,
36239,
5838,
3830,
56,
31102,
1155,
353,
8840,
836,
8,
341,
6948,
908,
56,
31102,
1669,
22074,
12,
6144,
510,
12,
537,
2993,
510,
12,
2432,
32464,
510,
12,
537,
8331,
32464,
510,
12,
5610,
510,
12,
537,
2380... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_changeRefresh(t *testing.T) {
t.Run("valid", func(t *testing.T) {
config := newConfig()
config.view = config.views["activity"]
wg := sync.WaitGroup{}
wg.Add(1)
go func() {
v := <-config.viewCh
assert.Equal(t, v.Refresh, 5*time.Second)
wg.Done()
}()
assert.Equal(t, "Refresh: ok", chan... | explode_data.jsonl/69236 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 439
} | [
2830,
3393,
15947,
14567,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1891,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
25873,
1669,
501,
2648,
741,
197,
25873,
3792,
284,
2193,
22056,
1183,
7175,
7026,
197,
72079,
1669,
12811,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerSecureBadPassphrase(t *testing.T) {
withSSL(t, "127.0.0.1", "foo")
name := path.Join(tmpCertPath, t.Name())
cfg, err := common.NewConfigFrom(map[string]map[string]interface{}{
"ssl": {
"certificate": name + ".pem",
"key": name + ".key",
"key_passphrase": "bar",
},
})
asser... | explode_data.jsonl/4948 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
5475,
49813,
17082,
12187,
27710,
1155,
353,
8840,
836,
8,
341,
46948,
22594,
1155,
11,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
497,
330,
7975,
1138,
11609,
1669,
1815,
22363,
10368,
36934,
1820,
11,
259,
2967,
2398,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResources_Invalidate(t *testing.T) {
tests := []struct {
name string
resources *v1beta1.TaskRunResources
wantErr *apis.FieldError
}{{
name: "duplicate task inputs",
resources: &v1beta1.TaskRunResources{
Inputs: []v1beta1.TaskResourceBinding{{
PipelineResourceBinding: v1beta1.PipelineR... | explode_data.jsonl/82032 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1785
} | [
2830,
3393,
11277,
25972,
7067,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
10202,
2360,
353,
85,
16,
19127,
16,
28258,
6727,
11277,
198,
197,
50780,
7747,
256,
353,
13725,
17087,
1454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetId(t *testing.T) {
entityId := "entity-id"
tests := map[string]struct {
entity *entity
expectedEntityId string
}{
"TestGetId": {
entity: &entity{entityId},
expectedEntityId: entityId,
},
"TestGetEmptyId": {
entity: &entity{},
expectedEntityId: "",
}... | explode_data.jsonl/72413 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 292
} | [
2830,
3393,
1949,
764,
1155,
353,
8840,
836,
8,
341,
52987,
764,
1669,
330,
2996,
12897,
1837,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
52987,
1843,
353,
2996,
198,
197,
42400,
3030,
764,
914,
198,
197,
59403,
197,
197,
1,
2271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSANNotEmptyName(t *testing.T) {
inputPath := "SANCaGood.pem"
expected := lint.Pass
out := test.TestLint("e_ext_san_empty_name", inputPath)
if out.Status != expected {
t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status)
}
} | explode_data.jsonl/75680 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 101
} | [
2830,
3393,
68691,
27416,
675,
1155,
353,
8840,
836,
8,
341,
22427,
1820,
1669,
330,
68691,
22571,
15216,
49373,
698,
42400,
1669,
57920,
87768,
198,
13967,
1669,
1273,
8787,
47556,
445,
68,
9927,
87866,
15124,
1269,
497,
1946,
1820,
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... | 2 |
func Test_DeleteEmptyId(t *testing.T) {
// arrange
store := &orderTestRepo{
DeleteResult: struct{ Err error }{Err: nil},
}
svr := api.NewOrderServer(store)
ctx := context.Background()
// act
_, err := svr.Delete(ctx, &ordercomm.DeleteOrderRequest{Id: ""})
// assert
if err == nil {
t.Fatalf("expected erro... | explode_data.jsonl/36871 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 218
} | [
2830,
3393,
57418,
3522,
764,
1155,
353,
8840,
836,
8,
341,
197,
322,
30893,
198,
57279,
1669,
609,
1358,
2271,
25243,
515,
197,
96672,
2077,
25,
2036,
90,
15495,
1465,
335,
90,
7747,
25,
2092,
1583,
197,
532,
1903,
18920,
1669,
6330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestShadowedVariables(t *testing.T) {
runTest(t, "testshadow", func(client *daptest.Client, fixture protest.Fixture) {
runDebugSessionWithBPs(t, client, "launch",
// Launch
func() {
client.LaunchRequestWithArgs(map[string]interface{}{
"mode": "exec", "program": fixture.Path, "showGlobalVariables"... | explode_data.jsonl/17322 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 524
} | [
2830,
3393,
23667,
291,
22678,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
1155,
11,
330,
1944,
32952,
497,
2915,
12805,
353,
91294,
1944,
11716,
11,
12507,
8665,
991,
12735,
8,
341,
197,
56742,
7939,
5283,
2354,
33,
20420,
1155,
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 TestStaticPath(t *testing.T) {
path := StaticPath("test")
p, err := path("")
if err != nil {
t.Fatal(err)
}
if p != "test" {
t.Fatalf("expected static path of \"test\" but received %q", p)
}
} | explode_data.jsonl/1196 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 86
} | [
2830,
3393,
11690,
1820,
1155,
353,
8840,
836,
8,
341,
26781,
1669,
23105,
1820,
445,
1944,
1138,
3223,
11,
1848,
1669,
1815,
31764,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
743,
281,
961,
330,
1944,
1,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.