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 TestValidFunc(t *testing.T) {
var err error
var conv = &KConv
method := KDbug.GetMethod(conv, "BaseConvert")
//不存在的方法
_, _, err = ValidFunc("test", "echo")
if err == nil {
t.Error("ValidFunc fail")
return
}
//参数数量不足
_, _, err = ValidFunc(method, "12345")
if err == nil {
t.Error("ValidFunc fail")
... | explode_data.jsonl/74247 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
4088,
9626,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
2405,
5686,
284,
609,
42,
34892,
198,
42257,
1669,
62990,
2313,
2234,
3523,
54995,
11,
330,
3978,
12012,
5130,
197,
322,
69184,
104339,
198,
197,
6878,
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... | 4 |
func TestOpenRetries(t *testing.T) {
// Can't force a permission denied error if run as root.
u, err := user.Current()
if err != nil {
t.Skip(fmt.Sprintf("Couldn't determine current user id: %s", err))
}
if u.Uid == "0" {
t.Skip("Skipping test when run as root")
}
tmpDir, rmTmpDir := testutil.TestTempDir(t)... | explode_data.jsonl/76854 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 264
} | [
2830,
3393,
5002,
12020,
4019,
1155,
353,
8840,
836,
8,
341,
197,
322,
2980,
944,
5344,
264,
7882,
14820,
1465,
421,
1598,
438,
3704,
624,
10676,
11,
1848,
1669,
1196,
11517,
741,
743,
1848,
961,
2092,
341,
197,
3244,
57776,
28197,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestParseOsdDump(t *testing.T) {
c := &Ceph{Log: testutil.Logger{}}
dump, err := c.parseDump(osdPerfDump)
require.NoError(t, err)
require.InEpsilon(t, 552132.109360000, dump["filestore"]["commitcycle_interval.sum"], epsilon)
require.Equal(t, float64(0), dump["mutex-FileJournal::finisher_lock"]["wait.avgcount"... | explode_data.jsonl/40221 | {
"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,
14463,
46,
13446,
51056,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
609,
34,
23544,
90,
2201,
25,
1273,
1314,
12750,
6257,
532,
2698,
1510,
11,
1848,
1669,
272,
4632,
51056,
9638,
67,
3889,
69,
51056,
340,
17957,
35699,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSetFromMap(t *testing.T) {
tests := []struct {
name string
setMap map[string]bool
wantStr string
}{
{
name: "set multiple features",
setMap: map[string]bool{
"a": true,
"b": false,
},
wantStr: "a=true,b=false",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *test... | explode_data.jsonl/34558 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
1649,
3830,
2227,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
8196,
2227,
220,
2415,
14032,
96436,
198,
197,
50780,
2580,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestParse(t *testing.T) {
type args struct {
s string
}
tests := []struct {
name string
args args
want *Traceparent
wantErr bool
}{
{"ok", args{"01-00010203040506070809000102030405-0607080900010203-00"}, &Traceparent{
version: TraceVersion,
traceID: [16]byte{0, 1, 2, 3, 4, 5, 6... | explode_data.jsonl/35200 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 847
} | [
2830,
3393,
14463,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1903,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
198,
197,
50780,
262,
353,
6550,
3765,
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 TestAppCreation(t *testing.T) {
ctx := Given(t)
ctx.
Path(guestbookPath).
When().
Create().
Then().
Expect(SyncStatusIs(SyncStatusCodeOutOfSync)).
And(func(app *Application) {
assert.Equal(t, Name(), app.Name)
assert.Equal(t, RepoURL(RepoURLTypeFile), app.Spec.Source.RepoURL)
assert.Equal(t... | explode_data.jsonl/66666 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 572
} | [
2830,
3393,
2164,
32701,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
16246,
1155,
692,
20985,
624,
197,
69640,
3268,
3045,
2190,
1820,
4292,
197,
197,
4498,
25829,
197,
75569,
25829,
197,
197,
12209,
25829,
197,
35911,
3759,
1721,
2522,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTxnEventMarshalWithApdex(t *testing.T) {
e := sampleTxnEvent
e.Zone = ApdexFailing
testTxnEventJSON(t, &e, `[
{
"type":"Transaction",
"name":"myName",
"timestamp":1.488393111e+09,
"nr.apdexPerfZone":"F",
"error":false,
"duration":2,
"totalTime":3,
"guid":"txn-id",
"traceId":"txn-id",
"p... | explode_data.jsonl/37458 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
31584,
77,
1556,
55438,
2354,
10611,
91769,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
6077,
31584,
77,
1556,
198,
7727,
13476,
603,
284,
5232,
91769,
37,
14277,
198,
18185,
31584,
77,
1556,
5370,
1155,
11,
609,
68,
11,
156... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLatestDockerVersionPushed(t *testing.T) {
if testing.Short() {
t.Skip("Skipping due to network request against dockerhub")
}
url := fmt.Sprintf("https://index.docker.io/v1/repositories/sourcegraph/server/tags/%s", latestReleaseDockerServerImageBuild.Version)
resp, err := http.Get(url)
if err != nil {
... | explode_data.jsonl/3330 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 212
} | [
2830,
3393,
31992,
35,
13659,
5637,
16644,
291,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
85945,
4152,
311,
3922,
1681,
2348,
26588,
26682,
1138,
197,
630,
19320,
1669,
8879,
17305,
445,
2428,
1110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCertTypes(t *testing.T) {
for keyType, key := range testPublicKeys {
cert := &ssh.Certificate{
ValidPrincipals: []string{"gopher1"},
ValidAfter: 0,
ValidBefore: ssh.CertTimeInfinity,
Key: key,
Serial: 1,
CertType: ssh.UserCert,
SignatureKey: testP... | explode_data.jsonl/68411 | {
"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,
36934,
4173,
1155,
353,
8840,
836,
8,
341,
2023,
1376,
929,
11,
1376,
1669,
2088,
1273,
12676,
8850,
341,
197,
1444,
529,
1669,
609,
25537,
727,
20962,
515,
298,
197,
4088,
3533,
5706,
1127,
25,
3056,
917,
4913,
70,
16940,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBoolInt_UnmarshalJSON_GotInt(t *testing.T) {
var sampleOut struct {
Val BoolInt `json:"val"`
}
var sampleIn = []byte(`{"val":123456789}`)
json.Unmarshal(sampleIn, &sampleOut)
if sampleOut.Val.Flag {
t.Error("should be false but got true")
}
if sampleOut.Val.Value == nil {
t.Fatalf("should be 123... | explode_data.jsonl/31042 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
11233,
1072,
40687,
27121,
5370,
2646,
354,
1072,
1155,
353,
8840,
836,
8,
341,
2405,
6077,
2662,
2036,
341,
197,
197,
2208,
12608,
1072,
1565,
2236,
2974,
831,
8805,
197,
532,
2405,
6077,
641,
284,
3056,
3782,
5809,
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 TestStatementMode(t *testing.T) {
if testing.Short() {
t.Skip()
}
execStatements(t, []string{
"create table stream1(id int, val varbinary(128), primary key(id))",
"create table stream2(id int, val varbinary(128), primary key(id))",
})
engine.se.Reload(context.Background())
defer execStatements(t, []s... | explode_data.jsonl/10426 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 393
} | [
2830,
3393,
8636,
3636,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
532,
67328,
93122,
1155,
11,
3056,
917,
515,
197,
197,
1,
3182,
1965,
4269,
16,
3724,
526,
11,
1044,
762,
25891,
7,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestBuildTiFlashSidecarContainers(t *testing.T) {
g := NewGomegaWithT(t)
type testcase struct {
name string
flashConfig *v1alpha1.TiFlashConfig
expect []corev1.Container
resource bool
}
tests := []*testcase{
{
name: "nil config",
flashConfig: nil,
expect: default... | explode_data.jsonl/76413 | {
"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,
11066,
45351,
23876,
16384,
6918,
74632,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
692,
13158,
70080,
2036,
341,
197,
11609,
286,
914,
198,
197,
94170,
2648,
353,
85,
16,
7141,
16,
836,
72,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadJSON(t *testing.T) {
writer := iwriter.New(client, testDB)
id1, err := idProvider.ID()
require.Nil(t, err, fmt.Sprintf("got unexpected error: %s", err))
m := json.Message{
Channel: id1,
Publisher: id1,
Created: time.Now().UnixNano(),
Subtopic: "subtopic/format/some_json",
Protocol: "co... | explode_data.jsonl/82480 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1536
} | [
2830,
3393,
4418,
5370,
1155,
353,
8840,
836,
8,
341,
38959,
1669,
600,
18189,
7121,
12805,
11,
1273,
3506,
692,
15710,
16,
11,
1848,
1669,
877,
5179,
9910,
741,
17957,
59678,
1155,
11,
1848,
11,
8879,
17305,
445,
22390,
16500,
1465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetKeyWhenFindObjectForPrivateKeyFails(t *testing.T) {
s, ctx := newSessionWithMock()
pubKey := &rsa.PublicKey{N: big.NewInt(1), E: 1}
// test newSigner fails when FindObject for private key fails
ctx.GetAttributeValueFunc = func(pkcs11.SessionHandle, pkcs11.ObjectHandle, []*pkcs11.Attribute) ([]*pkcs11.A... | explode_data.jsonl/1166 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 394
} | [
2830,
3393,
1949,
1592,
4498,
80835,
2461,
75981,
37,
6209,
1155,
353,
8840,
836,
8,
341,
1903,
11,
5635,
1669,
501,
5283,
2354,
11571,
741,
62529,
1592,
1669,
609,
60869,
49139,
1592,
90,
45,
25,
2409,
7121,
1072,
7,
16,
701,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSpanFinishTwice(t *testing.T) {
assert := assert.New(t)
wait := time.Millisecond * 2
tracer, _, _, stop := startTestTracer(t)
defer stop()
assert.Equal(tracer.payload.itemCount(), 0)
// the finish must be idempotent
span := tracer.newRootSpan("pylons.request", "pylons", "/")
time.Sleep(wait)
span.F... | explode_data.jsonl/42838 | {
"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,
12485,
25664,
22816,
558,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
48750,
1669,
882,
71482,
353,
220,
17,
271,
25583,
9584,
11,
8358,
8358,
2936,
1669,
1191,
2271,
1282,
9584,
1155,
340,
16867,
2936,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldNotRefreshUserGroupsFromBackendWhenDisabled(t *testing.T) {
mock := mocks.NewMockAutheliaCtx(t)
defer mock.Close()
// Setup user john.
user := &authentication.UserDetails{
Username: "john",
Groups: []string{
"admin",
"users",
},
Emails: []string{
"john@example.com",
},
}
mock.U... | explode_data.jsonl/20202 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 474
} | [
2830,
3393,
14996,
2623,
14567,
1474,
22173,
3830,
29699,
4498,
25907,
1155,
353,
8840,
836,
8,
341,
77333,
1669,
68909,
7121,
11571,
5087,
35929,
23684,
1155,
340,
16867,
7860,
10421,
2822,
197,
322,
18626,
1196,
39642,
624,
19060,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWithin(t *testing.T) {
t.Parallel()
for i, test := range []struct {
s []float64
v float64
idx int
panics bool
}{
{
s: []float64{1, 2, 5, 9},
v: 1,
idx: 0,
},
{
s: []float64{1, 2, 5, 9},
v: 9,
idx: -1,
},
{
s: []float64{1, 2, 5, 9},
v: 1.5,
... | explode_data.jsonl/1244 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 748
} | [
2830,
3393,
41961,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2023,
600,
11,
1273,
1669,
2088,
3056,
1235,
341,
197,
1903,
414,
3056,
3649,
21,
19,
198,
197,
5195,
414,
2224,
21,
19,
198,
197,
62077,
262,
526,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetIndex(t *testing.T) {
req, err := http.NewRequest("GET", "/", nil)
if err != nil {
log.Fatal(err)
}
w := httptest.NewRecorder()
indexHandler(w, req)
assertStringEquals(t, "200", fmt.Sprintf("%d", w.Code))
assertStringEquals(t, "text/html; charset=utf-8", w.Header().Get("Content-Type"))
assertSt... | explode_data.jsonl/25588 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
1949,
1552,
1155,
353,
8840,
836,
8,
341,
24395,
11,
1848,
1669,
1758,
75274,
445,
3806,
497,
64657,
2092,
340,
743,
1848,
961,
2092,
341,
197,
6725,
26133,
3964,
340,
197,
630,
6692,
1669,
54320,
70334,
7121,
47023,
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... | 2 |
func TestPathFilter(t *testing.T) {
type resultDesc struct {
path string
match bool
}
type testDesc struct {
filter string
result []resultDesc
}
testData := []testDesc{
{
filter: "Sensors.Vehicle.Door",
result: []resultDesc{
{"Sensors.Vehicle.Door", true},
{"Sensors.Vehicle.DoorFront", f... | explode_data.jsonl/26926 | {
"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,
1820,
5632,
1155,
353,
8840,
836,
8,
341,
13158,
1102,
11065,
2036,
341,
197,
26781,
220,
914,
198,
197,
47706,
1807,
198,
197,
630,
13158,
1273,
11065,
2036,
341,
197,
50108,
914,
198,
197,
9559,
3056,
1382,
11065,
198,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestSetInstanceSysvarBySetGlobalSysVar(t *testing.T) {
varName := "tidb_general_log"
defaultValue := "OFF" // This is the default value for tidb_general_log
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
se := tk.Session().(... | explode_data.jsonl/5806 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 501
} | [
2830,
3393,
1649,
2523,
32792,
947,
1359,
1649,
11646,
32792,
3962,
1155,
353,
8840,
836,
8,
341,
2405,
675,
1669,
330,
24449,
65,
39177,
5224,
698,
11940,
1130,
1669,
330,
27068,
1,
442,
1096,
374,
279,
1638,
897,
369,
13112,
65,
391... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExportKeyingMaterial(t *testing.T) {
// Check for leaking routines
report := test.CheckRoutines(t)
defer report()
var rand [28]byte
exportLabel := "EXTRACTOR-dtls_srtp"
expectedServerKey := []byte{0x61, 0x09, 0x9d, 0x7d, 0xcb, 0x08, 0x52, 0x2c, 0xe7, 0x7b}
expectedClientKey := []byte{0x87, 0xf0, 0x40,... | explode_data.jsonl/40931 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 843
} | [
2830,
3393,
16894,
1592,
287,
13415,
1155,
353,
8840,
836,
8,
341,
197,
322,
4248,
369,
51829,
29497,
198,
69931,
1669,
1273,
10600,
49,
28628,
1155,
340,
16867,
1895,
2822,
2405,
10382,
508,
17,
23,
90184,
198,
59440,
2476,
1669,
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... | 9 |
func TestGetPostsForChannel(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
Client := th.Client
post1 := th.CreatePost()
post2 := th.CreatePost()
post3 := &model.Post{ChannelId: th.BasicChannel.Id, Message: "zz" + model.NewId() + "a", RootId: post1.Id}
post3, _ = Client.CreatePost(post3)
time.S... | explode_data.jsonl/5249 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2221
} | [
2830,
3393,
1949,
19631,
2461,
9629,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
271,
51172,
16,
1669,
270,
7251,
4133,
741,
51172,
17,
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 TestOverloadOp(t *testing.T) {
gopClTest(t, `
type foo struct {
}
func (a *foo) + (b *foo) *foo {
println("a + b")
return &foo{}
}
func (a foo) - (b foo) foo {
println("a - b")
return foo{}
}
func -(a foo) {
println("-a")
}
func ++(a foo) {
println("a++")
}
func (a foo) != (b foo) bool{
println("a!=b"... | explode_data.jsonl/73665 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 437
} | [
2830,
3393,
1918,
1078,
7125,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
22074,
1313,
15229,
2036,
341,
630,
2830,
320,
64,
353,
7975,
8,
488,
320,
65,
353,
7975,
8,
353,
7975,
341,
81168,
445,
64,
488,
293,
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 TestCreateLedgerUnsupportedAlgo(t *testing.T) {
kb := NewInMemory()
_, err := kb.CreateLedger("some_account", Ed25519, "libonomy", 0, 1)
assert.Error(t, err)
assert.Equal(t, "unsupported signing algo: only secp256k1 is supported", err.Error())
} | explode_data.jsonl/31112 | {
"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,
4021,
60850,
1389,
41884,
2101,
3346,
1155,
353,
8840,
836,
8,
341,
16463,
65,
1669,
1532,
641,
10642,
741,
197,
6878,
1848,
1669,
38653,
7251,
60850,
1389,
445,
14689,
13500,
497,
3199,
17,
20,
20,
16,
24,
11,
330,
2740,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteLabelValuesWithCollisions(t *testing.T) {
vec := NewGaugeVec(
GaugeOpts{
Name: "test",
Help: "helpless",
},
[]string{"l1", "l2"},
)
vec.hashAdd = func(h uint64, s string) uint64 { return 1 }
vec.hashAddByte = func(h uint64, b byte) uint64 { return 1 }
testDeleteLabelValues(t, vec)
} | explode_data.jsonl/14621 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
6435,
2476,
6227,
2354,
15265,
6805,
1155,
353,
8840,
836,
8,
341,
40213,
1669,
1532,
38,
19392,
10050,
1006,
197,
9600,
19392,
43451,
515,
298,
21297,
25,
330,
1944,
756,
298,
197,
12689,
25,
330,
8653,
1717,
756,
197,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCannotMatchArgon2idParamPattern(t *testing.T) {
ok, err := CheckPassword("password", "$argon2id$v=19$m65536,t3,p2$BpLnfgDsc2WD8F2q$o/vzA4myCqZZ36bUGsDY//8mKUYNZZaR0t4MFFSs+iM")
assert.EqualError(t, err, "Hash key is not the last parameter, the hash is likely malformed ($argon2id$v=19$m65536,t3,p2$BpLnfgDsc2... | explode_data.jsonl/40191 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
17444,
8331,
2735,
263,
17,
307,
2001,
15760,
1155,
353,
8840,
836,
8,
341,
59268,
11,
1848,
1669,
4248,
4876,
445,
3833,
497,
5201,
70821,
17,
307,
65020,
28,
16,
24,
53516,
21,
20,
20,
18,
21,
13960,
18,
7237,
17,
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 TestEncode(t *testing.T) {
as := assert.New(t)
data := []struct {
in string
expect string
}{
{in: "あいうえお", expect: "杮杮杮柿柿柿杮杮杮柿柿柿柿柿柿杮杮柿柿柿柿柿杮柿杮杮杮柿柿柿杮杮杮柿柿柿柿柿柿杮杮柿柿柿柿杮柿柿杮杮杮柿柿柿杮杮杮柿柿柿柿柿柿杮杮柿柿柿柿杮杮柿杮杮杮柿柿柿杮杮杮柿柿柿柿柿柿杮杮柿柿柿杮柿柿柿杮杮杮柿柿柿杮杮杮柿柿柿柿柿柿杮杮柿柿柿杮柿杮柿"},
{in: "abc", expect: "柿杮杮柿柿柿柿杮柿杮杮柿柿柿杮柿柿杮杮柿柿柿杮杮"},
}
for _... | explode_data.jsonl/34457 | {
"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,
32535,
1155,
353,
8840,
836,
8,
341,
60451,
1669,
2060,
7121,
1155,
692,
8924,
1669,
3056,
1235,
341,
197,
17430,
257,
914,
198,
197,
24952,
914,
198,
197,
59403,
197,
197,
90,
258,
25,
330,
29491,
94504,
57842,
32234,
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 TestInstructionsString(t *testing.T) {
instructions := []Instructions{
Make(OpConstant, 1),
Make(OpConstant, 2),
Make(OpConstant, 65535),
}
expected := `0000 OpConstant 1
0003 OpConstant 2
0006 OpConstant 65535
`
concatenated := Instructions{}
for _, ins := range instructions {
concatenated = append... | explode_data.jsonl/66359 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
55291,
703,
1155,
353,
8840,
836,
8,
341,
17430,
19657,
1669,
3056,
55291,
515,
197,
197,
8078,
54494,
15472,
11,
220,
16,
1326,
197,
197,
8078,
54494,
15472,
11,
220,
17,
1326,
197,
197,
8078,
54494,
15472,
11,
220,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestContainerTypePodSandbox(t *testing.T) {
var ociSpec specs.Spec
ociSpec.Annotations = map[string]string{
annotations.ContainerType: annotations.ContainerTypeSandbox,
}
testContainerTypeSuccessful(t, ociSpec, vc.PodSandbox)
} | explode_data.jsonl/44040 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
4502,
929,
23527,
50,
31536,
1155,
353,
8840,
836,
8,
341,
2405,
93975,
8327,
32247,
36473,
271,
197,
2119,
8327,
91172,
284,
2415,
14032,
30953,
515,
197,
197,
39626,
33672,
929,
25,
32207,
33672,
929,
50,
31536,
345,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestObjectDeleteMarkers(t *testing.T) {
s := RunBasicJetStreamServer()
defer shutdown(s)
nc, js := jsClient(t, s)
defer nc.Close()
obs, err := js.CreateObjectStore(&nats.ObjectStoreConfig{Bucket: "OBJS"})
expectOk(t, err)
msg := bytes.Repeat([]byte("A"), 100)
_, err = obs.PutBytes("A", msg)
expectOk(t,... | explode_data.jsonl/75492 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 308
} | [
2830,
3393,
1190,
6435,
82405,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
6452,
15944,
35641,
3027,
5475,
741,
16867,
23766,
1141,
692,
197,
1016,
11,
6994,
1669,
6994,
2959,
1155,
11,
274,
340,
16867,
25126,
10421,
2822,
197,
5481,
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 TestClusterReconciler_machineToCluster(t *testing.T) {
cluster := &clusterv1.Cluster{
TypeMeta: metav1.TypeMeta{
Kind: "Cluster",
},
ObjectMeta: metav1.ObjectMeta{
Name: "test-cluster",
Namespace: "test",
},
Spec: clusterv1.ClusterSpec{},
Status: clusterv1.ClusterStatus{},
}
control... | explode_data.jsonl/71243 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1463
} | [
2830,
3393,
28678,
693,
40446,
5769,
38695,
1249,
28678,
1155,
353,
8840,
836,
8,
341,
197,
18855,
1669,
609,
564,
590,
648,
16,
72883,
515,
197,
27725,
12175,
25,
77520,
16,
10184,
12175,
515,
298,
197,
10629,
25,
330,
28678,
756,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestHeadTracker_Save_InsertsAndTrimsTable(t *testing.T) {
t.Parallel()
db := pgtest.NewGormDB(t)
config := newCfg(t)
ethClient := cltest.NewEthClientMockWithDefaultChain(t)
orm := headtracker.NewORM(db, cltest.FixtureChainID)
for idx := 0; idx < 200; idx++ {
assert.Nil(t, orm.IdempotentInsertHead(contex... | explode_data.jsonl/63746 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 317
} | [
2830,
3393,
12346,
31133,
78746,
76417,
82,
3036,
1282,
5742,
2556,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20939,
1669,
17495,
1944,
7121,
38,
493,
3506,
1155,
340,
25873,
1669,
501,
42467,
1155,
692,
197,
769,
2959,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestEigen(t *testing.T) {
vs := []struct {
ax, ay, az float64
}{
{90, 0, 0},
{0, 90, 0},
{0, 0, 90},
{10, 10, 10},
{10, 9, 8},
{1, 2, 4},
{1, -2, 4},
}
for i, v := range vs {
r := RX(Degrees(v.ax)).XM(RY(Degrees(v.ay))).XM(RZ(Degrees(v.az)))
s, v, a, err := r.Eigen()
if err != nil {
t... | explode_data.jsonl/47412 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 446
} | [
2830,
3393,
71740,
1155,
353,
8840,
836,
8,
341,
5195,
82,
1669,
3056,
1235,
341,
197,
70368,
11,
18898,
11,
12376,
2224,
21,
19,
198,
197,
59403,
197,
197,
90,
24,
15,
11,
220,
15,
11,
220,
15,
1583,
197,
197,
90,
15,
11,
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... | 7 |
func TestNotifications(t *testing.T) {
Convey("Given the notifications service", t, func() {
//bus.ClearBusHandlers()
setting.StaticRootPath = "../../../public/"
setting.Smtp.Enabled = true
setting.Smtp.TemplatesPattern = "emails/*.html"
setting.Smtp.FromAddress = "from@address.com"
err := Init()
So(e... | explode_data.jsonl/67645 | {
"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,
34736,
1155,
353,
8840,
836,
8,
1476,
93070,
5617,
445,
22043,
279,
21969,
2473,
497,
259,
11,
2915,
368,
341,
197,
197,
322,
10338,
13524,
15073,
39949,
2822,
197,
8196,
1280,
58826,
8439,
1820,
284,
30630,
888,
29555,
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 TestRouterStaticPcre(t *testing.T) {
s, c := initial(t)
defer s.Stop()
router := rstatic.NewRouter(
router.WithHandler(rpc.Handler),
router.WithRegistry(s.Options().Registry),
)
err := router.Register(&api.Endpoint{
Name: "foo.Test.Call",
Method: []string{"POST"},
Path: []string{"^/api/v0/t... | explode_data.jsonl/58077 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 417
} | [
2830,
3393,
9523,
11690,
47,
837,
1155,
353,
8840,
836,
8,
341,
1903,
11,
272,
1669,
2856,
1155,
340,
16867,
274,
30213,
2822,
67009,
1669,
435,
1978,
7121,
9523,
1006,
197,
67009,
26124,
3050,
2601,
3992,
31010,
1326,
197,
67009,
26124... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatInRange(t *testing.T) {
mat1 := NewMatWithSize(101, 102, MatTypeCV8U)
lb := NewMatFromScalar(NewScalar(20.0, 100.0, 100.0, 0.0), MatTypeCV8U)
ub := NewMatFromScalar(NewScalar(20.0, 100.0, 100.0, 0.0), MatTypeCV8U)
dst := NewMat()
InRange(mat1, lb, ub, &dst)
if dst.Empty() {
t.Error("TestMatAddWeight... | explode_data.jsonl/81708 | {
"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,
11575,
76059,
1155,
353,
8840,
836,
8,
341,
59874,
16,
1669,
1532,
11575,
2354,
1695,
7,
16,
15,
16,
11,
220,
16,
15,
17,
11,
6867,
929,
19589,
23,
52,
340,
8810,
65,
1669,
1532,
11575,
3830,
20639,
35063,
20639,
7,
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... | 2 |
func TestFindCoordinatorResponse(t *testing.T) {
t.Parallel()
errMsg := "kaboom"
for _, tc := range []struct {
desc string
response *FindCoordinatorResponse
encoded []byte
}{{
desc: "version 0 - no error",
response: &FindCoordinatorResponse{
Version: 0,
Err: ErrNoError,
Coordinator: &Br... | explode_data.jsonl/20486 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 893
} | [
2830,
3393,
9885,
64304,
2582,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
9859,
6611,
1669,
330,
74,
370,
4191,
1837,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
41653,
257,
914,
198,
197,
21735,
353,
9885,
64304,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNesting(t *testing.T) {
set, err := ParseDir("testdata", "*.html", nil)
if err != nil {
t.Fatal(err)
}
for _, path := range []string{
"base/dashboard.html",
"base/billing.html",
"base/docs/release.html",
"/base/dashboard.html",
"/base/billing.html",
"/base/docs/release.html",
} {
t.Run(fil... | explode_data.jsonl/13426 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 272
} | [
2830,
3393,
45,
59855,
1155,
353,
8840,
836,
8,
341,
8196,
11,
1848,
1669,
14775,
6184,
445,
92425,
497,
59128,
1551,
497,
2092,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
2023,
8358,
1815,
1669,
2088,
3056... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestDay11AroundStability(t *testing.T) {
d := &Day11{
mode: "around",
}
grid := `L.LL.LL.LL
LLLLLLL.LL
L.L.L..L..
LLLL.LL.LL
L.LL.LL.LL
L.LLLLL.LL
..L.L.....
LLLLLLLLLL
L.LLLLLL.L
L.LLLLL.LL`
assert.Equal(t, `#.#L.L#.##
#LLL#LL.L#
L.#.L..#..
#L##.##.L#
#.#L.LL.LL
#.#L#L#.##
..L.L.....
#L#L##L#L#
#.LLLLLL.L
... | explode_data.jsonl/48592 | {
"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,
10159,
16,
16,
43580,
623,
2897,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
609,
10159,
16,
16,
515,
197,
60247,
25,
330,
19454,
756,
197,
532,
49018,
1669,
1565,
43,
1214,
43,
1214,
43,
1214,
43,
198,
49356,
86708,
1214,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRuleVarcharVSChar(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := []string{
`create table t1(id int,name char(20),last_time date);`,
`create table t1(id int,name binary(20),last_time date);`,
`alter table t1 add column id int, add column name binary(20), add ... | explode_data.jsonl/76822 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 271
} | [
2830,
3393,
11337,
53,
1113,
277,
26050,
4768,
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,
63,
3182,
1965,
259,
16,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestFilterAndSort(t *testing.T) {
// Use a specific type(pool) to test unit test
type test struct {
input []*model.StoragePoolSpec
param map[string][]string
expected []*model.StoragePoolSpec
}
tests := []test{
// select by storage type
{
input: []*model.StoragePoolSpec{
&SamplePools[0],
... | explode_data.jsonl/50712 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 968
} | [
2830,
3393,
5632,
3036,
10231,
1155,
353,
8840,
836,
8,
341,
197,
322,
5443,
264,
3151,
943,
41838,
8,
311,
1273,
4982,
1273,
198,
13158,
1273,
2036,
341,
197,
22427,
262,
29838,
2528,
43771,
10551,
8327,
198,
197,
36037,
262,
2415,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestNewImageDifferentTagUpdate2(t *testing.T) {
// this buildconfig references a different tag than the one that will be updated
// it has previously run a build for the testTagID123 tag.
buildcfg := mockBuildConfig("registry.com/namespace/imagename", "registry.com/namespace/imagename", "testImageStream", "test... | explode_data.jsonl/69172 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 385
} | [
2830,
3393,
3564,
1906,
69123,
5668,
4289,
17,
1155,
353,
8840,
836,
8,
341,
197,
322,
419,
1936,
1676,
15057,
264,
2155,
4772,
1091,
279,
825,
429,
686,
387,
6049,
198,
197,
322,
432,
702,
8597,
1598,
264,
1936,
369,
279,
1273,
566... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScribeEntryUtils(t *testing.T) {
logEntries := []*protos.LogEntry{
{
Category: "test",
NormalMap: map[string]string{"status": "ACTIVE"},
IntMap: map[string]int64{"port": 443},
Time: 12345,
},
}
scribeEntries, err := exporters.ConvertToScribeLogEntries(logEntries)
assert.NoError(t,... | explode_data.jsonl/22839 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 240
} | [
2830,
3393,
50,
3114,
5874,
4209,
1155,
353,
8840,
836,
8,
1476,
6725,
24533,
1669,
29838,
4391,
436,
5247,
5874,
515,
197,
197,
515,
298,
6258,
2031,
25,
220,
330,
1944,
756,
298,
197,
12206,
2227,
25,
2415,
14032,
30953,
4913,
2829,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStellar(t *testing.T) {
accounts := make([]xdr.AccountId, 6)
for i := 0; i < len(accounts); i++ {
_, accounts[i] = testutil.GenerateAccountID(t)
}
_, src := testutil.GenerateAccountID(t)
envelope := testutil.GenerateTransactionEnvelope(
src,
1,
[]xdr.Operation{
testutil.GenerateCreateOperation... | explode_data.jsonl/11685 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 785
} | [
2830,
3393,
623,
26880,
1155,
353,
8840,
836,
8,
341,
197,
26206,
1669,
1281,
10556,
87,
3612,
30877,
764,
11,
220,
21,
340,
2023,
600,
1669,
220,
15,
26,
600,
366,
2422,
91868,
1215,
600,
1027,
341,
197,
197,
6878,
9618,
989,
60,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFindBundleCacheExists(t *testing.T) {
cfg := config.NewTestConfig(t)
home, err := cfg.Config.GetHomeDir()
require.NoError(t, err, "should have had a porter home dir")
cacheDir := filepath.Join(home, "cache")
cfg.TestContext.AddTestDirectory("testdata", cacheDir)
c := New(cfg.Config)
_, _, ok, err := c.... | explode_data.jsonl/56180 | {
"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,
9885,
8409,
8233,
15575,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
2193,
7121,
2271,
2648,
1155,
340,
197,
5117,
11,
1848,
1669,
13286,
10753,
2234,
7623,
6184,
741,
17957,
35699,
1155,
11,
1848,
11,
330,
5445,
614,
1030,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDust(t *testing.T) {
pkScript := []byte{0x76, 0xa9, 0x21, 0x03, 0x2f, 0x7e, 0x43,
0x0a, 0xa4, 0xc9, 0xd1, 0x59, 0x43, 0x7e, 0x84, 0xb9,
0x75, 0xdc, 0x76, 0xd9, 0x00, 0x3b, 0xf0, 0x92, 0x2c,
0xf3, 0xaa, 0x45, 0x28, 0x46, 0x4b, 0xab, 0x78, 0x0d,
0xba, 0x5e, 0x88, 0xac}
tests := []struct {
name s... | explode_data.jsonl/1117 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 839
} | [
2830,
3393,
35,
590,
1155,
353,
8840,
836,
8,
341,
3223,
74,
5910,
1669,
3056,
3782,
90,
15,
87,
22,
21,
11,
220,
15,
9591,
24,
11,
220,
15,
87,
17,
16,
11,
220,
15,
87,
15,
18,
11,
220,
15,
87,
17,
69,
11,
220,
15,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestJobSpecsController_Index(t *testing.T) {
t.Parallel()
app, cleanup := cltest.NewApplication()
defer cleanup()
client := app.NewHTTPClient()
j1, err := setupJobSpecsControllerIndex(app)
assert.NoError(t, err)
resp, cleanup := client.Get("/v2/specs?size=x")
defer cleanup()
cltest.AssertServerResponse... | explode_data.jsonl/53685 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 563
} | [
2830,
3393,
12245,
8327,
82,
2051,
50361,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
28236,
11,
21290,
1669,
1185,
1944,
7121,
4988,
741,
16867,
21290,
741,
25291,
1669,
906,
7121,
9230,
2959,
2822,
12428,
16,
11,
1848,
1669... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFmtDateFull(t *testing.T) {
tests := []struct {
t time.Time
expected string
}{
// {
// t: time.Date(2016, 02, 03, 9, 0, 1, 0, time.UTC),
// expected: "Wednesday, February 3, 2016",
// },
}
trans := New()
for _, tt := range tests {
s := trans.FmtDateFull(tt.t)
if s != tt.... | explode_data.jsonl/1293 | {
"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,
93322,
1916,
9432,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
3244,
286,
882,
16299,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
322,
341,
197,
197,
322,
220,
3244,
25,
286,
882,
8518,
7,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestLoggingServiceV2ListMonitoredResourceDescriptorsError(t *testing.T) {
errCode := codes.Internal
mockLogging.err = grpc.Errorf(errCode, "test error")
var request *loggingpb.ListMonitoredResourceDescriptorsRequest = &loggingpb.ListMonitoredResourceDescriptorsRequest{}
c, err := NewClient(context.Background... | explode_data.jsonl/77764 | {
"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,
34575,
1860,
53,
17,
852,
11095,
36201,
4783,
58553,
1454,
1155,
353,
8840,
836,
8,
341,
9859,
2078,
1669,
13912,
32579,
198,
77333,
34575,
18441,
284,
47900,
13080,
3964,
2078,
11,
330,
1944,
1465,
5130,
2405,
1681,
353,
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... | 3 |
func TestBackup_MakeBackup(t *testing.T) {
loc := "/tmp/remark-backups.test"
defer os.RemoveAll(loc)
assert.NoError(t, os.MkdirAll(loc, 0o700))
bk := AutoBackup{BackupLocation: loc, SiteID: "site1", KeepMax: 3, Exporter: &mockExporter{}}
fname, err := bk.makeBackup()
assert.NoError(t, err)
expFile := fmt.Sprint... | explode_data.jsonl/40477 | {
"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,
56245,
1245,
726,
56245,
1155,
353,
8840,
836,
8,
341,
71128,
1669,
3521,
5173,
14,
37448,
15461,
8602,
5958,
698,
16867,
2643,
84427,
22649,
340,
6948,
35699,
1155,
11,
2643,
1321,
12438,
2403,
22649,
11,
220,
15,
78,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBoolSlice(t *testing.T) {
val := bool(true)
m := map[string]interface{}{"value": []bool{val}, "nothing": nil}
assert.Equal(t, val, New(m).Get("value").BoolSlice()[0])
assert.Equal(t, val, New(m).Get("value").MustBoolSlice()[0])
assert.Equal(t, []bool(nil), New(m).Get("nothing").BoolSlice())
assert.Equal... | explode_data.jsonl/23401 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 198
} | [
2830,
3393,
11233,
33236,
1155,
353,
8840,
836,
8,
1476,
19302,
1669,
1807,
3715,
340,
2109,
1669,
2415,
14032,
31344,
6257,
4913,
957,
788,
3056,
2641,
90,
831,
2137,
330,
41212,
788,
2092,
532,
6948,
12808,
1155,
11,
1044,
11,
1532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRoundRobinLoadBalancer_OneOf(t *testing.T) {
var lb cluster.LoadBalancer = cluster.NewRoundRobinLoadBalancer()
targetAddrs := []cluster.Address{"a:5071", "b:5701", "c:5701", "a:5071", "b:5701"}
var addrs []cluster.Address
for i := 0; i < 5; i++ {
addrs = append(addrs, lb.OneOf([]cluster.Address{"a:5071",... | explode_data.jsonl/62449 | {
"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,
27497,
76671,
5879,
93825,
68201,
2124,
1155,
353,
8840,
836,
8,
341,
2405,
18866,
10652,
13969,
93825,
284,
10652,
7121,
27497,
76671,
5879,
93825,
741,
28861,
2212,
5428,
1669,
3056,
18855,
26979,
4913,
64,
25,
20,
15,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMarathonSDRunAndStop(t *testing.T) {
ch, md := newTestDiscovery(func(url string) (*AppList, error) {
return marathonTestAppList(marathonValidLabel, 1), nil
})
md.RefreshInterval = time.Millisecond * 10
ctx, cancel := context.WithCancel(context.Background())
go func() {
select {
case <-ch:
cancel... | explode_data.jsonl/65406 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
12061,
23941,
5491,
6727,
3036,
10674,
1155,
353,
8840,
836,
8,
341,
23049,
11,
10688,
1669,
501,
2271,
67400,
18552,
6522,
914,
8,
4609,
2164,
852,
11,
1465,
8,
341,
197,
853,
44696,
2271,
2164,
852,
1255,
277,
23941,
408... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseFloat64OrReturnBadRequest(t *testing.T) {
t.Parallel()
w := httptest.NewRecorder()
_, ok := rest.ParseFloat64OrReturnBadRequest(w, "100", 0)
require.True(t, ok)
require.Equal(t, http.StatusOK, w.Result().StatusCode) //nolint:bodyclose
w = httptest.NewRecorder()
_, ok = rest.ParseFloat64OrReturnBad... | explode_data.jsonl/55933 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 268
} | [
2830,
3393,
14463,
5442,
21,
19,
2195,
5598,
46015,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
6692,
1669,
54320,
70334,
7121,
47023,
741,
197,
6878,
5394,
1669,
2732,
8937,
5442,
21,
19,
2195,
5598,
46015,
3622,
11,
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... | 1 |
func TestGetCheckpointSegmentsAndEncoding(t *testing.T) {
t.Run("successfully get the GUC values", func(t *testing.T) {
dbConn, sqlMock := testhelper.CreateAndConnectMockDB(1)
checkpointRow := sqlmock.NewRows([]string{"string"}).AddRow(driver.Value("8"))
encodingRow := sqlmock.NewRows([]string{"string"}).AddRow... | explode_data.jsonl/11385 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 312
} | [
2830,
3393,
1949,
92688,
64813,
3036,
14690,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
60505,
633,
279,
479,
5459,
2750,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
20939,
9701,
11,
5704,
11571,
1669,
1273,
18764,
7251,
3036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue18744(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec(`use test;`)
tk.MustExec(`drop table if exists t, t1;`)
tk.MustExec(`CREATE TABLE t (
id int(11) NOT NULL,
a bigint(20) DEFAULT NULL,
b char(20) DEFAULT NULL,
c date... | explode_data.jsonl/38155 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 811
} | [
2830,
3393,
42006,
16,
23,
22,
19,
19,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCreateStreamInsufficientReplicas(t *testing.T) {
defer cleanupStorage(t)
// Use a central NATS server.
ns := natsdTest.RunDefaultServer()
defer ns.Shutdown()
// Configure server.
s1Config := getTestConfig("a", true, 5050)
s1 := runServerWithConfig(t, s1Config)
defer s1.Stop()
getMetadataLeader(t, 1... | explode_data.jsonl/34462 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 204
} | [
2830,
3393,
4021,
3027,
15474,
26683,
18327,
52210,
1155,
353,
8840,
836,
8,
341,
16867,
21290,
5793,
1155,
692,
197,
322,
5443,
264,
8622,
18248,
50,
3538,
624,
84041,
1669,
308,
1862,
67,
2271,
16708,
3675,
5475,
741,
16867,
12268,
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 TestSharingValuesAmongContextsInAnIsolate(t *testing.T) {
t.Parallel()
iso := NewIsolate()
ctx1, ctx2 := iso.NewContext(), iso.NewContext()
// Create a value in ctx1
foo, err := ctx1.Eval(`foo = {x:6,y:true,z:"asdf"}; foo`, "ctx1.js")
if err != nil {
t.Fatal(err)
}
// Set that value into ctx2
err = c... | explode_data.jsonl/81576 | {
"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,
83756,
6227,
33610,
1972,
82,
641,
2082,
3872,
33066,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
15420,
1669,
1532,
3872,
33066,
741,
20985,
16,
11,
5635,
17,
1669,
33456,
7121,
1972,
1507,
33456,
7121,
1972,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetIPCMode(t *testing.T) {
// test false
pod := &api.Pod{}
ipcMode := getIPCMode(pod)
if ipcMode != "" {
t.Errorf("expected empty ipc mode for pod but got %v", ipcMode)
}
// test true
pod.Spec.SecurityContext = &api.PodSecurityContext{}
pod.Spec.SecurityContext.HostIPC = true
ipcMode = getIPCMode(... | explode_data.jsonl/31181 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 167
} | [
2830,
3393,
1949,
62119,
3636,
1155,
353,
8840,
836,
8,
341,
197,
322,
1273,
895,
198,
3223,
347,
1669,
609,
2068,
88823,
16094,
46531,
66,
3636,
1669,
633,
62119,
3636,
1295,
347,
692,
743,
60104,
3636,
961,
1591,
341,
197,
3244,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRequestCtxSendFileNotModified(t *testing.T) {
var ctx RequestCtx
var req Request
ctx.Init(&req, nil, defaultLogger)
filePath := "./server_test.go"
lastModified, err := FileLastModified(filePath)
if err != nil {
t.Fatalf("unexpected error: %s", err)
}
ctx.Request.Header.Set("If-Modified-Since", strin... | explode_data.jsonl/73293 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 301
} | [
2830,
3393,
1900,
23684,
11505,
1703,
2623,
19148,
1155,
353,
8840,
836,
8,
341,
2405,
5635,
6145,
23684,
198,
2405,
4232,
6145,
198,
20985,
26849,
2099,
2958,
11,
2092,
11,
1638,
7395,
692,
17661,
1820,
1669,
5924,
4030,
4452,
18002,
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... | 5 |
func TestEventQuery_Next(t *testing.T) {
s := graphql.NewMockSubServer(t,
graphql.AddVarNamesToQuery(eventQuerySubscription, Query, Metadata, Options),
map[string]interface{}{Query: "", Metadata: nil, Options: nil},
&eventQueryResult{EventQueryResults: testEventQueryResultsOne},
)
defer s.Close()
svc := New(... | explode_data.jsonl/36555 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
1556,
2859,
1604,
427,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
48865,
7121,
11571,
3136,
5475,
1155,
345,
197,
197,
38294,
1904,
3962,
7980,
1249,
2859,
6235,
2859,
33402,
11,
11361,
11,
33589,
11,
14566,
1326,
197,
19567,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClient_SendEther_From(t *testing.T) {
t.Parallel()
app, cleanup := setupWithdrawalsApplication(t)
defer cleanup()
require.NoError(t, app.StartAndConnect())
client, _ := app.NewClientAndRenderer()
set := flag.NewFlagSet("sendether", 0)
set.String("from", app.Store.TxManager.NextActiveAccount().Address... | explode_data.jsonl/78856 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
2959,
46267,
71045,
53157,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
28236,
11,
21290,
1669,
6505,
92261,
1127,
4988,
1155,
340,
16867,
21290,
2822,
17957,
35699,
1155,
11,
906,
12101,
3036,
14611,
12367,
25291,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshal_WithString(t *testing.T) {
type testStruct struct {
Str string
Key1 string
Key2 string
Key3 string
Winpath string
Winpath2 string
Quoted string
Regex string
Regex2 string
Lines string
}
testUnmarshal(t, []testcase{
{
data: `str = "I'm a string. ... | explode_data.jsonl/52952 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 665
} | [
2830,
3393,
1806,
27121,
62,
52342,
1155,
353,
8840,
836,
8,
341,
13158,
1273,
9422,
2036,
341,
197,
197,
2580,
414,
914,
198,
197,
55242,
16,
257,
914,
198,
197,
55242,
17,
257,
914,
198,
197,
55242,
18,
257,
914,
198,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestQuestionMatches(t *testing.T) {
pr, q := newReverse("192.0.2.21/24")
if !pr.QuestionMatches(q) {
t.Error("Question doesn't match self", q)
}
pr, q = newReverse("192.0.2.23/24")
if !pr.QuestionMatches(q) {
t.Error("Question doesn't match self", q)
}
pr, q = newReverse("2001:db8::1/64")
if !pr.Quest... | explode_data.jsonl/14930 | {
"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,
14582,
42470,
1155,
353,
8840,
836,
8,
341,
25653,
11,
2804,
1669,
501,
45695,
445,
16,
24,
17,
13,
15,
13,
17,
13,
17,
16,
14,
17,
19,
1138,
743,
753,
649,
58521,
42470,
10583,
8,
341,
197,
3244,
6141,
445,
14582,
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... | 7 |
func TestHashObjectCmd(t *testing.T) {
t.Parallel()
t.Run("blob", func(t *testing.T) {
t.Parallel()
t.Run("default should be blob", func(t *testing.T) {
t.Parallel()
repoPath, cleanup := testhelper.UnTar(t, testhelper.RepoSmall)
t.Cleanup(cleanup)
cwd, err := os.Getwd()
require.NoError(t, err)
... | explode_data.jsonl/44419 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1884
} | [
2830,
3393,
6370,
1190,
15613,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3244,
16708,
445,
35112,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3244,
41288,
7957,
2822,
197,
3244,
16708,
445,
2258,
1265,
387,
23404,
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 TestValidateOffset(t *testing.T) {
var validInput = []string{"", "1", "10k", "11m", "1K", "100M", "5G"}
for _, test := range validInput {
allErrs := validateOffset(test, field.NewPath("offset-field"))
if len(allErrs) != 0 {
t.Errorf("validateOffset(%q) returned an error for valid input", test)
}
}
va... | explode_data.jsonl/65866 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 236
} | [
2830,
3393,
17926,
6446,
1155,
353,
8840,
836,
8,
341,
2405,
2697,
2505,
284,
3056,
917,
4913,
497,
330,
16,
497,
330,
16,
15,
74,
497,
330,
16,
16,
76,
497,
330,
16,
42,
497,
330,
16,
15,
15,
44,
497,
330,
20,
38,
16707,
2023... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateUserWithToken(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
user := model.User{Email: strings.ToLower(model.NewId()) + "success+test@example.com", Nickname: "Darth Vader", Username: "vader" + model.NewId(), Password: "passwd1", AuthService: ""}
t.Run("invalid token", func(t *testin... | explode_data.jsonl/31419 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 984
} | [
2830,
3393,
4021,
1474,
2354,
3323,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
19060,
1669,
1614,
7344,
90,
4781,
25,
9069,
29983,
7635,
7121,
764,
2140,
488,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDecimalFixedLogicalTypeEncode(t *testing.T) {
schema := `{"type": "fixed", "size": 12, "logicalType": "decimal", "precision": 4, "scale": 2}`
testBinaryCodecPass(t, schema, big.NewRat(617, 50), []byte("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\xd2"))
testBinaryCodecPass(t, schema, big.NewRat(-617, 50), [... | explode_data.jsonl/12013 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 479
} | [
2830,
3393,
11269,
13520,
64312,
929,
32535,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
1669,
1565,
4913,
1313,
788,
330,
22021,
497,
330,
2141,
788,
220,
16,
17,
11,
330,
30256,
929,
788,
330,
23289,
497,
330,
27182,
788,
220,
19,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUniqueChooseX(t *testing.T) {
rand.Seed(int64(time.Now().UTC().Nanosecond()))
// Assert that we choose everything when n = len(weights)
weights := []float64{1.0, .9, .8, .7, .6, .5, .4, .3, .2, .1}
chosenCts := make([]int, len(weights))
chosen := UniqueChooseX(weights, len(weights))
for _, c := range cho... | explode_data.jsonl/20511 | {
"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,
22811,
24051,
55,
1155,
353,
8840,
836,
8,
341,
7000,
437,
5732,
291,
1548,
21,
19,
9730,
13244,
1005,
21183,
1005,
45,
276,
960,
1297,
12145,
197,
322,
5319,
429,
582,
5157,
4297,
979,
308,
284,
2422,
62601,
340,
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... | 8 |
func TestGetChannelStateIncorrectSender(t *testing.T) {
stateServiceTest.channelServiceMock.Put(
stateServiceTest.defaultChannelKey,
stateServiceTest.defaultChannelData,
)
defer stateServiceTest.channelServiceMock.Clear()
reply, err := stateServiceTest.service.GetChannelState(
nil,
&ChannelStateRequest{
... | explode_data.jsonl/6076 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
1949,
9629,
1397,
40468,
20381,
1155,
353,
8840,
836,
8,
341,
24291,
1860,
2271,
16195,
1860,
11571,
39825,
1006,
197,
24291,
1860,
2271,
8764,
9629,
1592,
345,
197,
24291,
1860,
2271,
8764,
9629,
1043,
345,
197,
340,
16867,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAcquireBuildLock_waitEarlierFinished(t *testing.T) {
// wait for a lower build to finish
client := buildLock_Client(t)
counter := buildLock_CountWatch(client)
previous := buildLock_Pod(t, client, "my-owner", "my-repository", "my-branch", "11")
old := buildLock_LockFromPod(t, client, "my-namespace", previo... | explode_data.jsonl/28231 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 651
} | [
2830,
3393,
11654,
984,
11066,
11989,
18760,
33041,
24890,
1155,
353,
8840,
836,
8,
341,
197,
322,
3783,
369,
264,
4722,
1936,
311,
6248,
198,
25291,
1669,
1936,
11989,
46102,
1155,
340,
58261,
1669,
1936,
11989,
50775,
14247,
12805,
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... | 5 |
func TestXORMappedAddress_AddTo_Invalid(t *testing.T) {
m := New()
addr := &XORMappedAddress{
IP: []byte{1, 2, 3, 4, 5, 6, 7, 8},
Port: 21254,
}
if err := addr.AddTo(m); err != ErrBadIPLength {
t.Errorf("AddTo should return %q, got: %v", ErrBadIPLength, err)
}
} | explode_data.jsonl/19445 | {
"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,
55,
4365,
5677,
4286,
21346,
1249,
62,
7928,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
741,
53183,
1669,
609,
55,
4365,
5677,
4286,
515,
197,
197,
3298,
25,
256,
3056,
3782,
90,
16,
11,
220,
17,
11,
220,
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... | 2 |
func TestDecode(t *testing.T) {
for _, test := range decodeBytesTests {
dec, err := Decode(test.input)
if !checkError(t, test.input, err, test.wantErr) {
continue
}
if !bytes.Equal(test.want.([]byte), dec) {
t.Errorf("input %s: value mismatch: got %x, want %x", test.input, dec, test.want)
continue
}... | explode_data.jsonl/63933 | {
"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,
32564,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
16895,
7078,
18200,
341,
197,
197,
8169,
11,
1848,
1669,
50194,
8623,
10046,
340,
197,
743,
753,
2028,
1454,
1155,
11,
1273,
10046,
11,
1848,
11,
1273,
702... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoveManagerByUsernameAndOrigin(t *testing.T) {
Convey("Remove manager by username and origin", t, func() {
expectedBody := `{"origin":"ldap","username":"user-name"}`
setup(MockRoute{"POST", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/managers/remove", []string{""}, "", 204, "", &expectedBody... | explode_data.jsonl/4456 | {
"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,
13021,
2043,
91519,
3036,
13298,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
13021,
6645,
553,
5934,
323,
6238,
497,
259,
11,
2915,
368,
341,
197,
42400,
5444,
1669,
1565,
4913,
8611,
3252,
38665,
2198,
5113,
3252,
872,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIteratorTableFilter(t *testing.T) {
var d *DB
defer func() {
if d != nil {
require.NoError(t, d.Close())
}
}()
datadriven.RunTest(t, "testdata/iterator_table_filter", func(td *datadriven.TestData) string {
switch td.Cmd {
case "define":
if d != nil {
if err := d.Close(); err != nil {
... | explode_data.jsonl/53973 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 871
} | [
2830,
3393,
11951,
2556,
5632,
1155,
353,
8840,
836,
8,
341,
2405,
294,
353,
3506,
198,
16867,
2915,
368,
341,
197,
743,
294,
961,
2092,
341,
298,
17957,
35699,
1155,
11,
294,
10421,
2398,
197,
197,
532,
197,
66816,
2698,
266,
14666,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDiscipleshipJournalDatabase(t *testing.T) {
db := GetDiscipleshipJournalDatabase("../../resource")
if len(db.BibleReadingPlan) == 0 {
t.Errorf("Failed to Get DiscipleshipJournal BibleReadingPlan Data")
}
} | explode_data.jsonl/58607 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 72
} | [
2830,
3393,
1949,
23477,
37458,
2151,
43494,
5988,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
2126,
23477,
37458,
2151,
43494,
5988,
36800,
9233,
5130,
743,
2422,
9791,
1785,
1238,
31899,
20485,
8,
621,
220,
15,
341,
197,
3244,
13080,
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
] | 2 |
func TestAncestors(t *testing.T) {
if !goversion.VersionAfterOrEqual(runtime.Version(), 1, 11) {
t.Skip("not supported on Go <= 1.10")
}
savedGodebug := os.Getenv("GODEBUG")
os.Setenv("GODEBUG", "tracebackancestors=100")
defer os.Setenv("GODEBUG", savedGodebug)
withTestProcess("testnextprog", t, func(p *proc.Ta... | explode_data.jsonl/56330 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 467
} | [
2830,
3393,
2082,
15184,
1087,
1155,
353,
8840,
836,
8,
341,
743,
753,
53203,
1325,
35842,
6025,
2195,
2993,
89467,
35842,
1507,
220,
16,
11,
220,
16,
16,
8,
341,
197,
3244,
57776,
445,
1921,
7248,
389,
5994,
2651,
220,
16,
13,
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... | 7 |
func TestSortJSON(t *testing.T) {
cases := []struct {
unsortedJSON string
want string
wantErr bool
}{
// simple case
{unsortedJSON: `{"kingblockio":"foo", "atom":"bar", "tendermint":"foobar"}`,
want: `{"atom":"bar","kingblockio":"foo","tendermint":"foobar"}`, wantErr: false},
// failing c... | explode_data.jsonl/71388 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1316
} | [
2830,
3393,
10231,
5370,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
20479,
28298,
5370,
914,
198,
197,
50780,
260,
914,
198,
197,
50780,
7747,
414,
1807,
198,
197,
59403,
197,
197,
322,
4285,
1142,
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 TestInternalPodK8SPods(t *testing.T) {
assert.Implements(t, (*pod.Source)(nil), &Pods{})
p := NewPods(DefaultNamespace)
assert.NotNil(t, p)
pods, err := p.Pods()
assert.NoError(t, err)
assert.Len(t, pods, 0)
corev1Pods := []corev1.Pod{
{
ObjectMeta: metav1.ObjectMeta{
Name: "not-" + t.Name(),
... | explode_data.jsonl/37730 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1817
} | [
2830,
3393,
11569,
23527,
42,
23,
4592,
29697,
1155,
353,
8840,
836,
8,
341,
6948,
26914,
4674,
1155,
11,
4609,
39073,
30350,
2376,
8385,
701,
609,
23527,
82,
6257,
692,
3223,
1669,
1532,
23527,
82,
87874,
22699,
340,
6948,
93882,
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 TestGetCurlCommand_json(t *testing.T) {
req, _ := http.NewRequest("PUT", "http://www.example.com/abc/def.ghi?jlk=mno&pqr=stu", bytes.NewBufferString(`{"hello":"world","answer":42}`))
req.Header.Set("Content-Type", "application/json")
libCommand, _ := http2curl.GetCurlCommand(req)
command, _ := GetCurlCommand(... | explode_data.jsonl/60999 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 238
} | [
2830,
3393,
1949,
34,
1085,
4062,
9455,
1155,
353,
8840,
836,
8,
341,
24395,
11,
716,
1669,
1758,
75274,
445,
6221,
497,
330,
1254,
1110,
2136,
7724,
905,
14,
13683,
14,
750,
13,
75076,
30,
73,
41748,
27221,
2152,
96774,
23004,
28,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestForceLeaveCommandRun(t *testing.T) {
a1 := testAgent(t)
a2 := testAgent(t)
defer a1.Shutdown()
defer a2.Shutdown()
addr := fmt.Sprintf("127.0.0.1:%d", a2.config.Ports.SerfLan)
_, err := a1.agent.JoinLAN([]string{addr})
if err != nil {
t.Fatalf("err: %s", err)
}
// Forcibly shutdown a2 so that it a... | explode_data.jsonl/11382 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 398
} | [
2830,
3393,
18573,
21833,
4062,
6727,
1155,
353,
8840,
836,
8,
341,
11323,
16,
1669,
1273,
16810,
1155,
340,
11323,
17,
1669,
1273,
16810,
1155,
340,
16867,
264,
16,
10849,
18452,
741,
16867,
264,
17,
10849,
18452,
2822,
53183,
1669,
88... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateHelmWithURL(t *testing.T) {
service := newService("../..")
_, err := service.GenerateManifest(context.Background(), &apiclient.ManifestRequest{
Repo: &argoappv1.Repository{},
AppName: "test",
ApplicationSource: &argoappv1.ApplicationSource{
Path: "./util/helm/testdata/redis",
Helm: &a... | explode_data.jsonl/58028 | {
"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,
31115,
39,
23162,
73100,
1155,
353,
8840,
836,
8,
341,
52934,
1669,
501,
1860,
17409,
496,
5130,
197,
6878,
1848,
1669,
2473,
57582,
38495,
5378,
19047,
1507,
609,
391,
292,
1451,
72272,
1900,
515,
197,
197,
25243,
25,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestConverterMapStructWithFromReqDropped(t *testing.T) {
fieldMap := make(map[string]codegen.FieldMapperEntry)
lines, err := convertTypes(
"Foo", "Bar",
`struct NestedFoo {
1: required string one
2: optional string two
}
struct Foo {
1: required NestedFoo three
2: required NestedFoo f... | explode_data.jsonl/62069 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 288
} | [
2830,
3393,
14920,
2227,
9422,
2354,
3830,
27234,
35,
41716,
1155,
353,
8840,
836,
8,
341,
39250,
2227,
1669,
1281,
9147,
14032,
60,
95859,
17087,
10989,
5874,
692,
78390,
11,
1848,
1669,
5508,
4173,
1006,
197,
197,
1,
40923,
497,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetConfigTxFailure(t *testing.T) {
rl := NewRAMLedger(10)
for i := 0; i < 10; i++ {
rl.Append(ordererledger.CreateNextBlock(rl, []*cb.Envelope{
makeNormalTx(provisional.TestChainID, i),
makeConfigTx(provisional.TestChainID, i),
}))
}
rl.Append(ordererledger.CreateNextBlock(rl, []*cb.Envelope{make... | explode_data.jsonl/32474 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 207
} | [
2830,
3393,
1949,
2648,
51,
9770,
9373,
1155,
353,
8840,
836,
8,
341,
197,
2381,
1669,
1532,
49,
31102,
291,
1389,
7,
16,
15,
340,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
26,
600,
1027,
341,
197,
197,
2381,
8982,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMarshalAppendAllocations(t *testing.T) {
m := &test3pb.TestAllTypes{SingularInt32: 1}
size := proto.Size(m)
const count = 1000
b := make([]byte, size)
// AllocsPerRun returns an integral value.
marshalAllocs := testing.AllocsPerRun(count, func() {
_, err := proto.MarshalOptions{}.MarshalAppend(b[:0], m... | explode_data.jsonl/1539 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 336
} | [
2830,
3393,
55438,
23877,
25154,
804,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
609,
1944,
18,
16650,
8787,
2403,
4173,
90,
50,
41880,
1072,
18,
17,
25,
220,
16,
532,
13832,
1669,
18433,
2465,
1255,
340,
4777,
1760,
284,
220,
16,
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 TestReplaceInt8(t *testing.T) {
v := &Value{data: []int8{int8(1), int8(1), int8(1), int8(1), int8(1), int8(1)}}
rawArr := v.MustInt8Slice()
replaced := v.ReplaceInt8(func(index int, val int8) int8 {
if index < len(rawArr)-1 {
return rawArr[index+1]
}
return rawArr[0]
})
replacedArr := replaced.Mu... | explode_data.jsonl/23430 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 313
} | [
2830,
3393,
23107,
1072,
23,
1155,
353,
8840,
836,
8,
1476,
5195,
1669,
609,
1130,
90,
691,
25,
3056,
396,
23,
90,
396,
23,
7,
16,
701,
526,
23,
7,
16,
701,
526,
23,
7,
16,
701,
526,
23,
7,
16,
701,
526,
23,
7,
16,
701,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTheNamingStrategy(t *testing.T) {
cases := []struct {
name string
namer gorm.Namer
expected string
}{
{name: "auth", expected: "auth", namer: gorm.TheNamingStrategy.DB},
{name: "userRestrictions", expected: "user_restrictions", namer: gorm.TheNamingStrategy.Table},
{name: "clientID", expe... | explode_data.jsonl/48456 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 252
} | [
2830,
3393,
785,
85410,
19816,
1155,
353,
8840,
836,
8,
1476,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
9038,
15232,
262,
342,
493,
2067,
15232,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
47006,
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... | 2 |
func TestDirWithMissingKey(t *testing.T) {
dir := newTempDir(t)
defer os.RemoveAll(dir)
newCaDirectory(t, dir, &defaultCertMaterial, nil)
_, err := cert.Load(dir)
if err == nil {
t.Errorf("expected error, got nil")
}
} | explode_data.jsonl/6224 | {
"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,
6184,
2354,
25080,
1592,
1155,
353,
8840,
836,
8,
341,
48532,
1669,
501,
12151,
6184,
1155,
340,
16867,
2643,
84427,
14161,
340,
8638,
22571,
9310,
1155,
11,
5419,
11,
609,
2258,
36934,
13415,
11,
2092,
340,
197,
6878,
1848,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLogAgentReachable(t *testing.T) {
assert := assert.New(t)
tp := new(testLogger)
tracer, _, _, stop := startTestTracer(t, WithLogger(tp))
defer stop()
tp.Reset()
logStartup(tracer)
assert.Len(tp.Lines(), 2)
assert.Regexp(`Datadog Tracer v[0-9]+\.[0-9]+\.[0-9]+ WARN: DIAGNOSTICS Unable to reach agent: Po... | explode_data.jsonl/64651 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
2201,
16810,
48368,
480,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
73423,
1669,
501,
8623,
7395,
340,
25583,
9584,
11,
8358,
8358,
2936,
1669,
1191,
2271,
1282,
9584,
1155,
11,
3085,
7395,
38852,
1171,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckPublicKeyIsValid(t *testing.T) {
invalidPublicKeyStrings := []string{
"", //empty key
"0446f1c8de232a065da428bf76e44b41f59a46620dec0aedfc9b5ab651e91f2051d610fddc78b8eba38a634bfe9a74bb015a88c52b9b844c74997035e08a695c", //wrong length key
"0346f1c8de232a065da428bf76e44b41f59a46620dec0aedfc9b5ab651e... | explode_data.jsonl/67116 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
3973,
61822,
55470,
1155,
353,
8840,
836,
8,
341,
197,
11808,
61822,
20859,
1669,
3056,
917,
515,
197,
197,
56323,
442,
3194,
1376,
198,
197,
197,
1,
15,
19,
19,
21,
69,
16,
66,
23,
450,
17,
18,
17,
64,
15,
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... | 3 |
func TestMatchUnaryKeyword(t *testing.T) {
tests := []struct {
in string
pos int
want bool
}{
{
in: "NOT bar",
pos: 0,
want: true,
},
{
in: "foo NOT bar",
pos: 4,
want: true,
},
{
in: "foo NOT",
pos: 4,
want: false,
},
{
in: "fooNOT bar",
pos: 3,
... | explode_data.jsonl/49627 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 395
} | [
2830,
3393,
8331,
94545,
34481,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
17430,
256,
914,
198,
197,
28164,
220,
526,
198,
197,
50780,
1807,
198,
197,
59403,
197,
197,
515,
298,
17430,
25,
256,
330,
14065,
3619,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHeapSort(t *testing.T) {
var a0 = goutil.RandIntArray(10, 1000000)
// var a4 = goutil.RandIntArray(100000, 1000000)
// fmt.Println(a0)
HeapSort(a0)
// fmt.Println(a0)
} | explode_data.jsonl/20292 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 86
} | [
2830,
3393,
27909,
10231,
1155,
353,
8840,
836,
8,
341,
2405,
264,
15,
284,
342,
30158,
2013,
437,
95338,
7,
16,
15,
11,
220,
16,
15,
15,
15,
15,
15,
15,
340,
197,
322,
762,
264,
19,
284,
342,
30158,
2013,
437,
95338,
7,
16,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseCommand(t *testing.T) {
assertParse := func(expected Process, command string) {
actual, err := ParseCommand(strings.NewReader(command))
assert.NoError(t, err)
assert.Equal(t, expected, *actual)
}
assertParse(Process{
Program: "program",
Arguments: []string{},
Environment: map[string]... | explode_data.jsonl/43101 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 616
} | [
2830,
3393,
14463,
4062,
1155,
353,
8840,
836,
8,
341,
6948,
14463,
1669,
2915,
15253,
8603,
11,
3210,
914,
8,
341,
197,
88814,
11,
1848,
1669,
14775,
4062,
51442,
68587,
15143,
1171,
197,
6948,
35699,
1155,
11,
1848,
340,
197,
6948,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetYARPCErrorCode(t *testing.T) {
const exName = "MyException"
t.Run("success", func(t *testing.T) {
spec := &compile.StructSpec{
Name: exName,
Annotations: map[string]string{_errorCodeAnnotationKey: "ABORTED"},
}
assert.NotPanics(t, func() {
want := "yarpcerrors.CodeAborted"
got :=... | explode_data.jsonl/26374 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 418
} | [
2830,
3393,
88300,
934,
4872,
30748,
1155,
353,
8840,
836,
8,
341,
4777,
505,
675,
284,
330,
5050,
1354,
1837,
3244,
16708,
445,
5630,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
98100,
1669,
609,
20433,
51445,
8327,
515,
298,
21297... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResetPassword(t *testing.T) {
t.Skip("test disabled during old build server changes, should be investigated")
th := Setup(t).InitBasic()
defer th.TearDown()
th.Client.Logout()
user := th.BasicUser
// Delete all the messages before check the reset password
mail.DeleteMailBox(user.Email)
th.TestForAllCl... | explode_data.jsonl/47529 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1093
} | [
2830,
3393,
14828,
4876,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
445,
1944,
8386,
2337,
2310,
1936,
3538,
4344,
11,
1265,
387,
26219,
5130,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
70479,
1171... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCount(t *testing.T) {
ctx := context.Background()
ci := fs.GetConfig(ctx)
r := fstest.NewRun(t)
defer r.Finalise()
file1 := r.WriteBoth(ctx, "potato2", "------------------------------------------------------------", t1)
file2 := r.WriteBoth(ctx, "empty space", "-", t2)
file3 := r.WriteBoth(ctx, "sub dir... | explode_data.jsonl/51930 | {
"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,
2507,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
72,
1669,
8619,
2234,
2648,
7502,
340,
7000,
1669,
48434,
477,
7121,
6727,
1155,
340,
16867,
435,
991,
977,
1064,
741,
17661,
16,
1669,
435,
4073,
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... | 1 |
func TestFindMode(t *testing.T) {
node33 := &TreeNode{Val: 2}
node22 := &TreeNode{Val: 2, Left: node33}
node11 := &TreeNode{Val: 1, Right: node22}
assert.EqualValues(t, []int{2}, findMode(node11))
} | explode_data.jsonl/30449 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 84
} | [
2830,
3393,
9885,
3636,
1155,
353,
8840,
836,
8,
341,
20831,
18,
18,
1669,
609,
26597,
90,
2208,
25,
220,
17,
532,
20831,
17,
17,
1669,
609,
26597,
90,
2208,
25,
220,
17,
11,
13727,
25,
2436,
18,
18,
532,
20831,
16,
16,
1669,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidatesHostParameter(t *testing.T) {
testCases := []struct {
Host string
Prefix string
URL string
Err bool
}{
{"127.0.0.1", "", "http://127.0.0.1/" + testapi.Default.GroupVersion().Version, false},
{"127.0.0.1:8080", "", "http://127.0.0.1:8080/" + testapi.Default.GroupVersion().Version, fals... | explode_data.jsonl/25921 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 503
} | [
2830,
3393,
4088,
973,
9296,
4971,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
197,
9296,
256,
914,
198,
197,
10025,
5060,
914,
271,
197,
79055,
914,
198,
197,
197,
7747,
1807,
198,
197,
59403,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestSokuonP(t *testing.T) {
const want = "ppappippuppeppo"
for _, v := range []string{"っぱっぴっぷっぺっぽ", "ッパッピップッペッポ"} {
got, err := KanaToRomaji(v)
assert.Equal(t, want, got)
assert.Nil(t, err)
}
} | explode_data.jsonl/11352 | {
"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,
50,
16493,
263,
47,
1155,
353,
8840,
836,
8,
341,
4777,
1366,
284,
330,
602,
676,
2807,
58498,
39480,
1837,
2023,
8358,
348,
1669,
2088,
3056,
917,
4913,
126086,
125388,
112,
125388,
115,
125388,
118,
136190,
497,
330,
25204... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGrpc_SendTransactions(t *testing.T) {
cfg := types.NewChain33Config(types.GetDefaultCfgstring())
//Init(cfg)
g := Grpc{}
qapi = new(mocks.QueueProtocolAPI)
qapi.On("GetConfig", mock.Anything).Return(cfg)
g.cli.QueueProtocolAPI = qapi
txCount := 10
in := &types.Transactions{Txs: make([]*types.Transacti... | explode_data.jsonl/346 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 393
} | [
2830,
3393,
6464,
3992,
46267,
48761,
1155,
353,
8840,
836,
8,
1476,
50286,
1669,
4494,
7121,
18837,
18,
18,
2648,
52613,
2234,
3675,
42467,
917,
2398,
197,
322,
3803,
28272,
340,
3174,
1669,
2825,
3992,
16094,
18534,
2068,
284,
501,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.