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 TestValueToValue(t *testing.T) {
testVal := func(toSend interface{}, expected string) datapoint.Value {
dv, err := ValueToValue(toSend)
So(err, ShouldBeNil)
So(expected, ShouldEqual, dv.String())
return dv
}
Convey("v2v conversion", t, func() {
Convey("test basic conversions", func() {
testVal(int6... | explode_data.jsonl/81467 | {
"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,
1130,
1249,
1130,
1155,
353,
8840,
836,
8,
341,
18185,
2208,
1669,
2915,
12186,
11505,
3749,
22655,
3601,
914,
8,
61723,
781,
6167,
341,
197,
2698,
85,
11,
1848,
1669,
5162,
1249,
1130,
12186,
11505,
340,
197,
76912,
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 TestBadRequest(t *testing.T) {
// ch will log an error when it receives a request for an unknown handler.
opts := testutils.NewOpts().AddLogFilter("Couldn't find handler.", 1)
testutils.WithTestServer(t, opts, func(t testing.TB, ts *testutils.TestServer) {
ctx, cancel := NewContext(time.Second)
defer cancel... | explode_data.jsonl/78180 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 250
} | [
2830,
3393,
46015,
1155,
353,
8840,
836,
8,
341,
197,
322,
521,
686,
1487,
458,
1465,
979,
432,
21189,
264,
1681,
369,
458,
9788,
7013,
624,
64734,
1669,
1273,
6031,
7121,
43451,
1005,
2212,
2201,
5632,
445,
38987,
944,
1477,
7013,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetAliases(t *testing.T) {
store := test.GetStore(t)
db := store.Conn()
defer db.Close()
CreateSchema(store)
db.Create(&Alias{Alias: "foo"})
db.Create(&Alias{Alias: "bar"})
aliases := GetAliases(store, NoUser)
if len(aliases) != 2 {
t.Fatalf("returned aliases %u expected 2",
len(aliases))
}
... | explode_data.jsonl/68026 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 322
} | [
2830,
3393,
1949,
95209,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
1273,
2234,
6093,
1155,
692,
20939,
1669,
3553,
50422,
741,
16867,
2927,
10421,
2822,
75569,
8632,
31200,
692,
20939,
7251,
2099,
22720,
90,
22720,
25,
330,
7975,
23625,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUserServiceDelete(t *testing.T) {
// prepare mock and service
mock := NewMockUserService(t)
service := NewUserService(mock)
// EXPECT SUCCESS will simulated normal operation with no error return
// this simulation expect all process goes as expected
t.Run("EXPECT SUCCESS", func(t *test... | explode_data.jsonl/30945 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 354
} | [
2830,
3393,
60004,
6435,
1155,
353,
8840,
836,
8,
341,
262,
442,
10549,
7860,
323,
2473,
198,
262,
7860,
1669,
1532,
11571,
60004,
1155,
340,
262,
2473,
1669,
1532,
60004,
30389,
692,
262,
442,
8921,
33941,
686,
45736,
4622,
5666,
448,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSequenceKind(t *testing.T) {
sequence := Sequence{}
if sequence.GetGroupVersionKind().String() != "flows.knative.dev/v1, Kind=Sequence" {
t.Errorf("unexpected gvk: %v", sequence.GetGroupVersionKind())
}
} | explode_data.jsonl/45226 | {
"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,
14076,
10629,
1155,
353,
8840,
836,
8,
341,
197,
15512,
1669,
28871,
16094,
743,
8500,
2234,
2808,
5637,
10629,
1005,
703,
368,
961,
330,
38140,
5202,
29738,
21523,
5457,
16,
11,
16840,
28,
14076,
1,
341,
197,
3244,
13080,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOpenReportNonHTTPS(t *testing.T) {
if testing.Short() {
t.Skip("skip test in short mode")
}
sess := newSessionForTestingNoLookups(t)
defer sess.Close()
sess.availableProbeServices = []model.Service{
{
Address: "antani",
Type: "mascetti",
},
}
exp := NewExperiment(sess, new(antaniMeasurer)... | explode_data.jsonl/26326 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 163
} | [
2830,
3393,
5002,
10361,
8121,
82354,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
20599,
1273,
304,
2805,
3856,
1138,
197,
532,
1903,
433,
1669,
501,
5283,
2461,
16451,
2753,
10380,
8602,
1155,
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... | 3 |
func TestControllerUpdateRequeue(t *testing.T) {
// This server should force a requeue of the controller because it fails to update status.Replicas.
fakeHandler := utiltesting.FakeHandler{
StatusCode: 500,
ResponseBody: "{}",
}
testServer := httptest.NewServer(&fakeHandler)
defer testServer.Close()
client ... | explode_data.jsonl/10050 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 499
} | [
2830,
3393,
2051,
4289,
693,
4584,
1155,
353,
8840,
836,
8,
341,
197,
322,
1096,
3538,
1265,
5344,
264,
312,
4584,
315,
279,
6461,
1576,
432,
14525,
311,
2647,
2639,
2817,
79,
52210,
624,
1166,
726,
3050,
1669,
4094,
8840,
991,
726,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestControllerUpdateReplicas(t *testing.T) {
// This is a happy server just to record the PUT request we expect for status.Replicas
fakeHandler := utiltesting.FakeHandler{
StatusCode: 200,
ResponseBody: "",
}
testServer := httptest.NewServer(&fakeHandler)
// TODO: Uncomment when fix #19254
// defer tes... | explode_data.jsonl/37485 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 689
} | [
2830,
3393,
2051,
4289,
18327,
52210,
1155,
353,
8840,
836,
8,
341,
197,
322,
1096,
374,
264,
6247,
3538,
1101,
311,
3255,
279,
34380,
1681,
582,
1720,
369,
2639,
2817,
79,
52210,
198,
1166,
726,
3050,
1669,
4094,
8840,
991,
726,
3050... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCmdlineNoEOL(t *testing.T) {
gopClTest(t, `println "Hi"`, `package main
import fmt "fmt"
func main() {
fmt.Println("Hi")
}
`)
} | explode_data.jsonl/73666 | {
"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,
15613,
1056,
2753,
36,
1930,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
1565,
33655,
330,
13048,
1,
7808,
1565,
1722,
1887,
271,
474,
8879,
330,
12501,
1837,
2830,
1887,
368,
341,
11009,
12419,
445,
130... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDealStatusStreamSendReceiveMultipleSuccessful(t *testing.T) {
// send query, read in handler, send response back, read response
ctxBg := context.Background()
td := shared_testutil.NewLibp2pTestData(ctxBg, t)
nw1 := network.NewFromLibp2pHost(td.Host1)
nw2 := network.NewFromLibp2pHost(td.Host2)
require.NoE... | explode_data.jsonl/19997 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 509
} | [
2830,
3393,
72841,
2522,
3027,
11505,
14742,
32089,
36374,
1155,
353,
8840,
836,
8,
341,
197,
322,
3624,
3239,
11,
1349,
304,
7013,
11,
3624,
2033,
1182,
11,
1349,
2033,
198,
20985,
48837,
1669,
2266,
19047,
741,
76373,
1669,
6094,
4452... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReaderSize(t *testing.T) {
if got, want := NewReader(nil).Size(), DefaultBufSize; got != want {
t.Errorf("NewReader's Reader.Size = %d; want %d", got, want)
}
if got, want := NewReaderSize(nil, 1234).Size(), 1234; got != want {
t.Errorf("NewReaderSize's Reader.Size = %d; want %d", got, want)
}
} | explode_data.jsonl/22888 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 121
} | [
2830,
3393,
5062,
1695,
1155,
353,
8840,
836,
8,
341,
743,
2684,
11,
1366,
1669,
1532,
5062,
27907,
568,
1695,
1507,
7899,
15064,
1695,
26,
2684,
961,
1366,
341,
197,
3244,
13080,
445,
3564,
5062,
594,
25166,
2465,
284,
1018,
67,
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... | 3 |
func TestContentManager_SetContentPath(t *testing.T) {
controller := gomock.NewController(t)
defer controller.Finish()
m := moduleFake.NewMockModule(controller)
m.EXPECT().Name().Return("name").AnyTimes()
moduleManager := moduleFake.NewMockManagerInterface(controller)
dashConfig := configFake.NewMockDash(contro... | explode_data.jsonl/1649 | {
"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,
2762,
2043,
14812,
2762,
1820,
1155,
353,
8840,
836,
8,
341,
61615,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
6461,
991,
18176,
2822,
2109,
1669,
4688,
52317,
7121,
11571,
3332,
40845,
340,
2109,
22402,
7285,
1005,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue1601(t *testing.T) {
protest.MustHaveCgo(t)
//Tests that recursive types involving C qualifiers and typedefs are parsed correctly
withTestProcess("issue1601", t, func(p *proc.Target, fixture protest.Fixture) {
assertNoError(p.Continue(), t, "Continue")
evalVariable(p, t, "C.globalq")
})
} | explode_data.jsonl/56333 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 107
} | [
2830,
3393,
42006,
16,
21,
15,
16,
1155,
353,
8840,
836,
8,
341,
197,
776,
1944,
50463,
12116,
34,
3346,
1155,
340,
197,
322,
18200,
429,
30819,
4494,
15860,
356,
82318,
323,
13501,
82,
525,
15676,
12440,
198,
46948,
2271,
7423,
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... | 1 |
func TestGetNextJob(t *testing.T) {
tt := []struct {
desc string
enqueuedJobs []Job
getQueueNames []string
expectedData string
jobExpected bool
errExpected bool
}{
{
desc: "single, ready job in queue",
enqueuedJobs: []Job{
{
QueueName: "foo",
Data: []byte("bar")... | explode_data.jsonl/48959 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1071
} | [
2830,
3393,
1949,
5847,
12245,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
3056,
1235,
341,
197,
41653,
688,
914,
198,
197,
81848,
66547,
40667,
220,
3056,
12245,
198,
197,
10366,
7554,
7980,
3056,
917,
198,
197,
42400,
1043,
220,
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... | 4 |
func TestParseNested(t *testing.T) {
type duration struct {
Delay time.Duration
}
type item struct {
Name string
Delay time.Duration
Nested duration
}
config := `[[parent]]
delay="100ms"
[parent.nested]
delay="200ms"
`
initConfig("toml", config)
var items []item
err := v.UnmarshalKey("parent", ... | explode_data.jsonl/5595 | {
"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,
14463,
71986,
1155,
353,
8840,
836,
8,
341,
13158,
8090,
2036,
341,
197,
10957,
6895,
882,
33795,
198,
197,
630,
13158,
1509,
2036,
341,
197,
21297,
256,
914,
198,
197,
10957,
6895,
220,
882,
33795,
198,
197,
18317,
9980,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetOptionsInflationDestination(t *testing.T) {
kp0 := newKeypair0()
kp1 := newKeypair1()
sourceAccount := NewSimpleAccount(kp0.Address(), int64(40385577484315))
setOptions := SetOptions{
InflationDestination: NewInflationDestination(kp1.Address()),
}
received, err := newSignedTransaction(
Transacti... | explode_data.jsonl/20664 | {
"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,
1649,
3798,
641,
64149,
33605,
1155,
353,
8840,
836,
8,
341,
16463,
79,
15,
1669,
501,
6608,
1082,
1310,
15,
741,
16463,
79,
16,
1669,
501,
6608,
1082,
1310,
16,
741,
47418,
7365,
1669,
1532,
16374,
7365,
5969,
79,
15,
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 TestClusterManager(t *testing.T) {
empty := &operatorsv1.MultiClusterHub{}
imageOverrides := map[string]string{
"registration": "quay.io/open-cluster-management/registration@sha256:fe95bca419976ca8ffe608bc66afcead6ef333b863f22be55df57c89ded75dda",
"work": "quay.io/open-cluster-management/work@sha25... | explode_data.jsonl/54707 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 569
} | [
2830,
3393,
28678,
2043,
1155,
353,
8840,
836,
8,
1476,
197,
3194,
1669,
609,
32838,
85,
16,
57706,
28678,
19316,
31483,
31426,
80010,
1669,
2415,
14032,
30953,
515,
197,
197,
1,
25862,
788,
330,
446,
352,
4245,
37644,
93208,
54785,
14,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEncoder(t *testing.T) {
r := require.New(t)
var buf bytes.Buffer
enc := newEncoder(&buf, func(object metav1.Object) ([]byte, error) {
return []byte(object.GetName() + "\n"), nil
})
r.NoError(enc.Encode(&corev1.Pod{
ObjectMeta: metav1.ObjectMeta{Name: "foo"},
}))
r.Equal("foo\n", buf.String())
r.No... | explode_data.jsonl/4715 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 193
} | [
2830,
3393,
19921,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1373,
7121,
1155,
340,
2405,
6607,
5820,
22622,
198,
197,
954,
1669,
501,
19921,
2099,
5909,
11,
2915,
4397,
77520,
16,
8348,
8,
34923,
3782,
11,
1465,
8,
341,
197,
853,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSimpleJoin(t *testing.T) {
executor, sbc1, sbc2, _ := createLegacyExecutorEnv()
logChan := QueryLogger.Subscribe("Test")
defer QueryLogger.Unsubscribe(logChan)
sql := "select u1.id, u2.id from user u1 join user u2 where u1.id = 1 and u2.id = 3"
result, err := executorExec(executor, sql, nil)
require.NoE... | explode_data.jsonl/67420 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 604
} | [
2830,
3393,
16374,
12292,
1155,
353,
8840,
836,
8,
341,
67328,
4831,
11,
7898,
66,
16,
11,
7898,
66,
17,
11,
716,
1669,
1855,
77415,
25255,
14359,
741,
6725,
46019,
1669,
11361,
7395,
82628,
445,
2271,
1138,
16867,
11361,
7395,
10616,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDisableEnableUser(t *testing.T) {
user := createUser()
user.Disable()
enabledBefore := user.IsEnabled()
disabledAt := user.DisabledAt()
user.Enable()
enabledAfter := user.IsEnabled()
assert.Equal(t, false, enabledBefore)
assert.Equal(t, true, enabledAfter)
assert.NotNil(t, disabledAt)
} | explode_data.jsonl/82653 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
25479,
11084,
1474,
1155,
353,
8840,
836,
8,
341,
19060,
1669,
60754,
741,
19060,
10166,
480,
741,
197,
15868,
10227,
1669,
1196,
53073,
741,
34597,
2312,
1655,
1669,
1196,
89576,
1655,
741,
19060,
32287,
741,
197,
15868,
6025... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteCommandRunEFailConfirm(t *testing.T) {
assert := assert.New(t)
cli := test.NewMockCLI()
cmd := DeleteCommand(cli)
out, err := test.RunCmd(cmd, []string{"test-handler"})
assert.Contains(out, "Canceled")
assert.NoError(err)
} | explode_data.jsonl/73000 | {
"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,
6435,
4062,
6727,
14884,
604,
16728,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
86448,
1669,
1273,
7121,
11571,
63959,
741,
25920,
1669,
10428,
4062,
70249,
340,
13967,
11,
1848,
1669,
1273,
16708,
15613,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_handler(t *testing.T) {
errReq, err := http.NewRequest(http.MethodGet, "/", nil)
require.NoError(t, err)
errReq.Header.Set(encoding.ContentTypeHeader, "xml")
require.NoError(t, err)
req, err := http.NewRequest(http.MethodGet, "/", nil)
require.NoError(t, err)
req.Header.Set(encoding.ContentTypeHeader... | explode_data.jsonl/54958 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 643
} | [
2830,
3393,
10183,
1155,
353,
8840,
836,
8,
341,
9859,
27234,
11,
1848,
1669,
1758,
75274,
19886,
20798,
1949,
11,
64657,
2092,
340,
17957,
35699,
1155,
11,
1848,
340,
9859,
27234,
15753,
4202,
85863,
62710,
4047,
11,
330,
6455,
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... | 1 |
func TestSchemaReadUpgradeInvalid(t *testing.T) {
_, err := upgrade(t, []*v0.NamespaceDefinition{testfixtures.UserNS, testfixtures.DocumentNS, testfixtures.FolderNS})
require.NoError(t, err)
} | explode_data.jsonl/54547 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 68
} | [
2830,
3393,
8632,
4418,
43861,
7928,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
13910,
1155,
11,
29838,
85,
15,
46011,
10398,
90,
1944,
45247,
7344,
2448,
11,
1273,
45247,
26256,
2448,
11,
1273,
45247,
991,
2018,
2448,
3518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDirectoryFiltersWorkspaceModules(t *testing.T) {
// Define a module include.com which should be in the workspace, plus a
// module exclude.com which should be excluded and therefore come from
// the proxy.
const files = `
-- include/go.mod --
module include.com
go 1.12
require exclude.com v1.0.0
-- incl... | explode_data.jsonl/37374 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 435
} | [
2830,
3393,
9310,
28351,
45981,
28201,
1155,
353,
8840,
836,
8,
341,
197,
322,
18614,
264,
4688,
2924,
905,
892,
1265,
387,
304,
279,
27514,
11,
5519,
264,
198,
197,
322,
4688,
21687,
905,
892,
1265,
387,
27444,
323,
8916,
2525,
504,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWriteRead(t *testing.T) {
contents := []byte("LANAAAAAAAAAA")
rec := StaticRecord(contents, Info{
Ino: 1,
Mode: syscall.S_IFREG | 2,
UID: 3,
GID: 4,
NLink: 5,
MTime: 6,
FileSize: 7,
Major: 8,
Minor: 9,
Rmajor: 10,
Rminor: 11,
Name: "foobar",
})
... | explode_data.jsonl/25087 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 499
} | [
2830,
3393,
7985,
4418,
1155,
353,
8840,
836,
8,
341,
197,
17610,
1669,
3056,
3782,
445,
23408,
57905,
6029,
1138,
67904,
1669,
23105,
6471,
46964,
11,
13074,
515,
197,
70167,
78,
25,
414,
220,
16,
345,
197,
197,
3636,
25,
257,
49345,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStringToNumber(t *testing.T) {
tests := []struct {
name string
}{
{"TestStringToNumber"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
StringToNumber()
})
}
} | explode_data.jsonl/65355 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
703,
1249,
2833,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
59403,
197,
197,
4913,
2271,
703,
1249,
2833,
7115,
197,
532,
2023,
8358,
17853,
1669,
2088,
7032,
341,
197,
3244,
167... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParticipantRound1Works(t *testing.T) {
p1, err := NewParticipant(1, 2, testGenerator, curves.NewK256Scalar(), 2)
require.NoError(t, err)
bcast, p2psend, err := p1.Round1(nil)
require.NoError(t, err)
require.NotNil(t, bcast)
require.NotNil(t, p2psend)
require.Equal(t, len(p2psend), 1)
require.Equal(t, l... | explode_data.jsonl/77859 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 207
} | [
2830,
3393,
67504,
27497,
16,
37683,
1155,
353,
8840,
836,
8,
341,
3223,
16,
11,
1848,
1669,
1532,
67504,
7,
16,
11,
220,
17,
11,
1273,
12561,
11,
35933,
7121,
42,
17,
20,
21,
20639,
1507,
220,
17,
340,
17957,
35699,
1155,
11,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTlfHistoryNeedsMoreThenComplete(t *testing.T) {
aliceName := "alice"
aliceUID := keybase1.MakeTestUID(1)
tlfID, err := tlf.MakeRandomID(tlf.Private)
require.NoError(t, err)
var allExpected notificationsByRevision
var aliceMessages []string
nn := nextNotification{1, 0, tlfID, nil}
for i := 0; i < maxE... | explode_data.jsonl/34568 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 478
} | [
2830,
3393,
51,
11008,
13424,
65064,
7661,
12209,
12548,
1155,
353,
8840,
836,
8,
341,
197,
63195,
675,
1669,
330,
63195,
698,
197,
63195,
6463,
1669,
1376,
3152,
16,
50133,
2271,
6463,
7,
16,
340,
3244,
11008,
915,
11,
1848,
1669,
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 TestPayloadCap(t *testing.T) {
// sampleCniReport is ~66 bytes and we're adding 2000 reports here to test that the payload will be capped to 65535
for i := 0; i < 4; i++ {
for j := 0; j < 500; j++ {
tb.payload.push(sampleCniReport)
}
var body bytes.Buffer
json.NewEncoder(&body).Encode(tb.payload)
i... | explode_data.jsonl/49204 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
29683,
12903,
1155,
353,
8840,
836,
8,
341,
197,
322,
6077,
34,
7751,
10361,
374,
3968,
21,
21,
5820,
323,
582,
2299,
7842,
220,
17,
15,
15,
15,
6682,
1588,
311,
1273,
429,
279,
7729,
686,
387,
60146,
311,
220,
21,
20,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestTile_EqualDifferentTile(t *testing.T) {
tile := Tile{X: 1, Y: 1}
dTile := Tile{X: 2, Y: 2}
expected := false
equal := tile.Equal(&dTile)
if equal != expected {
t.Error("Different tiles should not be equal")
}
} | explode_data.jsonl/39456 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
15628,
2089,
1751,
69123,
15628,
1155,
353,
8840,
836,
8,
341,
89895,
1669,
20744,
90,
55,
25,
220,
16,
11,
809,
25,
220,
16,
532,
2698,
15628,
1669,
20744,
90,
55,
25,
220,
17,
11,
809,
25,
220,
17,
532,
42400,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestValidateErrorPage(t *testing.T) {
tests := []v1.ErrorPage{
{
Codes: []int{400, 404},
Return: &v1.ErrorPageReturn{
ActionReturn: v1.ActionReturn{
Body: "Hello World",
},
},
Redirect: nil,
},
{
Codes: []int{400, 404},
Return: nil,
Redirect: &v1.ErrorPageRedirect{
Act... | explode_data.jsonl/65915 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
17926,
1454,
2665,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
85,
16,
6141,
2665,
515,
197,
197,
515,
298,
6258,
2539,
25,
3056,
396,
90,
19,
15,
15,
11,
220,
19,
15,
19,
1583,
298,
64906,
25,
609,
85,
16,
6141... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeployInjectsOverrideCommand(t *testing.T) {
f := newIBDFixture(t, k8s.EnvGKE)
defer f.TearDown()
cmd := model.ToUnixCmd("./foo.sh bar")
manifest := NewSanchoDockerBuildManifest(f)
iTarg := manifest.ImageTargetAt(0).WithOverrideCommand(cmd)
manifest = manifest.WithImageTarget(iTarg)
_, err := f.ibd.Bu... | explode_data.jsonl/38270 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 403
} | [
2830,
3393,
69464,
13738,
82,
2177,
4062,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
3256,
5262,
12735,
1155,
11,
595,
23,
82,
81214,
38,
3390,
340,
16867,
282,
836,
682,
4454,
2822,
25920,
1669,
1614,
3274,
55832,
15613,
13988,
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... | 5 |
func TestGetProject(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
HandleGetProjectSuccessfully(t)
actual, err := projects.Get(client.ServiceClient(), "1234").Extract()
th.AssertNoErr(t, err)
th.CheckDeepEquals(t, RedTeam, *actual)
} | explode_data.jsonl/49969 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
1949,
7849,
1155,
353,
8840,
836,
8,
341,
70479,
39820,
9230,
741,
16867,
270,
94849,
37496,
9230,
741,
197,
6999,
1949,
7849,
35959,
1155,
692,
88814,
11,
1848,
1669,
7079,
2234,
12805,
13860,
2959,
1507,
330,
16,
17,
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 TestSetImageConflict(t *testing.T) {
ro := v1alpha1.Rollout{
ObjectMeta: metav1.ObjectMeta{
Name: "guestbook",
Namespace: metav1.NamespaceDefault,
},
Spec: v1alpha1.RolloutSpec{
Template: corev1.PodTemplateSpec{
Spec: corev1.PodSpec{
Containers: []corev1.Container{
{
Name... | explode_data.jsonl/5010 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 596
} | [
2830,
3393,
1649,
1906,
57974,
1155,
353,
8840,
836,
8,
341,
197,
299,
1669,
348,
16,
7141,
16,
71212,
411,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
414,
330,
30177,
2190,
756,
298,
90823,
25,
77520,
16,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequest_MessageID(t *testing.T) {
tests := []struct {
name string
request *alice.Request
want int
}{
{
name: "",
request: getReq(0),
want: 0,
}, {
name: "",
request: getReq(1),
want: 1,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
... | explode_data.jsonl/18231 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
1900,
50974,
915,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
23555,
353,
63195,
9659,
198,
197,
50780,
262,
526,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
262,
8324,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRuleRecursiveDependency(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := [][]string{
{
`CREATE TABLE tab2 (
p_id BIGINT UNSIGNED NOT NULL,
a_id BIGINT UNSIGNED NOT NULL,
PRIMARY KEY (p_id, a_id),
FOREIGN KEY (p_id) REFERE... | explode_data.jsonl/76782 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 545
} | [
2830,
3393,
11337,
78542,
36387,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
52931,
917,
515,
197,
197,
515,
298,
197,
63,
22599,
14363,
5651,
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... | 7 |
func TestVariables_ObjectsAndNullability_UsingInlineStructs_ExecutesWithComplexInput(t *testing.T) {
doc := `
{
fieldWithObjectInput(input: {a: "foo", b: ["bar"], c: "baz"})
}
`
expected := &graphql.Result{
Data: map[string]interface{}{
"fieldWithObjectInput": `{"a":"foo","b":["bar"],"... | explode_data.jsonl/6428 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 306
} | [
2830,
3393,
22678,
62,
11543,
3036,
3280,
2897,
62,
16429,
25324,
9422,
82,
62,
10216,
2095,
2354,
31137,
2505,
1155,
353,
8840,
836,
8,
341,
59536,
1669,
22074,
286,
341,
688,
2070,
2354,
1190,
2505,
5384,
25,
314,
64,
25,
330,
7975,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNodePublishVolumeVolumeNotFound(t *testing.T) {
// Create server and client connection
s := newTestServer(t)
defer s.Stop()
// Make a call
c := csi.NewNodeClient(s.Conn())
name := "myvol"
gomock.InOrder(
s.MockDriver().
EXPECT().
Type().
Return(api.DriverType_DRIVER_TYPE_NONE).
Times(1),... | explode_data.jsonl/51443 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 404
} | [
2830,
3393,
1955,
50145,
18902,
18902,
10372,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
3538,
323,
2943,
3633,
198,
1903,
1669,
501,
2271,
5475,
1155,
340,
16867,
274,
30213,
2822,
197,
322,
7405,
264,
1618,
198,
1444,
1669,
272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRetryNodeOutputs(t *testing.T) {
cancel, controller := newController()
defer cancel()
ctx := context.Background()
wfcset := controller.wfclientset.ArgoprojV1alpha1().Workflows("")
wf := unmarshalWF(retryNodeOutputs)
wf, err := wfcset.Create(ctx, wf, metav1.CreateOptions{})
assert.NoError(t, err)
wf, er... | explode_data.jsonl/71003 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 372
} | [
2830,
3393,
51560,
1955,
61438,
1155,
353,
8840,
836,
8,
341,
84441,
11,
6461,
1669,
501,
2051,
741,
16867,
9121,
741,
20985,
1669,
2266,
19047,
741,
6692,
8316,
746,
1669,
6461,
1418,
69,
2972,
746,
18979,
45926,
73,
53,
16,
7141,
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 TestCallbackPanic(t *testing.T) {
// Make sure panic during callback unwinds properly.
if runtime.LockedOSThread() {
t.Fatal("locked OS thread on entry to TestCallbackPanic")
}
defer func() {
s := recover()
if s == nil {
t.Fatal("did not panic")
}
if s.(string) != "callback panic" {
t.Fatal("wr... | explode_data.jsonl/54661 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 199
} | [
2830,
3393,
7494,
47,
31270,
1155,
353,
8840,
836,
8,
341,
197,
322,
7405,
2704,
21975,
2337,
4822,
15025,
8673,
10277,
624,
743,
15592,
31403,
291,
4233,
73839,
368,
341,
197,
3244,
26133,
445,
24633,
10085,
4516,
389,
4343,
311,
3393,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIDLocker(t *testing.T) {
fakeID := "fake-id"
locks := NewVolumeLocks()
// acquire lock for fake-id
ok := locks.TryAcquire(fakeID)
if !ok {
t.Errorf("TryAcquire failed: want (%v), got (%v)",
true, ok)
}
// try to acquire lock again for fake-id, as lock is already present
// it should fail
ok = ... | explode_data.jsonl/71569 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 249
} | [
2830,
3393,
915,
87253,
1155,
353,
8840,
836,
8,
341,
1166,
726,
915,
1669,
330,
30570,
12897,
698,
197,
34936,
1669,
1532,
18902,
11989,
82,
741,
197,
322,
21256,
5296,
369,
12418,
12897,
198,
59268,
1669,
31676,
19824,
11654,
984,
741... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestTeamUnicodeNames(t *testing.T) {
th := Setup(t)
defer th.TearDown()
Client := th.Client
t.Run("create team unicode", func(t *testing.T) {
team := &model.Team{
Name: GenerateTestUsername(),
DisplayName: "Some\u206c Team",
Description: "A \ufffatest\ufffb channel.",
CompanyName: "\ufeff... | explode_data.jsonl/70709 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 977
} | [
2830,
3393,
14597,
33920,
7980,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
340,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
271,
3244,
16708,
445,
3182,
2083,
26077,
497,
2915,
1155,
353,
8840,
836,
8,
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,
1... | 1 |
func TestNamespacesGraphWithServiceInjection(t *testing.T) {
assert := assert.New(t)
q0 := `round(sum(rate(istio_requests_total{reporter="destination",source_workload_namespace!="bookinfo",destination_service_namespace="bookinfo",request_operation!="unknown"}[60s])) by (source_cluster,source_workload_namespace,sourc... | explode_data.jsonl/44684 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2136
} | [
2830,
3393,
7980,
27338,
11212,
2354,
1860,
36653,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
18534,
15,
1669,
1565,
1049,
19713,
76723,
7,
380,
815,
37216,
10784,
90,
11736,
261,
428,
17997,
497,
2427,
11498,
1078... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTabContainer_CurrentTab(t *testing.T) {
tab1 := &container.TabItem{Text: "Test1", Content: widget.NewLabel("Test1")}
tab2 := &container.TabItem{Text: "Test2", Content: widget.NewLabel("Test2")}
tabs := container.NewAppTabs(tab1, tab2)
assert.Equal(t, 2, len(tabs.Items))
assert.Equal(t, tab1, tabs.Current... | explode_data.jsonl/32310 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
8582,
4502,
40735,
8582,
1155,
353,
8840,
836,
8,
341,
58149,
16,
1669,
609,
3586,
4328,
1234,
90,
1178,
25,
330,
2271,
16,
497,
8883,
25,
9086,
7121,
2476,
445,
2271,
16,
42132,
58149,
17,
1669,
609,
3586,
4328,
1234,
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... | 1 |
func TestHsla(t *testing.T) {
validate := New()
s := "hsla(360,100%,100%,1)"
errs := validate.Var(s, "hsla")
Equal(t, errs, nil)
s = "hsla(360,100%,100%,0.5)"
errs = validate.Var(s, "hsla")
Equal(t, errs, nil)
s = "hsla(0,0%,0%, 0)"
errs = validate.Var(s, "hsla")
Equal(t, errs, nil)
s = "hsl(361,100%,50... | explode_data.jsonl/77318 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 540
} | [
2830,
3393,
39,
51642,
1155,
353,
8840,
836,
8,
1476,
197,
7067,
1669,
1532,
2822,
1903,
1669,
330,
71,
51642,
7,
18,
21,
15,
11,
16,
15,
15,
13384,
16,
15,
15,
13384,
16,
12954,
9859,
82,
1669,
9593,
87968,
1141,
11,
330,
71,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIsEventType(t *testing.T) {
expectedOps := []watcher.Op{watcher.Write, watcher.Remove, watcher.Rename}
refutedOps := []watcher.Op{watcher.Chmod, watcher.Create, watcher.Move}
for _, op := range expectedOps {
assert.True(t, isEventType(op, expectedOps...), fmt.Sprintf("%v", op))
}
for _, op := range re... | explode_data.jsonl/81021 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
3872,
47906,
1155,
353,
8840,
836,
8,
341,
42400,
38904,
1669,
3056,
14321,
261,
67799,
90,
14321,
261,
4073,
11,
55727,
13270,
11,
55727,
2013,
1840,
532,
59504,
2774,
38904,
1669,
3056,
14321,
261,
67799,
90,
14321,
261,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestVarIntNonCanonical(t *testing.T) {
pver := ProtocolVersion
tests := []struct {
name string // Test name for easier identification
in []byte // Value to decode
pver uint32 // Protocol version for wire encoding
}{
{
"0 encoded with 3 bytes", []byte{0xfd, 0x00, 0x00},
pver,
},
{
"max si... | explode_data.jsonl/15298 | {
"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,
3962,
1072,
8121,
70914,
1155,
353,
8840,
836,
8,
341,
3223,
423,
1669,
24572,
5637,
271,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
442,
3393,
829,
369,
8661,
21892,
198,
197,
17430,
256,
3056,
3782,
442,
5162,
311,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetSubmittedTogether(t *testing.T) {
unittest.SmallTest(t)
changeID1 := "change1"
issue1 := int64(123)
changeID2 := "change2"
issue2 := int64(324)
changeID3 := "change3"
issue3 := int64(523)
changeInfo1 := &gerrit.ChangeInfo{
Id: changeID1,
Issue: issue1,
}
changeInfo2 := &gerrit.ChangeInfo{
... | explode_data.jsonl/45917 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 735
} | [
2830,
3393,
1949,
46541,
80987,
1155,
353,
8840,
836,
8,
341,
20479,
14267,
90183,
2271,
1155,
692,
68380,
915,
16,
1669,
330,
3373,
16,
698,
197,
11159,
16,
1669,
526,
21,
19,
7,
16,
17,
18,
340,
68380,
915,
17,
1669,
330,
3373,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServicePackagesCollection_Add(t *testing.T) {
type args struct {
servicePackage ServicePackage
}
tests := []struct {
name string
args args
wantErr bool
}{
{
name: "errors when ID is nil",
args: args{
servicePackage: ServicePackage{
ServicePackage: konnect.ServicePackage{
... | explode_data.jsonl/51003 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 846
} | [
2830,
3393,
1860,
69513,
6482,
21346,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
52934,
13100,
5362,
13100,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
198,
197,
50780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSplitRecordComma(t *testing.T) {
recordStr := "The woods are lovely, dark and deep,"
fields := strings.Split(recordStr, ",")
scr := NewScript()
scr.SetFS(",")
scr.splitRecord(recordStr)
for i, f := range fields {
if scr.F(i+1).String() != f {
t.Fatalf("Expected %q but received %q", f, scr.F(i+1)... | explode_data.jsonl/2999 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
20193,
6471,
1092,
1728,
1155,
353,
8840,
836,
8,
341,
71952,
2580,
1669,
330,
785,
32533,
525,
16690,
11,
220,
6319,
323,
262,
5538,
42252,
55276,
1669,
9069,
19823,
23794,
2580,
11,
3670,
1138,
1903,
5082,
1669,
1532,
5910... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBlockHash(t *testing.T) {
// Block 1 hash.
hashStr := "6b73b6f6faebbfd6a541f38820593e43c50ce1abf64602ab8ac7d5502991c37f"
wantHash, err := chainhash.NewHashFromStr(hashStr)
if err != nil {
t.Errorf("NewHashFromStr: %v", err)
}
// Ensure the hash produced is expected.
blockHash := testBlock.BlockHash()... | explode_data.jsonl/20099 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 196
} | [
2830,
3393,
4713,
6370,
1155,
353,
8840,
836,
8,
341,
197,
322,
8362,
220,
16,
5175,
624,
50333,
2580,
1669,
330,
21,
65,
22,
18,
65,
21,
69,
21,
3632,
3065,
81664,
21,
64,
20,
19,
16,
69,
18,
23,
23,
17,
15,
20,
24,
18,
68,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetOrdererEndpointFromConfigTx(t *testing.T) {
signer, err := common.GetDefaultSigner()
assert.NoError(t, err)
mockchain := "mockchain"
factory.InitFactories(nil)
config := genesisconfig.Load(genesisconfig.SampleInsecureSoloProfile, configtest.GetDevConfigDir())
pgen := encoder.New(config)
genesisBlock... | explode_data.jsonl/46372 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 330
} | [
2830,
3393,
1949,
4431,
261,
27380,
3830,
2648,
31584,
1155,
353,
8840,
836,
8,
341,
69054,
261,
11,
1848,
1669,
4185,
2234,
3675,
7264,
261,
741,
6948,
35699,
1155,
11,
1848,
692,
77333,
8819,
1669,
330,
16712,
8819,
698,
1166,
2919,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetPicture(t *testing.T) {
f, err := prepareTestBook1()
if !assert.NoError(t, err) {
t.FailNow()
}
file, raw, err := f.GetPicture("Sheet1", "F21")
assert.NoError(t, err)
if !assert.NotEmpty(t, filepath.Join("test", file)) || !assert.NotEmpty(t, raw) ||
!assert.NoError(t, ioutil.WriteFile(filepath.Jo... | explode_data.jsonl/51746 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 778
} | [
2830,
3393,
1949,
24669,
1155,
353,
8840,
836,
8,
341,
1166,
11,
1848,
1669,
10549,
2271,
7134,
16,
741,
743,
753,
2207,
35699,
1155,
11,
1848,
8,
341,
197,
3244,
57243,
7039,
741,
197,
630,
17661,
11,
7112,
11,
1848,
1669,
282,
223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSnapshotDirPaths(t *testing.T) {
require.Equal(t, "/peerFSPath/snapshotRootDir/underConstruction", InProgressSnapshotsPath("/peerFSPath/snapshotRootDir"))
require.Equal(t, "/peerFSPath/snapshotRootDir/completed", CompletedSnapshotsPath("/peerFSPath/snapshotRootDir"))
require.Equal(t, "/peerFSPath/snapshotRo... | explode_data.jsonl/74140 | {
"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,
15009,
6184,
26901,
1155,
353,
8840,
836,
8,
341,
17957,
12808,
1155,
11,
3521,
16537,
8485,
1820,
2687,
9601,
8439,
6184,
14,
7995,
50818,
497,
758,
9496,
61871,
27634,
1820,
4283,
16537,
8485,
1820,
2687,
9601,
8439,
6184,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewRestConfigFromCASecretRefError(t *testing.T) {
testcases := []struct {
name string
secrets *secrets
}{
{
name: "secret fails to get a secret",
secrets: &secrets{
err: errors.New("some error"),
},
},
{
name: "no cert in the secret",
secrets: &secrets{
secret: &v1.Secret{... | explode_data.jsonl/65357 | {
"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,
3564,
12416,
2648,
3830,
87516,
50856,
3945,
1454,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
84686,
52710,
353,
325,
52710,
198,
197,
59403,
197,
197,
515,
298,
11609,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsComplete(t *testing.T) {
testInterval := models.Interval{
Name: TestIntervalName,
Start: TestIntervalStart,
End: TestIntervalEnd,
Frequency: TestIntervalFrequency,
Cron: TestIntervalCron,
RunOnce: TestIntervalRunOnce,
}
//init reset
testIntervalContext := IntervalContex... | explode_data.jsonl/61743 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 291
} | [
2830,
3393,
3872,
12548,
1155,
353,
8840,
836,
8,
341,
18185,
10256,
1669,
4119,
70855,
515,
197,
21297,
25,
414,
3393,
10256,
675,
345,
197,
65999,
25,
257,
3393,
10256,
3479,
345,
197,
38407,
25,
981,
3393,
10256,
3727,
345,
197,
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... | 3 |
func TestVisit(t *testing.T) {
tests := []struct {
description string
pivotKey string
replaceWith interface{}
manifests ManifestList
expectedManifests ManifestList
expected []string
shouldErr bool
}{
{
description: "correct with one level",
manifests... | explode_data.jsonl/48439 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2512
} | [
2830,
3393,
26218,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
42407,
981,
914,
198,
197,
3223,
16084,
1592,
688,
914,
198,
197,
197,
8156,
2354,
981,
3749,
16094,
197,
197,
42315,
82,
260,
39361,
852,
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... | 4 |
func TestLockFundsTransactionSigning(t *testing.T) {
acc, err := NewAccountFromPrivateKey("787225aaff3d2c71f4ffa32d4f19ec4922f3cd869747f267378f81f8e3fcb12d", MijinTest)
assert.Nilf(t, err, "NewAccountFromPrivateKey returned error: %s", err)
stx := &SignedTransaction{AggregateBonded, "payload", "8498B38D89C1DC8A448... | explode_data.jsonl/69200 | {
"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,
11989,
37,
42950,
8070,
93358,
1155,
353,
8840,
836,
8,
341,
197,
4475,
11,
1848,
1669,
1532,
7365,
3830,
75981,
445,
22,
23,
22,
17,
17,
20,
64,
2649,
18,
67,
17,
66,
22,
16,
69,
19,
71942,
18,
17,
67,
19,
69,
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 TestDefaultRetry(t *testing.T) {
ctx := context.TODO()
var b string
var expectedErr error
resp := buildMockResp(200, b)
retry, err := defaultRetry(ctx, &resp, nil)
assert.Nil(t, err)
assert.False(t, retry)
b = `{
"error": "SQL parse failed", "errorMessage" : "Something bad happened."
}`
expectedErr =... | explode_data.jsonl/28558 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1284
} | [
2830,
3393,
3675,
51560,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
90988,
741,
2405,
293,
914,
198,
2405,
3601,
7747,
1465,
271,
34653,
1669,
1936,
11571,
36555,
7,
17,
15,
15,
11,
293,
340,
17200,
1539,
11,
1848,
1669,
1638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplicationContext_ValueBincoreng(t *testing.T) {
c, ch := container()
c.Property("redis.endpoints", "redis://localhost:6379")
c.Object(new(RecoresCluster))
err := c.Refresh()
assert.Nil(t, err)
p := <-ch
var cluster *RecoresCluster
err = p.BeanRegistry().Get(&cluster)
fmt.Println(cluster)
assert... | explode_data.jsonl/17412 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 135
} | [
2830,
3393,
19736,
27867,
28794,
2153,
968,
1155,
353,
8840,
836,
8,
1476,
1444,
11,
521,
1669,
5476,
741,
1444,
15727,
445,
21748,
5073,
7706,
497,
330,
21748,
1110,
8301,
25,
21,
18,
22,
24,
1138,
1444,
8348,
1755,
7,
693,
7701,
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 TestTemplate_SaveLogsAsArtifact(t *testing.T) {
t.Run("Default", func(t *testing.T) {
x := &Template{}
assert.False(t, x.SaveLogsAsArtifact())
})
t.Run("IsArchiveLogs", func(t *testing.T) {
x := &Template{ArchiveLocation: &ArtifactLocation{ArchiveLogs: pointer.BoolPtr(true)}}
assert.True(t, x.SaveLogsAs... | explode_data.jsonl/26057 | {
"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,
7275,
78746,
51053,
2121,
85578,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
3675,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
10225,
1669,
609,
7275,
16094,
197,
6948,
50757,
1155,
11,
856,
13599,
51053,
2121,
85578,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplyTemplateMultiService(t *testing.T) {
msgdesc := &descriptorpb.DescriptorProto{
Name: proto.String("ExampleMessage"),
}
meth := &descriptorpb.MethodDescriptorProto{
Name: proto.String("Example"),
InputType: proto.String("ExampleMessage"),
OutputType: proto.String("ExampleMessage"),
}
/... | explode_data.jsonl/32788 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1617
} | [
2830,
3393,
28497,
7275,
20358,
1860,
1155,
353,
8840,
836,
8,
341,
21169,
8614,
1669,
609,
53132,
16650,
23548,
6820,
31549,
515,
197,
21297,
25,
18433,
6431,
445,
13314,
2052,
4461,
197,
532,
2109,
769,
1669,
609,
53132,
16650,
20798,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidate_FragmentsOnCompositeTypes_InterfaceIsValidFragmentType(t *testing.T) {
testutil.ExpectPassesRule(t, graphql.FragmentsOnCompositeTypesRule, `
fragment validFragment on Pet {
name
}
`)
} | explode_data.jsonl/56008 | {
"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,
17926,
1400,
41956,
1925,
41685,
4173,
74626,
55470,
9488,
929,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
81893,
12187,
288,
11337,
1155,
11,
48865,
991,
41956,
1925,
41685,
4173,
11337,
11,
22074,
414,
12289,
2697,
9488,
389... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValueGC(t *testing.T) {
dir, err := ioutil.TempDir("", "badger-test")
require.NoError(t, err)
defer removeDir(dir)
opt := getTestOptions(dir)
opt.ValueLogFileSize = 1 << 20
kv, _ := Open(opt)
defer kv.Close()
sz := 32 << 10
txn := kv.NewTransaction(true)
for i := 0; i < 100; i++ {
v := make([]byt... | explode_data.jsonl/39090 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 598
} | [
2830,
3393,
1130,
22863,
1155,
353,
8840,
836,
8,
341,
48532,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
13855,
1389,
16839,
1138,
17957,
35699,
1155,
11,
1848,
340,
16867,
4057,
6184,
14161,
340,
64838,
1669,
633,
2271,
3798,
14161,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGrantSingleGroupWithAuth(t *testing.T) {
assert := assert.New(t)
interceptor := stubs.NewInterceptor()
interceptor.AddStub(&stubs.Stub{
Method: "GET",
Path: fmt.Sprintf("/v2/auth/grant/sub-key/%s", pamConfig.SubscribeKey),
Query: "auth=my-pam-key&channel-group=c... | explode_data.jsonl/43196 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 536
} | [
2830,
3393,
67971,
10888,
2808,
2354,
5087,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
58915,
15349,
1669,
13633,
82,
7121,
32786,
741,
58915,
15349,
1904,
33838,
2099,
267,
15738,
7758,
392,
515,
197,
84589,
25,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetEmailAddresses(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
emails, _ := GetEmailAddresses(int64(1))
if assert.Len(t, emails, 3) {
assert.True(t, emails[0].IsPrimary)
assert.True(t, emails[2].IsActivated)
assert.False(t, emails[2].IsPrimary)
}
emails, _ = GetEmailAddresses(... | explode_data.jsonl/67884 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 184
} | [
2830,
3393,
1949,
4781,
52290,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
19905,
28770,
3380,
2271,
5988,
12367,
197,
51376,
11,
716,
1669,
2126,
4781,
52290,
1548,
21,
19,
7,
16,
1171,
743,
2060,
65819,
1155,
11,
14298,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestHasDotSuffix(t *testing.T) {
for _, tc := range hasDotSuffixTests {
got := hasDotSuffix(tc.s, tc.suffix)
want := strings.HasSuffix(tc.s, "."+tc.suffix)
if got != want {
t.Errorf("s=%q, suffix=%q: got %v, want %v", tc.s, tc.suffix, got, want)
}
}
} | explode_data.jsonl/14658 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 135
} | [
2830,
3393,
10281,
34207,
40177,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
702,
34207,
40177,
18200,
341,
197,
3174,
354,
1669,
702,
34207,
40177,
44415,
514,
11,
17130,
514,
13554,
340,
197,
50780,
1669,
9069,
16152,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTSDeclare(t *testing.T) {
expectPrintedTS(t, "declare var x: number", "")
expectPrintedTS(t, "declare let x: number", "")
expectPrintedTS(t, "declare const x: number", "")
expectPrintedTS(t, "declare function fn(); function scope() {}", "function scope() {\n}\n")
expectPrintedTS(t, "declare function fn()\... | explode_data.jsonl/82324 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1418
} | [
2830,
3393,
9951,
78455,
1155,
353,
8840,
836,
8,
341,
24952,
8994,
291,
9951,
1155,
11,
330,
18471,
762,
856,
25,
1372,
497,
14676,
24952,
8994,
291,
9951,
1155,
11,
330,
18471,
1077,
856,
25,
1372,
497,
14676,
24952,
8994,
291,
9951... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSafeOpen(t *testing.T) {
defaultPerm := os.FileMode(0750)
tests := []struct {
name string
// Function that prepares directory structure for the test under given
// base.
prepare func(base string) error
path string
expectError bool
}{
{
"directory-does-not-exist",
func(base st... | explode_data.jsonl/76957 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1835
} | [
2830,
3393,
25663,
5002,
1155,
353,
8840,
836,
8,
341,
11940,
81245,
1669,
2643,
8576,
3636,
7,
15,
22,
20,
15,
692,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
197,
322,
5712,
429,
47442,
6220,
5944,
369,
279,
1273,
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 TestSetCondition(t *testing.T) {
tests := []struct {
name string
status *apps.ReplicaSetStatus
cond apps.ReplicaSetCondition
expectedStatus *apps.ReplicaSetStatus
}{
{
name: "set for the first time",
status: &apps.ReplicaSetStatus{},
cond: condReplicaFailure(),
expectedStatus: &apps... | explode_data.jsonl/7989 | {
"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,
1649,
10547,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
271,
197,
23847,
353,
27635,
2817,
79,
15317,
1649,
2522,
198,
197,
197,
1297,
256,
10500,
2817,
79,
15317,
1649,
10547,
271,
197,
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... | 3 |
func TestCT_OMathParaPrConstructor(t *testing.T) {
v := math.NewCT_OMathParaPr()
if v == nil {
t.Errorf("math.NewCT_OMathParaPr must return a non-nil value")
}
if err := v.Validate(); err != nil {
t.Errorf("newly constructed math.CT_OMathParaPr should validate: %s", err)
}
} | explode_data.jsonl/54221 | {
"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,
1162,
83169,
587,
30205,
3533,
13288,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
6888,
7121,
1162,
83169,
587,
30205,
3533,
741,
743,
348,
621,
2092,
341,
197,
3244,
13080,
445,
10374,
7121,
1162,
83169,
587,
30205,
3533,
196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPNCounter_Get(t *testing.T) {
it.PNCounterTester(t, func(t *testing.T, pn *hz.PNCounter) {
v, err := pn.Get(context.Background())
if err != nil {
t.Fatal(err)
}
assert.Equal(t, int64(0), v)
})
} | explode_data.jsonl/48297 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
17896,
14099,
13614,
1155,
353,
8840,
836,
8,
341,
23374,
1069,
45,
14099,
58699,
1155,
11,
2915,
1155,
353,
8840,
836,
11,
43050,
353,
37259,
1069,
45,
14099,
8,
341,
197,
5195,
11,
1848,
1669,
43050,
2234,
5378,
19047,
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... | 2 |
func TestFuncAsParam(t *testing.T) {
gopClTest(t, `import "fmt"
func bar(foo func(string, ...interface{}) (int, error)) {
foo("Hello, %v!\n", "Go+")
}
bar(fmt.Printf)
`, `package main
import fmt "fmt"
func bar(foo func(string, ...interface {
}) (int, error)) {
foo("Hello, %v!\n", "Go+")
}
func main() {
bar(fmt.... | explode_data.jsonl/73686 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 151
} | [
2830,
3393,
9626,
2121,
2001,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
1565,
474,
330,
12501,
1837,
2830,
3619,
71880,
2915,
3609,
11,
2503,
4970,
28875,
320,
396,
11,
1465,
593,
341,
197,
7975,
445,
9707,
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 TestGetNotProxyConn(t *testing.T) {
poolOnce = sync.Once{}
redisClientOptions := ClientOptions{}
memConfig := config.NewMemConfig()
memConfig.Set("debug", true)
redisClent := NewClient(
redisClientOptions.WithConf(memConfig),
redisClientOptions.WithProxy(
func() interface{} {
monitorProxyOptions :... | explode_data.jsonl/59703 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 257
} | [
2830,
3393,
1949,
2623,
16219,
9701,
1155,
353,
8840,
836,
8,
341,
85273,
12522,
284,
12811,
77946,
16094,
197,
21748,
2959,
3798,
1669,
8423,
3798,
16094,
14145,
2648,
1669,
2193,
7121,
18816,
2648,
741,
14145,
2648,
4202,
445,
8349,
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 TestWriteMapTruncated(t *testing.T) {
buf := &bytes.Buffer{}
dw := printers.NewBarePrefixWriter(buf)
items := map[string]string{}
for i := 0; i < 1000; i++ {
items[strconv.Itoa(i)] = strconv.Itoa(i + 1)
}
WriteMapDesc(dw, items, "eggs", false)
assert.Assert(t, len(strings.TrimSpace(buf.String())) <= Trun... | explode_data.jsonl/36445 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
7985,
2227,
1282,
38007,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
609,
9651,
22622,
16094,
2698,
86,
1669,
55953,
7121,
33,
546,
14335,
6492,
10731,
692,
46413,
1669,
2415,
14032,
30953,
16094,
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 TestG1Marshal(t *testing.T) {
g := new(G1).ScalarBaseMult(new(big.Int).SetInt64(1))
form := g.Marshal()
_, ok := new(G1).Unmarshal(form)
if !ok {
t.Fatalf("failed to unmarshal")
}
g.ScalarBaseMult(Order)
form = g.Marshal()
g2, ok := new(G1).Unmarshal(form)
if !ok {
t.Fatalf("failed to unmarshal ∞")
... | explode_data.jsonl/52901 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
38,
16,
55438,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
501,
6699,
16,
568,
20639,
3978,
40404,
1755,
75616,
7371,
568,
1649,
1072,
21,
19,
7,
16,
1171,
37410,
1669,
342,
37271,
741,
197,
6878,
5394,
1669,
501,
6699,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestDivideVariadicRandomly(t *testing.T) {
t.Parallel()
rand.Seed(time.Now().UnixNano())
// rand.Float64() returns a number in 0.0-1.0
// Use another randomly-generated int to vary the whole number.
a := rand.Float64() * float64(rand.Intn(500))
b := rand.Float64() * float64(rand.Intn(500))
// Avoid dividi... | explode_data.jsonl/12263 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 443
} | [
2830,
3393,
12509,
577,
56135,
36214,
13999,
398,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
7000,
437,
5732,
291,
9730,
13244,
1005,
55832,
83819,
12367,
197,
322,
10382,
29794,
21,
19,
368,
4675,
264,
1372,
304,
220,
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... | 6 |
func TestContainsCurrency(t *testing.T) {
p := NewCurrencyPair("BTC", "USD")
if !ContainsCurrency(p, "BTC") {
t.Error("Test failed. TestContainsCurrency: Expected currency was not found")
}
if ContainsCurrency(p, "ETH") {
t.Error("Test failed. TestContainsCurrency: Non-existent currency was found")
}
} | explode_data.jsonl/55838 | {
"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,
23805,
26321,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1532,
26321,
12443,
445,
59118,
497,
330,
26749,
5130,
743,
753,
23805,
26321,
1295,
11,
330,
59118,
899,
341,
197,
3244,
6141,
445,
2271,
4641,
13,
3393,
23805,
26321,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLineStringReserve(t *testing.T) {
ls := NewLineString(XYZM)
if got, want := cap(ls.flatCoords), 0; got != want {
t.Errorf("cap(ls.flatCoords) == %d, want %d", got, want)
}
ls.Reserve(2)
if got, want := cap(ls.flatCoords), 8; got != want {
t.Errorf("cap(ls.flatCoords) == %d, want %d", got, want)
}
} | explode_data.jsonl/6509 | {
"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,
2460,
703,
1061,
5852,
1155,
353,
8840,
836,
8,
341,
197,
4730,
1669,
1532,
2460,
703,
7644,
40209,
44,
340,
743,
2684,
11,
1366,
1669,
2062,
62991,
46405,
34344,
701,
220,
15,
26,
2684,
961,
1366,
341,
197,
3244,
13080,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIndexOfCoincidence(t *testing.T) {
tests := []struct {
name string
text string
want float64
}{
{"empty", "", 0.0},
{"no repeats", "abcdefg", 0.0},
{"basic repeat", "abcdefga", 0.03571},
{"english text", "To be, or not to be, that is the question", 0.09655},
}
for _, tt := range tests {
t.Ru... | explode_data.jsonl/82575 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 226
} | [
2830,
3393,
27376,
41180,
66,
7087,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
15425,
914,
198,
197,
50780,
2224,
21,
19,
198,
197,
59403,
197,
197,
4913,
3194,
497,
7342,
220,
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... | 2 |
func TestStatefulSetControlRollingUpdateWithPartition(t *testing.T) {
type testcase struct {
name string
partition int32
invariants func(set *apps.StatefulSet, spc *fakeStatefulPodControl) error
initial func() *apps.StatefulSet
update func(set *apps.StatefulSet) *apps.StatefulSet
validate f... | explode_data.jsonl/28896 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2313
} | [
2830,
3393,
1397,
1262,
1649,
3273,
32355,
287,
4289,
2354,
49978,
1155,
353,
8840,
836,
8,
341,
13158,
70080,
2036,
341,
197,
11609,
981,
914,
198,
197,
72872,
680,
220,
526,
18,
17,
198,
197,
17430,
54611,
2915,
14171,
353,
27635,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decodeBitString(t *testing.T) {
value := []byte{0x9A, 0xBC, 0xDE, 0xF0} // 28 bits
bsC := newBitStringFromBytes(value, 4, 4)
protoBitString, err := decodeBitString(bsC)
assert.NilError(t, err)
//assert.Assert(t, protoBitString != nil)
assert.Equal(t, int(protoBitString.Len), 28, "unexpected bit string ... | explode_data.jsonl/66718 | {
"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,
15227,
8344,
703,
1155,
353,
8840,
836,
8,
341,
16309,
1669,
3056,
3782,
90,
15,
87,
24,
32,
11,
220,
15,
80979,
11,
220,
15,
78979,
11,
220,
15,
9770,
15,
92,
442,
220,
17,
23,
9472,
198,
93801,
34,
1669,
501,
8344,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetRequire(t *testing.T) {
for _, tt := range setRequireTests {
t.Run(tt.desc, func(t *testing.T) {
var mods []*Require
for _, mod := range tt.mods {
mods = append(mods, &Require{
Mod: module.Version{
Path: mod.path,
Version: mod.vers,
},
Indirect: mod.indirect,
}... | explode_data.jsonl/74336 | {
"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,
1649,
17959,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
738,
17959,
18200,
341,
197,
3244,
16708,
47152,
30514,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
2405,
28254,
29838,
17959,
198,
298,
2023,
8358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRefresh(t *testing.T) {
cases := []struct {
name string
req string
wantStatus int
wantResp *model.RefreshToken
udb *mockdb.User
jwt *mock.JWT
}{
{
name: "Fail on FindByToken",
req: "refreshtoken",
wantStatus: http.StatusInternalServerError,
... | explode_data.jsonl/54620 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 808
} | [
2830,
3393,
14567,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
24395,
286,
914,
198,
197,
50780,
2522,
526,
198,
197,
50780,
36555,
256,
353,
2528,
49841,
3323,
198,
197,
197,
661,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWebServiceURI_String(t *testing.T) {
testCases := map[string]struct {
dnsName string
path string
wanted string
}{
"http": {
dnsName: "abc.us-west-1.elb.amazonaws.com",
path: "svc",
wanted: "http://abc.us-west-1.elb.amazonaws.com/svc",
},
"http with / path": {
dnsName: "jobs.te... | explode_data.jsonl/42398 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 362
} | [
2830,
3393,
94388,
10301,
31777,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
2698,
4412,
675,
914,
198,
197,
26781,
262,
914,
271,
197,
6692,
7566,
914,
198,
197,
59403,
197,
197,
76932,
788,
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,
1... | 1 |
func TestReadTerragruntConfigFromDependency(t *testing.T) {
t.Parallel()
cleanupTerraformFolder(t, TEST_FIXTURE_READ_CONFIG)
tmpEnvPath := copyEnvironment(t, ".")
rootPath := util.JoinPath(tmpEnvPath, TEST_FIXTURE_READ_CONFIG, "from_dependency")
showStdout := bytes.Buffer{}
showStderr := bytes.Buffer{}
assert.... | explode_data.jsonl/10153 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 419
} | [
2830,
3393,
4418,
51402,
68305,
3850,
2648,
3830,
36387,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
60639,
51,
13886,
627,
13682,
1155,
11,
13602,
42635,
41486,
13117,
12568,
340,
20082,
14359,
1820,
1669,
2975,
12723,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransportInvalidTrailer_BinaryFieldValue(t *testing.T) {
testInvalidTrailer(t, oneHeader, headerFieldValueError("has\nnewline"), func(enc *hpack.Encoder) {
enc.WriteField(hpack.HeaderField{Name: "x", Value: "has\nnewline"})
})
} | explode_data.jsonl/16105 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
27560,
7928,
1282,
38782,
1668,
3287,
52112,
1155,
353,
8840,
836,
8,
341,
18185,
7928,
1282,
38782,
1155,
11,
825,
4047,
11,
4247,
52112,
1454,
445,
4648,
1699,
89202,
3975,
2915,
66941,
353,
71,
4748,
26598,
4316,
8,
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,
1... | 1 |
func TestFilters(t *testing.T) {
for _, tt := range []struct {
name, rootPath string
}{
{
name: "module root",
rootPath: "pkg",
},
} {
t.Run(tt.name, func(t *testing.T) {
opts := []RunOption{ProxyFiles(workspaceProxy)}
if tt.rootPath != "" {
opts = append(opts, WorkspaceFolders(tt.rootPat... | explode_data.jsonl/37359 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 404
} | [
2830,
3393,
28351,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
11609,
11,
3704,
1820,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
257,
330,
4352,
3704,
756,
298,
33698,
1820,
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 TestService_CreateImplicitInvitation(t *testing.T) {
t.Run("success", func(t *testing.T) {
routeSvc := &mockroute.MockMediatorSvc{}
prov := &protocol.MockProvider{
ServiceMap: map[string]interface{}{
mediator.Coordination: routeSvc,
},
}
sp := mockstorage.NewMockStoreProvider()
k := newKMS(t, ... | explode_data.jsonl/30541 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1816
} | [
2830,
3393,
1860,
34325,
59558,
15174,
7556,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5630,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
7000,
2133,
92766,
1669,
609,
16712,
8966,
24664,
13310,
36122,
92766,
16094,
197,
197,
429... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateDeliveryServicesRequiredCapability(t *testing.T) {
mockDB, mock, err := sqlmock.New()
if err != nil {
t.Fatalf(err.Error())
}
defer mockDB.Close()
db := sqlx.NewDb(mockDB, "sqlmock")
defer db.Close()
mock.ExpectBegin()
rc := RequiredCapability{
api.APIInfoImpl{
ReqInfo: &api.APIInfo{
... | explode_data.jsonl/42347 | {
"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,
4021,
38121,
11025,
8164,
63746,
1155,
353,
8840,
836,
8,
341,
77333,
3506,
11,
7860,
11,
1848,
1669,
5704,
16712,
7121,
741,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
3964,
6141,
2398,
197,
532,
16867,
7860,
3506,
10421,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func Test_powerJSONConsumer(t *testing.T) {
var data struct {
Name string
ID int
}
tests := []struct {
name string
json string
wantErr bool
}{
{
name: "Simple powerJSONConsumer",
json: `{"name":"Somebody","id":1}`,
wantErr: false,
},
{
name: "Null value",
json: "nu... | explode_data.jsonl/37960 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 396
} | [
2830,
3393,
20421,
5370,
29968,
1155,
353,
8840,
836,
8,
341,
2405,
821,
2036,
341,
197,
21297,
914,
198,
197,
29580,
256,
526,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
30847,
262,
914,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestURL(t *testing.T) {
tests := []struct {
name string
}{
{"Test URL"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
URL()
})
}
} | explode_data.jsonl/18686 | {
"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,
3144,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
59403,
197,
197,
4913,
2271,
5548,
7115,
197,
532,
2023,
8358,
17853,
1669,
2088,
7032,
341,
197,
3244,
16708,
47152,
2644,
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 |
func TestGreaterEqualString(t *testing.T) {
t.Parallel()
match, err := path.GreaterEqual(&testType1{
String: "foo",
}, "string2", "bar")
require.Nil(t, err)
require.True(t, match)
match, err = path.GreaterEqual(&testType1{
String: "foo",
}, "string2", "foo")
require.Nil(t, err)
require.True(t, match)
m... | explode_data.jsonl/78470 | {
"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,
41366,
2993,
703,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
47706,
11,
1848,
1669,
1815,
1224,
28362,
2993,
2099,
1944,
929,
16,
515,
197,
4980,
25,
330,
7975,
756,
197,
2137,
330,
917,
17,
497,
330,
2257,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAggFns(t *testing.T) {
for _, tt := range fnTest {
for _, function := range tt.functions {
t.Run(tt.name+" "+function.name, func(t *testing.T) {
for i, bucket := range tt.buckets {
actual := function.fn(tt.values, bucket)
expected := function.expected[i]
test.EqualsWithNansWithDelta(t,... | explode_data.jsonl/58782 | {
"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,
9042,
70,
37,
4412,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
5168,
2271,
341,
197,
2023,
8358,
729,
1669,
2088,
17853,
49274,
341,
298,
3244,
16708,
47152,
2644,
5172,
6630,
1688,
2644,
11,
2915,
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... | 2 |
func TestConsumerGetByID(t *testing.T) {
t.Run("GetExisting", func(t *testing.T) {
t.Parallel()
repo := getConsumerRepo()
sampleConsumer, err := data.NewConsumer(channel1, successfulGetByIDTestConsumerID, successfulGetTestToken, callbackURL)
assert.Nil(t, err)
assert.True(t, sampleConsumer.IsInValidState())
... | explode_data.jsonl/64200 | {
"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,
29968,
1949,
60572,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1949,
53067,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3244,
41288,
7957,
741,
197,
17200,
5368,
1669,
633,
29968,
25243,
741,
197,
1903,
1516,
29968,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandleDeleteServiceInstanceNotAServiceInstance(t *testing.T) {
ctx := context.Background()
getServiceClassFn := refs.NewFakeServiceClassGetterFunc(&data.ServiceClass{}, nil)
getServiceBrokerFn := refs.NewFakeServiceBrokerGetterFunc(&data.ServiceBroker{}, nil)
deprovisioner := fake.NewDeprovisioner()
lifec... | explode_data.jsonl/72430 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 249
} | [
2830,
3393,
6999,
6435,
1860,
2523,
2623,
32,
1860,
2523,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
10366,
1860,
1957,
24911,
1669,
43143,
7121,
52317,
1860,
1957,
31485,
9626,
2099,
691,
13860,
1957,
22655,
2092,
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 TestQueryMetrics_errorResponse(t *testing.T) {
mockTransport.response = &http.Response{
StatusCode: 400,
Body: ioutil.NopCloser(bytes.NewBuffer(errorResponsePayload)),
}
expectedError := &ResponseError{
Status: 400,
Messages: []string{
"metrics[0].aggregate must be one of MIN,SUM,MAX,AVG,DEV"... | explode_data.jsonl/56652 | {
"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,
2859,
27328,
4096,
2582,
1155,
353,
8840,
836,
8,
1476,
77333,
27560,
11362,
284,
609,
1254,
12574,
515,
197,
197,
15872,
25,
220,
19,
15,
15,
345,
197,
197,
5444,
25,
981,
43144,
2067,
453,
51236,
799,
23158,
7121,
4095,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDecode(t *testing.T) {
gvk1 := &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}
decodable1 := &testDecodable{}
decodable2 := &testDecodable{}
decodable3 := &testDecodable{}
versionedDecodable1 := &runtime.VersionedObjects{Objects: []runtime.Object{decodable1}}
testCases := []struc... | explode_data.jsonl/22193 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2664
} | [
2830,
3393,
32564,
1155,
353,
8840,
836,
8,
341,
3174,
48363,
16,
1669,
609,
17349,
5407,
5637,
10629,
90,
10629,
25,
330,
2271,
497,
5737,
25,
330,
1575,
497,
6079,
25,
330,
70614,
16707,
197,
8169,
69129,
16,
1669,
609,
1944,
4900,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetMessageSource(t *testing.T) {
tests := []struct {
Name string
userDisplayName string
pm types.PrivateMessage
wantName string
wantText string
}{
{
"incoming default color",
"",
types.PrivateMessage{
Name: "foo",
Text: "bar",
},
lipglo... | explode_data.jsonl/78879 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 851
} | [
2830,
3393,
1949,
2052,
3608,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
21297,
310,
914,
198,
197,
19060,
26456,
914,
198,
197,
86511,
1060,
4494,
87738,
2052,
198,
197,
50780,
675,
286,
914,
198,
197,
50780,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCreateFileWrong(t *testing.T) {
// thumbnailsDir := "./test_data"
_ = createFolder(TestDir)
var thumbnailsName string
osName := runtime.GOOS
if osName == "windows" {
thumbnailsName = TestDir[2:] + "/<"
} else if osName == "linux" {
thumbnailsName = "/"
}
file, err := createFile(thumbnailsName)
... | explode_data.jsonl/20454 | {
"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,
4021,
1703,
29185,
1155,
353,
8840,
836,
8,
1476,
197,
322,
80065,
6184,
1669,
5924,
1944,
1769,
698,
197,
62,
284,
1855,
13682,
31159,
6184,
340,
2405,
80065,
675,
914,
198,
25078,
675,
1669,
15592,
97574,
3126,
271,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.