text stringlengths 93 16.4k | id stringlengths 20 40 | metadata dict | input_ids listlengths 45 2.05k | attention_mask listlengths 45 2.05k | complexity int64 1 9 |
|---|---|---|---|---|---|
func Test_NewGoogleCertFetcher_NetworkError(t *testing.T) {
asserter := assert.New(t)
ts := httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
asserter.Fail("wtf?")
}))
ts.Close()
testInstance := NewGoogleCertFetcher(ts.URL, httputil.DefaultHttpClient)
_, err := test... | explode_data.jsonl/7218 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
39582,
14444,
36934,
97492,
1604,
2349,
1454,
1155,
353,
8840,
836,
8,
341,
197,
33758,
465,
1669,
2060,
7121,
1155,
692,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
38356,
1758,
37508,
11,
1681,
353,
1254,
965... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateMinMaxes(t *testing.T) {
t.Parallel()
c := &Config{}
err := c.validateMinMaxes()
if err != nil {
t.Error(err)
}
c.CurrencySettings = []CurrencySettings{
{
SellSide: MinMax{
MinimumSize: decimal.NewFromInt(-1),
},
},
}
err = c.validateMinMaxes()
if !errors.Is(err, errSizeLessTh... | explode_data.jsonl/58418 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 968
} | [
2830,
3393,
17926,
92304,
288,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
1444,
1669,
609,
2648,
16094,
9859,
1669,
272,
19520,
92304,
288,
741,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
630,
1444,
77186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTypeSystem_ScalarTypesMustBeSerializable_RejectsAScalarTypeNotDefiningSerialize(t *testing.T) {
_, err := schemaWithFieldType(graphql.NewScalar(graphql.ScalarConfig{
Name: "SomeScalar",
}))
expectedError := `SomeScalar must provide "serialize" function. If this custom Scalar ` +
`is also used as an inp... | explode_data.jsonl/79168 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
929,
2320,
1098,
59153,
4173,
31776,
3430,
29268,
50693,
583,
82,
1911,
59153,
929,
2623,
2620,
5740,
15680,
1155,
353,
8840,
836,
8,
1476,
197,
6878,
1848,
1669,
10802,
2354,
63733,
24312,
1470,
7121,
20639,
24312,
1470,
808,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSnapCreateTransactionWithMap(t *testing.T) {
midtrans.ServerKey = sandboxServerKey
assert.Equal(t, sandboxServerKey, midtrans.ServerKey)
res, err := CreateTransactionWithMap(generateReqWithMap())
if err != nil {
fmt.Println("Snap Request Error", err.GetMessage())
}
fmt.Println("Snap response", res)
... | explode_data.jsonl/13457 | {
"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,
61871,
4021,
8070,
2354,
2227,
1155,
353,
8840,
836,
8,
341,
2109,
307,
1458,
22997,
1592,
284,
42754,
5475,
1592,
198,
6948,
12808,
1155,
11,
42754,
5475,
1592,
11,
5099,
1458,
22997,
1592,
692,
10202,
11,
1848,
1669,
4230,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetLastIndex(t *testing.T) {
defer goleak.VerifyNone(t, opt)
pipelineId := uuid.New()
incorrectConvertPipelineId := uuid.New()
err := cacheService.SetValue(context.Background(), pipelineId, cache.RunOutputIndex, 2)
if err != nil {
panic(err)
}
type args struct {
ctx context.Context
cache... | explode_data.jsonl/26 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 952
} | [
2830,
3393,
1949,
5842,
1552,
1155,
353,
8840,
836,
8,
341,
16867,
728,
273,
585,
54853,
4064,
1155,
11,
3387,
340,
3223,
8790,
764,
1669,
16040,
7121,
741,
197,
61954,
12012,
34656,
764,
1669,
16040,
7121,
741,
9859,
1669,
6500,
1860,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_WatchUntil_PollFuncTimeout(t *testing.T) {
type timeoutTest struct {
name string
targetPollFuncCalls func(int) bool
targetWatchFuncCalls func(int) bool
pollFunc pollFunc
predicate Predicate
timeout time.Duration
}
timeoutTests := []timeoutTes... | explode_data.jsonl/12234 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 955
} | [
2830,
3393,
2763,
754,
24493,
1088,
965,
9626,
7636,
1155,
353,
8840,
836,
8,
341,
13158,
9632,
2271,
2036,
341,
197,
11609,
338,
914,
198,
197,
28861,
49207,
9626,
55292,
220,
2915,
1548,
8,
1807,
198,
197,
28861,
14247,
9626,
55292,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewWithLocalAddr(t *testing.T) {
ts := createGetServer(t)
defer ts.Close()
localAddress, _ := net.ResolveTCPAddr("tcp", "127.0.0.1")
client := NewWithLocalAddr(localAddress)
client.SetHostURL(ts.URL)
resp, err := client.R().Get("/")
assertNil(t, err)
assertEqual(t, resp.String(), "TestGet: text respo... | explode_data.jsonl/39359 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
3564,
2354,
7319,
13986,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
1855,
1949,
5475,
1155,
340,
16867,
10591,
10421,
2822,
8854,
4286,
11,
716,
1669,
4179,
57875,
49896,
13986,
445,
27161,
497,
330,
16,
17,
22,
13,
15,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOutputDebugString(t *testing.T) {
d := GetDLL(t, "kernel32.dll")
p := syscall.StringToUTF16Ptr("testing OutputDebugString")
d.Proc("OutputDebugStringW").Call(uintptr(unsafe.Pointer(p)))
} | explode_data.jsonl/54667 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
5097,
7939,
703,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
2126,
64187,
1155,
11,
330,
23248,
18,
17,
22200,
1138,
3223,
1669,
49345,
6431,
1249,
8561,
16,
21,
5348,
445,
8840,
9258,
7939,
703,
1138,
2698,
7763,
66,
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 |
func TestReconcileIfJoinNodePoolsAndControlPlaneIsReady(t *testing.T) {
_ = feature.MutableGates.Set("MachinePool=true")
cluster := newCluster("cluster")
cluster.Status.InfrastructureReady = true
cluster.Status.ControlPlaneInitialized = true
cluster.Spec.ControlPlaneEndpoint = clusterv1.APIEndpoint{Host: "100.105... | explode_data.jsonl/44322 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1028
} | [
2830,
3393,
693,
40446,
457,
2679,
12292,
1955,
47,
6178,
3036,
3273,
34570,
3872,
19202,
1155,
353,
8840,
836,
8,
341,
197,
62,
284,
4565,
74028,
38,
973,
4202,
445,
21605,
10551,
11265,
5130,
197,
18855,
1669,
501,
28678,
445,
18855,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSanitizeProgramTextSane(t *testing.T) {
text := "previous = data('statmonster.inbound_lines',filter('source_region','${var.clusters_no_uswest2[count.index]}')).timeshift('2m').sum()\nsignal = data('statmonster.inbo und_lines',filter('source_region','${var.clusters_no_uswest2[count.index]}')).sum()\ndetect(... | explode_data.jsonl/32257 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
23729,
26310,
10690,
1178,
50,
2145,
1155,
353,
8840,
836,
8,
341,
15425,
1669,
330,
19702,
284,
821,
492,
9878,
50519,
1858,
10891,
18323,
516,
5315,
492,
2427,
20627,
1844,
2365,
947,
6751,
14605,
6536,
11306,
11039,
17,
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 TestInvWire(t *testing.T) {
// Block 203707 hash.
hashStr := "3264bc2ac36a60840790ba1d475d01367e7c723da941069e9dc"
blockHash, err := wire.NewShaHashFromStr(hashStr)
if err != nil {
t.Errorf("NewShaHashFromStr: %v", err)
}
// Transation 1 of Block 203707 hash.
hashStr = "d28a3dc7392bf00a9855ee93dd9a81eff8... | explode_data.jsonl/27444 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1754
} | [
2830,
3393,
15174,
37845,
1155,
353,
8840,
836,
8,
341,
197,
322,
8362,
220,
17,
15,
18,
22,
15,
22,
5175,
624,
50333,
2580,
1669,
330,
18,
17,
21,
19,
8904,
17,
580,
18,
21,
64,
21,
15,
23,
19,
15,
22,
24,
15,
4645,
16,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestTravelMap(t *testing.T) {
m1 := map[int]int{1:1, 2:2, 3:3}
for k, v:=range m1{
t.Log(k, v)
}
} | explode_data.jsonl/30662 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
40248,
2227,
1155,
353,
8840,
836,
8,
341,
2109,
16,
1669,
2415,
18640,
63025,
90,
16,
25,
16,
11,
220,
17,
25,
17,
11,
220,
18,
25,
18,
532,
2023,
595,
11,
348,
14209,
9669,
296,
16,
515,
197,
3244,
5247,
5969,
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
] | 2 |
func TestUsersService_Get_authenticatedUser(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc("/user", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{"id":1}`)
})
user, _, err := client.Users.Get("")
if err != nil {
t.Errorf("Users.Get returned error: %v", err... | explode_data.jsonl/36800 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
3393,
7137,
1860,
13614,
64913,
1474,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
872,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
18185,
3523,
1155,
11,
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... | 1 |
func TestStorage_FormatAccessLogBytes(t *testing.T) {
{
storage := &Storage{
Format: StorageFormatJSON,
}
data, err := storage.FormatAccessLogBytes(&accesslogs.AccessLog{
ServerName: "hello.com",
RequestPath: "/webhook",
Args: "a=1&b=2",
})
if err != nil {
t.Fatal(err)
}
t.Log(stri... | explode_data.jsonl/28490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 307
} | [
2830,
3393,
5793,
72999,
6054,
2201,
7078,
1155,
353,
8840,
836,
8,
341,
197,
515,
197,
197,
16172,
1669,
609,
5793,
515,
298,
197,
4061,
25,
14693,
4061,
5370,
345,
197,
197,
532,
197,
8924,
11,
1848,
1669,
5819,
9978,
6054,
2201,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPriorityQueue_NominatedPodsForNode(t *testing.T) {
objs := []runtime.Object{medPriorityPodInfo.Pod, unschedulablePodInfo.Pod, highPriorityPodInfo.Pod}
q := NewTestQueueWithObjects(context.Background(), newDefaultQueueSort(), objs)
q.Add(medPriorityPodInfo.Pod)
q.Add(unschedulablePodInfo.Pod)
q.Add(highPri... | explode_data.jsonl/68191 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 409
} | [
2830,
3393,
20555,
7554,
1604,
49515,
23527,
82,
2461,
1955,
1155,
353,
8840,
836,
8,
341,
22671,
82,
1669,
3056,
22255,
8348,
90,
2061,
20555,
23527,
1731,
88823,
11,
6975,
2397,
360,
480,
23527,
1731,
88823,
11,
1550,
20555,
23527,
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... | 6 |
func TestSubDoimainEncoding(t *testing.T) {
sd := SubDomain{
Name: "demo.example.org",
}
fixtArgs := `<subdomain xsi:type="ns1:SubDomain">
<name xsi:type="xsd:string">demo.example.org</name>
</subdomain>`
assert.Equal(t, fixtArgs, sd.EncodeArgs("subdomain"))
prm := gotransip.TestParamsContainer{}
sd.EncodePa... | explode_data.jsonl/35229 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
3136,
5404,
318,
466,
14690,
1155,
353,
8840,
836,
8,
341,
99000,
1669,
3719,
13636,
515,
197,
21297,
25,
330,
25762,
7724,
2659,
756,
197,
630,
1166,
941,
83,
4117,
1669,
30586,
1966,
12204,
37757,
46445,
428,
4412,
16,
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 TestGenModel_Issue300(t *testing.T) {
specDoc, err := loads.Spec("../fixtures/codegen/todolist.models.yml")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
k := "ActionItem"
opts := opts()
genModel, err := makeGenDefinition(k, "models", definitions[k], specDoc, opts)
require.NoError(t, er... | explode_data.jsonl/2545 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 227
} | [
2830,
3393,
9967,
1712,
7959,
83890,
18,
15,
15,
1155,
353,
8840,
836,
8,
341,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
46928,
4370,
5523,
347,
34675,
8235,
33936,
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 TestSpotxMakeBid(t *testing.T) {
var secure int8 = 1
parmsJSON := []byte(`{
"bidder": {
"channel_id": "85394",
"ad_unit": "instream",
"secure": true,
"ad_volume": 0.800000,
"price_floor": 9,
"hide_skin": false
}
}`)
request := ... | explode_data.jsonl/41471 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 733
} | [
2830,
3393,
47049,
87,
8078,
65452,
1155,
353,
8840,
836,
8,
1476,
2405,
9767,
526,
23,
284,
220,
16,
271,
197,
77508,
5370,
1669,
3056,
3782,
5809,
515,
286,
330,
20648,
1107,
788,
341,
688,
330,
10119,
842,
788,
330,
23,
20,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_diffWaysToCompute(t *testing.T) {
type args struct {
expression string
}
tests := []struct {
name string
args args
want []int
}{
{
name: "ex1",
args: args{
expression: "2-1-1",
},
want: []int{0, 2},
},
{
name: "ex2",
args: args{
expression: "2*3-4*5",
},
want:... | explode_data.jsonl/2712 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 298
} | [
2830,
3393,
15850,
54,
942,
1249,
46254,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
8122,
4011,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
3056,
396,
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 TestSpan_Kind(t *testing.T) {
ms := NewSpan()
assert.EqualValues(t, SpanKindUnspecified, ms.Kind())
testValKind := SpanKindServer
ms.SetKind(testValKind)
assert.EqualValues(t, testValKind, ms.Kind())
} | explode_data.jsonl/63268 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 81
} | [
2830,
3393,
12485,
10102,
484,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
12485,
741,
6948,
12808,
6227,
1155,
11,
11903,
10629,
1806,
53434,
11,
9829,
54199,
2398,
18185,
2208,
10629,
1669,
11903,
10629,
5475,
198,
47691,
4202,
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 |
func TestEventChannel_flush(t *testing.T) {
data := make([]byte, 0)
send := newSender(&data)
eventChannel := NewEventChannel(send, maxByteSize, maxEventCount, maxTime)
defer eventChannel.Close()
eventChannel.buffer([]byte("one"))
eventChannel.buffer([]byte("two"))
eventChannel.buffer([]byte("three"))
eventCha... | explode_data.jsonl/43919 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
1556,
9629,
39213,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
1281,
10556,
3782,
11,
220,
15,
340,
32817,
1669,
501,
20381,
2099,
691,
692,
28302,
9629,
1669,
1532,
1556,
9629,
47617,
11,
1932,
7153,
1695,
11,
1932,
1556,
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 TestInterruptedMatching(t *testing.T) {
m, added, err := NewMatcherFromFiles(
"testdata/too_many_wildcards.txt",
)
if err != nil {
t.Fatal(err)
}
if added == 0 {
t.Fatalf("not enough rules loaded: %d", added)
}
rq := Request{
URL: "http://www.ultimedia.com/api/widget/smart?j=new&t=144464480... | explode_data.jsonl/81622 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1140
} | [
2830,
3393,
22528,
291,
64430,
1155,
353,
8840,
836,
8,
341,
2109,
11,
3694,
11,
1848,
1669,
1532,
37554,
3830,
10809,
1006,
197,
197,
1,
92425,
32429,
78,
22101,
1670,
695,
25024,
3909,
756,
197,
340,
743,
1848,
961,
2092,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestClone(t *testing.T) {
nm := &NetworkMember{
PKIid: common.PKIidType("abc"),
Properties: &proto.Properties{
LedgerHeight: 1,
LeftChannel: true,
},
Envelope: &proto.Envelope{
Payload: []byte("payload"),
},
InternalEndpoint: "internal",
Metadata: []byte{1, 2, 3},
Endpoint: ... | explode_data.jsonl/62253 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 252
} | [
2830,
3393,
37677,
1155,
353,
8840,
836,
8,
341,
9038,
76,
1669,
609,
12320,
9366,
515,
197,
10025,
80971,
307,
25,
4185,
1069,
80971,
307,
929,
445,
13683,
4461,
197,
197,
7903,
25,
609,
15110,
15945,
515,
298,
15070,
291,
1389,
3640... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCacheKeyExceed(t *testing.T) {
cache := NewLRUCache(20, 5)
t.Logf("current key: %d", cache.GetKeysCount())
for i := 0; i < 5; i++ {
k := strconv.Itoa(i)
cache.Update(k, i+10)
t.Logf("for(%s) current key: %d", k, cache.GetKeysCount())
}
v, e := cache.Get("3")
t.Logf("[get 3] ret:%v,err:%v", v, e)
f... | explode_data.jsonl/4582 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 602
} | [
2830,
3393,
8233,
1592,
840,
4635,
1155,
353,
8840,
836,
8,
341,
52680,
1669,
1532,
20117,
5459,
1777,
7,
17,
15,
11,
220,
20,
340,
3244,
98954,
445,
3231,
1376,
25,
1018,
67,
497,
6500,
2234,
8850,
2507,
2398,
2023,
600,
1669,
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... | 5 |
func TestClientDoesntCachePartitionsForTopicsWithErrors(t *testing.T) {
seedBroker := NewMockBroker(t, 1)
replicas := []int32{seedBroker.BrokerID()}
metadataResponse := new(MetadataResponse)
metadataResponse.AddBroker(seedBroker.Addr(), seedBroker.BrokerID())
metadataResponse.AddTopicPartition("my_topic", 1, rep... | explode_data.jsonl/54398 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 560
} | [
2830,
3393,
2959,
21468,
406,
8233,
5800,
5930,
2461,
45003,
2354,
13877,
1155,
353,
8840,
836,
8,
341,
197,
22602,
65545,
1669,
1532,
11571,
65545,
1155,
11,
220,
16,
692,
73731,
52210,
1669,
3056,
396,
18,
17,
90,
22602,
65545,
1785,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParsePosition2(t *testing.T) {
var err error
var o *owlfunctional.Ontology
parser.TokenLog = true
o, err = OntologyFromReader(strings.NewReader(`
Prefix(:=<urn:absolute:similix.de/similixadmin#>)X
`), "Testsource")
fmt.Println(err, o)
if err == nil {
t.Fatal()
}
pos := err.(*parser.PErr).AfterPos
i... | explode_data.jsonl/44455 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
14463,
3812,
17,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
2405,
297,
353,
9605,
49228,
8382,
406,
2449,
271,
55804,
32277,
2201,
284,
830,
198,
22229,
11,
1848,
284,
17819,
2449,
3830,
5062,
51442,
68587,
61528,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQuote2(t *testing.T) {
rwc := openTPMOrSkip(t)
defer rwc.Close()
// Get the key from aikblob, assuming it exists. Otherwise, skip the test.
blob, err := ioutil.ReadFile("./aikblob")
if err != nil {
t.Skip("No aikblob file; skipping test")
}
// Load the AIK for the quote.
// We're using the well-kno... | explode_data.jsonl/75350 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 360
} | [
2830,
3393,
19466,
17,
1155,
353,
8840,
836,
8,
341,
7000,
24028,
1669,
1787,
4239,
44,
2195,
35134,
1155,
340,
16867,
435,
24028,
10421,
2822,
197,
322,
2126,
279,
1376,
504,
264,
1579,
35112,
11,
25538,
432,
6724,
13,
18214,
11,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue13(t *testing.T) {
filter := New()
filter.AddWord("words")
filter.AddWord("警察局")
r := filter.FindAll("words words words kill myself myself suicide警察局kill my self")
expected := []string{"words", "警察局"}
if !reflect.DeepEqual(r, expected) {
t.Errorf("%v expected, got %v", expected, r)
}
} | explode_data.jsonl/81003 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
42006,
16,
18,
1155,
353,
8840,
836,
8,
341,
50108,
1669,
1532,
741,
50108,
1904,
10879,
445,
5761,
1138,
50108,
1904,
10879,
445,
104834,
89977,
5130,
7000,
1669,
4051,
9998,
2403,
445,
5761,
4244,
4244,
5505,
7037,
7037,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dedupEnv(t *testing.T) {
type args struct {
env []string
}
tests := []struct {
name string
args args
want []string
}{
{
name: "Test_dedupEnv",
args: args{
[]string{"a=a", "b=b", "a=c"},
},
want: []string{"a=c", "b=b"},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *... | explode_data.jsonl/40314 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 282
} | [
2830,
3393,
814,
291,
454,
14359,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
57538,
3056,
917,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
3056,
917,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNewRequestWithJSONBodyNewRequestFailure(t *testing.T) {
client := newClient()
client.BaseURL = "\t\t\t" // cause URL parse error
req, err := client.NewRequestWithJSONBody(
context.Background(), "GET", "/", nil, nil,
)
if err == nil || !strings.HasSuffix(err.Error(), "invalid control character in URL") {... | explode_data.jsonl/60960 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 147
} | [
2830,
3393,
3564,
1900,
2354,
5370,
5444,
3564,
1900,
17507,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
2959,
741,
25291,
13018,
3144,
284,
2917,
83,
4955,
4955,
1,
442,
5240,
5548,
4715,
1465,
198,
24395,
11,
1848,
1669,
2943,
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 TestURLOpener(t *testing.T) {
// This test will be skipped unless the project is set up with Terraform.
// Before running go test, run in this directory:
//
// terraform init
// terraform apply
tfOut, err := terraform.ReadOutput(".")
if err != nil || len(tfOut) == 0 {
t.Skipf("Could not obtain harness in... | explode_data.jsonl/19378 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 984
} | [
2830,
3393,
1511,
1593,
79,
798,
1155,
353,
8840,
836,
8,
341,
197,
322,
1096,
1273,
686,
387,
35157,
7241,
279,
2390,
374,
738,
705,
448,
49426,
627,
624,
197,
322,
13235,
4303,
728,
1273,
11,
1598,
304,
419,
6220,
510,
197,
2289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSyncer_applyChunks_Results(t *testing.T) {
unknownErr := errors.New("unknown error")
boom := errors.New("boom")
testcases := map[string]struct {
result abci.ResponseApplySnapshotChunk_Result
err error
expectErr error
}{
"accept": {abci.ResponseApplySnapshotChunk_ACCEPT, nil, nil... | explode_data.jsonl/46292 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 943
} | [
2830,
3393,
12154,
261,
36551,
89681,
62,
9801,
1155,
353,
8840,
836,
8,
341,
197,
16088,
7747,
1669,
5975,
7121,
445,
16088,
1465,
1138,
197,
95316,
1669,
5975,
7121,
445,
95316,
5130,
18185,
23910,
1669,
2415,
14032,
60,
1235,
341,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestLabelService_FindLabels(t *testing.T) {
type fields struct {
LabelService influxdb.LabelService
}
type args struct {
permission influxdb.Permission
}
type wants struct {
err error
labels []*influxdb.Label
}
tests := []struct {
name string
fields fields
args args
wants wants
}{
... | explode_data.jsonl/35724 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1771
} | [
2830,
3393,
2476,
1860,
95245,
23674,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
82126,
1860,
52852,
1999,
4679,
1860,
198,
197,
532,
13158,
2827,
2036,
341,
197,
197,
22618,
52852,
1999,
73409,
198,
197,
532,
13158,
680... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetInfo(t *testing.T) {
server, _ := GetStartedTestServer(t)
client := NewClient(server.config)
res, err := client.GetInfo()
if err != nil {
t.Error(err)
}
_ = res
// TODO validate
} | explode_data.jsonl/44704 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
1949,
1731,
1155,
353,
8840,
836,
8,
341,
41057,
11,
716,
1669,
2126,
32527,
2271,
5475,
1155,
340,
25291,
1669,
1532,
2959,
21421,
5423,
340,
10202,
11,
1848,
1669,
2943,
2234,
1731,
741,
743,
1848,
961,
2092,
341,
197,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestLoadConfigurationFromEnvVariableClowderEnabledAndSupported(t *testing.T) {
os.Clearenv()
mustSetEnv(t, "CCX_NOTIFICATION_SERVICE_CONFIG_FILE", "tests/config1")
mustSetEnv(t, "ACG_CONFIG", "tests/clowder_config.json")
mustSetEnv(t, "CLOWDER_ENABLED", "true")
mustLoadConfiguration("CCX_NOTIFICATION_SERVICE_... | explode_data.jsonl/61906 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
5879,
7688,
3830,
14359,
7827,
5066,
363,
1107,
5462,
3036,
34636,
1155,
353,
8840,
836,
8,
341,
25078,
727,
273,
9151,
85,
741,
2109,
590,
1649,
14359,
1155,
11,
330,
3706,
55,
54241,
21590,
12568,
8087,
497,
330,
23841,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNotEq(t *testing.T) {
// Register the test.
RegisterTestingT(t)
// Build dummy dataset.
data := []map[string]interface{}{
{"location": "Auckland", "department": "Engineering", "team": "Security", "salary": 120000, "prev_employers": 7, "start_date": "2016-01-15T12:00:00Z"},
{"location": "Auckland", "de... | explode_data.jsonl/59768 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1140
} | [
2830,
3393,
2623,
27312,
1155,
353,
8840,
836,
8,
341,
197,
322,
8451,
279,
1273,
624,
79096,
16451,
51,
1155,
692,
197,
322,
7854,
17292,
10337,
624,
8924,
1669,
3056,
2186,
14032,
31344,
67066,
197,
197,
4913,
2527,
788,
330,
32,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetPodsForStatefulSetAdopt(t *testing.T) {
set := newStatefulSet(5)
pod1 := newStatefulSetPod(set, 1)
// pod2 is an orphan with matching labels and name.
pod2 := newStatefulSetPod(set, 2)
pod2.OwnerReferences = nil
// pod3 has wrong labels.
pod3 := newStatefulSetPod(set, 3)
pod3.OwnerReferences = nil
... | explode_data.jsonl/18624 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 476
} | [
2830,
3393,
1949,
23527,
82,
2461,
1397,
1262,
1649,
2589,
2912,
1155,
353,
8840,
836,
8,
341,
8196,
1669,
36848,
1262,
1649,
7,
20,
340,
3223,
347,
16,
1669,
36848,
1262,
1649,
23527,
14171,
11,
220,
16,
340,
197,
322,
7509,
17,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestSinglePartition(t *testing.T) {
cases := []struct {
ss []string
exp Table
}{{
ss: []string{"a", "b", "c"},
exp: Table{
{{"a"}, {"b"}, {"c"}},
},
}}
for _, c := range cases {
got := SinglePartition(c.ss)
test.Assert(t, "", c.exp, got)
}
} | explode_data.jsonl/58597 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 127
} | [
2830,
3393,
10888,
49978,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
34472,
220,
3056,
917,
198,
197,
48558,
6633,
198,
197,
15170,
515,
197,
34472,
25,
3056,
917,
4913,
64,
497,
330,
65,
497,
330,
66,
711... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Text_Search(t *testing.T) {
config := ReadConfiguration(t)
client, ctx := PrepareTest(t, config)
remoteDataFolder := remoteBaseTestDataFolder + "/DocumentElements/Text"
remoteFileName := "TestSearch.docx"
localFile := "DocumentElements/Text/SampleWordDocument.docx"
UploadNextFileToSto... | explode_data.jsonl/65692 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 437
} | [
2830,
3393,
20550,
65913,
1155,
353,
8840,
836,
8,
341,
262,
2193,
1669,
4457,
7688,
1155,
340,
262,
2943,
11,
5635,
1669,
31166,
2271,
1155,
11,
2193,
340,
262,
8699,
1043,
13682,
1669,
8699,
3978,
83920,
13682,
488,
3521,
7524,
11868,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMessageExtension(t *testing.T) {
bm := &base.BaseMessage{
Height: proto.Int32(179),
}
// Use extension that is itself a message.
um := &user.UserMessage{
Name: proto.String("Dave"),
Rank: proto.String("Major"),
}
err := proto.SetExtension(bm, user.E_LoginMessage_UserMessage, um)
if err != nil {
... | explode_data.jsonl/19870 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 510
} | [
2830,
3393,
2052,
12049,
1155,
353,
8840,
836,
8,
341,
2233,
76,
1669,
609,
3152,
13018,
2052,
515,
197,
197,
3640,
25,
18433,
7371,
18,
17,
7,
16,
22,
24,
1326,
197,
630,
197,
322,
5443,
8894,
429,
374,
5086,
264,
1943,
624,
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... | 9 |
func TestListMap(t *testing.T) {
list := New()
list.Add("a", "b", "c")
mappedList := list.Map(func(index int, value interface{}) interface{} {
return "mapped: " + value.(string)
})
if actualValue, _ := mappedList.Get(0); actualValue != "mapped: a" {
t.Errorf("Got %v expected %v", actualValue, "mapped: a")
}
... | explode_data.jsonl/18294 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 266
} | [
2830,
3393,
852,
2227,
1155,
353,
8840,
836,
8,
341,
14440,
1669,
1532,
741,
14440,
1904,
445,
64,
497,
330,
65,
497,
330,
66,
1138,
2109,
5677,
852,
1669,
1140,
10104,
18552,
7195,
526,
11,
897,
3749,
28875,
3749,
6257,
341,
197,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_execTransfer_fail(t *testing.T) {
address1 := &address.Address{}
envHandleUintptr := uintptr(unsafe.Pointer(address1))
jvmsCached, _ = lru.New(1000)
ok := execTransfer(opener, player, 100, envHandleUintptr)
assert.Equal(t, false, ok)
jvmTestEnv := setupTestEnv()
jvmsCached.Add(envHandleUintptr, jvmTe... | explode_data.jsonl/38984 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
18430,
21970,
22121,
1155,
353,
8840,
836,
8,
341,
63202,
16,
1669,
609,
4995,
26979,
16094,
57538,
6999,
21570,
3505,
1669,
38190,
7,
38157,
41275,
15434,
16,
1171,
12428,
85,
1011,
70293,
11,
716,
284,
326,
2672,
7121,
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 TestDockerKubernetes120ThreeWorkersConformanceFlow(t *testing.T) {
test := framework.NewClusterE2ETest(
t,
framework.NewDocker(t),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube120)),
framework.WithClusterFiller(api.WithWorkerNodeCount(3)),
)
runConformanceFlow(test)
} | explode_data.jsonl/34512 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
35,
13659,
42,
29827,
16,
17,
15,
19641,
74486,
1109,
11795,
18878,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
12626,
7121,
28678,
36,
17,
1348,
477,
1006,
197,
3244,
345,
197,
1166,
5794,
7121,
35,
13659,
1155,
1326,
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 TestPulsePointRequiredBidParameters(t *testing.T) {
adapter := NewPulsePointAdapter(adapters.DefaultHTTPAdapterConfig, "http://localhost/bid")
ctx := context.TODO()
req := SampleRequest(1, t)
bidder := req.Bidders[0]
// remove "ct" param and verify error message.
bidder.AdUnits[0].Params = json.RawMessage("{... | explode_data.jsonl/24659 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 632
} | [
2830,
3393,
47,
17217,
2609,
8164,
65452,
9706,
1155,
353,
8840,
836,
8,
341,
197,
19731,
1669,
1532,
47,
17217,
2609,
5940,
43779,
17425,
13275,
9230,
5940,
2648,
11,
330,
1254,
1110,
8301,
3470,
307,
1138,
20985,
1669,
2266,
90988,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTxnCommit(t *testing.T) {
path, err := ioutil.TempDir(os.TempDir(), "testing_badger_")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(path)
d, err := NewDatastore(path, nil)
if err != nil {
t.Fatal(err)
}
txn, err := d.NewTransaction(bg, false)
if err != nil {
t.Fatal(err)
}
key := ds.New... | explode_data.jsonl/933 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 296
} | [
2830,
3393,
31584,
77,
33441,
1155,
353,
8840,
836,
8,
341,
26781,
11,
1848,
1669,
43144,
65009,
6184,
9638,
65009,
6184,
1507,
330,
8840,
34199,
1389,
62,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResolvePlaceholdersInOutputValues(t *testing.T) {
wf := unmarshalWF(outputValuePlaceholders)
woc := newWoc(*wf)
woc.artifactRepository.S3 = new(config.S3ArtifactRepository)
woc.operate()
assert.Equal(t, wfv1.NodeRunning, woc.wf.Status.Phase)
pods, err := woc.controller.kubeclientset.CoreV1().Pods(wf.Obje... | explode_data.jsonl/54381 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 323
} | [
2830,
3393,
56808,
17371,
16662,
641,
5097,
6227,
1155,
353,
8840,
836,
8,
341,
6692,
69,
1669,
650,
27121,
32131,
11057,
1130,
17371,
16662,
340,
6692,
509,
1669,
501,
54,
509,
4071,
43083,
340,
6692,
509,
46886,
20754,
4624,
808,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDockerConfig(t *testing.T) {
ctx := context.Background()
// invalid config
_, err := (&Config{}).Run(ctx)
require.Error(t, err)
// MySQL
cfg, err := MySQL("latest", Out(ioutil.Discard))
require.NoError(t, err)
require.Equal(t, &Config{
Image: "mysql:latest",
Env: []string{"MYSQL_ROOT_PASSWORD=p... | explode_data.jsonl/48751 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 411
} | [
2830,
3393,
35,
13659,
2648,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
197,
322,
8318,
2193,
198,
197,
6878,
1848,
1669,
15899,
2648,
6257,
568,
6727,
7502,
340,
17957,
6141,
1155,
11,
1848,
692,
197,
322,
26339,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Reconcile_RequeueJoiningNodesIfControlPlaneNotInitialized(t *testing.T) {
cluster := newCluster("cluster")
cluster.Status.InfrastructureReady = true
workerMachine := newWorkerMachine(cluster)
workerJoinConfig := newWorkerJoinKubeadmConfig(workerMachine)
controlPlaneJoinMachine :=... | explode_data.jsonl/44317 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 755
} | [
2830,
3393,
42,
392,
3149,
76,
2648,
693,
40446,
5769,
50693,
40446,
457,
50693,
4584,
12292,
287,
12288,
2679,
3273,
34570,
2623,
22495,
1155,
353,
8840,
836,
8,
341,
197,
18855,
1669,
501,
28678,
445,
18855,
1138,
197,
18855,
10538,
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... | 1 |
func Test_AppReconcileOccurs_WhenSecretUpdated(t *testing.T) {
env := e2e.BuildEnv(t)
logger := e2e.Logger{}
kapp := e2e.Kapp{t, env.Namespace, logger}
kubectl := e2e.Kubectl{t, env.Namespace, logger}
sas := e2e.ServiceAccounts{env.Namespace}
name := "configmap-with-secret"
// syncPeriod set to 1 hour so that t... | explode_data.jsonl/59330 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1050
} | [
2830,
3393,
36117,
693,
40446,
457,
55322,
62,
4498,
19773,
16196,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
384,
17,
68,
25212,
14359,
1155,
340,
17060,
1669,
384,
17,
68,
12750,
16094,
16463,
676,
1669,
384,
17,
68,
11352,
676,
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 TestFormatStruct(t *testing.T) {
for _, tt := range formatStructTests {
args := redisx.AppendStruct(nil, tt.value)
if !reflect.DeepEqual(args, tt.args) {
t.Fatalf("FormatStruct(%s) returned %v, want %v", tt.title, args, tt.args)
}
}
} | explode_data.jsonl/15628 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
4061,
9422,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3561,
9422,
18200,
341,
197,
31215,
1669,
20870,
87,
8982,
9422,
27907,
11,
17853,
2824,
340,
197,
743,
753,
34913,
94750,
7356,
11,
17853,
16365,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestBollingerBands(t *testing.T) {
t.Run(
"Bollinger Bands not enough elements for any calculation",
testBollingerBandsFunc(
[]int64{50, 4000, 357},
make([]MicroDollarRange, 3),
),
)
t.Run(
"Bollinger Bands enough elements for one calculation",
testBollingerBandsFunc(
[]int64{
utils.Dolla... | explode_data.jsonl/50102 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1281
} | [
2830,
3393,
33,
965,
5137,
33,
2844,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
1006,
197,
197,
63590,
965,
5137,
87302,
537,
3322,
5424,
369,
894,
21937,
756,
197,
18185,
33,
965,
5137,
33,
2844,
9626,
1006,
298,
197,
1294,
396,
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 TestBuffer(t *testing.T) {
// 0 12 3 45 6 7 8 9 0
s := `<p><a href="//url">text</a>text<!--comment--></p>`
z := NewTokenBuffer(xml.NewLexer(bytes.NewBufferString(s)))
tok := z.Shift()
test.That(t, string(tok.Text) == "p", "first token is <p>")
test.That(t, z.pos == 0, "shif... | explode_data.jsonl/7719 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 502
} | [
2830,
3393,
4095,
1155,
353,
8840,
836,
8,
341,
197,
322,
262,
220,
15,
220,
16,
17,
220,
220,
18,
1843,
220,
19,
20,
256,
220,
21,
256,
220,
22,
256,
220,
23,
1797,
220,
24,
256,
220,
15,
198,
1903,
1669,
30586,
79,
1784,
64,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigClients_Delete_Success(t *testing.T) {
s, _, _, _, iss, err := setupHydraTest(false)
if err != nil {
t.Fatalf("setupHydraTest() failed: %v", err)
}
clientName := "test_client"
pname := "admin"
resp := sendConfigClientsDelete(t, pname, clientName, "master", test.TestClientID, test.TestClientSec... | explode_data.jsonl/18524 | {
"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,
2648,
47174,
57418,
87161,
1155,
353,
8840,
836,
8,
341,
1903,
11,
8358,
8358,
8358,
2369,
11,
1848,
1669,
6505,
30816,
22248,
2271,
3576,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
15188,
30816,
22248,
2271,
368... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConnectionLeak(t *testing.T) {
db := newTestDB(t, "people")
defer closeDB(t, db)
// Start by opening defaultMaxIdleConns
rows := make([]*Rows, defaultMaxIdleConns)
// We need to SetMaxOpenConns > MaxIdleConns, so the DB can open
// a new connection and we can fill the idle queue with the released
// con... | explode_data.jsonl/16028 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 549
} | [
2830,
3393,
4526,
2304,
585,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
501,
2271,
3506,
1155,
11,
330,
16069,
1138,
16867,
3265,
3506,
1155,
11,
2927,
340,
197,
322,
5145,
553,
8568,
1638,
5974,
41370,
1109,
4412,
198,
68438,
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... | 2 |
func TestMkdirReturnsErrorWhenParentPathDoesNotExist(t *testing.T) {
beforeTest(t)
conn := _getConnection(t)
defer conn.Close()
client := agaveproto.NewSftpRelayClient(conn)
// create a random directory name in our test dir
testDirectoryPath := filepath.Join(CurrentBaseTestDirPath, uuid.New().String(),uuid.Ne... | explode_data.jsonl/32545 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 422
} | [
2830,
3393,
44,
12438,
16446,
1454,
4498,
8387,
1820,
21468,
45535,
1155,
353,
8840,
836,
8,
1476,
63234,
2271,
1155,
692,
32917,
1669,
716,
52414,
1155,
340,
16867,
4534,
10421,
2822,
25291,
1669,
933,
523,
15110,
7121,
50,
25068,
6740,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestChannel_GetConditionSet(t *testing.T) {
c := &Channel{}
if got, want := c.GetConditionSet().GetTopLevelConditionType(), apis.ConditionReady; got != want {
t.Errorf("GetTopLevelCondition=%v, want=%v", got, want)
}
} | explode_data.jsonl/24167 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
9629,
13614,
10547,
1649,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
609,
9629,
31483,
743,
2684,
11,
1366,
1669,
272,
2234,
10547,
1649,
1005,
1949,
5366,
4449,
10547,
929,
1507,
97723,
75134,
19202,
26,
2684,
961,
1366,
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
] | 2 |
func Test_Hoverfly_SetModeWithArguments_CannotSetModeToSomethingInvalid(t *testing.T) {
RegisterTestingT(t)
unit := NewHoverflyWithConfiguration(&Configuration{})
Expect(unit.SetModeWithArguments(
v2.ModeView{
Mode: "mode",
})).ToNot(BeNil())
Expect(unit.Cfg.Mode).To(Equal(""))
Expect(unit.SetModeWithArg... | explode_data.jsonl/45399 | {
"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,
2039,
1975,
21642,
14812,
3636,
2354,
19139,
920,
3401,
1649,
3636,
1249,
23087,
7928,
1155,
353,
8840,
836,
8,
341,
79096,
16451,
51,
1155,
692,
81189,
1669,
1532,
34379,
21642,
2354,
7688,
2099,
7688,
6257,
692,
35911,
24144... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_can_add_an_admin_role_to_group(t *testing.T) {
ctx, client, err := tests.NewClient(context.TODO())
require.NoError(t, err)
gp := &okta.GroupProfile{
Name: "SDK_TEST Assign Admin Role To Group",
}
g := &okta.Group{
Profile: gp,
}
group, _, err := client.Group.CreateGroup(ctx, *g)
require.NoError(t,... | explode_data.jsonl/31226 | {
"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,
27421,
2891,
12008,
12207,
19792,
2346,
6288,
1155,
353,
8840,
836,
8,
341,
20985,
11,
2943,
11,
1848,
1669,
7032,
7121,
2959,
5378,
90988,
2398,
17957,
35699,
1155,
11,
1848,
340,
3174,
79,
1669,
609,
562,
2565,
5407,
8526,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEth_GetCode(t *testing.T) {
expectedRes := hexutil.Bytes{}
rpcRes := call(t, "eth_getCode", []string{addrA, zeroString})
var code hexutil.Bytes
err := code.UnmarshalJSON(rpcRes.Result)
require.NoError(t, err)
t.Logf("Got code [%X] for %s\n", code, addrA)
require.True(t, bytes.Equal(expectedRes, code)... | explode_data.jsonl/847 | {
"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,
65390,
13614,
2078,
1155,
353,
8840,
836,
8,
341,
42400,
1061,
1669,
12371,
1314,
36868,
16094,
7000,
3992,
1061,
1669,
1618,
1155,
11,
330,
769,
3062,
2078,
497,
3056,
917,
90,
6214,
32,
11,
7168,
703,
8824,
2405,
2038,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMemoryUsage(t *testing.T) {
c, err := NewContainer(ContainerName)
if err != nil {
t.Errorf(err.Error())
}
if _, err := c.MemoryUsage(); err != nil {
t.Errorf(err.Error())
}
} | explode_data.jsonl/2778 | {
"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,
10642,
14783,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
1532,
4502,
75145,
675,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
3964,
6141,
2398,
197,
630,
743,
8358,
1848,
1669,
272,
71162,
14783,
2129,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 3 |
func TestHistoryAPI(t *testing.T) {
node := nodeWithMemoryEngine()
ruleConfig := rule.DefaultConfig
ruleContainer := rule.NewContainer(ruleConfig)
api := NewExecutor(node, ruleContainer, "test")
resp := api.History(context.Background(), &HistoryRequest{})
require.Equal(t, ErrorBadRequest, resp.Error)
resp = api... | explode_data.jsonl/48461 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
13424,
7082,
1155,
353,
8840,
836,
8,
341,
20831,
1669,
2436,
2354,
10642,
4571,
741,
7000,
1111,
2648,
1669,
5912,
13275,
2648,
198,
7000,
1111,
4502,
1669,
5912,
7121,
4502,
34944,
2648,
692,
54299,
1669,
1532,
25255,
6958,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetSuitableTableID(t *testing.T) {
datefmt := "20060102"
now := time.Now()
tests := []struct {
ds string
tc TableConfig
wantRes string
}{
{
tc: TableConfig{
Table: "sample_table_on_",
DateForShards: "TODAY",
},
wantRes: "sample_table_on_" + now.In(time.Local).For... | explode_data.jsonl/19166 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 510
} | [
2830,
3393,
1949,
62898,
480,
2556,
915,
1155,
353,
8840,
836,
8,
341,
44086,
12501,
1669,
330,
17,
15,
15,
21,
15,
16,
15,
17,
698,
80922,
1669,
882,
13244,
2822,
78216,
1669,
3056,
1235,
341,
197,
83336,
414,
914,
198,
197,
78255,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMaybeReloadRules(t *testing.T) {
cg := newClientRulesFor("key", "pk")
apiResponse := []byte(`{
"pricingRules": [
{
"verified": false,
"minSize": 1,
"maxSize": 2,
"minDuration": 1,
"maxDuration": 2,
"price": 0
}
],
... | explode_data.jsonl/47219 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1009
} | [
2830,
3393,
21390,
50035,
26008,
1155,
353,
8840,
836,
8,
341,
1444,
70,
1669,
501,
2959,
26008,
2461,
445,
792,
497,
330,
20819,
1138,
54299,
2582,
1669,
3056,
3782,
5809,
515,
9359,
330,
74370,
26008,
788,
2278,
18445,
341,
68203,
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... | 2 |
func TestContainerManifestNaming(t *testing.T) {
manifestUUID := "d1b925c9-444a-11e4-a576-42010af0a203"
verifyPackUnpack(t, "file", manifestUUID, "manifest1234", "container5678")
verifyPackUnpack(t, "file", manifestUUID, "mani-fest-1234", "container5678")
// UUID is same as pod name
verifyPackUnpack(t, "file", man... | explode_data.jsonl/23971 | {
"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,
4502,
38495,
85410,
1155,
353,
8840,
836,
8,
341,
197,
42315,
24754,
1669,
330,
67,
16,
65,
24,
17,
20,
66,
24,
12,
19,
19,
19,
64,
12,
16,
16,
68,
19,
7409,
20,
22,
21,
12,
19,
17,
15,
16,
15,
2577,
15,
64,
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... | 4 |
func TestParseTideContextPolicyOptions(t *testing.T) {
yes := true
no := false
org, repo, branch := "org", "repo", "branch"
testCases := []struct {
name string
config TideContextPolicyOptions
expected TideContextPolicy
}{
{
name: "empty",
},
{
name: "global config",
config: TideContextPo... | explode_data.jsonl/53857 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1739
} | [
2830,
3393,
14463,
51,
577,
1972,
13825,
3798,
1155,
353,
8840,
836,
8,
341,
197,
9693,
1669,
830,
198,
72104,
1669,
895,
198,
87625,
11,
15867,
11,
8870,
1669,
330,
1775,
497,
330,
23476,
497,
330,
17940,
698,
18185,
37302,
1669,
305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResolveCredential(t *testing.T) {
os.Setenv("PASSWORD", "deliciou$dubonnet")
defer os.Unsetenv("PASSWORD")
cxt := context.NewTestContext(t)
m := &Manifest{
Credentials: []CredentialDefinition{
{
Name: "password",
Location: Location{EnvironmentVariable: "PASSWORD"},
},
},
}
rm := Ne... | explode_data.jsonl/37714 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 377
} | [
2830,
3393,
56808,
48265,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
58856,
497,
330,
9588,
3375,
283,
47790,
392,
263,
4711,
1138,
16867,
2643,
10616,
746,
3160,
445,
58856,
5130,
1444,
2252,
1669,
2266,
7121,
2271,
1972,
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 TestMaxReturnedStreamsErrors(t *testing.T) {
numLogs := 100
tt := []struct {
name string
limit int
expectErrs int
}{
{"10", 10, 10},
{"unlimited", 0, numLogs},
}
for _, tc := range tt {
t.Run(tc.name, func(t *testing.T) {
cfg := defaultConfig()
cfg.MaxReturnedErrors = tc.limit
... | explode_data.jsonl/46245 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 609
} | [
2830,
3393,
5974,
84804,
73576,
13877,
1155,
353,
8840,
836,
8,
341,
22431,
51053,
1669,
220,
16,
15,
15,
271,
3244,
83,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
8810,
2353,
414,
526,
198,
197,
24952,
7747,
82,
526,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNewPointsWithShortBuffer(t *testing.T) {
_, err := models.NewPointFromBytes([]byte{0, 0, 0, 3, 4})
if err != io.ErrShortBuffer {
t.Fatalf("NewPointFromBytes: got: (%v, %v), expected: (nil, error)", p, err)
}
} | explode_data.jsonl/16972 | {
"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,
3564,
11411,
2354,
12472,
4095,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
4119,
7121,
2609,
3830,
7078,
10556,
3782,
90,
15,
11,
220,
15,
11,
220,
15,
11,
220,
18,
11,
220,
19,
3518,
743,
1848,
961,
6399,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLinkDestDecode(t *testing.T) {
dest1 := []byte("C:\\Users\\DL882\\Documents\\SiYuan\\data\\assets\\%E6%B5%8B%E8%AF%95-20210621160821-zxz1j35.pdf")
decoded := html.DecodeDestination(dest1)
if !bytes.Equal([]byte("C:\\Users\\DL882\\Documents\\SiYuan\\data\\assets\\测试-20210621160821-zxz1j35.pdf"), decoded) {
... | explode_data.jsonl/10312 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
3939,
34830,
32564,
1155,
353,
8840,
836,
8,
341,
49616,
16,
1669,
3056,
3782,
445,
34,
23817,
7137,
3422,
16524,
23,
23,
17,
3422,
27143,
3422,
21999,
56,
10386,
3422,
691,
3422,
5160,
3422,
4,
36,
21,
49157,
20,
4,
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... | 2 |
func TestShowGrantsWithRoles(t *testing.T) {
ctx := context.Background()
db, mock, err := sqlmock.New()
require.NoError(t, err)
mockGrantsWithoutRoles := []string{
"GRANT USAGE ON *.* TO `u1`@`localhost`",
"GRANT `r1`@`%`,`r2`@`%` TO `u1`@`localhost`",
}
rows1 := sqlmock.NewRows([]string{"Grants for root@loc... | explode_data.jsonl/13367 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 438
} | [
2830,
3393,
7812,
6464,
1783,
2354,
25116,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
20939,
11,
7860,
11,
1848,
1669,
5704,
16712,
7121,
741,
17957,
35699,
1155,
11,
1848,
692,
77333,
6464,
1783,
26040,
25116,
1669,
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... | 3 |
func TestIssueTracking(t *testing.T) {
t.Run("ReaderNextContainerIssue", func(t *testing.T) {
cdata := map[uint64]map[string][]byte{
1: {"1": []byte(`{"title":"title_1","content":"hello world"}`)},
nextContainerErrorID: {"nextContainerErrorID": []byte(`{"title":"title_2","content":"greetings... | explode_data.jsonl/33795 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2605
} | [
2830,
3393,
42006,
37119,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5062,
5847,
4502,
42006,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
1444,
691,
1669,
2415,
58,
2496,
21,
19,
60,
2186,
14032,
45725,
3782,
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,
1... | 5 |
func TestAnchorCredentialHandler(t *testing.T) {
log.SetLevel("anchor-credential-handler", log.DEBUG)
actor := testutil.MustParseURL("https://domain1.com/services/orb")
t.Run("Success - embedded anchor event", func(t *testing.T) {
handler := newAnchorEventHandler(t, createInMemoryCAS(t))
anchorEvent := &vocab... | explode_data.jsonl/47259 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1240
} | [
2830,
3393,
14677,
48265,
3050,
1155,
353,
8840,
836,
8,
341,
6725,
4202,
4449,
445,
17109,
12,
66799,
72112,
497,
1487,
38136,
692,
93410,
1669,
1273,
1314,
50463,
14463,
3144,
445,
2428,
1110,
12204,
16,
905,
22258,
5144,
65,
5130,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImportedTypes(t *testing.T) {
skipSpecialPlatforms(t)
// This package only handles gc export data.
if runtime.Compiler != "gc" {
t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler)
}
fset := token.NewFileSet()
for _, test := range importedObjectTests {
s := strings.Split(te... | explode_data.jsonl/30563 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 386
} | [
2830,
3393,
11511,
291,
4173,
1155,
353,
8840,
836,
8,
341,
1903,
13389,
20366,
87268,
1155,
692,
197,
322,
1096,
6328,
1172,
13469,
22122,
7485,
821,
624,
743,
15592,
35952,
961,
330,
20669,
1,
341,
197,
3244,
57776,
69,
445,
20669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJsonInvalidUnicode(t *testing.T) {
testOnce.Do(testInitAll)
var m = map[string]string{
`"\udc49\u0430abc"`: "\uFFFDabc",
`"\udc49\u0430"`: "\uFFFD",
`"\udc49abc"`: "\uFFFDabc",
`"\udc49"`: "\uFFFD",
`"\udZ49\u0430abc"`: "\uFFFD\u0430abc",
`"\udcG9\u0430"`: "\uFFFD\u0430",
`... | explode_data.jsonl/21005 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 359
} | [
2830,
3393,
5014,
7928,
33920,
1155,
353,
8840,
836,
8,
341,
18185,
12522,
33596,
8623,
3803,
2403,
340,
2405,
296,
284,
2415,
14032,
30953,
515,
197,
197,
63,
11934,
661,
66,
19,
24,
3770,
15,
19,
18,
15,
13683,
39917,
25,
2917,
84... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOptionGetOrElse(t *testing.T) {
s := gs.Some[int](100)
assert.Equal(t, 100, s.GetOrElse(-1))
n := gs.None[int]()
assert.Equal(t, -1, n.GetOrElse(-1))
} | explode_data.jsonl/32435 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
5341,
1949,
52774,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
28081,
86833,
18640,
9533,
16,
15,
15,
340,
6948,
12808,
1155,
11,
220,
16,
15,
15,
11,
274,
2234,
52774,
4080,
16,
4390,
9038,
1669,
28081,
18475,
18640,
36622,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadConfig(t *testing.T) {
factories, err := componenttest.NopFactories()
assert.Nil(t, err)
factory := NewFactory()
factories.Exporters[config.Type(typeStr)] = factory
cfg, err := configtest.LoadConfig(
path.Join(".", "testdata", "config.yaml"), factories,
)
require.NoError(t, err)
require.NotNil(... | explode_data.jsonl/9312 | {
"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,
5879,
2648,
1155,
353,
8840,
836,
8,
341,
1166,
52893,
11,
1848,
1669,
3692,
1944,
2067,
453,
17417,
2433,
741,
6948,
59678,
1155,
11,
1848,
692,
1166,
2919,
1669,
1532,
4153,
741,
1166,
52893,
81077,
388,
58,
1676,
10184,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFixStateIncompatible(t *testing.T) {
t.Parallel()
// Test to fix incompatible states.
testCases := []struct {
info *ChangeFeedInfo
expectedState FeedState
}{
{
info: &ChangeFeedInfo{
AdminJobType: AdminStop,
State: StateNormal,
Error: nil,
CreatorVersi... | explode_data.jsonl/10731 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 671
} | [
2830,
3393,
25958,
1397,
641,
34842,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
3393,
311,
5046,
52824,
5302,
624,
18185,
37302,
1669,
3056,
1235,
341,
197,
27043,
688,
353,
4072,
28916,
1731,
198,
197,
42400,
1397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTLSSystemCertPoolInvalidArgsEnvVar(t *testing.T) {
startCmd := GetStartCmd(&mockServer{})
setEnvVars(t)
require.NoError(t, os.Setenv(tlsSystemCertPoolEnvKey, "wrongvalue"))
err := startCmd.Execute()
require.Error(t, err)
require.Contains(t, err.Error(), "invalid syntax")
} | explode_data.jsonl/23765 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 111
} | [
2830,
3393,
13470,
1220,
612,
36934,
10551,
7928,
4117,
14359,
3962,
1155,
353,
8840,
836,
8,
341,
21375,
15613,
1669,
2126,
3479,
15613,
2099,
16712,
5475,
6257,
692,
8196,
14359,
28305,
1155,
692,
17957,
35699,
1155,
11,
2643,
4202,
316... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseQueryHeight(t *testing.T) {
t.Parallel()
var emptyHeight int64
height := int64(1256756)
req0 := mustNewRequest(t, "", "/", nil)
req1 := mustNewRequest(t, "", "/?height=1256756", nil)
req2 := mustNewRequest(t, "", "/?height=456yui4567", nil)
req3 := mustNewRequest(t, "", "/?height=-1", nil)
tests... | explode_data.jsonl/55928 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 515
} | [
2830,
3393,
14463,
2859,
3640,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2405,
4287,
3640,
526,
21,
19,
198,
30500,
1669,
526,
21,
19,
7,
16,
17,
20,
21,
22,
20,
21,
692,
24395,
15,
1669,
1969,
3564,
1900,
1155,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestTx_CopyFile_Error_Meta(t *testing.T) {
db := MustOpenDB()
defer db.MustClose()
if err := db.Update(func(tx *bolt.Tx) error {
b, err := tx.CreateBucket([]byte("widgets"))
if err != nil {
t.Fatal(err)
}
if err := b.Put([]byte("foo"), []byte("bar")); err != nil {
t.Fatal(err)
}
if err := b.Pu... | explode_data.jsonl/1703 | {
"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,
31584,
77637,
1703,
28651,
59812,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
15465,
5002,
3506,
741,
16867,
2927,
50463,
7925,
741,
743,
1848,
1669,
2927,
16689,
18552,
27301,
353,
52433,
81362,
8,
1465,
341,
197,
2233,
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 TestMapProxy_AddEntryListenerToKey(t *testing.T) {
var wg *sync.WaitGroup = new(sync.WaitGroup)
entryAdded := &AddEntry{wg: wg}
registrationId, err := mp.AddEntryListenerToKey(entryAdded, "key1", true)
AssertEqual(t, err, nil, nil)
wg.Add(1)
mp.Put("key1", "value1")
timeout := WaitTimeout(wg, Timeout)
Asse... | explode_data.jsonl/57034 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
2227,
16219,
21346,
5874,
2743,
1249,
1592,
1155,
353,
8840,
836,
8,
341,
2405,
63581,
353,
12996,
28384,
2808,
284,
501,
97233,
28384,
2808,
340,
48344,
19337,
1669,
609,
2212,
5874,
90,
45540,
25,
63581,
532,
197,
25862,
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 TestInterpreterStrings(t *testing.T) {
s, err := parseFile("src/parse/asp/test_data/interpreter/strings.build")
require.NoError(t, err)
assert.EqualValues(t, pyList{
pyString("acpi"), pyString("base64"), pyString("basename"), pyString("blkid"), pyString("blockdev"),
pyString("bunzip2"), pyString("bzcat"), p... | explode_data.jsonl/81075 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 231
} | [
2830,
3393,
58426,
20859,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
4715,
1703,
445,
3548,
14,
6400,
14,
13367,
12697,
1769,
14,
90554,
14,
18594,
13239,
1138,
17957,
35699,
1155,
11,
1848,
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 TestRedirectMunging(t *testing.T) {
req, _ := NewRequest("GET", "http://example.com/", nil)
resp := httptest.NewRecorder()
Redirect(resp, req, "/foo?next=http://bar.com/", 302)
if g, e := resp.Header().Get("Location"), "/foo?next=http://bar.com/"; g != e {
t.Errorf("Location header was %q; want %q", g, e)
... | explode_data.jsonl/22427 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 240
} | [
2830,
3393,
17725,
44,
2185,
287,
1155,
353,
8840,
836,
8,
341,
24395,
11,
716,
1669,
1532,
1900,
445,
3806,
497,
330,
1254,
1110,
8687,
905,
28105,
2092,
692,
34653,
1669,
54320,
70334,
7121,
47023,
741,
197,
17725,
20267,
11,
4232,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSupportGreenPath(t *testing.T) {
fakeConfigGetter := &mocks.ConfigGetter{}
fakeConfigGetter.GetCurrConfigReturnsOnCall(0, nil)
cs := config.NewDiscoverySupport(fakeConfigGetter)
res, err := cs.Config("test")
require.Nil(t, res)
require.Equal(t, "could not get last config for channel test", err.Error())
... | explode_data.jsonl/959 | {
"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,
7916,
19576,
1820,
1155,
353,
8840,
836,
8,
341,
1166,
726,
2648,
31485,
1669,
609,
16712,
82,
10753,
31485,
16094,
1166,
726,
2648,
31485,
2234,
83480,
2648,
16446,
1925,
7220,
7,
15,
11,
2092,
692,
71899,
1669,
2193,
7121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBuildCNIConfigTrunkBranchENI(t *testing.T) {
for _, blockIMDS := range []bool{true, false} {
t.Run(fmt.Sprintf("When BlockInstanceMetadata is %t", blockIMDS), func(t *testing.T) {
testTask := &Task{}
testTask.AddTaskENI(&apieni.ENI{
ID: "TestBuildCNIConfigTrunkBranchENI",... | explode_data.jsonl/37267 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 906
} | [
2830,
3393,
11066,
34,
14912,
2648,
1282,
3122,
18197,
953,
40,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
2504,
1791,
5936,
1669,
2088,
3056,
2641,
90,
1866,
11,
895,
92,
341,
197,
3244,
16708,
28197,
17305,
445,
4498,
8362,
2523,
146... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProposalReceived_ExecuteInbound(t *testing.T) {
followup, action, err := (&proposalReceived{}).ExecuteInbound(&metaData{})
require.NoError(t, err)
require.Equal(t, &offerSent{}, followup)
require.NotNil(t, action)
} | explode_data.jsonl/53001 | {
"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,
98637,
23260,
83453,
641,
10891,
1155,
353,
8840,
836,
8,
341,
1166,
1544,
454,
11,
1917,
11,
1848,
1669,
15899,
73874,
23260,
6257,
568,
17174,
641,
10891,
2099,
5490,
1043,
37790,
17957,
35699,
1155,
11,
1848,
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 |
func TestHelpProvider(t *testing.T) {
enabledRepos := []config.OrgRepo{
{Org: "org1", Repo: "repo"},
{Org: "org2", Repo: "repo"},
}
cases := []struct {
name string
config *plugins.Configuration
enabledRepos []config.OrgRepo
err bool
}{
{
name: "Empty config",
confi... | explode_data.jsonl/7533 | {
"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,
12689,
5179,
1155,
353,
8840,
836,
8,
341,
197,
15868,
693,
966,
1669,
3056,
1676,
8382,
1984,
25243,
515,
197,
197,
90,
42437,
25,
330,
1775,
16,
497,
71509,
25,
330,
23476,
7115,
197,
197,
90,
42437,
25,
330,
1775,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_trie_tree(t *testing.T) {
tree := newTrieTree()
assert.NotNil(t, tree)
tree.Add("football", nil)
tree.Add("football", nil)
tree.Add("football", nil)
assert.Equal(t, 1, tree.KeyNum())
assert.Equal(t, 8, tree.NodeNum())
tree.Add("foo", nil)
assert.Equal(t, 2, tree.KeyNum())
assert.Equal(t, 8, tree.N... | explode_data.jsonl/2671 | {
"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,
3547,
645,
11663,
1155,
353,
8840,
836,
8,
341,
51968,
1669,
501,
51,
7231,
6533,
741,
6948,
93882,
1155,
11,
4916,
692,
51968,
1904,
445,
84336,
497,
2092,
340,
51968,
1904,
445,
84336,
497,
2092,
340,
51968,
1904,
445,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestComplexCondition(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockFilter := index.NewMockSeriesIDsFilter(ctrl)
query, _ := sql.Parse("select f from cpu" +
" where (ip not in ('1.1.1.1','2.2.2.2') and region='sh') and (path='/data' or path='/home')")
mockFilter.EXPECT().
FindSer... | explode_data.jsonl/31353 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 960
} | [
2830,
3393,
31137,
10547,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
741,
77333,
5632,
1669,
1922,
7121,
11571,
25544,
30466,
5632,
62100,
692,
27274,
11,
716,
1669,
5704,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCleanupTaskGivesUpIfWaitingTooLong(t *testing.T) {
ctrl := gomock.NewController(t)
mockTime := mock_ttime.NewMockTime(ctrl)
mockState := mock_dockerstate.NewMockTaskEngineState(ctrl)
mockClient := mock_dockerapi.NewMockDockerClient(ctrl)
mockImageManager := mock_engine.NewMockImageManager(ctrl)
defer ctr... | explode_data.jsonl/24582 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 723
} | [
2830,
3393,
67335,
6262,
38,
1886,
2324,
2679,
42104,
31246,
6583,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
77333,
1462,
1669,
7860,
528,
1678,
7121,
11571,
1462,
62100,
340,
77333,
1397,
1669,
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 TestConnPoolingStdlib(t *testing.T) {
db, cleanup := testCreateDB(t, 10)
defer cleanup()
var wg sync.WaitGroup
numExec := 10
wg.Add(numExec)
for i := 0; i <= numExec-1; i++ {
go func() {
var n int
if err := db.QueryRow(checkPidSQL).Scan(&n); err != nil {
t.Error(err)
}
t.Logf("pid-%d: %d",... | explode_data.jsonl/74285 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
9701,
57903,
22748,
2740,
1155,
353,
8840,
836,
8,
341,
20939,
11,
21290,
1669,
1273,
4021,
3506,
1155,
11,
220,
16,
15,
340,
16867,
21290,
2822,
2405,
63581,
12811,
28384,
2808,
198,
22431,
10216,
1669,
220,
16,
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... | 2 |
func TestStream_HasStatusBitDebug(t *testing.T) {
t.Run("test bit set", func(t *testing.T) {
assert := base.NewAssert(t)
for i := 0; i < 256; i++ {
v := NewStream()
(*v.frames[0])[streamPosStatusBit] = byte(i)
v.SetStatusBitDebug()
assert(v.HasStatusBitDebug()).IsTrue()
v.Release()
}
})
t.Run("... | explode_data.jsonl/21157 | {
"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,
3027,
2039,
300,
2522,
8344,
7939,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
2699,
738,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6948,
1669,
2331,
7121,
8534,
1155,
340,
197,
2023,
600,
1669,
220,
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 TestSignalForwardingExternal(t *testing.T) {
checkSignalForwardingTest(t)
defer func() {
os.Remove("libgo2.a")
os.Remove("libgo2.h")
os.Remove("testp")
os.RemoveAll("pkg")
}()
cmd := exec.Command("go", "build", "-buildmode=c-archive", "-o", "libgo2.a", "libgo2")
cmd.Env = gopathEnv
if out, err := c... | explode_data.jsonl/50860 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 728
} | [
2830,
3393,
26810,
25925,
287,
25913,
1155,
353,
8840,
836,
8,
341,
25157,
26810,
25925,
287,
2271,
1155,
692,
16867,
2915,
368,
341,
197,
25078,
13270,
445,
2740,
3346,
17,
5849,
1138,
197,
25078,
13270,
445,
2740,
3346,
17,
860,
1138,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBodySectionName_ExtractPartial(t *testing.T) {
tests := []struct {
bsn string
whole string
partial string
}{
{
bsn: "BODY[]",
whole: "Hello World!",
partial: "Hello World!",
},
{
bsn: "BODY[]<6.5>",
whole: "Hello World!",
partial: "World",
},
{
bsn: ... | explode_data.jsonl/43045 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 454
} | [
2830,
3393,
5444,
9620,
675,
62,
28959,
37314,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
93801,
77,
257,
914,
198,
197,
197,
66633,
256,
914,
198,
197,
3223,
20894,
914,
198,
197,
59403,
197,
197,
515,
298,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoCache(t *testing.T) {
t.Parallel()
app := iris.New()
app.Get("/", cache.NoCache, func(ctx iris.Context) {
ctx.WriteString("no_cache")
})
// tests
e := httptest.New(t, app)
r := e.GET("/").Expect().Status(httptest.StatusOK)
r.Body().Equal("no_cache")
r.Header(context.CacheControlHeaderKey).Equal(... | explode_data.jsonl/32197 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
3393,
2753,
8233,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
28236,
1669,
63942,
7121,
741,
28236,
2234,
35460,
6500,
16766,
8233,
11,
2915,
7502,
63942,
9328,
8,
341,
197,
20985,
44747,
445,
2152,
11529,
1138,
197,
882... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUpdateReleaseNoHooks(t *testing.T) {
c := helm.NewContext()
rs := rsFixture()
rel := releaseStub()
rs.env.Releases.Create(rel)
req := &services.UpdateReleaseRequest{
Name: rel.Name,
DisableHooks: true,
Chart: &chart.Chart{
Metadata: &chart.Metadata{Name: "hello"},
Templates: []*chart.... | explode_data.jsonl/82242 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 289
} | [
2830,
3393,
4289,
16077,
2753,
67769,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
33765,
7121,
1972,
741,
41231,
1669,
10036,
18930,
741,
197,
3748,
1669,
4879,
33838,
741,
41231,
9265,
2817,
28299,
7251,
49235,
692,
24395,
1669,
609,
12779... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildMetricBlocklistForProxy(t *testing.T) {
userProvidedBlocklist := []string{
"user.defined.a",
"user.defined.b",
}
expected := []string{
"user.defined.a",
"user.defined.b",
invocationsMetric,
ErrorsMetric,
}
result := buildMetricBlocklistForProxy(userProvidedBlocklist)
assert.Equal(t, expe... | explode_data.jsonl/50626 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
11066,
54310,
4713,
1607,
2461,
16219,
1155,
353,
8840,
836,
8,
341,
19060,
35819,
291,
4713,
1607,
1669,
3056,
917,
515,
197,
197,
76522,
13,
9711,
5849,
756,
197,
197,
76522,
13,
9711,
948,
756,
197,
532,
42400,
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... | 1 |
func TestHavingRewrite(t *testing.T) {
tcases := []struct {
input string
output string
sqs map[string]string
}{{
input: "select 1 from t1 having a = 1",
output: "select 1 from t1 where a = 1",
}, {
input: "select 1 from t1 where x = 1 and y = 2 having a = 1",
output: "select 1 from t1 where x = 1... | explode_data.jsonl/16561 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1102
} | [
2830,
3393,
28032,
58465,
1247,
1155,
353,
8840,
836,
8,
341,
3244,
23910,
1669,
3056,
1235,
341,
197,
22427,
220,
914,
198,
197,
21170,
914,
198,
197,
1903,
26358,
262,
2415,
14032,
30953,
198,
197,
15170,
515,
197,
22427,
25,
220,
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... | 3 |
func TestRange_Parse(t *testing.T) {
mockRange := IntRangeBand("1-10")
testCases := map[string]struct {
input Range
wantedMin int
wantedMax int
}{
"success with range value": {
input: Range{
Value: &mockRange,
},
wantedMin: 1,
wantedMax: 10,
},
"success with range config": {
input: R... | explode_data.jsonl/70116 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 329
} | [
2830,
3393,
6046,
77337,
1155,
353,
8840,
836,
8,
341,
77333,
6046,
1669,
1333,
6046,
33744,
445,
16,
12,
16,
15,
1138,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
22427,
16437,
271,
197,
6692,
7566,
6217,
526,
198,
197,
6692... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefault(t *testing.T) {
exp := "int value:\nexp 42\ngot -1"
got := fmtexpl.Default("int value", 42, -1)
if got != exp {
t.Errorf("\nexp %s\ngot %s", exp, got)
}
} | explode_data.jsonl/56815 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
3675,
1155,
353,
8840,
836,
8,
341,
48558,
1669,
330,
396,
897,
7190,
77,
4580,
220,
19,
17,
59,
968,
354,
481,
16,
698,
3174,
354,
1669,
8879,
29892,
13275,
445,
396,
897,
497,
220,
19,
17,
11,
481,
16,
340,
743,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.