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 TestNumericKeys(t *testing.T) {
specDoc, err := loads.Spec("../fixtures/bugs/162/swagger.yml")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
schema := definitions["AvatarUrls"]
opts := opts()
genModel, err := makeGenDefinition("AvatarUrls", "models", schema, specDoc, opts)
require.NoErr... | explode_data.jsonl/2536 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 239
} | [
2830,
3393,
36296,
8850,
1155,
353,
8840,
836,
8,
341,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
14,
56176,
14,
16,
21,
17,
80930,
33936,
1138,
17957,
35699,
1155,
11,
1848,
692,
7452,
4054,
82,
1669,
1398,
9550,
36473,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClickAudienceGroup(t *testing.T) {
type RequestBody struct {
Description string `json:"description,omitempty"`
RequestID string `json:"requestId,omitempty"`
ClickURL string `json:"clickUrl,omitempty"`
}
type want struct {
URLPath string
RequestBody RequestBody
Response *ClickAudience... | explode_data.jsonl/37773 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2666
} | [
2830,
3393,
2612,
52949,
1835,
2808,
1155,
353,
8840,
836,
8,
341,
13158,
6145,
5444,
2036,
341,
197,
47414,
914,
1565,
2236,
2974,
4684,
20478,
8805,
197,
73806,
915,
256,
914,
1565,
2236,
2974,
2035,
764,
20478,
8805,
197,
197,
2612,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientParseConn(t *testing.T) {
t.Parallel()
network := "tcp"
ln, _ := net.Listen(network, "127.0.0.1:0")
s := &Server{
Handler: func(ctx *RequestCtx) {
},
}
go s.Serve(ln) //nolint:errcheck
host := ln.Addr().String()
c := &Client{}
req, res := AcquireRequest(), AcquireResponse()
defer func() {
... | explode_data.jsonl/79337 | {
"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,
2959,
14463,
9701,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
9038,
2349,
1669,
330,
27161,
698,
197,
2261,
11,
716,
1669,
4179,
68334,
46542,
11,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
15,
1138,
1903... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDate(t *testing.T) {
format := "2006-01-02T15:04:05"
dt := new(date.Date)
for tN, tC := range dateTestData {
tim := date.Date(tC.B).Get()
if got := tim.Format(format); got != tC.S {
t.Errorf("%d. got %q, want %q (from %v).", tN, got, tC.S, tC.B)
continue
}
dt.Set(tim)
if !bytes.Equal(dt[:], ... | explode_data.jsonl/34160 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 221
} | [
2830,
3393,
1916,
1155,
353,
8840,
836,
8,
341,
59416,
1669,
330,
17,
15,
15,
21,
12,
15,
16,
12,
15,
17,
51,
16,
20,
25,
15,
19,
25,
15,
20,
698,
97980,
1669,
501,
11970,
8518,
340,
2023,
259,
45,
11,
259,
34,
1669,
2088,
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 TestDiagnostics(t *testing.T) {
th := Setup().InitBasic()
if testing.Short() {
t.SkipNow()
}
data, server := newTestServer()
defer server.Close()
oldId := utils.CfgDiagnosticId
utils.CfgDiagnosticId = "i am not real"
defer func() {
utils.CfgDiagnosticId = oldId
}()
initDiagnostics(server.URL)
//... | explode_data.jsonl/82677 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1118
} | [
2830,
3393,
35,
18938,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
2822,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
7039,
741,
197,
630,
8924,
11,
3538,
1669,
501,
2271,
5475,
741,
16867,
3538,
10421,
2822,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNilcheckAddr(t *testing.T) {
c := testConfig(t)
ptrType := c.config.Types.BytePtr
fun := c.Fun("entry",
Bloc("entry",
Valu("mem", OpInitMem, types.TypeMem, 0, nil),
Valu("sb", OpSB, c.config.Types.Uintptr, 0, nil),
Goto("checkPtr")),
Bloc("checkPtr",
Valu("ptr1", OpAddr, ptrType, 0, nil, "sb... | explode_data.jsonl/6047 | {
"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,
19064,
2028,
13986,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1273,
2648,
1155,
340,
43811,
929,
1669,
272,
5423,
29147,
32119,
5348,
198,
90126,
1669,
272,
991,
359,
445,
4085,
756,
197,
12791,
1074,
445,
4085,
756,
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... | 4 |
func TestOpenPlatformSiteCode(t *testing.T) {
result := getOpenPlatformSiteDetail(2000000)
if result.Message != "TicketUnKnown" {
t.Errorf("error message mismatch: expected %s, but got %s", "TicketUnKnown", result.Message)
}
} | explode_data.jsonl/26984 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
5002,
17296,
17597,
2078,
1155,
353,
8840,
836,
8,
341,
9559,
1669,
633,
5002,
17296,
17597,
10649,
7,
17,
15,
15,
15,
15,
15,
15,
340,
743,
1102,
8472,
961,
330,
34058,
1806,
48206,
1,
341,
197,
3244,
13080,
445,
841,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFile_NotExecutable(t *testing.T) {
fs := testFs()
fs.WriteFile("build.sh", []byte("go test"), 0400)
err := CheckFile(fs, "build.sh", true)
assert.Equal(t, linterrors.NewFileError("build.sh", "is not executable"), err)
err = CheckFile(fs, "build.sh", false)
assert.Nil(t, err)
} | explode_data.jsonl/71219 | {
"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,
1703,
60816,
94772,
1155,
353,
8840,
836,
8,
341,
53584,
1669,
1273,
48300,
741,
53584,
4073,
1703,
445,
5834,
2395,
497,
3056,
3782,
445,
3346,
1273,
3975,
220,
15,
19,
15,
15,
692,
9859,
1669,
4248,
1703,
31856,
11,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCreateUserWithoutTeam(t *testing.T) {
th := Setup(t)
defer th.TearDown()
id := model.NewId()
email := "success+" + id + "@simulator.amazonses.com"
username := "name" + id
th.CheckCommand(t, "user", "create", "--email", email, "--password", "mypassword1", "--username", username)
user, err := th.App.Sr... | explode_data.jsonl/57418 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
4021,
1474,
26040,
14597,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
340,
16867,
270,
836,
682,
4454,
2822,
15710,
1669,
1614,
7121,
764,
741,
57549,
1669,
330,
5630,
5172,
488,
877,
488,
8428,
14781,
10511,
135... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQuotaCall(t *testing.T) {
s := env.NewTestSetup(env.QuotaCallTest, t)
env.SetStatsUpdateInterval(s.MfConfig(), 1)
// Add v2 quota config for all requests.
env.AddHTTPQuota(s.MfConfig(), "RequestCount", 5)
if err := s.SetUp(); err != nil {
t.Fatalf("Failed to setup test: %v", err)
}
defer s.TearDown()... | explode_data.jsonl/72887 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 511
} | [
2830,
3393,
2183,
6089,
7220,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
6105,
7121,
2271,
21821,
16978,
33907,
6089,
7220,
2271,
11,
259,
340,
57538,
4202,
16635,
4289,
10256,
1141,
1321,
69,
2648,
1507,
220,
16,
692,
197,
322,
2691,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExecutorDriverFrameworkToExecutorMessageEvent(t *testing.T) {
setTestEnv(t)
ch := make(chan bool, 2)
// Mock Slave process to respond to registration event.
server := testutil.NewMockSlaveHttpServer(t, func(rsp http.ResponseWriter, req *http.Request) {
reqPath, err := url.QueryUnescape(req.URL.String())
... | explode_data.jsonl/76152 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 449
} | [
2830,
3393,
25255,
11349,
14837,
1249,
25255,
2052,
1556,
1155,
353,
8840,
836,
8,
341,
8196,
2271,
14359,
1155,
340,
23049,
1669,
1281,
35190,
1807,
11,
220,
17,
340,
197,
322,
14563,
59368,
1882,
311,
5889,
311,
12227,
1538,
624,
4105... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStatementCountLimit(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("create table stmt_count_limit (id int)")
defer config.RestoreFunc()()
config.UpdateGlobal(func(conf *config.Config) {
conf.P... | explode_data.jsonl/5736 | {
"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,
8636,
2507,
16527,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
741,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
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 TestEndorserRPCError(t *testing.T) {
testErrorMessage := "RPC error condition"
srv := &mocks.MockEndorserServer{ProposalError: fmt.Errorf(testErrorMessage)}
addr := srv.Start(testAddress)
defer srv.Stop()
_, err := testProcessProposal(t, "grpc://"+addr)
statusError, ok := status.FromError(err)
assert.True... | explode_data.jsonl/45094 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 214
} | [
2830,
3393,
3727,
269,
799,
29528,
1454,
1155,
353,
8840,
836,
8,
341,
18185,
21349,
1669,
330,
29528,
1465,
2971,
1837,
1903,
10553,
1669,
609,
16712,
82,
24664,
3727,
269,
799,
5475,
90,
98637,
1454,
25,
8879,
13080,
8623,
21349,
1056... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandshakeClientCertRSA(t *testing.T) {
config := testConfig.Clone()
cert, _ := X509KeyPair([]byte(clientCertificatePEM), []byte(clientKeyPEM))
config.Certificates = []Certificate{cert}
test := &clientTest{
name: "ClientCert-RSA-RSA",
args: []string{"-cipher", "AES128", "-Verify", "1"},
config: c... | explode_data.jsonl/27710 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 417
} | [
2830,
3393,
2314,
29661,
2959,
36934,
73564,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
1273,
2648,
64463,
741,
1444,
529,
11,
716,
1669,
1599,
20,
15,
24,
1592,
12443,
10556,
3782,
12805,
33202,
1740,
44,
701,
3056,
3782,
12805,
1592,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tm_m(t *testing.T) {
a := []int{1, 2, 3}
s, err := json.Marshal(a)
if err != nil {
log.Println(err)
return
}
fmt.Println("------", "", "-----------")
log.Println(string(s))
} | explode_data.jsonl/64765 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
44045,
717,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
532,
1903,
11,
1848,
1669,
2951,
37271,
2877,
340,
743,
1848,
961,
2092,
341,
197,
6725,
12419,
3964,
340,
197,
853,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFormatRawOrDockerCommandRaw(t *testing.T) {
actual := formatRawOrDockerCommand(
CommandSpec{
Commands: []string{"ls", "-a"},
Dir: "subdir",
Env: []string{"TEST=true"},
},
"/proj/src",
Options{},
)
expected := command{
Commands: []string{"ls", "-a"},
Dir: "/proj/src/subdi... | explode_data.jsonl/22497 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 214
} | [
2830,
3393,
4061,
20015,
2195,
35,
13659,
4062,
20015,
1155,
353,
8840,
836,
8,
341,
88814,
1669,
3561,
20015,
2195,
35,
13659,
4062,
1006,
197,
97493,
8327,
515,
298,
197,
30479,
25,
3056,
917,
4913,
4730,
497,
6523,
64,
7115,
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... | 2 |
func TestSessionCacheGetDMS(t *testing.T) {
testGetAWSClient(
t, "DMS",
func(t *testing.T, cache *sessionCache, region *string, role Role) {
iface := cache.GetDMS(region, role)
if iface == nil {
t.Fail()
return
}
})
} | explode_data.jsonl/18779 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
5283,
8233,
1949,
35,
4826,
1155,
353,
8840,
836,
8,
341,
18185,
1949,
36136,
2959,
1006,
197,
3244,
11,
330,
35,
4826,
756,
197,
29244,
1155,
353,
8840,
836,
11,
6500,
353,
5920,
8233,
11,
5537,
353,
917,
11,
3476,
1540... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateDescription(t *testing.T) {
d1 := types.Description{
Website: "https://validator.cosmos",
Details: "Test validator",
}
d2 := types.Description{
Moniker: types.DoNotModifyDesc,
Identity: types.DoNotModifyDesc,
Website: types.DoNotModifyDesc,
Details: types.DoNotModifyDesc,
}
d3 := ty... | explode_data.jsonl/2323 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 244
} | [
2830,
3393,
4289,
5009,
1155,
353,
8840,
836,
8,
341,
2698,
16,
1669,
4494,
28773,
515,
197,
197,
30051,
25,
330,
2428,
1110,
16112,
21147,
8631,
756,
197,
197,
7799,
25,
330,
2271,
22935,
756,
197,
630,
2698,
17,
1669,
4494,
28773,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClient_grpc_servercrash(t *testing.T) {
process := helperProcess("test-grpc")
c := NewClient(&ClientConfig{
Cmd: process,
HandshakeConfig: testHandshake,
Plugins: testGRPCPluginMap,
AllowedProtocols: []Protocol{ProtocolGRPC},
})
defer c.Kill()
if _, err := c.Start(); err !=... | explode_data.jsonl/57836 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 376
} | [
2830,
3393,
2959,
15682,
3992,
12015,
5082,
988,
1155,
353,
8840,
836,
8,
341,
53314,
1669,
13137,
7423,
445,
1944,
24321,
3992,
1138,
1444,
1669,
1532,
2959,
2099,
2959,
2648,
515,
197,
6258,
2277,
25,
1060,
1882,
345,
197,
197,
2314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestValidateServiceRoleBinding(t *testing.T) {
cases := []struct {
name string
in proto.Message
expectErrMsg string
}{
{
name: "invalid proto",
expectErrMsg: "cannot cast to ServiceRoleBinding",
},
{
name: "no subject",
in: &rbac.ServiceRoleBinding{
Subjects:... | explode_data.jsonl/56932 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1238
} | [
2830,
3393,
17926,
1860,
9030,
15059,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
17430,
1843,
18433,
8472,
198,
197,
24952,
75449,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestReadWriteQueue_CutoffTime(t *testing.T) {
var startTime time.Time
testRwq := newReadWriteQueue(newDeviceContext(basicDeviceConfig))
cases := []struct {
desc string
req *Request
want time.Time
}{
{
desc: "20 ms request",
req: &Request{
Type: ReadRequest,
Timestamp: startTime,
... | explode_data.jsonl/64721 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
58610,
7554,
920,
27440,
1462,
1155,
353,
8840,
836,
8,
341,
2405,
22858,
882,
16299,
198,
18185,
49,
86,
80,
1669,
501,
58610,
7554,
1755,
6985,
1972,
1883,
5971,
6985,
2648,
4390,
1444,
2264,
1669,
3056,
1235,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestShouldReturnFalseWhenCheckingForSchemaDiffSuppressForTagFilterOfApplicationConfigAndValueCannotBeNormalizedAndOldAndNewValueAreNotEqual(t *testing.T) {
resourceHandle := NewApplicationConfigResourceHandle()
schema := resourceHandle.MetaData().Schema
oldValue := invalidTagFilter
newValue := "entity.type foo... | explode_data.jsonl/64928 | {
"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,
14996,
5598,
4049,
4498,
40129,
2461,
8632,
21751,
17670,
2461,
5668,
5632,
2124,
4988,
2648,
3036,
1130,
17444,
3430,
79082,
3036,
18284,
3036,
3564,
1130,
11526,
2623,
2993,
1155,
353,
8840,
836,
8,
341,
50346,
6999,
1669,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFilterByPrefixAndTransformName(t *testing.T) {
carotte := "type/carotte"
ghLabelCarotte := &github.Label{
Name: &carotte,
}
courgette := "type/courgette"
ghLabelCourgette := &github.Label{
Name: &courgette,
}
tomate := "tomate"
ghLabelTomate := &github.Label{
Name: &tomate,
}
legumes := []*g... | explode_data.jsonl/16583 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
5632,
1359,
14335,
3036,
8963,
675,
1155,
353,
8840,
836,
8,
341,
1444,
277,
50011,
1669,
330,
1313,
65659,
50011,
698,
197,
866,
2476,
8852,
50011,
1669,
609,
5204,
4679,
515,
197,
21297,
25,
609,
6918,
50011,
345,
197,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMinMaxSumCountValue(t *testing.T) {
mmsc := minmaxsumcount.New(&metric.Descriptor{})
assert.NoError(t, mmsc.Update(context.Background(), 1, &metric.Descriptor{}))
assert.NoError(t, mmsc.Update(context.Background(), 10, &metric.Descriptor{}))
// Prior to checkpointing ErrNoData should be returned.
_, _, _... | explode_data.jsonl/70787 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 309
} | [
2830,
3393,
92304,
9190,
2507,
1130,
1155,
353,
8840,
836,
8,
341,
2109,
1011,
66,
1669,
1308,
2810,
1242,
1830,
7121,
2099,
15903,
23548,
6820,
37790,
6948,
35699,
1155,
11,
296,
1011,
66,
16689,
5378,
19047,
1507,
220,
16,
11,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRPCGarbageCollection(t *testing.T) {
// Scenario: Send a message to a remote node, and establish a stream
// while doing it.
// Afterwards - make that stream be aborted, and send a message to a different
// remote node.
// The first stream should be cleaned from the mapping.
t.Parallel()
comm := &mock... | explode_data.jsonl/77746 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 817
} | [
2830,
3393,
29528,
43930,
20652,
6482,
1155,
353,
8840,
836,
8,
341,
197,
322,
58663,
25,
11000,
264,
1943,
311,
264,
8699,
2436,
11,
323,
5695,
264,
4269,
198,
197,
322,
1393,
3730,
432,
624,
197,
322,
86540,
481,
1281,
429,
4269,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMaxNumberOfRoles_Error(t *testing.T) {
mnr := &callbacks.MaxNumberOfRoles{}
expectedErrMsg := callbacks.MaxNumberOfRolesMessage
if mnr.Error() != expectedErrMsg {
t.Errorf(
"Unexpected error message. Got %s, Expected: %s",
mnr.Error(),
expectedErrMsg,
)
}
mnr.Err = fmt.Errorf(wrapMsg)
expe... | explode_data.jsonl/56097 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 227
} | [
2830,
3393,
5974,
40619,
25116,
28651,
1155,
353,
8840,
836,
8,
341,
2109,
19618,
1669,
609,
68311,
14535,
40619,
25116,
16094,
42400,
75449,
1669,
26679,
14535,
40619,
25116,
2052,
271,
743,
296,
19618,
6141,
368,
961,
3601,
75449,
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 TestHttpGetBytes(t *testing.T) {
p, err := HttpGetBytes(&http.Client{}, "http://example.com", nil)
if err != nil {
t.Errorf("HttpGetBytes:\n Expect => %v\n Got => %s\n", nil, err)
}
s := string(p)
if !strings.HasPrefix(s, examplePrefix) {
t.Errorf("HttpGet:\n Expect => %s\n Got => %s\n", examplePrefix, s)... | explode_data.jsonl/57412 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
29774,
7078,
1155,
353,
8840,
836,
8,
341,
3223,
11,
1848,
1669,
4823,
1949,
7078,
2099,
1254,
11716,
22655,
330,
1254,
1110,
8687,
905,
497,
2092,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
29774,
7078,
7190,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCustomImageDownload(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc(testlib.CloudServerURL(strings.Join([]string{customImagePath, "809cd001-07e3-4e00-a5c5-2d8fa0516d90"}, "/")),
func(writer http.ResponseWriter, r *http.Request) {
require.Equal(t, http.MethodGet, r.Method)
resp := `{
"ima... | explode_data.jsonl/35490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1287
} | [
2830,
3393,
10268,
1906,
11377,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
741,
2109,
2200,
63623,
8623,
2740,
94492,
5475,
3144,
51442,
22363,
10556,
917,
90,
9163,
66356,
11,
330,
23,
15,
24,
4385,
15,
15,
16,
12,
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 TestTransformBlackBoxes(t *testing.T) {
type args struct {
blackboxes []*sysl.Attribute
}
eltFirst := []*sysl.Attribute{
{
Attribute: &sysl.Attribute_S{
S: "Value A",
},
},
{
Attribute: &sysl.Attribute_S{
S: "Value B",
},
},
}
attrFirst := &sysl.Attribute{
Attribute: &sysl.Att... | explode_data.jsonl/58724 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 613
} | [
2830,
3393,
8963,
14417,
93665,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
197,
11453,
22204,
29838,
7791,
75,
33775,
198,
197,
630,
197,
3818,
5338,
1669,
29838,
7791,
75,
33775,
515,
197,
197,
515,
298,
197,
3907,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestHead_ScriptTag(t *testing.T) {
t.Parallel()
pageFn := func() *l.Page {
page := l.NewPage()
page.DOM.Body.Add(
l.C("button", l.Attrs{"id": "btn"}, "Click Me",
l.On("click", func(ctx context.Context, e l.Event) {
page.DOM.Head.Add(l.T("script", l.HTML(`document.getElementById("content").inner... | explode_data.jsonl/27748 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 302
} | [
2830,
3393,
12346,
1098,
1228,
5668,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
35272,
24911,
1669,
2915,
368,
353,
75,
17558,
341,
197,
35272,
1669,
326,
7121,
2665,
2822,
197,
35272,
65796,
20934,
1904,
1006,
298,
8810,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAddExistingAllocation(t *testing.T) {
node := NewTestSchedulerNode()
alloc01 := si.Allocation{
AllocationKey: "pod001",
AllocationTags: nil,
UUID: "podUID001",
ResourcePerAlloc: nil,
Priority: nil,
QueueName: "",
NodeID: "host001",
ApplicationID: "... | explode_data.jsonl/8406 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 310
} | [
2830,
3393,
2212,
53067,
78316,
1155,
353,
8840,
836,
8,
341,
20831,
1669,
1532,
2271,
38878,
1955,
741,
197,
4742,
15,
16,
1669,
4403,
9636,
2527,
515,
197,
197,
78316,
1592,
25,
262,
330,
39073,
15,
15,
16,
756,
197,
197,
78316,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHealthzServer(t *testing.T) {
listener := newFakeListener()
httpFactory := newFakeHTTPServerFactory()
fakeClock := clock.NewFakeClock(time.Now())
hs := newProxierHealthServer(listener, httpFactory, fakeClock, "127.0.0.1:10256", 10*time.Second, nil, nil)
server := hs.httpFactory.New(hs.addr, healthzHandle... | explode_data.jsonl/11930 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 333
} | [
2830,
3393,
14542,
89,
5475,
1155,
353,
8840,
836,
8,
341,
14440,
798,
1669,
501,
52317,
2743,
741,
28080,
4153,
1669,
501,
52317,
9230,
5475,
4153,
741,
1166,
726,
26104,
1669,
8866,
7121,
52317,
26104,
9730,
13244,
12367,
81692,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDatabaseAddNamespace(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
d, mapCh, testReporter := newTestDatabase(t, ctrl, Bootstrapped)
require.NoError(t, d.Open())
defer func() {
close(mapCh)
require.NoError(t, d.Close())
leaktest.CheckTimeout(t, time.Second)()
}()
// retrieve... | explode_data.jsonl/46536 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 717
} | [
2830,
3393,
5988,
2212,
22699,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
2698,
11,
2415,
1143,
11,
1273,
52766,
1669,
501,
2271,
5988,
1155,
11,
23743,
11,
15004,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtract(t *testing.T) {
dir := tmpDir(t)
defer os.RemoveAll(dir)
name := filepath.Join(dir, "pack.a")
ar := archive(name, os.O_RDWR, nil)
// Add some entries by hand.
ar.addFile(helloFile.Reset())
ar.addFile(goodbyeFile.Reset())
ar.fd.Close()
// Now extract one file. We chdir to the directory of the a... | explode_data.jsonl/67505 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 398
} | [
2830,
3393,
28959,
1155,
353,
8840,
836,
8,
341,
48532,
1669,
4174,
6184,
1155,
340,
16867,
2643,
84427,
14161,
340,
11609,
1669,
26054,
22363,
14161,
11,
330,
4748,
5849,
1138,
69340,
1669,
18132,
3153,
11,
2643,
8382,
66266,
11,
2092,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_prHasSuccessfulCheck(t *testing.T) {
t.Parallel()
//enabled nolint because this is a test
//nolint
type args struct {
r []clients.CheckRun
pr clients.PullRequest
err error
}
//enabled nolint because this is a test
//nolint
tests := []struct {
name string
args args
want bool
w... | explode_data.jsonl/77208 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1583
} | [
2830,
3393,
5294,
10281,
36374,
3973,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
322,
15868,
308,
337,
396,
1576,
419,
374,
264,
1273,
198,
197,
322,
77,
337,
396,
198,
13158,
2827,
2036,
341,
197,
7000,
256,
3056,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_getWorkflowExportHandler(t *testing.T) {
api, db, _, end := newTestAPI(t)
defer end()
u, pass := assets.InsertAdminUser(t, api.mustDB())
key := sdk.RandomString(10)
proj := assets.InsertTestProject(t, api.mustDB(), api.Cache, key, key)
require.NoError(t, group.InsertLinkGroupUser(context.TODO(), api.mus... | explode_data.jsonl/25269 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1485
} | [
2830,
3393,
3062,
62768,
16894,
3050,
1155,
353,
8840,
836,
8,
341,
54299,
11,
2927,
11,
8358,
835,
1669,
501,
2271,
7082,
1155,
340,
16867,
835,
741,
10676,
11,
1494,
1669,
11770,
23142,
7210,
1474,
1155,
11,
6330,
69419,
3506,
2398,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIncreaseScore(t *testing.T) {
scoreText = tl.NewText(0, 0, " Score: 0", tl.ColorBlack, tl.ColorBlue)
IncreaseScore(5)
if scoreText.Text() != " Score: 5 " {
t.Errorf("IncreaseScore test failed. Was expecting 5, got: %s", scoreText.Text())
}
} | explode_data.jsonl/36043 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 107
} | [
2830,
3393,
69556,
10570,
1155,
353,
8840,
836,
8,
341,
60425,
1178,
284,
29796,
7121,
1178,
7,
15,
11,
220,
15,
11,
330,
18115,
25,
220,
15,
497,
29796,
6669,
14417,
11,
29796,
6669,
10331,
340,
197,
69556,
10570,
7,
20,
340,
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... | 2 |
func TestConsumerGroupWithMissingTopic(t *testing.T) {
t.Parallel()
t.Skip("this test doesn't work when the cluster is configured to auto-create topics")
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
conf := ReaderConfig{
Brokers: []string{"localhost:909... | explode_data.jsonl/80379 | {
"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,
29968,
2808,
2354,
25080,
26406,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3244,
57776,
445,
574,
1273,
3171,
944,
975,
979,
279,
10652,
374,
19755,
311,
3233,
39679,
13347,
5130,
20985,
11,
9121,
1669,
2266,
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 TestFSStoreMsgCausesFlush(t *testing.T) {
cleanupFSDatastore(t)
defer cleanupFSDatastore(t)
fs := createDefaultFileStore(t, BufferSize(50))
defer fs.Close()
cs := storeCreateChannel(t, fs, "foo")
m1 := storeMsg(t, cs, "foo", 1, []byte("hello"))
ms := cs.Msgs.(*FileMsgStore)
ms.RLock()
buffered := ms.bw.... | explode_data.jsonl/7760 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 584
} | [
2830,
3393,
8485,
6093,
6611,
22571,
4776,
46874,
1155,
353,
8840,
836,
8,
341,
1444,
60639,
8485,
1043,
4314,
1155,
340,
16867,
21290,
8485,
1043,
4314,
1155,
692,
53584,
1669,
1855,
3675,
1703,
6093,
1155,
11,
10312,
1695,
7,
20,
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... | 7 |
func TestPostNewNodeSelf(t *testing.T) {
o, r := newTestAPIServer()
mnm := &networkmapmocks.Manager{}
o.On("NetworkMap").Return(mnm)
input := fftypes.EmptyInput{}
var buf bytes.Buffer
json.NewEncoder(&buf).Encode(&input)
req := httptest.NewRequest("POST", "/api/v1/network/nodes/self", &buf)
req.Header.Set("Cont... | explode_data.jsonl/14635 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 221
} | [
2830,
3393,
4133,
3564,
1955,
12092,
1155,
353,
8840,
836,
8,
341,
22229,
11,
435,
1669,
501,
2271,
2537,
1637,
2836,
741,
2109,
19638,
1669,
609,
17511,
2186,
16712,
82,
58298,
16094,
22229,
8071,
445,
12320,
2227,
1827,
5598,
1255,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRecordAdapterPriceMetric(t *testing.T) {
m := createMetricsForTesting()
adapterName := "anyName"
cpm := float64(42)
m.RecordAdapterPrice(pbsmetrics.AdapterLabels{
Adapter: openrtb_ext.BidderName(adapterName),
}, cpm)
expectedCount := uint64(1)
expectedSum := cpm
result := getHistogramFromHistogramV... | explode_data.jsonl/13949 | {
"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,
6471,
5940,
6972,
54310,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1855,
27328,
2461,
16451,
741,
197,
19731,
675,
1669,
330,
3767,
675,
698,
1444,
5187,
1669,
2224,
21,
19,
7,
19,
17,
692,
2109,
49959,
5940,
6972,
1295,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReverseInplace(t *testing.T) {
assert := assert.New(t)
table := []string{
"carbon.agents.carbon-clickhouse.graphite1.tcp.metricsReceived",
"",
".",
"carbon..xx",
".hello..world.",
}
for i := 0; i < len(table); i++ {
x := []byte(table[i])
y := []byte(table[i])
z := reverseBytesOriginal(x)
... | explode_data.jsonl/32218 | {
"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,
45695,
641,
2007,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
26481,
1669,
3056,
917,
515,
197,
197,
1,
73341,
28092,
805,
26890,
5970,
28118,
7675,
10763,
632,
16,
85253,
35359,
23260,
756,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetSignatureForDocument_fail_connect(t *testing.T) {
client := &testingcommons.P2PMockClient{}
coreDoc := testingcoredocument.GenerateCoreDocument()
ctx := context.Background()
centrifugeId, err := identity.ToCentID(utils.RandomSlice(identity.CentIDLength))
assert.Nil(t, err, "centrifugeId not initialize... | explode_data.jsonl/43225 | {
"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,
1949,
25088,
2461,
7524,
22121,
15720,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
609,
8840,
52361,
1069,
17,
8795,
1176,
2959,
16094,
71882,
9550,
1669,
7497,
2153,
6062,
57582,
5386,
7524,
741,
20985,
1669,
2266,
19047,
2822... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAppMeshObserver_GetRequestSuccessRate(t *testing.T) {
expected := ` sum( rate( envoy_cluster_upstream_rq{ kubernetes_namespace="default", kubernetes_pod_name=~"podinfo-[0-9a-zA-Z]+(-[0-9a-zA-Z]+)", envoy_response_code!~"5.*" }[1m] ) ) / sum( rate( envoy_cluster_upstream_rq{ kubernetes_namespace="default", kub... | explode_data.jsonl/77789 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 505
} | [
2830,
3393,
2164,
14194,
17151,
13614,
1900,
7188,
11564,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
1565,
2629,
7,
4379,
7,
59530,
28441,
8237,
4027,
79638,
90,
595,
29827,
41571,
428,
2258,
497,
595,
29827,
85337,
1269,
94535,
1,
3907... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sqsRepository_ListAllQueues(t *testing.T) {
tests := []struct {
name string
mocks func(client *awstest.MockFakeSQS)
want []*string
wantErr error
}{
{
name: "list with multiple pages",
mocks: func(client *awstest.MockFakeSQS) {
client.On("ListQueuesPages",
&sqs.ListQueuesInpu... | explode_data.jsonl/27762 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 949
} | [
2830,
3393,
643,
26358,
4624,
27104,
2403,
25776,
1137,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
2109,
25183,
256,
2915,
12805,
353,
672,
267,
477,
24664,
52317,
64308,
50,
340,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUbuntu1804Flags(t *testing.T) {
// Validate --resolv-conf is missing with 16.04 distro and present with 18.04
cs := CreateMockContainerService("testcluster", "1.10.13", 3, 2, false)
cs.Properties.MasterProfile.Distro = AKSUbuntu1604
cs.Properties.AgentPoolProfiles[0].Distro = AKSUbuntu1804
cs.Properties.A... | explode_data.jsonl/33897 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 951
} | [
2830,
3393,
75652,
16,
23,
15,
19,
9195,
1155,
353,
8840,
836,
8,
341,
197,
322,
23282,
1177,
416,
35315,
50717,
374,
7402,
448,
220,
16,
21,
13,
15,
19,
1582,
299,
323,
3042,
448,
220,
16,
23,
13,
15,
19,
198,
71899,
1669,
4230... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDetectImagesInitialDetect(t *testing.T) {
manager, fakeRuntime, _ := newRealImageGCManager(ImageGCPolicy{})
fakeRuntime.ImageList = []container.Image{
makeImage(0, 1024),
makeImage(1, 2048),
makeImage(2, 2048),
}
fakeRuntime.AllPodList = []*containertest.FakePod{
{Pod: &container.Pod{
Containers... | explode_data.jsonl/48103 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 561
} | [
2830,
3393,
57193,
14228,
6341,
57193,
1155,
353,
8840,
836,
8,
341,
92272,
11,
12418,
15123,
11,
716,
1669,
501,
12768,
1906,
22863,
2043,
30122,
38,
7123,
8018,
37790,
1166,
726,
15123,
7528,
852,
284,
3056,
3586,
7528,
515,
197,
7743... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSystemStats(t *testing.T) {
mailbox.Create("stats.systemtest")
req := api.SimpleRequest{}
accessKey := mailbox.AccessKey{FullAccess: true}
accessKey.Create()
req.Sign(accessKey.Name, accessKey.Secret)
var resp api.SystemStatsResponse
code := doRequest(t, req, &resp, "stats")
if code != 200 {
t.Fatal(... | explode_data.jsonl/15716 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
2320,
16635,
1155,
353,
8840,
836,
8,
341,
2109,
604,
2011,
7251,
445,
16260,
15936,
1944,
1138,
24395,
1669,
6330,
24252,
1900,
16094,
197,
5211,
1592,
1669,
45742,
35645,
1592,
90,
9432,
6054,
25,
830,
532,
197,
5211,
1592... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLargeFile_String(t *testing.T) {
v := LargeFile{
RefName: String(""),
Path: String(""),
OID: String(""),
Size: Int(0),
}
want := `github.LargeFile{RefName:"", Path:"", OID:"", Size:0}`
if got := v.String(); got != want {
t.Errorf("LargeFile.String = %v, want %v", got, want)
}
} | explode_data.jsonl/33256 | {
"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,
34253,
1703,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
20286,
1703,
515,
197,
197,
3945,
675,
25,
923,
445,
4461,
197,
69640,
25,
262,
923,
445,
4461,
197,
197,
29805,
25,
257,
923,
445,
4461,
197,
91224,
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... | 2 |
func TestReturn(t *testing.T) {
_, ctrl := createFixtures(t)
subject := new(Subject)
// Unspecified return should produce "zero" result.
ctrl.RecordCall(subject, "FooMethod", "zero")
ctrl.RecordCall(subject, "FooMethod", "five").Return(5)
assertEqual(
t,
[]interface{}{0},
ctrl.Call(subject, "FooMethod", "... | explode_data.jsonl/17286 | {
"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,
5598,
1155,
353,
8840,
836,
8,
341,
197,
6878,
23743,
1669,
1855,
25958,
18513,
1155,
340,
28624,
583,
1669,
501,
7,
13019,
692,
197,
322,
1230,
53434,
470,
1265,
8193,
330,
14154,
1,
1102,
624,
84381,
49959,
7220,
29128,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSidecarResourceLimits(t *testing.T) {
cancel, controller := newController()
defer cancel()
controller.Config.Executor = &apiv1.Container{
Resources: apiv1.ResourceRequirements{
Limits: apiv1.ResourceList{
apiv1.ResourceCPU: resource.MustParse("0.5"),
apiv1.ResourceMemory: resource.MustParse(... | explode_data.jsonl/70965 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 466
} | [
2830,
3393,
16384,
6918,
4783,
94588,
1155,
353,
8840,
836,
8,
341,
84441,
11,
6461,
1669,
501,
2051,
741,
16867,
9121,
741,
61615,
10753,
94500,
284,
609,
391,
344,
16,
33672,
515,
197,
197,
11277,
25,
1443,
344,
16,
20766,
59202,
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... | 5 |
func TestValidate(t *testing.T) {
t.Parallel()
c := &Config{
StrategySettings: StrategySettings{Name: dca},
CurrencySettings: []CurrencySettings{
{
ExchangeName: testExchange,
Asset: asset.Spot.String(),
Base: currency.BTC.String(),
Quote: currency.USDT... | explode_data.jsonl/58420 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 311
} | [
2830,
3393,
17926,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
1444,
1669,
609,
2648,
515,
197,
197,
19816,
6086,
25,
27745,
6086,
63121,
25,
294,
924,
1583,
197,
6258,
5088,
6086,
25,
3056,
26321,
6086,
515,
298,
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... | 2 |
func TestValueBinder_Strings(t *testing.T) {
var testCases = []struct {
name string
givenFailFast bool
givenBindErrors []error
whenURL string
whenMust bool
expectValue []string
expectError string
}{
{
name: "ok, binds value",
whenURL: "/search?param... | explode_data.jsonl/82539 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 932
} | [
2830,
3393,
1130,
44055,
62,
20859,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
37302,
284,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
3174,
2071,
19524,
32174,
256,
1807,
198,
197,
3174,
2071,
9950,
13877,
3056,
841,
198,
197,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestTimezoneFormat(t *testing.T) {
// Test positive format
posLoc, err := time.LoadLocation("Africa/Asmara")
if err != nil {
t.Fatal(err)
}
posZone, posOffset := time.Now().In(posLoc).Zone()
posAddLocal := addLocale{TimezoneFormat: Offset}
posVal := posAddLocal.Format(posZone, posOffset)
assert.Rege... | explode_data.jsonl/11594 | {
"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,
1462,
8684,
4061,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
6785,
3561,
271,
28164,
9152,
11,
1848,
1669,
882,
13969,
4707,
445,
73591,
14,
2121,
76,
5059,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_Problem234(t *testing.T) {
qs := []question234{
question234{
para234{[]int{1, 1, 2, 2, 3, 4, 4, 4}},
ans234{false},
},
question234{
para234{[]int{1, 1, 1, 1, 1, 1}},
ans234{true},
},
question234{
para234{[]int{1, 2, 2, 1, 3}},
ans234{false},
},
question234{
para234{[]i... | explode_data.jsonl/58210 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 538
} | [
2830,
3393,
16670,
10121,
17,
18,
19,
1155,
353,
8840,
836,
8,
1476,
18534,
82,
1669,
3056,
7841,
17,
18,
19,
4257,
197,
197,
7841,
17,
18,
19,
515,
298,
197,
14794,
17,
18,
19,
90,
1294,
396,
90,
16,
11,
220,
16,
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... | 2 |
func TestLongChain(t *testing.T) {
if testing.Short() {
t.Skip("skipping generation of a long chain of certificates in short mode")
}
roots, intermediates := NewCertPool(), NewCertPool()
parent, parentKey, err := generateCert("Root CA", true, false, nil, nil)
if err != nil {
t.Fatal(err)
}
roots.AddCert(pa... | explode_data.jsonl/29006 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 338
} | [
2830,
3393,
6583,
18837,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
9471,
315,
264,
1293,
8781,
315,
34437,
304,
2805,
3856,
1138,
197,
630,
197,
37165,
11,
54175,
973,
1669,
1532,
369... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseS3Notification(t *testing.T) {
//nolint:lll
notification := "{\"Records\":[{\"eventVersion\":\"2.1\",\"eventSource\":\"aws:s3\",\"awsRegion\":\"us-west-2\",\"eventTime\":\"1970-01-01T00:00:00.000Z\"," +
"\"eventName\":\"ObjectCreated:Put\",\"userIdentity\":{\"principalId\":\"AIDAJDPLRKLG7UEXAMPLE\"},\... | explode_data.jsonl/14768 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 531
} | [
2830,
3393,
14463,
50,
18,
11196,
1155,
353,
8840,
836,
8,
341,
197,
322,
77,
337,
396,
25,
654,
75,
198,
197,
18553,
1669,
54734,
25876,
59,
8899,
64238,
3087,
5637,
23488,
17,
13,
16,
34333,
3087,
3608,
23488,
8635,
14495,
18,
343... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAPIStatusAppHandler(t *testing.T) {
cfg := initTest()
r := gofight.New()
appVersion := "v1.0.0"
SetVersion(appVersion)
r.GET("/api/stat/app").
Run(routerEngine(cfg, q), func(r gofight.HTTPResponse, rq gofight.HTTPRequest) {
data := r.Body.Bytes()
value, _ := jsonparser.GetString(data, "version... | explode_data.jsonl/67608 | {
"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,
7082,
2522,
2164,
3050,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
2930,
2271,
2822,
7000,
1669,
728,
21143,
7121,
2822,
28236,
5637,
1669,
330,
85,
16,
13,
15,
13,
15,
698,
22212,
5637,
11462,
5637,
692,
7000,
17410,
4283... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFilterAddMaxDataSize(t *testing.T) {
data := bytes.Repeat([]byte{0xff}, 521)
msg := wire.NewMsgFilterAdd(data)
// Encode with latest protocol version.
var buf bytes.Buffer
err := msg.BtcEncode(&buf, wire.ProtocolVersion)
if err == nil {
t.Errorf("encode of MsgFilterAdd succeeded when it shouldn't "+
... | explode_data.jsonl/14209 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 209
} | [
2830,
3393,
5632,
2212,
5974,
1043,
1695,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
5820,
2817,
10979,
10556,
3782,
90,
15,
9020,
2137,
220,
20,
17,
16,
340,
21169,
1669,
9067,
7121,
6611,
5632,
2212,
2592,
692,
197,
322,
56562,
448,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestMiddlewareOK(t *testing.T) {
router := chi.NewRouter()
type Data struct {
ID uuid.UUID `path:"id"`
Name string `json:"name"`
Part string `query:"part"`
Priority uint8 `json:"priority"`
Null string `json:"-"`
Hero string
}
router.With(
Middleware(Data{}),
).... | explode_data.jsonl/2851 | {
"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,
24684,
3925,
1155,
353,
8840,
836,
8,
341,
67009,
1669,
25798,
7121,
9523,
741,
13158,
2885,
2036,
341,
197,
29580,
981,
16040,
39636,
1565,
2343,
2974,
307,
8805,
197,
21297,
257,
914,
262,
1565,
2236,
2974,
606,
8805,
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 TestShouldPrepend(t *testing.T) {
assert.True(t, shouldPrepend("system.memory.usage"))
assert.True(t, shouldPrepend("process.cpu.time"))
assert.False(t, shouldPrepend("processes.cpu.time"))
assert.False(t, shouldPrepend("systemd.metric.name"))
assert.False(t, shouldPrepend("random.metric.name"))
} | explode_data.jsonl/46799 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
14996,
4703,
3740,
1155,
353,
8840,
836,
8,
341,
6948,
32443,
1155,
11,
1265,
4703,
3740,
445,
8948,
36611,
92694,
5455,
6948,
32443,
1155,
11,
1265,
4703,
3740,
445,
4630,
42387,
6378,
5455,
6948,
50757,
1155,
11,
1265,
470... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHeader(t *testing.T) {
t.Parallel()
t.Run("lengths", func(t *testing.T) {
t.Parallel()
lengths := []int{
124,
125,
126,
127,
65534,
65535,
65536,
65537,
}
for _, n := range lengths {
n := n
t.Run(strconv.Itoa(n), func(t *testing.T) {
t.Parallel()
testHeader(... | explode_data.jsonl/77153 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 463
} | [
2830,
3393,
4047,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3244,
16708,
445,
4129,
82,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3244,
41288,
7957,
2822,
197,
49046,
82,
1669,
3056,
396,
515,
298,
197,
16,
17,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUseShardingSchema(t *testing.T) {
schema := "zerodb"
c := backend.NewConnCache()
if err := c.ConnectMysql("127.0.0.1:9696", "zerodb", "zerodb", ""); err != nil {
t.Errorf(err.Error())
}
srr := testProxyEngine.GetRouter().GetSchemaRule(schema)
if srr.Type != TypeSharding {
t.Errorf("should be TypeShar... | explode_data.jsonl/53890 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
10253,
2016,
28410,
8632,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
1669,
330,
7070,
16853,
698,
1444,
1669,
19163,
7121,
9701,
8233,
741,
743,
1848,
1669,
272,
43851,
44,
14869,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestPowGo1(t *testing.T) {
t.Logf("PowProcs:%d", PowProcs)
proc := PowProcs
PowProcs = 1
testPowGo(t)
PowProcs = proc
} | explode_data.jsonl/11021 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 67
} | [
2830,
3393,
66584,
10850,
16,
1155,
353,
8840,
836,
8,
341,
3244,
98954,
445,
66584,
1336,
4837,
7533,
67,
497,
23605,
1336,
4837,
340,
197,
15782,
1669,
23605,
1336,
4837,
198,
10025,
363,
1336,
4837,
284,
220,
16,
198,
18185,
66584,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMarshalRespone(t *testing.T) {
Convey("Given a valid []byte response", t, func() {
byteResponse200 := []byte(response200)
byteResponse204 := []byte(response204)
byteResponse206 := []byte(response206)
byteResponse401 := []byte(response401)
byteResponse407 := []byte(response407)
byteResponse498 := [... | explode_data.jsonl/79107 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1585
} | [
2830,
3393,
55438,
36555,
603,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
22043,
264,
2697,
3056,
3782,
2033,
497,
259,
11,
2915,
368,
341,
197,
31422,
2582,
17,
15,
15,
1669,
3056,
3782,
5684,
17,
15,
15,
340,
197,
31422,
2582... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_SetErrorMiddleware(t *testing.T) {
r := require.New(t)
app := New(Options{})
app.ErrorHandlers.Default(func(code int, err error, c Context) error {
res := c.Response()
res.WriteHeader(418)
res.Write([]byte("i'm a teapot"))
return nil
})
app.GET("/", func(c Context) error {
return c.Error(422, f... | explode_data.jsonl/82185 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 196
} | [
2830,
3393,
14812,
1454,
24684,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1373,
7121,
1155,
340,
28236,
1669,
1532,
7,
3798,
37790,
28236,
6141,
39949,
13275,
18552,
15842,
526,
11,
1848,
1465,
11,
272,
9608,
8,
1465,
341,
197,
10202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNotCondition(t *testing.T) {
cases := []struct {
name string
input ConditionBuilder
expectedNode exprNode
err condErrorMode
}{
{
name: "basic method not",
input: Name("foo").Equal(Value(5)).Not(),
expectedNode: exprNode{
children: []exprNode{
{
child... | explode_data.jsonl/27675 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1046
} | [
2830,
3393,
2623,
10547,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
22427,
286,
15180,
3297,
198,
197,
42400,
1955,
15169,
1955,
198,
197,
9859,
688,
9756,
1454,
3636,
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... | 6 |
func TestVirtualService_SyncReset(t *testing.T) {
g := NewGomegaWithT(t)
o := processing.ProcessorOptions{
DomainSuffix: "cluster.local",
MeshConfig: meshConfig(),
}
xform, src, acc := setupVS(g, o)
xform.Start()
defer xform.Stop()
src.Handlers.Handle(event.FullSyncFor(collections.K8SExtensionsV1Beta1I... | explode_data.jsonl/71124 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
33026,
1860,
1098,
1721,
14828,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
692,
22229,
1669,
8692,
29012,
269,
3798,
515,
197,
10957,
3121,
40177,
25,
330,
18855,
11033,
756,
197,
9209,
4288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestService_CreateAccount(t *testing.T) {
type args struct {
req *request.CreateAccount
}
tests := []struct {
name string
args args
DBErr bool
wantErr bool
}{
{
"get password requirement error",
args{&request.CreateAccount{
Email: "test@pinpoint.com",
Name: "test",
... | explode_data.jsonl/22353 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 633
} | [
2830,
3393,
1860,
34325,
7365,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
24395,
353,
2035,
7251,
7365,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
198,
197,
45409,
77... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetLocalConfig(t *testing.T) {
assert.Equal(t, configFileDefaultPath, getLocalConfigPath(), "read from default connection config path if environment variable is not set")
os.Setenv(configFilePathEnvironmentVariable, "dir/custom_path.json")
assert.Equal(t, "dir/custom_path.json", getLocalConfigPath())
} | explode_data.jsonl/80396 | {
"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,
1949,
7319,
2648,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
1155,
11,
92770,
3675,
1820,
11,
633,
7319,
2648,
1820,
1507,
330,
878,
504,
1638,
3633,
2193,
1815,
421,
4573,
3890,
374,
537,
738,
5130,
25078,
4202,
3160,
875... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChecksumVerificationFailure(t *testing.T) {
t.Parallel()
challenge, _ := hex.DecodeString(testChallengeFromAcceptor)
var wt WrapToken
wt.Unmarshal(challenge, true)
// Test a failure with the correct key but wrong keyusage:
challengeOk, cErr := wt.Verify(getSessionKey(), initiatorSeal)
assert.NotNil(t, ... | explode_data.jsonl/54233 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 307
} | [
2830,
3393,
73190,
62339,
17507,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
23049,
15832,
11,
716,
1669,
12371,
56372,
703,
8623,
62078,
3830,
11654,
15349,
340,
2405,
40473,
42187,
3323,
198,
6692,
83,
38097,
7520,
15832,
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 TestBlocksGet_Integration(t *testing.T) {
t.Parallel()
t.Run("Get Block", func(t *testing.T) {
t.Parallel()
state, s := setupIntegration()
srvAcc, _ := state.EmulatorServiceAccount()
block, blockEvents, collection, err := s.Blocks.GetBlock("latest", "", true)
assert.NoError(t, err)
assert.Nil(t, ... | explode_data.jsonl/34028 | {
"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,
29804,
1949,
32054,
17376,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3244,
16708,
445,
1949,
8362,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3244,
41288,
7957,
2822,
197,
24291,
11,
274,
1669,
6505,
52464,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTSort(t *testing.T) {
g := TxGraph{}
g["tx3"] = []string{"tx1", "tx2"}
g["tx2"] = []string{"tx1", "tx0"}
g["tx1"] = []string{"tx0"}
output, cylic, _ := TopSortDFS(g)
t.Log(output)
if !reflect.DeepEqual(output, []string{"tx3", "tx2", "tx1", "tx0"}) {
t.Fatal("sort fail")
}
if cylic {
t.Fatal("sort ... | explode_data.jsonl/77672 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 164
} | [
2830,
3393,
9951,
371,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
39850,
11212,
16094,
3174,
1183,
3998,
18,
1341,
284,
3056,
917,
4913,
3998,
16,
497,
330,
3998,
17,
16707,
3174,
1183,
3998,
17,
1341,
284,
3056,
917,
4913,
3998,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestMeanDeviationIndicator(t *testing.T) {
ts := mockTimeSeriesFl(1, 2, 7, 6, 3, 4, 5, 11, 3, 0, 9)
meanDeviation := NewMeanDeviationIndicator(NewClosePriceIndicator(ts), 5)
decimalEquals(t, 2.4444, meanDeviation.Calculate(2))
decimalEquals(t, 2.5, meanDeviation.Calculate(3))
decimalEquals(t, 2.16, meanDevi... | explode_data.jsonl/81304 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 281
} | [
2830,
3393,
18783,
14592,
7101,
19523,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
7860,
1462,
25544,
3882,
7,
16,
11,
220,
17,
11,
220,
22,
11,
220,
21,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
16,
16,
11,
220,
18,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAdmin_DeleteUser(t *testing.T) {
ts, srv, teardown := startupT(t)
defer teardown()
c1 := store.Comment{Text: "test test #1", Orig: "o test test #1", User: store.User{ID: "id1", Name: "name"},
Locator: store.Locator{SiteID: "radio-t", URL: "https://radio-t.com/blah"}}
c2 := store.Comment{Text: "test test... | explode_data.jsonl/51824 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 986
} | [
2830,
3393,
7210,
57418,
1474,
1155,
353,
8840,
836,
8,
341,
57441,
11,
43578,
11,
49304,
1669,
20567,
51,
1155,
340,
16867,
49304,
2822,
1444,
16,
1669,
3553,
56730,
90,
1178,
25,
330,
1944,
1273,
671,
16,
497,
45498,
25,
330,
78,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOutliers(t *testing.T) {
file, err := os.Open("./test/stability.csv")
assert.Nil(t, err)
reader := bufio.NewReader(file)
data := csv.NewReader(reader)
records, err := data.ReadAll()
assert.Nil(t, err)
// outliers for all records
outliers, err := Outliers(records, "value")
assert.Nil(t, err)
assert.... | explode_data.jsonl/29805 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 399
} | [
2830,
3393,
2662,
40376,
1155,
353,
8840,
836,
8,
341,
17661,
11,
1848,
1669,
2643,
12953,
13988,
1944,
14272,
2897,
11219,
1138,
6948,
59678,
1155,
11,
1848,
692,
61477,
1669,
96917,
68587,
4866,
340,
8924,
1669,
13147,
68587,
21987,
340... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSetCustomCloudProfileEnvironmentDefaults(t *testing.T) {
location := "testlocation"
cs := ContainerService{
Location: location,
Properties: &Properties{
CustomCloudProfile: &CustomCloudProfile{
IdentitySystem: "adfs",
PortalURL: "https://portal.testlocation.contoso.com/",
},
},
}
... | explode_data.jsonl/33891 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2159
} | [
2830,
3393,
1649,
10268,
16055,
8526,
12723,
16273,
1155,
353,
8840,
836,
8,
341,
53761,
1669,
330,
1944,
2527,
698,
71899,
1669,
9678,
1860,
515,
197,
197,
4707,
25,
3728,
345,
197,
197,
7903,
25,
609,
7903,
515,
298,
6258,
1450,
160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSessionCookieShouldBeAdded(t *testing.T) {
// Setup test to get a session cookie
w, r, next := getDefaultHandlerMocks()
var responseHeader http.Header = make(map[string][]string)
w.mock.On("Header").Return(responseHeader)
handler := server.SessionCookieHandler(next, cookieName, cookieLifeTime)
handler.Se... | explode_data.jsonl/29911 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 437
} | [
2830,
3393,
5283,
20616,
14996,
3430,
19337,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
1273,
311,
633,
264,
3797,
12544,
198,
6692,
11,
435,
11,
1790,
1669,
69106,
3050,
72577,
741,
2405,
2033,
4047,
1758,
15753,
284,
1281,
9147,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateSubscriptionBadRequest(t *testing.T) {
ts := httptest.NewServer(
http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
if strings.HasSuffix(r.URL.Path, "/v2") {
apiResourcesHandler(w, r)
} else {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http... | explode_data.jsonl/64664 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 327
} | [
2830,
3393,
4021,
33402,
46015,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
5475,
1006,
197,
28080,
89164,
1006,
298,
29244,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
571,
743,
9069,
16152,
40177,
2601,
208... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPlugin_onClosePluginHandler(t *testing.T) {
t.Parallel()
msg := client.ClosePluginMessage{
PluginID: "testPlugin",
}
var called bool = false
handler := func(event client.ClosePluginMessage) {
called = true
}
p := &Plugin{
ID: "testPlugin",
}
p.onClosePluginHandler(handler)(msg)
if !called... | explode_data.jsonl/26489 | {
"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,
11546,
4470,
7925,
11546,
3050,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
21169,
1669,
2943,
10421,
11546,
2052,
515,
197,
197,
11546,
915,
25,
330,
1944,
11546,
756,
197,
630,
2405,
2598,
1807,
284,
895,
271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeviceService_PinRelease_ID(t *testing.T) {
// Given
client, mux, cleanup := newFixture()
defer cleanup()
entityID := int64(112233)
releaseID := int64(14332)
mux.HandleFunc(
"/"+odata.EntityURL(deviceBasePath, strconv.FormatInt(entityID, 10)),
func(w http.ResponseWriter, r *http.Request) {
testMet... | explode_data.jsonl/46819 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
6985,
1860,
35453,
16077,
3450,
1155,
353,
8840,
836,
8,
341,
197,
322,
16246,
198,
25291,
11,
59807,
11,
21290,
1669,
501,
18930,
741,
16867,
21290,
741,
52987,
915,
1669,
526,
21,
19,
7,
16,
16,
17,
17,
18,
18,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestJoiner_ErrReferenceLength(t *testing.T) {
store := mock.NewStorer()
_, _, err := joiner.New(context.Background(), store, swarm.ZeroAddress)
if !errors.Is(err, storage.ErrReferenceLength) {
t.Fatalf("expected ErrReferenceLength %x but got %v", swarm.ZeroAddress, err)
}
} | explode_data.jsonl/51982 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
12292,
261,
93623,
8856,
4373,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
7860,
7121,
623,
14827,
741,
197,
6878,
8358,
1848,
1669,
5138,
261,
7121,
5378,
19047,
1507,
3553,
11,
60841,
35489,
4286,
692,
743,
753,
7650,
4506,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewNetworkFailure1(t *testing.T) {
c := mockBadChannelProvider("mychannel", 2)
gw := &Gateway{}
_, err := newNetwork(gw, c)
if err == nil {
t.Fatal("Should have failed to create network")
}
} | explode_data.jsonl/39452 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
3564,
12320,
17507,
16,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
7860,
17082,
9629,
5179,
445,
2408,
10119,
497,
220,
17,
692,
3174,
86,
1669,
609,
40709,
31483,
197,
6878,
1848,
1669,
501,
12320,
3268,
86,
11,
272,
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
] | 2 |
func TestGetDepositAddress(t *testing.T) {
if areTestAPIKeysSet() {
_, err := p.GetDepositAddress(currency.DASH, "")
if err != nil {
t.Error("Test Failed - GetDepositAddress()", err)
}
} else {
_, err := p.GetDepositAddress(currency.DASH, "")
if err == nil {
t.Error("Test Failed - GetDepositAddress()"... | explode_data.jsonl/23578 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 136
} | [
2830,
3393,
1949,
78982,
4286,
1155,
353,
8840,
836,
8,
341,
743,
525,
2271,
7082,
8850,
1649,
368,
341,
197,
197,
6878,
1848,
1669,
281,
2234,
78982,
4286,
90475,
909,
9537,
11,
14676,
197,
743,
1848,
961,
2092,
341,
298,
3244,
6141,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatCopyTo(t *testing.T) {
mat := NewMatWithSize(101, 102, MatTypeCV8U)
defer mat.Close()
copy := NewMat()
defer copy.Close()
mat.CopyTo(©)
if copy.Rows() != 101 {
t.Errorf("Mat copy incorrect row count: %v\n", copy.Rows())
}
if copy.Cols() != 102 {
t.Errorf("Mat copy incorrect col count: %v\n... | explode_data.jsonl/81690 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
11575,
12106,
1249,
1155,
353,
8840,
836,
8,
341,
59874,
1669,
1532,
11575,
2354,
1695,
7,
16,
15,
16,
11,
220,
16,
15,
17,
11,
6867,
929,
19589,
23,
52,
340,
16867,
5517,
10421,
741,
49124,
1669,
1532,
11575,
741,
16867... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestBatchPlaceCancelOrders(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test, either api keys or manipulaterealorders isnt set correctly")
}
var temp []PlaceBatch
o := PlaceBatch{
MarketID: BTCAUD,
Amount: 11000,
Price: 1,
OrderType: ord... | explode_data.jsonl/33170 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
21074,
17371,
9269,
24898,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
1369,
753,
4814,
92876,
6334,
12768,
24898,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
11,
2987,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBestSpeedMatch(t *testing.T) {
t.Parallel()
cases := []struct {
previous, current []byte
t, s, want int32
}{{
previous: []byte{0, 0, 0, 1, 2},
current: []byte{3, 4, 5, 0, 1, 2, 3, 4, 5},
t: -3,
s: 3,
want: 6,
}, {
previous: []byte{0, 0, 0, 1, 2},
current: []byte... | explode_data.jsonl/81415 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1553
} | [
2830,
3393,
14470,
11056,
8331,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
1444,
2264,
1669,
3056,
1235,
341,
197,
197,
19702,
11,
1482,
3056,
3782,
198,
197,
3244,
11,
274,
11,
1366,
286,
526,
18,
17,
198,
197,
15170,
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 TestSecretEdges(t *testing.T) {
sa := &kapi.ServiceAccount{}
sa.Namespace = "ns"
sa.Name = "shultz"
sa.Secrets = []kapi.ObjectReference{{Name: "i-know-nothing"}, {Name: "missing"}}
secret1 := &kapi.Secret{}
secret1.Namespace = "ns"
secret1.Name = "i-know-nothing"
pod := &kapi.Pod{}
pod.Namespace = "ns"
... | explode_data.jsonl/53628 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 550
} | [
2830,
3393,
19773,
41122,
1155,
353,
8840,
836,
8,
341,
1903,
64,
1669,
609,
74,
2068,
13860,
7365,
16094,
1903,
64,
46011,
284,
330,
4412,
698,
1903,
64,
2967,
284,
330,
927,
54426,
698,
1903,
64,
74779,
82,
284,
3056,
74,
2068,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreate(t *testing.T) {
t.Parallel()
ctx, _ := v8go.NewContext(nil)
val, err := ctx.Create("test-string")
if err != nil {
t.Errorf("Create string should not error but got %v", err)
} else if val.String() != "test-string" {
t.Errorf("Create string expected %q but got %q", "test-string", val.String())
}... | explode_data.jsonl/73932 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 361
} | [
2830,
3393,
4021,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
11,
716,
1669,
348,
23,
3346,
7121,
1972,
27907,
340,
19302,
11,
1848,
1669,
5635,
7251,
445,
1944,
30881,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
1308... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSearchAllTeams(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
oTeam := th.BasicTeam
oTeam.AllowOpenInvite = true
updatedTeam, err := th.App.UpdateTeam(oTeam)
require.Nil(t, err, err)
oTeam.UpdateAt = updatedTeam.UpdateAt
pTeam := &model.Team{DisplayName: "PName", Name: GenerateTestTe... | explode_data.jsonl/70717 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 786
} | [
2830,
3393,
5890,
2403,
60669,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
22229,
14597,
1669,
270,
48868,
14597,
198,
22229,
14597,
29081,
5002,
93540,
284,
830,
271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClient_Delete_Item(t *testing.T) {
dat, err := getTestStructure()
require.NoError(t, err)
cfg := config.Spec{
Name: "azure-storage-files",
Kind: "azure.storage.files",
Properties: map[string]string{
"storage_access_key": dat.storageAccessKey,
"storage_account": dat.storageAccount,
},
}
te... | explode_data.jsonl/25069 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 856
} | [
2830,
3393,
2959,
57418,
27518,
1155,
353,
8840,
836,
8,
341,
2698,
266,
11,
1848,
1669,
633,
2271,
22952,
741,
17957,
35699,
1155,
11,
1848,
340,
50286,
1669,
2193,
36473,
515,
197,
21297,
25,
330,
39495,
62795,
46048,
756,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestBoolColumnValue_AsDecimal(t *testing.T) {
tests := []struct {
name string
b *BoolColumnValue
want decimal.Decimal
wantErr bool
}{
{
name: "true",
b: NewBoolColumnValue(true).(*BoolColumnValue),
want: decimal.New(1, 0),
},
{
name: "false",
b: NewBoolColumnValue(f... | explode_data.jsonl/73241 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 360
} | [
2830,
3393,
11233,
2933,
1130,
62741,
11269,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
2233,
981,
353,
11233,
2933,
1130,
198,
197,
50780,
262,
12122,
40675,
198,
197,
50780,
7747,
1807,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoveAuditorByUsernameAndOrigin(t *testing.T) {
Convey("Remove auditor by username", t, func() {
expectedBody := `{"origin":"ldap","username":"user-name"}`
setup(MockRoute{"POST", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/auditors/remove", []string{""}, "", 204, "", &expectedBody}, t)
def... | explode_data.jsonl/4458 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 290
} | [
2830,
3393,
13021,
52949,
1919,
91519,
3036,
13298,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
13021,
53306,
553,
5934,
497,
259,
11,
2915,
368,
341,
197,
42400,
5444,
1669,
1565,
4913,
8611,
3252,
38665,
2198,
5113,
3252,
872,
114... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHealthCheckExtensionPortAlreadyInUse(t *testing.T) {
endpoint := testutil.GetAvailableLocalAddress(t)
// This needs to be ":port" because health checks also tries to connect to ":port".
// To avoid the pop-up "accept incoming network connections" health check should be changed
// to accept an address.
ln... | explode_data.jsonl/11621 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
14542,
3973,
12049,
7084,
38370,
641,
10253,
1155,
353,
8840,
836,
8,
341,
6246,
2768,
1669,
1273,
1314,
2234,
16485,
7319,
4286,
1155,
692,
197,
322,
1096,
3880,
311,
387,
13022,
403,
1,
1576,
2820,
12341,
1083,
16297,
311,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUser_GetMembers(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
org := AssertExistsAndLoadBean(t, &User{ID: 3}).(*User)
assert.NoError(t, org.GetMembers())
if assert.Len(t, org.Members, 3) {
assert.Equal(t, int64(2), org.Members[0].ID)
assert.Equal(t, int64(28), org.Members[1].ID)
assert.Equ... | explode_data.jsonl/71050 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 157
} | [
2830,
3393,
1474,
13614,
24371,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
2271,
5988,
2398,
87625,
1669,
5319,
15575,
3036,
5879,
10437,
1155,
11,
609,
1474,
90,
915,
25,
220,
18,
16630,
4071,
1474,
340,
6948,
35699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestIsOnlineDDLUUID(t *testing.T) {
for i := 0; i < 20; i++ {
uuid, err := CreateOnlineDDLUUID()
assert.NoError(t, err)
assert.True(t, IsOnlineDDLUUID(uuid))
}
tt := []string{
"a0638f6b_ec7b_11ea_9bf8_000d3a9b8a9a_", // suffix invalid
"_a0638f6b_ec7b_11ea_9bf8_000d3a9b8a9a", // prefix invalid
"a0638... | explode_data.jsonl/42824 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 307
} | [
2830,
3393,
3872,
19598,
4103,
23236,
6463,
1155,
353,
8840,
836,
8,
341,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
17,
15,
26,
600,
1027,
341,
197,
10676,
2423,
11,
1848,
1669,
4230,
19598,
4103,
23236,
6463,
741,
197,
6948,
356... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestURLMultiArrayStringMultiEmpty(t *testing.T) {
client := newQueriesClient()
result, err := client.ArrayStringMultiEmpty(context.Background(), &QueriesArrayStringMultiEmptyOptions{
ArrayQuery: []string{},
})
if err != nil {
t.Fatalf("ArrayStringMultiEmpty: %v", err)
}
if s := result.RawResponse.StatusC... | explode_data.jsonl/72650 | {
"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,
3144,
20358,
1857,
703,
20358,
3522,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
55261,
2959,
741,
9559,
11,
1848,
1669,
2943,
8114,
703,
20358,
3522,
5378,
19047,
1507,
609,
55261,
1857,
703,
20358,
3522,
3798,
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... | 3 |
func TestShouldEnableIPv6(t *testing.T) {
task := &Task{
ENIs: []*apieni.ENI{getTestENI()},
}
assert.True(t, task.shouldEnableIPv6())
task.ENIs[0].IPV6Addresses = nil
assert.False(t, task.shouldEnableIPv6())
} | explode_data.jsonl/37272 | {
"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,
14996,
11084,
58056,
21,
1155,
353,
8840,
836,
8,
341,
49115,
1669,
609,
6262,
515,
197,
197,
953,
3872,
25,
29838,
2068,
33129,
52746,
40,
90,
455,
2271,
953,
40,
78108,
197,
532,
6948,
32443,
1155,
11,
3383,
15507,
11084... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSpacesAllowedInTags(t *testing.T) {
var args struct {
Foo []string `arg:"--foo, -f, separate, required, help:quite nice really"`
}
err := parse("--foo one -f=two --foo=three -f four", &args)
require.NoError(t, err)
assert.Equal(t, []string{"one", "two", "three", "four"}, args.Foo)
} | explode_data.jsonl/13075 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
71324,
35382,
641,
15930,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
12727,
2624,
3056,
917,
1565,
858,
2974,
313,
7975,
11,
481,
69,
11,
8651,
11,
2567,
11,
1492,
25,
83170,
6419,
2167,
8805,
197,
630,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPipeline(t *testing.T) {
conf := &Config{
MaxSize: 3,
Interval: xtime.Duration(time.Millisecond * 20),
Buffer: 3,
Worker: 10,
}
type recv struct {
mirror string
ch int
values map[string][]interface{}
}
var runs []recv
do := func(c context.Context, ch int, values map[string][]interf... | explode_data.jsonl/60831 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 745
} | [
2830,
3393,
34656,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
609,
2648,
515,
197,
197,
5974,
1695,
25,
220,
220,
18,
345,
197,
197,
10256,
25,
856,
1678,
33795,
9730,
71482,
353,
220,
17,
15,
1326,
197,
48424,
25,
256,
220,
18,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.