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 TestGettingAuthToken(t *testing.T) {
if !h.ConfigExists(cnfgPath) {
t.Skip("No auth config provided")
}
err := h.CheckAuth(
&AuthCnfg{},
cnfgPath,
[]string{"SiteURL", "TenantID", "ClientID", "CertPath", "CertPass"},
)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/80905 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
28655,
84708,
1155,
353,
8840,
836,
8,
341,
743,
753,
71,
10753,
15575,
92456,
4817,
1820,
8,
341,
197,
3244,
57776,
445,
2753,
4166,
2193,
3897,
1138,
197,
532,
9859,
1669,
305,
10600,
5087,
1006,
197,
197,
5,
5087,
34,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestBase(t *testing.T) {
tests := []struct {
loc, lang string
conf Confidence
}{
{"und", "en", Low},
{"x-abc", "und", No},
{"en", "en", Exact},
{"und-Cyrl", "ru", High},
// If a region is not included, the official language should be English.
{"und-US", "en", High},
// TODO: not-explicitly... | explode_data.jsonl/15832 | {
"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,
3978,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
71128,
11,
8688,
914,
198,
197,
67850,
414,
86324,
198,
197,
59403,
197,
197,
4913,
1241,
497,
330,
268,
497,
12041,
1583,
197,
197,
4913,
87,
12,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestPrepareSyntax(t *testing.T) {
defer leaktest.AfterTest(t)()
s, _, _ := serverutils.StartServer(t, base.TestServerArgs{})
defer s.Stopper().Stop()
pgURL, cleanupFn := sqlutils.PGUrl(t, s.ServingAddr(), "TestPrepareSyntax", url.User(security.RootUser))
defer cleanupFn()
db, err := gosql.Open("postgres",... | explode_data.jsonl/15532 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 395
} | [
2830,
3393,
50590,
33890,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
1903,
11,
8358,
716,
1669,
3538,
6031,
12101,
5475,
1155,
11,
2331,
8787,
5475,
4117,
37790,
16867,
274,
7758,
18487,
1005,
10674,
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... | 8 |
func TestWithTargetURLsValid(t *testing.T) {
ctx := setupTestContext("test", "Org1MSP")
opt := WithTargetEndpoints("127.0.0.1:7050")
mockConfig := &fcmocks.MockConfig{}
pConfig1 := fab.PeerConfig{
URL: "127.0.0.1:7050",
}
npConfig1 := fab.NetworkPeer{
PeerConfig: pConfig1,
MSPID: "MYMSP",
}
pConf... | explode_data.jsonl/64978 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 416
} | [
2830,
3393,
2354,
6397,
3144,
82,
4088,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6505,
2271,
1972,
445,
1944,
497,
330,
42437,
16,
44,
4592,
1138,
64838,
1669,
3085,
6397,
80786,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_gatherOptions(t *testing.T) {
cases := []struct {
name string
args map[string]string
del sets.String
expected func(*options)
err bool
}{
{
name: "minimal flags work",
},
{
name: "explicitly set --config-path",
args: map[string]string{
"--config-path": "/random/... | explode_data.jsonl/45435 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1029
} | [
2830,
3393,
1889,
1856,
3798,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
31215,
257,
2415,
14032,
30953,
198,
197,
69509,
414,
7289,
6431,
198,
197,
42400,
2915,
4071,
2875,
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... | 1 |
func TestParseSourcemaps(t *testing.T) {
fileBytes, err := loader.LoadDataAsBytes("../testdata/sourcemap/bundle.js.map")
assert.NoError(t, err)
parser, err := s.Parse("", fileBytes)
assert.NoError(t, err)
source, _, _, _, ok := parser.Source(1, 9)
assert.True(t, ok)
assert.Equal(t, "webpack:///bundle.js", sourc... | explode_data.jsonl/41731 | {
"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,
14463,
50,
96831,
2625,
1155,
353,
8840,
836,
8,
341,
17661,
7078,
11,
1848,
1669,
16047,
13969,
1043,
2121,
7078,
17409,
92425,
2687,
413,
66,
42040,
3470,
4206,
2857,
4770,
1138,
6948,
35699,
1155,
11,
1848,
340,
55804,
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 TestServer_Rejects_Too_Many_Streams(t *testing.T) {
const testPath = "/some/path"
inHandler := make(chan uint32)
leaveHandler := make(chan bool)
st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
id := w.(*responseWriter).rws.stream.id
inHandler <- id
if id == 1+(defaultMaxStreams+1... | explode_data.jsonl/71675 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 765
} | [
2830,
3393,
5475,
50693,
583,
82,
1139,
2624,
1245,
3767,
62,
73576,
1155,
353,
8840,
836,
8,
341,
4777,
1273,
1820,
284,
3521,
14689,
50976,
1837,
17430,
3050,
1669,
1281,
35190,
2622,
18,
17,
340,
197,
21510,
3050,
1669,
1281,
35190,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefaultByteBuf_Reset(t *testing.T) {
buf := EmptyByteBuf()
buf.WriteUInt64(math.MaxUint64)
buf.Reset()
assert.EqualValues(t, 0, buf.ReadableBytes())
} | explode_data.jsonl/1990 | {
"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,
3675,
7153,
15064,
67771,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
22228,
7153,
15064,
741,
26398,
4073,
18777,
21,
19,
37270,
14535,
21570,
21,
19,
340,
26398,
36660,
741,
6948,
12808,
6227,
1155,
11,
220,
15,
11,
6607,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_replaceCarriageReturn(t *testing.T) {
type args struct {
data map[string][]byte
logger logr.Logger
}
tests := []struct {
name string
args args
want map[string][]byte
}{
{
name: "Given a map with carriage return, carriage return is replaced with new line",
args: args{
data: map[stri... | explode_data.jsonl/45551 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 432
} | [
2830,
3393,
10633,
8852,
8775,
5598,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
8924,
256,
2415,
14032,
45725,
3782,
198,
197,
17060,
1487,
81,
12750,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
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... | 2 |
func TestRemoveBillingManagerByUsername(t *testing.T) {
Convey("Remove billing manager by username", t, func() {
expectedBody := `{"username":"user-name"}`
setup(MockRoute{"DELETE", "/v2/organizations/bc7b4caf-f4b8-4d85-b126-0729b9351e56/billing_managers", []string{""}, "", 204, "", &expectedBody}, t)
defer tear... | explode_data.jsonl/4459 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 283
} | [
2830,
3393,
13021,
82007,
2043,
91519,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
13021,
33531,
6645,
553,
5934,
497,
259,
11,
2915,
368,
341,
197,
42400,
5444,
1669,
1565,
4913,
5113,
3252,
872,
11494,
9207,
3989,
197,
84571,
6643... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkingDir(t *testing.T) {
runTest(t, "workdir", func(client *daptest.Client, fixture protest.Fixture) {
wd := os.TempDir()
// For Darwin `os.TempDir()` returns `/tmp` which is symlink to `/private/tmp`.
if runtime.GOOS == "darwin" {
wd = "/private/tmp"
}
runDebugSessionWithBPs(t, client, "launch... | explode_data.jsonl/17332 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 542
} | [
2830,
3393,
33978,
6184,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
1155,
11,
330,
1778,
3741,
497,
2915,
12805,
353,
91294,
1944,
11716,
11,
12507,
8665,
991,
12735,
8,
341,
197,
197,
6377,
1669,
2643,
65009,
6184,
741,
197,
197,
322... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReceiveTicket_InvalidTicket(t *testing.T) {
sender, b, v, ts, faceValue, winProb, sig := newRecipientFixtureOrFatal(t)
r := newRecipientOrFatal(t, RandAddress(), b, v, ts, faceValue, winProb)
params := r.TicketParams(sender)
// Test invalid ticket
ticket := newTicket(sender, params, 0)
// Config stub v... | explode_data.jsonl/44755 | {
"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,
14742,
34058,
62,
7928,
34058,
1155,
353,
8840,
836,
8,
341,
1903,
1659,
11,
293,
11,
348,
11,
10591,
11,
3579,
1130,
11,
3164,
36980,
11,
8366,
1669,
501,
74432,
18930,
2195,
62396,
1155,
340,
7000,
1669,
501,
74432,
2195... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegression2508(t *testing.T) {
if testing.Short() {
t.Logf("test disabled with -short")
return
}
w, err := NewWriter(ioutil.Discard, 1)
if err != nil {
t.Fatalf("NewWriter: %v", err)
}
buf := make([]byte, 1024)
for i := 0; i < 131072; i++ {
if _, err := w.Write(buf); err != nil {
t.Fatalf("wr... | explode_data.jsonl/81411 | {
"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,
45200,
17,
20,
15,
23,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
98954,
445,
1944,
8386,
448,
481,
8676,
1138,
197,
853,
198,
197,
532,
6692,
11,
1848,
1669,
1532,
6492,
1956,
30158,
909,
47560... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetSa(t *testing.T) {
assert := assert.New(t)
sa := e.getSa()
assert.Equal(reflect.TypeOf(sa), reflect.TypeOf(&corev1.ServiceAccount{}))
assert.Equal(sa.ObjectMeta.Name, e.namespace)
assert.Equal(sa.ObjectMeta.Namespace, e.namespace)
} | explode_data.jsonl/21316 | {
"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,
1949,
52279,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
1903,
64,
1669,
384,
670,
52279,
741,
6948,
12808,
13321,
767,
73921,
79910,
701,
8708,
73921,
2099,
98645,
16,
13860,
7365,
6257,
1171,
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 |
func TestValidateInspection(t *testing.T) {
testInspection := Inspection{
Type: "invalid",
SupplyChainItem: SupplyChainItem{
Name: "foo",
},
}
err := validateInspection(testInspection)
if err.Error() != "invalid Type value for inspection 'foo': should be "+
"'inspection'" {
t.Error("validateInspection ... | explode_data.jsonl/51764 | {
"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,
17926,
15474,
16076,
1155,
353,
8840,
836,
8,
341,
18185,
15474,
16076,
1669,
65946,
515,
197,
27725,
25,
330,
11808,
756,
197,
7568,
83923,
18837,
1234,
25,
29809,
18837,
1234,
515,
298,
21297,
25,
330,
7975,
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... | 4 |
func Test_newGetRequestWithContext(t *testing.T) {
tests := []struct {
name string
url string
key string
want *http.Request
err string
}{
{
name: "no_url",
err: "url cannot be an empty string",
},
{
name: "no_api_key",
url: "http://localhost/",
err: "apiKey cannot be an empty str... | explode_data.jsonl/76426 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 581
} | [
2830,
3393,
5921,
1949,
1900,
91101,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
19320,
220,
914,
198,
197,
23634,
220,
914,
271,
197,
50780,
353,
1254,
9659,
198,
197,
9859,
220,
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... | 5 |
func TestPodEphemeralContainersDisabled(t *testing.T) {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.EphemeralContainers, false)()
_, s, closeFn := framework.RunAnAPIServer(nil)
defer closeFn()
ns := framework.CreateTestingNamespace("pod-ephemeral-containers-disabl... | explode_data.jsonl/73846 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 776
} | [
2830,
3393,
23527,
36,
59941,
3253,
74632,
25907,
1155,
353,
8840,
836,
8,
341,
16867,
4565,
70,
266,
57824,
287,
4202,
13859,
42318,
16014,
2271,
1155,
11,
4094,
12753,
13275,
13859,
42318,
11,
4419,
5142,
59941,
3253,
74632,
11,
895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func Test_Vendo_Tree_Insert(test *testing.T) {
t := Tree{}
t.Put("foo/bar/baz")
t.Put("foo")
t.Put("foo/bang")
t.Put("foo/bar/baz/boo")
t.Put("fee")
expected := Tree{
"foo": Tree{
"bar": Tree{
"baz": Tree{
"boo": Tree{},
},
},
"bang": Tree{},
},
"fee": Tree{},
}
if !reflect.DeepEqua... | explode_data.jsonl/50300 | {
"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,
2334,
8691,
90770,
76417,
8623,
353,
8840,
836,
8,
341,
3244,
1669,
8942,
16094,
3244,
39825,
445,
7975,
49513,
3470,
1370,
1138,
3244,
39825,
445,
7975,
1138,
3244,
39825,
445,
7975,
3470,
524,
1138,
3244,
39825,
445,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestExtendedMasterSecret(t *testing.T) {
// Check for leaking routines
report := test.CheckRoutines(t)
defer report()
tests := map[string]struct {
clientCfg *Config
serverCfg *Config
expectedClientErr error
expectedServerErr error
}{
"Request_Request_ExtendedMasterSecret": {
clie... | explode_data.jsonl/40937 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1556
} | [
2830,
3393,
53190,
18041,
19773,
1155,
353,
8840,
836,
8,
341,
197,
322,
4248,
369,
51829,
29497,
198,
69931,
1669,
1273,
10600,
49,
28628,
1155,
340,
16867,
1895,
2822,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
25291,
42467,
260,
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 TestDeleteSnapshot(t *testing.T) {
testCases := []struct {
name string
testFunc func(t *testing.T)
}{
{
name: "Snapshot ID missing",
testFunc: func(t *testing.T) {
req := &csi.DeleteSnapshotRequest{}
expectedErr := status.Error(codes.InvalidArgument, "Snapshot ID must be provided")
d... | explode_data.jsonl/59390 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1266
} | [
2830,
3393,
6435,
15009,
1155,
353,
8840,
836,
8,
1476,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
18185,
9626,
2915,
1155,
353,
8840,
836,
340,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
15009,
3034,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrorServer(t *testing.T) {
exec := testexecutor.NewError()
t.Run("get resolver error in AroundResponses", func(t *testing.T) {
var errors1 gqlerror.List
var errors2 gqlerror.List
exec.AroundResponses(func(ctx context.Context, next graphql.ResponseHandler) *graphql.Response {
resp := next(ctx)
e... | explode_data.jsonl/79117 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
1454,
5475,
1155,
353,
8840,
836,
8,
341,
67328,
1669,
1273,
80787,
7121,
1454,
2822,
3244,
16708,
445,
455,
36220,
1465,
304,
32816,
70743,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
2405,
5975,
16,
53045,
841,
5814,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImageRef_RemoveOrientation__NoEXIF(t *testing.T) {
Startup(nil)
image, err := NewImageFromFile(resources + "png-24bit.png")
require.NoError(t, err)
defer image.Close()
err = image.RemoveOrientation()
require.NoError(t, err)
assert.Equal(t, 0, image.GetOrientation())
} | explode_data.jsonl/38832 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
1906,
3945,
66843,
22332,
563,
2753,
3257,
2773,
1155,
353,
8840,
836,
8,
341,
197,
39076,
27907,
692,
31426,
11,
1848,
1669,
1532,
1906,
43633,
52607,
488,
330,
14066,
12,
17,
19,
4489,
3508,
1138,
17957,
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 TestCrossZone(t *testing.T) {
runTestAWS(t, "crosszone.example.com", "api_elb_cross_zone", "v1alpha2", false, 1, true, false, nil)
} | explode_data.jsonl/17487 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 57
} | [
2830,
3393,
28501,
15363,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
36136,
1155,
11,
330,
28842,
8684,
7724,
905,
497,
330,
2068,
21602,
65,
35284,
28692,
497,
330,
85,
16,
7141,
17,
497,
895,
11,
220,
16,
11,
830,
11,
895,
11,
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 |
func TestConverterWithMAC(t *testing.T) {
key := converter.Key{
Kind: "Node",
Namespace: "foo",
Name: "awesome-node",
}
config := &converter.Config{
Tenant: "MyTenant",
}
c := &nodeConverter{}
rs, subs, err := c.Convert(key, nodeWithMAC, config)
assert.Nil(t, err)
assert.Len(t, rs, 9)
assert.... | explode_data.jsonl/69790 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 262
} | [
2830,
3393,
14920,
2354,
25788,
1155,
353,
8840,
836,
8,
341,
23634,
1669,
27058,
9610,
515,
197,
197,
10629,
25,
414,
330,
1955,
756,
197,
90823,
25,
330,
7975,
756,
197,
21297,
25,
414,
330,
16875,
39054,
756,
197,
532,
25873,
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 TestIssue20223(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t")
tk.MustExec("CREATE TABLE t (" +
"id int(10) unsigned NOT NULL AUTO_INCREMENT," +
"type tinyint(4) NOT NULL," +
"crea... | explode_data.jsonl/65542 | {
"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,
42006,
17,
15,
17,
17,
18,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_collection_send(t *testing.T) {
type fields struct {
method string
endpoint string
values *url.Values
body io.Reader
}
type args struct {
session session.ServiceFormatter
value interface{}
}
tests := []struct {
name string
fields fields
args args
wantErr bool
}{
{
... | explode_data.jsonl/64164 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2390
} | [
2830,
3393,
25019,
13565,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
42257,
256,
914,
198,
197,
6246,
2768,
914,
198,
197,
45939,
256,
353,
1085,
35145,
198,
197,
35402,
257,
6399,
47431,
198,
197,
532,
13158,
2827,
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... | 5 |
func TestRepository_GetAffiliateExtra(t *testing.T) {
db, err := sqlx.Connect("pgx", "host=localhost port=5432 user=postgres dbname=juno password=postgres sslmode=disable")
if err != nil {
t.Fatal(err)
}
// Create the codec
codec := simapp.MakeTestEncodingConfig()
type args struct {
accountFilter filter.Fil... | explode_data.jsonl/62715 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 809
} | [
2830,
3393,
4624,
13614,
25841,
34850,
11612,
1155,
353,
8840,
836,
8,
341,
20939,
11,
1848,
1669,
5704,
87,
43851,
445,
3517,
87,
497,
330,
3790,
84551,
2635,
28,
20,
19,
18,
17,
1196,
28,
43070,
83492,
45612,
16311,
3552,
28,
43070,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSelectWithArrayInput(t *testing.T) {
DB.Save(&User{Name: "select_with_array", Age: 42})
var user User
DB.Select([]string{"name", "age"}).Where("age = 42 AND name = ?", "select_with_array").First(&user)
if user.Name != "select_with_array" || user.Age != 42 {
t.Errorf("Should have selected both age and n... | explode_data.jsonl/48709 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
3379,
2354,
1857,
2505,
1155,
353,
8840,
836,
8,
341,
45409,
13599,
2099,
1474,
63121,
25,
330,
1742,
6615,
3858,
497,
13081,
25,
220,
19,
17,
8824,
2405,
1196,
2657,
198,
45409,
14752,
10556,
917,
4913,
606,
497,
330,
424... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAgent_Checks(t *testing.T) {
t.Parallel()
a := NewTestAgent(t.Name(), "")
defer a.Shutdown()
chk1 := &structs.HealthCheck{
Node: a.Config.NodeName,
CheckID: "mysql",
Name: "mysql",
Status: api.HealthPassing,
}
a.State.AddCheck(chk1, "")
req, _ := http.NewRequest("GET", "/v1/agent/checks... | explode_data.jsonl/33592 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 279
} | [
2830,
3393,
16810,
28188,
82,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
1669,
1532,
2271,
16810,
1155,
2967,
1507,
14676,
16867,
264,
10849,
18452,
2822,
23049,
74,
16,
1669,
609,
1235,
82,
74980,
3973,
515,
197,
3021... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRetrievingNumberOfPdfPage(t *testing.T) {
pdf := setupDefaultA4PDF(t)
if pdf.GetNumberOfPages() != 0 {
t.Error("Invalid starting number of pages, should be 0")
return
}
pdf.AddPage()
bytesOfImg, err := ioutil.ReadFile("./test/res/gopher01.jpg")
if err != nil {
t.Error(err)
return
}
imgH, err ... | explode_data.jsonl/60942 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 368
} | [
2830,
3393,
12020,
67704,
40619,
67596,
2665,
1155,
353,
8840,
836,
8,
341,
3223,
2940,
1669,
6505,
3675,
32,
19,
23424,
1155,
340,
743,
12782,
2234,
40619,
17713,
368,
961,
220,
15,
341,
197,
3244,
6141,
445,
7928,
5916,
1372,
315,
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... | 7 |
func TestLog_run_not_found(t *testing.T) {
pr := []*v1alpha1.PipelineRun{
tb.PipelineRun("output-pipeline-1",
tb.PipelineRunNamespace("ns"),
tb.PipelineRunLabel("tekton.dev/pipeline", "output-pipeline-1"),
tb.PipelineRunStatus(
tb.PipelineRunStatusCondition(apis.Condition{
Status: corev1.ConditionF... | explode_data.jsonl/14857 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 499
} | [
2830,
3393,
2201,
14007,
7913,
21480,
1155,
353,
8840,
836,
8,
341,
25653,
1669,
29838,
85,
16,
7141,
16,
1069,
8790,
6727,
515,
197,
62842,
1069,
8790,
6727,
445,
3006,
2268,
8790,
12,
16,
756,
298,
62842,
1069,
8790,
6727,
22699,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestEtcdGetPod(t *testing.T) {
ctx := api.NewDefaultContext()
fakeClient := tools.NewFakeEtcdClient(t)
key, _ := makePodKey(ctx, "foo")
fakeClient.Set(key, runtime.EncodeOrDie(latest.Codec, &api.Pod{TypeMeta: api.TypeMeta{ID: "foo"}}), 0)
registry := NewTestEtcdRegistry(fakeClient)
pod, err := registry.GetPo... | explode_data.jsonl/8138 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
31860,
4385,
1949,
23527,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6330,
7121,
3675,
1972,
741,
1166,
726,
2959,
1669,
7375,
7121,
52317,
31860,
4385,
2959,
1155,
340,
23634,
11,
716,
1669,
1281,
23527,
1592,
7502,
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... | 3 |
func TestNewRsaPublicMarshalSucceeds(t *testing.T) {
// Setup
require.NotNil(t, rand.Reader)
rsaKey, err := rsa.GenerateKey(rand.Reader, 2048)
require.NoError(t, err)
require.Nil(t, rsaKey.Validate())
jwk, err := JwkFromPublicKey(rsaKey.Public(), []jose.KeyOps{jose.KeyOpsVerify}, nil)
require.NoError(t, err)
k,... | explode_data.jsonl/20929 | {
"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,
3564,
49,
9081,
12676,
55438,
50,
29264,
82,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
198,
17957,
93882,
1155,
11,
10382,
47431,
340,
41231,
64,
1592,
11,
1848,
1669,
68570,
57582,
1592,
37595,
47431,
11,
220,
17,
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 TestIsClear(t *testing.T) {
b := New(80)
for i := uint(0); i < b.Len(); i++ {
if !b.IsClear(i) {
t.Errorf("IsClear failed, should not have found bit #%d", i)
}
}
b.SetAll()
for i := uint(0); i < b.Len(); i++ {
if b.IsClear(i) {
t.Errorf("IsClear failed, should have found bit #%d", i)
}
}
} | explode_data.jsonl/73895 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 151
} | [
2830,
3393,
3872,
14008,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
1532,
7,
23,
15,
692,
2023,
600,
1669,
2622,
7,
15,
1215,
600,
366,
293,
65819,
2129,
600,
1027,
341,
197,
743,
753,
65,
4506,
14008,
1956,
8,
341,
298,
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... | 5 |
func TestLocalSync(t *testing.T) {
Given(t).
// we've got to use Helm as this uses kubeVersion
Path("helm").
When().
Create().
Then().
And(func(app *Application) {
FailOnErr(RunCli("app", "sync", app.Name, "--local", "testdata/helm"))
})
} | explode_data.jsonl/66687 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
7319,
12154,
1155,
353,
8840,
836,
8,
341,
9600,
2071,
1155,
4292,
197,
197,
322,
582,
3003,
2684,
311,
990,
62042,
438,
419,
5711,
80958,
5637,
198,
197,
69640,
445,
51899,
38609,
197,
197,
4498,
25829,
197,
75569,
25829,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKind(t *testing.T) {
cases := []struct {
name string
input string
expected string
}{
{
`kind from tagfield`,
`foo foo /^foo$/;" kind:v`,
`v`,
},
{
`kind from tagfield without "kind:" name`,
`foo foo /^foo$/;" v`,
`v`,
},
{
`no kind`,
`foo foo /^foo$/;"`,
``,
... | explode_data.jsonl/58899 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
10629,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
22427,
262,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
515,
298,
197,
63,
15314,
504,
4772,
2566,
12892,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDelete(t *testing.T) {
ctx := setupTest(t)
defer ctx.teardownTest()
// regular case
ctx.mockKV.mem["key"] = "data"
response, err := ctx.dataBroker.Delete("key")
Expect(err).ShouldNot(HaveOccurred())
Expect(response).To(BeTrue())
// error case
ctx.mockKV.shouldFail = true
response, err = ctx.dataBro... | explode_data.jsonl/29432 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 168
} | [
2830,
3393,
6435,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6505,
2271,
1155,
340,
16867,
5635,
31853,
37496,
2271,
2822,
197,
322,
5792,
1142,
198,
20985,
15068,
82707,
41493,
1183,
792,
1341,
284,
330,
691,
698,
21735,
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... | 1 |
func TestBinaryVarint(t *testing.T) {
var buf = make([]byte, 10)
var v uint64 = 128
var n int
n = binary.PutUvarint(buf, v)
var d uint64
var n2 int
d, n2 = binary.Uvarint(buf[:n])
if v != d {
t.Errorf("error %d != %d", v, d)
}
if n != n2 {
t.Errorf("error %d != %d", n, n2)
}
} | explode_data.jsonl/58550 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
21338,
3962,
396,
1155,
353,
8840,
836,
8,
341,
2405,
6607,
284,
1281,
10556,
3782,
11,
220,
16,
15,
340,
2405,
348,
2622,
21,
19,
284,
220,
16,
17,
23,
198,
2405,
308,
526,
198,
9038,
284,
7868,
39825,
52,
947,
396,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_CalculateRoundScore(t *testing.T) {
game.CalculateRoundScore(1)
// Check team score
var vidar db.Team
db.MySQL.Model(&db.Team{}).Where(&db.Team{Model: gorm.Model{ID: 1}}).Find(&vidar)
var e99 db.Team
db.MySQL.Model(&db.Team{}).Where(&db.Team{Model: gorm.Model{ID: 2}}).Find(&e99)
assert.Equal(t, 2020.0... | explode_data.jsonl/77173 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
920,
45441,
27497,
10570,
1155,
353,
8840,
836,
8,
1476,
30677,
727,
45441,
27497,
10570,
7,
16,
340,
197,
322,
4248,
2083,
5456,
198,
2405,
18127,
277,
2927,
65842,
198,
20939,
27054,
6688,
5659,
2099,
1999,
65842,
6257,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNullableType(t *testing.T) {
type Value struct {
UUID uuid.UUID
}
type Ptr struct {
UUID *uuid.UUID
}
type ToString struct {
UUID uuid.UUID `deepcopier:"force"`
}
type PtrToString struct {
UUID *uuid.UUID `deepcopier:"force"`
}
type FromNullable struct {
UUID string `deepcopier:"force"`
... | explode_data.jsonl/13670 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1057
} | [
2830,
3393,
15703,
929,
1155,
353,
8840,
836,
8,
341,
13158,
5162,
2036,
341,
197,
15980,
6463,
16040,
39636,
198,
197,
630,
13158,
46409,
2036,
341,
197,
15980,
6463,
353,
17128,
39636,
198,
197,
630,
13158,
32128,
2036,
341,
197,
1598... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHelmSetString(t *testing.T) {
Given(t).
Path("helm").
When().
Create().
AppSet("--helm-set-string", "foo=bar", "--helm-set-string", "foo=baz", "--helm-set-string", "app=$ARGOCD_APP_NAME").
Then().
And(func(app *Application) {
assert.Equal(t, []HelmParameter{{Name: "foo", Value: "baz", ForceStri... | explode_data.jsonl/69406 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
39,
23162,
1649,
703,
1155,
353,
8840,
836,
8,
341,
9600,
2071,
1155,
4292,
197,
69640,
445,
51899,
38609,
197,
197,
4498,
25829,
197,
75569,
25829,
197,
59557,
1649,
21549,
51899,
24096,
30881,
497,
330,
7975,
28,
2257,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUserUsageStatistics_LogPageView(t *testing.T) {
setupForTest(t)
user := types.User{
ID: 1,
}
err := LogActivity(true, user.ID, "test-cookie-id", "PAGEVIEW")
if err != nil {
t.Fatal(err)
}
a, err := GetByUserID(user.ID)
if err != nil {
t.Fatal(err)
}
if wantViews := int32(1); a.PageViews != wa... | explode_data.jsonl/27988 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 257
} | [
2830,
3393,
1474,
14783,
38599,
44083,
2665,
851,
1155,
353,
8840,
836,
8,
341,
84571,
2461,
2271,
1155,
692,
19060,
1669,
4494,
7344,
515,
197,
29580,
25,
220,
16,
345,
197,
532,
9859,
1669,
2835,
4052,
3715,
11,
1196,
9910,
11,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestNewConnectionWithDisabled(t *testing.T) {
c, err := NewConnection(nil, options.CorredorOpt{Enabled: false}, nil)
assert.Nil(t, c)
assert.Nil(t, err)
} | explode_data.jsonl/40235 | {
"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,
3564,
4526,
2354,
25907,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
1532,
4526,
27907,
11,
2606,
63560,
1151,
269,
21367,
90,
5462,
25,
895,
2137,
2092,
340,
6948,
59678,
1155,
11,
272,
340,
6948,
59678,
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 |
func TestEmail(t *testing.T) {
e := &Email{
Name: "smtp",
Enabled: true,
DefaultFromAddress: "no-reply@example.com",
Credentials: &EmailCredentials{
SMTPHost: "smtp.example.com",
SMTPPort: 587,
SMTPUser: "user",
SMTPPass: "pass",
},
}
var err error
t.Run("Create", f... | explode_data.jsonl/75885 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 424
} | [
2830,
3393,
4781,
1155,
353,
8840,
836,
8,
1476,
7727,
1669,
609,
4781,
515,
197,
21297,
25,
2290,
330,
39854,
756,
197,
197,
5462,
25,
310,
830,
345,
197,
91084,
3830,
4286,
25,
330,
2152,
78391,
35487,
905,
756,
197,
6258,
15735,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetField(t *testing.T) {
t.Parallel()
ctx := NewIsolate().NewContext()
three, err := ctx.Eval(`(3)`, "")
if err != nil {
t.Fatal(err)
}
if err := ctx.Global().Set("foo", three); err != nil {
t.Fatal(err)
}
res, err := ctx.Eval(`foo`, "")
if err != nil {
t.Fatal(err)
}
if num := res.Int64();... | explode_data.jsonl/81554 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
1649,
1877,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
1532,
3872,
33066,
1005,
3564,
1972,
2822,
197,
27856,
11,
1848,
1669,
5635,
5142,
831,
5809,
7,
18,
8,
7808,
14676,
743,
1848,
961,
2092,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestNewOrdererGroup(t *testing.T) {
t.Run("Unknown orderer type", func(t *testing.T) {
config := genesisconfig.Load(genesisconfig.SampleDevModeSoloProfile)
config.Orderer.OrdererType = "TestOrderer"
group, err := NewOrdererGroup(config.Orderer)
assert.Error(t, err)
assert.Nil(t, group)
})
t.Run("Unkn... | explode_data.jsonl/78132 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 235
} | [
2830,
3393,
3564,
4431,
261,
2808,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
13790,
1973,
261,
943,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
25873,
1669,
59366,
1676,
13969,
36884,
13774,
1676,
76266,
14592,
3636,
89299,
8526... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplyCanRemoveMapItemsContributedToByControllers(t *testing.T) {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, genericfeatures.ServerSideApply, true)()
_, client, closeFn := setup(t)
defer closeFn()
// Applier creates a deployment with a name=nginx container
apply ... | explode_data.jsonl/53488 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1311
} | [
2830,
3393,
28497,
6713,
13021,
2227,
4353,
52984,
2774,
1249,
1359,
14353,
1155,
353,
8840,
836,
8,
341,
16867,
4565,
70,
266,
57824,
287,
4202,
13859,
42318,
16014,
2271,
1155,
11,
4094,
12753,
13275,
13859,
42318,
11,
13954,
20304,
229... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEntry_MinSize(t *testing.T) {
entry := widget.NewEntry()
min := entry.MinSize()
entry.SetPlaceHolder("")
assert.Equal(t, min, entry.MinSize())
entry.SetText("")
assert.Equal(t, min, entry.MinSize())
entry.SetPlaceHolder("Hello")
assert.Equal(t, entry.MinSize().Width, min.Width)
assert.Equal(t, entry.M... | explode_data.jsonl/12326 | {
"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,
5874,
62122,
1695,
1155,
353,
8840,
836,
8,
341,
48344,
1669,
9086,
7121,
5874,
741,
25320,
1669,
4343,
17070,
1695,
741,
48344,
4202,
17371,
8589,
31764,
6948,
12808,
1155,
11,
1308,
11,
4343,
17070,
1695,
2398,
48344,
92259,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestModifyOrderByClientID(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test, either api keys or canManipulateRealOrders isnt set correctly")
}
_, err := f.ModifyOrderByClientID(context.Background(), "1234", "", -0.1, 0.1)
if err != nil {
t.Error(err)
... | explode_data.jsonl/15243 | {
"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,
44427,
34605,
2959,
915,
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 TestCopy(t *testing.T) {
srcFileName, dstFileName := dirRoot+"/src-file.txt", dirRoot+"/dst-file.txt"
err := AppendToFile(srcFileName, []byte("filesystem"))
if err != nil {
panic(err)
}
t.Cleanup(func() {
_ = RemoveWithRecur(dirRoot)
})
if !Exists(srcFileName) {
t.Error("Copy test failed!")
}
er... | explode_data.jsonl/34169 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
12106,
1155,
353,
8840,
836,
8,
341,
41144,
10903,
11,
10648,
10903,
1669,
5419,
8439,
27569,
3548,
14203,
3909,
497,
5419,
8439,
27569,
15658,
14203,
3909,
1837,
9859,
1669,
29807,
41550,
14705,
10903,
11,
3056,
3782,
445,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCalcFamily(t *testing.T) {
now, _ := ParseTimestamp("20190702 12:30:30", "20060102 15:04:05")
ft, _ := ParseTimestamp("20190702 12:00:00", "20060102 15:04:05")
t1, _ := ParseTimestamp("20190702 00:00:00", "20060102 15:04:05")
calc := dayCalculator
t2, _ := calc.ParseSegmentTime("20190702")
assert.Equal(... | explode_data.jsonl/75707 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 480
} | [
2830,
3393,
47168,
15192,
1155,
353,
8840,
836,
8,
341,
80922,
11,
716,
1669,
14775,
20812,
445,
17,
15,
16,
24,
15,
22,
15,
17,
220,
16,
17,
25,
18,
15,
25,
18,
15,
497,
330,
17,
15,
15,
21,
15,
16,
15,
17,
220,
16,
20,
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 TestTopicTrie_matchedClients(t *testing.T) {
a := assert.New(t)
for _, v := range testTopicMatch {
trie := newTopicTrie()
topic := packets.Topic{Qos: 1, Name: v.subTopic}
trie.subscribe("cid", topic)
qos := trie.getMatchedTopicFilter(v.topic)
if v.isMatch {
a.Equal(qos["cid"][0].Qos, topic.Qos)
} ... | explode_data.jsonl/72943 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 178
} | [
2830,
3393,
26406,
51,
7231,
93900,
47174,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
340,
2023,
8358,
348,
1669,
2088,
1273,
26406,
8331,
341,
197,
197,
8927,
1669,
501,
26406,
51,
7231,
741,
197,
3244,
24810,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNamingStrategy(t *testing.T) {
dbNameNS := func(name string) string {
return "db_" + name
}
tableNameNS := func(name string) string {
return "tbl_" + name
}
columnNameNS := func(name string) string {
return "col_" + name
}
ns := &gorm.NamingStrategy{
DB: dbNameNS,
Table: tableNameNS,
... | explode_data.jsonl/48457 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 354
} | [
2830,
3393,
85410,
19816,
1155,
353,
8840,
836,
8,
1476,
20939,
675,
2448,
1669,
2915,
3153,
914,
8,
914,
341,
197,
853,
330,
1999,
18771,
488,
829,
198,
197,
532,
26481,
675,
2448,
1669,
2915,
3153,
914,
8,
914,
341,
197,
853,
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 TestEncode(t *testing.T) {
tests := []struct {
v uint64
exp string
}{
{0x000, "00000000000"},
{0x001, "00000000001"},
{0x03f, "0000000000~"},
{0x07f, "0000000001~"},
{0xf07f07f07f07f07f, "F1~1~1~1~1~"},
}
for _, test := range tests {
t.Run(fmt.Sprintf("0x%03x→%s", test.v, test.exp), func(t *t... | explode_data.jsonl/68561 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
32535,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
5195,
256,
2622,
21,
19,
198,
197,
48558,
914,
198,
197,
59403,
197,
197,
90,
15,
87,
15,
15,
15,
11,
330,
15,
15,
15,
15,
15,
15,
15,
15,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTOTPSetup(t *testing.T) {
t.Parallel()
ab := authboss.New()
router := &mocks.Router{}
renderer := &mocks.Renderer{}
errHandler := &mocks.ErrorHandler{}
ab.Config.Core.Router = router
ab.Config.Core.ViewRenderer = renderer
ab.Config.Core.ErrorHandler = errHandler
totp := &TOTP{Authboss: ab}
if err ... | explode_data.jsonl/63394 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
65620,
47,
21821,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
370,
1669,
4166,
33314,
7121,
741,
67009,
1669,
609,
16712,
82,
31413,
16094,
83509,
1669,
609,
16712,
82,
27386,
261,
16094,
9859,
3050,
1669,
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 TestTombstoneClean(t *testing.T) {
numSamples := int64(10)
db, delete := openTestDB(t, nil)
defer delete()
app := db.Appender()
smpls := make([]float64, numSamples)
for i := int64(0); i < numSamples; i++ {
smpls[i] = rand.Float64()
app.Add(labels.Labels{{Name: "a", Value: "b"}}, i, smpls[i])
}
test... | explode_data.jsonl/64375 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 956
} | [
2830,
3393,
51,
2855,
10812,
27529,
1155,
353,
8840,
836,
8,
341,
22431,
39571,
1669,
526,
21,
19,
7,
16,
15,
692,
20939,
11,
3698,
1669,
1787,
2271,
3506,
1155,
11,
2092,
340,
16867,
3698,
2822,
28236,
1669,
2927,
5105,
1659,
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 TestParsePositional(t *testing.T) {
args := strings.Split("united states canada mexico panama haiti jamaica peru", " ")
f := NewFixture(t, model.NewUserConfigState(args))
defer f.TearDown()
f.File("Tiltfile", `
config.define_string_list('foo', args=True)
cfg = config.parse()
print(cfg['foo'])
`)
_, err := ... | explode_data.jsonl/65225 | {
"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,
14463,
3812,
278,
1155,
353,
8840,
836,
8,
341,
31215,
1669,
9069,
19823,
445,
359,
1608,
5302,
31763,
76376,
7215,
3029,
305,
1315,
72,
502,
3029,
3001,
91859,
497,
330,
59928,
1166,
1669,
1532,
18930,
1155,
11,
1614,
7121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUpsertInto(t *testing.T) {
catalogStore, err := store.Open("catalog_upsert", store.DefaultOptions())
require.NoError(t, err)
defer os.RemoveAll("catalog_upsert")
dataStore, err := store.Open("sqldata_upsert", store.DefaultOptions())
require.NoError(t, err)
defer os.RemoveAll("sqldata_upsert")
engine, ... | explode_data.jsonl/64058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2344
} | [
2830,
3393,
98778,
529,
26591,
1155,
353,
8840,
836,
8,
341,
1444,
7750,
6093,
11,
1848,
1669,
3553,
12953,
445,
26539,
8237,
6047,
497,
3553,
13275,
3798,
2398,
17957,
35699,
1155,
11,
1848,
340,
16867,
2643,
84427,
445,
26539,
8237,
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 TestNasTypeNewPDUSessionModificationRejectMessage(t *testing.T) {
for i, table := range nasMessagePDUSessionModificationRejectTable {
t.Logf("Test Cnt:%d", i)
a := nasMessage.NewPDUSessionModificationReject(0)
b := nasMessage.NewPDUSessionModificationReject(0)
assert.NotNil(t, a)
assert.NotNil(t, b)
... | explode_data.jsonl/28825 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 528
} | [
2830,
3393,
45,
300,
929,
3564,
23025,
2034,
1338,
80795,
78413,
2052,
1155,
353,
8840,
836,
8,
1476,
2023,
600,
11,
1965,
1669,
2088,
17141,
2052,
23025,
2034,
1338,
80795,
78413,
2556,
341,
197,
3244,
98954,
445,
2271,
356,
406,
7533,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateRules(t *testing.T) {
client := NewTestClientForDebug()
rulesArr := []Rule{
Rule{RuleName: "rule-001", Domain: "datapaking.com", Url: "/rule0001", VServerGroupId: TestVServerGroupID},
Rule{RuleName: "rule-002", Domain: "datapaking.com", Url: "/rule0002", VServerGroupId: TestVServerGroupID},
}
ru... | explode_data.jsonl/66888 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
4021,
26008,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
1532,
2271,
2959,
2461,
7939,
2822,
7000,
2425,
8838,
1669,
3056,
11337,
515,
197,
11143,
1111,
90,
11337,
675,
25,
330,
12937,
12,
15,
15,
16,
497,
21070,
25,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDeleteReadingByIdError(t *testing.T) {
reset()
myMock := &dbMock.DBClient{}
myMock.On("DeleteReadingById", mock.Anything).Return(fmt.Errorf("some error"))
dbClient = myMock
err := deleteReadingById("invalid", logger.NewMockClient())
if err == nil {
t.Errorf("Expected error deleting reading by ID")
... | explode_data.jsonl/48173 | {
"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,
6435,
31899,
2720,
1454,
1155,
353,
8840,
836,
8,
341,
70343,
741,
13624,
11571,
1669,
609,
1999,
11571,
22537,
2959,
31483,
13624,
11571,
8071,
445,
6435,
31899,
2720,
497,
7860,
13311,
1596,
568,
5598,
28197,
13080,
445,
146... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRetryMultiError(t *testing.T) {
retryErr := retry(errors.New("retry error"))
nonRetryErr := errors.New("not a retry error")
errs := terrors.MultiError{nonRetryErr}
testutil.Assert(t, !IsRetryError(errs), "should not be a retry error")
errs = terrors.MultiError{retryErr}
testutil.Assert(t, IsRetryError(... | explode_data.jsonl/7702 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
51560,
20358,
1454,
1155,
353,
8840,
836,
8,
341,
17200,
1539,
7747,
1669,
22683,
38881,
7121,
445,
44848,
1465,
5455,
197,
6280,
51560,
7747,
1669,
5975,
7121,
445,
1921,
264,
22683,
1465,
5130,
9859,
82,
1669,
259,
7650,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetString(t *testing.T) {
testCases := []struct {
i interface{}
k string
expected string
expectedError error
}{
{
i: map[string]interface{}{
"key": "value",
},
k: "key",
expected: "value",
expectedError: nil,
},
{
i: map[string... | explode_data.jsonl/19154 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 692
} | [
2830,
3393,
48905,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
8230,
1797,
3749,
16094,
197,
16463,
1797,
914,
198,
197,
42400,
414,
914,
198,
197,
42400,
1454,
1465,
198,
197,
59403,
197,
197,
515,
298,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestMemberAddNotAUser(t *testing.T) {
tc, _, name := memberSetup(t)
defer tc.Cleanup()
tc.G.SetServices(externals.GetServices())
_, err := AddMember(context.TODO(), tc.G, name, "not_a_kb_user", keybase1.TeamRole_READER)
if err == nil {
t.Fatal("Added a non-keybase username to a team")
}
if _, ok := err.... | explode_data.jsonl/13520 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 173
} | [
2830,
3393,
9366,
2212,
2623,
32,
1474,
1155,
353,
8840,
836,
8,
341,
78255,
11,
8358,
829,
1669,
4462,
21821,
1155,
340,
16867,
17130,
727,
60639,
2822,
78255,
1224,
4202,
11025,
7,
4301,
1127,
2234,
11025,
12367,
197,
6878,
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... | 3 |
func TestOOM(t *testing.T) {
distro, err := qemu.Unpack()
if err != nil {
t.Fatal(err)
}
defer distro.Delete()
arch, err := distro.TargetCPU()
if err != nil {
t.Fatal(err)
}
i := distro.Create(qemu.Params{
Arch: arch,
ZBI: zbiPath(t),
AppendCmdline: cmdline,
})
err = i.Start()
... | explode_data.jsonl/7789 | {
"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,
57751,
1155,
353,
8840,
836,
8,
341,
2698,
15561,
11,
1848,
1669,
85108,
10616,
4748,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
1582,
299,
18872,
741,
197,
1113,
11,
1848,
1669,
1582,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestThresholdKind(t *testing.T) {
require := require.New(t)
for _, k := range ThresholdKinds {
enc, err := k.MarshalText()
require.NoError(err, "MarshalText")
var d ThresholdKind
err = d.UnmarshalText(enc)
require.NoError(err, "UnmarshalText")
require.Equal(k, d, "threshold kind should round-trip")... | explode_data.jsonl/36020 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
37841,
10629,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
692,
2023,
8358,
595,
1669,
2088,
58079,
42,
8673,
341,
197,
197,
954,
11,
1848,
1669,
595,
37271,
1178,
741,
197,
17957,
35699,
3964,
11,
330,
554... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStatefulSetControllerUpdatePodWithSameVersion(t *testing.T) {
ssc, spc, _ := newFakeStatefulSetController()
set := newStatefulSet(3)
pod := newStatefulSetPod(set, 0)
spc.setsIndexer.Add(set)
ssc.updatePod(pod, pod)
ssc.queue.ShutDown()
key, _ := ssc.queue.Get()
if key != nil {
t.Errorf("StatefulSet e... | explode_data.jsonl/18616 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
1397,
1262,
1649,
2051,
4289,
23527,
2354,
19198,
5637,
1155,
353,
8840,
836,
8,
341,
34472,
66,
11,
978,
66,
11,
716,
1669,
501,
52317,
1397,
1262,
1649,
2051,
741,
8196,
1669,
36848,
1262,
1649,
7,
18,
340,
3223,
347,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddressResolutionFormByteArray(t *testing.T) {
log.Println(addressResolutionFormByteArray([]byte{164, 155, 79, 89, 170, 120, 0}, IPV4))
_, bytes, err := addressResolution("1050:0:0:0:5:600:300c:326b")
if err == nil {
bytes = append(bytes, []byte{0x0, 0x80}...)
log.Println(addressResolutionFormByteArray(... | explode_data.jsonl/23177 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 241
} | [
2830,
3393,
4286,
38106,
1838,
18394,
1155,
353,
8840,
836,
8,
341,
6725,
12419,
15434,
38106,
1838,
18394,
10556,
3782,
90,
16,
21,
19,
11,
220,
16,
20,
20,
11,
220,
22,
24,
11,
220,
23,
24,
11,
220,
16,
22,
15,
11,
220,
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 TestCheckBuildConstants(t *testing.T) {
// Verify that the build has been set to 'testing'.
if build.Release != "testing" {
t.Error("build.Release needs to be set to \"testing\"")
t.Error(build.Release)
}
if testing.Short() {
t.SkipNow()
}
// Verify that, for the longer tests, the 'debug' build tag has... | explode_data.jsonl/37895 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
3973,
11066,
9386,
1155,
353,
8840,
836,
8,
341,
197,
322,
25429,
429,
279,
1936,
702,
1012,
738,
311,
364,
8840,
23569,
743,
1936,
58693,
961,
330,
8840,
1,
341,
197,
3244,
6141,
445,
5834,
58693,
3880,
311,
387,
738,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestBuilderMapEqual(t *testing.T) {
tests := []struct {
desc string
a BuilderMap
b BuilderMap
wantEqual bool
}{
{
desc: "nil builder maps",
a: nil,
b: nil,
wantEqual: true,
},
{
desc: "empty builder maps",
a: make(map[string]b... | explode_data.jsonl/81173 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1274
} | [
2830,
3393,
3297,
2227,
2993,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
41653,
414,
914,
198,
197,
11323,
260,
20626,
2227,
198,
197,
2233,
260,
20626,
2227,
198,
197,
50780,
2993,
1807,
198,
197,
59403,
197,
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... | 2 |
func TestTeeReaderCloser(t *testing.T) {
expected := "FOO"
buf := bytes.NewBuffer([]byte(expected))
lw := bytes.NewBuffer(nil)
c := &mockCloser{}
closer := teeReaderCloser{
io.TeeReader(buf, lw),
c,
}
b := make([]byte, len(expected))
_, err := closer.Read(b)
closer.Close()
if expected != lw.String() {
... | explode_data.jsonl/41770 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 224
} | [
2830,
3393,
51,
2127,
5062,
51236,
799,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
330,
3788,
46,
698,
26398,
1669,
5820,
7121,
4095,
10556,
3782,
15253,
1171,
8810,
86,
1669,
5820,
7121,
4095,
27907,
340,
1444,
1669,
609,
16712,
51236,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetRegionZoneForDefaultEndpoint(t *testing.T) {
driver := NewCustomTestDriver(&fakeEC2WithLogin{})
driver.awsCredentialsFactory = NewValidAwsCredentials
options := &commandstest.FakeFlagger{
Data: map[string]interface{}{
"name": "test",
"amazonec2-region": "us-east-1",
"amazonec2-zone... | explode_data.jsonl/7415 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 197
} | [
2830,
3393,
1949,
14091,
15363,
2461,
3675,
27380,
1155,
353,
8840,
836,
8,
341,
33652,
1669,
1532,
10268,
2271,
11349,
2099,
30570,
7498,
17,
2354,
6231,
37790,
33652,
35166,
27025,
4153,
284,
1532,
4088,
47359,
27025,
198,
35500,
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 TestBenchlistAdd(t *testing.T) {
vdrs := validators.NewSet()
vdr0 := validators.GenerateRandomValidator(50)
vdr1 := validators.GenerateRandomValidator(50)
vdr2 := validators.GenerateRandomValidator(50)
vdr3 := validators.GenerateRandomValidator(50)
vdr4 := validators.GenerateRandomValidator(50)
errs := wra... | explode_data.jsonl/25537 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1507
} | [
2830,
3393,
33,
19762,
1607,
2212,
1155,
353,
8840,
836,
8,
341,
5195,
93246,
1669,
38588,
7121,
1649,
741,
5195,
3612,
15,
1669,
38588,
57582,
13999,
14256,
7,
20,
15,
340,
5195,
3612,
16,
1669,
38588,
57582,
13999,
14256,
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... | 5 |
func TestUpdateIssueIDErr(t *testing.T) {
cucm, iucm, lucm, pucm, m := prepareMocksAndRUC()
body := strings.NewReader("title=test-title&description=test-description&status=1&labels=test1,test2,test3")
c, _ := prepareHTTP(echo.POST, "/api/issues/:id", body)
c.SetParamNames("id")
c.SetParamValues("test")
err := m... | explode_data.jsonl/60162 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 207
} | [
2830,
3393,
4289,
42006,
915,
7747,
1155,
353,
8840,
836,
8,
341,
1444,
1754,
76,
11,
600,
1754,
76,
11,
25927,
76,
11,
281,
1754,
76,
11,
296,
1669,
10549,
72577,
3036,
49,
5459,
2822,
35402,
1669,
9069,
68587,
445,
2102,
53538,
88... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRoller_Roll(t *testing.T) {
dices.SetRandomSeed(42)
tests := []struct {
args Roller
want *Result
}{
{FromValue(5.0, nil), &Result{5.0, nil, ""}},
{FromValue(5.0, nil).Add(FromValue(6.0, nil)), &Result{11.0, nil, ""}},
{FromValue(5.0, nil).Minus(FromValue(4.0, nil)), &Result{1.0, nil, ""}},
{Fro... | explode_data.jsonl/70912 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 608
} | [
2830,
3393,
32355,
261,
2568,
965,
1155,
353,
8840,
836,
8,
1476,
2698,
1216,
4202,
13999,
41471,
7,
19,
17,
340,
78216,
1669,
3056,
1235,
341,
197,
31215,
44542,
198,
197,
50780,
353,
2077,
198,
197,
59403,
197,
197,
90,
3830,
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... | 2 |
func TestParseComplete(t *testing.T) {
tpc := func(commandTag string, command string, affectedRows int64, shouldFail bool) {
defer func() {
if p := recover(); p != nil {
if !shouldFail {
t.Error(p)
}
}
}()
cn := &conn{}
res, c := cn.parseComplete(commandTag)
if c != command {
t.Errorf("... | explode_data.jsonl/73498 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 457
} | [
2830,
3393,
14463,
12548,
1155,
353,
8840,
836,
8,
341,
73423,
66,
1669,
2915,
15143,
5668,
914,
11,
3210,
914,
11,
11495,
9024,
526,
21,
19,
11,
1265,
19524,
1807,
8,
341,
197,
16867,
2915,
368,
341,
298,
743,
281,
1669,
11731,
212... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFrenchElision(t *testing.T) {
tests := []struct {
input analysis.TokenStream
output analysis.TokenStream
}{
{
input: analysis.TokenStream{
&analysis.Token{
Term: []byte("l'Institut"),
},
&analysis.Token{
Term: []byte("d'Estudis"),
},
},
output: analysis.TokenStream{
... | explode_data.jsonl/59736 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 342
} | [
2830,
3393,
43197,
6582,
1816,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
22427,
220,
6358,
32277,
3027,
198,
197,
21170,
6358,
32277,
3027,
198,
197,
59403,
197,
197,
515,
298,
22427,
25,
6358,
32277,
3027,
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... | 4 |
func TestMultiSitesMainLangInRoot(t *testing.T) {
t.Parallel()
for _, b := range []bool{false} {
doTestMultiSitesMainLangInRoot(t, b)
}
} | explode_data.jsonl/16235 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 62
} | [
2830,
3393,
20358,
93690,
6202,
26223,
641,
8439,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2023,
8358,
293,
1669,
2088,
3056,
2641,
90,
3849,
92,
341,
197,
19935,
2271,
20358,
93690,
6202,
26223,
641,
8439,
1155,
11,
293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSQLReader(t *testing.T) {
logkitConf := conf.MapConf{
KeyMetaPath: metaDir,
KeyFileDone: metaDir,
KeyMode: ModeMysql,
}
meta, err := NewMetaWithConf(logkitConf)
assert.NoError(t, err)
defer os.RemoveAll(metaDir)
database := "TestSQLReaderdatabase"
mr := &SqlReader{
database: database,
raw... | explode_data.jsonl/61889 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 675
} | [
2830,
3393,
6688,
5062,
1155,
353,
8840,
836,
8,
341,
6725,
8226,
15578,
1669,
2335,
10104,
15578,
515,
197,
55242,
12175,
1820,
25,
8823,
6184,
345,
197,
55242,
1703,
17453,
25,
8823,
6184,
345,
197,
55242,
3636,
25,
257,
14562,
44,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestKernelTapClient(t *testing.T) {
// Turn off log output
logrus.SetOutput(ioutil.Discard)
testRequest := &networkservice.NetworkServiceRequest{Connection: &networkservice.Connection{Id: "ConnectionId"}}
mechanism := &networkservice.Mechanism{
Cls: cls.LOCAL,
Type: kernel.MECHANISM,
Parameters: map[str... | explode_data.jsonl/42764 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
26343,
23879,
2959,
1155,
353,
8840,
836,
8,
341,
197,
322,
11999,
1007,
1487,
2550,
198,
90822,
4202,
5097,
1956,
30158,
909,
47560,
340,
18185,
1900,
1669,
609,
17511,
7936,
30149,
1860,
1900,
90,
4526,
25,
609,
17511,
793... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 := btcwire.NewMsgFilterAdd(data)
// Encode with latest protocol version.
var buf bytes.Buffer
err := msg.BtcEncode(&buf, btcwire.ProtocolVersion)
if err == nil {
t.Errorf("encode of MsgFilterAdd succeeded when it shouldn'... | explode_data.jsonl/52859 | {
"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,
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,
86037,
35531,
7121,
6611,
5632,
2212,
2592,
692,
197,
322,
5656... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMotorDriverOn(t *testing.T) {
d := initTestMotorDriver()
d.CurrentMode = "digital"
d.On()
gobottest.Assert(t, d.CurrentState, uint8(1))
d.CurrentMode = "analog"
d.CurrentSpeed = 0
d.On()
gobottest.Assert(t, d.CurrentSpeed, uint8(255))
} | explode_data.jsonl/23131 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
33577,
11349,
1925,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
2930,
2271,
33577,
11349,
741,
2698,
11517,
3636,
284,
330,
57269,
698,
2698,
8071,
741,
3174,
674,
1716,
477,
11711,
1155,
11,
294,
11517,
1397,
11,
2622,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSQLite(t *testing.T) {
client := enttest.Open(t, dialect.SQLite, "file:ent?mode=memory&cache=shared&_fk=1", opts)
defer client.Close()
for _, tt := range tests {
name := runtime.FuncForPC(reflect.ValueOf(tt).Pointer()).Name()
t.Run(name[strings.LastIndex(name, ".")+1:], func(t *testing.T) {
drop(t, c... | explode_data.jsonl/45698 | {
"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,
81772,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
1197,
1944,
12953,
1155,
11,
42279,
97601,
11,
330,
1192,
25,
306,
30,
8516,
28,
17269,
5,
9360,
28,
6100,
85047,
41718,
28,
16,
497,
12185,
340,
16867,
2943,
10421,
741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIntermediate(t *testing.T) {
t.Run("Ok", func(t *testing.T) {
msg := bytes.Repeat([]byte{1, 2, 3}, 100)
buf := new(bytes.Buffer)
if err := writeIntermediate(buf, &bin.Buffer{Buf: msg}); err != nil {
t.Fatal(err)
}
var out bin.Buffer
if err := readIntermediate(buf, &out, false); err != nil {
... | explode_data.jsonl/45784 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 394
} | [
2830,
3393,
98961,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
11578,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
21169,
1669,
5820,
2817,
10979,
10556,
3782,
90,
16,
11,
220,
17,
11,
220,
18,
2137,
220,
16,
15,
15,
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... | 3 |
func TestIstanbulConsensus_ValidateShutdown_SealerStatusRpcError(t *testing.T) {
var (
istanbulIsValidatorResp = `{"result": true}`
istanbulStatusResp = `{"error": {"code":111,"message":"someerror","data":{"additional":"context"}}}`
wantErrMsg = "unable to check istanbul sealer status: code = 1... | explode_data.jsonl/59659 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
40,
45116,
15220,
13626,
62,
17926,
62004,
26920,
13111,
2522,
60248,
1454,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
197,
8944,
16110,
3872,
14256,
36555,
284,
1565,
4913,
1382,
788,
830,
31257,
197,
197,
8944,
16110,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVersion(t *testing.T) {
_, _, m, err := createTestRuntimeManager()
assert.NoError(t, err)
version, err := m.Version()
assert.NoError(t, err)
assert.Equal(t, kubeRuntimeAPIVersion, version.String())
} | explode_data.jsonl/13370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
5637,
1155,
353,
8840,
836,
8,
341,
197,
6878,
8358,
296,
11,
1848,
1669,
1855,
2271,
15123,
2043,
741,
6948,
35699,
1155,
11,
1848,
692,
74954,
11,
1848,
1669,
296,
35842,
741,
6948,
35699,
1155,
11,
1848,
340,
6948,
1280... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreLen(t *testing.T) {
store, cleanup := defaultImageStore(t)
defer cleanup()
expected := 10
for i := 0; i < expected; i++ {
_, err := store.Create([]byte(fmt.Sprintf(`{"comment": "abc%d", "rootfs": {"type": "layers"}}`, i)))
assert.NilError(t, err)
}
numImages := store.Len()
assert.Equal(t, expe... | explode_data.jsonl/45452 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
6093,
11271,
1155,
353,
8840,
836,
8,
341,
57279,
11,
21290,
1669,
1638,
1906,
6093,
1155,
340,
16867,
21290,
2822,
42400,
1669,
220,
16,
15,
198,
2023,
600,
1669,
220,
15,
26,
600,
366,
3601,
26,
600,
1027,
341,
197,
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... | 2 |
func TestAbsCollection_Search(t *testing.T) {
intColl := NewIntCollection([]int{1, 2})
if intColl.Search(2) != 1 {
t.Fatal("Search 错误")
}
intColl = NewIntCollection([]int{1, 2, 3, 3, 2})
if intColl.Search(3) != 2 {
t.Fatal("Search 重复错误")
}
} | explode_data.jsonl/66432 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 121
} | [
2830,
3393,
27778,
6482,
65913,
1155,
353,
8840,
836,
8,
341,
2084,
15265,
1669,
1532,
1072,
6482,
10556,
396,
90,
16,
11,
220,
17,
3518,
743,
526,
15265,
31903,
7,
17,
8,
961,
220,
16,
341,
197,
3244,
26133,
445,
5890,
93178,
247,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRepository_FirstEverCommit(t *testing.T) {
t.Parallel()
ctx := actor.WithActor(context.Background(), &actor.Actor{
UID: 1,
})
db := database.NewMockDB()
testCases := []struct {
commitDates []string
want string
}{
{
commitDates: []string{
"2006-01-02T15:04:05Z",
"2007-01-02T15:... | explode_data.jsonl/8514 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1355
} | [
2830,
3393,
4624,
79790,
43487,
33441,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
12089,
26124,
18870,
5378,
19047,
1507,
609,
5621,
76094,
515,
197,
197,
6463,
25,
220,
16,
345,
197,
8824,
20939,
1669,
4625,
712... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigmap_Read(t *testing.T) {
if tr := os.Getenv("TRAVIS"); len(tr) > 0 {
return
}
data := []byte(`{"config":{"host":"0.0.0.0","port":"1337"},"mongodb":{"host":"127.0.0.1","password":"password","port":"27017","user":"user"},"redis":{"url":"redis://127.0.0.1:6379/db01"}}`)
tt := []struct {
name ... | explode_data.jsonl/18355 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 504
} | [
2830,
3393,
2648,
2186,
38381,
1155,
353,
8840,
836,
8,
341,
743,
489,
1669,
2643,
64883,
445,
2378,
98716,
5038,
2422,
7624,
8,
861,
220,
15,
341,
197,
853,
198,
197,
630,
8924,
1669,
3056,
3782,
5809,
4913,
1676,
22317,
3790,
3252,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWalkNDirTree(t *testing.T) {
ls := testWalkLevels(t, -1)
entries, err := walkNDirTree(context.Background(), nil, "", ls.includeAll, ls.maxLevel, ls.ListDir)
require.NoError(t, err)
assert.Equal(t, `/
A
a/
a/
B
b/
a/b/
C
c/
a/b/c/
D
d/
a/b/c/d/
`, entries.String())
} | explode_data.jsonl/65752 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
48849,
45,
6184,
6533,
1155,
353,
8840,
836,
8,
341,
197,
4730,
1669,
1273,
48849,
46991,
1155,
11,
481,
16,
340,
197,
12940,
11,
1848,
1669,
4227,
45,
6184,
6533,
5378,
19047,
1507,
2092,
11,
7342,
19597,
29645,
2403,
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 TestPrinter_printPrometheus(t *testing.T) {
date := time.Now()
var tests = []struct {
name string
report runner.Report
expected string
}{
{
"basic",
runner.Report{
Name: "run name",
EndReason: runner.ReasonNormalEnd,
Date: date,
Count: 200,
Total: time.... | explode_data.jsonl/250 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2175
} | [
2830,
3393,
45660,
10064,
35186,
39705,
1155,
353,
8840,
836,
8,
341,
44086,
1669,
882,
13244,
2822,
2405,
7032,
284,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
69931,
256,
22259,
25702,
198,
197,
42400,
914,
198,
197,
59403,
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 TestError(t *testing.T) {
t.Parallel()
for _, tt := range []struct {
Err Error
Expect string
}{
{Error{TypeInternalError, nil, "some error"}, "some error"},
{Error{TypeExternalError, fmt.Errorf("world"), "hello"}, "hello: world"},
} {
if tt.Err.Unwrap() != tt.Err.Original {
t.Errorf("failed to... | explode_data.jsonl/40425 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 301
} | [
2830,
3393,
1454,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
197,
7747,
262,
4600,
198,
197,
35911,
914,
198,
197,
59403,
197,
197,
90,
1454,
90,
929,
11569,
1454,
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... | 5 |
func TestPtrPk(t *testing.T) {
parent := &IntegerPk{ID: 10, Value: "10"}
id, _ := dORM.Insert(parent)
if !IsMysql {
// MySql does not support last_insert_id in this case: see #2382
throwFail(t, AssertIs(id, 10))
}
ptr := PtrPk{ID: parent, Positive: true}
num, err := dORM.InsertMulti(2, []PtrPk{ptr})
throwF... | explode_data.jsonl/18164 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 513
} | [
2830,
3393,
5348,
58415,
1155,
353,
8840,
836,
8,
341,
24804,
1669,
609,
3486,
58415,
90,
915,
25,
220,
16,
15,
11,
5162,
25,
330,
16,
15,
63159,
15710,
11,
716,
1669,
294,
4365,
23142,
12489,
340,
743,
753,
3872,
44,
14869,
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... | 2 |
func TestWithMaxConcurrentRequests(t *testing.T) {
t.Parallel()
Convey("Given an int and dialer", t, func() {
m := 2
dialer := &mockDialerStruct{}
Convey("When Dial is called with max concurrent requests", func() {
c, _ := mockDial(dialer, WithMaxConcurrentRequests(m))
Convey("Then the client semaphore s... | explode_data.jsonl/53405 | {
"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,
2354,
5974,
1109,
3231,
35295,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
93070,
5617,
445,
22043,
458,
526,
323,
27860,
261,
497,
259,
11,
2915,
368,
341,
197,
2109,
1669,
220,
17,
198,
197,
2698,
530,
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 TestAddBuildOrImage2(t *testing.T) {
// Test data
project := &model.CGProject{}
service := &spec.ServiceConfig{}
// Mock functions
textQuestionWithDefault = func(question, defaultValue string) (result string) {
assert.Equal(t, "Where is your Dockerfile located?", question)
assert.Equal(t, "./Dockerfile", ... | explode_data.jsonl/22028 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
2212,
11066,
2195,
1906,
17,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
821,
198,
72470,
1669,
609,
2528,
91658,
7849,
16094,
52934,
1669,
609,
9535,
13860,
2648,
16094,
197,
322,
14563,
5746,
198,
15425,
14582,
2354,
367... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSensitiveFindAll(t *testing.T) {
filter := New()
filter.AddWord("有一个东西")
filter.AddWord("一个东西")
filter.AddWord("一个")
filter.AddWord("东西")
filter.AddWord("个东")
testcases := []struct {
Text string
Expect []string
}{
{"我有一个东东西", []string{"一个", "个东", "东西"}},
{"我有一个东西", []string{"有一个东西", "一个", "一... | explode_data.jsonl/80995 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 395
} | [
2830,
3393,
63316,
9885,
2403,
1155,
353,
8840,
836,
8,
341,
50108,
1669,
1532,
741,
50108,
1904,
10879,
445,
104133,
100413,
1138,
50108,
1904,
10879,
445,
46944,
100413,
1138,
50108,
1904,
10879,
445,
46944,
1138,
50108,
1904,
10879,
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... | 3 |
func TestTextmateSnippetEnclosingPlaceholders(t *testing.T) {
snippet := parse("This ${1:is ${2:nested}}$0", false)
first, second := snippet.placeholders()[0], snippet.placeholders()[1]
assertEqual(t, len(snippet.enclosingPlaceholders(*first)), 0)
sndEnclosing := snippet.enclosingPlaceholders(*second)
assertEqua... | explode_data.jsonl/60285 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
1178,
18052,
87852,
7408,
17831,
17371,
16662,
1155,
353,
8840,
836,
8,
341,
48251,
21581,
1669,
4715,
445,
1986,
3570,
16,
25,
285,
3570,
17,
19266,
9980,
3417,
3,
15,
497,
895,
340,
42190,
11,
2086,
1669,
43065,
24457,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccDataSourceSqlManagedInstance_basic(t *testing.T) {
data := acceptance.BuildTestData(t, "data.azurerm_mssql_managed_instance", "test")
data.DataSourceTest(t, []acceptance.TestStep{
{
Config: MsSqlManagedInstanceDataSource{}.basic(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.R... | explode_data.jsonl/46889 | {
"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,
14603,
17173,
8269,
27192,
2523,
34729,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
25505,
25212,
83920,
1155,
11,
330,
691,
13,
1370,
324,
4195,
717,
79713,
79889,
11904,
497,
330,
1944,
5130,
8924,
21698,
2271,
1155,
11,
305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNonServiceConfig(t *testing.T) {
store, sd, _, stopFn := initServiceDiscovery()
defer stopFn()
// Create a non-service configuration element. This should not affect the service registry at all.
cfg := model.Config{
ConfigMeta: model.ConfigMeta{
GroupVersionKind: collections.IstioNetworkingV1Alpha3De... | explode_data.jsonl/12841 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 471
} | [
2830,
3393,
8121,
1860,
2648,
1155,
353,
8840,
836,
8,
341,
57279,
11,
20585,
11,
8358,
2936,
24911,
1669,
2930,
1860,
67400,
741,
16867,
2936,
24911,
2822,
197,
322,
4230,
264,
2477,
23461,
6546,
2392,
13,
1096,
1265,
537,
7802,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.