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 TestIoBufferGrowCopy(t *testing.T) {
bi := newIoBuffer(MaxThreshold + 1)
b := bi.(*ioBuffer)
n := randN(1024) + 1
b.copy(n)
if cap(b.buf) > (MaxThreshold+1)+(MaxThreshold+1)/4+n {
t.Errorf("b.copy(%d) should expand to %d, but got %d", n, (MaxThreshold+1)+(MaxThreshold+1)/4+n, cap(b.buf))
}
} | explode_data.jsonl/24049 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
42799,
4095,
56788,
12106,
1155,
353,
8840,
836,
8,
341,
2233,
72,
1669,
501,
42799,
4095,
90332,
37841,
488,
220,
16,
340,
2233,
1669,
6032,
41399,
815,
4095,
340,
9038,
1669,
10382,
45,
7,
16,
15,
17,
19,
8,
488,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestFunctionAlignmentTraceback(t *testing.T) {
pc := tracebackFunc(t)
// Double-check we got the right PC.
f := runtime.FuncForPC(pc)
if !strings.HasSuffix(f.Name(), "tracebackFunc") {
t.Fatalf("Caller(0) = %+v, want tracebackFunc", f)
}
// Iterate forward until we find a different function. Back up one
... | explode_data.jsonl/59627 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 376
} | [
2830,
3393,
5152,
7033,
6550,
1419,
1155,
353,
8840,
836,
8,
341,
82013,
1669,
46058,
9626,
1155,
692,
197,
322,
7093,
15934,
582,
2684,
279,
1290,
6673,
624,
1166,
1669,
15592,
69845,
2461,
4872,
47080,
340,
743,
753,
18594,
16152,
401... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegistryNewDup(t *testing.T) {
lookupNode := node.LookupFunc(func(string) *api.Node {
return nil
})
c, err := NewCache(1000)
if err != nil {
t.Error(err)
return
}
r, err := NewRegistry(lookupNode, &mesosproto.ExecutorInfo{}, c)
if err != nil {
t.Error(err)
return
}
new := r.New("", nil)
... | explode_data.jsonl/74856 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
15603,
3564,
85713,
1155,
353,
8840,
836,
8,
341,
197,
21020,
1955,
1669,
2436,
79261,
9626,
18552,
3609,
8,
353,
2068,
21714,
341,
197,
853,
2092,
198,
197,
8824,
1444,
11,
1848,
1669,
1532,
8233,
7,
16,
15,
15,
15,
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 TestSnapshotOps(t *testing.T) {
path := os.Getenv("KUBECONFIG")
if _, err := os.Stat(path); os.IsNotExist(err) {
// path/to/whatever does not exist
t.Skipf("The KubeConfig file, %v, is not exist", path)
}
config, err := clientcmd.BuildConfigFromFlags("", path)
if err != nil {
t.Fatalf("Failed to build ... | explode_data.jsonl/61809 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1297
} | [
2830,
3393,
15009,
38904,
1155,
353,
8840,
836,
8,
341,
26781,
1669,
2643,
64883,
445,
42,
42389,
24652,
1138,
743,
8358,
1848,
1669,
2643,
53419,
5581,
1215,
2643,
4506,
45535,
3964,
8,
341,
197,
197,
322,
1815,
32429,
14,
68286,
1558,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMin(t *testing.T) {
cases := []struct {
desc string
samples []time.Duration
minSamples int
want time.Duration
}{
{
desc: "Should return the min for minSamples = 0",
samples: []time.Duration{1, 0, 0, 0},
minSamples: 0,
want: 1,
},
{
desc: "Shoul... | explode_data.jsonl/28474 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 758
} | [
2830,
3393,
6217,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
41653,
981,
914,
198,
197,
1903,
4023,
262,
3056,
1678,
33795,
198,
197,
25320,
39571,
526,
198,
197,
50780,
981,
882,
33795,
198,
197,
59403,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClientGetVcsRoot(t *testing.T) {
client, err := NewRealTestClient(t)
require.NoError(t, err, "Expected no error")
vcs, err := client.GetVcsRoot("Empty_Rlink")
require.NoError(t, err, "Expected no error")
require.NotNil(t, vcs, "Create to return config")
assert.Equal(t, "Empty_Rlink", vcs.ID, "Expected ... | explode_data.jsonl/36873 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 389
} | [
2830,
3393,
2959,
1949,
53,
4837,
8439,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
1532,
12768,
2271,
2959,
1155,
340,
17957,
35699,
1155,
11,
1848,
11,
330,
18896,
902,
1465,
5130,
5195,
4837,
11,
1848,
1669,
2943,
2234,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStaticQueryInfo(t *testing.T) {
session := createSession(t)
defer session.Close()
if err := createTable(session, "CREATE TABLE gocql_test.static_query_info (id int, value text, PRIMARY KEY (id))"); err != nil {
t.Fatalf("failed to create table with error '%v'", err)
}
if err := session.Query("INSERT I... | explode_data.jsonl/11154 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 391
} | [
2830,
3393,
11690,
2859,
1731,
1155,
353,
8840,
836,
8,
341,
25054,
1669,
1855,
5283,
1155,
340,
16867,
3797,
10421,
2822,
743,
1848,
1669,
1855,
2556,
16264,
11,
330,
22599,
14363,
342,
509,
1470,
4452,
26181,
5738,
3109,
320,
307,
526... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDisabledByDefault(t *testing.T) {
// Events
brokerEvent := Eventf(corev1.EventTypeNormal, "BrokerCreated", "Default eventing.knative.dev Broker %q created.", "default")
broker := resources.MakeBroker(testNS, resources.DefaultBrokerName)
table := TableTest{{
Name: "bad workqueue key",
// Make sure Rec... | explode_data.jsonl/35292 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1347
} | [
2830,
3393,
25907,
1359,
3675,
1155,
353,
8840,
836,
8,
341,
197,
322,
17627,
198,
2233,
45985,
1556,
1669,
3665,
69,
47867,
85,
16,
89879,
12206,
11,
330,
65545,
11694,
497,
330,
3675,
1538,
287,
5202,
29738,
21523,
52701,
1018,
80,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogger(t *testing.T) {
next := http.NotFound
out := new(bytes.Buffer)
log.SetOutput(out)
logger(next).ServeHTTP(httptest.NewRecorder(), httptest.NewRequest(http.MethodGet, "/", nil))
if len(out.Bytes()) == 0 {
t.Errorf("expected request to be logged, output (%v)", len(out.Bytes()))
} else if !strings... | explode_data.jsonl/50928 | {
"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,
7395,
1155,
353,
8840,
836,
8,
341,
28144,
1669,
1758,
67255,
198,
13967,
1669,
501,
23158,
22622,
692,
6725,
4202,
5097,
9828,
340,
17060,
16913,
568,
60421,
9230,
73392,
83,
70334,
7121,
47023,
1507,
54320,
70334,
75274,
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... | 3 |
func TestInternalEvaluationStep_WhenOperationIsRepeatedWithIdPresent(t *testing.T) {
// given
log := logrus.New()
memoryStorage := storage.NewMemoryStorage()
provisioningOperation := fixOperationCreateRuntime(t)
_, id := generateId()
provisioningOperation.Avs.AvsEvaluationInternalId = id
inputCreator := newInpu... | explode_data.jsonl/68979 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 575
} | [
2830,
3393,
11569,
82363,
8304,
62,
4498,
8432,
3872,
90989,
2354,
764,
21195,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
6725,
1669,
1487,
20341,
7121,
741,
2109,
4731,
5793,
1669,
5819,
7121,
10642,
5793,
741,
197,
776,
13013,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBytes_ToInt8(t *testing.T) {
tests := []struct {
name string
e Bytes
want Int8
}{
{name: "", e: Bytes{[]byte("123")}, want: Int8{123}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.e.ToInt8(); !got.Equal(tt.want) {
t.Errorf("Bytes.ToInt8() = %v, want %v"... | explode_data.jsonl/34758 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 178
} | [
2830,
3393,
7078,
38346,
1072,
23,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
7727,
262,
30024,
198,
197,
50780,
1333,
23,
198,
197,
59403,
197,
197,
47006,
25,
7342,
384,
25,
30024,
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... | 2 |
func TestMatchTopologySelectorTerms(t *testing.T) {
type args struct {
topologySelectorTerms []v1.TopologySelectorTerm
labels labels.Set
}
tests := []struct {
name string
args args
want bool
}{
{
name: "nil term list",
args: args{
topologySelectorTerms: nil,
labels: ... | explode_data.jsonl/25717 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1833
} | [
2830,
3393,
8331,
60954,
5877,
43128,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
42118,
2449,
5877,
43128,
3056,
85,
16,
17557,
2449,
5877,
17249,
198,
197,
95143,
394,
9201,
4202,
198,
197,
630,
78216,
1669,
3056,
1235,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKeys(t *testing.T) {
type Test struct {
Test1 map[string]string `validate:"gt=0,dive,keys,eq=testkey,endkeys,eq=testval" json:"test1"`
Test2 map[int]int `validate:"gt=0,dive,keys,eq=3,endkeys,eq=4" json:"test2"`
Test3 map[int]int `validate:"gt=0,dive,keys,eq=3,endkeys" ... | explode_data.jsonl/77360 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1633
} | [
2830,
3393,
8850,
1155,
353,
8840,
836,
8,
1476,
13158,
3393,
2036,
341,
197,
73866,
16,
2415,
14032,
30953,
1565,
7067,
2974,
5178,
28,
15,
11991,
533,
11,
10563,
11,
11006,
53538,
792,
42717,
10563,
11,
11006,
53538,
831,
1,
2951,
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 Test1(t *testing.T) {
ints := make([]int, 0, 3)
fmt.Println(ints)
fmt.Printf("1:%p\n", &ints)
ints2 := append(ints, 1)
fmt.Printf("2:%p\n", &ints2)
fmt.Println(ints)
//fmt.Println("ints:%p",&ints)
} | explode_data.jsonl/2299 | {
"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,
16,
1155,
353,
8840,
836,
8,
341,
2084,
82,
1669,
1281,
10556,
396,
11,
220,
15,
11,
220,
18,
340,
11009,
12419,
1548,
82,
340,
11009,
19367,
445,
16,
7533,
79,
1699,
497,
609,
21042,
340,
2084,
82,
17,
1669,
8737,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test0008KCP(t *testing.T) {
c, err := NewConn("kcp")
if err != nil {
fmt.Println(err)
return
}
cc, err := c.Listen("127.0.0.1:58880")
if err != nil {
fmt.Println(err)
return
}
exit := false
go func() {
cc, err := cc.Accept()
if err != nil {
fmt.Println(err)
return
}
fmt.Println("ac... | explode_data.jsonl/19984 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 741
} | [
2830,
3393,
15,
15,
15,
23,
42,
7123,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
1532,
9701,
445,
74,
4672,
1138,
743,
1848,
961,
2092,
341,
197,
11009,
12419,
3964,
340,
197,
853,
198,
197,
630,
63517,
11,
1848,
1669,
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... | 5 |
func TestCancelReasonInheritedFromGrandParent(t *testing.T) {
w1 := testWorkflow()
w2 := testWorkflow()
w3 := testWorkflow()
w2.parent = w1
w3.parent = w2
w1.cancelReason = "w1 cr"
assertWorkflowCancelReason(t, w1, "w1 cr")
assertWorkflowCancelReason(t, w2, "w1 cr")
assertWorkflowCancelReason(t, w3, "w1 cr")... | explode_data.jsonl/3891 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
9269,
25139,
641,
48394,
3830,
40151,
8387,
1155,
353,
8840,
836,
8,
341,
6692,
16,
1669,
1273,
62768,
741,
6692,
17,
1669,
1273,
62768,
741,
6692,
18,
1669,
1273,
62768,
2822,
6692,
17,
8659,
284,
289,
16,
198,
6692,
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 TestTrim(t *testing.T) {
tests := []string{
`{{trim " 5.00 "}}`,
`{{trimAll "$" "$5.00$"}}`,
`{{trimPrefix "$" "$5.00"}}`,
`{{trimSuffix "$" "5.00$"}}`,
}
for _, tt := range tests {
if err := runt(tt, "5.00"); err != nil {
t.Error(err)
}
}
} | explode_data.jsonl/63875 | {
"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,
25656,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
917,
515,
197,
197,
63,
2979,
10666,
330,
256,
220,
20,
13,
15,
15,
256,
330,
3417,
12892,
197,
197,
63,
2979,
10666,
2403,
5201,
1,
5201,
20,
13,
15,
15,
3,
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... | 3 |
func TestArchive(t *testing.T) {
t.Parallel()
p := porter.NewTestPorter(t)
p.SetupIntegrationTest()
defer p.CleanupIntegrationTest()
p.Debug = false
// Use a fixed bundle to work with so that we can rely on the registry and layer digests
const reference = "getporter/mysql:v0.1.4"
// Archive bundle
archive1O... | explode_data.jsonl/31455 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 695
} | [
2830,
3393,
42502,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3223,
1669,
87186,
7121,
2271,
7084,
261,
1155,
340,
3223,
39820,
52464,
2271,
741,
16867,
281,
727,
60639,
52464,
2271,
741,
3223,
20345,
284,
895,
271,
197,
322... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateAPIMetricsExporter(t *testing.T) {
server := testutils.DatadogServerMock()
defer server.Close()
logger := zap.NewNop()
factories, err := componenttest.ExampleComponents()
require.NoError(t, err)
factory := NewFactory()
factories.Exporters[configmodels.Type(typeStr)] = factory
cfg, err := confi... | explode_data.jsonl/73028 | {
"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,
4021,
2537,
1791,
13468,
88025,
1155,
353,
8840,
836,
8,
341,
41057,
1669,
1273,
6031,
909,
266,
329,
538,
5475,
11571,
741,
16867,
3538,
10421,
2822,
17060,
1669,
32978,
7121,
45,
453,
2822,
1166,
52893,
11,
1848,
1669,
369... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetStepback(t *testing.T) {
Convey("When the project has a stepback policy set to true", t, func() {
require.NoError(t, db.ClearCollections(ProjectRefCollection, task.Collection, build.Collection, VersionCollection),
"Error clearing collections")
config := `
stepback: true
tasks:
- name: true
step... | explode_data.jsonl/60438 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1091
} | [
2830,
3393,
1949,
8304,
1419,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
4498,
279,
2390,
702,
264,
3019,
1419,
4842,
738,
311,
830,
497,
259,
11,
2915,
368,
341,
197,
17957,
35699,
1155,
11,
2927,
13524,
52730,
65980,
3945,
6482... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChangeStream_noCustomStandaloneError(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip()
}
skipIfBelow36(t)
topology := os.Getenv("TOPOLOGY")
if topology == "replica_set" || topology == "sharded_cluster" {
t.Skip()
}
coll := createTestCollection(t, nil, nil)
// Ensure the database is cr... | explode_data.jsonl/68237 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 235
} | [
2830,
3393,
4072,
3027,
6536,
10268,
623,
84112,
1454,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
532,
1903,
13389,
2679,
38214,
18,
21,
1155,
692,
42118,
2449,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestNegativeSize(t *testing.T) {
jaeger := v1.NewJaeger(types.NamespacedName{Name: "TestNegativeSize"})
jaeger.Spec.Collector.Size = -1
collector := NewCollector(jaeger)
dep := collector.Get()
assert.Equal(t, int32(1), *dep.Spec.Replicas)
} | explode_data.jsonl/69110 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
38489,
1695,
1155,
353,
8840,
836,
8,
341,
197,
5580,
1878,
1669,
348,
16,
7121,
52445,
1878,
52613,
98932,
68552,
675,
63121,
25,
330,
2271,
38489,
1695,
23625,
197,
5580,
1878,
36473,
727,
24605,
269,
2465,
284,
481,
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 TestGetFilteredStationsReturnsError(t *testing.T) {
req := &MockRequest{}
aqi.HTTPClient = req
req.handleRequest = func() (*aqi.Response, error) {
return nil, errors.New("api is not responsive")
}
groupedStations := map[string][]int{"kathmandu": {11, 55}}
_, err := getFilteredResponse(groupedStations)
... | explode_data.jsonl/12975 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
1949,
67310,
623,
804,
16446,
1454,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
609,
11571,
1900,
16094,
11323,
40187,
27358,
2959,
284,
4232,
271,
24395,
10132,
1900,
284,
2915,
368,
4609,
36306,
72,
12574,
11,
1465,
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 TestMSSQLIntAfterText(t *testing.T) {
db, sc, err := mssqlConnect()
if err != nil {
t.Fatal(err)
}
defer closeDB(t, db, sc, sc)
const query = "select cast('abc' as text), cast(123 as int)"
rows, err := db.Query(query)
if err != nil {
t.Fatalf("db.Query(%q) failed: %v", query, err)
}
defer rows.Close(... | explode_data.jsonl/33549 | {
"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,
44,
1220,
3588,
1072,
6025,
1178,
1155,
353,
8840,
836,
8,
341,
20939,
11,
1136,
11,
1848,
1669,
296,
79713,
14611,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
3265,
3506,
1155,
11,
2927,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJS(t *testing.T) {
act, err := New(newInitContext(map[string]interface{}{
"script": "result.sum = parameters.a + parameters.b",
}))
assert.Nil(t, err)
ctx := newActivityContext(map[string]interface{}{
"parameters": map[string]interface{}{"a": 1.0, "b": 2.0},
})
_, err = act.Eval(ctx)
assert.Nil(t, ... | explode_data.jsonl/60378 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 173
} | [
2830,
3393,
12545,
1155,
353,
8840,
836,
8,
341,
92699,
11,
1848,
1669,
1532,
1755,
3803,
1972,
9147,
14032,
31344,
67066,
197,
197,
1,
2282,
788,
330,
1382,
13183,
284,
5029,
5849,
488,
5029,
948,
756,
197,
44194,
6948,
59678,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSetHeader(t *testing.T) {
req, err := NewRequest("GET", "guoyao.me", nil)
if err != nil {
t.Error(util.FormatTest("setHeader", err.Error(), "nil"))
}
req.Header = map[string][]string{
"Host": {"tocloud.org"},
"Accept-Encoding": {"gzip, deflate"},
}
req.setHeader("Host", "guoyao.me")
... | explode_data.jsonl/27166 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 245
} | [
2830,
3393,
1649,
4047,
1155,
353,
8840,
836,
8,
341,
24395,
11,
1848,
1669,
1532,
1900,
445,
3806,
497,
330,
8717,
2253,
3441,
17326,
497,
2092,
692,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
67811,
9978,
2271,
445,
746,
4047,
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... | 4 |
func TestMatCopyToWithMask(t *testing.T) {
mat := NewMatWithSize(101, 102, MatTypeCV8U)
defer mat.Close()
mask := NewMatWithSize(101, 102, MatTypeCV8U)
defer mask.Close()
diff := NewMat()
defer diff.Close()
mat.SetUCharAt(0, 0, 255)
mat.SetUCharAt(0, 1, 255)
mask.SetUCharAt(0, 0, 255)
copy := NewMat()
def... | explode_data.jsonl/81691 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 342
} | [
2830,
3393,
11575,
12106,
1249,
2354,
12686,
1155,
353,
8840,
836,
8,
341,
59874,
1669,
1532,
11575,
2354,
1695,
7,
16,
15,
16,
11,
220,
16,
15,
17,
11,
6867,
929,
19589,
23,
52,
340,
16867,
5517,
10421,
741,
74912,
1669,
1532,
1157... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssueMalformed(t *testing.T) {
t.Parallel()
ctx := project.TestContext(t)
harness := envstest.NewServerConfig(t, testDatabaseInstance)
realm, err := harness.Database.FindRealm(1)
if err != nil {
t.Fatal(err)
}
realm.AllowBulkUpload = true
c := issueapi.New(harness.Config, harness.Database, harness... | explode_data.jsonl/15657 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1238
} | [
2830,
3393,
42006,
29600,
10155,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20985,
1669,
2390,
8787,
1972,
1155,
340,
9598,
23518,
1669,
6105,
267,
477,
7121,
5475,
2648,
1155,
11,
1273,
5988,
2523,
692,
17200,
7673,
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 TestValuelessAttrs(t *testing.T) {
tests := [][3]string{
{"<p nowrap>", "p", "nowrap"},
{"<p nowrap >", "p", "nowrap"},
{"<input checked/>", "input", "checked"},
{"<input checked />", "input", "checked"},
}
for _, test := range tests {
d := NewDecoder(strings.NewReader(test[0]))
d.Strict = false
t... | explode_data.jsonl/48617 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 331
} | [
2830,
3393,
1130,
1717,
53671,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
508,
1457,
18,
30953,
515,
197,
197,
4913,
27,
79,
48744,
21156,
330,
79,
497,
330,
55423,
7115,
197,
197,
4913,
27,
79,
48744,
82876,
330,
79,
497,
330,
5542... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetLetterIcon(t *testing.T) {
req, err := http.NewRequest("GET", "/lettericons/M-144-EFC25D.png", nil)
if err != nil {
t.Fatal(err)
}
w := httptest.NewRecorder()
lettericonHandler(w, req)
assertStringEquals(t, "200", fmt.Sprintf("%d", w.Code))
assertStringEquals(t, "image/png", w.Header().Get("Conte... | explode_data.jsonl/25597 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 183
} | [
2830,
3393,
1949,
34264,
4395,
1155,
353,
8840,
836,
8,
341,
24395,
11,
1848,
1669,
1758,
75274,
445,
3806,
497,
3521,
9451,
10670,
10270,
12,
16,
19,
19,
13431,
6754,
17,
20,
35,
3508,
497,
2092,
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... | 2 |
func TestToAdminAPIErr(t *testing.T) {
testCases := []struct {
err error
expectedAPIErr APIErrorCode
}{
// 1. Server not in quorum.
{
err: errXLWriteQuorum,
expectedAPIErr: ErrAdminConfigNoQuorum,
},
// 2. No error.
{
err: nil,
expectedAPIErr: ErrNone,
},
... | explode_data.jsonl/7932 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
1249,
7210,
7082,
7747,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
9859,
310,
1465,
198,
197,
42400,
7082,
7747,
5333,
30748,
198,
197,
59403,
197,
197,
322,
220,
16,
13,
8422,
537,
304,
922,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewUserDicRecords01(t *testing.T) {
r := UserDicRecords{
{
Text: "日本経済新聞",
Tokens: []string{"日本", "経済", "新聞"},
Yomi: []string{"ニホン", "ケイザイ", "シンブン"},
Pos: "カスタム名詞",
},
{
Text: "朝青龍",
Tokens: []string{"朝青龍"},
Yomi: []string{"アサショウリュウ"},
Pos: "カスタム人名",
},
}
udic, ... | explode_data.jsonl/44233 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 619
} | [
2830,
3393,
3564,
1474,
44545,
25876,
15,
16,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
2657,
44545,
25876,
515,
197,
197,
515,
298,
49635,
25,
256,
330,
101059,
57154,
234,
33986,
230,
111716,
756,
298,
10261,
9713,
25,
3056,
917,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestSingleTcpConnectionClient(t *testing.T) {
Convey("TestSingleTcpConnectionClient", t, func() {
tcpServer := startRpcServer(0)
defer stopRpcServer(tcpServer)
conn, client, err := createClient()
So(err, ShouldBeNil)
So(conn, ShouldNotBeNil)
So(client, ShouldNotBeNil)
defer client.Close()
defer c... | explode_data.jsonl/23727 | {
"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,
10888,
77536,
4526,
2959,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2271,
10888,
77536,
4526,
2959,
497,
259,
11,
2915,
368,
341,
197,
3244,
4672,
5475,
1669,
1191,
60248,
5475,
7,
15,
340,
197,
16867,
2936,
60248,
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 TestSaveSettingsChangeUsernameFailedAuthorized(t *testing.T) {
dbMock := new(DBMock)
authHandler := AuthHandlerMock{}
services := &Services{db: dbMock, cookieHandler: &authHandler}
router, err := CreateRouter(services)
assert.NoError(t, err)
body := new(bytes.Buffer)
writer := multipart.NewWriter(body)
w... | explode_data.jsonl/62533 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 338
} | [
2830,
3393,
8784,
6086,
4072,
11115,
9408,
60454,
1155,
353,
8840,
836,
8,
341,
20939,
11571,
1669,
501,
32184,
11571,
340,
78011,
3050,
1669,
7366,
3050,
11571,
31483,
1903,
2161,
1669,
609,
11025,
90,
1999,
25,
2927,
11571,
11,
12544,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGocode(t *testing.T) {
for _, test := range tests {
t.Run(filepath.Base(test.Name), func(t *testing.T) {
if err := test.Check(conf); err != nil {
t.Errorf("%s: %s", test.Name, err)
}
})
}
} | explode_data.jsonl/41687 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 101
} | [
2830,
3393,
38,
43688,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
7032,
341,
197,
3244,
16708,
34793,
13018,
8623,
2967,
701,
2915,
1155,
353,
8840,
836,
8,
341,
298,
743,
1848,
1669,
1273,
10600,
29879,
1215,
1848,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestEdgeutilInterpolate(t *testing.T) {
// Choose test points designed to expose floating-point errors.
p1 := PointFromCoords(0.1, 1e-30, 0.3)
p2 := PointFromCoords(-0.7, -0.55, -1e30)
tests := []struct {
a, b Point
dist float64
want Point
}{
// A zero-length edge.
{p1, p1, 0, p1},
{p1, p1, 1, p1... | explode_data.jsonl/74788 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 552
} | [
2830,
3393,
11656,
1314,
3306,
45429,
1155,
353,
8840,
836,
8,
341,
197,
322,
22201,
1273,
3501,
6188,
311,
28141,
19057,
16574,
5975,
624,
3223,
16,
1669,
5126,
3830,
34344,
7,
15,
13,
16,
11,
220,
16,
68,
12,
18,
15,
11,
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... | 3 |
func TestMax(t *testing.T) {
Convey("when adding values to a rolling number", t, func() {
n := NewNumber()
for _, x := range []float64{10, 11, 9} {
n.UpdateMax(x)
time.Sleep(1 * time.Second)
}
Convey("it should know the maximum", func() {
So(n.Max(time.Now()), ShouldEqual, 11)
})
})
} | explode_data.jsonl/18684 | {
"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,
5974,
1155,
353,
8840,
836,
8,
1476,
93070,
5617,
445,
9309,
7842,
2750,
311,
264,
20097,
1372,
497,
259,
11,
2915,
368,
341,
197,
9038,
1669,
1532,
2833,
741,
197,
2023,
8358,
856,
1669,
2088,
3056,
3649,
21,
19,
90,
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 TestFSMString(t *testing.T) {
cases := []struct {
state FSMState
str string
}{
{DisabledState, "disabled"},
{IdleState, "idle"},
{ConnectState, "connect"},
{ActiveState, "active"},
{OpenSentState, "openSent"},
{OpenConfirmState, "openConfirm"},
{EstablishedState, "established"},
{FSMState(1... | explode_data.jsonl/1678 | {
"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,
8485,
44,
703,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
24291,
70967,
1397,
198,
197,
11355,
256,
914,
198,
197,
59403,
197,
197,
90,
25907,
1397,
11,
330,
11978,
7115,
197,
197,
90,
41370,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUser_GetTeams(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
org := AssertExistsAndLoadBean(t, &User{ID: 3}).(*User)
assert.NoError(t, org.GetTeams(&SearchTeamOptions{}))
if assert.Len(t, org.Teams, 4) {
assert.Equal(t, int64(1), org.Teams[0].ID)
assert.Equal(t, int64(2), org.Teams[1].ID)
a... | explode_data.jsonl/71049 | {
"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,
1474,
13614,
60669,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
2271,
5988,
2398,
87625,
1669,
5319,
15575,
3036,
5879,
10437,
1155,
11,
609,
1474,
90,
915,
25,
220,
18,
16630,
4071,
1474,
340,
6948,
35699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefaultFixtureHasExpectedInitialState(t *testing.T) {
thelmaBuilder := builder.NewBuilder().WithTestDefaults(t)
app, err := thelmaBuilder.Build()
require.NoError(t, err)
state, err := app.State()
require.NoError(t, err)
// make sure we have the expected number of environments
envs, err := state.Enviro... | explode_data.jsonl/79306 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1043
} | [
2830,
3393,
3675,
18930,
10281,
18896,
80425,
1155,
353,
8840,
836,
8,
341,
70479,
301,
1728,
3297,
1669,
7363,
7121,
3297,
1005,
2354,
2271,
16273,
1155,
340,
28236,
11,
1848,
1669,
279,
75,
1728,
3297,
25212,
741,
17957,
35699,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPrepareHeaders(t *testing.T) {
req, err := NewRequest("GET", "http://guoyao.me", nil)
if err != nil {
t.Error(util.FormatTest("clearHeaders", err.Error(), "nil"))
}
signOption := &SignOption{
Headers: map[string]string{"Content-Type": "text/plain"},
}
req.prepareHeaders(signOption)
if !util.MapCo... | explode_data.jsonl/27168 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 412
} | [
2830,
3393,
50590,
10574,
1155,
353,
8840,
836,
8,
341,
24395,
11,
1848,
1669,
1532,
1900,
445,
3806,
497,
330,
1254,
1110,
8717,
2253,
3441,
17326,
497,
2092,
692,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
67811,
9978,
2271,
445,
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... | 2 |
func TestGetTeamIcon(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
Client := th.Client
team := th.BasicTeam
// should always fail because no initial image and no auto creation
_, resp := Client.GetTeamIcon(team.Id, "")
CheckNotFoundStatus(t, resp)
Client.Logout()
_, resp = Client.GetTeamIco... | explode_data.jsonl/70742 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
1949,
14597,
4395,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
198,
197,
9196,
1669,
270,
48868,
14597,
271,
197,
322,
1265,
2677,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTypeSystem_UnionTypesMustBeArray_RejectsAUnionTypeWithoutTypes(t *testing.T) {
_, err := schemaWithFieldType(graphql.NewUnion(graphql.UnionConfig{
Name: "SomeUnion",
ResolveType: func(p graphql.ResolveTypeParams) *graphql.Object {
return nil
},
}))
expectedError := "Must provide Array of types for ... | explode_data.jsonl/79153 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 158
} | [
2830,
3393,
929,
2320,
62,
32658,
4173,
31776,
3430,
1857,
50693,
583,
82,
32,
32658,
929,
26040,
4173,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
10802,
2354,
63733,
24312,
1470,
7121,
32658,
24312,
1470,
10616,
290,
2648,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSafeDeletePublicIP(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
testCases := []struct {
desc string
pip *network.PublicIPAddress
lb *network.LoadBalancer
expectedError bool
}{
{
desc: "safeDeletePublicIP shall delete corresponding ip config... | explode_data.jsonl/34006 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1013
} | [
2830,
3393,
25663,
6435,
12676,
3298,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
688,
914,
198,
197,
3223,
573,
1843... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTodoToggle(t *testing.T) {
dbx := DefaultDB()
defer dbx.Close()
tx := dbx.MustBegin()
defer func() {
if err := recover(); err != nil {
tx.Rollback()
}
}()
todo := &Todo{Title: "homework", Completed: true}
result, err := todo.Insert(tx)
if err != nil {
t.Fatalf("insertion error: %s", err)
}
... | explode_data.jsonl/73400 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 378
} | [
2830,
3393,
24176,
18897,
1155,
353,
8840,
836,
8,
341,
20939,
87,
1669,
7899,
3506,
741,
16867,
2927,
87,
10421,
2822,
46237,
1669,
2927,
87,
50463,
11135,
741,
16867,
2915,
368,
341,
197,
743,
1848,
1669,
11731,
2129,
1848,
961,
2092,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Pagination_PrevNext_1PrevLink(t *testing.T) {
doc := testutil.CreateHTML()
body := dom.QuerySelector(doc, "body")
root := testutil.CreateDiv(0)
dom.AppendChild(body, root)
anchor := testutil.CreateAnchor("prev", "prev page")
dom.AppendChild(root, anchor)
assertDefaultDocumenOutlink(t, doc, anchor, n... | explode_data.jsonl/10828 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
1088,
10353,
1088,
7282,
5847,
62,
16,
33528,
3939,
1155,
353,
8840,
836,
8,
341,
59536,
1669,
1273,
1314,
7251,
5835,
741,
35402,
1669,
4719,
15685,
5877,
19153,
11,
330,
2599,
5130,
33698,
1669,
1273,
1314,
7251,
12509,
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 TestCreateEntityBadRequest(t *testing.T) {
ts := httptest.NewServer(
http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
if strings.HasSuffix(r.URL.Path, "/v2") {
apiResourcesHandler(w, r)
} else {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.Statu... | explode_data.jsonl/64661 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 290
} | [
2830,
3393,
4021,
3030,
46015,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
5475,
1006,
197,
28080,
89164,
1006,
298,
29244,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
571,
743,
9069,
16152,
40177,
2601,
2089... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ContainsMultipleUnsafeSet(t *testing.T) {
a := makeUnsafeSet([]int{8, 6, 7, 5, 3, 0, 9})
if !a.Contains(8, 6, 7, 5, 3, 0, 9) {
t.Error("ContainsAll should contain Jenny'S phone number")
}
if a.Contains(8, 6, 11, 5, 3, 0, 9) {
t.Error("ContainsAll should not have all of these numbers")
}
} | explode_data.jsonl/177 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
62,
23805,
32089,
78770,
1649,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
1281,
78770,
1649,
10556,
396,
90,
23,
11,
220,
21,
11,
220,
22,
11,
220,
20,
11,
220,
18,
11,
220,
15,
11,
220,
24,
8824,
743,
753,
64,
11545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPostMedias_Equals(t *testing.T) {
tests := []struct {
name string
first types.PostMedias
second types.PostMedias
expEquals bool
}{
{
name: "Same data returns true",
first: types.PostMedias{
types.PostMedia{
URI: "uri",
MimeType: "text/plain",
},
types.Po... | explode_data.jsonl/47668 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 806
} | [
2830,
3393,
4133,
13310,
3473,
86567,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
42190,
257,
4494,
23442,
13310,
3473,
198,
197,
197,
5569,
262,
4494,
23442,
13310,
3473,
198,
197,
48558,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTopDownPartialSetDoc(t *testing.T) {
tests := []struct {
note string
rule string
expected string
}{
{"array values", `p[x] { a[i] = x }`, `[1, 2, 3, 4]`},
{"array indices", `p[x] { a[x] = _ }`, `[0, 1, 2, 3]`},
{"object keys", `p[x] { b[x] = _ }`, `["v1", "v2"]`},
{"object values", `p[... | explode_data.jsonl/25193 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 428
} | [
2830,
3393,
5366,
4454,
37314,
1649,
9550,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
9038,
1272,
257,
914,
198,
197,
7000,
1111,
257,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
4913,
1653,
2750,
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... | 2 |
func TestVariables_ObjectsAndNullability_UsingVariables_ExecutesWithComplexScalarInput(t *testing.T) {
params := map[string]interface{}{
"input": map[string]interface{}{
"c": "foo",
"d": "SerializedValue",
},
}
expected := &graphql.Result{
Data: map[string]interface{}{
"fieldWithObjectInput": `{"c":"f... | explode_data.jsonl/6435 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 309
} | [
2830,
3393,
22678,
62,
11543,
3036,
3280,
2897,
62,
16429,
22678,
62,
10216,
2095,
2354,
31137,
20639,
2505,
1155,
353,
8840,
836,
8,
341,
25856,
1669,
2415,
14032,
31344,
67066,
197,
197,
1,
1355,
788,
2415,
14032,
31344,
67066,
298,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestGetOpenEBSServiceAccountName(t *testing.T) {
testCases := map[string]struct {
value string
expectedValue string
}{
"Missing env variable": {
value: "",
expectedValue: "",
},
"Present env variable with value": {
value: "value1",
expectedValue: "value1",
},
"Pr... | explode_data.jsonl/30413 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 353
} | [
2830,
3393,
1949,
5002,
8264,
1220,
1017,
7365,
675,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
16309,
260,
914,
198,
197,
42400,
1130,
914,
198,
197,
59403,
197,
197,
1,
25080,
6105,
3890,
788,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCondition(t *testing.T) {
// test Condition whether to include yourself
cond := NewCondition()
cond = cond.AndCond(cond.Or("ID", 1))
cond = cond.AndCond(cond.Or("ID", 2))
cond = cond.AndCond(cond.Or("ID", 3))
cond = cond.AndCond(cond.Or("ID", 4))
cycleFlag := false
var hasCycle func(*Condition)
hasCy... | explode_data.jsonl/18170 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 413
} | [
2830,
3393,
10547,
1155,
353,
8840,
836,
8,
341,
197,
322,
1273,
15180,
3425,
311,
2924,
6133,
198,
197,
1297,
1669,
1532,
10547,
741,
197,
1297,
284,
9756,
31164,
49696,
66285,
90449,
445,
915,
497,
220,
16,
1171,
197,
1297,
284,
975... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_deploymentIntegrationSubset(t *testing.T) {
var (
nodeExporter = &gragent.Integration{
ObjectMeta: meta_v1.ObjectMeta{
Name: "node_exporter",
Namespace: "default",
},
Spec: gragent.IntegrationSpec{
Name: "node_exporter",
Type: gragent.IntegrationType{AllNodes: true},
},
}... | explode_data.jsonl/70375 | {
"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,
2259,
52799,
52464,
70584,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
20831,
88025,
284,
609,
901,
8092,
7371,
17376,
515,
298,
23816,
12175,
25,
8823,
2273,
16,
80222,
515,
571,
21297,
25,
414,
330,
3509,
27114,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateNextUpstream(t *testing.T) {
tests := []struct {
inputS string
}{
{
inputS: "error timeout",
},
{
inputS: "http_404 timeout",
},
}
for _, test := range tests {
allErrs := validateNextUpstream(test.inputS, field.NewPath("next-upstreams"))
if len(allErrs) > 0 {
t.Errorf("valida... | explode_data.jsonl/65825 | {
"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,
17926,
5847,
2324,
4027,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
22427,
50,
914,
198,
197,
59403,
197,
197,
515,
298,
22427,
50,
25,
330,
841,
9632,
756,
197,
197,
1583,
197,
197,
515,
298,
22427... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddFunctions(t *testing.T) {
fn := func(fl FieldLevel) bool {
return true
}
fnCtx := func(ctx context.Context, fl FieldLevel) bool {
return true
}
validate := New()
errs := validate.RegisterValidation("new", fn)
Equal(t, errs, nil)
errs = validate.RegisterValidation("", fn)
NotEqual(t, errs,... | explode_data.jsonl/77305 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 258
} | [
2830,
3393,
2212,
25207,
1155,
353,
8840,
836,
8,
1476,
40095,
1669,
2915,
49747,
8601,
4449,
8,
1807,
1476,
197,
853,
830,
198,
197,
630,
40095,
23684,
1669,
2915,
7502,
2266,
9328,
11,
1320,
8601,
4449,
8,
1807,
341,
197,
853,
830,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestExecRunsGoHelpAndGetsUsageMessage(t *testing.T) {
t.Parallel()
p := script.Exec("go help")
if p.Error() != nil {
t.Fatal(p.Error())
}
output, err := p.String()
if err != nil {
t.Fatal(err)
}
if !strings.Contains(output, "Usage") {
t.Fatalf("want output containing the word 'usage', got %q", output... | explode_data.jsonl/51503 | {
"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,
10216,
73920,
10850,
12689,
3036,
49358,
14783,
2052,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3223,
1669,
5316,
30798,
445,
3346,
1492,
1138,
743,
281,
6141,
368,
961,
2092,
341,
197,
3244,
26133,
1295,
6141,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestTransaction(t *testing.T) {
qs, w, _ := makeTestStore(simpleGraph)
st, err := qs.Stats(context.Background(), true)
require.NoError(t, err)
tx := graph.NewTransaction()
tx.AddQuad(quad.Make(
"E",
"follows",
"G",
nil))
tx.RemoveQuad(quad.Make(
"Non",
"existent",
"quad",
nil))
err = w.App... | explode_data.jsonl/79104 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
8070,
1155,
353,
8840,
836,
8,
341,
18534,
82,
11,
289,
11,
716,
1669,
1281,
2271,
6093,
1141,
6456,
11212,
340,
18388,
11,
1848,
1669,
32421,
7758,
1862,
5378,
19047,
1507,
830,
340,
17957,
35699,
1155,
11,
1848,
692,
462... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewDefaultWorld(t *testing.T) {
w := NewDefaultWorld()
if len(w.Lights) != 1 {
t.Errorf("Expected default world to have one light source")
}
if len(w.Objects) != 2 {
t.Errorf("Expected default world to have two light sources")
}
} | explode_data.jsonl/27648 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
3564,
3675,
10134,
1155,
353,
8840,
836,
8,
341,
6692,
1669,
1532,
3675,
10134,
741,
743,
2422,
3622,
1214,
2796,
8,
961,
220,
16,
341,
197,
3244,
13080,
445,
18896,
1638,
1879,
311,
614,
825,
3100,
2530,
1138,
197,
532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestClientReconnect(t *testing.T) {
startServer := func(addr string) (*Server, net.Listener) {
srv := newTestServer()
l, err := net.Listen("tcp", addr)
if err != nil {
t.Fatal("can't listen:", err)
}
go http.Serve(l, srv.WebsocketHandler([]string{"*"}))
return srv, l
}
ctx, cancel := context.Wit... | explode_data.jsonl/64470 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 700
} | [
2830,
3393,
2959,
693,
6459,
1155,
353,
8840,
836,
8,
341,
21375,
5475,
1669,
2915,
24497,
914,
8,
4609,
5475,
11,
4179,
64091,
8,
341,
197,
1903,
10553,
1669,
501,
2271,
5475,
741,
197,
8810,
11,
1848,
1669,
4179,
68334,
445,
27161,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBasenameRemovesLeadingPathComponentsFromInputLines(t *testing.T) {
t.Parallel()
tcs := []struct {
path string
want string
}{
{"\n", ".\n"},
{"/", "/\n"},
{"/root", "root\n"},
{"/tmp/example.php", "example.php\n"},
{"./src/filters", "filters\n"},
{"/var/tmp/example.php", "example.php\n"},
{... | explode_data.jsonl/51460 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 345
} | [
2830,
3393,
33,
27100,
6590,
10088,
69750,
1820,
10443,
3830,
2505,
16794,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3244,
4837,
1669,
3056,
1235,
341,
197,
26781,
914,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
4913,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSpyglassConfigDefaulting(t *testing.T) {
t.Parallel()
testCases := []struct {
name string
in *config.Config
verify func(*config.Config, error) error
}{
{
name: "buildlog lens gets defaulted",
in: cfgWithLensNamed("buildlog"),
verify: verifyCfgHasRemoteForLens("buildlog"),
},
... | explode_data.jsonl/66272 | {
"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,
44027,
58436,
2648,
3675,
287,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
17430,
257,
353,
1676,
10753,
198,
197,
93587,
2915,
4071,
1676,
1075... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuilder_Auths(t *testing.T) {
b := New().NewID().Auths([]Auth{
{
Provider: "xxx",
Sub: "aaa",
},
}).MustBuild()
assert.Equal(t, []Auth{
{
Provider: "xxx",
Sub: "aaa",
},
}, b.Auths())
} | explode_data.jsonl/75864 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
3297,
1566,
940,
82,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
1532,
1005,
3564,
915,
1005,
5087,
82,
10556,
5087,
515,
197,
197,
515,
298,
197,
5179,
25,
330,
24048,
756,
298,
197,
3136,
25,
414,
330,
32646,
756,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSmoke(t *testing.T) {
testCases := []string{sakila.CSVActor, sakila.TSVActor, sakila.CSVActorHTTP}
for _, handle := range testCases {
handle := handle
t.Run(handle, func(t *testing.T) {
t.Parallel()
th := testh.New(t)
src := th.Source(sakila.CSVActor)
sink, err := th.QuerySQL(src, "SELECT... | explode_data.jsonl/21353 | {
"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,
76880,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
917,
84386,
585,
10524,
727,
17803,
18870,
11,
77310,
10524,
836,
17803,
18870,
11,
77310,
10524,
727,
17803,
18870,
9230,
630,
2023,
8358,
3705,
1669,
2088,
1273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValueAssignment_GetList(t *testing.T) {
t.Parallel()
type fields struct {
Type ValueAssignmentType
Value interface{}
}
tests := []struct {
name string
fields fields
want []interface{}
}{
{"TestList", fields{ValueAssignmentList, []interface{}{"1", "2", "3"}}, []interface{}{"1", "2", "3"}},... | explode_data.jsonl/64262 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 355
} | [
2830,
3393,
1130,
41613,
13614,
852,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
13158,
5043,
2036,
341,
197,
27725,
220,
5162,
41613,
929,
198,
197,
47399,
3749,
16094,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMemberInviteChangeRole(t *testing.T) {
tc, _, name := memberSetup(t)
defer tc.Cleanup()
username := "t_alice"
uid := keybase1.UID("295a7eea607af32040647123732bc819")
role := keybase1.TeamRole_READER
res, err := AddMember(context.TODO(), tc.G, name, username, role)
if err != nil {
t.Fatal(err)
}
if... | explode_data.jsonl/13539 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
9366,
93540,
4072,
9030,
1155,
353,
8840,
836,
8,
341,
78255,
11,
8358,
829,
1669,
4462,
21821,
1155,
340,
16867,
17130,
727,
60639,
2822,
72358,
1669,
330,
83,
8418,
558,
698,
197,
2423,
1669,
1376,
3152,
16,
5255,
915,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestGetAndSetValidatorBurn(t *testing.T) {
stakedValidator := getStakedValidator()
type args struct {
amount sdk.Dec
validator types.Validator
}
type expected struct {
amount sdk.Dec
found bool
}
tests := []struct {
name string
args
expected
}{
{
name: "can get and set validator ... | explode_data.jsonl/9975 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 497
} | [
2830,
3393,
1949,
3036,
1649,
14256,
66213,
1155,
353,
8840,
836,
8,
341,
18388,
7741,
14256,
1669,
633,
623,
7741,
14256,
2822,
13158,
2827,
2036,
341,
197,
197,
6045,
262,
45402,
22442,
198,
197,
197,
16112,
4494,
13,
14256,
198,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestWebRTCPeer(t *testing.T) {
Convey("WebRTCPeer", t, func(c C) {
p := &WebRTCPeer{closed: make(chan struct{})}
Convey("checks for staleness", func() {
go p.checkForStaleness(time.Second)
<-time.After(2 * time.Second)
So(p.Closed(), ShouldEqual, true)
})
})
} | explode_data.jsonl/9149 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 128
} | [
2830,
3393,
5981,
5350,
7123,
34756,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
5981,
5350,
7123,
34756,
497,
259,
11,
2915,
1337,
356,
8,
341,
197,
3223,
1669,
609,
5981,
5350,
7123,
34756,
90,
34087,
25,
1281,
35190,
2036,
2887... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileStoreNew(t *testing.T) {
utils.TranslationsPreInit()
t.Run("absolute path, initialization required", func(t *testing.T) {
path, tearDown := setupConfigFile(t, testConfig)
defer tearDown()
fs, err := config.NewFileStore(path, false)
require.NoError(t, err)
configStore, err := config.NewStoreFr... | explode_data.jsonl/32378 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2088
} | [
2830,
3393,
1703,
6093,
3564,
1155,
353,
8840,
836,
8,
341,
80206,
11815,
29656,
4703,
3803,
2822,
3244,
16708,
445,
17182,
1815,
11,
17465,
2567,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
26781,
11,
32825,
1669,
6505,
2648,
1703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewService(t *testing.T) {
w, err := NewService(QueueName)
if w == nil {
t.Errorf("Expected new service, got error %s", err)
}
_, err = NewService(NonExistQueueName)
if err == nil {
t.Errorf("Expected error creating service, got error is %s", err)
}
} | explode_data.jsonl/16425 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 103
} | [
2830,
3393,
3564,
1860,
1155,
353,
8840,
836,
8,
341,
6692,
11,
1848,
1669,
1532,
1860,
6253,
6318,
675,
692,
743,
289,
621,
2092,
341,
197,
3244,
13080,
445,
18896,
501,
2473,
11,
2684,
1465,
1018,
82,
497,
1848,
340,
197,
630,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestConnectOfflineTiKV(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
wg := &sync.WaitGroup{}
ch2 := make(chan *cdcpb.ChangeDataEvent, 10)
srv := newMockChangeDataService(t, ch2)
server2, addr := newMockService(ctx, t, srv, wg)
defer func() {
close(ch2)
server2.St... | explode_data.jsonl/32861 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1230
} | [
2830,
3393,
14611,
52563,
45351,
82707,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
741,
72079,
1669,
609,
12996,
28384,
2808,
16094,
23049,
17,
1669,
1281,
35190,
353,
4385,
467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRuleStandardINEQ(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := []string{
"select col1,col2 from tbl where type!=0",
// "select col1,col2 from tbl where type<>0",
}
for _, sql := range sqls {
q, err := NewQuery4Audit(sql)
if err == nil {
rule := q.Rul... | explode_data.jsonl/76773 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
11337,
19781,
3981,
48,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
3056,
917,
515,
197,
197,
1,
1742,
1375,
16,
51496,
17,
504,
211... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWriter(t *testing.T) {
t.Parallel()
tests := []struct {
scenario string
function func(*testing.T)
}{
{
scenario: "closing a writer right after creating it returns promptly with no error",
function: testWriterClose,
},
{
scenario: "writing 1 message through a writer using round-robin bal... | explode_data.jsonl/70894 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
6492,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
29928,
20413,
914,
198,
197,
7527,
2915,
4071,
8840,
836,
340,
197,
59403,
197,
197,
515,
298,
29928,
20413,
25,
330,
85777,
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 TestReadingsByDeviceName(t *testing.T) {
dic := mocks.NewMockDIC()
dbClientMock := &dbMock.DBClient{}
dbClientMock.On("ReadingsByDeviceName", 0, 20, TestDeviceName).Return([]models.Reading{}, nil)
dbClientMock.On("ReadingsByDeviceName", 0, 1, TestDeviceName).Return([]models.Reading{}, nil)
dic.Update(di.Servi... | explode_data.jsonl/22702 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1054
} | [
2830,
3393,
4418,
819,
1359,
6985,
675,
1155,
353,
8840,
836,
8,
341,
2698,
292,
1669,
68909,
7121,
11571,
93161,
741,
20939,
2959,
11571,
1669,
609,
1999,
11571,
22537,
2959,
16094,
20939,
2959,
11571,
8071,
445,
4418,
819,
1359,
6985,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCancelEventStream(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
eventStream := NewEventStream("TestCancelEventStream", ctx)
_, listener := setupWaitGroupAndListener()
eventStream.Subscribe("listener", listener)
eventStream.StartListening()
cancel()
time.Sleep(1 * time.Second)... | explode_data.jsonl/78494 | {
"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,
9269,
1556,
3027,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
28302,
3027,
1669,
1532,
1556,
3027,
445,
2271,
9269,
1556,
3027,
497,
5635,
340,
197,
6878,
11446,
1669,
6505,
141... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFSNoSliceLimitAndNoChannelLimits(t *testing.T) {
cleanupFSDatastore(t)
defer cleanupFSDatastore(t)
// No slice limit
fs := createDefaultFileStore(t, SliceConfig(0, 0, 0, ""))
defer fs.Close()
// And no channel limit
limits := StoreLimits{}
if err := fs.SetLimits(&limits); err != nil {
t.Fatalf("Err... | explode_data.jsonl/7770 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 353
} | [
2830,
3393,
8485,
2753,
33236,
16527,
3036,
2753,
9629,
94588,
1155,
353,
8840,
836,
8,
341,
1444,
60639,
8485,
1043,
4314,
1155,
340,
16867,
21290,
8485,
1043,
4314,
1155,
692,
197,
322,
2308,
15983,
3930,
198,
53584,
1669,
1855,
3675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNew(t *testing.T) {
rotors := []struct {
name string
position int
setting int
}{
{
name: RotorIII,
position: 5,
setting: 6,
}, {
name: RotorII,
position: 23,
setting: 1,
}, {
name: RotorI,
position: 0,
setting: 0,
},
}
tests := []struct {
name ... | explode_data.jsonl/27825 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 543
} | [
2830,
3393,
3564,
1155,
353,
8840,
836,
8,
341,
197,
4640,
1087,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
35739,
526,
198,
197,
8196,
1280,
220,
526,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
257,
431,
9887,
2261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEncoderBuffering(t *testing.T) {
input := []byte(bigtest.decoded)
for bs := 1; bs <= 12; bs++ {
bb := &bytes.Buffer{}
encoder := NewEncoder(StdEncoding, bb)
for pos := 0; pos < len(input); pos += bs {
end := pos + bs
if end > len(input) {
end = len(input)
}
n, err := encoder.Write(input... | explode_data.jsonl/35051 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 314
} | [
2830,
3393,
19921,
4095,
287,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
3056,
3782,
75616,
1944,
28020,
6737,
340,
2023,
17065,
1669,
220,
16,
26,
17065,
2651,
220,
16,
17,
26,
17065,
1027,
341,
197,
2233,
65,
1669,
609,
9651,
22622,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfig_LoadConfigsFileOrder(t *testing.T) {
config1, err := LoadConfigDir("test-resources/etcnomad")
if err != nil {
t.Fatalf("Failed to load config: %s", err)
}
config2, err := LoadConfig("test-resources/myconf")
if err != nil {
t.Fatalf("Failed to load config: %s", err)
}
expected := []string{
... | explode_data.jsonl/76935 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 279
} | [
2830,
3393,
2648,
19553,
84905,
1703,
4431,
1155,
353,
8840,
836,
8,
341,
25873,
16,
11,
1848,
1669,
8893,
2648,
6184,
445,
1944,
89811,
47047,
16687,
329,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
9408,
311,
2795,
2193,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestCommit(t *testing.T) {
tests := []struct {
matches []uint64
logs []pb.Entry
smTerm uint64
w uint64
}{
// single
{[]uint64{1}, []pb.Entry{{Index: 1, Term: 1}}, 1, 1},
{[]uint64{1}, []pb.Entry{{Index: 1, Term: 1}}, 2, 0},
{[]uint64{2}, []pb.Entry{{Index: 1, Term: 1}, {Index: 2, Term: ... | explode_data.jsonl/67345 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 831
} | [
2830,
3393,
33441,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
2109,
9118,
3056,
2496,
21,
19,
198,
197,
6725,
82,
262,
3056,
16650,
22330,
198,
197,
72023,
17249,
220,
2622,
21,
19,
198,
197,
6692,
981,
2622,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestNode_IsRight(t *testing.T) {
left := &Node{val: []byte("left")}
right := &Node{val: []byte("right")}
root := &Node{
val: []byte("root"),
right: right,
left: left,
}
left.parent = root
right.parent = root
if !right.IsRight() {
t.Errorf("expected to be a right children")
}
} | explode_data.jsonl/57984 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
1955,
31879,
5979,
1155,
353,
8840,
836,
8,
341,
35257,
1669,
609,
1955,
90,
831,
25,
3056,
3782,
445,
2359,
42132,
47921,
1669,
609,
1955,
90,
831,
25,
3056,
3782,
445,
1291,
42132,
33698,
1669,
609,
1955,
515,
197,
19302... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRedis_Incr(t *testing.T) {
runOnRedis(t, func(client *Redis) {
_, err := NewRedis(client.Addr, "").Incr("a")
assert.NotNil(t, err)
val, err := client.Incr("a")
assert.Nil(t, err)
assert.Equal(t, int64(1), val)
val, err = client.Incr("a")
assert.Nil(t, err)
assert.Equal(t, int64(2), val)
})
} | explode_data.jsonl/39165 | {
"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,
48137,
25972,
5082,
1155,
353,
8840,
836,
8,
341,
56742,
1925,
48137,
1155,
11,
2915,
12805,
353,
48137,
8,
341,
197,
197,
6878,
1848,
1669,
1532,
48137,
12805,
93626,
11,
35229,
641,
5082,
445,
64,
1138,
197,
6948,
93882,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNormalizeHostname(t *testing.T) {
table := []struct {
input string
wanted string
}{
{"a.b", "a.b"},
{"a.b.", "a.b"},
{"*.a", "*.a"},
{"\\052.a.b", "*.a.b"},
}
for _, entry := range table {
result := NormalizeHostname(entry.input)
if result != entry.wanted {
t.Errorf("%s: wanted %s, but ... | explode_data.jsonl/66469 | {
"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,
87824,
88839,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
3056,
1235,
341,
197,
22427,
220,
914,
198,
197,
6692,
7566,
914,
198,
197,
59403,
197,
197,
4913,
64,
948,
497,
330,
64,
948,
7115,
197,
197,
4913,
64,
948,
10465... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvalidVersion(t *testing.T) {
commonFields := common.Fields{
common.Field{
Name: "versionTest",
Format: "url",
UrlTemplate: []common.VersionizedString{
{MinVersion: "3", Value: ""},
},
},
}
trans, err := newFieldsTransformer(version, commonFields)
assert.NoError(t, err)
_, err = tra... | explode_data.jsonl/37633 | {
"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,
7928,
5637,
1155,
353,
8840,
836,
8,
341,
83825,
8941,
1669,
4185,
42809,
515,
197,
83825,
17087,
515,
298,
21297,
25,
256,
330,
4366,
2271,
756,
298,
197,
4061,
25,
330,
1085,
756,
298,
197,
2864,
7275,
25,
3056,
5464,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemove(t *testing.T) {
tests := []struct {
id int
want error
}{
{1, nil},
{2, nil},
{3, nil},
{4, nil},
{5, nil},
{6, nil},
}
tmpdir, err := ioutil.TempDir("", "tmpdir")
if err != nil {
t.Errorf("Unexpected error: TestRemove(%v)", err)
}
defer os.RemoveAll(tmpdir)
if err := exec.Co... | explode_data.jsonl/31021 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
13021,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
15710,
256,
526,
198,
197,
50780,
1465,
198,
197,
59403,
197,
197,
90,
16,
11,
2092,
1583,
197,
197,
90,
17,
11,
2092,
1583,
197,
197,
90,
18,
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... | 5 |
func TestSqlPoolWorkloadGroupIDFormatter(t *testing.T) {
actual := NewSqlPoolWorkloadGroupID("12345678-1234-9876-4563-123456789012", "resGroup1", "workspace1", "sqlPool1", "workloadGroup1").ID()
expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Synapse/works... | explode_data.jsonl/30980 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
8269,
10551,
6776,
1078,
2808,
915,
14183,
1155,
353,
8840,
836,
8,
341,
88814,
1669,
1532,
8269,
10551,
6776,
1078,
2808,
915,
445,
16,
17,
18,
19,
20,
21,
22,
23,
12,
16,
17,
18,
19,
12,
24,
23,
22,
21,
12,
19,
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 TestCreateMigrationsNoClusterPair(t *testing.T) {
cmdArgs := []string{"create", "migrations", "migration1"}
expected := "error: ClusterPair name needs to be provided for migration"
testCommon(t, cmdArgs, nil, expected, true)
} | explode_data.jsonl/18255 | {
"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,
4021,
44,
17824,
2753,
28678,
12443,
1155,
353,
8840,
836,
8,
341,
25920,
4117,
1669,
3056,
917,
4913,
3182,
497,
330,
76,
17824,
497,
330,
80227,
16,
63159,
42400,
1669,
330,
841,
25,
35380,
12443,
829,
3880,
311,
387,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestAdmin_Pin(t *testing.T) {
srv, ts := prep(t)
assert.NotNil(t, srv)
defer cleanup(ts)
c1 := store.Comment{Text: "test test #1",
Locator: store.Locator{SiteID: "radio-t", URL: "https://radio-t.com/blah"}}
c2 := store.Comment{Text: "test test #2", ParentID: "p1",
Locator: store.Locator{SiteID: "radio-t"... | explode_data.jsonl/70318 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 621
} | [
2830,
3393,
7210,
35453,
1155,
353,
8840,
836,
8,
341,
1903,
10553,
11,
10591,
1669,
21327,
1155,
340,
6948,
93882,
1155,
11,
43578,
340,
16867,
21290,
35864,
692,
1444,
16,
1669,
3553,
56730,
90,
1178,
25,
330,
1944,
1273,
671,
16,
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 TestGradualRolloutSessionId_IsEnabled(t *testing.T) {
s := NewGradualRolloutSessionId()
t.Run("p=100", func(t *testing.T) {
params := map[string]interface{}{
strategy.ParamPercentage: 100,
strategy.ParamGroupId: "gr1",
}
isEnabled := s.IsEnabled(params, &context.Context{
SessionId: "123",
}... | explode_data.jsonl/15734 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 951
} | [
2830,
3393,
23999,
928,
32355,
411,
5283,
764,
31879,
5462,
1155,
353,
8840,
836,
8,
1476,
1903,
1669,
1532,
23999,
928,
32355,
411,
5283,
764,
2822,
3244,
16708,
445,
79,
28,
16,
15,
15,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSuspendTemplate(t *testing.T) {
cancel, controller := newController()
defer cancel()
wfcset := controller.wfclientset.ArgoprojV1alpha1().Workflows("")
// operate the workflow. it should become in a suspended state after
ctx := context.Background()
wf := unmarshalWF(suspendTemplate)
wf, err := wfcset.Cr... | explode_data.jsonl/70972 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 506
} | [
2830,
3393,
50,
12758,
7275,
1155,
353,
8840,
836,
8,
341,
84441,
11,
6461,
1669,
501,
2051,
741,
16867,
9121,
741,
6692,
8316,
746,
1669,
6461,
1418,
69,
2972,
746,
18979,
45926,
73,
53,
16,
7141,
16,
1005,
6776,
38140,
445,
5130,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJsonHeaderFromFile(t *testing.T) {
tests := []struct {
name string
golden string
file string
}{
{
name: "load module header from .adoc",
golden: "json-HeaderFromADOCFile",
file: "doc.adoc",
},
{
name: "load module header from .md",
golden: "json-HeaderFromMDFile",
file... | explode_data.jsonl/40859 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 496
} | [
2830,
3393,
5014,
4047,
43633,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
3174,
813,
268,
914,
198,
197,
17661,
256,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
256,
330,
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... | 1 |
func TestBlockValidation(t *testing.T) {
viper.Set("peer.fileSystemPath", "/tmp/fabric/txvalidatortest")
ledgermgmt.InitializeTestEnv()
defer ledgermgmt.CleanupTestEnv()
gb, _ := test.MakeGenesisBlock("TestLedger")
gbHash := protoutil.BlockHeaderHash(gb.Header)
ledger, _ := ledgermgmt.CreateLedger(gb)
defer led... | explode_data.jsonl/5161 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
4713,
13799,
1155,
353,
8840,
836,
8,
341,
5195,
12858,
4202,
445,
16537,
9715,
2320,
1820,
497,
3521,
5173,
6663,
28897,
14,
3998,
1891,
266,
371,
477,
1138,
197,
50704,
12311,
2501,
45829,
2271,
14359,
741,
16867,
46933,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChatSrvDeleteConversationConfirmed(t *testing.T) {
gc := libkb.NewGlobalContext()
gc.Init()
var is fakeInboxSource
cc := globals.ChatContext{
InboxSource: is,
}
g := globals.NewContext(gc, &cc)
ui := fakeUISource{}
h := NewServer(g, nil, &ui)
var ri fakeRemoteInterface
h.setTestRemoteClient(&ri)
... | explode_data.jsonl/63717 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
15672,
50,
10553,
6435,
60313,
47948,
1155,
353,
8840,
836,
8,
341,
3174,
66,
1669,
3051,
21310,
7121,
11646,
1972,
741,
3174,
66,
26849,
741,
2405,
374,
12418,
641,
2011,
3608,
198,
63517,
1669,
37785,
58844,
1972,
515,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDialSyncCancel(t *testing.T) {
df, done, _, dcall := getMockDialFunc()
dsync := NewDialSync(df)
p := peer.ID("testpeer")
ctx1, cancel1 := context.WithCancel(context.Background())
finished := make(chan struct{})
go func() {
_, err := dsync.DialLock(ctx1, p)
if err != ctx1.Err() {
t.Error("shoul... | explode_data.jsonl/41482 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 407
} | [
2830,
3393,
35,
530,
12154,
9269,
1155,
353,
8840,
836,
8,
341,
85187,
11,
2814,
11,
8358,
294,
6659,
1669,
633,
11571,
35,
530,
9626,
2822,
2698,
12996,
1669,
1532,
35,
530,
12154,
16060,
692,
3223,
1669,
14397,
9910,
445,
1944,
1653... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogLevel(t *testing.T) {
tests := []struct {
flagVal string
want LogLevel
wantStr string
}{
{"debug", DebugLevel, "debug"},
{"Info", InfoLevel, "info"},
{"WARN", WarnLevel, "warn"},
{"warning", WarnLevel, "warn"},
{"Error", ErrorLevel, "error"},
{"fatal", FatalLevel, "fatal"},
}
for _... | explode_data.jsonl/81849 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 280
} | [
2830,
3393,
72676,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
30589,
2208,
914,
198,
197,
50780,
262,
63321,
198,
197,
50780,
2580,
914,
198,
197,
59403,
197,
197,
4913,
8349,
497,
11091,
4449,
11,
330,
8349,
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... | 5 |
func TestHTTPRateLimit(t *testing.T) {
t.Parallel()
reg := apiRegMutWrapper{mut: &http.ServeMux{}}
rlConf := ratelimit.NewConfig()
rlConf.Type = ratelimit.TypeLocal
rlConf.Local.Count = 1
rlConf.Local.Interval = "60s"
mgrConf := manager.NewConfig()
mgrConf.RateLimits["foorl"] = rlConf
mgr, err := manager.Ne... | explode_data.jsonl/40361 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 684
} | [
2830,
3393,
9230,
11564,
16527,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
37013,
1669,
6330,
3477,
51440,
11542,
90,
6984,
25,
609,
1254,
83535,
44,
2200,
6257,
630,
197,
2381,
15578,
1669,
11244,
301,
2353,
7121,
2648,
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... | 5 |
func TestTopDownUnsupportedBuiltin(t *testing.T) {
ast.RegisterBuiltin(&ast.Builtin{
Name: "unsupported_builtin",
})
body := ast.MustParseBody(`unsupported_builtin()`)
ctx := context.Background()
compiler := ast.NewCompiler()
store := inmem.New()
txn := storage.NewTransactionOrDie(ctx, store)
q := NewQuery(... | explode_data.jsonl/25228 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 206
} | [
2830,
3393,
5366,
4454,
41884,
33,
25628,
1155,
353,
8840,
836,
8,
1476,
88836,
19983,
33,
25628,
2099,
559,
1785,
25628,
515,
197,
21297,
25,
330,
81145,
73829,
756,
197,
8824,
35402,
1669,
11763,
50463,
14463,
5444,
5809,
81145,
73829,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateDMSSession(t *testing.T) {
testAWSClient(
t,
"DMS",
func(t *testing.T, s *session.Session, region *string, role Role, fips bool) {
iface := createDMSSession(s, region, role, fips)
if iface == nil {
t.Fail()
}
})
} | explode_data.jsonl/18789 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
4021,
8395,
1220,
1338,
1155,
353,
8840,
836,
8,
341,
18185,
36136,
2959,
1006,
197,
3244,
345,
197,
197,
61428,
4826,
756,
197,
29244,
1155,
353,
8840,
836,
11,
274,
353,
5920,
20674,
11,
5537,
353,
917,
11,
3476,
15404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCachedDialer(t *testing.T) {
logger := golog.NewTestLogger(t)
rpcServer1, err := server.New(logger)
test.That(t, err, test.ShouldBeNil)
rpcServer2, err := server.New(logger)
test.That(t, err, test.ShouldBeNil)
es := echoserver.Server{}
err = rpcServer1.RegisterServiceServer(
context.Background(),
&... | explode_data.jsonl/35828 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 964
} | [
2830,
3393,
70293,
35,
530,
261,
1155,
353,
8840,
836,
8,
341,
17060,
1669,
342,
1609,
7121,
2271,
7395,
1155,
340,
7000,
3992,
5475,
16,
11,
1848,
1669,
3538,
7121,
37833,
340,
18185,
32761,
1155,
11,
1848,
11,
1273,
86981,
19064,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHelm3CRD(t *testing.T) {
SkipOnEnv(t, "HELM")
Given(t).
Path("helm3-crd").
When().
Create().
Sync().
Then().
Expect(SyncStatusIs(SyncStatusCodeSynced)).
Expect(ResourceSyncStatusIs("CustomResourceDefinition", "crontabs.stable.example.com", SyncStatusCodeSynced))
} | explode_data.jsonl/69416 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 116
} | [
2830,
3393,
39,
23162,
18,
8973,
35,
1155,
353,
8840,
836,
8,
341,
7568,
13389,
1925,
14359,
1155,
11,
330,
1799,
10994,
1138,
9600,
2071,
1155,
4292,
197,
69640,
445,
51899,
18,
1786,
6498,
38609,
197,
197,
4498,
25829,
197,
75569,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.