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 TestClientUploadImage(t *testing.T) {
t.Parallel()
testImageFolder := "../tmp"
laptopStore := service.NewInMemoryLaptopStore()
imageStore := service.NewDiskImageStore(testImageFolder)
laptop := sample.NewLaptop()
err := laptopStore.Save(laptop)
require.NoError(t, err)
serverAddress := startTestLaptopSe... | explode_data.jsonl/13779 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 603
} | [
2830,
3393,
2959,
13844,
1906,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18185,
1906,
13682,
1669,
7005,
5173,
1837,
8810,
16386,
6093,
1669,
2473,
7121,
641,
10642,
43,
16386,
6093,
741,
31426,
6093,
1669,
2473,
7121,
47583,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInitRotZapFromCfgFile(t *testing.T) {
exePath, err := osext.ExecutableFolder()
if err != nil {
t.Fatal(err)
}
path := filepath.Join(exePath, "sample")
zapLog, err := InitRotZapFromCfgFile(path)
if err != nil {
t.Fatal(err)
}
defer zapLog.Sync()
zapLog.Info("[TestInitRotZapFromCfgFile] RotZap pro... | explode_data.jsonl/53067 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
3803,
36936,
57,
391,
3830,
42467,
1703,
1155,
353,
8840,
836,
8,
341,
8122,
68,
1820,
11,
1848,
1669,
297,
325,
2252,
30798,
5922,
13682,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
26781,
1669,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_IntArray_Basic(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
expect := []int{0, 1, 2, 3}
expect2 := []int{}
array := garray.NewIntArrayFrom(expect)
array2 := garray.NewIntArrayFrom(expect2)
t.Assert(array.Slice(), expect)
t.Assert(array.Interfaces(), expect)
array.Set(0, 100)
v, ok := array.... | explode_data.jsonl/47594 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 544
} | [
2830,
3393,
32054,
1857,
1668,
5971,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
24952,
1669,
3056,
396,
90,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
532,
197,
24952,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestVariableRefMaps(t *testing.T) {
th := NewKustTestHarness(t, "/app/base")
th.writeK("/app/base", `
resources:
- deployment.yaml
- namespace.yaml
vars:
- name: NAMESPACE
objref:
apiVersion: v1
kind: Namespace
name: my-namespace
`)
th.writeF("/app/base/deployment.yaml", `
apiVersion: apps/v1
... | explode_data.jsonl/35772 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 459
} | [
2830,
3393,
7827,
3945,
36562,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
1532,
42,
590,
2271,
74248,
1155,
11,
3521,
676,
26090,
1138,
70479,
3836,
42,
4283,
676,
26090,
497,
22074,
12745,
510,
12,
23172,
33406,
198,
12,
4473,
33406,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestElasticsearchTagsFileDoNotExist(t *testing.T) {
f := NewFactory()
mockConf := &mockClientBuilder{}
mockConf.Tags.File = "fixtures/tags_foo.txt"
f.primaryConfig = mockConf
f.archiveConfig = mockConf
assert.NoError(t, f.Initialize(metrics.NullFactory, zap.NewNop()))
r, err := f.CreateSpanWriter()
require... | explode_data.jsonl/37906 | {
"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,
36,
51179,
1836,
15930,
1703,
5404,
45535,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
1532,
4153,
741,
77333,
15578,
1669,
609,
16712,
2959,
3297,
16094,
77333,
15578,
73522,
8576,
284,
330,
45247,
84460,
761,
2624,
3909,
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 TestGrpcCasEmptySha256(t *testing.T) {
// Check that we can "download" an empty blob, even if it hasn't
// been uploaded.
emptySum := sha256.Sum256([]byte{})
emptyDigest := pb.Digest{
Hash: hex.EncodeToString(emptySum[:]),
SizeBytes: 0,
}
downReq := pb.BatchReadBlobsRequest{
Digests: []*pb.Dige... | explode_data.jsonl/61977 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 230
} | [
2830,
3393,
6464,
3992,
49242,
3522,
62316,
17,
20,
21,
1155,
353,
8840,
836,
8,
1476,
197,
322,
4248,
429,
582,
646,
330,
12885,
1,
458,
4287,
23404,
11,
1496,
421,
432,
12492,
944,
198,
197,
322,
1012,
22853,
382,
197,
3194,
9190,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileSetFile(t *testing.T) {
path, tearDown := setupConfigFile(t, minimalConfig)
defer tearDown()
fs, err := config.NewFileStore(path, true)
require.NoError(t, err)
defer fs.Close()
t.Run("set new file", func(t *testing.T) {
err := fs.SetFile("new", []byte("new file"))
require.NoError(t, err)
dat... | explode_data.jsonl/32386 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 542
} | [
2830,
3393,
1703,
1649,
1703,
1155,
353,
8840,
836,
8,
341,
26781,
11,
32825,
1669,
6505,
2648,
1703,
1155,
11,
17377,
2648,
340,
16867,
32825,
2822,
53584,
11,
1848,
1669,
2193,
7121,
1703,
6093,
5581,
11,
830,
340,
17957,
35699,
1155,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFloat32_SortedList(t *testing.T) {
testcases := []struct {
name string
s Float32
expect []float32
}{
{
name: "test Float32 List, s is empty",
s: Float32{},
},
{
name: "test Float32 SortedList, s is not empty",
s: map[float32]struct{}{1: {}, 2: {}, 3: {}},
expect: [... | explode_data.jsonl/60111 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 371
} | [
2830,
3393,
5442,
18,
17,
1098,
13595,
852,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
1903,
414,
13001,
18,
17,
198,
197,
24952,
3056,
3649,
18,
17,
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 TestExtractDependencies(t *testing.T) {
annotations := map[string]string{
meta.CellDependenciesAnnotationKey: "[{\"org\":\"izza\",\"name\":\"emp-comp\",\"version\":\"0.0.4\",\"instance\":\"emp-comp-0-0-4-a1471a5b\",\"kind\":\"Composite\"},{\"org\":\"izza\",\"name\":\"stock-comp\",\"version\":\"0.0.4\",\"instanc... | explode_data.jsonl/54871 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 447
} | [
2830,
3393,
28959,
48303,
1155,
353,
8840,
836,
8,
341,
197,
39626,
1669,
2415,
14032,
30953,
515,
197,
84004,
32409,
48303,
19711,
1592,
25,
10545,
64238,
1775,
23488,
13741,
34333,
606,
23488,
3262,
62150,
34333,
4366,
23488,
15,
13,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestUTXOIDVerifyNil(t *testing.T) {
utxoID := (*UTXOID)(nil)
if err := utxoID.Verify(); err == nil {
t.Fatalf("Should have errored due to a nil utxo ID")
}
} | explode_data.jsonl/13786 | {
"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,
1381,
55,
29805,
32627,
19064,
1155,
353,
8840,
836,
8,
341,
197,
332,
40822,
915,
1669,
4609,
1381,
55,
29805,
2376,
8385,
692,
743,
1848,
1669,
8621,
40822,
915,
54853,
2129,
1848,
621,
2092,
341,
197,
3244,
30762,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestNextRecord(t *testing.T) {
const (
path = "/tmp/master_client_TestFull"
total = 50
)
l, err := net.Listen("tcp", ":0")
if err != nil {
panic(err)
}
ss := strings.Split(l.Addr().String(), ":")
p, err := strconv.Atoi(ss[len(ss)-1])
if err != nil {
panic(err)
}
go func(l net.Listener) {
s, e... | explode_data.jsonl/63047 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1004
} | [
2830,
3393,
5847,
6471,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
26781,
220,
284,
3521,
5173,
23303,
8179,
32541,
9432,
698,
197,
34493,
284,
220,
20,
15,
198,
197,
340,
8810,
11,
1848,
1669,
4179,
68334,
445,
27161,
497,
13022,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientRefreshMetadataBrokerOffline(t *testing.T) {
seedBroker := NewMockBroker(t, 1)
leader := NewMockBroker(t, 5)
metadataResponse1 := new(MetadataResponse)
metadataResponse1.AddBroker(leader.Addr(), leader.BrokerID())
metadataResponse1.AddBroker(seedBroker.Addr(), seedBroker.BrokerID())
seedBroker.Ret... | explode_data.jsonl/54408 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
2959,
14567,
14610,
65545,
52563,
1155,
353,
8840,
836,
8,
341,
197,
22602,
65545,
1669,
1532,
11571,
65545,
1155,
11,
220,
16,
340,
197,
37391,
1669,
1532,
11571,
65545,
1155,
11,
220,
20,
692,
2109,
7603,
2582,
16,
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... | 5 |
func TestNewUser(t *testing.T) {
type args struct {
email string
pass string
}
tests := map[string]struct {
args args
want *User
err error
}{
"メールアドレスにhoge@hoge.comとパスワードにpassを指定してインスタンスが作成されること": {
args: args{"hoge@hoge.com", "pass"},
want: &User{
ID: "aG9nZUBob2dlLmNvbQ",
EMail: ... | explode_data.jsonl/9500 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 633
} | [
2830,
3393,
3564,
1474,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
57549,
914,
198,
197,
41431,
220,
914,
198,
197,
532,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
31215,
2827,
198,
197,
50780,
353,
1474,
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 TestTransformResponse(t *testing.T) {
invalid := []byte("aaaaa")
uri, _ := url.Parse("http://localhost")
testCases := []struct {
Response *http.Response
Data []byte
Created bool
Error bool
ErrFn func(err error) bool
}{
{Response: &http.Response{StatusCode: 200}, Data: []byte{}},
{Respo... | explode_data.jsonl/13264 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1179
} | [
2830,
3393,
8963,
2582,
1155,
353,
8840,
836,
8,
341,
197,
11808,
1669,
3056,
3782,
445,
28458,
64,
1138,
197,
6070,
11,
716,
1669,
2515,
8937,
445,
1254,
1110,
8301,
1138,
18185,
37302,
1669,
3056,
1235,
341,
197,
69604,
353,
1254,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMappingRuleClone(t *testing.T) {
inputs := []*mappingRule{
testMappingRule1,
testMappingRule2,
testMappingRule3,
}
for _, input := range inputs {
cloned := input.clone()
require.True(t, cmp.Equal(&cloned, input, testMappingRuleCmpOpts...))
// Asserting that modifying the clone doesn't modify th... | explode_data.jsonl/64574 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 251
} | [
2830,
3393,
6807,
11337,
37677,
1155,
353,
8840,
836,
8,
341,
22427,
82,
1669,
29838,
40792,
11337,
515,
197,
18185,
6807,
11337,
16,
345,
197,
18185,
6807,
11337,
17,
345,
197,
18185,
6807,
11337,
18,
345,
197,
532,
2023,
8358,
1946,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStopsAtRecursiveMessage(t *testing.T) {
testConvert(t, `
file_to_generate: "foo.proto"
proto_file <
name: "foo.proto"
package: "example_package.recursive"
message_type <
name: "FooProto"
field < name: "i1" number: 1 type: TYPE_INT32 label: LABEL_OPTIONAL >
field <
... | explode_data.jsonl/41114 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 612
} | [
2830,
3393,
623,
3721,
1655,
78542,
2052,
1155,
353,
8840,
836,
8,
341,
18185,
12012,
1155,
11,
22074,
298,
17661,
2346,
48851,
25,
330,
7975,
57322,
698,
298,
197,
15110,
2458,
77565,
571,
11609,
25,
330,
7975,
57322,
698,
571,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_initBasicConfig(t *testing.T) {
tests := []struct {
name string
want baseConfig
}{
{
name: "test without viper",
want: baseConfig{},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := initBasicConfig(); !reflect.DeepEqual(got, tt.want) {
t.Errorf("initBasi... | explode_data.jsonl/27202 | {
"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,
6137,
15944,
2648,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
50780,
2331,
2648,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
1944,
2041,
95132,
756,
298,
50780,
25,
2331... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateDSNSupportsInsecureSkipVerify(t *testing.T) {
os.Args = []string{
"cmd",
"-hostname=dbhost",
"-username=dbuser",
"-password=dbpwd",
"-port=1234",
"-insecure_skip_verify",
}
_, err := integration.New(integrationName, integrationVersion, integration.Args(&args))
fatalIfErr(err)
assert.E... | explode_data.jsonl/13423 | {
"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,
31115,
5936,
2448,
2800,
82,
641,
25132,
35134,
32627,
1155,
353,
8840,
836,
8,
341,
25078,
51015,
284,
3056,
917,
515,
197,
197,
1,
8710,
756,
197,
197,
34294,
27806,
57752,
3790,
756,
197,
197,
34294,
5113,
57752,
872,
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 TestAbbreviatedIDs(t *testing.T) {
cids := []string{
"foo-" + testutil.UniqueContainerID(),
"bar-" + testutil.UniqueContainerID(),
"baz-" + testutil.UniqueContainerID(),
}
rootDir, err := testutil.SetupRootDir()
if err != nil {
t.Fatalf("error creating root dir: %v", err)
}
for _, cid := range cids ... | explode_data.jsonl/48929 | {
"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,
80219,
7282,
10029,
30466,
1155,
353,
8840,
836,
8,
341,
1444,
3365,
1669,
3056,
917,
515,
197,
197,
1,
7975,
27651,
488,
1273,
1314,
87443,
4502,
915,
3148,
197,
197,
1,
2257,
27651,
488,
1273,
1314,
87443,
4502,
915,
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... | 9 |
func TestHostSpoof(t *testing.T) {
o := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
w.Write([]byte("OK!"))
}))
originURL, _ := url.Parse(o.URL)
p, c := testProxy(WithHosts([]Spoofer{
&spoof{regexp.MustCompile(`^test\.com:80$`), originURL.Host},
}))
defer p.Close()
de... | explode_data.jsonl/12954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
9296,
68680,
1055,
1155,
353,
8840,
836,
8,
341,
22229,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
4232,
353,
1254,
9659,
8,
341,
197,
6692,
4073,
10556,
3782,
445,
3925,
0,
5455,
197,
44194,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHitConditionBreakpoints(t *testing.T) {
runTest(t, "break", func(client *daptest.Client, fixture protest.Fixture) {
runDebugSessionWithBPs(t, client, "launch",
// Launch
func() {
client.LaunchRequest("exec", fixture.Path, !stopOnEntry)
},
// Set breakpoints
fixture.Source, []int{4},
[]... | explode_data.jsonl/17329 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 979
} | [
2830,
3393,
19498,
10547,
22524,
7706,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
1155,
11,
330,
8960,
497,
2915,
12805,
353,
91294,
1944,
11716,
11,
12507,
8665,
991,
12735,
8,
341,
197,
56742,
7939,
5283,
2354,
33,
20420,
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 TestEncryption(t *testing.T) {
s, c, err := newTestInstance(nil)
if err != nil {
t.Fatal(err)
}
defer s.close()
defer c.Close()
ctx := context.Background()
if _, err = c.SendAcctRequest(ctx, testAcctReq); err != nil {
t.Fatal(err)
}
c.Close()
c.ConnConfig.Secret = []byte("bad secret")
if _, err = ... | explode_data.jsonl/53846 | {
"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,
79239,
1155,
353,
8840,
836,
8,
341,
1903,
11,
272,
11,
1848,
1669,
501,
2271,
2523,
27907,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
274,
4653,
741,
16867,
272,
10421,
2822,
20985,
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... | 5 |
func Test_transformIndex(t *testing.T) {
tests := []struct {
name string
indexes []string
transformRules []MetricIndexTransform
expectedNewIndexes []string
}{
{
"no rule",
[]string{"10", "11", "12", "13"},
[]MetricIndexTransform{},
nil,
},
{
"one",
[]string... | explode_data.jsonl/74036 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 511
} | [
2830,
3393,
18449,
1552,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
2290,
914,
198,
197,
26327,
288,
310,
3056,
917,
198,
197,
50224,
26008,
257,
3056,
54310,
1552,
8963,
198,
197,
42400,
3564,
62229,
3056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGrtGcloudVMsError(t *testing.T) {
execCommand = fakeVMsCommandError
defer func() { execCommand = exec.Command }()
project := projectDetails{
ProjectID: "irrelevant",
}
_, err := getGcloudVMs(project)
assert.NotNil(t, err)
} | explode_data.jsonl/13296 | {
"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,
38,
3342,
38,
12361,
11187,
82,
1454,
1155,
353,
8840,
836,
8,
341,
67328,
4062,
284,
12418,
11187,
82,
4062,
1454,
198,
16867,
2915,
368,
314,
3883,
4062,
284,
3883,
12714,
335,
2822,
72470,
1669,
2390,
7799,
515,
197,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestScheduler_Stop(t *testing.T) {
s := NewWithLocation(10, monitoring.NewRegistry(), tarawaTime())
executed := make(chan struct{})
require.NoError(t, s.Start())
require.NoError(t, s.Stop())
_, err := s.Add(testSchedule{}, "testPostStop", testTaskTimes(1, func(_ context.Context) []TaskFunc {
executed <- ... | explode_data.jsonl/68484 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
38878,
80308,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1532,
2354,
4707,
7,
16,
15,
11,
16558,
7121,
15603,
1507,
12183,
14077,
1462,
12367,
67328,
2774,
1669,
1281,
35190,
2036,
6257,
692,
17957,
35699,
1155,
11,
274,
1210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGatherMachineConfigPool(t *testing.T) {
var machineconfigpoolYAML = `
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
metadata:
name: master-t
`
gvr := schema.GroupVersionResource{Group: "machineconfiguration.openshift.io", Version: "v1", Resource: "machineconfigpools"}
client :... | explode_data.jsonl/32593 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 441
} | [
2830,
3393,
38,
1856,
21605,
2648,
10551,
1155,
353,
8840,
836,
8,
341,
2405,
5662,
1676,
10285,
56,
31102,
284,
22074,
2068,
5637,
25,
5662,
21138,
42515,
47833,
4245,
5457,
16,
198,
15314,
25,
12960,
2648,
10551,
198,
17637,
510,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPluralize(t *testing.T) {
tfs := map[string]*schema.Schema{
"some_thing": {
Type: schema.TypeSet,
},
"some_other_thing": {
Type: schema.TypeSet,
MaxItems: 1,
},
"all_things": {
Type: schema.TypeSet,
},
}
terraformToPulumiName := func(k string) string {
return TerraformToPulumi... | explode_data.jsonl/36108 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 384
} | [
2830,
3393,
2120,
4176,
551,
1155,
353,
8840,
836,
8,
341,
3244,
3848,
1669,
2415,
14032,
8465,
17349,
21105,
515,
197,
197,
1,
14689,
62,
1596,
788,
341,
298,
27725,
25,
10802,
10184,
1649,
345,
197,
197,
1583,
197,
197,
1,
14689,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBulkUpload(t *testing.T) {
ctx := context.Background()
c, rollback := makeConnectionWithContainer(t)
defer rollback()
buffer := new(bytes.Buffer)
ds := tar.NewWriter(buffer)
var files = []struct{ Name, Body string }{
{OBJECT, CONTENTS},
{OBJECT2, CONTENTS2},
}
for _, file := range files {
hdr := ... | explode_data.jsonl/12716 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 572
} | [
2830,
3393,
88194,
13844,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
11,
60414,
1669,
1281,
4526,
2354,
4502,
1155,
340,
16867,
60414,
741,
31122,
1669,
501,
23158,
22622,
340,
83336,
1669,
12183,
7121,
6492,
12584... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSecureDelete(t *testing.T) {
trie := newEmptySecure()
vals := []struct{ k, v string }{
{"do", "verb"},
{"ether", "wookiedoo"},
{"horse", "stallion"},
{"shaman", "horse"},
{"doge", "coin"},
{"ether", ""},
{"dog", "puppy"},
{"shaman", ""},
}
for _, val := range vals {
if val.v != "" {
tr... | explode_data.jsonl/9325 | {
"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,
49813,
6435,
1155,
353,
8840,
836,
8,
341,
197,
8927,
1669,
501,
3522,
49813,
741,
19302,
82,
1669,
3056,
1235,
90,
595,
11,
348,
914,
335,
515,
197,
197,
4913,
2982,
497,
330,
22328,
7115,
197,
197,
4913,
2723,
497,
330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestServiceGobUnregisteredFastFail(t *testing.T) {
m, _, shutdown := newTestMachine(t, Services{"GobUnregistered": serviceGobUnregistered{}})
defer shutdown()
select {
case <-m.Wait(Running):
if m.State() == Running {
t.Fatalf("machine is running with broken service")
}
case <-time.After(2 * time.Minut... | explode_data.jsonl/44586 | {
"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,
1860,
38,
674,
1806,
34909,
32174,
19524,
1155,
353,
8840,
836,
8,
341,
2109,
11,
8358,
23766,
1669,
501,
2271,
21605,
1155,
11,
8307,
4913,
38,
674,
1806,
34909,
788,
2473,
38,
674,
1806,
34909,
90,
71362,
16867,
23766,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestFindRegistry(t *testing.T) {
sys := &types.SystemContext{
SystemRegistriesConfPath: "testdata/find-registry.conf",
SystemRegistriesConfDirPath: "testdata/registries.conf.d",
}
registries, err := GetRegistries(sys)
assert.Nil(t, err)
assert.Equal(t, 19, len(registries))
reg, err := FindRegistry(s... | explode_data.jsonl/62228 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1541
} | [
2830,
3393,
9885,
15603,
1155,
353,
8840,
836,
8,
341,
41709,
1669,
609,
9242,
16620,
1972,
515,
197,
5816,
3477,
380,
4019,
15578,
1820,
25,
262,
330,
92425,
81121,
12,
29172,
13937,
756,
197,
5816,
3477,
380,
4019,
15578,
6184,
1820,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_DeletePACFile(t *testing.T) {
RegisterTestingT(t)
unit := NewHoverflyWithConfiguration(&Configuration{
PACFile: []byte("PACFILE"),
})
unit.DeletePACFile()
Expect(unit.Cfg.PACFile).To(BeNil())
} | explode_data.jsonl/45411 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 83
} | [
2830,
3393,
2039,
1975,
21642,
57418,
47,
1706,
1703,
1155,
353,
8840,
836,
8,
341,
79096,
16451,
51,
1155,
692,
81189,
1669,
1532,
34379,
21642,
2354,
7688,
2099,
7688,
515,
197,
10025,
1706,
1703,
25,
3056,
3782,
445,
47,
1706,
6041,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestHttpParser_301_response(t *testing.T) {
logp.TestingSetup(logp.WithSelectors("http"))
data := "HTTP/1.1 301 Moved Permanently\r\n" +
"Date: Sun, 29 Sep 2013 16:53:59 GMT\r\n" +
"Server: Apache\r\n" +
"Location: http://www.hotnews.ro/\r\n" +
"Vary: Accept-Encoding\r\n" +
"Content-Length: 290\r\n" +... | explode_data.jsonl/16502 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 442
} | [
2830,
3393,
2905,
6570,
62,
18,
15,
16,
9655,
1155,
353,
8840,
836,
8,
341,
6725,
79,
8787,
287,
21821,
12531,
79,
26124,
96995,
445,
1254,
28075,
8924,
1669,
330,
9230,
14,
16,
13,
16,
220,
18,
15,
16,
89697,
3616,
1515,
4402,
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 TestMultiSubOnce(t *testing.T) {
ps := New(1)
defer ps.Shutdown()
ch := ps.SubOnce("t1", "t2")
ps.Pub("hi", "t1")
ps.Pub("hello", "t2")
checkContents(t, ch, []string{"hi"})
} | explode_data.jsonl/44257 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 87
} | [
2830,
3393,
20358,
3136,
12522,
1155,
353,
8840,
836,
8,
341,
35009,
1669,
1532,
7,
16,
340,
16867,
4726,
10849,
18452,
2822,
23049,
1669,
4726,
12391,
12522,
445,
83,
16,
497,
330,
83,
17,
5130,
35009,
1069,
392,
445,
6023,
497,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCRUDModel(t *testing.T) {
db, _ := test.SetupPG(t)
var p = &sdk.KafkaIntegration
ok, err := ModelExists(db, p.Name)
require.NoError(t, err)
if !ok {
err = InsertModel(db, p)
require.NoError(t, err)
} else {
p1, err := LoadModelByName(context.TODO(), db, p.Name)
require.NoError(t, err)
p = &p... | explode_data.jsonl/1478 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 302
} | [
2830,
3393,
8973,
4656,
1712,
1155,
353,
8840,
836,
8,
341,
20939,
11,
716,
1669,
1273,
39820,
11383,
1155,
692,
2405,
281,
284,
609,
51295,
11352,
21883,
52464,
271,
59268,
11,
1848,
1669,
4903,
15575,
9791,
11,
281,
2967,
340,
17957,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRemittanceOriginatorAddressLineSixAlphaNumeric(t *testing.T) {
ro := mockRemittanceOriginator()
ro.RemittanceData.AddressLineSix = "®"
err := ro.Validate()
require.EqualError(t, err, fieldError("AddressLineSix", ErrNonAlphanumeric, ro.RemittanceData.AddressLineSix).Error())
} | explode_data.jsonl/32937 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
6590,
87191,
13298,
850,
4286,
2460,
41460,
19384,
36296,
1155,
353,
8840,
836,
8,
341,
197,
299,
1669,
7860,
6590,
87191,
13298,
850,
741,
197,
299,
11398,
87191,
1043,
26979,
2460,
41460,
284,
330,
11909,
1837,
9859,
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 TestUnwrap(t *testing.T) {
zdb.RunTest(t, func(t *testing.T, ctx context.Context) {
db := zdb.MustGetDB(ctx)
if zdb.Unwrap(db) != db {
t.Error()
}
ldb := zdb.NewLogDB(db, os.Stdout, 0, "")
if zdb.Unwrap(ldb) != db {
t.Error()
}
ldb2 := zdb.NewLogDB(ldb, os.Stdout, 0, "")
if zdb.Unwrap(ldb2... | explode_data.jsonl/57558 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
1806,
10097,
1155,
353,
8840,
836,
8,
341,
20832,
1999,
16708,
2271,
1155,
11,
2915,
1155,
353,
8840,
836,
11,
5635,
2266,
9328,
8,
341,
197,
20939,
1669,
1147,
1999,
50463,
1949,
3506,
7502,
692,
197,
743,
1147,
1999,
106... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSvmByteArray(t *testing.T) {
req := require.New(t)
testAddress := func(val []byte) {
ba := bytesCloneToSvmByteArray(val)
goBytes := svmByteArrayCloneToBytes(ba)
ba.Free()
req.Equal(val, goBytes)
}
testRange := 100
b := make([]byte, testRange, testRange)
for i := 0; i < testRange; i++ {
b[i] =... | explode_data.jsonl/52021 | {
"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,
50,
7338,
18394,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
1373,
7121,
1155,
692,
18185,
4286,
1669,
2915,
9098,
3056,
3782,
8,
341,
197,
2233,
64,
1669,
5820,
37677,
1249,
50,
7338,
18394,
9098,
340,
197,
30680,
7078,
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 TestWithLoadFiles(t *testing.T) {
tmpDir := fs.NewDir(t,
t.Name(),
fs.WithFile("params.yaml", `param1:
param2: value1
param3: 3
overridden: bar`))
defer tmpDir.Remove()
var bundle *bundle.Bundle
actual := map[string]string{
"overridden": "foo",
}
err := WithFileParameters([]string{tmpDir.Join("param... | explode_data.jsonl/17700 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
2354,
5879,
10809,
1155,
353,
8840,
836,
8,
341,
20082,
6184,
1669,
8619,
7121,
6184,
1155,
345,
197,
3244,
2967,
3148,
197,
53584,
26124,
1703,
445,
3519,
33406,
497,
1565,
903,
16,
510,
220,
1685,
17,
25,
897,
16,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPayload_Event(t *testing.T) {
t.Parallel()
payload := Payload{
"event": map[string]interface{}{
"test": "test",
},
}
t.Run("normal test", func(t *testing.T) {
result := payload.Event()
assert.NotNil(t, result)
assert.Equal(t, "test", result.String("test"))
})
} | explode_data.jsonl/29919 | {
"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,
29683,
39354,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
76272,
1669,
52916,
515,
197,
197,
1,
3087,
788,
2415,
14032,
31344,
67066,
298,
197,
1,
1944,
788,
330,
1944,
756,
197,
197,
1583,
197,
630,
3244,
16708,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDupNamespaces(t *testing.T) {
spec := &specs.Spec{
Linux: &specs.Linux{
Namespaces: []specs.LinuxNamespace{
{
Type: "pid",
},
{
Type: "pid",
Path: "/proc/1/ns/pid",
},
},
},
}
_, err := CreateLibcontainerConfig(&CreateOpts{
Spec: spec,
})
if err == nil {
t.Er... | explode_data.jsonl/6065 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
85713,
7980,
27338,
1155,
353,
8840,
836,
8,
341,
98100,
1669,
609,
94531,
36473,
515,
197,
15070,
19559,
25,
609,
94531,
1214,
19559,
515,
298,
197,
7980,
27338,
25,
3056,
94531,
1214,
19559,
22699,
515,
571,
197,
515,
464,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoEchoOldServer(t *testing.T) {
opts := GetDefaultOptions()
opts.Url = DefaultURL
opts.NoEcho = true
nc := &Conn{Opts: opts}
if err := nc.setupServerPool(); err != nil {
t.Fatalf("Problem setting up Server Pool: %v\n", err)
}
// Old style with no proto, meaning 0. We need Proto:1 for NoEcho support.... | explode_data.jsonl/44923 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
2753,
74994,
18284,
5475,
1155,
353,
8840,
836,
8,
341,
64734,
1669,
2126,
3675,
3798,
741,
64734,
41024,
284,
7899,
3144,
198,
64734,
16766,
74994,
284,
830,
271,
197,
1016,
1669,
609,
9701,
90,
43451,
25,
12185,
532,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestCanGetTwoProvidersForOneVersion(t *testing.T) {
assert := assert.New(t)
bh := BoxHandler{}
boxes := []SimpleBox{SimpleBox{Boxname: "dev", Username: "benphegan", Provider: "virtualbox", Version: "2.0", Location: "/tmp/benphegan-VAGRANTSLASH-dev__2.0__virtualbox.box"},
SimpleBox{Boxname: "dev", Username... | explode_data.jsonl/51591 | {
"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,
6713,
1949,
11613,
37351,
2461,
3966,
5637,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
2233,
71,
1669,
8261,
3050,
16094,
197,
22204,
1669,
3056,
16374,
1611,
90,
16374,
1611,
90,
1611,
606,
25,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetLoadBalancerAdditionalTags(t *testing.T) {
tagTests := []struct {
Annotations map[string]string
Tags map[string]string
}{
{
Annotations: map[string]string{
ServiceAnnotationLoadBalancerAdditionalTags: "Key=Val",
},
Tags: map[string]string{
"Key": "Val",
},
},
{
Anno... | explode_data.jsonl/12863 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 704
} | [
2830,
3393,
1949,
5879,
93825,
29019,
15930,
1155,
353,
8840,
836,
8,
341,
60439,
18200,
1669,
3056,
1235,
341,
197,
197,
21418,
2415,
14032,
30953,
198,
197,
10261,
2032,
286,
2415,
14032,
30953,
198,
197,
59403,
197,
197,
515,
298,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestRemoveAllPushNotificationsBuildQueryParam(t *testing.T) {
assert := assert.New(t)
queryParam := map[string]string{
"q1": "v1",
"q2": "v2",
}
opts := &removeAllPushChannelsForDeviceOpts{
DeviceIDForPush: "deviceId",
PushType: PNPushTypeAPNS,
pubnub: pubnub,
QueryParam: quer... | explode_data.jsonl/51097 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
13021,
2403,
16644,
34736,
11066,
84085,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
27274,
2001,
1669,
2415,
14032,
30953,
515,
197,
197,
1,
80,
16,
788,
330,
85,
16,
756,
197,
197,
1,
80,
17,
788,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetCallRatesNilReader(t *testing.T) {
qs := NewMetricsQueryService(nil)
qParams := &metricsstore.CallRateQueryParameters{}
r, err := qs.GetCallRates(context.Background(), qParams)
assert.Zero(t, r)
assert.EqualError(t, err, errNilReader.Error())
} | explode_data.jsonl/12526 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 99
} | [
2830,
3393,
1949,
7220,
82623,
19064,
5062,
1155,
353,
8840,
836,
8,
341,
18534,
82,
1669,
1532,
27328,
2859,
1860,
27907,
340,
18534,
4870,
1669,
609,
43262,
4314,
27017,
11564,
2859,
9706,
16094,
7000,
11,
1848,
1669,
32421,
2234,
7220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRollupIderivDuplicateTimestamps(t *testing.T) {
rfa := &rollupFuncArg{
values: []float64{1, 2, 3, 4, 5},
timestamps: []int64{100, 100, 200, 300, 300},
}
n := rollupIderiv(rfa)
if n != 20 {
t.Fatalf("unexpected value; got %v; want %v", n, 20)
}
rfa = &rollupFuncArg{
values: []float64{1, 2... | explode_data.jsonl/23110 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 800
} | [
2830,
3393,
32355,
454,
764,
261,
344,
53979,
20812,
82,
1155,
353,
8840,
836,
8,
341,
7000,
3632,
1669,
609,
1100,
454,
9626,
2735,
515,
197,
45939,
25,
257,
3056,
3649,
21,
19,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
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... | 8 |
func TestMaxMsgs(t *testing.T) {
sOpts := GetDefaultOptions()
sOpts.ID = clusterName
sOpts.MaxMsgs = 10
s := runServerWithOpts(t, sOpts, nil)
defer s.Shutdown()
sc := NewDefaultConnection(t)
defer sc.Close()
for i := 0; i < 2*sOpts.MaxMsgs; i++ {
sc.Publish("foo", []byte("msg"))
}
// We should not have m... | explode_data.jsonl/23092 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 225
} | [
2830,
3393,
5974,
6611,
82,
1155,
353,
8840,
836,
8,
341,
1903,
43451,
1669,
2126,
3675,
3798,
741,
1903,
43451,
9910,
284,
10652,
675,
198,
1903,
43451,
14535,
6611,
82,
284,
220,
16,
15,
198,
1903,
1669,
1598,
5475,
2354,
43451,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestTaskRunSpec_Invalidate(t *testing.T) {
tests := []struct {
name string
spec v1beta1.TaskRunSpec
wantErr *apis.FieldError
}{{
name: "invalid taskspec",
spec: v1beta1.TaskRunSpec{},
wantErr: apis.ErrMissingField("spec"),
}, {
name: "invalid taskref name",
spec: v1beta1.TaskRunSpec{... | explode_data.jsonl/82029 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1121
} | [
2830,
3393,
6262,
6727,
8327,
25972,
7067,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
98100,
262,
348,
16,
19127,
16,
28258,
6727,
8327,
198,
197,
50780,
7747,
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 TestNoAttributeDisclosureSession(t *testing.T) {
id := irma.NewAttributeTypeIdentifier("irma-demo.RU.studentCard")
request := getDisclosureRequest(id)
sessionHelper(t, request, "verification", nil)
} | explode_data.jsonl/69988 | {
"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,
2753,
3907,
91065,
5283,
1155,
353,
8840,
836,
8,
341,
15710,
1669,
6216,
1728,
7121,
3907,
929,
8714,
445,
44011,
58893,
2013,
52,
40113,
5770,
1138,
23555,
1669,
633,
91065,
1900,
3724,
340,
25054,
5511,
1155,
11,
1681,
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 |
func TestFormatterColors(test *testing.T) {
formatted, err := formatter.Format("{red}red{normal} {green}green{normal} {blue}blue{normal}")
assert.NoError(test, err)
assert.Equal(test, "\x1b[31mred\x1b[0m \x1b[32mgreen\x1b[0m \x1b[34mblue\x1b[0m", formatted)
} | explode_data.jsonl/39744 | {
"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,
14183,
13108,
8623,
353,
8840,
836,
8,
341,
37410,
12127,
11,
1848,
1669,
24814,
9978,
13976,
1151,
92,
1151,
90,
8252,
92,
314,
13250,
92,
13250,
90,
8252,
92,
314,
12203,
92,
12203,
90,
8252,
55266,
6948,
35699,
8623,
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 TestChangefeedMultiTable(t *testing.T) {
defer leaktest.AfterTest(t)()
testFn := func(t *testing.T, db *gosql.DB, f testfeedFactory) {
sqlDB := sqlutils.MakeSQLRunner(db)
sqlDB.Exec(t, `CREATE TABLE foo (a INT PRIMARY KEY, b STRING)`)
sqlDB.Exec(t, `INSERT INTO foo VALUES (1, 'a')`)
sqlDB.Exec(t, `CREAT... | explode_data.jsonl/21274 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 347
} | [
2830,
3393,
1143,
524,
823,
12051,
20358,
2556,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
18185,
24911,
1669,
2915,
1155,
353,
8840,
836,
11,
2927,
353,
34073,
1470,
22537,
11,
282,
1273,
11184,
4153,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseSimpleApi1(t *testing.T) {
expected, err := ioutil.ReadFile("testdata/simple/expected.json")
assert.NoError(t, err)
searchDir := "testdata/simple"
p := New()
p.PropNamingStrategy = PascalCase
err = p.ParseAPI(searchDir, mainAPIFile, defaultParseDepth)
assert.NoError(t, err)
b, _ := json.MarshalIn... | explode_data.jsonl/63553 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 155
} | [
2830,
3393,
14463,
16374,
6563,
16,
1155,
353,
8840,
836,
8,
341,
42400,
11,
1848,
1669,
43144,
78976,
445,
92425,
67195,
14,
7325,
4323,
1138,
6948,
35699,
1155,
11,
1848,
340,
45573,
6184,
1669,
330,
92425,
67195,
698,
3223,
1669,
153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSaveHTMLContent(t *testing.T) {
t.Run("saveHTMLContent: should saves html file to filesystem", func(t *testing.T) {
filename := "temp.html"
r := strings.NewReader(`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="/favicon.ico" />
<meta name="... | explode_data.jsonl/67949 | {
"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,
8784,
5835,
2762,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
6628,
5835,
2762,
25,
1265,
25935,
5272,
1034,
311,
38389,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
66434,
1669,
330,
3888,
2564,
698,
197,
7000,
1669,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestWorkspace_Summary(t *testing.T) {
testCases := map[string]struct {
expectedSummary Summary
workingDir string
expectedError error
mockFileSystem func(fs afero.Fs)
}{
"existing workspace summary": {
expectedSummary: Summary{Application: "DavidsApp"},
workingDir: "test/",
mockFil... | explode_data.jsonl/30112 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 618
} | [
2830,
3393,
45981,
1098,
372,
1534,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
42400,
19237,
21517,
198,
197,
197,
21152,
6184,
414,
914,
198,
197,
42400,
1454,
256,
1465,
198,
197,
77333,
50720,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransportGroupsPendingDials(t *testing.T) {
st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, r.RemoteAddr)
}, optOnlyServer)
defer st.Close()
tr := &Transport{
TLSClientConfig: tlsConfigInsecure,
}
defer tr.CloseIdleConnections()
var (
mu sync.Mutex
di... | explode_data.jsonl/16051 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 766
} | [
2830,
3393,
27560,
22173,
32027,
35,
10309,
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,
53112,
44747,
3622,
11,
435,
51434,
13986,
340,
197,
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 TestNewIstioGatewaySource(t *testing.T) {
for _, ti := range []struct {
title string
annotationFilter string
fqdnTemplate string
combineFQDNAndAnnotation bool
expectError bool
}{
{
title: "invalid template",
expectError: true,
fqdnT... | explode_data.jsonl/78114 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 749
} | [
2830,
3393,
3564,
40,
267,
815,
40709,
3608,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
8988,
1669,
2088,
3056,
1235,
341,
197,
24751,
503,
914,
198,
197,
197,
24674,
5632,
260,
914,
198,
197,
1166,
80,
17395,
7275,
1797,
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,
1... | 2 |
func TestDeployerSpecDefault(t *testing.T) {
tests := []struct {
name string
in *DeployerSpec
want *DeployerSpec
}{{
name: "ensure at least one container",
in: &DeployerSpec{},
want: &DeployerSpec{
Template: &corev1.PodSpec{
Containers: []corev1.Container{
{},
},
},
IngressPolicy... | explode_data.jsonl/5185 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 258
} | [
2830,
3393,
69464,
261,
8327,
3675,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
17430,
256,
353,
69464,
261,
8327,
198,
197,
50780,
353,
69464,
261,
8327,
198,
197,
15170,
515,
197,
11609,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAddOrUpdatePolicy(t *testing.T) {
basicTestPolicy := &unstructured.Unstructured{
Object: map[string]interface{}{
"metadata": map[string]interface{}{
"namespace": "testing",
},
"spec": map[string]interface{}{
"policy": map[string]interface{}{
"name": "TestPolicy",
"signature-requir... | explode_data.jsonl/19384 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1899
} | [
2830,
3393,
2212,
56059,
13825,
1155,
353,
8840,
836,
8,
341,
2233,
5971,
2271,
13825,
1669,
609,
359,
51143,
10616,
51143,
515,
197,
23816,
25,
2415,
14032,
31344,
67066,
298,
197,
1,
17637,
788,
2415,
14032,
31344,
67066,
571,
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... | 4 |
func TestLocale(t *testing.T) {
trans := New()
expected := "ar_SA"
if trans.Locale() != expected {
t.Errorf("Expected '%s' Got '%s'", expected, trans.Locale())
}
} | explode_data.jsonl/54999 | {
"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,
19231,
1155,
353,
8840,
836,
8,
1476,
72453,
1669,
1532,
741,
42400,
1669,
330,
277,
81219,
1837,
743,
1356,
59094,
368,
961,
3601,
341,
197,
3244,
13080,
445,
18896,
7677,
82,
6,
24528,
7677,
82,
22772,
3601,
11,
1356,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKubernetesSecretLoader_GetSecret(t *testing.T) {
var tests = []struct {
description string
secretName string
expected *map[string][]byte
objs []runtime.Object
wantErr bool
}{
{
"no secrets", "foo", nil, nil, true,
},
{
"matching secret",
"secret1", &secret1Map,
[]ru... | explode_data.jsonl/45898 | {
"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,
42,
29827,
19773,
9181,
13614,
19773,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
42407,
914,
198,
197,
197,
20474,
675,
220,
914,
198,
197,
42400,
262,
353,
2186,
14032,
45725,
3782,
198,
197,
226... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFindReturnAddress(t *testing.T) {
protest.AllowRecording(t)
withTestProcess("testnextprog", t, func(p *proc.Target, fixture protest.Fixture) {
setFileBreakpoint(p, t, fixture.Source, 24)
err := p.Continue()
if err != nil {
t.Fatal(err)
}
addr, err := returnAddress(p.CurrentThread())
if err != ... | explode_data.jsonl/56212 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 197
} | [
2830,
3393,
9885,
5598,
4286,
1155,
353,
8840,
836,
8,
341,
197,
776,
1944,
29081,
52856,
1155,
340,
46948,
2271,
7423,
445,
1944,
3600,
32992,
497,
259,
11,
2915,
1295,
353,
15782,
35016,
11,
12507,
8665,
991,
12735,
8,
341,
197,
819... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStrArray_RLockFunc(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
s1 := []string{"a", "b", "c", "d"}
a1 := garray.NewStrArrayFrom(s1, true)
ch1 := make(chan int64, 3)
ch2 := make(chan int64, 1)
//go1
go a1.RLockFunc(func(n1 []string) { //读锁
time.Sleep(2 * time.Second) //暂停1秒
n1[2] = "g"
c... | explode_data.jsonl/53110 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 493
} | [
2830,
3393,
2580,
1857,
2568,
11989,
9626,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
1903,
16,
1669,
3056,
917,
4913,
64,
497,
330,
65,
497,
330,
66,
497,
330,
67,
16707,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWalkSymlink(t *testing.T) {
testenv.MustHaveSymlink(t)
initOverlay(t, `{
"Replace": {"overlay_symlink": "symlink"}
}
-- dir/file --`)
// Create symlink
if err := os.Symlink("dir", "symlink"); err != nil {
t.Error(err)
}
testCases := []struct {
name string
dir string
wantFiles []str... | explode_data.jsonl/56055 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 519
} | [
2830,
3393,
48849,
34667,
44243,
1155,
353,
8840,
836,
8,
341,
18185,
3160,
50463,
12116,
34667,
44243,
1155,
692,
28248,
32755,
1155,
11,
1565,
515,
197,
1,
23107,
788,
5212,
21118,
58530,
44243,
788,
330,
22860,
44243,
16707,
532,
313,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddEquipmentTypeWithPositions(t *testing.T) {
r := newTestResolver(t)
defer r.drv.Close()
ctx := viewertest.NewContext(r.client)
mr, qr := r.Mutation(), r.Query()
position1 := models.EquipmentPositionInput{
Name: "Position 1",
}
equipmentType, err := mr.AddEquipmentType(ctx, models.AddEquipmentTypeIn... | explode_data.jsonl/431 | {
"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,
2212,
58276,
929,
2354,
45793,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
501,
2271,
18190,
1155,
340,
16867,
435,
950,
10553,
10421,
741,
20985,
1669,
1651,
83386,
7121,
1972,
2601,
6581,
692,
2109,
81,
11,
49290,
1669,
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,
1,
1,
1,
1,
1... | 1 |
func TestMainBeforeSubCommandsInvalidLogFormat(t *testing.T) {
assert := assert.New(t)
tmpdir, err := ioutil.TempDir(testDir, "")
assert.NoError(err)
defer os.RemoveAll(tmpdir)
logFile := filepath.Join(tmpdir, "log")
set := flag.NewFlagSet("", 0)
set.Bool("debug", true, "")
set.String("log", logFile, "")
se... | explode_data.jsonl/52194 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 256
} | [
2830,
3393,
6202,
10227,
3136,
30479,
7928,
2201,
4061,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
20082,
3741,
11,
1848,
1669,
43144,
65009,
6184,
8623,
6184,
11,
14676,
6948,
35699,
3964,
340,
16867,
2643,
84427,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreGateway_SyncOnRingTopologyChanged(t *testing.T) {
registeredAt := time.Now()
tests := map[string]struct {
setupRing func(desc *ring.Desc)
updateRing func(desc *ring.Desc)
expectedSync bool
}{
"should sync when an instance is added to the ring": {
setupRing: func(desc *ring.Desc) {
... | explode_data.jsonl/57962 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2400
} | [
2830,
3393,
6093,
40709,
1098,
1721,
1925,
43466,
60954,
5389,
1155,
353,
8840,
836,
8,
341,
29422,
291,
1655,
1669,
882,
13244,
2822,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
84571,
43466,
262,
2915,
37673,
353,
12640,
68428,
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 TestIsZeroHashStr(t *testing.T) {
tests := []struct {
name string
hash string
want bool
}{
{"correctFromStringsRepeat", strings.Repeat("00", chainhash.HashSize), true},
{"correctFromZeroHashStringer", zeroHash.String(), true},
{"correctFromZeroValueHashStringer", chainhash.Hash{}.String(), true},
{... | explode_data.jsonl/54137 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 262
} | [
2830,
3393,
3872,
17999,
6370,
2580,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
50333,
914,
198,
197,
50780,
1807,
198,
197,
59403,
197,
197,
4913,
19928,
3830,
20859,
38718,
497,
9069,
2817,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSmudge(t *testing.T) {
repo := NewRepository(t, "empty")
defer repo.Test()
prePushHookFile := filepath.Join(repo.Path, ".git", "hooks", "pre-push")
progressFile := filepath.Join(repo.Path, ".git", "progress")
// simple smudge example
cmd := repo.Command("smudge", "somefile")
cmd.Input = bytes.NewBuffe... | explode_data.jsonl/8396 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 895
} | [
2830,
3393,
10673,
19561,
1155,
353,
8840,
836,
8,
341,
17200,
5368,
1669,
1532,
4624,
1155,
11,
330,
3194,
1138,
16867,
15867,
8787,
2822,
40346,
16644,
31679,
1703,
1669,
26054,
22363,
50608,
17474,
11,
5933,
12882,
497,
330,
38560,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransferIXFRFallback(t *testing.T) {
transfer := newTestTransfer()
testPlugin := transfer.Transferers[0].(*transfererPlugin)
ctx := context.TODO()
w := dnstest.NewMultiRecorder(&test.ResponseWriter{})
m := &dns.Msg{}
m.SetIxfr(
transfer.xfrs[0].Zones[0],
testPlugin.Serial-1,
"ns.dns."+testPlugin.... | explode_data.jsonl/39439 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 203
} | [
2830,
3393,
21970,
5396,
10504,
87206,
1155,
353,
8840,
836,
8,
341,
197,
24188,
1669,
501,
2271,
21970,
2822,
18185,
11546,
1669,
8317,
95802,
388,
58,
15,
936,
4071,
24188,
261,
11546,
692,
20985,
1669,
2266,
90988,
741,
6692,
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... | 2 |
func Test_DiscoverPlugins(t *testing.T) {
assert := assert.New(t)
defer setupLocalDistoForTesting()()
serverPlugins, standalonePlugins, err := DiscoverPlugins("")
assert.Nil(err)
assert.Equal(0, len(serverPlugins))
assert.Equal(1, len(standalonePlugins))
serverPlugins, standalonePlugins, err = DiscoverPlugins... | explode_data.jsonl/71403 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
45525,
3688,
45378,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
16867,
6505,
7319,
23356,
78,
2461,
16451,
368,
2822,
41057,
45378,
11,
43388,
45378,
11,
1848,
1669,
32939,
45378,
31764,
6948,
59678,
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... | 1 |
func TestImportWithDifferingImportIdentifierFormat(t *testing.T) {
loaders := []*deploytest.ProviderLoader{
deploytest.NewProviderLoader("pkgA", semver.MustParse("1.0.0"), func() (plugin.Provider, error) {
return &deploytest.Provider{
DiffF: func(urn resource.URN, id resource.ID,
olds, news resource.Prop... | explode_data.jsonl/4172 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1268
} | [
2830,
3393,
11511,
2354,
35,
14320,
287,
11511,
8714,
4061,
1155,
353,
8840,
836,
8,
341,
49386,
388,
1669,
29838,
35794,
1944,
36208,
9181,
515,
197,
197,
35794,
1944,
7121,
5179,
9181,
445,
30069,
32,
497,
5234,
423,
50463,
14463,
445... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDualstackLabelIsSet(t *testing.T) {
source := &routeGroupSource{
cli: &fakeRouteGroupClient{
rg: &routeGroupList{
Items: []*routeGroup{
createTestRouteGroup(
"namespace1",
"rg1",
map[string]string{
ALBDualstackAnnotationKey: ALBDualstackAnnotationValue,
},
[]... | explode_data.jsonl/55707 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 326
} | [
2830,
3393,
85074,
7693,
2476,
3872,
1649,
1155,
353,
8840,
836,
8,
341,
47418,
1669,
609,
8966,
2808,
3608,
515,
197,
86448,
25,
609,
30570,
4899,
2808,
2959,
515,
298,
197,
1984,
25,
609,
8966,
2808,
852,
515,
571,
197,
4353,
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... | 4 |
func TestHandleMsgVerifyInvariant(t *testing.T) {
app, ctx, addrs := createTestApp()
sender := addrs[0]
cases := []struct {
name string
msg sdk.Msg
expectedResult string
}{
{"bad invariant route", crisis.NewMsgVerifyInvariant(sender, testModuleName, "route-that-doesnt-exist"), "fail"},... | explode_data.jsonl/54741 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 452
} | [
2830,
3393,
6999,
6611,
32627,
76621,
1155,
353,
8840,
836,
8,
341,
28236,
11,
5635,
11,
912,
5428,
1669,
1855,
2271,
2164,
741,
1903,
1659,
1669,
912,
5428,
58,
15,
2533,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
1843,
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... | 1 |
func TestGOPathShlib(t *testing.T) {
goCmd(t, "install", "-buildmode=shared", "-linkshared", "dep")
AssertIsLinkedTo(t, filepath.Join(gopathInstallDir, "libdep.so"), soname)
goCmd(t, "install", "-linkshared", "exe")
AssertIsLinkedTo(t, "./bin/exe", soname)
AssertIsLinkedTo(t, "./bin/exe", "libdep.so")
AssertHasRP... | explode_data.jsonl/24191 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 202
} | [
2830,
3393,
15513,
1820,
2016,
2740,
1155,
353,
8840,
836,
8,
341,
30680,
15613,
1155,
11,
330,
12248,
497,
6523,
5834,
8516,
28,
6100,
497,
6523,
2080,
6100,
497,
330,
14891,
1138,
18017,
3872,
22070,
1249,
1155,
11,
26054,
22363,
3268... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseString(t *testing.T) {
tests := []struct {
in string
out string
ext string
err string
}{
{`""`, `""`, ``, ``},
{`"1234567890"`, `"1234567890"`, ``, ``},
{`"Hello World!"`, `"Hello World!"`, ``, ``},
{`"Hello\"World!"`, `"Hello\"World!"`, ``, ``},
{`"\\"`, `"\\"`, ``, ``},
{`"\u0061\... | explode_data.jsonl/54774 | {
"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,
14463,
703,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
17430,
220,
914,
198,
197,
13967,
914,
198,
197,
95450,
914,
198,
197,
9859,
914,
198,
197,
59403,
197,
197,
90,
63,
3014,
7808,
1565,
3014,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtractResourceGroupByNicID(t *testing.T) {
testCases := []struct {
name string
nicID string
expectedRG string
expectedErrMsg error
}{
{
name: "ExtractResourceGroupByNicID should return correct resource group",
nicID: "/subscriptions/sub/resourceGroups/rg/pro... | explode_data.jsonl/7469 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 380
} | [
2830,
3393,
28959,
4783,
2808,
1359,
57816,
915,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
9038,
292,
915,
688,
914,
198,
197,
42400,
32360,
257,
914,
198,
197,
42400,
75449,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakeTrusted(t *testing.T) {
v := MakeTrusted(Null, []byte("abcd"))
if !reflect.DeepEqual(v, NULL) {
t.Errorf("MakeTrusted(Null...) = %v, want null", v)
}
v = MakeTrusted(Int64, []byte("1"))
want := TestValue(Int64, "1")
if !reflect.DeepEqual(v, want) {
t.Errorf("MakeTrusted(Int64, \"1\") = %v, want %... | explode_data.jsonl/30808 | {
"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,
8078,
1282,
27145,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
7405,
1282,
27145,
7,
3280,
11,
3056,
3782,
445,
68644,
5455,
743,
753,
34913,
94750,
3747,
11,
1770,
8,
341,
197,
3244,
13080,
445,
8078,
1282,
27145,
7,
3280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWrongEncrypted(t *testing.T) {
wrongEncrypted := "ca8e81c53958038846775d6f00c46df086e601d33bd0af78e1b4d396e90e42afe330e53787ea0832e3562e7e718feb71"
_, err := NewAESCipher("hseRTo5bUFhdeI9W").AESDecrypt(wrongEncrypted)
require.Error(t, err)
} | explode_data.jsonl/10854 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
29185,
7408,
14026,
1155,
353,
8840,
836,
8,
341,
6692,
14347,
7408,
14026,
1669,
330,
924,
23,
68,
23,
16,
66,
20,
18,
24,
20,
23,
15,
18,
23,
23,
19,
21,
22,
22,
20,
67,
21,
69,
15,
15,
66,
19,
21,
2940,
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 TestStickyLoadBalanaceWorksWithMultipleEndpointsRemoveOne(t *testing.T) {
client1 := &net.TCPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 0}
client2 := &net.TCPAddr{IP: net.IPv4(127, 0, 0, 2), Port: 0}
client3 := &net.TCPAddr{IP: net.IPv4(127, 0, 0, 3), Port: 0}
client4 := &net.TCPAddr{IP: net.IPv4(127, 0, 0, 4), Po... | explode_data.jsonl/66181 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1308
} | [
2830,
3393,
623,
18964,
5879,
33,
32283,
578,
6776,
16056,
32089,
80786,
13021,
3966,
1155,
353,
8840,
836,
8,
341,
25291,
16,
1669,
609,
4711,
836,
7123,
13986,
90,
3298,
25,
4179,
46917,
85,
19,
7,
16,
17,
22,
11,
220,
15,
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... | 6 |
func TestMovedModule(t *testing.T) {
modulesPath, err := filepath.Abs("./test/moved_module")
require.NoError(t, err)
configs := []*ModuleConfig{
{
Module: "old",
Filesets: map[string]*FilesetConfig{
"test": {},
},
},
}
reg, err := newModuleRegistry(modulesPath, configs, nil, beat.Info{Version: "... | explode_data.jsonl/64755 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 164
} | [
2830,
3393,
53232,
3332,
1155,
353,
8840,
836,
8,
341,
42228,
2425,
1820,
11,
1848,
1669,
26054,
33255,
13988,
1944,
3183,
4941,
10750,
1138,
17957,
35699,
1155,
11,
1848,
692,
25873,
82,
1669,
29838,
3332,
2648,
515,
197,
197,
515,
298... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRestore(t *testing.T) {
env, cleanup := withTestEnvironment(t)
defer cleanup()
testRunInit(t, env.gopts)
for i := 0; i < 10; i++ {
p := filepath.Join(env.testdata, fmt.Sprintf("foo/bar/testfile%v", i))
rtest.OK(t, os.MkdirAll(filepath.Dir(p), 0755))
rtest.OK(t, appendRandomData(p, uint(mrand.Intn(2... | explode_data.jsonl/43558 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
56284,
1155,
353,
8840,
836,
8,
341,
57538,
11,
21290,
1669,
448,
2271,
12723,
1155,
340,
16867,
21290,
2822,
18185,
6727,
3803,
1155,
11,
6105,
1302,
10518,
692,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
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... | 2 |
func TestGenModel_Issue981(t *testing.T) {
specDoc, err := loads.Spec("../fixtures/bugs/981/swagger.json")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
k := "User"
opts := opts()
genModel, err := makeGenDefinition(k, "models", definitions[k], specDoc, opts)
require.NoError(t, err)
buf := ... | explode_data.jsonl/2558 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 344
} | [
2830,
3393,
9967,
1712,
7959,
83890,
24,
23,
16,
1155,
353,
8840,
836,
8,
341,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
14,
56176,
14,
24,
23,
16,
80930,
4323,
1138,
17957,
35699,
1155,
11,
1848,
692,
7452,
4054,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnabledLogStreamEvents(t *testing.T) {
tracer := mocktracer.New()
tracing := newProxyTracing(&OpenTracingParams{
Tracer: tracer,
LogStreamEvents: true,
})
span := tracer.StartSpan("test")
defer span.Finish()
tracing.logStreamEvent(span, "test-filter", StartEvent)
tracing.logStreamEvent(spa... | explode_data.jsonl/50653 | {
"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,
5462,
2201,
3027,
7900,
1155,
353,
8840,
836,
8,
341,
25583,
9584,
1669,
7860,
94941,
7121,
741,
25583,
4527,
1669,
501,
16219,
1282,
4527,
2099,
5002,
1282,
4527,
4870,
515,
197,
197,
1282,
9584,
25,
688,
64306,
345,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestValidate(t *testing.T) {
c := internal.NewConfigurationWithDefaults()
viper.Set(configuration.ViperKeySubjectTypesSupported, []string{"pairwise", "public"})
viper.Set(configuration.ViperKeyDefaultClientScope, []string{"openid"})
v := NewValidator(c)
for k, tc := range []struct {
in *Client
che... | explode_data.jsonl/70141 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1519
} | [
2830,
3393,
17926,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
5306,
7121,
7688,
2354,
16273,
741,
5195,
12858,
4202,
48724,
5058,
12858,
1592,
13019,
4173,
34636,
11,
3056,
917,
4913,
12670,
4482,
497,
330,
888,
23625,
5195,
12858,
4202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClient_ShowTransaction(t *testing.T) {
t.Parallel()
app, cleanup := cltest.NewApplicationWithKey(t, cltest.LenientEthMock)
defer cleanup()
require.NoError(t, app.Start())
store := app.GetStore()
from := cltest.GetAccountAddress(t, store)
tx := cltest.CreateTx(t, store, from, 1)
client, r := app.NewC... | explode_data.jsonl/78859 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
2959,
79665,
8070,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
28236,
11,
21290,
1669,
1185,
1944,
7121,
4988,
2354,
1592,
1155,
11,
1185,
1944,
65819,
1167,
65390,
11571,
340,
16867,
21290,
741,
17957,
35699,
1155,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetAllSSMSecretRequirements(t *testing.T) {
regionWest := "us-west-2"
regionEast := "us-east-1"
secret1 := apicontainer.Secret{
Provider: "ssm",
Name: "secret1",
Region: regionWest,
ValueFrom: "/test/secretName1",
}
secret2 := apicontainer.Secret{
Provider: "asm",
Name: "secre... | explode_data.jsonl/37240 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 517
} | [
2830,
3393,
1949,
2403,
1220,
4826,
50856,
59202,
1155,
353,
8840,
836,
8,
341,
197,
3943,
23306,
1669,
330,
355,
37602,
12,
17,
698,
197,
3943,
36340,
1669,
330,
355,
39507,
12,
16,
1837,
197,
20474,
16,
1669,
1443,
51160,
1743,
7477... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMissingValueInMIddle(t *testing.T) {
var args struct {
Foo string
Bar string
}
err := parse("--foo --bar=abc", &args)
assert.Error(t, err)
} | explode_data.jsonl/13014 | {
"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,
25080,
1130,
641,
9773,
631,
273,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
12727,
2624,
914,
198,
197,
197,
3428,
914,
198,
197,
532,
9859,
1669,
4715,
21549,
7975,
1177,
2257,
28,
13683,
497,
609,
2116,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestCreateCgroupPathExists(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockControl := mock_control.NewMockControl(ctrl)
mockIO := mock_ioutilwrapper.NewMockIOUtil(ctrl)
cgroupRoot := fmt.Sprintf("/ecs/%s", taskID)
gomock.InOrder(
mockControl.EXPECT().Exists(gomock.Any()).Return(t... | explode_data.jsonl/68158 | {
"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,
4021,
34,
4074,
1820,
15575,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
77333,
3273,
1669,
7860,
13436,
7121,
11571,
3273,
62100,
340,
77333,
3810,
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 TestResourcesDuration_String(t *testing.T) {
assert.Empty(t, ResourcesDuration{}.String(), "empty")
assert.Equal(t, "1s*(100Mi memory)", ResourcesDuration{corev1.ResourceMemory: NewResourceDuration(1 * time.Second)}.String(), "memory")
} | explode_data.jsonl/26040 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
11277,
12945,
31777,
1155,
353,
8840,
836,
8,
341,
6948,
11180,
1155,
11,
16209,
12945,
46391,
703,
1507,
330,
3194,
1138,
6948,
12808,
1155,
11,
330,
16,
82,
6599,
16,
15,
15,
41887,
4938,
11583,
16209,
12945,
90,
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 |
func TestImage_OrderBySemverTagDesc(t *testing.T) {
ti := time.Time{}
aa := mustMakeInfo("my/image:3", ti)
bb := mustMakeInfo("my/image:v1", ti)
cc := mustMakeInfo("my/image:1.10", ti)
dd := mustMakeInfo("my/image:1.2.30", ti)
ee := mustMakeInfo("my/image:1.10.0", ti) // same as 1.10 but should be considered newe... | explode_data.jsonl/60189 | {
"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,
1906,
62,
34605,
29499,
423,
5668,
11065,
1155,
353,
8840,
836,
8,
341,
72859,
1669,
882,
16299,
16094,
197,
5305,
1669,
1969,
8078,
1731,
445,
2408,
23349,
25,
18,
497,
8988,
340,
2233,
65,
1669,
1969,
8078,
1731,
445,
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 Test_Validate_DNS(t *testing.T) {
for _, name := range []string{"test.-", "!", "-"} {
errs := validation.IsDNS1123Subdomain(name)
if len(errs) == 0 {
t.Fatalf("Expected errors validating name %q", name)
}
}
} | explode_data.jsonl/61613 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 94
} | [
2830,
3393,
62,
17926,
1557,
2448,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
829,
1669,
2088,
3056,
917,
4913,
1944,
12612,
497,
330,
18789,
6523,
9207,
341,
197,
9859,
82,
1669,
10519,
4506,
61088,
16,
16,
17,
18,
3136,
12204,
3153,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMonInQuorum(t *testing.T) {
entry := client.MonMapEntry{Name: "foo", Rank: 23}
quorum := []int{}
// Nothing in quorum
assert.False(t, monInQuorum(entry, quorum))
// One or more members in quorum
quorum = []int{23}
assert.True(t, monInQuorum(entry, quorum))
quorum = []int{5, 6, 7, 23, 8}
assert.True(t... | explode_data.jsonl/39529 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
11095,
641,
2183,
33006,
1155,
353,
8840,
836,
8,
341,
48344,
1669,
2943,
52211,
2227,
5874,
63121,
25,
330,
7975,
497,
19298,
25,
220,
17,
18,
532,
197,
446,
33006,
1669,
3056,
396,
16094,
197,
322,
12064,
304,
922,
33006... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEqualWrapper_Funcs(t *testing.T) {
assert := New(t)
type f func() int
var f1 f = func() int { return 1 }
var f2 f = func() int { return 2 }
var f1_copy f = f1
assert.Equal(f1_copy, f1, "Funcs are the same and should be considered equal")
assert.NotEqual(f1, f2, "f1 and f2 are different")
} | explode_data.jsonl/54977 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
2993,
11542,
1400,
1347,
82,
1155,
353,
8840,
836,
8,
1476,
6948,
1669,
1532,
1155,
692,
13158,
282,
2915,
368,
526,
198,
2405,
282,
16,
282,
284,
2915,
368,
526,
314,
470,
220,
16,
456,
2405,
282,
17,
282,
284,
2915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakeAlphanumeric(t *testing.T) {
cases := []struct {
text string
length int
bitLength int
bytes []byte
}{
{"", 0, 0, []byte{}},
{"A", 1, 6, []byte{0x0, 0x0, 0x1, 0x0, 0x1, 0x0}},
{"%:", 2, 11, []byte{0x1, 0x1, 0x0, 0x1, 0x1, 0x0, 0x1, 0x1, 0x0, 0x1, 0x0}},
{"Q R", 3, 17, []byte{0x... | explode_data.jsonl/54191 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 406
} | [
2830,
3393,
8078,
2101,
65788,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
15425,
414,
914,
198,
197,
49046,
262,
526,
198,
197,
79980,
4373,
526,
198,
197,
70326,
257,
3056,
3782,
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 TestBundle_AddApplicationsByBundleName(t *testing.T) {
b := NewBundle(yaml.GetName())
//Add basisset
err := b.AddApplicationsByBundleName(bundles.Caos)
assert.NoError(t, err)
apps := bundles.GetCaos()
eqApps := b.GetApplications()
assert.Equal(t, len(eqApps), len(apps))
for eqApp := range eqApps {
asse... | explode_data.jsonl/48060 | {
"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,
8409,
21346,
50359,
1359,
8409,
675,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
1532,
8409,
7021,
9467,
60304,
12367,
197,
322,
2212,
3046,
4888,
198,
9859,
1669,
293,
1904,
50359,
1359,
8409,
675,
1883,
49204,
727,
64866,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestBinaryExprName(t *testing.T) {
for i, tt := range []struct {
expr string
name string
}{
{expr: `value + 1`, name: `value`},
{expr: `"user" / total`, name: `user_total`},
{expr: `("user" + total) / total`, name: `user_total_total`},
} {
expr := influxql.MustParseExpr(tt.expr)
switch expr := exp... | explode_data.jsonl/24814 | {
"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,
21338,
16041,
675,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
17853,
1669,
2088,
3056,
1235,
341,
197,
8122,
649,
914,
198,
197,
11609,
914,
198,
197,
59403,
197,
197,
90,
9413,
25,
1565,
957,
488,
220,
16,
7808,
829,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewLoggerFromConfig(t *testing.T) {
c, _, _ := getTestConfig()
_, atomicLevel := NewLoggerFromConfig(c, "queueproxy")
if atomicLevel.Level() != zapcore.DebugLevel {
t.Errorf("logger level wanted: DebugLevel, got: %v", atomicLevel)
}
} | explode_data.jsonl/37329 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
3564,
7395,
3830,
2648,
1155,
353,
8840,
836,
8,
341,
1444,
11,
8358,
716,
1669,
633,
2271,
2648,
741,
197,
6878,
24510,
4449,
1669,
1532,
7395,
3830,
2648,
1337,
11,
330,
4584,
22803,
1138,
743,
24510,
4449,
25259,
368,
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 TestTryUpdatingCache(t *testing.T) {
ctx := &types.SystemContext{
SystemRegistriesConfPath: "testdata/try-update-cache-valid.conf",
SystemRegistriesConfDirPath: "testdata/this-does-not-exist",
}
InvalidateCache()
registries, err := TryUpdatingCache(ctx)
assert.Nil(t, err)
assert.Equal(t, 1, len(regist... | explode_data.jsonl/62239 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
21453,
46910,
8233,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
609,
9242,
16620,
1972,
515,
197,
5816,
3477,
380,
4019,
15578,
1820,
25,
262,
330,
92425,
14,
1539,
38860,
36680,
84810,
13937,
756,
197,
5816,
3477,
380,
4019,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFieldErrors_Also(t *testing.T) {
expected := cli.FieldErrors{
&field.Error{Field: "field1"},
&field.Error{Field: "field2"},
&field.Error{Field: "field3"},
}
actual := cli.FieldErrors{}.Also(
cli.FieldErrors{
&field.Error{Field: "field1"},
&field.Error{Field: "field2"},
},
cli.FieldErrors{
... | explode_data.jsonl/13210 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 201
} | [
2830,
3393,
1877,
13877,
40812,
704,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
21348,
17087,
13877,
515,
197,
197,
5,
2566,
6141,
90,
1877,
25,
330,
2566,
16,
7115,
197,
197,
5,
2566,
6141,
90,
1877,
25,
330,
2566,
17,
7115,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.