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 TestCT_FieldConstructor(t *testing.T) {
v := sml.NewCT_Field()
if v == nil {
t.Errorf("sml.NewCT_Field must return a non-nil value")
}
if err := v.Validate(); err != nil {
t.Errorf("newly constructed sml.CT_Field should validate: %s", err)
}
} | explode_data.jsonl/22909 | {
"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,
1162,
46272,
13288,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
274,
1014,
7121,
1162,
46272,
741,
743,
348,
621,
2092,
341,
197,
3244,
13080,
445,
82,
1014,
7121,
1162,
46272,
1969,
470,
264,
2477,
83248,
897,
1138,
197,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestVerifyInvalidTokenWindowAndAud(t *testing.T) {
tokenIsValidWindow, errTokenPayload := VerifyToken(lateTokenTest, &testLocalSessions, nil)
if tokenIsValidWindow {
t.Fail()
t.Logf("token window should not be valid")
}
if errTokenPayload != nil {
t.Fail()
t.Logf(errTokenPayload.Error())
}
} | explode_data.jsonl/11054 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 114
} | [
2830,
3393,
32627,
7928,
3323,
4267,
3036,
52949,
1155,
353,
8840,
836,
8,
341,
43947,
55470,
4267,
11,
1848,
3323,
29683,
1669,
25429,
3323,
2333,
349,
3323,
2271,
11,
609,
1944,
7319,
59062,
11,
2092,
340,
743,
3950,
55470,
4267,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestProjectCreation(t *testing.T) {
fixture.EnsureCleanState(t)
projectName := "proj-" + fixture.Name()
_, err := fixture.RunCli("proj", "create", projectName,
"--description", "Test description",
"-d", "https://192.168.99.100:8443,default",
"-d", "https://192.168.99.100:8443,service",
"-s", "https://g... | explode_data.jsonl/58438 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 784
} | [
2830,
3393,
7849,
32701,
1155,
353,
8840,
836,
8,
341,
1166,
12735,
22834,
19098,
27529,
1397,
1155,
692,
72470,
675,
1669,
330,
30386,
27651,
488,
12507,
2967,
741,
197,
6878,
1848,
1669,
12507,
16708,
87014,
445,
30386,
497,
330,
3182,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPlanCacheHitInfo(t *testing.T) {
t.Skip("unstable, skip it and fix it before 20210705")
store, clean := testkit.CreateMockStore(t)
defer clean()
orgEnable := core.PreparedPlanCacheEnabled()
defer core.SetPreparedPlanCache(orgEnable)
core.SetPreparedPlanCache(true)
se, err := session.CreateSession4TestWi... | explode_data.jsonl/5513 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 700
} | [
2830,
3393,
20485,
8233,
19498,
1731,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
445,
359,
27992,
11,
10706,
432,
323,
5046,
432,
1573,
220,
17,
15,
17,
16,
15,
22,
15,
20,
1138,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCommandsHaveSynopsis(t *testing.T) {
for _, c := range allCommands(RootCmd) {
t.Run(fmt.Sprintf("test short description of command %s", c.Name()), func(t *testing.T) {
assert.NotEmpty(t, c.Short)
})
}
} | explode_data.jsonl/50282 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 89
} | [
2830,
3393,
30479,
12116,
89070,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
272,
1669,
2088,
678,
30479,
2785,
1905,
15613,
8,
341,
197,
3244,
16708,
28197,
17305,
445,
1944,
2805,
4008,
315,
3210,
1018,
82,
497,
272,
2967,
11858,
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 |
func TestGenerateModel_NotaWithName(t *testing.T) {
specDoc, err := loads.Spec("../fixtures/codegen/todolist.models.yml")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
k := "NotaWithName"
schema := definitions[k]
opts := opts()
genModel, err := makeGenDefinition(k, "models", schema, specDoc,... | explode_data.jsonl/2502 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 561
} | [
2830,
3393,
31115,
1712,
1604,
6089,
54523,
1155,
353,
8840,
836,
8,
341,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
46928,
4370,
5523,
347,
34675,
8235,
33936,
1138,
17957,
35699,
1155,
11,
1848,
692,
7452,
4054,
82,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestFormatValue_Set(t *testing.T) {
value := new(formatValue)
cases := []struct {
in string
err bool
}{
{
in: "Foo",
err: true,
},
}
for _, format := range config.GetEncodings() {
cases = append(
cases,
struct {
in string
err bool
}{in: format, err: false})
}
for _, c :... | explode_data.jsonl/19129 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 300
} | [
2830,
3393,
4061,
1130,
14812,
1155,
353,
8840,
836,
8,
341,
16309,
1669,
501,
20698,
1130,
340,
1444,
2264,
1669,
3056,
1235,
341,
197,
17430,
220,
914,
198,
197,
9859,
1807,
198,
197,
59403,
197,
197,
515,
298,
17430,
25,
220,
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... | 4 |
func TestRuntimeValueLocationStack_basic(t *testing.T) {
s := newRuntimeValueLocationStack()
// Push stack value.
loc := s.pushRuntimeValueLocationOnStack()
require.Equal(t, uint64(1), s.sp)
require.Equal(t, uint64(0), loc.stackPointer)
// Push the register value.
tmpReg := unreservedGeneralPurposeRegisters[0]
... | explode_data.jsonl/4603 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 577
} | [
2830,
3393,
15123,
1130,
4707,
4336,
34729,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
501,
15123,
1130,
4707,
4336,
741,
197,
322,
22950,
5611,
897,
624,
71128,
1669,
274,
2552,
15123,
1130,
4707,
1925,
4336,
741,
17957,
12808,
1155,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_authentication(t *testing.T) {
fakeMatchingReg := regexp.MustCompile(".*fake")
validAuthCfg := &config.OIDCAuthConfig{
ClientID: "client-with-secret",
ClientSecret: &config.CredentialConfig{Value: "565f78f2-a706-41cd-a1a0-431d7df29443"},
CookieName: "oidc",
EmailVerified: false,
RedirectU... | explode_data.jsonl/27896 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3298
} | [
2830,
3393,
89465,
1155,
353,
8840,
836,
8,
341,
1166,
726,
64430,
3477,
1669,
41877,
98626,
445,
4908,
30570,
1138,
56322,
5087,
42467,
1669,
609,
1676,
8382,
915,
5049,
940,
2648,
515,
197,
71724,
915,
25,
414,
330,
2972,
26189,
68892... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsogrids(t *testing.T) {
t.Parallel()
r := new(route.Router)
r.HandleFunc("/isogrids/:key", Isogrids)
test := tgTesting.GenerateHandlerFunc(t, Isogrids)
for _, p := range tgTesting.GoodParams {
recorder := test("/isogrids/test", "GET", p, r)
if recorder.Code != http.StatusOK {
t.Errorf("returned %... | explode_data.jsonl/67874 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 251
} | [
2830,
3393,
3872,
538,
1869,
82,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
7000,
1669,
501,
31436,
31413,
340,
7000,
63623,
4283,
285,
538,
1869,
82,
11315,
792,
497,
2160,
538,
1869,
82,
692,
18185,
1669,
53188,
16451,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRefValMarshal(t *testing.T) {
testtype.SkipUnlessTestType(t, testtype.UnitTestType)
var s = struct {
R0 Ref
R1 *Ref
R2 RefText
R3 *RefText
V0 Val
V1 *Val
V2 ValText
V3 *ValText
}{
R0: 12,
R1: new(Ref),
R2: 14,
R3: new(RefText),
V0: 13,
V1: new(Val),
V2: 15,
V3: new(ValText),... | explode_data.jsonl/4566 | {
"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,
3945,
2208,
55438,
1155,
353,
8840,
836,
8,
341,
18185,
1313,
57776,
35587,
2271,
929,
1155,
11,
1273,
1313,
25159,
2271,
929,
692,
2405,
274,
284,
2036,
341,
197,
11143,
15,
8550,
198,
197,
11143,
16,
353,
3945,
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 TestParseSemicolonsBetweenDeclarations(t *testing.T) {
t.Parallel()
_, errs := ParseProgram(`
import from from 0x0;
fun foo() {};
`)
require.Empty(t, errs)
} | explode_data.jsonl/35987 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 83
} | [
2830,
3393,
14463,
50,
8111,
337,
2382,
25477,
1912,
49121,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
197,
6878,
70817,
1669,
14775,
10690,
61528,
286,
1159,
504,
504,
220,
15,
87,
15,
280,
286,
2464,
15229,
368,
9321,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandleIndex(t *testing.T) {
t.Parallel()
ctx := project.TestContext(t)
harness := envstest.NewServerConfig(t, testDatabaseInstance)
c := apikey.New(harness.Cacher, harness.Database, harness.Renderer)
handler := harness.WithCommonMiddlewares(c.HandleIndex())
t.Run("middleware", func(t *testing.T) {
t... | explode_data.jsonl/18674 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 862
} | [
2830,
3393,
6999,
1552,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20985,
1669,
2390,
8787,
1972,
1155,
340,
9598,
23518,
1669,
6105,
267,
477,
7121,
5475,
2648,
1155,
11,
1273,
5988,
2523,
692,
1444,
1669,
6330,
792,
7121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCloneUsingOverlayfs(t *testing.T) {
if !supported("overlayfs") {
t.Skip("skipping test as overlayfs support is missing.")
}
c, err := NewContainer(ContainerName)
if err != nil {
t.Errorf(err.Error())
}
err = c.Clone(ContainerCloneOverlayName, CloneOptions{
Backend: Overlayfs,
KeepName: true,
... | explode_data.jsonl/2739 | {
"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,
37677,
16429,
32755,
3848,
1155,
353,
8840,
836,
8,
341,
743,
753,
18216,
445,
21118,
3848,
899,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
438,
24629,
3848,
1824,
374,
7402,
13053,
197,
630,
1444,
11,
1848,
1669,
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... | 4 |
func TestDeactivatePreviousTask(t *testing.T) {
Convey("With two tasks and a build", t, func() {
require.NoError(t, db.ClearCollections(task.Collection, build.Collection),
"Error clearing task and build collections")
// create two tasks
displayName := "testTask"
userName := "user"
b := &build.Build{
Id... | explode_data.jsonl/60428 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3561
} | [
2830,
3393,
1912,
16856,
21291,
6262,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2354,
1378,
9079,
323,
264,
1936,
497,
259,
11,
2915,
368,
341,
197,
17957,
35699,
1155,
11,
2927,
13524,
52730,
17483,
28629,
11,
1936,
28629,
1326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestThirdPartyResourceDataListEncoding(t *testing.T) {
gv := schema.GroupVersion{Group: "stable.foo.faz", Version: "v1"}
gvk := gv.WithKind("Bar")
e := &thirdPartyResourceDataEncoder{delegate: testapi.Extensions.Codec(), gvk: gvk}
subject := &extensions.ThirdPartyResourceDataList{}
buf := bytes.NewBuffer([]b... | explode_data.jsonl/71559 | {
"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,
36975,
37361,
4783,
1043,
852,
14690,
1155,
353,
8840,
836,
8,
341,
3174,
85,
1669,
10802,
5407,
5637,
90,
2808,
25,
330,
27992,
58432,
833,
1370,
497,
6079,
25,
330,
85,
16,
16707,
3174,
48363,
1669,
54979,
26124,
10629,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func Test_metricsForwarder_getSecretsFromCache(t *testing.T) {
type args struct {
encAPIKey string
encAPPKey string
}
tests := []struct {
name string
cached map[string]string
args args
want string
want1 string
want2 bool
}{
{
name: "cache hit",
cached: map[string]string{
"apiKey"... | explode_data.jsonl/8877 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 899
} | [
2830,
3393,
37686,
25925,
261,
3062,
19773,
82,
3830,
8233,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
197,
954,
7082,
1592,
914,
198,
197,
197,
954,
14707,
1592,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestReconcile_PipelineSpecTaskSpec(t *testing.T) {
// TestReconcile_PipelineSpecTaskSpec runs "Reconcile" on a PipelineRun that has an embedded PipelineSpec that has an embedded TaskSpec.
// It verifies that a TaskRun is created, it checks the resulting API actions, status and events.
testCases := []struct {
... | explode_data.jsonl/27277 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 386
} | [
2830,
3393,
693,
40446,
457,
1088,
8790,
8327,
6262,
8327,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
693,
40446,
457,
1088,
8790,
8327,
6262,
8327,
8473,
330,
693,
40446,
457,
1,
389,
264,
40907,
6727,
429,
702,
458,
22864,
40907,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetupMutualTLS(t *testing.T) {
assert := assert.New(t)
type setupMutualTLStest struct {
certPem []byte
keyPem []byte
ca []byte
expectedError string
}
cache := make(map[certificate.CommonName]certificate.Certificater)
certManager := tresor.NewFakeCertManager(&cache, nil)
... | explode_data.jsonl/3390 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 454
} | [
2830,
3393,
21821,
51440,
928,
45439,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
13158,
6505,
51440,
928,
13470,
623,
477,
2036,
341,
197,
1444,
529,
47,
336,
981,
3056,
3782,
198,
197,
23634,
47,
336,
286,
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 TestEtcdCreateServiceAlreadyExisting(t *testing.T) {
ctx := api.NewDefaultContext()
fakeClient := tools.NewFakeEtcdClient(t)
key, _ := makeServiceKey(ctx, "foo")
fakeClient.Set(key, runtime.EncodeOrDie(latest.Codec, &api.Service{TypeMeta: api.TypeMeta{ID: "foo"}}), 0)
registry := NewTestEtcdRegistry(fakeClien... | explode_data.jsonl/8166 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
31860,
4385,
4021,
1860,
38370,
53067,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6330,
7121,
3675,
1972,
741,
1166,
726,
2959,
1669,
7375,
7121,
52317,
31860,
4385,
2959,
1155,
340,
23634,
11,
716,
1669,
1281,
1860,
1592,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDefaultAutoIncrementer(t *testing.T) {
sut := jsonrpc.NewAutoIncrementID(0)
var want uint64
for ; want < 100; want++ {
got := sut.Generate()
if got != want {
t.Fatalf("want=%d, got=%d", want, got)
}
}
} | explode_data.jsonl/1080 | {
"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,
3675,
13253,
38311,
261,
1155,
353,
8840,
836,
8,
341,
1903,
332,
1669,
2951,
29414,
7121,
13253,
38311,
915,
7,
15,
340,
2405,
1366,
2622,
21,
19,
198,
2023,
2587,
1366,
366,
220,
16,
15,
15,
26,
1366,
1027,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCaseInsensitiveSet(t *testing.T) {
Reset()
m1 := map[string]interface{}{
"Foo": 32,
"Bar": map[interface{}]interface {
}{
"ABc": "A",
"cDE": "B"},
}
m2 := map[string]interface{}{
"Foo": 52,
"Bar": map[interface{}]interface {
}{
"bCd": "A",
"eFG": "B"},
}
Set("Given1", m1)
Set("... | explode_data.jsonl/5594 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 486
} | [
2830,
30573,
75293,
1649,
1155,
353,
8840,
836,
8,
341,
197,
14828,
741,
2109,
16,
1669,
2415,
14032,
31344,
67066,
197,
197,
1,
40923,
788,
220,
18,
17,
345,
197,
197,
1,
3428,
788,
2415,
58,
4970,
78134,
4970,
341,
197,
197,
59403... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceParameterCompletionHandler(t *testing.T) {
serviceClassList := &scv1beta1.ClusterServiceClassList{
Items: []scv1beta1.ClusterServiceClass{testingutil.FakeClusterServiceClass("class name", "dummy")},
}
tests := []struct {
name string
returnedServiceClass *scv1beta1.ClusterService... | explode_data.jsonl/3546 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1804
} | [
2830,
3393,
1860,
4971,
33190,
3050,
1155,
353,
8840,
836,
8,
341,
52934,
1957,
852,
1669,
609,
2388,
85,
16,
19127,
16,
72883,
1860,
1957,
852,
515,
197,
197,
4353,
25,
3056,
2388,
85,
16,
19127,
16,
72883,
1860,
1957,
90,
8840,
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 TestNextTicket(tst *testing.T) {
t, err := nextTicket()
lastTickNum++
if err != nil {
tst.Errorf("nextTicket() returned error %v", err)
}
if t.TicketNum != lastTickNum {
tst.Errorf("nextTicket() returned a ticket identifying itself as # %d. Expected %d", t.TicketNum, lastTickNum)
lastTickNum = t.Ticket... | explode_data.jsonl/35912 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 215
} | [
2830,
3393,
5847,
34058,
1155,
267,
353,
8840,
836,
8,
341,
3244,
11,
1848,
1669,
1790,
34058,
741,
33096,
22213,
4651,
22940,
743,
1848,
961,
2092,
341,
197,
3244,
267,
13080,
445,
3600,
34058,
368,
5927,
1465,
1018,
85,
497,
1848,
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... | 4 |
func TestFloat(t *testing.T) {
{
var v, r float32
v = 0
if err := encdec(v, &r, func(code byte) bool {
return code == def.Float32
}); err != nil {
t.Error(err)
}
}
{
var v, r float32
v = -1
if err := encdec(v, &r, func(code byte) bool {
return code == def.Float32
}); err != nil {
t.Erro... | explode_data.jsonl/64209 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 947
} | [
2830,
3393,
5442,
1155,
353,
8840,
836,
8,
341,
197,
515,
197,
2405,
348,
11,
435,
2224,
18,
17,
198,
197,
5195,
284,
220,
15,
198,
197,
743,
1848,
1669,
3209,
8169,
3747,
11,
609,
81,
11,
2915,
15842,
4922,
8,
1807,
341,
298,
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 TestFilterGroupKind(t *testing.T) {
filter := FilterGroupKind(gvk.GroupKind())
tests := []struct {
name string
input interface{}
want bool
}{{
name: "not a metav1.Object",
input: "foo",
}, {
name: "nil",
input: nil,
}, {
name: "no owner reference",
input: &Resource{
ObjectMeta: metav... | explode_data.jsonl/45280 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1061
} | [
2830,
3393,
5632,
2808,
10629,
1155,
353,
8840,
836,
8,
341,
50108,
1669,
12339,
2808,
10629,
3268,
48363,
5407,
10629,
12367,
78216,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
22427,
3749,
16094,
197,
50780,
220,
1807,
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 TestGetContainerInfo(t *testing.T) {
containerID := "ab2cdf"
containerPath := fmt.Sprintf("/docker/%v", containerID)
containerInfo := cadvisorapi.ContainerInfo{
ContainerReference: cadvisorapi.ContainerReference{
Name: containerPath,
},
}
testKubelet := newTestKubelet(t)
fakeRuntime := testKubelet.fa... | explode_data.jsonl/43302 | {
"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,
1949,
4502,
1731,
1155,
353,
8840,
836,
8,
341,
53290,
915,
1669,
330,
370,
17,
58348,
698,
53290,
1820,
1669,
8879,
17305,
4283,
28648,
12627,
85,
497,
5476,
915,
340,
53290,
1731,
1669,
19409,
38012,
2068,
33672,
1731,
515... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFillBasicData(t *testing.T) {
_, back := testlib.Mktmp(t)
defer back()
testlib.GitInit(t)
testlib.GitRemoteAdd(t, "git@github.com:goreleaser/goreleaser.git")
var ctx = &context.Context{
TokenType: context.TokenTypeGitHub,
Config: config.Project{},
}
require.NoError(t, Pipe{}.Run(ctx))
require.... | explode_data.jsonl/35899 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 515
} | [
2830,
3393,
14449,
15944,
1043,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1182,
1669,
1273,
2740,
1321,
74,
5173,
1155,
340,
16867,
1182,
741,
18185,
2740,
1224,
275,
3803,
1155,
340,
18185,
2740,
1224,
275,
24703,
2212,
1155,
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 |
func TestParamSubstitutionWithArtifact(t *testing.T) {
wf := test.LoadE2EWorkflow("functional/param-sub-with-artifacts.yaml")
woc := newWoc(*wf)
ctx := context.Background()
woc.operate(ctx)
wf, err := woc.controller.wfclientset.ArgoprojV1alpha1().Workflows("").Get(ctx, wf.ObjectMeta.Name, metav1.GetOptions{})
ass... | explode_data.jsonl/70980 | {
"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,
2001,
3136,
10446,
2354,
85578,
1155,
353,
8840,
836,
8,
341,
6692,
69,
1669,
1273,
13969,
36,
17,
36,
62768,
445,
49228,
14,
903,
17967,
26189,
37821,
26401,
33406,
1138,
6692,
509,
1669,
501,
54,
509,
4071,
43083,
340,
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 TestAgentValidator_EntityGUID(t *testing.T) {
t.Parallel()
response := `{"GUID":"MTA5ODI2NzB8SU5GUkF8TkF8Nzc0NTc3NjI1NjYyNzI5NzYzNw"}`
f := utils.CreateMockHTTPDoFunc(response, 200, nil)
c := utils.NewMockHTTPClient(f)
av := NewAgentValidator()
av.fn = getMockClientFunc(c)
ctx := context.Background()
re... | explode_data.jsonl/8245 | {
"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,
16810,
14256,
89618,
41778,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
21735,
1669,
1565,
4913,
41778,
3252,
8505,
32,
20,
2069,
40,
17,
45,
89,
33,
23,
59782,
20,
54695,
74,
37,
23,
75292,
37,
23,
45,
34968,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQueryNonExistingKey(t *testing.T) {
cache := newTestCache(t)
rr := cache.queryJson("FOO", map[string]string{}, "{}", "GET", nil)
if rr.Code != http.StatusNotFound {
t.Errorf("Unexpected status code: %v", rr.Code)
}
stats := cache.statistics()
assertEqual(t, 1, stats.MissCount)
} | explode_data.jsonl/8987 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
2859,
8121,
53067,
1592,
1155,
353,
8840,
836,
8,
341,
52680,
1669,
501,
2271,
8233,
1155,
340,
197,
634,
1669,
6500,
4786,
5014,
445,
3788,
46,
497,
2415,
14032,
30953,
22655,
35503,
497,
330,
3806,
497,
2092,
340,
743,
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... | 2 |
func TestNewBlockSigs(t *testing.T) {
db, closeDB := testutil.PrepareDB(t)
defer closeDB()
sigs, err := newBlockSigs(db)
require.NoError(t, err)
require.NotNil(t, sigs)
// check the bucket
require.NotNil(t, sigs.Sigs)
db.View(func(tx *bolt.Tx) error {
bkt := tx.Bucket(blockSigsBkt)
require.NotNil(t, bkt)... | explode_data.jsonl/798 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 154
} | [
2830,
3393,
3564,
4713,
50,
14462,
1155,
353,
8840,
836,
8,
341,
20939,
11,
3265,
3506,
1669,
1273,
1314,
28770,
3380,
3506,
1155,
340,
16867,
3265,
3506,
2822,
1903,
14462,
11,
1848,
1669,
501,
4713,
50,
14462,
9791,
340,
17957,
35699,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReconcileIngressClassAnnotation(t *testing.T) {
var reconciler *Reconciler
ctx, _, _, _, cancel := newTestSetup(t, func(r *Reconciler) {
reconciler = r
})
defer cancel()
const expClass = "foo.ingress.networking.knative.dev"
r := Route("test-ns", "test-route")
ci := newTestIngress(t, r)
if _, err :=... | explode_data.jsonl/64528 | {
"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,
693,
40446,
457,
641,
2483,
1957,
19711,
1155,
353,
8840,
836,
8,
341,
2405,
31445,
5769,
353,
693,
40446,
5769,
198,
20985,
11,
8358,
8358,
8358,
9121,
1669,
501,
2271,
21821,
1155,
11,
2915,
2601,
353,
693,
40446,
5769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTextfileFetchUrls(t *testing.T) {
if _, err := LoaderT.FetchUrls(); err == nil {
t.Error("FetchUrls should have failed as no path has been set yet")
}
textfile_path = "example.urls.txt"
if urls, err := LoaderT.FetchUrls(); err != nil {
t.Error("Shouldnt have returned an error - a valid path has been s... | explode_data.jsonl/71183 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
1178,
1192,
20714,
15638,
1155,
353,
8840,
836,
8,
341,
743,
8358,
1848,
1669,
27811,
51,
78506,
15638,
2129,
1848,
621,
2092,
341,
197,
3244,
6141,
445,
20714,
15638,
1265,
614,
4641,
438,
902,
1815,
702,
1012,
738,
3602,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddMultiColumnsIndex(t *testing.T) {
store, clean := testkit.CreateMockStoreWithSchemaLease(t, columnModifyLease)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("drop database if exists tidb;")
tk.MustExec("create database tidb;")
tk.MustExec("use tidb;")
tk.MustExec("create table tidb.tes... | explode_data.jsonl/51320 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 335
} | [
2830,
3393,
2212,
20358,
13965,
1552,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
2354,
8632,
2304,
519,
1155,
11,
3250,
44427,
2304,
519,
340,
16867,
4240,
741,
3244,
74,
1669,
1273,
8226,
7121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestApi(t *testing.T) {
var cover = &basicCover{}
var ct = MustNew(cover)
var dec = NewDecoder()
var enc = NewEncoder()
dec.Runner.Register("An_size", func(...interface{}) interface{} {
return 4 + 2
})
dec.Runner.Register("Array_length", func(s ...interface{}) interface{} {
r := s[0].(*basicCover)
... | explode_data.jsonl/67894 | {
"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,
6563,
1155,
353,
8840,
836,
8,
341,
2405,
3421,
284,
609,
22342,
30896,
16094,
2405,
20251,
284,
15465,
3564,
7,
3688,
340,
2405,
1622,
284,
1532,
20732,
741,
2405,
3209,
284,
1532,
19921,
2822,
197,
8169,
16708,
1194,
19983... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogInfo_Public(t *testing.T) {
var config = NewConfig()
config.Proxy = "test"
actual, err := config.PublicFields()
assert.NoError(t, err)
actualVal, exists := actual["proxy"]
assert.True(t, exists)
assert.Equal(t, "test", actualVal)
} | explode_data.jsonl/22926 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
2201,
1731,
73905,
1155,
353,
8840,
836,
8,
341,
2405,
2193,
284,
1532,
2648,
741,
25873,
75200,
284,
330,
1944,
1837,
88814,
11,
1848,
1669,
2193,
49139,
8941,
741,
6948,
35699,
1155,
11,
1848,
692,
88814,
2208,
11,
6724,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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(t *testing.T) {
fixture := consulutil.NewFixture(t)
defer fixture.Stop()
store := newStore(fixture.Client.KV())
// Create first DaemonSet
firstPodID := types.PodID("some_pod_id")
minHealth := 0
clusterName := ds_fields.ClusterName("some_name")
azLabel := pc_fields.AvailabilityZone("some_zone")
... | explode_data.jsonl/3472 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 762
} | [
2830,
3393,
852,
1155,
353,
8840,
836,
8,
341,
1166,
12735,
1669,
74189,
1314,
7121,
18930,
1155,
340,
16867,
12507,
30213,
741,
57279,
1669,
501,
6093,
94886,
11716,
11352,
53,
12367,
197,
322,
4230,
1156,
92236,
1649,
198,
42190,
23527,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvalidAdminOUNotAClient(t *testing.T) {
//测试数据/节点4:
//配置启用nodeous,而admin不是客户机
thisMSP, err := getLocalMSPWithVersionAndError(t, "testdata/nodeous8", MSPv1_1)
assert.True(t, thisMSP.(*bccspmsp).ouEnforcement)
assert.Error(t, err)
assert.Contains(t, err.Error(), "The identity does not contain OU [CLIENT]")
... | explode_data.jsonl/2654 | {
"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,
7928,
7210,
5044,
354,
1706,
1451,
1155,
353,
8840,
836,
8,
341,
322,
81705,
20074,
14,
92374,
19,
28311,
322,
85767,
111456,
3509,
782,
3837,
68536,
2882,
99520,
100017,
32648,
198,
2046,
44,
4592,
11,
1848,
1669,
633,
7319... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseJavaPomProperties(t *testing.T) {
tests := []struct {
fixture string
expected pkg.PomProperties
}{
{
fixture: "test-fixtures/pom/small.pom.properties",
expected: pkg.PomProperties{
Path: "test-fixtures/pom/small.pom.properties",
GroupID: "org.anchore",
ArtifactID: "exam... | explode_data.jsonl/46792 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 701
} | [
2830,
3393,
14463,
15041,
47,
316,
7903,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
1166,
12735,
220,
914,
198,
197,
42400,
24793,
1069,
316,
7903,
198,
197,
59403,
197,
197,
515,
298,
1166,
12735,
25,
330,
1944,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetTags(t *testing.T) {
ts := mockServer()
defer ts.Close()
client := ts.Client()
c := mockClient{basicHTTPClient{client: client, baseURL: ts.URL}}
tests := []struct {
image string
expectedTags int
notFound bool
}{
{image: "alpine", expectedTags: 12},
{image: "alpine", expectedTags... | explode_data.jsonl/22559 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 392
} | [
2830,
3393,
1949,
15930,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
7860,
5475,
741,
16867,
10591,
10421,
2822,
25291,
1669,
10591,
11716,
741,
1444,
1669,
7860,
2959,
90,
22342,
9230,
2959,
90,
2972,
25,
2943,
11,
56741,
25,
10591,
208... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPopulateClients(t *testing.T) {
w := testWorkflow()
initialComputeClient := w.ComputeClient
w.PopulateClients(context.Background())
if w.ComputeClient != initialComputeClient {
t.Errorf("Should not repopulate compute client.")
}
w.ComputeClient = nil
w.PopulateClients(context.Background())
if w.Com... | explode_data.jsonl/8059 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 422
} | [
2830,
3393,
11598,
6334,
47174,
1155,
353,
8840,
836,
8,
341,
6692,
1669,
1273,
62768,
2822,
85270,
46254,
2959,
1669,
289,
89237,
2959,
198,
6692,
47424,
6334,
47174,
5378,
19047,
2398,
743,
289,
89237,
2959,
961,
2856,
46254,
2959,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestGetFlaggedPostsForUser(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
Client := th.Client
user := th.BasicUser
team1 := th.BasicTeam
channel1 := th.BasicChannel
post1 := th.CreatePost()
channel2 := th.CreatePublicChannel()
post2 := th.CreatePostWithClient(Client, channel2)
preference... | explode_data.jsonl/5250 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2184
} | [
2830,
3393,
1949,
12135,
3556,
19631,
2461,
1474,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
198,
19060,
1669,
270,
48868,
1474,
198,
197,
919... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHelmSetEnv(t *testing.T) {
Given(t).
Path("helm-values").
When().
Create().
AppSet("--helm-set", "foo=$ARGOCD_APP_NAME").
Sync().
Then().
Expect(OperationPhaseIs(OperationSucceeded)).
Expect(SyncStatusIs(SyncStatusCodeSynced)).
And(func(app *Application) {
assert.Equal(t, Name(), FailOnEr... | explode_data.jsonl/69408 | {
"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,
39,
23162,
1649,
14359,
1155,
353,
8840,
836,
8,
341,
9600,
2071,
1155,
4292,
197,
69640,
445,
51899,
69050,
38609,
197,
197,
4498,
25829,
197,
75569,
25829,
197,
59557,
1649,
21549,
51899,
24096,
497,
330,
7975,
3186,
7581,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVestingAccountSend(t *testing.T) {
input := setupTestInput()
now := tmtime.Now()
ctx := input.ctx.WithBlockHeader(abci.Header{Time: now})
endTime := now.Add(24 * time.Hour)
origCoins := sdk.NewCoins(sdk.NewInt64Coin("hsn", 100))
sendCoins := sdk.NewCoins(sdk.NewInt64Coin("hsn", 50))
addr1 := sdk.AccAd... | explode_data.jsonl/3532 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 432
} | [
2830,
3393,
53,
59855,
7365,
11505,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
6505,
2271,
2505,
741,
80922,
1669,
17333,
1678,
13244,
741,
20985,
1669,
1946,
30608,
26124,
4713,
4047,
56085,
5855,
15753,
90,
1462,
25,
1431,
3518,
6246,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ContainsSet(t *testing.T) {
a := NewSet()
a.Add(71)
if !a.Contains(71) {
t.Error("ContainsSet should contain 71")
}
a.Remove(71)
if a.Contains(71) {
t.Error("ContainsSet should not contain 71")
}
a.Add(13)
a.Add(7)
a.Add(1)
if !(a.Contains(13) && a.Contains(7) && a.Contains(1)) {
t.Erro... | explode_data.jsonl/174 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 171
} | [
2830,
3393,
62,
23805,
1649,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
1532,
1649,
2822,
11323,
1904,
7,
22,
16,
692,
743,
753,
64,
11545,
7,
22,
16,
8,
341,
197,
3244,
6141,
445,
23805,
1649,
1265,
6644,
220,
22,
16,
1138,
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... | 6 |
func TestDefaultPolicy(t *testing.T) {
// We can't test the actual systemDefaultPolicyPath, so override.
// TestDefaultPolicyPath below tests that we handle the overrides and defaults
// correctly.
// Success
policy, err := DefaultPolicy(&types.SystemContext{SignaturePolicyPath: "./fixtures/policy.json"})
requir... | explode_data.jsonl/36489 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 226
} | [
2830,
3393,
3675,
13825,
1155,
353,
8840,
836,
8,
341,
197,
322,
1205,
646,
944,
1273,
279,
5042,
1849,
3675,
13825,
1820,
11,
773,
2812,
624,
197,
322,
3393,
3675,
13825,
1820,
3685,
7032,
429,
582,
3705,
279,
35455,
323,
16674,
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 TestLoadMultipleServiceNetworks(t *testing.T) {
networkCases := []struct {
name string
networkBase map[string]interface{}
networkOverride map[string]interface{}
expected map[string]*types.ServiceNetworkConfig
}{
{
name: "no_override",
networkBase: map[string]interface{}{
... | explode_data.jsonl/59634 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1303
} | [
2830,
3393,
5879,
32089,
1860,
12320,
82,
1155,
353,
8840,
836,
8,
341,
9038,
2349,
37302,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
9038,
2349,
3978,
257,
2415,
14032,
31344,
16094,
197,
9038,
2349,
2177,
2415,
14032,
3134... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContext2Plan_ignoreChangesWithFlatmaps(t *testing.T) {
m := testModule(t, "plan-ignore-changes-with-flatmaps")
p := testProvider("aws")
p.DiffFn = testDiffFn
p.GetSchemaReturn = &ProviderSchema{
ResourceTypes: map[string]*configschema.Block{
"aws_instance": {
Attributes: map[string]*configschema.A... | explode_data.jsonl/28720 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1154
} | [
2830,
3393,
1972,
17,
20485,
58493,
11317,
2354,
31019,
17640,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1273,
3332,
1155,
11,
330,
10393,
43171,
11582,
5520,
26189,
65468,
17640,
1138,
3223,
1669,
1273,
5179,
445,
8635,
1138,
3223,
98063... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetProtocol(t *testing.T) {
orchestrator := getOrchestrator(t)
type accessVariables struct {
volumeMode config.VolumeMode
accessMode config.AccessMode
protocol config.Protocol
expected config.Protocol
}
var accessModesPositiveTests = []accessVariables{
{config.Filesystem, config.ModeAny, co... | explode_data.jsonl/62762 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1022
} | [
2830,
3393,
1949,
20689,
1155,
353,
8840,
836,
8,
341,
197,
21584,
15111,
850,
1669,
633,
2195,
331,
15111,
850,
1155,
692,
13158,
2615,
22678,
2036,
341,
197,
5195,
4661,
3636,
2193,
79106,
3636,
198,
197,
197,
5211,
3636,
2193,
35645,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestV2Register(t *testing.T) {
// urlEncoded := "dubbo%3A%2F%2F192.168.1.98%3A20880%2Forg.apache.dubbo.demo.DemoService%3Fanyhost%3Dtrue%26application%3Ddubbo-demo-api-provider%26default%3Dtrue%26deprecated%3Dfalse%26dubbo%3D2.0.2%26dynamic%3Dtrue%26generic%3Dfalse%26interface%3Dorg.apache.dubbo.demo.DemoService%... | explode_data.jsonl/71193 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1168
} | [
2830,
3393,
53,
17,
8690,
1155,
353,
8840,
836,
8,
341,
197,
322,
2515,
46795,
1669,
330,
67,
97737,
4,
18,
32,
4,
17,
37,
4,
17,
37,
16,
24,
17,
13,
16,
21,
23,
13,
16,
13,
24,
23,
4,
18,
32,
17,
15,
23,
23,
15,
4,
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... | 1 |
func TestIotaGetBalances(t *testing.T) {
InitTest()
TestIotaGetInput(t)
addrs := []string{
"OLCHRMEFITACDJWFTSIQWPOUWZIPCTEFUPEXTMDELUCAXENBDWIINONPFXHRTIUMVAU99VNERAVVQYYXCWXPXRGAYD",
}
Balances, err := Lin.API.GetBalances(addrs)
if err != nil {
fmt.Println("GetBalances err ", err.Error())
} else {
fmt.Pr... | explode_data.jsonl/15330 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
40,
6089,
1949,
37889,
3020,
1155,
353,
8840,
836,
8,
341,
98762,
2271,
741,
73866,
40,
6089,
1949,
2505,
1155,
340,
12718,
5428,
1669,
3056,
917,
515,
197,
197,
1,
1930,
67196,
7462,
67754,
1706,
53272,
54,
3994,
13817,
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... | 2 |
func Test_Logout__should_clear_the_auth_cookie(t *testing.T) {
setup := setupTest(t, nil)
defer setup.ctrl.Finish()
mockRenderPageCall(setup)
testutils.AddRequestWithFormParamsToCtx(setup.testCtx, http.MethodGet, nil)
setup.router.Logout(setup.testCtx)
assert.True(t, strings.Contains(setup.w.HeaderMap["Set-Coo... | explode_data.jsonl/32967 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 136
} | [
2830,
3393,
62,
27958,
563,
5445,
21811,
16068,
14014,
38663,
1155,
353,
8840,
836,
8,
341,
84571,
1669,
6505,
2271,
1155,
11,
2092,
340,
16867,
6505,
57078,
991,
18176,
2822,
77333,
6750,
2665,
7220,
14171,
454,
692,
18185,
6031,
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... | 1 |
func TestTSTry(t *testing.T) {
expectPrintedTS(t, "try {} catch (x: any) {}", "try {\n} catch (x) {\n}\n")
expectPrintedTS(t, "try {} catch (x: unknown) {}", "try {\n} catch (x) {\n}\n")
expectPrintedTS(t, "try {} catch (x: number) {}", "try {\n} catch (x) {\n}\n")
expectPrintedTS(t, "try {} catch ({x}: any) {}", ... | explode_data.jsonl/82326 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 451
} | [
2830,
3393,
51,
784,
884,
1155,
353,
8840,
836,
8,
341,
24952,
8994,
291,
9951,
1155,
11,
330,
1539,
4687,
2287,
320,
87,
25,
894,
8,
24689,
330,
1539,
28152,
77,
92,
2287,
320,
87,
8,
28152,
77,
11035,
77,
1138,
24952,
8994,
291,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSupervisedPool_ExecTTL_WorkerRestarted(t *testing.T) {
var cfgExecTTL = &Config{
NumWorkers: uint64(1),
Supervisor: &SupervisorConfig{
WatchTick: 1 * time.Second,
TTL: 5 * time.Second,
},
}
ctx := context.Background()
p, err := Initialize(
ctx,
func() *exec.Cmd { return exec.Command("... | explode_data.jsonl/78514 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 528
} | [
2830,
3393,
10048,
77990,
10551,
62,
10216,
51,
13470,
87471,
261,
59354,
291,
1155,
353,
8840,
836,
8,
341,
2405,
13286,
10216,
51,
13470,
284,
609,
2648,
515,
197,
197,
4651,
74486,
25,
2622,
21,
19,
7,
16,
1326,
197,
7568,
454,
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 TestUnknownInvoice(t *testing.T) {
ctx := newTestContext(t)
defer ctx.cleanup()
// Notify arrival of a new htlc paying to this invoice. This should
// succeed.
hodlChan := make(chan interface{})
amt := lnwire.MilliSatoshi(100000)
resolution, err := ctx.registry.NotifyExitHopHtlc(
testInvoicePaymentHash, ... | explode_data.jsonl/59114 | {
"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,
13790,
34674,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
501,
2271,
1972,
1155,
340,
16867,
5635,
87689,
2822,
197,
322,
34970,
18647,
315,
264,
501,
305,
11544,
66,
12515,
311,
419,
24615,
13,
1096,
1265,
198,
197,
322,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestChangeId(t *testing.T) {
store := sessions.NewMemoryStore()
defer func() {
err := store.Close()
if err != nil {
t.Fatal(err)
}
}()
ss := sessions.New(store, "myapp_session")
m := mux.New()
m.Use(ss.Middleware)
m.Get("/").ThenFunc(func(c context.Context, w http.ResponseWriter, r *http.Request) {... | explode_data.jsonl/45596 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1180
} | [
2830,
3393,
4072,
764,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
15704,
7121,
10642,
6093,
741,
16867,
2915,
368,
341,
197,
9859,
1669,
3553,
10421,
741,
197,
743,
1848,
961,
2092,
341,
298,
3244,
26133,
3964,
340,
197,
197,
532,
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 TestIncrementGenerator(t *testing.T) {
g, err := NewIncrementGenerator(5)
CheckTrue(t, err == nil, "Should not fail to convert integer")
c := g.Generate()
actual := []string{string(<-c), string(<-c), string(<-c), string(<-c), string(<-c), string(<-c), string(<-c), string(<-c)}
for idx, s := range actual {
i... | explode_data.jsonl/12227 | {
"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,
38311,
12561,
1155,
353,
8840,
836,
8,
341,
3174,
11,
1848,
1669,
1532,
38311,
12561,
7,
20,
340,
69472,
2514,
1155,
11,
1848,
621,
2092,
11,
330,
14996,
537,
3690,
311,
5508,
7546,
1138,
1444,
1669,
342,
57582,
741,
88814... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUserSuppliedMSSOnConnect(t *testing.T) {
const mtu = 5000
ips := []struct {
name string
createEP func(*context.Context)
connectAddr tcpip.Address
checker func(*testing.T, *context.Context, uint16, int)
maxMSS uint16
}{
{
name: "IPv4",
createEP: func(c *context.Context) ... | explode_data.jsonl/75933 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1281
} | [
2830,
3393,
1474,
10048,
3440,
44,
1220,
1925,
14611,
1155,
353,
8840,
836,
8,
341,
4777,
11965,
84,
284,
220,
20,
15,
15,
15,
271,
197,
3077,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
39263,
9197,
262,
2915,
4071,
2147... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInKeyRangeMultiColumn(t *testing.T) {
if testing.Short() {
t.Skip()
}
execStatements(t, []string{
"create table t1(region int, id int, val varbinary(128), primary key(id))",
})
defer execStatements(t, []string{
"drop table t1",
})
engine.se.Reload(context.Background())
setVSchema(t, multicolumn... | explode_data.jsonl/70182 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 864
} | [
2830,
3393,
641,
1592,
6046,
20358,
2933,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
630,
67328,
93122,
1155,
11,
3056,
917,
515,
197,
197,
1,
3182,
1965,
259,
16,
48059,
526,
11,
877,
526,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestParser(t *testing.T) {
testCases := []struct {
in []Token
want ASTNode
}{
{
in: []Token{
{"paren", "("},
{"name", "add"},
{"number", "1"},
{"number", "2"},
{"paren", ")"},
},
want: ASTNode{
nodeType: "Program",
value: nil,
params: nil,
body: []ASTNode... | explode_data.jsonl/4872 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 541
} | [
2830,
3393,
6570,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
17430,
256,
3056,
3323,
198,
197,
50780,
22465,
1955,
198,
197,
59403,
197,
197,
515,
298,
17430,
25,
3056,
3323,
515,
571,
197,
4913,
41064,
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... | 2 |
func TestParamIndex(t *testing.T) {
tests := []string{"param.0", "param.1", "param.2", "param.3"}
for i, test := range tests {
want := "/kythe/edge/" + test
if got := ParamIndex(i); got != want {
t.Errorf("ParamIndex(%d): got %q, want %q", i, got, want)
}
}
} | explode_data.jsonl/25938 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 114
} | [
2830,
3393,
2001,
1552,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
917,
4913,
903,
13,
15,
497,
330,
903,
13,
16,
497,
330,
903,
13,
17,
497,
330,
903,
13,
18,
16707,
2023,
600,
11,
1273,
1669,
2088,
7032,
341,
197,
50780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCryptoUnboxBytes32(t *testing.T) {
tc := SetupEngineTest(t, "crypto")
defer tc.Cleanup()
u := CreateAndSignupFakeUser(tc, "fu")
secretUI := &libkb.TestSecretUI{Passphrase: u.Passphrase}
key, err := getMySecretKey(
tc.G, secretUI, libkb.DeviceEncryptionKeyType, "test")
if err != nil {
t.Fatal(err)
... | explode_data.jsonl/16762 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 543
} | [
2830,
3393,
58288,
1806,
2011,
7078,
18,
17,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
18626,
4571,
2271,
1155,
11,
330,
35772,
1138,
16867,
17130,
727,
60639,
2822,
10676,
1669,
4230,
3036,
56246,
52317,
1474,
44415,
11,
330,
32621,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFetchTaggedQuorumNormalOnlyTwoUp(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
numShards := defaultNumShards
minShard := uint32(0)
maxShard := uint32(numShards - 1)
// nodes = m3db nodes
nodes, closeFn, testFetch := makeTestFetchTagged(t, numShards, []services.ServiceInstance{
node(t, 0, newC... | explode_data.jsonl/37897 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 362
} | [
2830,
3393,
20714,
5668,
3556,
2183,
33006,
12206,
7308,
11613,
2324,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
7039,
741,
197,
630,
22431,
2016,
2347,
1669,
1638,
4651,
2016,
2347,
198,
25320,
2016,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStockCountLinesEndpoint_Update(t *testing.T) {
acceptHeaders := []string{"application/json"}
type args struct {
ctx context.Context
division int
entity *StockCountLines
}
s1 := StockCountLinesPrimaryPropertySample()
tests := []struct {
name string
args args
want *StockCountLine... | explode_data.jsonl/22770 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 865
} | [
2830,
3393,
19369,
2507,
16794,
27380,
47393,
1155,
353,
8840,
836,
8,
341,
197,
10330,
10574,
1669,
3056,
917,
4913,
5132,
8931,
16707,
13158,
2827,
2036,
341,
197,
20985,
414,
2266,
9328,
198,
197,
197,
28764,
526,
198,
197,
52987,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReadInvokeDefaultProviders(t *testing.T) {
runInfo := &EvalRunInfo{
Proj: &workspace.Project{Name: "test"},
Target: &Target{Name: "test"},
}
newURN := func(t tokens.Type, name string, parent resource.URN) resource.URN {
var pt tokens.Type
if parent != "" {
pt = parent.Type()
}
return resou... | explode_data.jsonl/6402 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1224
} | [
2830,
3393,
4418,
17604,
3675,
37351,
1155,
353,
8840,
836,
8,
341,
56742,
1731,
1669,
609,
54469,
6727,
1731,
515,
197,
197,
61075,
25,
256,
609,
42909,
30944,
63121,
25,
330,
1944,
7115,
197,
197,
6397,
25,
609,
6397,
63121,
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 TestPutDeep(t *testing.T) {
store := mem.New()
start, _ := store.AddBlock(&block.Block{})
tree := New(store, 0, start)
for i := 0; i < 100; i++ {
tree.Put(block.Word(i), block.Word(i*2))
}
id, _ := tree.Get(50)
if id != 100 {
t.Log(tree.readNode(nil, 0, 2560))
t.Log(id)
t.Fail()
}
} | explode_data.jsonl/33570 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
19103,
33464,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
1833,
7121,
741,
21375,
11,
716,
1669,
3553,
1904,
4713,
2099,
4574,
28477,
37790,
51968,
1669,
1532,
31200,
11,
220,
15,
11,
1191,
692,
2023,
600,
1669,
220,
15,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSingleFail(t *testing.T) {
trace.ApplyConfig(trace.Config{DefaultSampler: trace.AlwaysSample()})
te := testExporter{make(chan *trace.SpanData)}
trace.RegisterExporter(&te)
defer trace.UnregisterExporter(&te)
client, cleanup := testpb.NewTestClient(t)
_, err := client.Single(context.Background(), &testp... | explode_data.jsonl/27162 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
10888,
19524,
1155,
353,
8840,
836,
8,
341,
65058,
36051,
2648,
55458,
10753,
90,
3675,
66048,
25,
11655,
9636,
2284,
17571,
96503,
197,
665,
1669,
1273,
88025,
90,
6927,
35190,
353,
15067,
85309,
1043,
10569,
65058,
19983,
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... | 4 |
func TestStreamBuffering(t *testing.T) {
executor, _, _, sbclookup := createLegacyExecutorEnv()
// This test is similar to TestStreamUnsharded except that it returns a Result > 10 bytes,
// such that the splitting of the Result into multiple Result responses gets tested.
sbclookup.SetResults([]*sqltypes.Result{{
... | explode_data.jsonl/67385 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 708
} | [
2830,
3393,
3027,
4095,
287,
1155,
353,
8840,
836,
8,
341,
67328,
4831,
11,
8358,
8358,
7898,
66,
21020,
1669,
1855,
77415,
25255,
14359,
2822,
197,
322,
1096,
1273,
374,
4428,
311,
3393,
3027,
1806,
927,
20958,
3650,
429,
432,
4675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMsgUpdateClassIssuers(t *testing.T) {
_, _, a1 := testdata.KeyTestPubAddr()
_, _, a2 := testdata.KeyTestPubAddr()
tests := map[string]struct {
src MsgUpdateClassIssuers
expErr bool
}{
"valid": {
src: MsgUpdateClassIssuers{Admin: a2.String(), ClassId: "C01", Issuers: []string{a1.String()}},
... | explode_data.jsonl/65133 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 526
} | [
2830,
3393,
6611,
4289,
1957,
28216,
83425,
1155,
353,
8840,
836,
8,
341,
197,
6878,
8358,
264,
16,
1669,
1273,
691,
9610,
2271,
29162,
13986,
741,
197,
6878,
8358,
264,
17,
1669,
1273,
691,
9610,
2271,
29162,
13986,
2822,
78216,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSetDAGLastRebuilt(t *testing.T) {
tests := map[string]struct {
timestampMetric testMetric
value time.Time
}{
"simple": {
value: time.Date(2009, 11, 17, 20, 34, 58, 651387237, time.UTC),
timestampMetric: testMetric{
metric: DAGRebuildGauge,
want: []*io_prometheus_client.Metric{
... | explode_data.jsonl/10547 | {
"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,
1649,
35,
1890,
5842,
693,
46239,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
3244,
4702,
54310,
1273,
54310,
198,
197,
16309,
1843,
882,
16299,
198,
197,
59403,
197,
197,
1,
22944,
788,
341... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPointGetWithDeleteInMem(t *testing.T) {
store, clean := createMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk2 := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk2.MustExec("use test")
tk.MustExec("drop table if exists uk")
tk.MustExec("create table uk (c1 int primary k... | explode_data.jsonl/12489 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 604
} | [
2830,
3393,
2609,
1949,
2354,
6435,
641,
18816,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1855,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContainsExpressionValError(t *testing.T) {
ctx := test.NewTestContext(t)
c1 := ctx.NewCollection()
c1.MustAdd(hipathsys.NewInteger(10))
c1.MustAdd(hipathsys.NewInteger(11))
e := NewContainsExpression(newTestExpression(c1), newTestErrorExpression(), false)
res, err := e.Evaluate(ctx, nil, nil)
assert.Er... | explode_data.jsonl/54556 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
23805,
9595,
2208,
1454,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
1273,
7121,
2271,
1972,
1155,
340,
1444,
16,
1669,
5635,
7121,
6482,
741,
1444,
16,
50463,
2212,
7,
2151,
587,
7791,
7121,
3486,
7,
16,
15,
1171,
1444,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateTaskRunResourceResult(t *testing.T) {
for _, c := range []struct {
desc string
podStatus corev1.PodStatus
taskRunStatus *v1beta1.TaskRunStatus
want []resourcev1alpha1.PipelineResourceResult
}{{
desc: "image resource updated",
podStatus: corev1.PodStatus{
ContainerSt... | explode_data.jsonl/60087 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 537
} | [
2830,
3393,
4289,
6262,
6727,
4783,
2077,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
272,
1669,
2088,
3056,
1235,
341,
197,
41653,
688,
914,
198,
197,
3223,
347,
2522,
257,
6200,
85,
16,
88823,
2522,
198,
197,
49115,
6727,
2522,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDBCollectionAttribute(t *testing.T) {
tt := []struct {
title string
operation func(context.Context, *mongo.Database) (interface{}, error)
validators []validator
}{
{
title: "delete",
operation: func(ctx context.Context, db *mongo.Database) (interface{}, error) {
return db.Collection("... | explode_data.jsonl/33055 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1357
} | [
2830,
3393,
3506,
6482,
3907,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
3056,
1235,
341,
197,
24751,
414,
914,
198,
197,
197,
9262,
220,
2915,
5378,
9328,
11,
353,
53070,
25008,
8,
320,
4970,
22655,
1465,
340,
197,
56322,
2973,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNameConstraints(t *testing.T) {
for i, test := range nameConstraintTests {
result, err := matchDomainConstraint(test.domain, test.constraint)
if err != nil && !test.expectError {
t.Errorf("unexpected error for test #%d: domain=%s, constraint=%s, err=%s", i, test.domain, test.constraint, err)
contin... | explode_data.jsonl/29003 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 253
} | [
2830,
3393,
675,
12925,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1273,
1669,
2088,
829,
17890,
18200,
341,
197,
9559,
11,
1848,
1669,
2432,
13636,
17890,
8623,
11003,
11,
1273,
29114,
692,
197,
743,
1848,
961,
2092,
1009,
753,
194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_Util(t *testing.T) {
ts := NewTestStore(t, "O")
defer ts.Done(t)
oc, err := ts.Store.ReadOperatorClaim()
require.NoError(t, err)
pk, _ := ts.OperatorKey.PublicKey()
require.Equal(t, pk, oc.Subject)
ts.AddAccount(t, "A")
ac, err := ts.Store.ReadAccountClaim("A")
require.NoError(t, err)
require.Equa... | explode_data.jsonl/48750 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 293
} | [
2830,
3393,
89743,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
1532,
2271,
6093,
1155,
11,
330,
46,
1138,
16867,
10591,
60422,
1155,
692,
197,
509,
11,
1848,
1669,
10591,
38047,
6503,
18461,
45544,
741,
17957,
35699,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestConvertPEMToDER(t *testing.T) {
type testCase struct {
data []byte
want []byte
wantErr error
}
tests := []testCase{
{
data: pemCRL,
want: derCRL,
wantErr: nil,
},
{
data: nil,
want: nil,
wantErr: errors.New("failed to decode PEM block containing X.509 CRL"),
... | explode_data.jsonl/39150 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1772
} | [
2830,
3393,
12012,
1740,
44,
1249,
11391,
1155,
353,
8840,
836,
8,
341,
13158,
54452,
2036,
341,
197,
8924,
262,
3056,
3782,
198,
197,
50780,
262,
3056,
3782,
198,
197,
50780,
7747,
1465,
198,
197,
532,
78216,
1669,
3056,
66194,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReverseSlice(t *testing.T) {
in := []int64{1, 2, 3}
out := []int64{3, 2, 1}
_out := ReverseSlice(in)
assert.Equal(t, out, _out)
} | explode_data.jsonl/73 | {
"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,
45695,
33236,
1155,
353,
8840,
836,
8,
341,
17430,
1669,
3056,
396,
21,
19,
90,
16,
11,
220,
17,
11,
220,
18,
532,
13967,
1669,
3056,
396,
21,
19,
90,
18,
11,
220,
17,
11,
220,
16,
532,
197,
6068,
1669,
24277,
33236,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEntryString(t *testing.T) {
testCases := []struct {
name string
entry *Entry
expect string
}{
{
name: "test when SetType is HashIPPort",
entry: &Entry{
SetType: HashIPPort,
IP: "1.2.3.4",
Protocol: ProtocolTCP,
Port: 8080,
},
expect: "1.2.3.4,tcp:8080",
},
... | explode_data.jsonl/74025 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 775
} | [
2830,
3393,
5874,
703,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
48344,
220,
353,
5874,
198,
197,
24952,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
1944,
979,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestFilterRefDescriptions(t *testing.T) {
ctx := actor.WithActor(context.Background(), &actor.Actor{
UID: 1,
})
gitCommands := append(getGitCommandsWithFiles("file1", "file2"), getGitCommandsWithFiles("file3", "file4")...)
repo := MakeGitRepository(t, gitCommands...)
refDescriptions := map[string][]gitdoma... | explode_data.jsonl/8526 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 463
} | [
2830,
3393,
5632,
3945,
68145,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
12089,
26124,
18870,
5378,
19047,
1507,
609,
5621,
76094,
515,
197,
197,
6463,
25,
220,
16,
345,
197,
3518,
90731,
30479,
1669,
8737,
5433,
46562,
4062,
16056,
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... | 2 |
func TestAgent_ForceLeave(t *testing.T) {
t.Parallel()
a1 := NewTestAgent(t.Name(), "")
defer a1.Shutdown()
a2 := NewTestAgent(t.Name(), "")
// Join first
addr := fmt.Sprintf("127.0.0.1:%d", a2.Config.SerfPortLAN)
_, err := a1.JoinLAN([]string{addr})
if err != nil {
t.Fatalf("err: %v", err)
}
// this test... | explode_data.jsonl/33608 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 358
} | [
2830,
3393,
16810,
1400,
16316,
21833,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
16,
1669,
1532,
2271,
16810,
1155,
2967,
1507,
14676,
16867,
264,
16,
10849,
18452,
741,
11323,
17,
1669,
1532,
2271,
16810,
1155,
2967,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegistriesConfDirectory(t *testing.T) {
ctx := &types.SystemContext{
SystemRegistriesConfPath: "testdata/base-for-registries.d.conf",
SystemRegistriesConfDirPath: "testdata/registries.conf.d",
}
InvalidateCache()
registries, err := TryUpdatingCache(ctx)
require.NoError(t, err)
assert.NotNil(t, re... | explode_data.jsonl/62240 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 628
} | [
2830,
3393,
3477,
380,
4019,
15578,
9310,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
609,
9242,
16620,
1972,
515,
197,
5816,
3477,
380,
4019,
15578,
1820,
25,
262,
330,
92425,
26090,
15193,
32163,
380,
4019,
950,
13937,
756,
197,
5816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResultIntoWithNoBodyReturnsErr(t *testing.T) {
res := Result{
body: []byte{},
decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion),
}
if err := res.Into(&v1.Pod{}); err == nil || !strings.Contains(err.Error(), "0-length") {
t.Errorf("should have complained about 0 length body")
}
} | explode_data.jsonl/13262 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 121
} | [
2830,
3393,
2077,
26591,
2354,
2753,
5444,
16446,
7747,
1155,
353,
8840,
836,
8,
341,
10202,
1669,
5714,
515,
197,
35402,
25,
262,
3056,
3782,
38837,
197,
197,
48110,
25,
12859,
20274,
4837,
1214,
791,
2757,
36913,
3747,
16,
92719,
2808... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ContainsMinimalSet(t *testing.T) {
type args struct {
c CommitConfig
}
tests := []struct {
name string
args args
wantErr bool
}{
{
name: "empty config",
args: args{
c: CommitConfig{
TeamMembersConfigPath: "",
},
},
wantErr: true,
},
{
name: "only abbreviatio... | explode_data.jsonl/22586 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 498
} | [
2830,
3393,
62,
23805,
88328,
1649,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1444,
9205,
2648,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
198,
197,
50780,
7747,
180... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInstrumentationLibraryMetricsSlice(t *testing.T) {
es := NewInstrumentationLibraryMetricsSlice()
assert.EqualValues(t, 0, es.Len())
es = newInstrumentationLibraryMetricsSlice(&[]*otlpmetrics.InstrumentationLibraryMetrics{})
assert.EqualValues(t, 0, es.Len())
es.Resize(7)
emptyVal := NewInstrumentationLi... | explode_data.jsonl/19497 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 232
} | [
2830,
3393,
56324,
367,
16915,
27328,
33236,
1155,
353,
8840,
836,
8,
341,
78966,
1669,
1532,
56324,
367,
16915,
27328,
33236,
741,
6948,
12808,
6227,
1155,
11,
220,
15,
11,
1531,
65819,
2398,
78966,
284,
501,
56324,
367,
16915,
27328,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProjectCreateExistingProject(t *testing.T) {
dir, err := ioutil.TempDir("", testDir)
if err != nil {
t.Fatalf("Failed to create a temporary directory")
}
defer os.RemoveAll(dir)
_, err = Create("test", dir)
if err != nil {
t.Errorf("Failed to create new project")
} else {
_, err = Create("test",... | explode_data.jsonl/81771 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 155
} | [
2830,
3393,
7849,
4021,
53067,
7849,
1155,
353,
8840,
836,
8,
1476,
48532,
11,
1848,
1669,
43144,
65009,
6184,
19814,
1273,
6184,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
9408,
311,
1855,
264,
13340,
6220,
1138,
197,
532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestTLSConfigKey(t *testing.T) {
// Make sure config fields that don't affect the tls config don't affect the cache key
identicalConfigurations := map[string]*Config{
"empty": {},
"host": {Host: "foo"},
"prefix": {Prefix: "foo"},
"version": {Version: "foo"},
"codec": ... | explode_data.jsonl/27369 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1211
} | [
2830,
3393,
45439,
2648,
1592,
1155,
353,
8840,
836,
8,
341,
197,
322,
7405,
2704,
2193,
5043,
429,
1513,
944,
7802,
279,
55026,
2193,
1513,
944,
7802,
279,
6500,
1376,
198,
197,
1713,
938,
2648,
21449,
1669,
2415,
14032,
8465,
2648,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCharSet(t *testing.T) {
s := `。,()-1!@234567890abc123456789abc`
numConv := unicode.SpecialCase{
unicode.CaseRange{
Lo: 0x3002, // Lo 全角句号
Hi: 0x3002, // Hi 全角句号
Delta: [unicode.MaxCase]rune{
0, // UpperCase
0x002e - 0x3002, // LowerCase 转成半角句号
0, // TitleCas... | explode_data.jsonl/24495 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 451
} | [
2830,
3393,
4768,
1649,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1565,
37641,
9909,
7552,
12,
16,
6313,
31,
17,
18,
19,
20,
21,
22,
23,
24,
15,
13683,
20109,
24918,
33517,
45602,
43497,
59496,
65124,
65015,
66993,
144127,
144454,
144... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestThemeIncludes(t *testing.T) {
themePath, err := ioutil.TempDir("", "alice-lg-tmp-theme")
if err != nil {
t.Error(err)
}
defer os.RemoveAll(themePath)
// Create some "stylesheets" and a "script"
touchFile(themePath, "style.css")
touchFile(themePath, "extra.css")
touchFile(themePath, "script.js")
//... | explode_data.jsonl/54318 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 383
} | [
2830,
3393,
12594,
55834,
1155,
353,
8840,
836,
8,
341,
197,
9047,
1820,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
63195,
7510,
2385,
1307,
33185,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
532,
16867,
2643,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseListTags(t *testing.T) {
t.Parallel()
cases := []struct {
name string
input string
expected string
}{
{
name: "unordered list",
input: `* Item 1
* Item 2
** Subitem 1
** Subitem 2
*** Subitem 2 item 1
* Item 3
* Item 4`,
expected: `- Item 1
- Item 2
- Subitem 1
- Subite... | explode_data.jsonl/2583 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 397
} | [
2830,
3393,
14463,
852,
15930,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
22427,
262,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
515,
298,
11609... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClient_SendPhoto(t *testing.T) {
type fields struct {
token string
}
type args struct {
chatID int
fileName string
}
tests := []struct {
name string
fields fields
args args
wantErr bool
}{
{
"Sending non-existing photo",
fields{
testToken,
},
args{
testSendToI... | explode_data.jsonl/55761 | {
"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,
2959,
46267,
10463,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
43947,
914,
198,
197,
532,
13158,
2827,
2036,
341,
197,
197,
9686,
915,
256,
526,
198,
197,
17661,
675,
914,
198,
197,
532,
78216,
1669,
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... | 2 |
func TestMaxRetryDuration(t *testing.T) {
networkUp := make(chan struct{})
time.AfterFunc(5*time.Millisecond, func() {
close(networkUp)
})
timedDialer := func(network, addr string) (net.Conn, error) {
select {
case <-networkUp:
return mockDialer(network, addr)
default:
return nil, errors.New("network ... | explode_data.jsonl/53951 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 425
} | [
2830,
3393,
5974,
51560,
12945,
1155,
353,
8840,
836,
8,
341,
9038,
2349,
2324,
1669,
1281,
35190,
2036,
37790,
21957,
36892,
9626,
7,
20,
77053,
71482,
11,
2915,
368,
341,
197,
27873,
46542,
2324,
340,
197,
3518,
3244,
75485,
35,
530,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGenModel_Issue243(t *testing.T) {
specDoc, err := loads.Spec("../fixtures/codegen/todolist.models.yml")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
k := "HasDynMeta"
opts := opts()
genModel, err := makeGenDefinition(k, "models", definitions[k], specDoc, opts)
require.NoError(t, er... | explode_data.jsonl/2539 | {
"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,
9967,
1712,
7959,
83890,
17,
19,
18,
1155,
353,
8840,
836,
8,
341,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
46928,
4370,
5523,
347,
34675,
8235,
33936,
1138,
17957,
35699,
1155,
11,
1848,
692,
7452,
4054,
82,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSynOptionsOnActiveConnect(t *testing.T) {
const mtu = 1400
c := context.New(t, mtu)
defer c.Cleanup()
// Create TCP endpoint.
var err tcpip.Error
c.EP, err = c.Stack().NewEndpoint(tcp.ProtocolNumber, ipv4.ProtocolNumber, &c.WQ)
if err != nil {
t.Fatalf("NewEndpoint failed: %s", err)
}
// Set the b... | explode_data.jsonl/75973 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1043
} | [
2830,
3393,
37134,
3798,
1925,
5728,
14611,
1155,
353,
8840,
836,
8,
341,
4777,
11965,
84,
284,
220,
16,
19,
15,
15,
198,
1444,
1669,
2266,
7121,
1155,
11,
11965,
84,
340,
16867,
272,
727,
60639,
2822,
197,
322,
4230,
26656,
14887,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewEventExporter(t *testing.T) {
got, err := newEventExporter(nil, zap.NewNop())
assert.EqualError(t, err, "nil config")
assert.Nil(t, got)
cfg := &Config{
ExporterSettings: config.NewExporterSettings(typeStr),
AccessToken: "someToken",
IngestURL: "asdf://:%",
TimeoutSettings: exporte... | explode_data.jsonl/61017 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 380
} | [
2830,
3393,
3564,
1556,
88025,
1155,
353,
8840,
836,
8,
341,
3174,
354,
11,
1848,
1669,
501,
1556,
88025,
27907,
11,
32978,
7121,
45,
453,
2398,
6948,
12808,
1454,
1155,
11,
1848,
11,
330,
8385,
2193,
1138,
6948,
59678,
1155,
11,
2684... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKeycloakService_RegisterKasFleetshardOperatorServiceAccount(t *testing.T) {
type fields struct {
kcClient keycloak.KcClient
}
type args struct {
clusterId string
}
fakeRoleId := "1234"
fakeClientId := "test-client-id"
fakeClientSecret := "test-client-secret"
fakeUserId := "test-user-id"
tests := [... | explode_data.jsonl/61908 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2164
} | [
2830,
3393,
1592,
88751,
1860,
73124,
42,
300,
37,
18973,
927,
567,
18461,
1860,
7365,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
16463,
66,
2959,
1376,
88751,
11352,
66,
2959,
198,
197,
532,
13158,
2827,
2036,
341,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCounter_Add(t *testing.T) {
c := getCounter("add")
if c.Count() != 0 {
t.Error("Count should start at 0, got ", c.Count())
}
c.Add(42)
if c.Count() != 42 {
t.Error("Count should be 42, got ", c.Count())
}
c.Add(-1)
if c.Count() != 42 {
t.Error("Negative deltas should be ignored, got ", c.Count(... | explode_data.jsonl/35712 | {
"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,
14099,
21346,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
633,
14099,
445,
718,
1138,
743,
272,
6134,
368,
961,
220,
15,
341,
197,
3244,
6141,
445,
2507,
1265,
1191,
518,
220,
15,
11,
2684,
3670,
272,
6134,
2398,
197,
630,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestECDSAPublicKeyBytes(t *testing.T) {
t.Parallel()
provider, _, cleanup := currentTestConfig.Provider(t)
defer cleanup()
k, err := provider.KeyGen(&bccsp.ECDSAKeyGenOpts{Temporary: false})
if err != nil {
t.Fatalf("Failed generating ECDSA key [%s]", err)
}
pk, err := k.PublicKey()
if err != nil {
t... | explode_data.jsonl/29259 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 234
} | [
2830,
3393,
7498,
5936,
2537,
475,
1592,
7078,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
19979,
11,
8358,
21290,
1669,
1482,
2271,
2648,
36208,
1155,
340,
16867,
21290,
2822,
16463,
11,
1848,
1669,
9109,
9610,
9967,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHashGetall(t *testing.T) {
s, err := Run()
ok(t, err)
defer s.Close()
c, err := proto.Dial(s.Addr())
ok(t, err)
defer c.Close()
s.HSet("wim", "zus", "jet")
s.HSet("wim", "teun", "vuur")
s.HSet("wim", "gijs", "lam")
s.HSet("wim", "kees", "bok")
mustDo(t, c,
"HGETALL", "wim",
proto.Strings(
"g... | explode_data.jsonl/11372 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 461
} | [
2830,
3393,
6370,
1949,
541,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
6452,
741,
59268,
1155,
11,
1848,
340,
16867,
274,
10421,
741,
1444,
11,
1848,
1669,
18433,
98462,
1141,
93626,
2398,
59268,
1155,
11,
1848,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.