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 TestRoutes(t *testing.T) {
assert.IsType(t, Routes{}, routes, "Unexpected type of routes")
assert.Len(t, routes, 4, "Unexpected number of routes")
assert.Equal(t, "Index", routes[0].Name, "Unexpected route name")
assert.Equal(t, "AddEvent", routes[1].Name, "Unexpected route name")
assert.Equal(t, "RemoveEvent... | explode_data.jsonl/63800 | {
"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,
26653,
1155,
353,
8840,
836,
8,
341,
6948,
4506,
929,
1155,
11,
22356,
22655,
11291,
11,
330,
29430,
943,
315,
11291,
1138,
6948,
65819,
1155,
11,
11291,
11,
220,
19,
11,
330,
29430,
1372,
315,
11291,
1138,
6948,
12808,
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 TestAskStreamSendReceiveAskResponse(t *testing.T) {
ctx := context.Background()
testCases := map[string]struct {
senderDisabledNew bool
receiverDisabledNew bool
}{
"both clients current version": {},
"sender old supports old queries": {
senderDisabledNew: true,
},
"receiver only supports old q... | explode_data.jsonl/19990 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 609
} | [
2830,
3393,
26172,
3027,
11505,
14742,
26172,
2582,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
1903,
1659,
25907,
3564,
256,
1807,
198,
197,
17200,
12862,
25907,
3564... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRestartKillWait(t *testing.T) {
eng := NewTestEngine(t)
runtime := mkDaemonFromEngine(eng, t)
defer runtime.Nuke()
config, hostConfig, _, err := parseRun([]string{"-i", unitTestImageID, "/bin/cat"}, nil)
if err != nil {
t.Fatal(err)
}
id := createTestContainer(eng, config, t)
job := eng.Job("conta... | explode_data.jsonl/31467 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 566
} | [
2830,
3393,
59354,
53734,
14190,
1155,
353,
8840,
836,
8,
341,
197,
826,
1669,
1532,
2271,
4571,
1155,
340,
7000,
4466,
1669,
23789,
89177,
3830,
4571,
7,
826,
11,
259,
340,
16867,
15592,
2067,
10430,
2822,
25873,
11,
3468,
2648,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestExtractRegistryFromUrl(t *testing.T) {
registries := [][]string{
// Ok, should work
{"http://core.harbor.domain:8080", "core.harbor.domain:8080"},
{"https://core.harbor.domain:8080", "core.harbor.domain:8080"},
{"https://core.harbor.domain", "core.harbor.domain"},
{"https://core.harbor.domain/path/v... | explode_data.jsonl/71412 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 336
} | [
2830,
3393,
28959,
15603,
3830,
2864,
1155,
353,
8840,
836,
8,
341,
37013,
380,
4019,
1669,
52931,
917,
515,
197,
197,
322,
7622,
11,
1265,
975,
198,
197,
197,
4913,
1254,
1110,
2153,
86455,
9368,
11003,
25,
23,
15,
23,
15,
497,
330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestTelemetryDefaultToVLabs(t *testing.T) {
cs := getDefaultContainerService()
vlabsCS := ConvertContainerServiceToVLabs(cs)
if vlabsCS == nil {
t.Errorf("expected the converted containerService struct to be non-nil")
}
if vlabsCS.Properties.FeatureFlags.EnableTelemetry {
t.Errorf("expected the EnableTele... | explode_data.jsonl/34 | {
"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,
6639,
35958,
3675,
1249,
30698,
3435,
1155,
353,
8840,
836,
8,
341,
71899,
1669,
69106,
4502,
1860,
741,
5195,
70271,
6412,
1669,
7169,
4502,
1860,
1249,
30698,
3435,
41153,
340,
743,
41136,
3435,
6412,
621,
2092,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSnatPortExhausted(t *testing.T) {
tempdir, err := ioutil.TempDir("", "hostagent_test_")
if err != nil {
panic(err)
}
defer os.RemoveAll(tempdir)
agent := testAgent()
agent.config.OpFlexSnatDir = tempdir
agent.config.OpFlexEndpointDir = tempdir
agent.config.OpFlexServiceDir = tempdir
agent.config.Upl... | explode_data.jsonl/22816 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 995
} | [
2830,
3393,
20720,
266,
7084,
840,
15074,
291,
1155,
353,
8840,
836,
8,
341,
16280,
3741,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
3790,
8092,
4452,
62,
1138,
743,
1848,
961,
2092,
341,
197,
30764,
3964,
340,
197,
532,
16867,
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 TestConfig_URLRetries3Fails(t *testing.T) {
httpLoadConfigRetryInterval = 0 * time.Second
responseCounter := 0
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
responseCounter++
}))
defer ts.Close()
expected := fmt.Sprintf("Error... | explode_data.jsonl/72177 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 199
} | [
2830,
3393,
2648,
8000,
12020,
4019,
18,
37,
6209,
1155,
353,
8840,
836,
8,
341,
28080,
5879,
2648,
51560,
10256,
284,
220,
15,
353,
882,
32435,
198,
21735,
14099,
1669,
220,
15,
198,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHappys(t *testing.T) {
happys := gomath.Happys(100)
checkInfInt64Stream(
t,
happys,
100, 103, 109, 129, 130, 133, 139, 167, 176, 188)
} | explode_data.jsonl/23246 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 74
} | [
2830,
3393,
39,
676,
1047,
1155,
353,
8840,
836,
8,
341,
9598,
676,
1047,
1669,
342,
316,
587,
3839,
676,
1047,
7,
16,
15,
15,
340,
25157,
19433,
1072,
21,
19,
3027,
1006,
197,
3244,
345,
197,
9598,
676,
1047,
345,
197,
197,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestVolumeGCStrategy(t *testing.T) {
tests := []struct {
name string
strategy wfv1.VolumeClaimGCStrategy
phase wfv1.NodePhase
expectedVolumesRemaining int
}{{
name: "failed/OnWorkflowCompletion",
strategy: wfv1... | explode_data.jsonl/70949 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 836
} | [
2830,
3393,
18902,
22863,
19816,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
3824,
914,
198,
197,
11355,
10228,
338,
289,
27890,
16,
79106,
45544,
22863,
19816,
198,
197,
197,
25141,
503,
289,
27890,
16,
2171... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateTLSCert(t *testing.T) {
readFile := func(path string) []byte {
fName := filepath.Join("testdata", "dynamic_cert_update", path)
data, err := ioutil.ReadFile(fName)
if err != nil {
panic(fmt.Errorf("Failed reading %s: %v", fName, err))
}
return data
}
loadBytes := func(prefix string) (key, ... | explode_data.jsonl/38634 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 841
} | [
2830,
3393,
4289,
13470,
3540,
529,
1155,
353,
8840,
836,
8,
341,
37043,
1703,
1669,
2915,
5581,
914,
8,
3056,
3782,
341,
197,
1166,
675,
1669,
26054,
22363,
445,
92425,
497,
330,
21544,
37097,
8882,
497,
1815,
340,
197,
8924,
11,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRDSHTTPProxyDuplicateIncludeConditions(t *testing.T) {
rh, c, done := setup(t)
defer done()
svc1 := fixture.NewService("kuard").
WithPorts(v1.ServicePort{Name: "http", Port: 8080, TargetPort: intstr.FromInt(8080)})
rh.OnAdd(svc1)
svc2 := fixture.NewService("teama/kuard").
WithPorts(v1.ServicePort{Na... | explode_data.jsonl/24124 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1128
} | [
2830,
3393,
49,
5936,
9230,
16219,
53979,
22283,
35435,
1155,
353,
8840,
836,
8,
341,
7000,
71,
11,
272,
11,
2814,
1669,
6505,
1155,
340,
16867,
2814,
2822,
1903,
7362,
16,
1669,
12507,
7121,
1860,
445,
74,
11034,
38609,
197,
197,
235... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestICodeApi_ExecuteRequest(t *testing.T) {
savePath := os.Getenv("GOPATH") + "/src/github.com/it-chain/engine/.tmp/"
defer os.RemoveAll(savePath)
sshPath := "./id_rsa"
err, tearDown1 := generatePriKey(sshPath)
assert.NoError(t, err)
defer tearDown1()
api, _ := setUp(t)
icode, err := api.Deploy(savePath,... | explode_data.jsonl/9676 | {
"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,
1317,
534,
6563,
83453,
1900,
1155,
353,
8840,
836,
8,
341,
49230,
1820,
1669,
2643,
64883,
445,
98733,
4827,
899,
488,
3521,
3548,
71120,
905,
14,
275,
65186,
82045,
11930,
5173,
29555,
16867,
2643,
84427,
33546,
1820,
692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStepper_Descend(t *testing.T) {
st := Stepper{
N: 1,
U: Unum,
}
rng, err := st.Descend(100, 3)
assert.NoError(t, err)
var vals []int
for rng.HasNext() {
vals = append(vals, rng.Next().(int))
}
assert.Equal(t, []int{100, 99, 98}, vals)
} | explode_data.jsonl/78070 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 127
} | [
2830,
3393,
20903,
6922,
92957,
408,
1155,
353,
8840,
836,
8,
341,
18388,
1669,
3360,
6922,
515,
197,
18317,
25,
220,
16,
345,
197,
15980,
25,
1230,
372,
345,
197,
630,
7000,
968,
11,
1848,
1669,
357,
68428,
408,
7,
16,
15,
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... | 2 |
func TestUtil_Test_GetServiceEnvVar(t *testing.T) {
assert.Equal(t, GetServiceEnvVar("SERVICE_HOST"), "KEYCLOAK_POSTGRESQL_SERVICE_HOST")
assert.Equal(t, GetServiceEnvVar("SERVICE_PORT"), "KEYCLOAK_POSTGRESQL_SERVICE_PORT")
} | explode_data.jsonl/28514 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
2742,
32541,
13614,
1860,
14359,
3962,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
1155,
11,
2126,
1860,
14359,
3962,
445,
65075,
17213,
3975,
330,
4784,
34,
1593,
11907,
20506,
57063,
6688,
21590,
17213,
1138,
6948,
12808,
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 |
func TestRESTClientPodCPUEmptyMetrics(t *testing.T) {
tc := restClientTestCase{
resourceName: v1.ResourceCPU,
desiredError: fmt.Errorf("no metrics returned from resource metrics API"),
reportedMetricPoints: []metricPoint{},
reportedPodMetrics: []map[string]int64{},
}
tc.runTest(t)
} | explode_data.jsonl/64906 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
38307,
2959,
23527,
7123,
2230,
76,
1595,
27328,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
2732,
2959,
16458,
515,
197,
50346,
675,
25,
260,
348,
16,
20766,
31615,
345,
197,
52912,
2690,
1454,
25,
260,
8879,
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... | 1 |
func TestSortLesserWithNaNs(t *testing.T) {
actual := []float64{ 5.0, 4.1, math.NaN(), 8.6, 0.1 }
expected := []float64{ 0.1, 4.1, 5.0, 8.6, math.NaN() }
sort.Slice(actual, func(i, j int) bool {
return LesserWithNaNs(actual[i], actual[j])
})
test.EqualsWithNans(t, expected, actual)
} | explode_data.jsonl/68392 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
10231,
27451,
261,
2354,
22831,
82,
1155,
353,
8840,
836,
8,
341,
88814,
1669,
3056,
3649,
21,
19,
90,
220,
20,
13,
15,
11,
220,
19,
13,
16,
11,
6888,
78706,
1507,
220,
23,
13,
21,
11,
220,
15,
13,
16,
456,
42400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetTxCCInstance(t *testing.T) {
// setup the MSP manager so that we can sign/verify
err := msptesttools.LoadMSPSetupForTesting()
if err != nil {
t.Fatalf("Could not initialize msp, err: %s", err)
}
signer, err := mspmgmt.GetLocalMSP().GetDefaultSigningIdentity()
if err != nil {
t.Fatalf("Could not in... | explode_data.jsonl/5165 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 477
} | [
2830,
3393,
1949,
31584,
3706,
2523,
1155,
353,
8840,
836,
8,
341,
197,
322,
6505,
279,
68373,
6645,
773,
429,
582,
646,
1841,
14,
12446,
198,
9859,
1669,
9829,
70334,
15918,
13969,
44,
4592,
21821,
2461,
16451,
741,
743,
1848,
961,
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 TestWithMethod(t *testing.T) {
r, _ := Prepare(mocks.NewRequest(), WithMethod("HEAD"))
if r.Method != "HEAD" {
t.Fatal("autorest: WithMethod failed to set HTTP method header")
}
} | explode_data.jsonl/20952 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 72
} | [
2830,
3393,
2354,
3523,
1155,
353,
8840,
836,
8,
972,
7000,
11,
716,
1669,
31166,
1255,
25183,
75274,
1507,
3085,
3523,
445,
35433,
26043,
743,
435,
20798,
961,
330,
35433,
1,
972,
197,
3244,
26133,
445,
2717,
41419,
25,
3085,
3523,
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
] | 2 |
func TestRegister(t *testing.T) {
Convey("Given topic, channel, maxInflight and message handler method", t, func() {
Convey("It should not produce any error", func() {
err := Register(topic, channel, maxInFlight, mgsHandle)
So(err, ShouldEqual, nil)
})
})
Convey("Given wrong topic, channel", t, func() {
... | explode_data.jsonl/5601 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
8690,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
22043,
8544,
11,
5496,
11,
1932,
641,
38390,
323,
1943,
7013,
1714,
497,
259,
11,
2915,
368,
341,
197,
93070,
5617,
445,
2132,
1265,
537,
8193,
894,
1465,
497,
2915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAPIAbortMultipartHandler(t *testing.T) {
defer DetectTestLeak(t)()
ExecObjectLayerAPITest(t, testAPIAbortMultipartHandler, []string{"AbortMultipart"})
} | explode_data.jsonl/10706 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
7082,
85891,
44,
18204,
3050,
1155,
353,
8840,
836,
8,
341,
16867,
33287,
2271,
2304,
585,
1155,
8,
741,
197,
10216,
1190,
9188,
2537,
952,
477,
1155,
11,
1273,
7082,
85891,
44,
18204,
3050,
11,
3056,
917,
4913,
85891,
44,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestAliasWriter(t *testing.T) {
for caseNum, currCase := range []struct {
pkg string
name string
aliases []spec.AliasDefinition
want string
}{
{
pkg: "testpkg",
name: "single string alias",
aliases: []spec.AliasDefinition{
{
TypeName: spec.TypeName{
Name: "Month",
... | explode_data.jsonl/73211 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1405
} | [
2830,
3393,
22720,
6492,
1155,
353,
8840,
836,
8,
341,
2023,
1142,
4651,
11,
9804,
4207,
1669,
2088,
3056,
1235,
341,
197,
3223,
7351,
257,
914,
198,
197,
11609,
262,
914,
198,
197,
197,
33924,
3056,
9535,
875,
71829,
10398,
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... | 2 |
func TestProperServerWithRoutesShutdown(t *testing.T) {
before := runtime.NumGoroutine()
srvA, srvB, _, _ := runServers(t)
srvA.Shutdown()
srvB.Shutdown()
time.Sleep(100 * time.Millisecond)
after := runtime.NumGoroutine()
delta := after - before
// There may be some finalizers or IO, but in general more than
... | explode_data.jsonl/5069 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
1336,
712,
5475,
2354,
26653,
62004,
1155,
353,
8840,
836,
8,
341,
63234,
1669,
15592,
39847,
38,
269,
14159,
741,
1903,
10553,
32,
11,
43578,
33,
11,
8358,
716,
1669,
1598,
78139,
1155,
340,
1903,
10553,
32,
10849,
18452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLocale(t *testing.T) {
trans := New()
expected := "sd_PK"
if trans.Locale() != expected {
t.Errorf("Expected '%s' Got '%s'", expected, trans.Locale())
}
} | explode_data.jsonl/9111 | {
"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,
19231,
1155,
353,
8840,
836,
8,
1476,
72453,
1669,
1532,
741,
42400,
1669,
330,
13446,
63898,
1837,
743,
1356,
59094,
368,
961,
3601,
341,
197,
3244,
13080,
445,
18896,
7677,
82,
6,
24528,
7677,
82,
22772,
3601,
11,
1356,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQuerySupply(t *testing.T) {
app, ctx := createTestApp(false)
keeper := *app.SupplyKeeper()
cdc := app.Codec()
supplyCoins := chainType.NewCoins(
chainType.NewCoin(constants.DefaultBondDenom, sdk.NewInt(100)),
chainType.NewCoin(constants.ChainMainNameStr+"/"+"photon", sdk.NewInt(50)),
chainType.NewC... | explode_data.jsonl/14269 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 680
} | [
2830,
3393,
2859,
51296,
1155,
353,
8840,
836,
8,
341,
28236,
11,
5635,
1669,
1855,
2271,
2164,
3576,
340,
197,
18861,
1669,
353,
676,
38736,
2541,
77233,
741,
1444,
7628,
1669,
906,
20274,
66,
13106,
1903,
83923,
69602,
1669,
8781,
929... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetUsersNotInTeam(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer th.TearDown()
Client := th.Client
teamId := th.BasicTeam.Id
rusers, resp := Client.GetUsersNotInTeam(teamId, 0, 60, "")
CheckNoError(t, resp)
for _, u := range rusers {
CheckUserSanitization(t, u)
}
rusers, resp = ... | explode_data.jsonl/21540 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 481
} | [
2830,
3393,
1949,
7137,
2623,
641,
14597,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
1005,
3803,
2320,
7210,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
198,
197,
9196,
764,
1669,
270,
48868,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetNodeOptions(t *testing.T) {
arrays := getTestArrays()
nodeSvc = &Service{
Fs: fsMock,
ctrlSvc: nil,
iscsiConnector: nil,
fcConnector: nil,
iscsiLib: nil,
nodeID: validNodeID,
useFC: false,
initialized: true,
}
nodeSvc.SetArrays(arrays)
nod... | explode_data.jsonl/5886 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 387
} | [
2830,
3393,
1949,
1955,
3798,
1155,
353,
8840,
836,
8,
341,
36511,
942,
1669,
633,
2271,
22182,
741,
20831,
92766,
284,
609,
1860,
515,
197,
12727,
82,
25,
1797,
8619,
11571,
345,
197,
84381,
92766,
25,
286,
2092,
345,
197,
197,
3427,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrincipalRoleNotPeer(t *testing.T) {
msp1, err := setup("testdata/idemix/MSP1OU1Admin", "MSP1OU1")
assert.NoError(t, err)
id1, err := getDefaultSigner(msp1)
assert.NoError(t, err)
principalBytes, err := proto.Marshal(&msp.MSPRole{Role: msp.MSPRole_PEER, MspIdentifier: id1.GetMSPIdentifier()})
assert.No... | explode_data.jsonl/46048 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
31771,
9030,
2623,
30888,
1155,
353,
8840,
836,
8,
341,
47691,
79,
16,
11,
1848,
1669,
6505,
445,
92425,
38146,
336,
941,
10270,
4592,
16,
11922,
16,
7210,
497,
330,
44,
4592,
16,
11922,
16,
1138,
6948,
35699,
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 TestRankingsApi(t *testing.T) {
web := setupTestWeb(t)
// Test that empty rankings produces an empty array.
recorder := web.getHttpResponse("/api/rankings")
assert.Equal(t, 200, recorder.Code)
assert.Equal(t, "application/json", recorder.HeaderMap["Content-Type"][0])
rankingsData := struct {
Rankings ... | explode_data.jsonl/75529 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 625
} | [
2830,
3393,
22550,
819,
6563,
1155,
353,
8840,
836,
8,
341,
97250,
1669,
6505,
2271,
5981,
1155,
692,
197,
322,
3393,
429,
4287,
32307,
18644,
458,
4287,
1334,
624,
67904,
1358,
1669,
3482,
670,
43342,
4283,
2068,
7382,
1180,
819,
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... | 2 |
func TestIsNativeText(t *testing.T) {
tcs := []byte{' ', '0', '9', 'a', 'z'}
fcs := []byte{'!', '@', '^', 'A', '~'}
for _, c := range tcs {
if isNativeText(c) != true {
t.Fatalf("isNativeText(%v) must true", c)
}
}
for _, c := range fcs {
if isNativeText(c) != false {
t.Fatalf("isNativeText(%v) must fa... | explode_data.jsonl/32227 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
3872,
20800,
1178,
1155,
353,
8840,
836,
8,
341,
3244,
4837,
1669,
3056,
3782,
13608,
6614,
364,
15,
516,
364,
24,
516,
364,
64,
516,
364,
89,
16418,
1166,
4837,
1669,
3056,
3782,
13608,
38692,
3458,
516,
49438,
516,
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... | 5 |
func TestEchoWithMessaging(t *testing.T) {
c := PipeConfig{
MessageMode: true, // Use message mode so that CloseWrite() is supported
InputBufferSize: 65536, // Use 64KB buffers to improve performance
OutputBufferSize: 65536,
}
l, err := ListenPipe(testPipeName, &c)
if err != nil {
t.Fatal(err)
}
de... | explode_data.jsonl/11433 | {
"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,
74994,
2354,
91049,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
27805,
2648,
515,
197,
46733,
3636,
25,
414,
830,
11,
220,
442,
5443,
1943,
3856,
773,
429,
13032,
7985,
368,
374,
7248,
198,
197,
66588,
52661,
25,
220,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestStandardEnsureHostInPool(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
cloud := GetTestCloud(ctrl)
availabilitySetID := "/subscriptions/subscription/resourceGroups/rg/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet"
backendAddressPoolID := "/subscriptions/sub/resource... | explode_data.jsonl/7470 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2652
} | [
2830,
3393,
19781,
64439,
9296,
641,
10551,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
741,
197,
12361,
1669,
2126,
2271,
16055,
62100,
692,
197,
53062,
1649,
915,
1669,
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 TestIsSameUserOrAdmin(t *testing.T) {
tests := []struct {
name string
method string
ctxData map[string]interface{}
userData user.User
wantResponse bool
}{
{
name: "Same User GET",
method: http.MethodGet,
ctxData: map[string]interface{}{
"isAuthenticaded": true,
... | explode_data.jsonl/32438 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1945
} | [
2830,
3393,
3872,
19198,
1474,
2195,
7210,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
42257,
981,
914,
198,
197,
20985,
1043,
414,
2415,
14032,
31344,
16094,
197,
19060,
1043,
257,
1196,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAuthPostSuccess(t *testing.T) {
t.Parallel()
setupMore := func(h *testHarness) *testHarness {
h.bodyReader.Return = mocks.Values{
PID: "test@test.com",
Password: "hello world",
}
h.storer.Users["test@test.com"] = &mocks.User{
Email: "test@test.com",
Password: "$2a$10$IlfnqVyDZ6c1L.... | explode_data.jsonl/3466 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1508
} | [
2830,
3393,
5087,
4133,
7188,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
84571,
7661,
1669,
2915,
3203,
353,
1944,
74248,
8,
353,
1944,
74248,
341,
197,
9598,
5079,
5062,
46350,
284,
68909,
35145,
515,
298,
10025,
915,
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 TestInvalidType_Slice(t *testing.T) {
var testVar []int = []int{1, 2, 3, 4}
err := Scrub(testVar, []string{"owner"})
assert.Error(t, err)
err = Scrub(&testVar, []string{"owner"})
assert.Error(t, err)
} | explode_data.jsonl/9430 | {
"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,
7928,
929,
1098,
4754,
1155,
353,
8840,
836,
8,
1476,
2405,
1273,
3962,
3056,
396,
284,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
630,
9859,
1669,
32134,
392,
8623,
3962,
11,
3056,
917,
4913,
8118,
2362... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEmoji(t *testing.T) {
var input = []byte(`{"utf8":"Example emoji, KO: \ud83d\udd13, \ud83c\udfc3 ` +
`OK: \u2764\ufe0f "}`)
value, err := Get(input, "utf8")
if err != nil {
t.Fatal(err)
}
var v map[string]interface{}
if err := json.Unmarshal(input, &v); err != nil {
... | explode_data.jsonl/62344 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 249
} | [
2830,
3393,
92731,
1155,
353,
8840,
836,
8,
341,
262,
762,
1946,
284,
3056,
3782,
5809,
4913,
4762,
23,
3252,
13314,
42365,
11,
37512,
25,
1124,
661,
23,
18,
67,
3770,
631,
16,
18,
11,
1124,
661,
23,
18,
66,
59,
661,
8316,
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... | 4 |
func TestEnabled(t *testing.T) {
type testCase struct {
name string
annotations map[string]string
key string
expect bool
}
testcases := []testCase{
{
name: "include_key",
annotations: map[string]string{
"mytest": "true",
},
key: "mytest",
expect: true,
}, {
n... | explode_data.jsonl/35571 | {
"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,
5462,
1155,
353,
8840,
836,
8,
341,
13158,
54452,
2036,
341,
197,
11609,
286,
914,
198,
197,
197,
39626,
2415,
14032,
30953,
198,
197,
23634,
260,
914,
198,
197,
24952,
414,
1807,
198,
197,
630,
18185,
23910,
1669,
3056,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRot1Right(t *testing.T) {
table := []struct {
input *RBNode
expect string
}{
{&RBNode{
10, false,
&RBNode{5, true, nil, nil},
&RBNode{
20, true,
&RBNode{17, false, nil, nil},
&RBNode{25, false, nil, nil},
},
}, "B:5(,R:10(,R:20(B:17(,),B:25(,))))"},
}
for _, te := range ta... | explode_data.jsonl/9583 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 242
} | [
2830,
3393,
36936,
16,
5979,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
3056,
1235,
341,
197,
22427,
220,
353,
29259,
1955,
198,
197,
24952,
914,
198,
197,
59403,
197,
197,
90,
5,
29259,
1955,
515,
298,
197,
16,
15,
11,
895,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetLogFile(t *testing.T) {
c, err := NewContainer(ContainerName)
if err != nil {
t.Errorf(err.Error())
}
if err := c.SetLogFile("/tmp/" + ContainerName); err != nil || c.LogFile() != "/tmp/"+ContainerName {
t.Errorf("SetLogFile failed...")
}
} | explode_data.jsonl/2764 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 101
} | [
2830,
3393,
1649,
98857,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
1532,
4502,
75145,
675,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
3964,
6141,
2398,
197,
630,
743,
1848,
1669,
272,
4202,
98857,
4283,
5173,
11225,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestGCHelmSortVersionComplex(t *testing.T) {
test_versions := []string{"jx-p.v3.complex.v2", "jx-p.v1.complex.v3", "jx-p.v2.complex.v1"}
sort.Sort(ByVersion(test_versions))
assert.Equal(t, "jx-p.v2.complex.v1", test_versions[0])
assert.Equal(t, "jx-p.v3.complex.v2", test_versions[1])
assert.Equal(t, "jx-p.v1.... | explode_data.jsonl/57814 | {
"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,
38,
2149,
23162,
10231,
5637,
31137,
1155,
353,
8840,
836,
8,
341,
18185,
65148,
1669,
3056,
917,
4913,
73,
87,
2268,
3133,
18,
905,
9111,
3133,
17,
497,
330,
73,
87,
2268,
3133,
16,
905,
9111,
3133,
18,
497,
330,
73,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFilterFeatureWithTags(t *testing.T) {
suite := NewSuite(t, WithFeaturesPath("features/filter_tags_*.feature"), WithTags("@run-this"))
c := false
suite.AddStep(`the test should pass`, func(_ StepTest, _ Context) {
c = true
})
suite.AddStep(`fail the test`, fail)
suite.Run()
if err := assert.Equals(t... | explode_data.jsonl/69373 | {
"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,
5632,
13859,
2354,
15930,
1155,
353,
8840,
836,
8,
341,
96572,
1669,
1532,
28000,
1155,
11,
3085,
21336,
1820,
445,
20304,
63524,
16333,
62,
19922,
12753,
3975,
3085,
15930,
10662,
6108,
60191,
5455,
1444,
1669,
895,
271,
9657... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTCPResetSentForACKWhenNotUsingSynCookies(t *testing.T) {
c := context.New(t, defaultMTU)
defer c.Cleanup()
// Set TCPLingerTimeout to 5 seconds so that sockets are marked closed
wq := &waiter.Queue{}
ep, err := c.Stack().NewEndpoint(tcp.ProtocolNumber, ipv4.ProtocolNumber, wq)
if err != nil {
t.Fatalf... | explode_data.jsonl/75924 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1322
} | [
2830,
3393,
49896,
14828,
31358,
2461,
4032,
4498,
2623,
16429,
37134,
50672,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2266,
7121,
1155,
11,
1638,
8505,
52,
340,
16867,
272,
727,
60639,
2822,
197,
322,
2573,
24591,
2916,
5137,
7636,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCombinationIterator(t *testing.T) {
assert := assert.New(t)
vs := newTestValueStore()
byTwos, err := NewSet(context.Background(), vs, generateNumbersAsValuesFromToBy(0, 70, 2)...)
assert.NoError(err)
byThrees, err := NewSet(context.Background(), vs, generateNumbersAsValuesFromToBy(0, 70, 3)...)
assert.... | explode_data.jsonl/11000 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 679
} | [
2830,
3393,
36192,
2554,
11951,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
5195,
82,
1669,
501,
2271,
1130,
6093,
2822,
197,
1694,
22816,
436,
11,
1848,
1669,
1532,
1649,
5378,
19047,
1507,
6165,
11,
6923,
27237,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCustomConfigSSL(t *testing.T) {
t.Parallel()
t.Log("Testing the 'custom-config-ssl' example...")
harness := setup(t, timeout, true)
env := []string{}
_, err := harness.runExample("examples/kube/custom-config-ssl/run.sh", env, t)
if err != nil {
t.Fatalf("Could not run example: %s", err)
}
if harness... | explode_data.jsonl/28875 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 620
} | [
2830,
3393,
10268,
2648,
22594,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3244,
5247,
445,
16451,
279,
364,
9163,
25130,
12,
24635,
6,
3110,
33093,
9598,
23518,
1669,
6505,
1155,
11,
9632,
11,
830,
340,
57538,
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... | 9 |
func TestSyncCreate(t *testing.T) {
storage := SimpleRESTStorage{
injectedFunction: func(obj interface{}) (interface{}, error) {
time.Sleep(200 * time.Millisecond)
return obj, nil
},
}
handler := New(map[string]RESTStorage{
"foo": &storage,
}, "/prefix/version")
server := httptest.NewServer(handler)
c... | explode_data.jsonl/30466 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 411
} | [
2830,
3393,
12154,
4021,
1155,
353,
8840,
836,
8,
341,
197,
16172,
1669,
8993,
38307,
5793,
515,
197,
17430,
28303,
5152,
25,
2915,
6779,
3749,
28875,
320,
4970,
22655,
1465,
8,
341,
298,
21957,
31586,
7,
17,
15,
15,
353,
882,
71482,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNonKanaCharacters(t *testing.T) {
inputs := []string{
"日本",
"English",
}
for _, input := range inputs {
got, err := KanaToRomaji(input)
assert.Empty(t, got)
assert.NotNil(t, err)
}
} | explode_data.jsonl/11362 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 94
} | [
2830,
3393,
8121,
42,
3362,
37489,
1155,
353,
8840,
836,
8,
341,
22427,
82,
1669,
3056,
917,
515,
197,
197,
1,
101059,
756,
197,
197,
1,
22574,
756,
197,
630,
2023,
8358,
1946,
1669,
2088,
11127,
341,
197,
3174,
354,
11,
1848,
1669,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMakeAndExtractCredential(t *testing.T) {
t.Parallel()
var testcases = []struct {
name string
cred []byte
ek interface{}
ak interface{}
keyBits uint16
}{
{
name: "RSA/AES128",
cred: []byte(`Hello, world!`),
ek: mustGenerateRSAKey(t),
ak: mustGenerateRS... | explode_data.jsonl/60739 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1576
} | [
2830,
3393,
8078,
3036,
28959,
48265,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
2405,
1273,
23910,
284,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
197,
10844,
262,
3056,
3782,
198,
197,
197,
1225,
414,
3749,
16094,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRTTMonitor(t *testing.T) {
t.Run("measures the average and minimum RTT", func(t *testing.T) {
t.Parallel()
dialer := DialerFunc(func(_ context.Context, _, _ string) (net.Conn, error) {
return newMockSlowConn(makeHelloReply(), 10*time.Millisecond), nil
})
rtt := newRTTMonitor(&rttConfig{
interva... | explode_data.jsonl/28473 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1511
} | [
2830,
3393,
5350,
51,
30098,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
2660,
23471,
279,
5461,
323,
8028,
10635,
51,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3244,
41288,
7957,
2822,
197,
2698,
530,
261,
1669,
66155,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAddCategoryEmpty(t *testing.T) {
t.Parallel()
// arrange
p := podcast.New("title", "link", "description", nil, nil)
// act
p.AddCategory("", nil)
// assert
assert.Len(t, p.ICategories, 0)
assert.Len(t, p.Category, 0)
} | explode_data.jsonl/73069 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
2212,
6746,
3522,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
30893,
198,
3223,
1669,
17711,
7121,
445,
2102,
497,
330,
2080,
497,
330,
4684,
497,
2092,
11,
2092,
692,
197,
322,
1160,
198,
3223,
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 TestTenantCreate(t *testing.T) {
// Pass collection to package
tenantID := testCreate(t)
testGet(tenantID, t)
testUpdate(tenantID, t)
testList(t)
testDelete(tenantID, t)
//testGet(tenantID, t)
} | explode_data.jsonl/67812 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 85
} | [
2830,
3393,
71252,
4021,
1155,
353,
8840,
836,
8,
1476,
197,
322,
9970,
4426,
311,
6328,
271,
197,
43919,
915,
1669,
1273,
4021,
1155,
340,
18185,
1949,
1155,
25121,
915,
11,
259,
340,
18185,
4289,
1155,
25121,
915,
11,
259,
340,
1818... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCrComplexLargeRenameCycle(t *testing.T) {
test(t,
users("alice", "bob"),
as(alice,
mkdir("a/b/c"),
mkdir("d/e/f"),
),
as(bob,
disableUpdates(),
),
as(alice,
rename("d", "a/b/c/d"),
),
as(bob, noSync(),
mkdir("d/e/f/g/h/i"),
rename("a", "d/e/f/g/h/i/a"),
reenableUpdates(),
... | explode_data.jsonl/31358 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 402
} | [
2830,
3393,
16001,
31137,
34253,
88757,
44820,
1155,
353,
8840,
836,
8,
341,
18185,
1155,
345,
197,
90896,
445,
63195,
497,
330,
47086,
4461,
197,
60451,
17643,
558,
345,
298,
88650,
445,
64,
3470,
2899,
4461,
298,
88650,
445,
67,
16546... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewLevelDBReceiptsCreateOK(t *testing.T) {
assert := assert.New(t)
conf := &LevelDBReceiptStoreConf{
Path: tmpdir,
}
r, err := newLevelDBReceipts(conf)
defer r.store.Close()
assert.Equal(conf, r.conf)
assert.Nil(err)
assert.NotNil(r.store)
} | explode_data.jsonl/21448 | {
"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,
3564,
4449,
3506,
67461,
82,
4021,
3925,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
67850,
1669,
609,
4449,
3506,
67461,
6093,
15578,
515,
197,
69640,
25,
4174,
3741,
345,
197,
532,
7000,
11,
1848,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestComplexDelete(t *testing.T) {
ranInt := rand.Intn(writerComplexDeleteTestData.InsertCount)
w := newWriter()
c, err := NewClient(WithURI(fmt.Sprintf("postgres://127.0.0.1:5432/%s?sslmode=disable", writerComplexDeleteTestData.DB)))
if err != nil {
t.Fatalf("unable to initialize connection to postgres, %s",... | explode_data.jsonl/32014 | {
"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,
31137,
6435,
1155,
353,
8840,
836,
8,
341,
197,
6576,
1072,
1669,
10382,
7371,
77,
38356,
31137,
6435,
83920,
23142,
2507,
340,
6692,
1669,
501,
6492,
741,
1444,
11,
1848,
1669,
1532,
2959,
7,
2354,
10301,
28197,
17305,
445,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestParseQuery(t *testing.T) {
for i, test := range parseTests {
form, err := ParseQuery(test.query)
if err != nil {
t.Errorf("test %d: Unexpected error: %v", i, err)
continue
}
if len(form) != len(test.out) {
t.Errorf("test %d: len(form) = %d, want %d", i, len(form), len(test.out))
}
for k, ... | explode_data.jsonl/71728 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 365
} | [
2830,
3393,
14463,
2859,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1273,
1669,
2088,
4715,
18200,
341,
197,
37410,
11,
1848,
1669,
14775,
2859,
8623,
4786,
340,
197,
743,
1848,
961,
2092,
341,
298,
3244,
13080,
445,
1944,
1018,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFailoverPlayground(t *testing.T) {
t.Parallel()
const host = "playground-failover.cloud.example.com"
const gslbPath = "../examples/failover-playground.yaml"
const euGeoTag = "eu"
const usGeoTag = "us"
instanceEU, err := utils.NewWorkflow(t, "k3d-test-gslb1", 5053).
WithGslb(gslbPath, host).
WithTest... | explode_data.jsonl/69356 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 693
} | [
2830,
3393,
19524,
1975,
9137,
1951,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
4777,
3468,
284,
330,
1363,
1951,
2220,
604,
1975,
16935,
7724,
905,
698,
4777,
44221,
65,
1820,
284,
7005,
51668,
6663,
604,
1975,
26544,
1951,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApixu_Conditions(t *testing.T) {
data := loadData(t, "conditions")
a := &apixu{
config: Config{},
httpClient: &httpClientMock{
response: &http.Response{
StatusCode: http.StatusOK,
Body: &bodyMock{},
},
err: nil,
},
read: func(r io.Reader) ([]byte, error) {
return data, nil
... | explode_data.jsonl/14938 | {
"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,
10611,
941,
84,
920,
2111,
5930,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
62432,
1155,
11,
330,
16495,
5130,
11323,
1669,
609,
391,
941,
84,
515,
197,
25873,
25,
5532,
38837,
197,
28080,
2959,
25,
609,
83417,
11571,
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... | 1 |
func TestDecryptStringFromAlphabetToIntegerMapping1(t *testing.T) {
s := "10#11#12"
expected := "jkab"
actual := FreqAlphabets(s)
assert.Equal(t, expected, actual)
} | explode_data.jsonl/79310 | {
"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,
89660,
703,
3830,
2101,
18485,
1249,
3486,
6807,
16,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
330,
16,
15,
2,
16,
16,
2,
16,
17,
698,
42400,
1669,
330,
41808,
370,
698,
88814,
1669,
434,
2958,
2101,
759,
370,
1415,
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 |
func TestRobotsTXTOutput(t *testing.T) {
t.Parallel()
var (
cfg, fs = newTestCfg()
th = testHelper{cfg, fs, t}
)
cfg.Set("baseURL", "http://auth/bub/")
cfg.Set("enableRobotsTXT", true)
writeSource(t, fs, filepath.Join("layouts", "robots.txt"), robotTxtTemplate)
writeSourcesToSource(t, "content", fs, w... | explode_data.jsonl/79481 | {
"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,
14465,
2412,
62865,
5097,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2405,
2399,
197,
50286,
11,
8619,
284,
501,
2271,
42467,
741,
197,
70479,
414,
284,
1273,
5511,
90,
14072,
11,
8619,
11,
259,
532,
197,
692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fsimpl_WriteYamls(t *testing.T) {
tests := map[string]struct {
o []interface{}
wantErr string
assertFn func(*testing.T, FS)
}{
"Should write a simple manifest": {
o: []interface{}{
&corev1.Namespace{
TypeMeta: metav1.TypeMeta{
APIVersion: "v1",
Kind: "Namespace"... | explode_data.jsonl/58984 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1016
} | [
2830,
3393,
34470,
6383,
31825,
56,
309,
4730,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
22229,
286,
3056,
4970,
16094,
197,
50780,
7747,
220,
914,
198,
197,
6948,
24911,
2915,
4071,
8840,
836,
11,
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 Test_command(t *testing.T) {
g := goblin.Goblin(t)
g.Describe("Command genration", func() {
g.It("should ignore plugin steps", func() {
c := newConfig(&yaml.Container{
Commands: []string{
"go build",
"go test",
},
Vargs: map[string]interface{}{
"depth": 50,
},
})
Comm... | explode_data.jsonl/41277 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 443
} | [
2830,
3393,
10811,
1155,
353,
8840,
836,
8,
1476,
3174,
1669,
342,
47061,
1224,
47061,
1155,
340,
3174,
23548,
3114,
445,
4062,
4081,
2165,
497,
2915,
368,
1476,
197,
3174,
27528,
445,
5445,
10034,
9006,
7354,
497,
2915,
368,
341,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUnmarshalThrift(t *testing.T) {
addr := func(i int64) *int64 { return &i }
tests := []struct {
name string
filename string
want []*zipkincore.Span
wantErr bool
}{
{
name: "threespans",
filename: "../../testdata/threespans.dat",
want: []*zipkincore.Span{
{
TraceID: ... | explode_data.jsonl/57266 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1801
} | [
2830,
3393,
1806,
27121,
1001,
41380,
1155,
353,
8840,
836,
8,
341,
53183,
1669,
2915,
1956,
526,
21,
19,
8,
353,
396,
21,
19,
314,
470,
609,
72,
456,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
66434,
914,
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 TestValidateKubernetesLabelKey(t *testing.T) {
validLabelKeys := []string{"a", "a1", "this--valid--label--is--exactly--sixty--three--characters--long", "123456", "my-label_valid.com", "foo.bar/name", "1.2321.324/key_name.foo", "valid.long.253.characters.label.key.prefix.12345678910.fooooooooooooooooooooooooooooo... | explode_data.jsonl/17872 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 328
} | [
2830,
3393,
17926,
42,
29827,
2476,
1592,
1155,
353,
8840,
836,
8,
1476,
56322,
2476,
8850,
1669,
3056,
917,
4913,
64,
497,
330,
64,
16,
497,
330,
574,
313,
1891,
313,
1502,
313,
285,
313,
327,
32739,
313,
50364,
1881,
313,
27856,
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... | 5 |
func TestSelectUserPortinformer(t *testing.T) {
db, mock, err := sqlmock.New()
if err != nil {
t.Fatal(err)
}
defer db.Close()
retRows := sqlmock.NewRows([]string{"fk_portinformer"}).AddRow("28")
mock.ExpectQuery("SELECT fk_portinformer FROM portinformer_managers WHERE fk_user = ?").
WithArgs("7").
Will... | explode_data.jsonl/30231 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 181
} | [
2830,
3393,
3379,
1474,
7084,
258,
34527,
1155,
353,
8840,
836,
8,
341,
20939,
11,
7860,
11,
1848,
1669,
5704,
16712,
7121,
2822,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
16867,
2927,
10421,
2822,
11262,
9024,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMergeTags(t *testing.T) {
ec2Key := "ec2Key"
ec2Value := "ec2Value"
localKey := "localKey"
localValue := "localValue"
commonKey := "commonKey"
commonKeyEC2Value := "commonEC2Value"
commonKeyLocalValue := "commonKeyLocalValue"
localTags := []*ecs.Tag{
{
Key: aws.String(localKey),
Value: aws.S... | explode_data.jsonl/41603 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 530
} | [
2830,
3393,
52096,
15930,
1155,
353,
8840,
836,
8,
341,
197,
757,
17,
1592,
1669,
330,
757,
17,
1592,
698,
197,
757,
17,
1130,
1669,
330,
757,
17,
1130,
698,
8854,
1592,
1669,
330,
2438,
1592,
698,
8854,
1130,
1669,
330,
2438,
1130,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsolation(t *testing.T) {
require := require.New(t)
cmder := &testCommander{T: t}
strg := &StorageMock{}
root, err := ioutil.TempDir("", "flist_root")
require.NoError(err)
defer os.RemoveAll(root)
sys := &testSystem{}
flister := newFlister(root, strg, cmder, sys)
backend, err := ioutil.TempDir("... | explode_data.jsonl/16421 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 488
} | [
2830,
3393,
3872,
34962,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
692,
98316,
1107,
1669,
609,
1944,
4062,
261,
76025,
25,
259,
532,
11355,
70,
1669,
609,
5793,
11571,
31483,
33698,
11,
1848,
1669,
43144,
65009,
6184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPoolTxRefund(t *testing.T) {
input := CreateTestEnv(t)
defer func() { input.Context.Logger().Info("Asserting invariants at test end"); input.AssertInvariants() }()
ctx := input.Context
var (
now = time.Now().UTC()
mySender, _ = sdk.AccAddressFromBech32("gravity1ahx7f8wyertuus9r... | explode_data.jsonl/21413 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1174
} | [
2830,
3393,
10551,
31584,
3945,
1241,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
4230,
2271,
14359,
1155,
340,
16867,
2915,
368,
314,
1946,
9328,
12750,
1005,
1731,
445,
8534,
287,
304,
54611,
518,
1273,
835,
5038,
1946,
11711,
641,
546... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTeamsService_EditTeamByID(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
input := NewTeam{Name: "n", Privacy: String("closed")}
mux.HandleFunc("/organizations/1/team/1", func(w http.ResponseWriter, r *http.Request) {
v := new(NewTeam)
json.NewDecoder(r.Body).Decode(v)
testMet... | explode_data.jsonl/4516 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 508
} | [
2830,
3393,
60669,
1860,
66158,
14597,
60572,
1155,
353,
8840,
836,
8,
341,
25291,
11,
59807,
11,
8358,
49304,
1669,
6505,
741,
16867,
49304,
2822,
22427,
1669,
1532,
14597,
63121,
25,
330,
77,
497,
18874,
25,
923,
445,
34087,
899,
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 TestConnectAndWriteIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}
server := []string{testutil.GetLocalHost() + ":4150"}
s, _ := serializers.NewInfluxSerializer()
n := &NSQ{
Server: server[0],
Topic: "telegraf",
serializer: s,
}
// Veri... | explode_data.jsonl/35326 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
14611,
3036,
7985,
52464,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
85945,
17590,
1273,
304,
2805,
3856,
1138,
197,
630,
41057,
1669,
3056,
917,
90,
1944,
1314,
2234,
7319,
9296,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReportWorkflowResource_ScheduledWorkflowIDEmpty_Success(t *testing.T) {
store, manager, run := initWithOneTimeRun(t)
defer store.Close()
// report workflow
workflow := util.NewWorkflow(&v1alpha1.Workflow{
ObjectMeta: v1.ObjectMeta{
UID: types.UID(run.UUID),
},
Status: v1alpha1.WorkflowStatus{Phase... | explode_data.jsonl/28389 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 486
} | [
2830,
3393,
10361,
62768,
4783,
1098,
26644,
62768,
915,
3522,
87161,
1155,
353,
8840,
836,
8,
341,
57279,
11,
6645,
11,
1598,
1669,
13864,
3966,
1462,
6727,
1155,
340,
16867,
3553,
10421,
741,
197,
322,
1895,
28288,
198,
197,
56249,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAttachmentMarshalJSON(t *testing.T) {
tests := []struct {
name string
att *Attachment
expected string
err string
}{
{
name: "foo.txt",
att: &Attachment{
Content: ioutil.NopCloser(strings.NewReader("test attachment\n")),
Filename: "foo.txt",
ContentType: "text/... | explode_data.jsonl/28903 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 409
} | [
2830,
3393,
33569,
55438,
5370,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
197,
1587,
414,
353,
33569,
198,
197,
42400,
914,
198,
197,
9859,
414,
914,
198,
197,
59403,
197,
197,
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 TestMergeTideContextPolicyConfig(t *testing.T) {
yes := true
no := false
testCases := []struct {
name string
a, b, c TideContextPolicy
}{
{
name: "all empty",
},
{
name: "empty a",
b: TideContextPolicy{
SkipUnknownContexts: &yes,
FromBranchProtection: &no,
RequiredContexts: ... | explode_data.jsonl/53859 | {
"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,
52096,
51,
577,
1972,
13825,
2648,
1155,
353,
8840,
836,
8,
341,
197,
9693,
1669,
830,
198,
72104,
1669,
895,
198,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
11323,
11,
293,
11,
272,
71016,
1972,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestStorePatch(t *testing.T) {
testWithPostgresStoreV2(t, func(s storev2.Interface) {
fixture := corev3.FixtureEntityState("foo")
ctx := context.Background()
req := storev2.NewResourceRequestFromResource(ctx, fixture)
req.UsePostgres = true
wrapper := WrapEntityState(fixture)
if err := s.CreateOrUpdat... | explode_data.jsonl/73386 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 353
} | [
2830,
3393,
6093,
43622,
1155,
353,
8840,
836,
8,
341,
18185,
2354,
4133,
17818,
6093,
53,
17,
1155,
11,
2915,
1141,
3553,
85,
17,
41065,
8,
341,
197,
1166,
12735,
1669,
6200,
85,
18,
991,
12735,
3030,
1397,
445,
7975,
1138,
197,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestAccAzureRMLoadBalancerNatRule_requiresImport(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_lb_nat_rule", "test")
r := LoadBalancerNatRule{}
data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.basic(data, "Basic"),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.Res... | explode_data.jsonl/29071 | {
"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,
14603,
78107,
49,
2668,
2731,
93825,
65214,
11337,
54949,
11511,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
25505,
25212,
83920,
1155,
11,
330,
1370,
324,
4195,
63601,
38169,
21124,
497,
330,
1944,
1138,
7000,
1669,
8893,
93825... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_GetRequestToken(t *testing.T) {
a := NewAPI("1438129266231705", "UYETICGU2CT3KES")
r := &BaseRequest{
Method: "GET",
Resource: "/auth",
Timestamp: 1445440997,
}
assert.Equal(t, "T2YsCOj2o3Rb79nLPUgx3Gl+nnw=", a.GetRequestToken(r))
} | explode_data.jsonl/50520 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 129
} | [
2830,
3393,
6563,
13614,
1900,
3323,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
1532,
7082,
445,
16,
19,
18,
23,
16,
17,
24,
17,
21,
21,
17,
18,
16,
22,
15,
20,
497,
330,
31301,
1348,
1317,
54695,
17,
1162,
18,
42,
1570,
5130,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestExtractCommand(t *testing.T) {
outdir, err := ioutil.TempDir("", "TestExtractCommand")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(outdir)
if err := testableMain([]string{"goi18n", "extract", "-outdir", outdir, "../example/"}); err != nil {
t.Fatal(err)
}
actual, err := ioutil.ReadFile(filepat... | explode_data.jsonl/82256 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 352
} | [
2830,
3393,
28959,
4062,
1155,
353,
8840,
836,
8,
341,
13967,
3741,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
2271,
28959,
4062,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
2643,
84427,
9828,
374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidPOSTForAccountSwappedKey(t *testing.T) {
wfe, fc := setupWFE(t)
wfe.SA = &mockSADifferentStoredKey{mocks.NewStorageAuthority(fc)}
event := newRequestEvent()
payload := `{"resource":"ima-payload"}`
// Sign a request using test1key
_, _, body := signRequestKeyID(t, 1, nil, "http://localhost:4000/test... | explode_data.jsonl/15358 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 278
} | [
2830,
3393,
4088,
2946,
2461,
7365,
13218,
5677,
1592,
1155,
353,
8840,
836,
8,
341,
6692,
1859,
11,
25563,
1669,
6505,
54,
11419,
1155,
340,
6692,
1859,
808,
32,
284,
609,
16712,
50,
1808,
18277,
93243,
1592,
90,
16712,
82,
7121,
579... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBackupRestoreWithConcurrentWrites(t *testing.T) {
defer leaktest.AfterTest(t)()
const rows = 10
const numBackgroundTasks = MultiNode
_, tc, sqlDB, _, cleanupFn := BackupRestoreTestSetup(t, MultiNode, rows, InitNone)
defer cleanupFn()
bgActivity := make(chan struct{})
// allowErrors is used as an atom... | explode_data.jsonl/57592 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 652
} | [
2830,
3393,
56245,
56284,
2354,
1109,
3231,
93638,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
4777,
6978,
284,
220,
16,
15,
198,
4777,
1629,
8706,
25449,
284,
17439,
1955,
271,
197,
6878,
17130,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestServeCached(t *testing.T) {
// Prepare the proxy server.
dnsProxy := createTestProxy(t, nil)
dnsProxy.CacheEnabled = true // just one request per second is allowed
// Start listening.
err := dnsProxy.Start()
require.NoErrorf(t, err, "cannot start the DNS proxy: %s", err)
testutil.CleanupAndRequireSucce... | explode_data.jsonl/18903 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 428
} | [
2830,
3393,
60421,
70293,
1155,
353,
8840,
836,
8,
341,
197,
322,
31166,
279,
13291,
3538,
624,
2698,
4412,
16219,
1669,
1855,
2271,
16219,
1155,
11,
2092,
340,
2698,
4412,
16219,
46130,
5462,
284,
830,
442,
1101,
825,
1681,
817,
2086,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImportCardsWithImportError(t *testing.T) {
setService := MockSetService{}
cardService := MockCardService{
FakeImport: func(count int, c *card.Card) error {
if count > 0 {
return fmt.Errorf("card import failed [%s]", c.Number)
}
return nil
},
}
wantCards := 1
importer := NewImporter(&setS... | explode_data.jsonl/37499 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 231
} | [
2830,
3393,
11511,
28448,
2354,
11511,
1454,
1155,
353,
8840,
836,
8,
341,
8196,
1860,
1669,
14563,
1649,
1860,
16094,
80084,
1860,
1669,
14563,
5770,
1860,
515,
197,
12727,
726,
11511,
25,
2915,
11512,
526,
11,
272,
353,
4951,
48613,
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... | 2 |
func TestMinNumberInRotateArrray(t *testing.T) {
var cases = []struct {
input []int
output int
}{
{
input: []int{3, 4, 5, 1, 2},
output: 1,
},
{
input: []int{3, 100, 200, 3},
output: 3,
},
{
input: []int{1, 0, 1, 1, 1},
output: 0,
},
{
input: []int{2, 2, 2, 1, 2},
output... | explode_data.jsonl/57692 | {
"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,
6217,
2833,
641,
34540,
8838,
11611,
1155,
353,
8840,
836,
8,
341,
2405,
5048,
284,
3056,
1235,
341,
197,
22427,
220,
3056,
396,
198,
197,
21170,
526,
198,
197,
59403,
197,
197,
515,
298,
22427,
25,
220,
3056,
396,
90,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestOptionEquals(t *testing.T) {
o := gs.Some(100)
eq := o.Equals(gs.Eq[int])
assert.True(t, eq(o))
assert.True(t, eq(gs.Some(100)))
assert.False(t, eq(gs.Some(101)))
assert.False(t, eq(gs.None[int]()))
o = gs.None[int]()
eq = o.Equals(gs.Eq[int])
assert.False(t, eq(gs.Some(0)))
assert.False(t, eq(gs.S... | explode_data.jsonl/32430 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
5341,
4315,
1155,
353,
8840,
836,
8,
341,
22229,
1669,
28081,
86833,
7,
16,
15,
15,
340,
7727,
80,
1669,
297,
16207,
83394,
5142,
80,
18640,
9604,
6948,
32443,
1155,
11,
8939,
10108,
1171,
6948,
32443,
1155,
11,
8939,
8339... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientSniffNode(t *testing.T) {
client, err := NewClient()
if err != nil {
t.Fatal(err)
}
ch := make(chan []*conn)
go func() { ch <- client.sniffNode(context.Background(), DefaultURL) }()
select {
case nodes := <-ch:
if len(nodes) != 1 {
t.Fatalf("expected %d nodes; got: %d", 1, len(nodes))
}... | explode_data.jsonl/38006 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
2959,
20720,
3092,
1955,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
1532,
2959,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
23049,
1669,
1281,
35190,
29838,
5148,
340,
30680,
2915,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetVersionInfo(t *testing.T) {
testVersion := "TestVersion"
metadata.Version = testVersion
expected := fmt.Sprintf("%s:\n Version: %s\n Go version: %s\n OS/Arch: %s",
metadata.ProgramName, testVersion, runtime.Version(),
fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH))
assert.Equal(t, expected, met... | explode_data.jsonl/14705 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
1949,
5637,
1731,
1155,
353,
8840,
836,
8,
341,
18185,
5637,
1669,
330,
2271,
5637,
698,
2109,
7603,
35842,
284,
1273,
5637,
271,
42400,
1669,
8879,
17305,
4430,
82,
7190,
77,
6079,
25,
1018,
82,
1699,
5994,
2319,
25,
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 |
func TestServer_Request_Get_Authority(t *testing.T) {
const host = "example.com"
testServerRequest(t, func(st *serverTester) {
st.writeHeaders(HeadersFrameParam{
StreamID: 1, // clients send odd numbers
BlockFragment: st.encodeHeader(":authority", host),
EndStream: true,
EndHeaders: true,
... | explode_data.jsonl/71615 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 183
} | [
2830,
3393,
5475,
44024,
13614,
1566,
1553,
487,
1155,
353,
8840,
836,
8,
341,
4777,
3468,
284,
330,
8687,
905,
698,
18185,
5475,
1900,
1155,
11,
2915,
5895,
353,
4030,
58699,
8,
341,
197,
18388,
3836,
10574,
7,
10574,
4369,
2001,
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... | 1 |
func TestInspect(t *testing.T) {
for _, fname := range []string{
"../../testdata/run-header_golden.slcio",
"../../testdata/event_golden.slcio",
} {
t.Run(fname, func(t *testing.T) {
buf := new(bytes.Buffer)
inspect(buf, fname, -1, false)
got := buf.Bytes()
want, err := ioutil.ReadFile(fname + ".tx... | explode_data.jsonl/40679 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 236
} | [
2830,
3393,
58533,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
22548,
1669,
2088,
3056,
917,
515,
197,
197,
1,
2748,
92425,
48385,
9351,
54696,
268,
514,
17257,
815,
756,
197,
197,
1,
2748,
92425,
40763,
54696,
268,
514,
17257,
815,
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... | 3 |
func Test_Problem230(t *testing.T) {
qs := []question230{
{
para230{[]int{}, 0},
ans230{0},
},
{
para230{[]int{3, 1, 4, structures.NULL, 2}, 1},
ans230{1},
},
{
para230{[]int{5, 3, 6, 2, 4, structures.NULL, structures.NULL, 1}, 3},
ans230{3},
},
}
fmt.Printf("----------------------... | explode_data.jsonl/65015 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 287
} | [
2830,
3393,
16670,
10121,
17,
18,
15,
1155,
353,
8840,
836,
8,
1476,
18534,
82,
1669,
3056,
7841,
17,
18,
15,
4257,
197,
197,
515,
298,
197,
14794,
17,
18,
15,
90,
1294,
396,
22655,
220,
15,
1583,
298,
43579,
17,
18,
15,
90,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLen(t *testing.T) {
assert := tassert.New(t)
clusters := clusterWeightByName([]*xds_route.WeightedCluster_ClusterWeight{
{
Name: "hello1",
Weight: &wrappers.UInt32Value{Value: uint32(50)},
},
{
Name: "hello2",
Weight: &wrappers.UInt32Value{Value: uint32(50)},
},
})
actual := clust... | explode_data.jsonl/75521 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 158
} | [
2830,
3393,
11271,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
259,
2207,
7121,
1155,
692,
39407,
14605,
1669,
10652,
8295,
16898,
85288,
87,
5356,
28109,
22404,
64507,
28678,
85110,
4993,
8295,
515,
197,
197,
515,
298,
21297,
25,
256,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegister(t *testing.T) {
if err := Register("dummy1", nil); err != nil {
t.Fatal(err)
}
if err := Register("dummy1", nil); err == nil {
t.Fatalf("Expecting error, got none")
}
eng := newTestEngine(t)
//Should fail because globan handlers are copied
//at the engine creation
if err := eng.Register... | explode_data.jsonl/45348 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 212
} | [
2830,
3393,
8690,
1155,
353,
8840,
836,
8,
341,
743,
1848,
1669,
8451,
445,
31390,
16,
497,
2092,
1215,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
743,
1848,
1669,
8451,
445,
31390,
16,
497,
2092,
1215,
1848,
621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDB_Concurrent_WriteTo(t *testing.T) {
o := &bolt.Options{NoFreelistSync: false}
db := MustOpenWithOption(o)
defer db.MustClose()
var wg sync.WaitGroup
wtxs, rtxs := 5, 5
wg.Add(wtxs * rtxs)
f := func(tx *bolt.Tx) {
defer wg.Done()
f, err := ioutil.TempFile("", "bolt-")
if err != nil {
panic(er... | explode_data.jsonl/27474 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 565
} | [
2830,
3393,
3506,
15100,
3231,
31825,
1249,
1155,
353,
8840,
836,
8,
341,
22229,
1669,
609,
52433,
22179,
90,
2753,
36731,
19230,
12154,
25,
895,
532,
20939,
1669,
15465,
5002,
2354,
5341,
10108,
340,
16867,
2927,
50463,
7925,
2822,
2405,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateValidRequest(t *testing.T) {
client := NewWebhookRequestHandler(getRequest())
data, err := client.ValidateAndGetData()
assert.IsType(t, Event{}, data)
assert.Equal(t, 1337, data.ID)
assert.NoError(t, err)
} | explode_data.jsonl/25838 | {
"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,
17926,
4088,
1900,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
1532,
5981,
20873,
1900,
3050,
5433,
1900,
2398,
8924,
11,
1848,
1669,
2943,
47667,
3036,
68957,
2822,
6948,
4506,
929,
1155,
11,
3665,
22655,
821,
340,
6948,
128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBadPath(t *testing.T) {
handler := New(map[string]RESTStorage{}, "/prefix/version")
server := httptest.NewServer(handler)
client := http.Client{}
request, err := http.NewRequest("GET", server.URL+"/foobar", nil)
expectNoError(t, err)
response, err := client.Do(request)
expectNoError(t, err)
if respons... | explode_data.jsonl/30461 | {
"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,
17082,
1820,
1155,
353,
8840,
836,
8,
341,
53326,
1669,
1532,
9147,
14032,
60,
38307,
5793,
22655,
3521,
11849,
64413,
1138,
41057,
1669,
54320,
70334,
7121,
5475,
36514,
340,
25291,
1669,
1758,
11716,
31483,
23555,
11,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestStoreCommitDuplicate(t *testing.T) {
assert := assert.New(t)
db := dbm.NewMemDB()
store := NewStore(db)
priority := int64(10)
ev := types.NewMockGoodEvidence(2, 1, []byte("val1"))
store.MarkEvidenceAsCommitted(ev)
added := store.AddNewEvidence(ev, priority)
assert.False(added)
} | explode_data.jsonl/47405 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
6093,
33441,
53979,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
20939,
1669,
2927,
76,
7121,
18816,
3506,
741,
57279,
1669,
1532,
6093,
9791,
692,
3223,
8773,
1669,
526,
21,
19,
7,
16,
15,
340,
74837,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateMultipleContainers(t *testing.T) {
ka := string(prowjobv1.KubernetesAgent)
yes := true
defCfg := prowapi.DecorationConfig{
UtilityImages: &prowjobv1.UtilityImages{
CloneRefs: "clone-me",
InitUpload: "upload-me",
Entrypoint: "enter-me",
Sidecar: "official-drink-of-the-org",
},
G... | explode_data.jsonl/41014 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1470
} | [
2830,
3393,
17926,
32089,
74632,
1155,
353,
8840,
836,
8,
341,
197,
4554,
1669,
914,
1295,
651,
8799,
85,
16,
11352,
29827,
16810,
340,
197,
9693,
1669,
830,
198,
7452,
42467,
1669,
47558,
2068,
22442,
7614,
2648,
515,
197,
15980,
12189... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetTeamSanitization(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
team, resp := th.Client.CreateTeam(&model.Team{
DisplayName: t.Name() + "_1",
Name: GenerateTestTeamName(),
Email: th.GenerateTestEmail(),
Type: model.TEAM_OPEN,
AllowedDomains: "sim... | explode_data.jsonl/70701 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 703
} | [
2830,
3393,
1949,
14597,
23729,
275,
2022,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
197,
9196,
11,
9039,
1669,
270,
11716,
7251,
14597,
2099,
2528,
65842,
515,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_parseHumanTimeString(t *testing.T) {
testcases := []struct {
valid bool
t string
}{
{valid: true, t: "00:00:00"},
{valid: true, t: "01:01:01"},
{valid: true, t: "01:01:01.100"},
{valid: false, t: "invalid"},
{valid: false, t: "01"},
{valid: false, t: "01:"},
{valid: false, t: "01:01"},... | explode_data.jsonl/69234 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 402
} | [
2830,
3393,
21039,
33975,
96941,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
56322,
1807,
198,
197,
3244,
257,
914,
198,
197,
59403,
197,
197,
90,
1891,
25,
830,
11,
259,
25,
330,
15,
15,
25,
15,
15,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRouter_AllVerbs(t *testing.T) {
path := "/path1"
router := Router{}
_ = router.Get(path, testHandlerFunc)
_ = router.Head(path, testHandlerFunc)
_ = router.Post(path, testHandlerFunc)
_ = router.Put(path, testHandlerFunc)
_ = router.Patch(path, testHandlerFunc)
_ = router.Delete(path, testHandlerFunc)... | explode_data.jsonl/31722 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 312
} | [
2830,
3393,
9523,
53629,
10141,
1279,
1155,
353,
8840,
836,
8,
341,
26781,
1669,
3521,
2343,
16,
1837,
67009,
1669,
10554,
16094,
197,
62,
284,
9273,
2234,
5581,
11,
1273,
3050,
9626,
340,
197,
62,
284,
9273,
90478,
5581,
11,
1273,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestVerifies_InvalidV2(t *testing.T) {
path, file := NewTempTombstone(t)
defer os.RemoveAll(path)
WriteTombstoneHeader(t, file, v2header)
WriteBadData(t, file)
verify := NewVerifyTombstoneCommand()
verify.SetArgs([]string{"--engine-path", path})
verify.SetOut(bytes.NewBufferString(""))
require.Error(t, ... | explode_data.jsonl/24021 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 128
} | [
2830,
3393,
10141,
9606,
62,
7928,
53,
17,
1155,
353,
8840,
836,
8,
341,
26781,
11,
1034,
1669,
1532,
12151,
51,
2855,
10812,
1155,
340,
16867,
2643,
84427,
5581,
692,
60373,
51,
2855,
10812,
4047,
1155,
11,
1034,
11,
348,
17,
2708,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRecordWithUnknownOID(t *testing.T) {
conn := testutil.MustConnectPgx(t)
defer testutil.MustClose(t, conn)
_, err := conn.Exec(`drop type if exists floatrange;
create type floatrange as range (
subtype = float8,
subtype_diff = float8mi
);`)
if err != nil {
t.Fatal(err)
}
defer conn.Exec("drop type... | explode_data.jsonl/26140 | {
"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,
6471,
2354,
13790,
29805,
1155,
353,
8840,
836,
8,
341,
32917,
1669,
1273,
1314,
50463,
14611,
47,
59957,
1155,
340,
16867,
1273,
1314,
50463,
7925,
1155,
11,
4534,
692,
197,
6878,
1848,
1669,
4534,
30798,
5809,
6719,
943,
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... | 3 |
func TestETCDIsUpToDate(t *testing.T) {
// We want to check:
// The cache is properly initialized
// LatestTemplateIdx and NumAdTemplates are properly set
// If the number of ADTemplate is modified we update
// If nothing changed we don't update
ctx := context.Background()
backend := &etcdTest{}
resp := new(cl... | explode_data.jsonl/53944 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 867
} | [
2830,
3393,
1348,
6484,
3872,
2324,
76054,
1155,
353,
8840,
836,
8,
341,
197,
322,
1205,
1366,
311,
1779,
510,
197,
322,
576,
6500,
374,
10277,
17271,
198,
197,
322,
28157,
7275,
11420,
323,
16212,
2589,
51195,
525,
10277,
738,
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... | 1 |
func TestMakeSprintUpdateStatus(t *testing.T) {
assert := assert.New(t)
evt := sdk.AgileSprintUpdateMutation{}
v := sdk.AgileSprintStatusClosed
evt.Set.Status = &v
update, updated, err := makeSprintUpdate("5", &evt)
assert.NoError(err)
assert.True(updated)
assert.Equal("{\"id\":5,\"state\":\"closed\"}", sdk.Str... | explode_data.jsonl/3687 | {
"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,
8078,
50,
1350,
4289,
2522,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
197,
28734,
1669,
45402,
49850,
457,
50,
1350,
4289,
53998,
16094,
5195,
1669,
45402,
49850,
457,
50,
1350,
2522,
26884,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOSType(t *testing.T) {
t.Parallel()
// This test might seem like it's redundant, but it's designed to ensure that
// the exact values for existing types remain unchanged.
cases := []struct {
t OSType
exp int
}{
{OSTypeUnknown, 0},
{OSTypeIOS, 1},
{OSTypeAndroid, 2},
}
for _, tc := range ca... | explode_data.jsonl/42274 | {
"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,
4233,
499,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
1096,
1273,
2578,
2803,
1075,
432,
594,
47732,
11,
714,
432,
594,
6188,
311,
5978,
429,
198,
197,
322,
279,
4734,
2750,
369,
6350,
4494,
7146,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.