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 TestPipelineRunFacts_IsRunning(t *testing.T) {
for _, tc := range []struct {
name string
state PipelineRunState
expected bool
}{{
name: "one-started",
state: oneStartedState,
expected: true,
}, {
name: "one-finished",
state: oneFinishedState,
expected: false,
}, {
name:... | explode_data.jsonl/18204 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 536
} | [
2830,
3393,
34656,
6727,
37,
11359,
31879,
18990,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
24291,
262,
40907,
6727,
1397,
198,
197,
42400,
1807,
198,
197,
15170,
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 TestValidateCert(t *testing.T) {
key, _, _, _, err := ParseAuthorizedKey([]byte(exampleSSHCert))
if err != nil {
t.Fatalf("ParseAuthorizedKey: %v", err)
}
validCert, ok := key.(*Certificate)
if !ok {
t.Fatalf("got %v (%T), want *Certificate", key, key)
}
checker := CertC... | explode_data.jsonl/30248 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 394
} | [
2830,
3393,
17926,
36934,
1155,
353,
8840,
836,
8,
341,
262,
1376,
11,
8358,
8358,
8358,
1848,
1669,
14775,
60454,
1592,
10556,
3782,
66203,
1220,
22455,
529,
1171,
262,
421,
1848,
961,
2092,
341,
286,
259,
30762,
445,
14463,
60454,
159... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTx_DeleteBucket(t *testing.T) {
db := MustOpenDB()
defer db.MustClose()
// Create a bucket and add a value.
if err := db.Update(func(tx *bolt.Tx) error {
b, err := tx.CreateBucket([]byte("widgets"))
if err != nil {
t.Fatal(err)
}
if err := b.Put([]byte("foo"), []byte("bar")); err != nil {
t.... | explode_data.jsonl/1694 | {
"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,
31584,
57418,
36018,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
15465,
5002,
3506,
741,
16867,
2927,
50463,
7925,
2822,
197,
322,
4230,
264,
15621,
323,
912,
264,
897,
624,
743,
1848,
1669,
2927,
16689,
18552,
27301,
353,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestHoard_OverrideDefault(t *testing.T) {
h := Make(Expires().AfterSeconds(1))
_ = h.Get("key", func() (interface{}, *Expiration) {
return "first", ExpiresNever
})
assert.Equal(t, ExpiresNever, h.cache["key"].expiration)
h = Make(ExpiresNever)
_ = h.Get("key", func() (interface{}, *Expiration) {
ret... | explode_data.jsonl/82507 | {
"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,
39,
33386,
62,
2177,
3675,
1155,
353,
8840,
836,
8,
1476,
9598,
1669,
7405,
7,
65331,
1005,
6025,
15343,
7,
16,
4390,
197,
62,
284,
305,
2234,
445,
792,
497,
2915,
368,
320,
4970,
22655,
353,
66301,
8,
341,
197,
853,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestConfigClients_Update_Hydra_Error(t *testing.T) {
s, cfg, _, h, iss, err := setupHydraTest(false)
if err != nil {
t.Fatalf("setupHydraTest() failed: %v", err)
}
clientName := "test_client"
// Update the client RedirectUris.
cli := &cpb.Client{
RedirectUris: []string{"http://client.example.com"},
}
... | explode_data.jsonl/18523 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 465
} | [
2830,
3393,
2648,
47174,
47393,
2039,
88,
22248,
28651,
1155,
353,
8840,
836,
8,
341,
1903,
11,
13286,
11,
8358,
305,
11,
2369,
11,
1848,
1669,
6505,
30816,
22248,
2271,
3576,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
151... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLinuxCgroupsPathSpecified(t *testing.T) {
cgroupsPath := "/user/cgroups/path/id"
spec := &specs.Spec{}
spec.Linux = &specs.Linux{
CgroupsPath: cgroupsPath,
}
opts := &CreateOpts{
CgroupName: "ContainerID",
UseSystemdCgroup: false,
Spec: spec,
}
cgroup, err := createCgroupCon... | explode_data.jsonl/6062 | {
"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,
46324,
34,
16753,
1820,
8327,
1870,
1155,
353,
8840,
836,
8,
341,
1444,
16753,
1820,
1669,
3521,
872,
2899,
16753,
50976,
38146,
1837,
98100,
1669,
609,
94531,
36473,
16094,
98100,
1214,
19559,
284,
609,
94531,
1214,
19559,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNamespaceNest(t *testing.T) {
r, _ := http.NewRequest("GET", "/v1/admin/order", nil)
w := httptest.NewRecorder()
ns := NewNamespace("/v1")
ns.Namespace(
NewNamespace("/admin").
Get("/order", func(ctx *context.Context) {
ctx.Output.Body([]byte("order"))
}),
)
AddNamespace(ns)
BeeApp.Handlers... | explode_data.jsonl/12606 | {
"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,
22699,
45,
477,
1155,
353,
8840,
836,
8,
341,
7000,
11,
716,
1669,
1758,
75274,
445,
3806,
497,
3521,
85,
16,
17402,
43395,
497,
2092,
340,
6692,
1669,
54320,
70334,
7121,
47023,
2822,
84041,
1669,
1532,
22699,
4283,
85,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPipelineRunState_SuccessfulOrSkippedDAGTasks(t *testing.T) {
largePipelineState := buildPipelineStateWithLargeDepencyGraph(t)
tcs := []struct {
name string
state PipelineRunState
specStatus v1beta1.PipelineRunSpecStatus
expectedNames []string
}{{
name: "no-tasks-starte... | explode_data.jsonl/18196 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1548
} | [
2830,
3393,
34656,
6727,
1397,
87161,
1262,
2195,
19290,
6450,
35,
1890,
25449,
1155,
353,
8840,
836,
8,
341,
8810,
2744,
34656,
1397,
1669,
1936,
34656,
1397,
2354,
34253,
7839,
2251,
11212,
1155,
340,
3244,
4837,
1669,
3056,
1235,
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 TestDecodeNdjson(t *testing.T) {
tests := []struct {
body string
result string
}{
{"{}", "[{}]"},
{"{\"a\":\"b\"}", "[{\"a\":\"b\"}]"},
{"{\"a\":\"b\"}\n{\"c\":\"d\"}", "[{\"a\":\"b\"},{\"c\":\"d\"}]"},
{"{\"a\":\"b\"}\r\n{\"c\":\"d\"}", "[{\"a\":\"b\"},{\"c\":\"d\"}]"},
{"{\"a\":\"b\"}\r\n{\"c\"... | explode_data.jsonl/20807 | {
"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,
32564,
39837,
2236,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
35402,
256,
914,
198,
197,
9559,
914,
198,
197,
59403,
197,
197,
4913,
42351,
10545,
78134,
7115,
197,
197,
4913,
64238,
64,
23488,
65,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestGetDataRateFromDataRateIndex(t *testing.T) {
for _, tc := range []struct {
Name string
BandID string
DataRateIndex int
IsLora bool
ExpectedDataRate ttnpb.DataRate
ErrorAssertion func(error) bool
}{
{
Name: "Valid_EU",
BandID: "EU_863_870",
IsLora:... | explode_data.jsonl/69425 | {
"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,
68957,
11564,
3830,
1043,
11564,
1552,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
21297,
1797,
914,
198,
197,
12791,
437,
915,
1843,
914,
198,
197,
40927,
11564,
1552,
262,
526,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReconciler_DontCreateDeployment_NoChanges(t *testing.T) {
job := mock.Job()
job.TaskGroups[0].Update = noCanaryUpdate
// Create 10 allocations from the job
var allocs []*structs.Allocation
for i := 0; i < 10; i++ {
alloc := mock.Alloc()
alloc.Job = job
alloc.JobID = job.ID
alloc.NodeID = uuid.Gen... | explode_data.jsonl/67253 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 426
} | [
2830,
3393,
693,
40446,
5769,
1557,
544,
4021,
75286,
36989,
11317,
1155,
353,
8840,
836,
8,
341,
68577,
1669,
7860,
45293,
741,
68577,
28258,
22173,
58,
15,
936,
4289,
284,
902,
6713,
658,
4289,
271,
197,
322,
4230,
220,
16,
15,
6964... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCmd(t *testing.T) {
type TestSpec struct {
rs.BaseField
Options []string `yaml:"options"`
BadOptions bool `yaml:"bad_options"`
Sources []string `yaml:"sources"`
BadSource bool `yaml:"bad_source"`
OutputFiles []string `yaml:"output_files"`
}
type CheckSpec struct {
rs.BaseFiel... | explode_data.jsonl/6988 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1345
} | [
2830,
3393,
15613,
1155,
353,
8840,
836,
8,
1476,
13158,
3393,
8327,
2036,
341,
197,
41231,
13018,
1877,
271,
197,
197,
3798,
262,
3056,
917,
1565,
41466,
2974,
2875,
8805,
197,
12791,
329,
3798,
1807,
257,
1565,
41466,
2974,
13855,
874... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExecuteInstall(t *testing.T) {
cryptoProvider, err := sw.NewDefaultSecurityLevelWithKeystore(sw.NewDummyKeyStore())
require.NoError(t, err)
scc := &SCC{
BuiltinSCCs: map[string]struct{}{"lscc": {}},
Support: &SupportImpl{GetMSPIDs: getMSPIDs},
ACLProvider: mockAclProvider,
GetMSPI... | explode_data.jsonl/11798 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 313
} | [
2830,
3393,
17174,
24690,
1155,
353,
8840,
836,
8,
341,
1444,
9444,
5179,
11,
1848,
1669,
2021,
7121,
3675,
15352,
4449,
2354,
6608,
63373,
58902,
7121,
43344,
1592,
6093,
2398,
17957,
35699,
1155,
11,
1848,
340,
1903,
638,
1669,
609,
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 TestPrimitiveGetFloat(t *testing.T) {
client := newPrimitiveClient()
result, err := client.GetFloat(context.Background(), nil)
if err != nil {
t.Fatalf("GetFloat: %v", err)
}
if r := cmp.Diff(result.FloatWrapper, FloatWrapper{
Field1: to.Float32Ptr(1.05),
Field2: to.Float32Ptr(-0.003),
}); r != "" {
... | explode_data.jsonl/61671 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
33313,
1949,
5442,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
33313,
2959,
741,
9559,
11,
1848,
1669,
2943,
2234,
5442,
5378,
19047,
1507,
2092,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
1949,
5442,
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... | 3 |
func TestConfigServiceV2CreateSink(t *testing.T) {
var name string = "name3373707"
var destination string = "destination-1429847026"
var filter string = "filter-1274492040"
var writerIdentity string = "writerIdentity775638794"
var expectedResponse = &loggingpb.LogSink{
Name: name,
Destination: des... | explode_data.jsonl/77771 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 444
} | [
2830,
3393,
2648,
1860,
53,
17,
4021,
45094,
1155,
353,
8840,
836,
8,
341,
2405,
829,
914,
284,
330,
606,
18,
18,
22,
18,
22,
15,
22,
698,
2405,
9106,
914,
284,
330,
17997,
12,
16,
19,
17,
24,
23,
19,
22,
15,
17,
21,
698,
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... | 5 |
func TestMissingConsortiumSection(t *testing.T) {
blockDest := filepath.Join(tmpDir, "block")
config := configtxgentest.Load(genesisconfig.SampleInsecureSoloProfile)
config.Consortiums = nil
assert.NoError(t, doOutputBlock(config, "foo", blockDest), "Missing consortiums section")
} | explode_data.jsonl/14586 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
25080,
1109,
6860,
2356,
9620,
1155,
353,
8840,
836,
8,
341,
47996,
34830,
1669,
26054,
22363,
10368,
6184,
11,
330,
4574,
5130,
25873,
1669,
2193,
3998,
15772,
477,
13969,
36884,
13774,
1676,
76266,
641,
25132,
89299,
8526,
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 TestJetStreamDrainFailsToDeleteConsumer(t *testing.T) {
s := RunBasicJetStreamServer()
defer s.Shutdown()
if config := s.JetStreamConfig(); config != nil {
defer os.RemoveAll(config.StoreDir)
}
errCh := make(chan error, 1)
nc, err := nats.Connect(s.ClientURL(), nats.ErrorHandler(func(_ *nats.Conn, _ *nat... | explode_data.jsonl/29191 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 575
} | [
2830,
3393,
35641,
3027,
8847,
466,
37,
6209,
64105,
29968,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
6452,
15944,
35641,
3027,
5475,
741,
16867,
274,
10849,
18452,
2822,
743,
2193,
1669,
274,
3503,
295,
3027,
2648,
2129,
2193,
961,
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... | 2 |
func TestEntry_OnKeyDown_DeleteNewline(t *testing.T) {
entry := widget.NewEntry()
entry.SetText("H\ni")
right := &fyne.KeyEvent{Name: fyne.KeyRight}
entry.TypedKey(right)
key := &fyne.KeyEvent{Name: fyne.KeyDelete}
entry.TypedKey(key)
assert.Equal(t, "Hi", entry.Text)
} | explode_data.jsonl/12343 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 115
} | [
2830,
3393,
5874,
35482,
24173,
57418,
3564,
1056,
1155,
353,
8840,
836,
8,
341,
48344,
1669,
9086,
7121,
5874,
741,
48344,
92259,
445,
39,
1699,
72,
5130,
47921,
1669,
609,
30595,
811,
58808,
63121,
25,
51941,
811,
9610,
5979,
532,
483... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeployAndUpgrade(t *testing.T) {
chainID := util.GetTestChainID()
var ctxt = context.Background()
url1 := "github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example01"
url2 := "github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02"
chaincodeID1 := &pb.ChaincodeID{Path: url1,... | explode_data.jsonl/27804 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1054
} | [
2830,
3393,
69464,
3036,
43861,
1155,
353,
8840,
836,
8,
341,
197,
8819,
915,
1669,
4094,
2234,
2271,
18837,
915,
741,
2405,
59162,
284,
2266,
19047,
2822,
19320,
16,
1669,
330,
5204,
905,
7530,
39252,
50704,
6663,
28897,
67020,
14,
881... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue23(t *testing.T) {
p := NewPolicy()
p.SkipElementsContent("tag1", "tag2")
input := `<tag1>cut<tag2></tag2>harm</tag1><tag1>123</tag1><tag2>234</tag2>`
out := p.Sanitize(input)
expected := ""
if out != expected {
t.Errorf(
"test failed;\ninput : %s\noutput : %s\nexpected: %s",
input,
ou... | explode_data.jsonl/28801 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 424
} | [
2830,
3393,
42006,
17,
18,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1532,
13825,
741,
3223,
57776,
11868,
2762,
445,
4578,
16,
497,
330,
4578,
17,
1138,
22427,
1669,
30586,
4578,
16,
29,
10242,
16805,
17,
1472,
4578,
17,
29,
71,
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... | 4 |
func TestClosedTimestampCanServeAfterSplitAndMerges(t *testing.T) {
defer leaktest.AfterTest(t)()
if util.RaceEnabled {
// Limiting how long transactions can run does not work
// well with race unless we're extremely lenient, which
// drives up the test duration.
t.Skip("skipping under race")
}
ctx := cont... | explode_data.jsonl/65032 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1066
} | [
2830,
3393,
26884,
20812,
6713,
60421,
6025,
20193,
3036,
44,
2375,
288,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
743,
4094,
2013,
578,
5462,
341,
197,
197,
322,
28008,
287,
1246,
1293,
14131,
646,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOnChainReport(t *testing.T) {
tests := []struct {
name string
tx lndclient.Transaction
sweeps map[string]bool
openedChannels map[string]channelInfo
closedChannels map[string]closedChannelInfo
expectedEntries map[EntryType]bool
}{
{
name: "sweep tx",
tx: ... | explode_data.jsonl/52948 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1285
} | [
2830,
3393,
1925,
18837,
10361,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
46237,
1060,
326,
303,
2972,
29284,
198,
197,
1903,
896,
7124,
688,
2415,
14032,
96436,
198,
197,
52199,
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... | 2 |
func TestPessimisticTxnWithDDLChangeColumn(t *testing.T) {
store, clean := createMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk2 := testkit.NewTestKit(t, store)
tk2.MustExec("use test")
tk.MustExec("drop table if exists t1")
tk.MustExec("create table t1 (c1 in... | explode_data.jsonl/12491 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1069
} | [
2830,
3393,
47,
66733,
4532,
31584,
77,
2354,
58781,
4072,
2933,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHttpCmd(t *testing.T) {
dir := testDir + "httpcmd"
receiver := svc.Svc{
Dir: dir,
}
receiver.Init()
defer os.RemoveAll(dir)
err := os.Chdir(dir)
if err != nil {
t.Fatal(err)
}
// go-doudou svc http --handler -c go -o
_, _, err = ExecuteCommandC(rootCmd, []string{"svc", "http", "--handler", "-c", ... | explode_data.jsonl/67883 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1763
} | [
2830,
3393,
2905,
15613,
1155,
353,
8840,
836,
8,
341,
48532,
1669,
1273,
6184,
488,
330,
1254,
8710,
698,
17200,
12862,
1669,
46154,
808,
7362,
515,
197,
197,
6184,
25,
5419,
345,
197,
532,
17200,
12862,
26849,
741,
16867,
2643,
84427,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPasswordEntry_Placeholder(t *testing.T) {
entry, window := setupPasswordImageTest()
defer teardownImageTest(window)
c := window.Canvas()
entry.SetPlaceHolder("Password")
test.AssertImageMatches(t, "password_entry/placeholder_initial.png", c.Capture())
test.Type(entry, "Hié™שרה")
assert.Equal(t, "Hié™ש... | explode_data.jsonl/57338 | {
"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,
4876,
5874,
1088,
26536,
4251,
1155,
353,
8840,
836,
8,
341,
48344,
11,
3241,
1669,
6505,
4876,
1906,
2271,
741,
16867,
49304,
1906,
2271,
15906,
340,
1444,
1669,
3241,
54121,
2822,
48344,
4202,
17371,
8589,
445,
4876,
1138,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClassifyExamples(t *testing.T) {
const src = `
package p
const Const1 = 0
var Var1 = 0
type (
Type1 int
Type1_Foo int
Type1_foo int
type2 int
Embed struct { Type1 }
Uembed struct { type2 }
)
func Func1() {}
func Func1_Foo() {}
func Func1_foo() {}
func func2() {}
func (Type1) Fun... | explode_data.jsonl/40681 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2286
} | [
2830,
3393,
1957,
1437,
40381,
1155,
353,
8840,
836,
8,
341,
4777,
2286,
284,
22074,
1722,
281,
271,
1024,
24522,
16,
284,
220,
15,
198,
947,
256,
8735,
16,
256,
284,
220,
15,
271,
1313,
2399,
27725,
16,
257,
526,
198,
27725,
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... | 9 |
func TestKill(t *testing.T) {
skipOn(t, "N/A", "lldb") // k command presumably works but leaves the process around?
withTestProcess("testprog", t, func(p *proc.Target, fixture protest.Fixture) {
if err := p.Detach(true); err != nil {
t.Fatal(err)
}
if valid, _ := p.Valid(); valid {
t.Fatal("expected proce... | explode_data.jsonl/56219 | {
"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,
53734,
1155,
353,
8840,
836,
8,
341,
1903,
13389,
1925,
1155,
11,
330,
45,
10360,
497,
330,
32459,
65,
899,
442,
595,
3210,
35448,
4278,
714,
10901,
279,
1882,
2163,
5267,
46948,
2271,
7423,
445,
1944,
32992,
497,
259,
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... | 6 |
func TestCredentialsMisuse(t *testing.T) {
tlsCreds, err := credentials.NewClientTLSFromFile(tlsDir+"ca.pem", "x.test.youtube.com")
if err != nil {
t.Fatalf("Failed to create authenticator %v", err)
}
// Two conflicting credential configurations
if _, err := Dial("Non-Existent.Server:80", WithTransportCredential... | explode_data.jsonl/6664 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 272
} | [
2830,
3393,
27025,
83159,
810,
1155,
353,
8840,
836,
8,
341,
3244,
4730,
34,
53369,
11,
1848,
1669,
16387,
7121,
2959,
45439,
43633,
1155,
4730,
6184,
5172,
924,
49373,
497,
330,
87,
5958,
20145,
905,
1138,
743,
1848,
961,
2092,
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... | 4 |
func TestLogsWorkflowOpts_Validate_EndError(t *testing.T) {
opts := logsWorkflowOpts{logsWorkflowVars: logsWorkflowVars{logsSharedVars: logsSharedVars{endString: "abc"}}}
err := opts.Validate()
assert.Equal(t, fmt.Errorf("Could not find format for \"abc\""), err)
} | explode_data.jsonl/74228 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 103
} | [
2830,
3393,
51053,
62768,
43451,
62,
17926,
49953,
1454,
1155,
353,
8840,
836,
8,
341,
64734,
1669,
18422,
62768,
43451,
90,
22081,
62768,
28305,
25,
18422,
62768,
28305,
90,
22081,
16997,
28305,
25,
18422,
16997,
28305,
90,
408,
703,
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 TestUpgrade(t *testing.T) {
path := "github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02"
testUpgrade(t, "example02", "0", "example02", "1", path, "")
testUpgrade(t, "example02", "0", "example02", "", path, EmptyVersionErr("example02").Error())
testUpgrade(t, "example02", "0", "example02",... | explode_data.jsonl/9390 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 275
} | [
2830,
3393,
43861,
1155,
353,
8840,
836,
8,
341,
26781,
1669,
330,
5204,
905,
7530,
39252,
50704,
6663,
28897,
67020,
14,
8819,
1851,
25525,
14,
8819,
1851,
39304,
15,
17,
1837,
18185,
43861,
1155,
11,
330,
8687,
15,
17,
497,
330,
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... | 1 |
func TestRespondentContextClosed(t *testing.T) {
s := GetSocket(t, NewSocket)
c, e := s.OpenContext()
MustSucceed(t, e)
MustNotBeNil(t, c)
MustSucceed(t, c.Close())
MustBeError(t, c.Close(), mangos.ErrClosed)
c, e = s.OpenContext()
MustSucceed(t, e)
MustNotBeNil(t, c)
MustSucceed(t, s.Close())
MustBeError... | explode_data.jsonl/57409 | {
"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,
65354,
306,
1972,
26884,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
2126,
10286,
1155,
11,
1532,
10286,
340,
1444,
11,
384,
1669,
274,
12953,
1972,
741,
9209,
590,
50,
29264,
1155,
11,
384,
340,
9209,
590,
2623,
3430,
19064... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMetaBackend_emptyLegacyRemote(t *testing.T) {
// Create a temporary working directory that is empty
td := tempDir(t)
os.MkdirAll(td, 0755)
defer os.RemoveAll(td)
defer testChdir(t, td)()
// Create some legacy remote state
legacyState := testState()
_, srv := testRemoteState(t, legacyState, 200)
defer... | explode_data.jsonl/34311 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 506
} | [
2830,
3393,
12175,
29699,
15124,
77415,
24703,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
264,
13340,
3238,
6220,
429,
374,
4287,
198,
76373,
1669,
2730,
6184,
1155,
340,
25078,
1321,
12438,
2403,
61241,
11,
220,
15,
22,
20,
20,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestGetHealthStatus(t *testing.T) {
status := make(map[string]interface{})
err := handleAndParse(&testingRequest{
url: "/api/chartrepo/health",
method: http.MethodGet,
credential: sysAdmin,
}, &status)
if err != nil {
t.Fatal(err)
}
if _, ok := status["health"]; !ok {
t.Fatal("expect '... | explode_data.jsonl/74126 | {
"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,
1949,
14542,
2522,
1155,
353,
8840,
836,
8,
341,
23847,
1669,
1281,
9147,
14032,
31344,
37790,
9859,
1669,
3705,
3036,
14463,
2099,
8840,
1900,
515,
197,
19320,
25,
286,
3521,
2068,
73941,
23476,
14,
12120,
756,
197,
42257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigUpdate(t *testing.T) {
expectedURL := "/v1.30/configs/config_id/update"
client := &Client{
version: "1.30",
client: newMockClient(func(req *http.Request) (*http.Response, error) {
if !strings.HasPrefix(req.URL.Path, expectedURL) {
return nil, fmt.Errorf("Expected URL '%s', got '%s'", expect... | explode_data.jsonl/59215 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
2648,
4289,
1155,
353,
8840,
836,
8,
341,
42400,
3144,
1669,
3521,
85,
16,
13,
18,
15,
14730,
82,
14730,
842,
29832,
1837,
25291,
1669,
609,
2959,
515,
197,
74954,
25,
330,
16,
13,
18,
15,
756,
197,
25291,
25,
501,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestTransportRejectsAlphaPort(t *testing.T) {
res, err := Get("http://dummy.tld:123foo/bar")
if err == nil {
res.Body.Close()
t.Fatal("unexpected success")
}
ue, ok := err.(*url.Error)
if !ok {
t.Fatalf("got %#v; want *url.Error", err)
}
got := ue.Err.Error()
want := `invalid port ":123foo" after hos... | explode_data.jsonl/14163 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 173
} | [
2830,
3393,
27560,
78413,
82,
19384,
7084,
1155,
353,
8840,
836,
8,
341,
10202,
11,
1848,
1669,
2126,
445,
1254,
1110,
31390,
734,
507,
25,
16,
17,
18,
7975,
49513,
1138,
743,
1848,
621,
2092,
341,
197,
10202,
20934,
10421,
741,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestNamespace(t *testing.T) {
t.Run("user", func(t *testing.T) {
const wantUserID = 3
users := database.NewMockUserStore()
users.GetByIDFunc.SetDefaultHook(func(_ context.Context, id int32) (*types.User, error) {
if id != wantUserID {
t.Errorf("got %d, want %d", id, wantUserID)
}
return &types.... | explode_data.jsonl/73118 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1082
} | [
2830,
3393,
22699,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
872,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
4777,
1366,
36899,
284,
220,
18,
198,
197,
90896,
1669,
4625,
7121,
11571,
1474,
6093,
741,
197,
90896,
2234,
60572,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAWSInstanceStateController(t *testing.T) {
mockCtrl := gomock.NewController(t)
sqsSvs = mock_sqsiface.NewMockSQSAPI(mockCtrl)
instanceStateReconciler = &AwsInstanceStateReconciler{
Client: testEnv.Client,
Log: ctrl.Log.WithName("controllers").WithName("AWSInstanceState"),
sqsServiceFactory: func() ... | explode_data.jsonl/64520 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2050
} | [
2830,
3393,
36136,
8846,
2051,
1155,
353,
8840,
836,
8,
341,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
1903,
26358,
50,
11562,
284,
7860,
643,
26358,
52674,
7121,
11571,
64308,
50,
7082,
30389,
15001,
340,
56256,
1397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMTLS(t *testing.T) {
t.Run("with mTLS enabled", func(t *testing.T) {
rt := NewTestDaprRuntime(modes.StandaloneMode)
rt.runtimeConfig.mtlsEnabled = true
rt.runtimeConfig.SentryServiceAddress = "1.1.1.1"
os.Setenv(certs.TrustAnchorsEnvVar, testCertRoot)
defer os.Clearenv()
err := rt.establishSecur... | explode_data.jsonl/76069 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 276
} | [
2830,
3393,
8505,
7268,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
4197,
296,
45439,
8970,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
55060,
1669,
1532,
2271,
35,
59817,
15123,
1255,
2539,
7758,
84112,
3636,
340,
197,
55060,
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 TestDumpRequest(t *testing.T) {
url, _ := url.Parse("https://www.example.com")
assert.True(t, len(DumpRequest(&http.Request{
URL: url,
})) > 0)
} | explode_data.jsonl/43866 | {
"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,
51056,
1900,
1155,
353,
8840,
836,
8,
341,
19320,
11,
716,
1669,
2515,
8937,
445,
2428,
1110,
2136,
7724,
905,
1138,
1572,
6948,
32443,
1155,
11,
2422,
5432,
1510,
1900,
2099,
1254,
9659,
515,
197,
79055,
25,
220,
2515,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestHeadTracker_StartConnectsFromLastSavedHeader(t *testing.T) {
t.Parallel()
g := gomega.NewGomegaWithT(t)
// Need separate db because ht.Stop() will cancel the ctx, causing a db connection
// close and go-txdb rollback.
config, _, cleanupDB := cltest.BootstrapThrowawayORM(t, "last_saved_header", true)
def... | explode_data.jsonl/9098 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 875
} | [
2830,
3393,
12346,
31133,
38056,
14611,
82,
3830,
5842,
41133,
4047,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
692,
197,
322,
14656,
8651,
2927,
1576,
34323,
30213,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRest_CreateWithLazyImage(t *testing.T) {
ts, _, teardown := startupT(t)
defer teardown()
body := `{"text": "test 123 ", "locator":{"url": "https://radio-t.com/blah1", "site": "remark42"}}`
// create comment
resp, err := post(t, ts.URL+"/api/v1/comment", body)
require.NoEr... | explode_data.jsonl/37391 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 266
} | [
2830,
3393,
12416,
34325,
2354,
39766,
1906,
1155,
353,
8840,
836,
8,
341,
57441,
11,
8358,
49304,
1669,
20567,
51,
1155,
340,
16867,
49304,
741,
35402,
1669,
1565,
4913,
1318,
788,
330,
1944,
220,
16,
17,
18,
753,
50994,
1254,
1110,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestQuering(t *testing.T) {
cases := []CR{
{
caseName: "1. Simple filter",
filter: []Filter{
{FieldName: "Oi.Descr", Value: "Debug"},
{FieldName: "Oi.Santa.ID", Value: 1, Operation: ComparisonGreater},
{FieldName: "Oi.Santa.Clause", Value: "Tree"},
},
values: fieldValues{
fieldName:... | explode_data.jsonl/46147 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1838
} | [
2830,
3393,
2183,
4671,
1155,
353,
8840,
836,
8,
1476,
1444,
2264,
1669,
3056,
8973,
515,
197,
197,
515,
298,
2722,
675,
25,
330,
16,
13,
8993,
4051,
756,
298,
50108,
25,
3056,
5632,
515,
571,
197,
90,
51241,
25,
330,
81096,
68428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewManifestPermissioned(t *testing.T) {
manifest, err := bosh.NewManifest(deploymentName, networkName, true, boshDetails)
stemcell := bosh.Stemcell{
Alias: "default",
Name: boshStemcell,
Version: "latest",
}
Equal(t, err, nil)
NotEqual(t, manifest, nil)
Equal(t, manifest.Name, deploymentNam... | explode_data.jsonl/52711 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 492
} | [
2830,
3393,
3564,
38495,
14966,
291,
1155,
353,
8840,
836,
8,
341,
197,
42315,
11,
1848,
1669,
293,
9267,
7121,
38495,
12797,
52799,
675,
11,
3922,
675,
11,
830,
11,
293,
9267,
7799,
692,
18388,
336,
5873,
1669,
293,
9267,
7758,
336,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNew_data_fail(t *testing.T) {
clk := gpiotest.Pin{}
data := failPin{fail: true}
if dev, err := New(&clk, &data); dev != nil || err == nil {
t.Fatal("data pin is not usable")
}
} | explode_data.jsonl/32417 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
3564,
1769,
22121,
1155,
353,
8840,
836,
8,
341,
197,
32583,
1669,
342,
2493,
354,
477,
82939,
16094,
8924,
1669,
3690,
19861,
90,
18403,
25,
830,
532,
743,
3483,
11,
1848,
1669,
1532,
2099,
32583,
11,
609,
691,
1215,
3483... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunGetOut(t *testing.T) {
o, err := runGetOut("true")
assert.Nil(t, err)
assert.Equal(t, len(o), 0)
o, err = runGetOut("false")
assert.NotNil(t, err)
o, err = runGetOut("echo", "hello")
assert.Nil(t, err)
assert.Equal(t, string(o), "hello\n")
// base64 encode "oops" so we can't match on the command... | explode_data.jsonl/28216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
6727,
1949,
2662,
1155,
353,
8840,
836,
8,
341,
22229,
11,
1848,
1669,
1598,
1949,
2662,
445,
1866,
1138,
6948,
59678,
1155,
11,
1848,
340,
6948,
12808,
1155,
11,
2422,
10108,
701,
220,
15,
692,
22229,
11,
1848,
284,
1598,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFormatterObjectArgumentsError(test *testing.T) {
formatted, err := formatter.New().SetLeftDelimiter("[").Format("[.Z} [.Y} [.X} [.Z}", struct {
X, Y, Z int
}{
X: 7,
Y: 8,
Z: 9,
}, "c")
assert.Error(test, err)
assert.Empty(test, formatted)
} | explode_data.jsonl/39734 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
14183,
1190,
19139,
1454,
8623,
353,
8840,
836,
8,
341,
37410,
12127,
11,
1848,
1669,
24814,
7121,
1005,
1649,
5415,
91098,
445,
1183,
568,
4061,
10937,
13,
57,
92,
48339,
56,
92,
48339,
55,
92,
48339,
57,
9545,
2036,
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 Test_Respond(t *testing.T) {
t.Parallel()
testCases := map[string]struct {
status int
errString string
expectedBody string
}{
"status without error string": {
status: http.StatusBadRequest,
expectedBody: `{"error":"Bad Request"}
`,
},
"status with error string": {
status: http.... | explode_data.jsonl/58531 | {
"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,
62,
65354,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
23847,
981,
526,
198,
197,
9859,
703,
262,
914,
198,
197,
42400,
5444,
914,
198,
197,
59403,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMainMakeVersionStringNoVersion(t *testing.T) {
assert := assert.New(t)
savedVersion := version
version = ""
defer func() {
version = savedVersion
}()
v := makeVersionString()
testVersionString(assert, v, unknown, commit, specs.Version)
} | explode_data.jsonl/52199 | {
"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,
6202,
8078,
5637,
703,
2753,
5637,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
1903,
4141,
5637,
1669,
2319,
198,
74954,
284,
35829,
16867,
2915,
368,
341,
197,
74954,
284,
6781,
5637,
198,
197,
66816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReceivedInvalidSegmentCountIncrement(t *testing.T) {
c := context.New(t, defaultMTU)
defer c.Cleanup()
c.CreateConnected(context.TestInitialSequenceNumber, 30000, -1 /* epRcvBuf */)
stats := c.Stack().Stats()
want := stats.TCP.InvalidSegmentsReceived.Value() + 1
iss := seqnum.Value(context.TestInitialSeq... | explode_data.jsonl/75990 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 416
} | [
2830,
3393,
23260,
7928,
21086,
2507,
38311,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2266,
7121,
1155,
11,
1638,
8505,
52,
340,
16867,
272,
727,
60639,
741,
1444,
7251,
21146,
5378,
8787,
6341,
14076,
2833,
11,
220,
18,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestDoubleDown(t *testing.T) {
stack := []cards.Card{
{Rank: cards.Six, Suit: cards.Club},
{Rank: cards.Four, Suit: cards.Club},
{Rank: cards.Four, Suit: cards.Club},
{Rank: cards.Jack, Suit: cards.Club},
{Rank: cards.Ace, Suit: cards.Club},
{Rank: cards.Ten, Suit: cards.Club},
}
deck := cards.Dec... | explode_data.jsonl/5932 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 464
} | [
2830,
3393,
7378,
4454,
1155,
353,
8840,
836,
8,
1476,
48227,
1669,
3056,
25024,
48613,
515,
197,
197,
90,
22550,
25,
7411,
808,
941,
11,
32611,
25,
7411,
21610,
392,
1583,
197,
197,
90,
22550,
25,
7411,
991,
413,
11,
32611,
25,
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... | 3 |
func TestCurrencyConversion(t *testing.T) {
tests := []struct {
name string
val int
}{
{
name: "1",
val: 999999999999999, // this is the max size with accurate precision
},
{
name: "2",
val: 0,
},
{
name: "3",
val: -999999999999999,
},
{
name: "4",
val: 3333333333333333,... | explode_data.jsonl/36935 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 382
} | [
2830,
3393,
26321,
48237,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
19302,
220,
526,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
16,
756,
298,
19302,
25,
220,
220,
24,
24,
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 TestNormalBatch(t *testing.T) {
filters := getFilters()
maxMessageCount := uint32(2)
absoluteMaxBytes := uint32(1000)
preferredMaxBytes := uint32(100)
r := NewReceiverImpl(&mocksharedconfig.Manager{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: absoluteMaxBytes, PreferredMaxBy... | explode_data.jsonl/64635 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
12206,
21074,
1155,
353,
8840,
836,
8,
341,
1166,
8612,
1669,
633,
28351,
741,
22543,
2052,
2507,
1669,
2622,
18,
17,
7,
17,
340,
197,
17182,
5974,
7078,
1669,
2622,
18,
17,
7,
16,
15,
15,
15,
340,
40346,
5554,
5974,
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... | 7 |
func TestScanTypeHashingIncludesScbAnnotations(t *testing.T) {
originalScanType := scanType.DeepCopy()
originalScanType.ObjectMeta.Annotations = map[string]string{
"foo.example.com/bar": "54165165135",
"auto-discovery.securecodebox.io/scantype-hash": "same-hash",
}
modifiedScantype :=... | explode_data.jsonl/24498 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 289
} | [
2830,
3393,
26570,
929,
6370,
287,
55834,
3326,
65,
21418,
1155,
353,
8840,
836,
8,
341,
197,
9889,
26570,
929,
1669,
8569,
929,
55602,
12106,
741,
197,
9889,
26570,
929,
80222,
91172,
284,
2415,
14032,
30953,
515,
197,
197,
1,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_Pagination_PrevNext_AsOneLinks(t *testing.T) {
doc := testutil.CreateHTML()
body := dom.QuerySelector(doc, "body")
root := testutil.CreateDiv(0)
dom.AppendChild(body, root)
anchor := testutil.CreateAnchor("page2", "view as one page")
dom.AppendChild(root, anchor)
assertDefaultDocumentNextLink(t, doc,... | explode_data.jsonl/10837 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 152
} | [
2830,
3393,
1088,
10353,
1088,
7282,
5847,
62741,
3966,
24089,
1155,
353,
8840,
836,
8,
341,
59536,
1669,
1273,
1314,
7251,
5835,
741,
35402,
1669,
4719,
15685,
5877,
19153,
11,
330,
2599,
5130,
33698,
1669,
1273,
1314,
7251,
12509,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetContainerImageMultipleContainers(t *testing.T) {
pod := v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "mypod",
Namespace: "Default",
},
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Name: "mypodContainer",
Image: "rook/test",
},
{
Name: "otherPodContainer"... | explode_data.jsonl/35522 | {
"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,
1949,
4502,
1906,
32089,
74632,
1155,
353,
8840,
836,
8,
1476,
3223,
347,
1669,
348,
16,
88823,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
414,
330,
86134,
347,
756,
298,
90823,
25,
330,
3675,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestObjectCopyDifficultName(t *testing.T) {
ctx := context.Background()
c, rollback := makeConnectionWithObjectHeaders(t)
defer rollback()
const dest = OBJECT + "?param %30%31%32 £100"
_, err := c.ObjectCopy(ctx, CONTAINER, OBJECT, CONTAINER, dest, nil)
if err != nil {
t.Fatal(err)
}
err = c.ObjectDelete... | explode_data.jsonl/12705 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
1190,
12106,
21751,
3866,
675,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
11,
60414,
1669,
1281,
4526,
2354,
1190,
10574,
1155,
340,
16867,
60414,
741,
4777,
3201,
284,
39786,
488,
27244,
903,
1018,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDecodeJson(t *testing.T) {
reader, err := os.Open("./data/search_coffee_sample.json")
if err != nil {
panic(err)
}
var sq Query
rsp, err := sq.decodeJSON(reader)
if err != nil {
t.Error("error should be nil", err)
return
}
if rsp.OrganicResults[0].Title != "Portland Roasting Coffee" {
t.Error(... | explode_data.jsonl/19465 | {
"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,
32564,
5014,
1155,
353,
8840,
836,
8,
341,
61477,
11,
1848,
1669,
2643,
12953,
13988,
691,
23167,
666,
21180,
17491,
4323,
1138,
743,
1848,
961,
2092,
341,
197,
30764,
3964,
340,
197,
532,
2405,
18031,
11361,
198,
7000,
2154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNamingModel(t *testing.T) {
logx.Disable()
_ = Clean()
sqlFile := filepath.Join(t.TempDir(), "tmp.sql")
err := ioutil.WriteFile(sqlFile, []byte(source), 0o777)
assert.Nil(t, err)
dir, _ := filepath.Abs("./testmodel")
camelDir := filepath.Join(dir, "camel")
snakeDir := filepath.Join(dir, "snake")
def... | explode_data.jsonl/6515 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 412
} | [
2830,
3393,
85410,
1712,
1155,
353,
8840,
836,
8,
341,
6725,
87,
10166,
480,
741,
197,
62,
284,
9590,
2822,
30633,
1703,
1669,
26054,
22363,
1155,
65009,
6184,
1507,
330,
5173,
10045,
1138,
9859,
1669,
43144,
4073,
1703,
13148,
1703,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBrokenCookie(t *testing.T) {
db := newDB()
store := New(db, []byte("secret"))
countFn := makeCountHandler("session", store)
r1 := req(countFn, nil)
match(t, r1, 200, "1")
cookie := parseCookies(r1.Header().Get("Set-Cookie"))["session"]
cookie.Value += "junk"
r2 := req(countFn, cookie)
match(t, r2, 2... | explode_data.jsonl/71332 | {
"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,
90526,
20616,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
501,
3506,
741,
57279,
1669,
1532,
9791,
11,
3056,
3782,
445,
20474,
5455,
18032,
24911,
1669,
1281,
2507,
3050,
445,
5920,
497,
3553,
692,
7000,
16,
1669,
4232,
11512... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStepWFGetNodeName(t *testing.T) {
controller := newController()
wfcset := controller.wfclientset.ArgoprojV1alpha1().Workflows("")
// operate the workflow. it should create a pod.
wf := unmarshalWF(stepScriptTmpl)
wf, err := wfcset.Create(wf)
assert.NoError(t, err)
assert.True(t, hasOutputResultRef("ge... | explode_data.jsonl/54387 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 346
} | [
2830,
3393,
8304,
32131,
1949,
1955,
675,
1155,
353,
8840,
836,
8,
1476,
61615,
1669,
501,
2051,
741,
6692,
8316,
746,
1669,
6461,
1418,
69,
2972,
746,
18979,
45926,
73,
53,
16,
7141,
16,
1005,
6776,
38140,
445,
5130,
197,
322,
14476,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExecInContainerNoSuchContainer(t *testing.T) {
testKubelet := newTestKubelet(t)
kubelet := testKubelet.kubelet
fakeRuntime := testKubelet.fakeRuntime
fakeCommandRunner := fakeContainerCommandRunner{}
kubelet.runner = &fakeCommandRunner
podName := "podFoo"
podNamespace := "nsFoo"
containerID := "contai... | explode_data.jsonl/43320 | {
"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,
10216,
641,
4502,
65531,
4502,
1155,
353,
8840,
836,
8,
341,
18185,
42,
3760,
1149,
1669,
501,
2271,
42,
3760,
1149,
1155,
340,
16463,
3760,
1149,
1669,
1273,
42,
3760,
1149,
5202,
3760,
1149,
198,
1166,
726,
15123,
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... | 3 |
func TestNewDNSProviderConfig(t *testing.T) {
testCases := []struct {
desc string
apiKey string
expected string
}{
{
desc: "success",
apiKey: "123",
},
{
desc: "missing credentials",
expected: "dreamhost: credentials missing",
},
}
for _, test := range testCases {
t.Run(test... | explode_data.jsonl/52233 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
3564,
61088,
5179,
2648,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
257,
914,
198,
197,
54299,
1592,
256,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
515,
298,
41653,
25,
256,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSketchSeriesListJSONMarshal(t *testing.T) {
sl := make(SketchSeriesList, 2)
for i := range sl {
sl[i] = Makeseries(i)
}
json, err := sl.MarshalJSON()
assert.NoError(t, err)
assert.JSONEq(t, string(json), `{"sketches":[{"metric":"name.0","tags":["a:0","b:0"],"host":"host.0","interval":0,"points":[{"sk... | explode_data.jsonl/34960 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1217
} | [
2830,
3393,
75288,
25544,
852,
5370,
55438,
1155,
353,
8840,
836,
8,
341,
78626,
1669,
1281,
3759,
74,
2995,
25544,
852,
11,
220,
17,
692,
2023,
600,
1669,
2088,
1739,
341,
197,
78626,
989,
60,
284,
36870,
4699,
1956,
340,
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... | 2 |
func TestSetServiceInstanceCondition(t *testing.T) {
instanceWithCondition := func(condition *v1beta1.ServiceInstanceCondition) *v1beta1.ServiceInstance {
instance := getTestServiceInstance()
instance.Status.Conditions = []v1beta1.ServiceInstanceCondition{*condition}
return instance
}
// The value of the Las... | explode_data.jsonl/58175 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1549
} | [
2830,
3393,
1649,
1860,
2523,
10547,
1155,
353,
8840,
836,
8,
341,
56256,
2354,
10547,
1669,
2915,
47489,
353,
85,
16,
19127,
16,
13860,
2523,
10547,
8,
353,
85,
16,
19127,
16,
13860,
2523,
341,
197,
56256,
1669,
633,
2271,
1860,
2523... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContains(t *testing.T) {
is := assert.New(t)
tests := map[interface{}]interface{}{
1: []int{1, 2, 3},
2: []int8{1, 2, 3},
3: []int16{1, 2, 3},
4: []int32{4, 2, 3},
5: []int64{5, 2, 3},
6: []uint{6, 2, 3},
7: []uint8{7, 2, 3},
8: []uint16{8, 2, 3},
9: []uint32{9, 2... | explode_data.jsonl/70783 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 632
} | [
2830,
3393,
23805,
1155,
353,
8840,
836,
8,
341,
19907,
1669,
2060,
7121,
1155,
340,
78216,
1669,
2415,
58,
4970,
78134,
4970,
67066,
197,
197,
16,
25,
262,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
1583,
197,
197,
17,
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... | 3 |
func TestParseArgs(t *testing.T) {
input := []string{appconfig.DefaultDocumentWorker, "documentID"}
channelName, err := proc.ParseArgv(input)
assert.NoError(t, err)
assert.Equal(t, "documentID", channelName)
} | explode_data.jsonl/40509 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
14463,
4117,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
3056,
917,
90,
676,
1676,
13275,
7524,
21936,
11,
330,
6062,
915,
16707,
71550,
675,
11,
1848,
1669,
13674,
8937,
2735,
85,
5384,
340,
6948,
35699,
1155,
11,
1848,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestNode_ShortID(t *testing.T) {
n := NewNode(gen.Reference(), insolar.StaticRoleVirtual, nil, "127.0.0.1", "123")
assert.EqualValues(t, GenerateUintShortID(n.ID()), n.ShortID())
n.(MutableNode).SetShortID(11)
assert.EqualValues(t, 11, n.ShortID())
} | explode_data.jsonl/46252 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
1955,
1098,
22007,
915,
1155,
353,
8840,
836,
8,
341,
9038,
1669,
1532,
1955,
36884,
58416,
1507,
1640,
7417,
58826,
9030,
33026,
11,
2092,
11,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
497,
330,
16,
17,
18,
1138,
6948,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCT_GeomGuideListMarshalUnmarshal(t *testing.T) {
v := dml.NewCT_GeomGuideList()
buf, _ := xml.Marshal(v)
v2 := dml.NewCT_GeomGuideList()
xml.Unmarshal(buf, v2)
} | explode_data.jsonl/73140 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
1162,
2646,
68,
316,
41010,
852,
55438,
1806,
27121,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
294,
1014,
7121,
1162,
2646,
68,
316,
41010,
852,
741,
26398,
11,
716,
1669,
8396,
37271,
3747,
340,
5195,
17,
1669,
294,
1014,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetActivityPubPageSize(t *testing.T) {
t.Run("Not specified -> default value", func(t *testing.T) {
cmd := getTestCmd(t)
pageSize, err := getActivityPubPageSize(cmd)
require.NoError(t, err)
require.Equal(t, defaultActivityPubPageSize, pageSize)
})
t.Run("Invalid value -> error", func(t *testing.T)... | explode_data.jsonl/31132 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 480
} | [
2830,
3393,
1949,
4052,
29162,
45917,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
2623,
5189,
1464,
1638,
897,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
25920,
1669,
633,
2271,
15613,
1155,
692,
197,
35272,
1695,
11,
1848,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParsePointWithStringWithSpaces(t *testing.T) {
test(t, `cpu,host=serverA,region=us-east value=1.0,str="foo bar" 1000000000`,
NewTestPoint(
"cpu",
models.NewTags(map[string]string{
"host": "serverA",
"region": "us-east",
}),
models.Fields{
"value": 1.0,
"str": "foo bar", // sp... | explode_data.jsonl/16932 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
14463,
2609,
52342,
2354,
71324,
1155,
353,
8840,
836,
8,
341,
18185,
1155,
11,
1565,
16475,
11,
3790,
28,
4030,
32,
11,
3943,
28,
355,
39507,
897,
28,
16,
13,
15,
42321,
428,
7975,
3619,
1,
220,
16,
15,
15,
15,
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... | 1 |
func TestIssue27831(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(a enum(\"a\", \"b\"), b enum(\"a\", \"b\"), c bool)")
tk.MustExec("insert into t values(\"a\",... | explode_data.jsonl/65613 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 347
} | [
2830,
3393,
42006,
17,
22,
23,
18,
16,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMakeChannelCreationTransactionWithSigner(t *testing.T) {
channelID := "foo"
mspmgmt.LoadDevMsp()
signer := localmsp.NewSigner()
cct, err := MakeChannelCreationTransaction(channelID, signer, nil, genesisconfig.Load(genesisconfig.SampleSingleMSPChannelV11Profile))
assert.NoError(t, err, "Making chain crea... | explode_data.jsonl/78128 | {
"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,
8078,
9629,
32701,
8070,
2354,
7264,
261,
1155,
353,
8840,
836,
8,
341,
71550,
915,
1669,
330,
7975,
1837,
47691,
5187,
46063,
13969,
14592,
83816,
741,
69054,
261,
1669,
2205,
92545,
7121,
7264,
261,
2822,
1444,
302,
11,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_setZeroes(t *testing.T) {
type args struct {
matrix [][]int
}
tests := []struct {
name string
args args
want [][]int
}{
{
name: "示例一",
args: args{matrix: [][]int{{1, 1, 1}, {1, 0, 1}, {1, 1, 1}}},
want: [][]int{{1, 0, 1}, {0, 0, 0}, {1, 0, 1}},
},
{
name: "示例二",
args: args{mat... | explode_data.jsonl/54997 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 936
} | [
2830,
3393,
2602,
17999,
288,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
60930,
52931,
396,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
52931,
396,
198,
197,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestActionAndSubscriptionLifecyle(t *testing.T) {
assert := assert.New(t)
dir := tempdir(t)
subscriptionName := "testSub"
defer cleanup(t, dir)
sm := newTestSubscriptionManager()
sm.config.LevelDB.Path = path.Join(dir, "db")
err := sm.Init()
assert.NoError(err)
defer sm.db.Close()
assert.Equal([]*api.Su... | explode_data.jsonl/82229 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 795
} | [
2830,
3393,
2512,
3036,
33402,
43,
333,
757,
967,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
48532,
1669,
2730,
3741,
1155,
340,
28624,
12124,
675,
1669,
330,
1944,
3136,
698,
16867,
21290,
1155,
11,
5419,
340,
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... | 3 |
func TestPUCalculator_DesiredPU(t *testing.T) {
tc := []struct {
buffer int
dbCount int
want int
}{
{
buffer: 5,
dbCount: 0,
want: 100,
},
{
buffer: 5,
dbCount: 4,
want: 100,
},
{
buffer: 5,
dbCount: 14,
want: 200,
},
{
buffer: 5,
dbCount: 15,
w... | explode_data.jsonl/48901 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 491
} | [
2830,
3393,
47,
5459,
278,
20022,
98054,
2690,
6325,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
3056,
1235,
341,
197,
31122,
220,
526,
198,
197,
20939,
2507,
526,
198,
197,
50780,
262,
526,
198,
197,
59403,
197,
197,
515,
298,
31122,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSameStreamNameDifferentNamespaces(t *testing.T) {
// this buildconfig references an image stream with the same name as the one that was just updated,
// but the namespaces differ
buildcfg := mockBuildConfig("registry.com/namespace/imagename1", "registry.com/namespace/imagename1", "testImageRepo1", "testTag1... | explode_data.jsonl/69174 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 354
} | [
2830,
3393,
19198,
3027,
675,
69123,
7980,
27338,
1155,
353,
8840,
836,
8,
341,
197,
322,
419,
1936,
1676,
15057,
458,
2168,
4269,
448,
279,
1852,
829,
438,
279,
825,
429,
572,
1101,
6049,
345,
197,
322,
714,
279,
58091,
1745,
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... | 4 |
func TestMissingStorage(t *testing.T) {
handler := New(map[string]RESTStorage{
"foo": &SimpleRESTStorage{},
}, "/prefix/version")
server := httptest.NewServer(handler)
client := http.Client{}
request, err := http.NewRequest("GET", server.URL+"/prefix/version/foobar", nil)
expectNoError(t, err)
response, err :... | explode_data.jsonl/30463 | {
"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,
25080,
5793,
1155,
353,
8840,
836,
8,
341,
53326,
1669,
1532,
9147,
14032,
60,
38307,
5793,
515,
197,
197,
1,
7975,
788,
609,
16374,
38307,
5793,
38837,
197,
2137,
3521,
11849,
64413,
1138,
41057,
1669,
54320,
70334,
7121,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestForwardResponseStreamCustomMarshaler(t *testing.T) {
type msg struct {
pb proto.Message
err error
}
tests := []struct {
name string
msgs []msg
statusCode int
}{{
name: "encoding",
msgs: []msg{
{&pb.SimpleMessage{Id: "One"}, nil},
{&pb.SimpleMessage{Id: "Two"}, nil},
},
... | explode_data.jsonl/13713 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1070
} | [
2830,
3393,
25925,
2582,
3027,
10268,
55438,
261,
1155,
353,
8840,
836,
8,
341,
13158,
3750,
2036,
341,
197,
3223,
65,
220,
18433,
8472,
198,
197,
9859,
1465,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSubQueryWithRaw(t *testing.T) {
users := []User{
{Name: "subquery_raw_1", Age: 10},
{Name: "subquery_raw_2", Age: 20},
{Name: "subquery_raw_3", Age: 30},
{Name: "subquery_raw_4", Age: 40},
}
DB.Create(&users)
var count int64
err := DB.Raw("select count(*) from (?) tmp",
DB.Table("users").
Se... | explode_data.jsonl/48718 | {
"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,
3136,
2859,
2354,
20015,
1155,
353,
8840,
836,
8,
341,
90896,
1669,
3056,
1474,
515,
197,
197,
63121,
25,
330,
1966,
1631,
16067,
62,
16,
497,
13081,
25,
220,
16,
15,
1583,
197,
197,
63121,
25,
330,
1966,
1631,
16067,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvalidBuffer(t *testing.T) {
tick = fakeTick
defer func() { tick = time.Tick }()
buf := &bytes.Buffer{}
log.SetOutput(buf)
defer func() { log.SetOutput(os.Stderr) }()
c := New(&errWriter{}, time.Second)
c.Count("metric", 1)
wait(buf)
assert.Contains(t, buf.String(), "error: could not write to sta... | explode_data.jsonl/59257 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
7928,
4095,
1155,
353,
8840,
836,
8,
341,
3244,
865,
284,
12418,
22213,
198,
16867,
2915,
368,
314,
9341,
284,
882,
66858,
335,
2822,
26398,
1669,
609,
9651,
22622,
16094,
6725,
4202,
5097,
10731,
340,
16867,
2915,
368,
314,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReverseBits(t *testing.T) {
for _, h := range reverseBitsTests {
if v := reverseBits(h.in, h.bitCount); v != h.out {
t.Errorf("reverseBits(%v,%v) = %v, want %v",
h.in, h.bitCount, v, h.out)
}
}
} | explode_data.jsonl/81407 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
45695,
19920,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
305,
1669,
2088,
9931,
19920,
18200,
341,
197,
743,
348,
1669,
9931,
19920,
3203,
1858,
11,
305,
30099,
2507,
1215,
348,
961,
305,
2532,
341,
298,
3244,
13080,
445,
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 TestDisableFold(t *testing.T) {
// Functions like BENCHMARK() shall not be folded into result 0,
// but normal outer function with constant args should be folded.
// Types of expression and first layer of args will be validated.
cases := []struct {
SQL string
Expected expression.Expression
Args ... | explode_data.jsonl/25787 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 580
} | [
2830,
3393,
25479,
75536,
1155,
353,
8840,
836,
8,
341,
197,
322,
23550,
1075,
425,
96190,
368,
4880,
537,
387,
47035,
1119,
1102,
220,
15,
345,
197,
322,
714,
4622,
15955,
729,
448,
6783,
2827,
1265,
387,
47035,
624,
197,
322,
20768,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseSpsPps(t *testing.T) {
s := "a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z2QAIKzZQMApsBEAAAMAAQAAAwAyDxgxlg==,aOvssiw=; profile-level-id=640020"
f, err := ParseAFmtPBase(s)
assert.Equal(t, nil, err)
sps, pps, err := ParseSpsPps(&f)
assert.Equal(t, nil, err)
assert.Equal(t, goldenSps, sps)
... | explode_data.jsonl/55594 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
14463,
50,
1690,
47,
1690,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
330,
64,
18111,
76,
790,
25,
24,
21,
10151,
2022,
14982,
28,
16,
26,
274,
2674,
89412,
12,
4917,
28,
57,
17,
48,
15469,
42,
89,
57,
48,
4835,
1690,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFirestoreGetDocument(t *testing.T) {
var name2 string = "name2-1052831874"
var expectedResponse = &firestorepb.Document{
Name: name2,
}
mockFirestore.err = nil
mockFirestore.reqs = nil
mockFirestore.resps = append(mockFirestore.resps[:0], expectedResponse)
var formattedName string = fmt.Sprintf("pr... | explode_data.jsonl/27370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 359
} | [
2830,
3393,
48513,
1949,
7524,
1155,
353,
8840,
836,
8,
341,
2405,
829,
17,
914,
284,
330,
606,
17,
12,
16,
15,
20,
17,
23,
18,
16,
23,
22,
19,
698,
2405,
3601,
2582,
284,
609,
10796,
4314,
16650,
26256,
515,
197,
21297,
25,
829... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFormat(t *testing.T) {
s, err := parseFile("src/parse/asp/test_data/interpreter/format.build")
assert.NoError(t, err)
assert.EqualValues(t, `LLVM_NATIVE_ARCH=\"x86\"`, s.Lookup("arch"))
assert.EqualValues(t, `ARCH="linux_amd64"`, s.Lookup("arch2"))
} | explode_data.jsonl/81093 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
4061,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
4715,
1703,
445,
3548,
14,
6400,
14,
13367,
12697,
1769,
14,
90554,
92340,
13239,
1138,
6948,
35699,
1155,
11,
1848,
340,
6948,
12808,
6227,
1155,
11,
1565,
4086,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSlotQueueBasic2(t *testing.T) {
obj := NewSlotQueue("test2")
if !obj.isIdle() {
t.Fatalf("Should be idle")
}
if ok, _ := obj.isNewContainerNeeded(); ok {
t.Fatalf("Should not need a new container")
}
outChan, cancel := obj.startDequeuer(context.Background())
select {
case z := <-outChan:
t.Fat... | explode_data.jsonl/45505 | {
"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,
19877,
7554,
15944,
17,
1155,
353,
8840,
836,
8,
1476,
22671,
1669,
1532,
19877,
7554,
445,
1944,
17,
5130,
743,
753,
2295,
2079,
41370,
368,
341,
197,
3244,
30762,
445,
14996,
387,
27647,
1138,
197,
532,
743,
5394,
11,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestText(t *testing.T) {
g := setup(t)
g.Len(diff.NewText("a"), 1)
g.Len(diff.NewText("a\n"), 2)
g.Len(diff.NewText("a\n\n"), 3)
g.Len(diff.NewText("\na"), 2)
} | explode_data.jsonl/75070 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
1178,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
6505,
1155,
340,
3174,
65819,
37124,
7121,
1178,
445,
64,
3975,
220,
16,
340,
3174,
65819,
37124,
7121,
1178,
445,
64,
1699,
3975,
220,
17,
340,
3174,
65819,
37124,
7121,
117... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetTxIDsSubmittedByUser(t *testing.T) {
clientCertTemDir := testutils.GenerateTestCrypto(t, []string{"admin", "alice", "bob", "eve", "server"})
testServer, _, _, err := SetupTestServerWithParams(t, clientCertTemDir, time.Second, 10, false, false)
defer testServer.Stop()
require.NoError(t, err)
bcdb, admin... | explode_data.jsonl/47198 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1223
} | [
2830,
3393,
1949,
31584,
30466,
46541,
1359,
1474,
1155,
353,
8840,
836,
8,
341,
25291,
36934,
21988,
6184,
1669,
1273,
6031,
57582,
2271,
58288,
1155,
11,
3056,
917,
4913,
2882,
497,
330,
63195,
497,
330,
47086,
497,
330,
82048,
497,
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... | 3 |
func Test_signature_Raw(t *testing.T) {
t.Parallel()
type (
testCase struct {
name string
sign Signature
want []byte
wantErr bool
}
testList []testCase
)
algos := GetAlgos()
tests := make(testList, 0, algos.Len()+1)
for name, algo := range algos {
signable, _ := mockSignable(algo, 1... | explode_data.jsonl/21346 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 434
} | [
2830,
3393,
39859,
2568,
672,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
13158,
2399,
197,
18185,
4207,
2036,
341,
298,
11609,
262,
914,
198,
298,
69054,
262,
32232,
198,
298,
50780,
262,
3056,
3782,
198,
298,
50780,
7747,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNamespaceAssignShardSet(t *testing.T) {
ctrl := xtest.NewController(t)
defer ctrl.Finish()
shards := sharding.NewShards([]uint32{0, 1, 2, 3, 4}, shard.Available)
prevAssignment := shard.NewShards([]shard.Shard{shards[0], shards[2], shards[3]})
nextAssignment := shard.NewShards([]shard.Shard{shards[0], sh... | explode_data.jsonl/35366 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1116
} | [
2830,
3393,
22699,
28933,
2016,
567,
1649,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
856,
1944,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
36196,
2347,
1669,
557,
28410,
7121,
2016,
2347,
10556,
2496,
18,
17,
90,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBuilderHeadersEncrypter(t *testing.T) {
key := testPrivRSAKey1
claims := &Claims{Issuer: "foo"}
keyIDBytes := make([]byte, 20)
if _, err := io.ReadFull(rand.Reader, keyIDBytes); err != nil {
t.Fatalf("failed to read random bytes: %v", err)
}
keyID := hex.EncodeToString(keyIDBytes)
wantKeyID := keyID... | explode_data.jsonl/63653 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 464
} | [
2830,
3393,
3297,
10574,
61520,
261,
1155,
353,
8840,
836,
8,
341,
23634,
1669,
1273,
32124,
73564,
1592,
16,
198,
197,
48561,
1669,
609,
51133,
90,
98902,
25,
330,
7975,
63159,
23634,
915,
7078,
1669,
1281,
10556,
3782,
11,
220,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_BeginAuthWithPrompt(t *testing.T) {
// This exists because there was a panic caused by the oauth2 package when
// the AuthCodeOption passed was nil. This test uses it, Test_BeginAuth does
// not, to ensure both cases are covered.
t.Parallel()
a := assert.New(t)
provider := googleProvider()
provider.Se... | explode_data.jsonl/19857 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 263
} | [
2830,
3393,
93447,
5087,
2354,
54615,
1155,
353,
8840,
836,
8,
341,
197,
322,
1096,
6724,
1576,
1052,
572,
264,
21975,
8881,
553,
279,
46415,
17,
6328,
979,
198,
197,
322,
279,
7366,
2078,
5341,
5823,
572,
2092,
13,
1096,
1273,
5711,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWithMultiPartFormDataSetsContentLength(t *testing.T) {
v := map[string]interface{}{
"file": ioutil.NopCloser(strings.NewReader("Hello Gopher")),
"age": "42",
}
r, err := Prepare(&http.Request{},
WithMultiPartFormData(v))
if err != nil {
t.Fatalf("autorest: WithMultiPartFormData failed wi... | explode_data.jsonl/20962 | {
"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,
2354,
20358,
5800,
55966,
30175,
2762,
4373,
1155,
353,
8840,
836,
8,
972,
5195,
1669,
2415,
14032,
31344,
6257,
1666,
197,
197,
1,
1192,
788,
43144,
2067,
453,
51236,
799,
51442,
68587,
445,
9707,
479,
16940,
2761,
1871,
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... | 4 |
func TestPrintOneRecord(t *testing.T) {
fakeTimestamp := time.Now()
fakeData := []byte("something cool")
fakeShardID := "fake-shard-id"
fakeSequenceNumber := "fake-sequence-number"
cases := []struct {
name string
verbose bool
stream string
shard *kinesis.Shard
record *kinesis.Record
expecte... | explode_data.jsonl/57246 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 651
} | [
2830,
3393,
8994,
3966,
6471,
1155,
353,
8840,
836,
8,
341,
1166,
726,
20812,
1669,
882,
13244,
741,
1166,
726,
1043,
1669,
3056,
3782,
445,
33331,
7010,
1138,
1166,
726,
2016,
567,
915,
1669,
330,
30570,
7514,
567,
12897,
698,
1166,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBasicMarshalOrdered(t *testing.T) {
var result bytes.Buffer
err := NewEncoder(&result).Order(OrderPreserve).Encode(basicTestData)
if err != nil {
t.Fatal(err)
}
expected := basicTestTomlOrdered
if !bytes.Equal(result.Bytes(), expected) {
t.Errorf("Bad marshal: expected\n-----\n%s\n-----\ngot\n-----\n... | explode_data.jsonl/46302 | {
"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,
15944,
55438,
54384,
1155,
353,
8840,
836,
8,
341,
2405,
1102,
5820,
22622,
198,
9859,
1669,
1532,
19921,
2099,
1382,
568,
4431,
39692,
14367,
5852,
568,
32535,
1883,
5971,
83920,
340,
743,
1848,
961,
2092,
341,
197,
3244,
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 TestGetCrb(t *testing.T) {
assert := assert.New(t)
crb := e.getCrb()
assert.Equal(reflect.TypeOf(crb), reflect.TypeOf(&rbacv1.ClusterRoleBinding{}))
assert.Equal(crb.ObjectMeta.Name, e.namespace)
assert.Equal(crb.Subjects[0].Kind, "ServiceAccount")
assert.Equal(crb.Subjects[0].Name, e.namespace)
assert.Equa... | explode_data.jsonl/21317 | {
"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,
1949,
34,
10681,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
1444,
10681,
1669,
384,
22494,
10681,
741,
6948,
12808,
13321,
767,
73921,
1337,
10681,
701,
8708,
73921,
2099,
10681,
580,
85,
16,
72883,
903... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJobStrategy(t *testing.T) {
ctx := api.NewDefaultContext()
if !Strategy.NamespaceScoped() {
t.Errorf("Job must be namespace scoped")
}
if Strategy.AllowCreateOnUpdate() {
t.Errorf("Job should not allow create on update")
}
validSelector := map[string]string{"a": "b"}
validPodTemplateSpec := api.Pod... | explode_data.jsonl/8946 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 640
} | [
2830,
3393,
12245,
19816,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6330,
7121,
3675,
1972,
741,
743,
753,
19816,
46011,
39437,
368,
341,
197,
3244,
13080,
445,
12245,
1969,
387,
4473,
46960,
1138,
197,
532,
743,
27745,
29081,
4021,
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 TestCreatePipeline_ComplexPipeline(t *testing.T) {
store := NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch())
defer store.Close()
manager := NewResourceManager(store)
createdPipeline, err := manager.CreatePipeline("pipeline1", "", []byte(strings.TrimSpace(
complexPipeline)))
assert.Nil(t, err)
_, er... | explode_data.jsonl/28348 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
4021,
34656,
16946,
9111,
34656,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
1532,
52317,
2959,
2043,
2195,
62396,
67811,
7121,
52317,
1462,
2461,
44338,
2398,
16867,
3553,
10421,
741,
92272,
1669,
1532,
32498,
31200,
692,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDirty(t *testing.T) {
var r Record
if r.Signed() {
t.Error("Signed returned true for zero record")
}
if _, err := rlp.EncodeToBytes(r); err != errEncodeUnsigned {
t.Errorf("expected errEncodeUnsigned, got %#v", err)
}
require.NoError(t, r.Sign(privkey))
if !r.Signed() {
t.Error("Signed return fa... | explode_data.jsonl/39491 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 254
} | [
2830,
3393,
36485,
1155,
353,
8840,
836,
8,
341,
2405,
435,
13583,
271,
743,
435,
808,
1542,
368,
341,
197,
3244,
6141,
445,
49312,
5927,
830,
369,
7168,
3255,
1138,
197,
532,
743,
8358,
1848,
1669,
435,
13545,
50217,
1249,
7078,
2601... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConditionalRequireResolve(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/a.js": `
require.resolve(x ? 'a' : y ? 'b' : 'c')
require.resolve(x ? y ? 'a' : 'b' : c)
`,
},
entryPaths: []string{"/a.js"},
options: config.Options{
Mode: config.Mo... | explode_data.jsonl/38473 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 283
} | [
2830,
3393,
79233,
17959,
56808,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
64,
2857,
788,
22074,
571,
17957,
14691,
2075,
937,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.