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 TestCountRepoClosedMilestones(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
test := func(repoID int64) {
repo := AssertExistsAndLoadBean(t, &Repository{ID: repoID}).(*Repository)
count, err := CountRepoClosedMilestones(repoID)
assert.NoError(t, err)
assert.EqualValues(t, repo.NumClosedMileston... | explode_data.jsonl/21826 | {
"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,
2507,
25243,
26884,
44,
457,
32510,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
2271,
5988,
2398,
18185,
1669,
2915,
50608,
915,
526,
21,
19,
8,
341,
197,
17200,
5368,
1669,
5319,
15575,
3036,
5879,
10437,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPutContent(t *testing.T) {
var (
serviceID string
hash = "TestPutContent_hash_1"
)
ctx := getContext()
svc := &pb.MicroService{
ServiceName: "TestPutContent",
Schemas: []string{"schemaID_1"},
}
resp, err := datasource.GetMetadataManager().RegisterService(ctx, &pb.CreateServiceRequest{
... | explode_data.jsonl/74501 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1135
} | [
2830,
3393,
19103,
2762,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
52934,
915,
914,
198,
197,
50333,
414,
284,
330,
2271,
19103,
2762,
8950,
62,
16,
698,
197,
340,
20985,
1669,
66175,
2822,
1903,
7362,
1669,
609,
16650,
1321,
275... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_Pool_Basic2(t *testing.T) {
p, _ := ports.PopRand()
s := gtcp.NewServer(fmt.Sprintf(`:%d`, p), func(conn *gtcp.Conn) {
conn.Close()
})
go s.Run()
defer s.Close()
time.Sleep(100 * time.Millisecond)
gtest.C(t, func(t *gtest.T) {
conn, err := gtcp.NewPoolConn(fmt.Sprintf("127.0.0.1:%d", p))
t.Assert... | explode_data.jsonl/62893 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 277
} | [
2830,
3393,
1088,
1749,
1668,
5971,
17,
1155,
353,
8840,
836,
8,
341,
3223,
11,
716,
1669,
20325,
47424,
56124,
741,
1903,
1669,
25161,
4672,
7121,
5475,
28197,
17305,
5809,
7533,
67,
7808,
281,
701,
2915,
20571,
353,
5178,
4672,
50422,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue16697(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")
tk.MustExec("CREATE TABLE t (v varchar(1024))")
tk.MustExec("insert into t values (space(1024))")
for i := 0; i < 5; i++ ... | explode_data.jsonl/65533 | {
"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,
42006,
16,
21,
21,
24,
22,
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... | 4 |
func TestLexNextToken(t *testing.T) {
l := lex(" ", nil)
token, _ := l.nextToken()
if token.typ != parseEof {
t.Errorf("unexpected token(%d) %s", token.typ, token)
}
} | explode_data.jsonl/81029 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 73
} | [
2830,
3393,
47778,
5847,
3323,
1155,
353,
8840,
836,
8,
341,
8810,
1669,
22429,
445,
3670,
2092,
340,
43947,
11,
716,
1669,
326,
51531,
741,
743,
3950,
49286,
961,
4715,
36,
1055,
341,
197,
3244,
13080,
445,
53859,
3950,
15238,
67,
8,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestKeyFreq(t *testing.T) {
testCases := []struct {
key string
octave int
freq float64
}{
{"C", 0, 32.70319566257483},
{"D", 0, 36.70809598967595},
{"E", 0, 41.20344461410875},
{"F", 0, 43.653528929125486},
{"G", 0, 48.99942949771867},
{"A", 0, 55.00},
{"B", 0, 61.7354126570155},
{"A",... | explode_data.jsonl/44589 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 351
} | [
2830,
3393,
1592,
55096,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
23634,
262,
914,
198,
197,
22229,
302,
523,
526,
198,
197,
1166,
2958,
256,
2224,
21,
19,
198,
197,
59403,
197,
197,
4913,
34,
497,
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 TestAPI_Sanitize(t *testing.T) {
a := assert.New(t, false)
api := &API{}
p, rslt := newParser(a, "", "")
api.Sanitize(p)
rslt.Handler.Stop()
a.Empty(rslt.Errors).Empty(rslt.Warns)
// headers
api.Headers = []*Param{
{Type: &TypeAttribute{Value: xmlenc.String{Value: TypeString}}},
}
p, rslt = newParse... | explode_data.jsonl/78941 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 731
} | [
2830,
3393,
7082,
1098,
58652,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
11,
895,
692,
54299,
1669,
609,
7082,
16094,
3223,
11,
435,
48893,
1669,
501,
6570,
2877,
11,
7342,
14676,
54299,
808,
58652,
1295,
340,
7000,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapSliceToFloat(t *testing.T) {
assert := assert.New(t)
g := &Group{
People: []*Person{
{0, "George", 42.42, true},
{1, "Jeff", 0, true},
{2, "Ted", 50, true},
{3, "Luda", 100, false},
},
}
s, err := slices.ToFloats(g.People, "Money")
assert.Nil(err)
assert.NotEmpty(s)
assert.Equal(s[0... | explode_data.jsonl/18825 | {
"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,
2227,
33236,
1249,
5442,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
3174,
1669,
609,
2808,
515,
197,
10025,
68,
1164,
25,
29838,
10680,
515,
298,
197,
90,
15,
11,
330,
38952,
497,
220,
19,
17,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMemberRollValidatorRejectsRequestWhenSARCheckErrors(t *testing.T) {
validator, _, tracker := createMemberRollValidatorTestFixture(smcp)
tracker.AddReactor("create", "subjectaccessreviews", createSubjectAccessReviewReactor(false, false, fmt.Errorf("SAR check error")))
roll := newMemberRoll("default", "istio... | explode_data.jsonl/70270 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
9366,
32355,
14256,
78413,
82,
1900,
4498,
50,
934,
3973,
13877,
1155,
353,
8840,
836,
8,
341,
197,
16112,
11,
8358,
28331,
1669,
1855,
9366,
32355,
14256,
69356,
55280,
4672,
340,
25583,
9683,
1904,
693,
5621,
445,
3182,
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... | 1 |
func TestOrderPreserved(t *testing.T) {
th := kusttest_test.NewKustTestHarness(t, "/app/prod")
th.WriteK("/app/base", `
namePrefix: b-
resources:
- namespace.yaml
- role.yaml
- service.yaml
- deployment.yaml
`)
th.WriteF("/app/base/service.yaml", `
apiVersion: v1
kind: Service
metadata:
name: myService
`)
th.Writ... | explode_data.jsonl/59900 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 598
} | [
2830,
3393,
4431,
14367,
2771,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
595,
590,
1944,
4452,
7121,
42,
590,
2271,
74248,
1155,
11,
3521,
676,
18008,
67,
1138,
70479,
4073,
42,
4283,
676,
26090,
497,
22074,
606,
14335,
25,
293,
6913... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFractran(t *testing.T) {
p := program{
{91, 33},
{11, 13},
{1, 11},
{399, 34},
{17, 19},
{1, 17},
{2, 7},
{187, 5},
{1, 3},
}
input := 31250
res := exec(p, input)
if res[0] != 8192 {
t.Errorf("did not get correct result. expected=%v, got=%v", 8192, res[0])
}
} | explode_data.jsonl/28020 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 157
} | [
2830,
3393,
22560,
531,
6576,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
2025,
515,
197,
197,
90,
24,
16,
11,
220,
18,
18,
1583,
197,
197,
90,
16,
16,
11,
220,
16,
18,
1583,
197,
197,
90,
16,
11,
220,
16,
16,
1583,
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... | 2 |
func Test_surfaceArea(t *testing.T) {
assert := assert.New(t)
assert.Equal(10, surfaceArea([][]int{{2}}))
assert.Equal(34, surfaceArea([][]int{{1, 2}, {3, 4}}))
assert.Equal(16, surfaceArea([][]int{{1, 0}, {0, 2}}))
assert.Equal(32, surfaceArea([][]int{{1, 1, 1}, {1, 0, 1}, {1, 1, 1}}))
assert.Equal(46, surfaceA... | explode_data.jsonl/67122 | {
"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,
31030,
8726,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
6948,
12808,
7,
16,
15,
11,
7329,
8726,
10556,
1294,
396,
2979,
17,
3417,
1171,
6948,
12808,
7,
18,
19,
11,
7329,
8726,
10556,
1294,
396,
2979... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTraitDecode(t *testing.T) {
env := createTestEnv(t, v1alpha1.IntegrationPlatformClusterOpenShift, "")
env.Integration.Spec.Traits = make(map[string]v1alpha1.TraitSpec)
svcTrait := v1alpha1.TraitSpec{
Configuration: map[string]string{
"enabled": "false",
"port": "7071",
"cippa": "lippa",
},... | explode_data.jsonl/54527 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 249
} | [
2830,
3393,
49257,
32564,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
1855,
2271,
14359,
1155,
11,
348,
16,
7141,
16,
7371,
17376,
17296,
28678,
5002,
24841,
11,
14676,
57538,
7371,
17376,
36473,
836,
26287,
284,
1281,
9147,
14032,
60,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCollapsedThreadFetch(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
th.App.UpdateConfig(func(cfg *model.Config) {
*cfg.ServiceSettings.ThreadAutoFollow = true
*cfg.ServiceSettings.CollapsedThreads = model.COLLAPSED_THREADS_DEFAULT_ON
})
user1 := th.BasicUser
user2 := th.BasicUser2
... | explode_data.jsonl/26447 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1252
} | [
2830,
3393,
90439,
6855,
20714,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
70479,
5105,
16689,
2648,
18552,
28272,
353,
2528,
10753,
8,
341,
197,
197,
9,
14072,
13860... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSqlite3_TruncateTableSQL(t *testing.T) {
a := assert.New(t, false)
suite := test.NewSuite(a, test.Sqlite3)
defer suite.Close()
suite.ForEach(func(t *test.Driver) {
qs, err := t.DB.Dialect().TruncateTableSQL("tbl", "")
a.NotError(err).Equal(1, len(qs))
sqltest.Equal(a, qs[0], "DELETE FROM {tbl}")
... | explode_data.jsonl/11879 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 260
} | [
2830,
3393,
8269,
632,
18,
21038,
26900,
2556,
6688,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
11,
895,
692,
96572,
1669,
1273,
7121,
28000,
2877,
11,
1273,
23005,
632,
18,
340,
16867,
16182,
10421,
2822,
96572,
67743... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigValidate(t *testing.T) {
c := NewConfig()
if err := c.Validate(); err != nil {
t.Error("initialized config is invalid")
}
c.DeflateLevel = 100
if err := c.Validate(); err == nil {
t.Error("no error set for invalid value")
}
} | explode_data.jsonl/40995 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
2648,
17926,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
2648,
741,
743,
1848,
1669,
272,
47667,
2129,
1848,
961,
2092,
341,
197,
3244,
6141,
445,
36161,
2193,
374,
8318,
1138,
197,
532,
1444,
49947,
5075,
4449,
284,
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... | 3 |
func TestReconcileAnalysisRunInitial(t *testing.T) {
f := newFixture(t)
defer f.Close()
c, _, _ := f.newController(noResyncPeriodFunc)
run := &v1alpha1.AnalysisRun{
Spec: v1alpha1.AnalysisRunSpec{
Metrics: []v1alpha1.Metric{{
Name: "success-rate",
Interval: "60s",
Provider: v1alpha1.MetricProvi... | explode_data.jsonl/75828 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 777
} | [
2830,
3393,
693,
40446,
457,
26573,
6727,
6341,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
340,
16867,
282,
10421,
741,
1444,
11,
8358,
716,
1669,
282,
4618,
2051,
39205,
1061,
1721,
23750,
9626,
340,
56742,
1669,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrorPrecisionTooLow(t *testing.T) {
prec := uint(63)
in := make([]big.Float, 2)
in[0].SetPrec(prec).SetInt64(1)
in[1].SetPrec(prec).SetInt64(-2)
pslq := New(prec).SetVerbose(verbose)
_, err := pslq.Run(in)
if err != ErrorPrecisionTooLow {
t.Error("Expecting", ErrorPrecisionTooLow, "but got", err)
}
... | explode_data.jsonl/66843 | {
"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,
1454,
55501,
31246,
24187,
1155,
353,
8840,
836,
8,
341,
197,
10645,
1669,
2622,
7,
21,
18,
340,
17430,
1669,
1281,
10556,
16154,
29794,
11,
220,
17,
340,
17430,
58,
15,
936,
1649,
68833,
1295,
2758,
568,
1649,
1072,
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... | 2 |
func TestHasMatchingLabels(t *testing.T) {
machine := maotesting.NewMachine("machine", "node")
testsCases := []struct {
machine *mapiv1beta1.Machine
machineHealthCheck *mapiv1beta1.MachineHealthCheck
expected bool
}{
{
machine: machine,
machineHealthCheck: maotesting.New... | explode_data.jsonl/30994 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 877
} | [
2830,
3393,
10281,
64430,
23674,
1155,
353,
8840,
836,
8,
341,
2109,
3814,
1669,
7491,
354,
59855,
7121,
21605,
445,
32056,
497,
330,
3509,
1138,
78216,
37302,
1669,
3056,
1235,
341,
197,
2109,
3814,
310,
353,
2186,
344,
16,
19127,
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... | 3 |
func TestConstrainedPrefAttachmentSelectInsufficientFunds(t *testing.T) {
t.Parallel()
prand.Seed(time.Now().Unix())
const (
minChanSize = 0
maxChanSize = btcutil.Amount(btcutil.SatoshiPerBitcoin)
chanLimit = 3
threshold = 0.5
)
skipNodes := make(map[NodeID]struct{})
for _, graph := range chanGraph... | explode_data.jsonl/28783 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 564
} | [
2830,
3393,
1109,
57727,
29978,
33569,
3379,
15474,
26683,
37,
42950,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
25653,
437,
5732,
291,
9730,
13244,
1005,
55832,
12367,
4777,
2399,
197,
25320,
46019,
1695,
284,
220,
15,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestCLI(t *testing.T) {
t.Run("it prompts the user to enter number of players and starts the game", func(t *testing.T) {
in := strings.NewReader("5\nJulia wins\n")
out := &bytes.Buffer{}
game := &poker.SpyGame{}
cli := poker.NewCLI(in, out, game)
cli.PlayPoker()
if got := out.String(); got != poker.... | explode_data.jsonl/64426 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 440
} | [
2830,
3393,
63959,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
275,
50932,
279,
1196,
311,
3725,
1372,
315,
4217,
323,
8471,
279,
1809,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
17430,
1669,
9069,
68587,
445,
20,
1699,
28085,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRecurivePathResolution(t *testing.T) {
ctx := context.Background()
dagService := dagmock.Mock()
a := randNode()
b := randNode()
c := randNode()
err := b.AddNodeLink("grandchild", c)
if err != nil {
t.Fatal(err)
}
err = a.AddNodeLink("child", b)
if err != nil {
t.Fatal(err)
}
for _, n := ran... | explode_data.jsonl/60593 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 401
} | [
2830,
3393,
693,
2352,
533,
1820,
38106,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
2698,
351,
1860,
1669,
28069,
16712,
24664,
2822,
11323,
1669,
10382,
1955,
741,
2233,
1669,
10382,
1955,
741,
1444,
1669,
10382,
1955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCompileOptions(t *testing.T) {
src := `import "csv"
csv.from(csv: "foo,bar")
|> range(start: 2017-10-10T00:00:00Z)
|> count()`
now := parser.MustParseTime("2018-10-10T00:00:00Z").Value
opt := lang.WithLogPlanOpts(plan.OnlyLogicalRules(removeCount{}))
program, err := lang.Compile(src, now, opt... | explode_data.jsonl/51327 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 478
} | [
2830,
3393,
46126,
3798,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
1565,
474,
330,
18104,
698,
298,
1444,
3492,
6387,
41583,
25,
330,
7975,
11,
2257,
1138,
571,
197,
91,
29,
2088,
10639,
25,
220,
17,
15,
16,
22,
12,
16,
15,
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... | 4 |
func TestPlayback_Tx_panic_count(t *testing.T) {
p := Playback{}
defer func() {
v := recover()
err, ok := v.(error)
if !ok {
t.Fatal("expected error")
}
if !IsErr(err) {
t.Fatalf("unexpected error: %v", err)
}
}()
_ = p.Tx([]byte{0}, nil)
t.Fatal("shouldn't run")
} | explode_data.jsonl/44855 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 141
} | [
2830,
3393,
87125,
1139,
87,
620,
31270,
3180,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
95301,
16094,
16867,
2915,
368,
341,
197,
5195,
1669,
11731,
741,
197,
9859,
11,
5394,
1669,
348,
12832,
841,
340,
197,
743,
753,
562,
341,
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... | 3 |
func Test_CrawlerRobots500(t *testing.T) {
t.Parallel()
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
switch r.RequestURI {
case robotsEP:
w.WriteHeader(http.StatusInternalServerError)
default:
_, _ = io.WriteString(w, "")
}
}))
defer ts.Close()
res := [... | explode_data.jsonl/2970 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 274
} | [
2830,
3393,
920,
33369,
14465,
2412,
20,
15,
15,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
8961,
435,
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 TestTOSV4(t *testing.T) {
c := context.New(t, defaultMTU)
defer c.Cleanup()
ep, err := c.Stack().NewEndpoint(tcp.ProtocolNumber, ipv4.ProtocolNumber, &c.WQ)
if err != nil {
t.Fatalf("NewEndpoint failed: %s", err)
}
c.EP = ep
const tos = 0xC0
if err := c.EP.SetSockOptInt(tcpip.IPv4TOSOption, tos); err !... | explode_data.jsonl/75944 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 656
} | [
2830,
3393,
51,
3126,
53,
19,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2266,
7121,
1155,
11,
1638,
8505,
52,
340,
16867,
272,
727,
60639,
2822,
96626,
11,
1848,
1669,
272,
58646,
1005,
3564,
27380,
98203,
54096,
2833,
11,
45475,
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... | 7 |
func TestGetAllTeamsSanitization(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer th.TearDown()
var team *model.Team
if res, err := th.BasicClient.CreateTeam(&model.Team{
DisplayName: t.Name() + "_1",
Name: GenerateTestTeamName(),
Email: th.GenerateTestEmail(),
Type: ... | explode_data.jsonl/48505 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 890
} | [
2830,
3393,
1949,
2403,
60669,
23729,
275,
2022,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
1005,
3803,
2320,
7210,
741,
16867,
270,
836,
682,
4454,
2822,
2405,
2083,
353,
2528,
65842,
198,
743,
592,
11,
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... | 9 |
func TestIsArgumentName(t *testing.T) {
validArgumentNames := []string{
"123",
"my_arg",
}
for _, name := range validArgumentNames {
errs := isArgumentName(name)
if len(errs) > 0 {
t.Errorf("isArgumentName(%q) returned errors %v for valid input", name, errs)
}
}
invalidArgumentNames := []string{
"... | explode_data.jsonl/65849 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
3872,
9171,
675,
1155,
353,
8840,
836,
8,
341,
56322,
9171,
7980,
1669,
3056,
917,
515,
197,
197,
1,
16,
17,
18,
756,
197,
197,
1,
2408,
6057,
756,
197,
630,
2023,
8358,
829,
1669,
2088,
2697,
9171,
7980,
341,
197,
985... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIdGroup_Collection(t *testing.T) {
var list []IOrderHashElement
group := OrderHashGroup{eles: nil, eleMap: make(map[string]IOrderHashElement)}
for i := 0; i < 20; i++ {
support := newIdSupport2()
group.add(support)
list = append(list, support)
time.Sleep(time.Millisecond * 50)
}
fmt.Println(group.... | explode_data.jsonl/68808 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
764,
2808,
920,
1908,
1155,
353,
8840,
836,
8,
341,
2405,
1140,
3056,
40,
4431,
6370,
1691,
198,
44260,
1669,
7217,
6370,
2808,
90,
68,
642,
25,
2092,
11,
10510,
2227,
25,
1281,
9147,
14032,
60,
40,
4431,
6370,
1691,
105... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClusterScopedSARCheckSuffices(t *testing.T) {
sarCheckCount := 0
validator, _, tracker := createMemberRollValidatorTestFixture(smcp)
tracker.AddReactor("create", "subjectaccessreviews", func(action clienttesting.Action) (handled bool, ret runtime.Object, err error) {
sarCheckCount++
if sarCheckCount > 1... | explode_data.jsonl/70268 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 284
} | [
2830,
3393,
28678,
39437,
50,
934,
3973,
50,
1362,
1216,
1155,
353,
8840,
836,
8,
341,
1903,
277,
3973,
2507,
1669,
220,
15,
198,
197,
16112,
11,
8358,
28331,
1669,
1855,
9366,
32355,
14256,
69356,
55280,
4672,
340,
25583,
9683,
1904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetConfigFilePath(t *testing.T) {
var err error
cfgDir, err = ioutil.TempDir("", "kube-bench-test")
if err != nil {
t.Fatalf("Failed to create temp directory")
}
defer os.RemoveAll(cfgDir)
d := filepath.Join(cfgDir, "cis-1.4")
err = os.Mkdir(d, 0766)
if err != nil {
t.Fatalf("Failed to create temp ... | explode_data.jsonl/60203 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 518
} | [
2830,
3393,
1949,
2648,
19090,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
50286,
6184,
11,
1848,
284,
43144,
65009,
6184,
19814,
330,
97717,
1455,
19762,
16839,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
9408,
311... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestPodSpecWithCustomServiceAccount(t *testing.T) {
fakeClient := fakek8sclient.NewSimpleClientset()
coreops.SetInstance(coreops.New(fakeClient))
fakeClient.Discovery().(*fakediscovery.FakeDiscovery).FakedServerVersion = &version.Info{
GitVersion: "v1.18.8",
}
nodeName := "testNode"
driver := portworx{}
... | explode_data.jsonl/55437 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 408
} | [
2830,
3393,
23527,
8327,
2354,
10268,
1860,
7365,
1155,
353,
8840,
836,
8,
341,
1166,
726,
2959,
1669,
12418,
74,
23,
82,
2972,
7121,
16374,
2959,
746,
741,
71882,
3721,
4202,
2523,
47867,
3721,
7121,
74138,
2959,
1171,
1166,
726,
2959,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCanUpdateTag(t *testing.T) {
// Setup
db, err := sql.Open("knowledge", "identifier")
defer db.Close()
checkError(err)
rec := httptest.NewRecorder()
e := echo.New()
h := NewHandler(db, "secret")
// First register the user.
assert.NoError(t, registerUser(db, e, rec, h, user1JSON))
// Login the user
... | explode_data.jsonl/59031 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 457
} | [
2830,
3393,
6713,
4289,
5668,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
198,
20939,
11,
1848,
1669,
5704,
12953,
445,
89053,
497,
330,
15909,
1138,
16867,
2927,
10421,
741,
25157,
1454,
3964,
692,
67904,
1669,
54320,
70334,
7121,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestList_Back(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
l := New()
a1 := []interface{}{1, 2, 3, 4}
l.PushFronts(a1)
e1 := l.Back()
t.Assert(e1.Value, 1)
t.Assert(l.Len(), 4)
})
} | explode_data.jsonl/30907 | {
"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,
852,
64703,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
8810,
1669,
1532,
741,
197,
11323,
16,
1669,
3056,
4970,
6257,
90,
16,
11,
220,
17,
11,
220,
18,
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... | 1 |
func TestCmdAddExcludePodWithEnvoyDisableEnv(t *testing.T) {
defer resetGlobalTestVariables()
k8Args = "K8S_POD_NAMESPACE=testNS;K8S_POD_NAME=testPodName"
testContainers = []string{"mockContainer", "mockContainer2"}
testInitContainers = map[string]struct{}{
"foo-init": {},
}
testAnnotations[sidecarStatusKey] =... | explode_data.jsonl/17798 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 197
} | [
2830,
3393,
15613,
2212,
95239,
23527,
2354,
14359,
2253,
25479,
14359,
1155,
353,
8840,
836,
8,
341,
16867,
7585,
11646,
2271,
22678,
2822,
16463,
23,
4117,
284,
330,
42,
23,
50,
1088,
2069,
34552,
53538,
2448,
26,
42,
23,
50,
1088,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKmsSigner_Sign(t *testing.T) {
t.Run("failed to sign", func(t *testing.T) {
_, err := newKMSSigner("", "", "", &hubKMSHeader{},
&mockHTTPClient{
DoFunc: func(req *http.Request) (*http.Response, error) {
return &http.Response{
StatusCode: http.StatusInternalServerError, Body: ioutil.NopClos... | explode_data.jsonl/68490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 610
} | [
2830,
3393,
42,
1011,
7264,
261,
1098,
622,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
16091,
311,
1841,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
6878,
1848,
1669,
501,
65651,
1220,
77656,
19814,
7342,
7342,
609,
26682,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_query_UpdatedRecords(t *testing.T) {
type fields struct {
session session.ServiceFormatter
}
type args struct {
sobject string
startDate time.Time
endDate time.Time
}
tests := []struct {
name string
fields fields
args args
want UpdatedRecords
wantErr bool
}{
{
name: ... | explode_data.jsonl/52253 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2442
} | [
2830,
3393,
5738,
62,
16196,
25876,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
25054,
3797,
13860,
14183,
198,
197,
532,
13158,
2827,
2036,
341,
197,
1903,
1700,
256,
914,
198,
197,
21375,
1916,
882,
16299,
198,
197,
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... | 1 |
func TestCreateV2Job(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
handleV2JobCreate(t)
actual, err := jobs.Create(client.ServiceClient(), "986416ea-e26b-40f1-b371-cd7be87376a2", createOpts).Extract()
th.AssertNoErr(t, err)
th.AssertDeepEquals(t, expectedCreateResponseData, actual)
} | explode_data.jsonl/52706 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
4021,
53,
17,
12245,
1155,
353,
8840,
836,
8,
341,
70479,
39820,
9230,
741,
16867,
270,
94849,
37496,
9230,
741,
53822,
53,
17,
12245,
4021,
1155,
692,
88814,
11,
1848,
1669,
6887,
7251,
12805,
13860,
2959,
1507,
330,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAccAWSS3BucketObject_metadata(t *testing.T) {
rInt := acctest.RandInt()
var obj s3.GetObjectOutput
resourceName := "aws_s3_bucket_object.object"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSS3Buc... | explode_data.jsonl/64967 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 601
} | [
2830,
3393,
14603,
14419,
1220,
18,
36018,
1190,
22220,
1155,
353,
8840,
836,
8,
341,
7000,
1072,
1669,
1613,
67880,
2013,
437,
1072,
741,
2405,
2839,
274,
18,
25618,
5097,
198,
50346,
675,
1669,
330,
8635,
643,
18,
38749,
5314,
6035,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLDAPConnectBindInvalid(t *testing.T) {
_config := getConfig()
_config.BindDN = "cn=foobar"
_config.BindPassword = "test"
_, err := LDAPConnect(_config, log.NewNopLogger())
if err == nil {
t.Errorf("Expected an error with invalid BIND")
}
} | explode_data.jsonl/79690 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
93497,
14611,
9950,
7928,
1155,
353,
8840,
836,
8,
341,
197,
5332,
1669,
66763,
741,
197,
5332,
32451,
31264,
284,
330,
14271,
28,
50267,
698,
197,
5332,
32451,
4876,
284,
330,
1944,
698,
197,
6878,
1848,
1669,
56379,
14611,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetConfigMap(t *testing.T) {
var (
lsConfigMaps = []*v1.ConfigMap{
testutil.FakeConfigMap("namespace-0", "name-0", map[string]string{"key-0": "val-0"}),
testutil.FakeConfigMap("namespace-1", "name-1", map[string]string{"key-1": "val-1"}),
}
)
// Create a config map lister that will list the confi... | explode_data.jsonl/73403 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 481
} | [
2830,
3393,
1949,
2648,
2227,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
197,
4730,
2648,
36562,
284,
29838,
85,
16,
10753,
2227,
515,
298,
18185,
1314,
991,
726,
2648,
2227,
445,
2231,
12,
15,
497,
330,
606,
12,
15,
497,
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... | 7 |
func TestTrieTreeCase(t *testing.T) {
trie := NewTrieTree(echo)
trie.Add("/a", echo)
fmt.Println("Test======>/a", trie.head, trie.head.next)
trie.Add("/a/b", echo)
fmt.Println("Test======>/a/b", trie.head.next["a"])
trie.Add("/a/b/c", echo)
fmt.Println("Test======>/a/b/c", trie.head.next["a"].next["b"])
tri... | explode_data.jsonl/73369 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 298
} | [
2830,
3393,
51,
7231,
6533,
4207,
1155,
353,
8840,
836,
8,
341,
197,
8927,
1669,
1532,
51,
7231,
6533,
2026,
958,
692,
197,
8927,
1904,
4283,
64,
497,
1687,
340,
11009,
12419,
445,
2271,
45347,
18105,
64,
497,
59067,
16042,
11,
59067,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegions(t *testing.T) {
c := client{}
c.clients = map[string]*regionalClient{"us-east-1": nil, "us-west-2": nil, "us-north-5": nil}
assert.ElementsMatch(t, c.Regions(), []string{"us-east-1", "us-west-2", "us-north-5"})
} | explode_data.jsonl/3400 | {
"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,
79284,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2943,
16094,
1444,
49733,
284,
2415,
14032,
8465,
1580,
3914,
2959,
4913,
355,
39507,
12,
16,
788,
2092,
11,
330,
355,
37602,
12,
17,
788,
2092,
11,
330,
355,
5279,
2364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequest_Tokens(t *testing.T) {
tests := []struct {
name string
request *alice.Request
want []string
}{
{
name: "",
request: getReq(0),
want: []string{"съешь", "еще", "этих", "мягких", "французских", "булок"},
}, {
name: "",
request: getReq(1),
want: []string{},
... | explode_data.jsonl/18229 | {
"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,
1900,
1139,
9713,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
23555,
353,
63195,
9659,
198,
197,
50780,
262,
3056,
917,
198,
197,
59403,
197,
197,
515,
298,
11609,
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 TestOTLPGRPCMetrics(t *testing.T) {
systemtest.CleanupElasticsearch(t)
srv := apmservertest.NewUnstartedServer(t)
srv.Config.Monitoring = &apmservertest.MonitoringConfig{
Enabled: true,
MetricsPeriod: time.Duration(time.Second),
StatePeriod: time.Duration(time.Second),
}
err := srv.Start()
requ... | explode_data.jsonl/41680 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 500
} | [
2830,
3393,
1793,
12567,
8626,
4872,
27328,
1155,
353,
8840,
836,
8,
341,
40293,
1944,
727,
60639,
36,
51179,
1836,
1155,
340,
1903,
10553,
1669,
1443,
76,
799,
1621,
477,
7121,
1806,
46723,
5475,
1155,
340,
1903,
10553,
10753,
1321,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestConnectionCreate(t *testing.T) {
assert := assert.New(t)
tx, err := Default().Begin()
assert.Nil(err)
defer tx.Rollback()
err = createTable(tx)
assert.Nil(err)
obj := &benchObj{
Name: fmt.Sprintf("test_object_0"),
UUID: uuid.V4().String(),
Timestamp: time.Now().UTC(),
Amount: 1000... | explode_data.jsonl/33841 | {
"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,
4526,
4021,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
46237,
11,
1848,
1669,
7899,
1005,
11135,
741,
6948,
59678,
3964,
340,
16867,
9854,
88918,
2822,
9859,
284,
1855,
2556,
27301,
340,
6948,
59678,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRenderData(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
response := mock.NewMockHttpWrapResponseWriter(ctrl)
response.EXPECT().WriteHeader(200)
protocol := mock.NewMockHttpProtocol(ctrl)
protocol.EXPECT().SetHeader(`Content-Type`, `application/json`)
protocol.EXPECT().ResponseWrit... | explode_data.jsonl/42560 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
6750,
1043,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
741,
21735,
1669,
7860,
7121,
11571,
2905,
26787,
2582,
6492,
62100,
340,
21735,
22402,
7285,
1005,
7985,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNew(t *testing.T) {
buf := &bytes.Buffer{}
logger := log.NewLogfmtLogger(buf)
nc, err := New(Config{}, logger)
require.Error(t, err)
require.Nil(t, nc)
} | explode_data.jsonl/63959 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 74
} | [
2830,
3393,
3564,
1155,
353,
8840,
836,
8,
1476,
26398,
1669,
609,
9651,
22622,
16094,
17060,
1669,
1487,
7121,
2201,
12501,
7395,
10731,
692,
197,
1016,
11,
1848,
1669,
1532,
33687,
22655,
5925,
340,
17957,
6141,
1155,
11,
1848,
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 |
func TestConnect(t *testing.T) {
ctx, err := NewContext()
if err != nil {
t.Fatal(err)
}
defer ctx.Close()
tpmPolicy, err := ctx.GetPolicy()
if err != nil {
t.Fatal(err)
}
if err := tpmPolicy.SetPassword(""); err != nil {
t.Fatal(err)
}
nvram, err := ctx.NewNVRAM()
if err != nil {
t.Fatal(err)
}
... | explode_data.jsonl/18800 | {
"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,
14611,
1155,
353,
8840,
836,
8,
341,
20985,
11,
1848,
1669,
1532,
1972,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
5635,
10421,
2822,
73423,
76,
13825,
11,
1848,
1669,
5635,
2234,
13825,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSasum(t *testing.T) {
testNorm32(t, func(h *Handle, n int, x cuda.Buffer, inc int, res interface{}) error {
return h.Sasum(n, x, inc, res)
}, 1)
} | explode_data.jsonl/70355 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 70
} | [
2830,
3393,
50,
300,
372,
1155,
353,
8840,
836,
8,
341,
18185,
24993,
18,
17,
1155,
11,
2915,
3203,
353,
6999,
11,
308,
526,
11,
856,
24408,
22622,
11,
3625,
526,
11,
592,
3749,
28875,
1465,
341,
197,
853,
305,
808,
300,
372,
1445... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func Test_randMobile(t *testing.T) {
tests := []struct {
name string
want string
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := randMobile(); got != tt.want {
t.Errorf("randMobile() = %v, want %v", got, tt.want)
}
})
}
} | explode_data.jsonl/47735 | {
"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,
33864,
18370,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
322,
5343,
25,
2691,
1273,
5048,
624,
197,
532,
2023,
8358,
17853,
1669,
2088,
703... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_RoundTrip(t *testing.T) {
for i := 0; i < 10000; i++ {
nbytes := rand.Intn(32) + 1
b := make([]byte, nbytes)
for j := 0; j < nbytes; j++ {
b[j] = byte(rand.Intn(256))
}
words, err := FromBytes("en", b)
if err != nil {
t.Error(err)
}
b2, err := ToBytes("en", words)
if err != nil {
t... | explode_data.jsonl/32825 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 219
} | [
2830,
3393,
2568,
795,
56352,
1155,
353,
8840,
836,
8,
341,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
15,
15,
15,
26,
600,
1027,
341,
197,
9038,
9651,
1669,
10382,
7371,
77,
7,
18,
17,
8,
488,
220,
16,
198,
197,
223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestSchemaParser_SimpleFieldWithArg(t *testing.T) {
body := `
type Hello {
world(flag: Boolean): String
}`
astDoc := parse(t, body)
expected := &ast.Document{
Loc: testLoc(1, 46),
Definitions: []ast.Node{
&ast.ObjectDefinition{
Loc: testLoc(1, 46),
Name: &ast.Name{
Value: "Hello",
Loc... | explode_data.jsonl/51225 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 666
} | [
2830,
3393,
8632,
6570,
1098,
6456,
1877,
2354,
2735,
1155,
353,
8840,
836,
8,
341,
35402,
1669,
22074,
1313,
21927,
341,
220,
1879,
33104,
25,
6992,
1648,
923,
198,
31257,
88836,
9550,
1669,
4715,
1155,
11,
2487,
340,
42400,
1669,
609,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultiErrorOneError(t *testing.T) {
err := NewMultiError()
err = err.Add(errors.New("foo"))
final := err.FinalError()
require.NotNil(t, final)
require.Equal(t, "foo", final.Error())
last := err.LastError()
require.NotNil(t, last)
require.Equal(t, "foo", last.Error())
require.False(t, err.Empty())
requ... | explode_data.jsonl/27153 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 141
} | [
2830,
3393,
20358,
1454,
3966,
1454,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
1532,
20358,
1454,
741,
9859,
284,
1848,
1904,
38881,
7121,
445,
7975,
5455,
14213,
1669,
1848,
991,
977,
1454,
741,
17957,
93882,
1155,
11,
1590,
340,
17957... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLongNumbers(t *testing.T) {
type T struct {
TestNum int64
}
v := T{67108864}
var buf bytes.Buffer
e := &Env{}
e.SetJson("Test", v)
if err := e.Encode(&buf); err != nil {
t.Fatal(err)
}
res := make(map[string]T)
if err := json.Unmarshal(buf.Bytes(), &res); err != nil {
t.Fatal(err)
}
if res["T... | explode_data.jsonl/15392 | {
"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,
6583,
27237,
1155,
353,
8840,
836,
8,
341,
13158,
350,
2036,
341,
197,
73866,
4651,
526,
21,
19,
198,
197,
532,
5195,
1669,
350,
90,
21,
22,
16,
15,
23,
23,
21,
19,
532,
2405,
6607,
5820,
22622,
198,
7727,
1669,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStatefulSetControllerDeletePodTombstone(t *testing.T) {
ssc, spc, _ := newFakeStatefulSetController()
set := newStatefulSet(3)
pod := newStatefulSetPod(set, 0)
spc.setsIndexer.Add(set)
tombstoneKey, _ := controller.KeyFunc(pod)
tombstone := cache.DeletedFinalStateUnknown{Key: tombstoneKey, Obj: pod}
ssc... | explode_data.jsonl/18622 | {
"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,
1397,
1262,
1649,
2051,
6435,
23527,
51,
2855,
10812,
1155,
353,
8840,
836,
8,
341,
34472,
66,
11,
978,
66,
11,
716,
1669,
501,
52317,
1397,
1262,
1649,
2051,
741,
8196,
1669,
36848,
1262,
1649,
7,
18,
340,
3223,
347,
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... | 5 |
func Test_WildcardMatchingOnRequiredLabels(t *testing.T) {
tests := []struct {
input string
pattern string
expectedFailure bool
}{
{
pattern: "aws_*",
input: `resource "aws_instance" "blah" {}`,
expectedFailure: true,
},
{
pattern: "gcp_*",
input... | explode_data.jsonl/13094 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 722
} | [
2830,
3393,
2763,
695,
4951,
64430,
1925,
8164,
23674,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
22427,
1843,
914,
198,
197,
3223,
3227,
260,
914,
198,
197,
42400,
17507,
1807,
198,
197,
59403,
197,
197,
515,
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 TestSubrace_GetByIndex_IT(t *testing.T) {
resp, err := Client.GetByIndex("high-elf")
r, _ := json.Marshal(resp)
log.Print(fmt.Sprintf("Response: %s", r))
assert.Nil(t, err, "Should not receive an error contacting API.")
assert.True(t, true, "Should complete successfully!")
} | explode_data.jsonl/57199 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
3136,
41183,
13614,
1359,
1552,
41681,
1155,
353,
8840,
836,
8,
341,
34653,
11,
1848,
1669,
8423,
2234,
1359,
1552,
445,
11892,
12,
490,
1138,
7000,
11,
716,
1669,
2951,
37271,
20267,
340,
6725,
7918,
28197,
17305,
445,
2582... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMinRaftProtocol(t *testing.T) {
t.Parallel()
makeMember := func(version string) serf.Member {
return serf.Member{
Name: "foo",
Addr: net.IP([]byte{127, 0, 0, 1}),
Tags: map[string]string{
"role": "consul",
"dc": "dc1",
"port": "10000",
"vsn": "1",
"raft_vsn":... | explode_data.jsonl/57820 | {
"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,
6217,
55535,
723,
20689,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
77438,
9366,
1669,
2915,
37770,
914,
8,
1420,
69,
46404,
341,
197,
853,
1420,
69,
46404,
515,
298,
21297,
25,
330,
7975,
756,
298,
197,
13986,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRateLimitImgurSimulated(t *testing.T) {
httpC, server := testHTTPClientJSON("{\"success\": true, \"status\": 200 }")
defer server.Close()
client := createClient(httpC, "testing", "")
rl, err := client.GetRateLimit()
if err != nil {
t.Errorf("GetRateLimit() failed with error: %v", err)
t.FailNow()
... | explode_data.jsonl/4807 | {
"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,
11564,
16527,
13033,
324,
14027,
7757,
1155,
353,
8840,
836,
8,
341,
28080,
34,
11,
3538,
1669,
1273,
9230,
2959,
5370,
99141,
5630,
11693,
830,
11,
7245,
2829,
11693,
220,
17,
15,
15,
335,
5130,
16867,
3538,
10421,
2822,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSnapshot(t *testing.T) {
client, err := shiroclient.NewMock(nil)
require.NoError(t, err)
initClient(t, client)
storedVal := "sample"
_, err = call(client, "write", []string{storedVal}, nil)
require.NoError(t, err)
var snapshot bytes.Buffer
err = client.Snapshot(&snapshot)
require.NoError(t, err)
er... | explode_data.jsonl/72062 | {
"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,
15009,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
557,
8698,
2972,
7121,
11571,
27907,
340,
17957,
35699,
1155,
11,
1848,
340,
28248,
2959,
1155,
11,
2943,
692,
18388,
3018,
2208,
1669,
330,
13611,
698,
197,
6878,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegistryInterface(t *testing.T) {
var reg interface{} = &Registry{}
if _, ok := reg.(registry.Registry); !ok {
t.Error("&Registry{} does not conform registry.Registry")
}
} | explode_data.jsonl/82485 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 69
} | [
2830,
3393,
15603,
5051,
1155,
353,
8840,
836,
8,
341,
2405,
1217,
3749,
6257,
284,
609,
15603,
16094,
743,
8358,
5394,
1669,
1217,
12832,
29172,
89142,
1215,
753,
562,
341,
197,
3244,
6141,
34866,
15603,
6257,
1558,
537,
25879,
19424,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetBrowserIssues(t *testing.T) {
// https://github.com/digitalcrab/browscap_go/issues/4
ua := "Mozilla/5.0 (iPad; CPU OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3"
if browser, ok := GetBrowser(ua); !ok {
t.Error("Browser not found")
} else if br... | explode_data.jsonl/35277 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 164
} | [
2830,
3393,
1949,
17878,
85828,
1155,
353,
8840,
836,
8,
341,
197,
322,
3703,
1110,
5204,
905,
3446,
10233,
5082,
370,
3470,
1811,
11346,
25515,
38745,
14,
19,
198,
197,
4284,
1669,
330,
40030,
14,
20,
13,
15,
320,
66293,
26,
13940,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewTLSDialerWithConfig(t *testing.T) {
td := httptransport.NewTLSDialer(httptransport.Config{
TLSConfig: new(tls.Config),
})
rtd, ok := td.(dialer.TLSDialer)
if !ok {
t.Fatal("not the TLSDialer we expected")
}
if len(rtd.Config.NextProtos) != 0 {
t.Fatal("invalid len(config.NextProtos)")
}
if rtd... | explode_data.jsonl/78388 | {
"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,
3564,
13470,
5491,
530,
261,
2354,
2648,
1155,
353,
8840,
836,
8,
341,
76373,
1669,
1758,
26445,
7121,
13470,
5491,
530,
261,
19886,
26445,
10753,
515,
197,
10261,
7268,
2648,
25,
501,
1155,
4730,
10753,
1326,
197,
3518,
700... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAbsCollection_Pop(t *testing.T) {
intColl := NewIntCollection([]int{1, 2, 3, 4, 5, 6})
pop := intColl.Pop()
in, err := pop.ToInt()
if err != nil {
t.Fatal(err.Error())
}
if in != 6 {
t.Fatal("Pop 错误")
}
if intColl.Count() != 5 {
t.Fatal("Pop 后本体错误")
}
} | explode_data.jsonl/66445 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 143
} | [
2830,
3393,
27778,
6482,
1088,
453,
1155,
353,
8840,
836,
8,
341,
2084,
15265,
1669,
1532,
1072,
6482,
10556,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
3518,
74813,
1669,
526,
15265,
47424,
741,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestUpdateFailedInstance(t *testing.T) {
// given
suite := NewBrokerSuiteTest(t)
defer suite.TearDown()
iid := uuid.New().String()
resp := suite.CallAPI("PUT", fmt.Sprintf("oauth/cf-eu10/v2/service_instances/%s?accepts_incomplete=true&plan_id=7d55d31d-35ae-4438-bf13-6ffdfa107d9f&service_id=47c9dcbf-ff30-448e... | explode_data.jsonl/8113 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 805
} | [
2830,
3393,
4289,
9408,
2523,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
96572,
1669,
1532,
65545,
28000,
2271,
1155,
340,
16867,
16182,
836,
682,
4454,
741,
8230,
307,
1669,
16040,
7121,
1005,
703,
2822,
34653,
1669,
16182,
270... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResizeFileShare(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
cloud := &Cloud{}
mockFileClient := mockfileclient.NewMockInterface(ctrl)
mockFileClient.EXPECT().ResizeFileShare(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes()
cloud.FileClient = mockFile... | explode_data.jsonl/10212 | {
"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,
30561,
1703,
12115,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
197,
12361,
1669,
609,
16055,
16094,
77333,
1703,
2959,
1669,
7860,
1192,
2972,
7121,
11571,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCoordinator_Configure_TwoModules(t *testing.T) {
coordinator := fixtureCoordinator()
viper.Set("consumer.anothertest.class-name", "kafka")
viper.Set("consumer.anothertest.servers", []string{"broker1.example.com:1234"})
viper.Set("consumer.anothertest.cluster", "test")
coordinator.Configure()
} | explode_data.jsonl/20418 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
64304,
15100,
17781,
82989,
28201,
1155,
353,
8840,
836,
8,
341,
197,
1015,
17442,
1669,
12507,
64304,
741,
5195,
12858,
4202,
445,
46764,
13,
5652,
339,
83386,
3074,
11494,
497,
330,
74,
21883,
1138,
5195,
12858,
4202,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseSAPITime(t *testing.T) {
t.Parallel()
tm, err := time.Parse(binanceSAPITimeLayout, "2021-05-27 03:56:46")
if err != nil {
t.Fatal(tm)
}
tm = tm.UTC()
if tm.Year() != 2021 ||
tm.Month() != 5 ||
tm.Day() != 27 ||
tm.Hour() != 3 ||
tm.Minute() != 56 ||
tm.Second() != 46 {
t.Fatal("incorre... | explode_data.jsonl/76548 | {
"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,
14463,
50,
2537,
952,
545,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3244,
76,
11,
1848,
1669,
882,
8937,
1883,
24387,
50,
2537,
952,
545,
2175,
11,
330,
17,
15,
17,
16,
12,
15,
20,
12,
17,
22,
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... | 8 |
func TestURLEncodedValidation(t *testing.T) {
tests := []struct {
param string
expected bool
}{
{"%20", true},
{"%af", true},
{"%ff", true},
{"<%az", false},
{"%test%", false},
{"a%b", false},
{"1%2", false},
{"%%a%%", false},
}
validate := New()
for i, test := range tests {
errs := val... | explode_data.jsonl/77359 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 357
} | [
2830,
3393,
1511,
867,
1016,
6737,
13799,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
36037,
262,
914,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
4913,
4,
17,
15,
497,
830,
1583,
197,
197,
4913,
4,
2577,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakeInt(t *testing.T) {
for _, testCase := range []struct {
literal string
bitSize int
expected int64
}{
{"1", 0, 1},
{"-127", 8, -127},
{"32767", 16, 32767},
{"-2147483647", 32, -2147483647},
{"-9223372036854775807", 64, -9223372036854775807},
} {
if ok, got, err := fixture.MakeInt(test... | explode_data.jsonl/31896 | {
"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,
8078,
1072,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
54452,
1669,
2088,
3056,
1235,
341,
197,
8810,
9953,
220,
914,
198,
197,
79980,
1695,
220,
526,
198,
197,
42400,
526,
21,
19,
198,
197,
59403,
197,
197,
4913,
16,
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... | 5 |
func TestGtField(t *testing.T) {
validate := New()
type TimeTest struct {
Start *time.Time `validate:"required,gt"`
End *time.Time `validate:"required,gt,gtfield=Start"`
}
now := time.Now()
start := now.Add(time.Hour * 24)
end := start.Add(time.Hour * 24)
timeTest := &TimeTest{
Start: &start,
End: ... | explode_data.jsonl/77297 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1730
} | [
2830,
3393,
38,
83,
1877,
1155,
353,
8840,
836,
8,
1476,
197,
7067,
1669,
1532,
2822,
13158,
4120,
2271,
2036,
341,
197,
65999,
353,
1678,
16299,
1565,
7067,
2974,
6279,
11,
5178,
8805,
197,
38407,
256,
353,
1678,
16299,
1565,
7067,
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 TestFuturesNewOrder(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test: api keys not set or canManipulateRealOrders set to false")
}
_, err := b.FuturesNewOrder(
context.Background(),
&FuturesNewOrderRequest{
Symbol: currency.NewPairWithDelimi... | explode_data.jsonl/76618 | {
"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,
37,
74606,
3564,
4431,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
1369,
753,
4814,
92876,
6334,
12768,
24898,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
25,
6330,
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... | 4 |
func TestSidecarListeners(t *testing.T) {
// Call Requires to explicitly initialize dependencies that the test needs.
ctx := framework.GetContext(t)
// TODO - remove prior to checkin
scopes.Framework.SetOutputLevel(log.DebugLevel)
// TODO: Limit to Native environment until the Kubernetes environment is supported ... | explode_data.jsonl/49256 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1001
} | [
2830,
3393,
16384,
6918,
31570,
1155,
353,
8840,
836,
8,
341,
197,
322,
7143,
44089,
311,
20975,
9468,
19543,
429,
279,
1273,
3880,
624,
20985,
1669,
12626,
2234,
1972,
1155,
340,
197,
322,
5343,
481,
4057,
4867,
311,
1779,
258,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestHackatomQuerier(t *testing.T) {
cache, cleanup := withCache(t)
defer cleanup()
checksum := createTestContract(t, cache)
// set up contract
gasMeter := NewMockGasMeter(TESTING_GAS_LIMIT)
igasMeter := GasMeter(gasMeter)
store := NewLookup(gasMeter)
api := NewMockAPI()
initBalance := types.Coins{types.N... | explode_data.jsonl/62566 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 388
} | [
2830,
3393,
75786,
21855,
2183,
261,
1268,
1155,
353,
8840,
836,
8,
341,
52680,
11,
21290,
1669,
448,
8233,
1155,
340,
16867,
21290,
741,
25157,
1242,
1669,
1855,
2271,
14067,
1155,
11,
6500,
692,
197,
322,
738,
705,
5116,
198,
3174,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRectProp_MakeValid(t *testing.T) {
cases := []struct {
name string
rectProp props.Rect
assert func(t *testing.T, prop props.Rect)
}{
{
"When percent is less than zero, should become 100",
props.Rect{
Percent: -2,
},
func(t *testing.T, prop props.Rect) {
assert.Equal(t, prop.... | explode_data.jsonl/68875 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 600
} | [
2830,
3393,
4415,
2008,
1245,
726,
4088,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
65072,
2008,
6914,
32153,
198,
197,
6948,
256,
2915,
1155,
353,
8840,
836,
11,
2004,
6914,
32153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRelatedSel(t *testing.T) {
if IsTidb {
// Skip it. TiDB does not support relation now.
return
}
qs := dORM.QueryTable("user")
num, err := qs.Filter("profile__age", 28).Count()
throwFail(t, err)
throwFail(t, AssertIs(num, 1))
num, err = qs.Filter("profile__age__gt", 28).Count()
throwFail(t, err)
t... | explode_data.jsonl/18139 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 685
} | [
2830,
3393,
11686,
39041,
1155,
353,
8840,
836,
8,
341,
743,
2160,
51,
307,
65,
341,
197,
197,
322,
25784,
432,
13,
22325,
3506,
1558,
537,
1824,
12687,
1431,
624,
197,
853,
198,
197,
532,
18534,
82,
1669,
294,
4365,
15685,
2556,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshalValidatorState(t *testing.T) {
assert, require := assert.New(t), require.New(t)
// create some fixed values
serialized := `{
"height": "1",
"round": 1,
"step": 1
}`
val := FilePVLastSignState{}
err := tmjson.Unmarshal([]byte(serialized), &val)
require.Nil(err, "%+v", err)
// make sure... | explode_data.jsonl/30345 | {
"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,
1806,
27121,
14256,
1397,
1155,
353,
8840,
836,
8,
341,
6948,
11,
1373,
1669,
2060,
7121,
1155,
701,
1373,
7121,
1155,
692,
197,
322,
1855,
1045,
8356,
2750,
198,
197,
75277,
1669,
1565,
515,
197,
197,
1,
2563,
788,
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 TestCounterToGauge(t *testing.T) {
originalFamily := tests.MakeTestMetricFamily(dto.MetricType_COUNTER, 2, sampleLabels)
convertedGauge := counterToGauge(originalFamily)
assert.Equal(t, dto.MetricType_GAUGE, *convertedGauge.Type)
assert.Equal(t, tests.CounterMetricName, convertedGauge.GetName())
} | explode_data.jsonl/62479 | {
"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,
14099,
1249,
38,
19392,
1155,
353,
8840,
836,
8,
341,
197,
9889,
15192,
1669,
7032,
50133,
2271,
54310,
15192,
55237,
1321,
16340,
929,
48411,
11,
220,
17,
11,
6077,
23674,
340,
197,
76204,
38,
19392,
1669,
5546,
1249,
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,
1,
1,
1,
1... | 1 |
func TestApplyExecutionRoleLogsAuthFailEmptyCredentialsID(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
credentialsManager := mock_credentials.NewMockManager(ctrl)
rawHostConfigInput := dockercontainer.HostConfig{
LogConfig: dockercontainer.LogConfig{
Type: "foo",
Config: map[string... | explode_data.jsonl/37227 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 429
} | [
2830,
3393,
28497,
20294,
9030,
51053,
5087,
19524,
3522,
27025,
915,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
741,
197,
32353,
2043,
1669,
7860,
47396,
7121,
11571,
2043,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCryptionHandlerPost(t *testing.T) {
var buf bytes.Buffer
enc, err := codec.EcbEncrypt(aesKey, []byte(reqText))
assert.Nil(t, err)
buf.WriteString(base64.StdEncoding.EncodeToString(enc))
req := httptest.NewRequest(http.MethodPost, "/any", &buf)
handler := CryptionHandler(aesKey)(http.HandlerFunc(func(w h... | explode_data.jsonl/24317 | {
"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,
34,
15597,
3050,
4133,
1155,
353,
8840,
836,
8,
341,
2405,
6607,
5820,
22622,
198,
197,
954,
11,
1848,
1669,
34647,
5142,
7221,
61520,
2877,
288,
1592,
11,
3056,
3782,
6881,
1178,
1171,
6948,
59678,
1155,
11,
1848,
340,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStepCall(t *testing.T) {
testseq("testnextprog", contStep, []nextTest{
{34, 13},
{13, 14}}, "", t)
} | explode_data.jsonl/56260 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 52
} | [
2830,
3393,
8304,
7220,
1155,
353,
8840,
836,
8,
341,
18185,
13262,
445,
1944,
3600,
32992,
497,
683,
8304,
11,
3056,
3600,
2271,
515,
197,
197,
90,
18,
19,
11,
220,
16,
18,
1583,
197,
197,
90,
16,
18,
11,
220,
16,
19,
38154,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProjectJsonBinary(t *testing.T) {
bp := `
rust_binary {
name: "libz",
srcs: ["z/src/lib.rs"],
crate_name: "z"
}
`
jsonContent := testProjectJson(t, bp)
crates := validateJsonCrates(t, jsonContent)
for _, c := range crates {
crate := validateCrate(t, c)
rootModule, ok := crate["root_module"].(s... | explode_data.jsonl/25964 | {
"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,
7849,
5014,
21338,
1155,
353,
8840,
836,
8,
341,
2233,
79,
1669,
22074,
7000,
590,
31761,
341,
197,
11609,
25,
330,
2740,
89,
756,
197,
41144,
82,
25,
4383,
89,
13437,
8194,
25638,
8097,
197,
1444,
7698,
1269,
25,
330,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestSignatureTypeUnmarshalJson(t *testing.T) {
tests := map[string]struct {
Input string
Assertion assert.ErrorAssertionFunc
Expected trc.SignatureType
}{
"Garbage": {
Input: `"test"`,
Assertion: assert.Error,
},
"Integer": {
Input: `42`,
Assertion: assert.Error,
},
"Wron... | explode_data.jsonl/64406 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 402
} | [
2830,
3393,
25088,
929,
1806,
27121,
5014,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
66588,
257,
914,
198,
197,
18017,
290,
2060,
6141,
68639,
9626,
198,
197,
197,
18896,
220,
489,
66,
41152,
1568,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChanges(t *testing.T) {
dir, err := ioutil.TempDir("", "apidiff_test")
if err != nil {
t.Fatal(err)
}
dir = filepath.Join(dir, "go")
wanti, wantc := splitIntoPackages(t, dir)
defer os.RemoveAll(dir)
sort.Strings(wanti)
sort.Strings(wantc)
oldpkg, err := load(t, "apidiff/old", dir)
if err != nil {
... | explode_data.jsonl/39380 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 330
} | [
2830,
3393,
11317,
1155,
353,
8840,
836,
8,
341,
48532,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
43121,
3092,
4452,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
48532,
284,
26054,
22363,
14161,
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... | 6 |
func TestCollectUintptr(t *testing.T) {
v := &Value{data: []uintptr{uintptr(1), uintptr(1), uintptr(1), uintptr(1), uintptr(1), uintptr(1)}}
collected := v.CollectUintptr(func(index int, val uintptr) interface{} {
return index
})
collectedArr := collected.MustInterSlice()
if assert.Equal(t, 6, len(collectedAr... | explode_data.jsonl/23503 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 239
} | [
2830,
3393,
47504,
21570,
3505,
1155,
353,
8840,
836,
8,
1476,
5195,
1669,
609,
1130,
90,
691,
25,
3056,
51380,
90,
51380,
7,
16,
701,
38190,
7,
16,
701,
38190,
7,
16,
701,
38190,
7,
16,
701,
38190,
7,
16,
701,
38190,
7,
16,
913... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChainLoaderChains(t *testing.T) {
trc := xtest.LoadTRC(t, "testdata/common/trcs/ISD1-B1-S1.trc")
testCases := map[string]struct {
prepare func(t *testing.T, ctrl *gomock.Controller) (string, trust.DB)
expected [][]*x509.Certificate
assertErr assert.ErrorAssertionFunc
}{
"non-existing/empty dir": ... | explode_data.jsonl/34834 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 798
} | [
2830,
3393,
18837,
9181,
1143,
1735,
1155,
353,
8840,
836,
8,
341,
25583,
66,
1669,
856,
1944,
13969,
2378,
34,
1155,
11,
330,
92425,
11356,
21485,
4837,
14,
1637,
35,
16,
7671,
16,
6222,
16,
5427,
66,
1138,
18185,
37302,
1669,
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 |
func TestClusterAdminInvalidController(t *testing.T) {
seedBroker := NewMockBroker(t, 1)
defer seedBroker.Close()
seedBroker.SetHandlerByMap(map[string]MockResponse{
"MetadataRequest": NewMockMetadataResponse(t).
SetBroker(seedBroker.Addr(), seedBroker.BrokerID()),
})
config := NewTestConfig()
config.Versi... | explode_data.jsonl/40776 | {
"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,
28678,
7210,
7928,
2051,
1155,
353,
8840,
836,
8,
341,
197,
22602,
65545,
1669,
1532,
11571,
65545,
1155,
11,
220,
16,
340,
16867,
10320,
65545,
10421,
2822,
197,
22602,
65545,
4202,
3050,
1359,
2227,
9147,
14032,
60,
11571,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_MergeBinaryStatsValueResponses(t *testing.T) {
mct := newMemcacheTest(defaultConfig)
msg1 := makeBinMessage(t,
&binHeader{opcode: opcodeStat, request: false},
extras(), key("stat1"), value("value1"))
msg2 := makeBinMessage(t,
&binHeader{opcode: opcodeStat, request: false},
extras(), key("stat2"), v... | explode_data.jsonl/15056 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 287
} | [
2830,
3393,
1245,
10080,
21338,
16635,
1130,
70743,
1155,
353,
8840,
836,
8,
341,
2109,
302,
1669,
501,
18816,
9360,
2271,
18978,
2648,
340,
21169,
16,
1669,
1281,
28794,
2052,
1155,
345,
197,
197,
5,
6863,
4047,
90,
48128,
25,
30028,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSplitFieldRE(t *testing.T) {
// Determine what we want to provide and see in return.
recordStr := "foo-bar---baz------------quux--corge-grault---garply-"
re, err := regexp.Compile(`\w+`)
if err != nil {
t.Fatal(err)
}
words := re.FindAllString(recordStr, -1)
words = append(words, "")
// Split the re... | explode_data.jsonl/3000 | {
"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,
20193,
1877,
787,
1155,
353,
8840,
836,
8,
341,
197,
322,
29901,
1128,
582,
1366,
311,
3410,
323,
1490,
304,
470,
624,
71952,
2580,
1669,
330,
7975,
15773,
4421,
42573,
5161,
446,
2200,
313,
6005,
709,
24321,
945,
4421,
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... | 4 |
func TestResponseSent(t *testing.T) {
assert.Equal(t, http.StatusOK, apns.StatusSent)
assert.Equal(t, true, (&apns.Response{StatusCode: 200}).Sent())
assert.Equal(t, false, (&apns.Response{StatusCode: 400}).Sent())
} | explode_data.jsonl/69031 | {
"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,
2582,
31358,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
1155,
11,
1758,
52989,
11,
1443,
4412,
10538,
31358,
340,
6948,
12808,
1155,
11,
830,
11,
15899,
391,
4412,
12574,
90,
15872,
25,
220,
17,
15,
15,
16630,
31358,
2398,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadPackage(t *testing.T) {
Convey("package repository", t, func() {
Convey("open", func() {
Convey("should return remote url on success", func() {
remote, _ := Open("../..")
So(remote, ShouldEqual, "https://github.com/0nedark/serv.git")
})
Convey("should return no error on success", func(... | explode_data.jsonl/12900 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 633
} | [
2830,
3393,
5879,
13100,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
1722,
12542,
497,
259,
11,
2915,
368,
341,
197,
93070,
5617,
445,
2508,
497,
2915,
368,
341,
298,
93070,
5617,
445,
5445,
470,
8699,
2515,
389,
2393,
497,
2915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNestedMap(t *testing.T) {
obj := &generated.SimpleWithMap{
FieldA: 1,
FieldD: &generated.SimpleWithMap_Nested{
NestedFieldD: map[string]string{
"test1": "test1",
},
},
}
testSerialization(t, obj)
} | explode_data.jsonl/48809 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
71986,
2227,
1155,
353,
8840,
836,
8,
341,
22671,
1669,
609,
16187,
24252,
2354,
2227,
515,
197,
94478,
32,
25,
220,
16,
345,
197,
94478,
35,
25,
609,
16187,
24252,
2354,
2227,
1604,
9980,
515,
298,
18317,
9980,
1877,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestControllerAddress(t *testing.T) {
t.Parallel()
fixture := map[string]struct {
node corev1.Node
expectedAddress string
}{
"node with external ip": {
node: corev1.Node{ObjectMeta: metav1.ObjectMeta{Name: "node1"}, Status: corev1.NodeStatus{Addresses: []corev1.NodeAddress{{Addre... | explode_data.jsonl/25434 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 768
} | [
2830,
3393,
2051,
4286,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1166,
12735,
1669,
2415,
14032,
60,
1235,
341,
197,
20831,
310,
6200,
85,
16,
21714,
198,
197,
42400,
4286,
914,
198,
197,
59403,
197,
197,
1,
3509,
448,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCompilationCache(t *testing.T) {
add := &semantic.FunctionExpression{
Block: &semantic.FunctionBlock{
Parameters: &semantic.FunctionParameters{
List: []*semantic.FunctionParameter{
{Key: &semantic.Identifier{Name: "a"}},
{Key: &semantic.Identifier{Name: "b"}},
},
},
Body: &semanti... | explode_data.jsonl/28775 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1137
} | [
2830,
3393,
64502,
8233,
1155,
353,
8840,
836,
8,
341,
12718,
1669,
609,
47858,
30547,
9595,
515,
197,
94940,
25,
609,
47858,
30547,
4713,
515,
298,
197,
9706,
25,
609,
47858,
30547,
9706,
515,
571,
10675,
25,
29838,
47858,
30547,
4971,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStreamSendWithError(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
wg := &sync.WaitGroup{}
defer wg.Wait()
defer cancel()
var server1StopFlag int32
server1Stopped := make(chan struct{})
ch1 := make(chan *cdcpb.ChangeDataEvent, 10)
srv1 := newMockChangeDataService(t, ch1)
serv... | explode_data.jsonl/32868 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1686
} | [
2830,
3393,
3027,
11505,
66102,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
72079,
1669,
609,
12996,
28384,
2808,
16094,
16867,
63581,
28384,
741,
16867,
9121,
2822,
2405,
3538,
16,
10674,
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... | 2 |
func TestStartStop(t *testing.T) {
failingEvent := func(e *corev2.Event) *corev2.Event {
e.Check.Status = 1
return e
}
tt := []struct {
name string
records []*corev2.KeepaliveRecord
events []*corev2.Event
monitors int
}{
{
name: "No Keepalives",
records: nil,
events: nil,
mo... | explode_data.jsonl/45977 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1011
} | [
2830,
3393,
3479,
10674,
1155,
353,
8840,
836,
8,
341,
1166,
14277,
1556,
1669,
2915,
2026,
353,
98645,
17,
6904,
8,
353,
98645,
17,
6904,
341,
197,
7727,
10600,
10538,
284,
220,
16,
198,
197,
853,
384,
198,
197,
630,
3244,
83,
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 TestValueKind(t *testing.T) {
t.Parallel()
ctx := NewIsolate().NewContext()
// WASM: This wasm code corresponds to the WAT:
// (module
// (func $add (param $x i32) (param $y i32) (result i32)
// (i32.add (get_local $x) (get_local $y)))
// (export "add" $add))
// That exports an "add(a... | explode_data.jsonl/81591 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1903
} | [
2830,
3393,
1130,
10629,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
1532,
3872,
33066,
1005,
3564,
1972,
2822,
197,
322,
37776,
44,
25,
1096,
98263,
2038,
33210,
311,
279,
467,
828,
510,
197,
322,
256,
320,
435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestPeerConnection_RoleSwitch(t *testing.T) {
api := NewAPI()
lim := test.TimeOut(time.Second * 30)
defer lim.Stop()
report := test.CheckRoutines(t)
defer report()
api.mediaEngine.RegisterDefaultCodecs()
pcFirstOfferer, pcSecondOfferer, err := api.newPair(Configuration{})
if err != nil {
t.Fatal(err)
... | explode_data.jsonl/3771 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 455
} | [
2830,
3393,
30888,
4526,
2568,
1263,
16837,
1155,
353,
8840,
836,
8,
341,
54299,
1669,
1532,
7082,
741,
197,
4659,
1669,
1273,
16299,
2662,
9730,
32435,
353,
220,
18,
15,
340,
16867,
4568,
30213,
2822,
69931,
1669,
1273,
10600,
49,
2862... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAuthEnable(t *testing.T) {
config.Load()
postgres.Load()
config.PrestConf.AuthEnabled = true
server := httptest.NewServer(initAuthRoutes())
defer server.Close()
var testCases = []struct {
description string
url string
method string
status int
}{
{"/auth request GET method",... | explode_data.jsonl/35852 | {
"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,
5087,
11084,
1155,
353,
8840,
836,
8,
341,
25873,
13969,
741,
197,
43070,
13969,
741,
25873,
1069,
3927,
15578,
25233,
5462,
284,
830,
271,
41057,
1669,
54320,
70334,
7121,
5475,
38250,
5087,
26653,
2398,
16867,
3538,
10421,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.