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 TestClientWithDefaultHeaders(t *testing.T) {
testCases := []struct {
name string
requestHeaders http.Header
defaultHeaders http.Header
expectedHeaders http.Header
}{
{
name: "no headers added when none set",
defaultHeaders: http.Header{},
expectedHeaders: http.Header{}... | explode_data.jsonl/12752 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1005
} | [
2830,
3393,
2959,
2354,
3675,
10574,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
23555,
10574,
220,
1758,
15753,
198,
197,
11940,
10574,
220,
1758,
15753,
198,
197,
42400,
10574,
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... | 5 |
func TestParseCommentsBeforeDot(t *testing.T) {
accessor := SourceAccessorFromMap(map[string]string{
"test.proto": `
syntax = "proto3";
message Foo {
// leading comments
.Foo foo = 1;
}
`,
})
compiler := Compiler{
Resolver: &SourceResolver{Accessor: accessor},
IncludeSourceInfo: true,
}
ctx := ... | explode_data.jsonl/18032 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
14463,
17373,
10227,
34207,
1155,
353,
8840,
836,
8,
341,
197,
5211,
269,
1669,
8748,
29889,
3830,
2227,
9147,
14032,
30953,
515,
197,
197,
1,
1944,
57322,
788,
22074,
56193,
284,
330,
15110,
18,
876,
1994,
33428,
341,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUnencodedMessage(t *testing.T) {
m := NewMessage(SetEncoding(Unencoded))
m.SetHeaders(map[string][]string{
"From": {"from@example.com"},
"To": {"to@example.com"},
"Subject": {"Café"},
})
m.SetBody("text/html", "¡Hola, señor!")
want := &message{
from: "from@example.com",
to: []string{"... | explode_data.jsonl/31571 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 305
} | [
2830,
3393,
1806,
19329,
2052,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
2052,
52474,
14690,
49289,
19329,
1171,
2109,
4202,
10574,
9147,
14032,
45725,
917,
515,
197,
197,
1,
3830,
788,
262,
5212,
1499,
35487,
905,
7115,
197,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMonitoringHandler(t *testing.T) {
checkMonitoring := func(t *testing.T,
h func(*request.Context),
expected map[request.ResultID]int,
m map[request.ResultID]*monitoring.Int,
) {
c, _ := beatertest.DefaultContextWithResponseRecorder()
equal, result := beatertest.CompareMonitoringInt(Apply(MonitoringM... | explode_data.jsonl/17719 | {
"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,
98062,
3050,
1155,
353,
8840,
836,
8,
341,
25157,
98062,
1669,
2915,
1155,
353,
8840,
836,
345,
197,
9598,
2915,
4071,
2035,
9328,
1326,
197,
42400,
2415,
58,
2035,
18456,
915,
63025,
345,
197,
2109,
2415,
58,
2035,
18456,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenesisAccountValidate(t *testing.T) {
pubkey := secp256k1.GenPrivKey().PubKey()
addr := sdk.AccAddress(pubkey.Address())
baseAcc := types.NewBaseAccount(addr, pubkey, 0, 0)
tests := []struct {
name string
acc types.GenesisAccount
expErr bool
}{
{
"valid base account",
baseAcc,
fals... | explode_data.jsonl/80931 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
84652,
7365,
17926,
1155,
353,
8840,
836,
8,
341,
62529,
792,
1669,
511,
4672,
17,
20,
21,
74,
16,
65384,
32124,
1592,
1005,
29162,
1592,
741,
53183,
1669,
45402,
77538,
4286,
74186,
792,
26979,
2398,
24195,
14603,
1669,
449... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImmudbStoreReaderAsBefore(t *testing.T) {
opts := DefaultOptions().WithSynced(false).WithMaxConcurrency(4)
immuStore, err := Open("data_store_reader_as_before", opts)
require.NoError(t, err)
defer os.RemoveAll("data_store_reader_as_before")
txCount := 100
eCount := 100
for i := 0; i < txCount; i++ {
... | explode_data.jsonl/68526 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 611
} | [
2830,
3393,
50739,
661,
65,
6093,
5062,
2121,
10227,
1155,
353,
8840,
836,
8,
341,
64734,
1669,
7899,
3798,
1005,
2354,
12154,
291,
3576,
568,
2354,
5974,
79611,
7,
19,
340,
197,
12543,
84,
6093,
11,
1848,
1669,
5264,
445,
691,
14809,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDryRunCreateDoesntCreate(t *testing.T) {
s, destroy := NewDryRunnableTestStorage(t)
defer destroy()
obj := UnstructuredOrDie(`{"kind": "Pod"}`)
out := UnstructuredOrDie(`{}`)
err := s.Create(context.Background(), "key", obj, out, 0, true)
if err != nil {
t.Fatalf("Failed to create new dry-run object:... | explode_data.jsonl/5458 | {
"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,
85215,
6727,
4021,
21468,
406,
4021,
1155,
353,
8840,
836,
8,
341,
1903,
11,
6921,
1669,
1532,
85215,
68836,
2271,
5793,
1155,
340,
16867,
6921,
2822,
22671,
1669,
1230,
51143,
2195,
18175,
5809,
4913,
15314,
788,
330,
23527,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestLintInvalid(t *testing.T) {
ctx := context.TODO()
errs := eclint.Lint(ctx, "testdata/invalid/.editorconfig")
if len(errs) == 0 {
t.Error("an error was expected, got none")
}
for _, err := range errs {
if err == nil {
t.Error("an error was expected")
}
}
} | explode_data.jsonl/82389 | {
"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,
47556,
7928,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
90988,
2822,
9859,
82,
1669,
59958,
396,
1214,
396,
7502,
11,
330,
92425,
14,
11808,
11930,
8868,
1676,
1138,
743,
2422,
3964,
82,
8,
621,
220,
15,
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... | 4 |
func TestParseDurationString_ShouldParseDurationStringWithMultiValueUnits(t *testing.T) {
duration, err := ParseDurationString("10ms")
assert.NoError(t, err)
assert.Equal(t, time.Duration(10)*time.Millisecond, duration)
} | explode_data.jsonl/12150 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
14463,
12945,
703,
36578,
616,
14463,
12945,
703,
2354,
20358,
1130,
26314,
1155,
353,
8840,
836,
8,
341,
89300,
11,
1848,
1669,
14775,
12945,
703,
445,
16,
15,
1011,
5130,
6948,
35699,
1155,
11,
1848,
340,
6948,
12808,
1155... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCopy(t *testing.T) {
ctx := log.Testing(t)
type StructB struct {
F float32
P *StructB
}
type StructA struct {
I int
B bool
T string
P *StructB
M map[int]StructB
S []bool
G interface{}
A assignable
N nonAssignable
}
cyclic := &StructB{F: 10}
cyclic.P = cyclic
for _, test := range... | explode_data.jsonl/65699 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 731
} | [
2830,
3393,
12106,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
1487,
8787,
287,
1155,
340,
13158,
16139,
33,
2036,
341,
197,
12727,
2224,
18,
17,
198,
197,
10025,
353,
9422,
33,
198,
197,
532,
13158,
16139,
32,
2036,
341,
197,
24486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAdapterResponse_UnmarshalJSON_Happy(t *testing.T) {
tests := []struct {
name, content string
expect decimal.Decimal
}{
{"basic", `{"data":{"result":123.4567890},"jobRunID":"1","statusCode":200}`, decimal.NewFromFloat(123.456789)},
{"bravenewcoin", mustReadFile(t, "../testdata/bravenewcoin.json... | explode_data.jsonl/26500 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 330
} | [
2830,
3393,
5940,
2582,
40687,
27121,
5370,
2039,
11144,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
11,
2213,
914,
198,
197,
24952,
286,
12122,
40675,
198,
197,
59403,
197,
197,
4913,
22342,
497,
1565,
4913,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Response_Data_Sniff_DoesntOverride(t *testing.T) {
const msg = "<html>this is HTML."
testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error {
w.Header().Set("Content-Type", "foo/bar")
io.WriteString(w, msg)
return nil
}, func(st *serverTester) {
getSlash(st)
hf := st.wantH... | explode_data.jsonl/71663 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 414
} | [
2830,
3393,
5475,
65873,
17817,
1098,
77,
3092,
1557,
7072,
406,
2177,
1155,
353,
8840,
836,
8,
341,
4777,
3750,
284,
4055,
1551,
89810,
374,
9308,
10040,
18185,
5475,
2582,
1155,
11,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteJob(t *testing.T) {
db := getTestDB()
defer db.Close()
tx, _ := db.Beginx()
defer tx.Rollback()
var insertedJobID int64
insertedJob := &Job{
QueueName: "foo",
Data: []byte("update bar"),
RunAfter: time.Now(),
}
err := tx.QueryRow(`
INSERT into pgq_jobs (
queue_name, data, run_af... | explode_data.jsonl/48961 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 319
} | [
2830,
3393,
6435,
12245,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
633,
2271,
3506,
741,
16867,
2927,
10421,
741,
46237,
11,
716,
1669,
2927,
28467,
87,
741,
16867,
9854,
88918,
2822,
2405,
21578,
12245,
915,
526,
21,
19,
198,
59847,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDecodeAssuredCallStatusFailure(t *testing.T) {
decoded := false
expected := &Call{
Path: "test/assured",
StatusCode: http.StatusOK,
Method: http.MethodGet,
Headers: map[string]string{"Assured-Status": "four oh three"},
Query: map[string]string{},
}
testDecode := func(resp http.R... | explode_data.jsonl/20256 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 332
} | [
2830,
3393,
32564,
5615,
3073,
7220,
2522,
17507,
1155,
353,
8840,
836,
8,
341,
197,
62913,
1669,
895,
198,
42400,
1669,
609,
7220,
515,
197,
69640,
25,
981,
330,
1944,
14,
395,
3073,
756,
197,
197,
15872,
25,
1758,
52989,
345,
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 TestCloser_Ctx(t *testing.T) {
t.Parallel()
var c sync.Closer
ctx := c.Ctx()
assert.NoError(t, ctx.Err())
assert.Nil(t, ctx.Value(nil))
_, ok := ctx.Deadline()
assert.False(t, ok)
select {
case <-ctx.Done():
t.Error("context should not be closed")
default: // expected
}
done := make(chan struct{})
... | explode_data.jsonl/47720 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
51236,
799,
920,
3998,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2405,
272,
12811,
727,
69215,
198,
20985,
1669,
272,
727,
3998,
741,
6948,
35699,
1155,
11,
5635,
27862,
2398,
6948,
59678,
1155,
11,
5635,
6167,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJobSpecsController_Show_Unauthenticated(t *testing.T) {
t.Parallel()
rpcClient, gethClient, _, assertMocksCalled := cltest.NewEthMocksWithStartupAssertions(t)
defer assertMocksCalled()
app, cleanup := cltest.NewApplication(t,
eth.NewClientWith(rpcClient, gethClient),
)
defer cleanup()
require.NoError(... | explode_data.jsonl/31823 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 191
} | [
2830,
3393,
12245,
8327,
82,
2051,
79665,
40687,
57707,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
7000,
3992,
2959,
11,
633,
71,
2959,
11,
8358,
2060,
72577,
20960,
1669,
1185,
1944,
7121,
65390,
11571,
16056,
39076,
90206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewInvoice(t *testing.T) {
t.Parallel()
tests := []struct {
newInvoice func() (*Invoice, error)
encodedInvoice string
valid bool
}{
{
// Both Description and DescriptionHash set.
newInvoice: func() (*Invoice, error) {
return NewInvoice(chaincfg.MainNetParams(),
testPayme... | explode_data.jsonl/40481 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2202
} | [
2830,
3393,
3564,
34674,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
8638,
34674,
257,
2915,
368,
4609,
34674,
11,
1465,
340,
197,
197,
19329,
34674,
914,
198,
197,
56322,
688,
1807,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestJobsController_Show_NonExistentID(t *testing.T) {
client, cleanup, _, _, _, _ := setupJobSpecsControllerTestsWithJobs(t)
defer cleanup()
response, cleanup := client.Get("/v2/jobs/999999999")
defer cleanup()
cltest.AssertServerResponse(t, response, http.StatusNotFound)
} | explode_data.jsonl/1628 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 101
} | [
2830,
3393,
40667,
2051,
79665,
1604,
263,
840,
18128,
915,
1155,
353,
8840,
836,
8,
341,
25291,
11,
21290,
11,
8358,
8358,
8358,
716,
1669,
6505,
12245,
8327,
82,
2051,
2271,
16056,
40667,
1155,
340,
16867,
21290,
2822,
21735,
11,
2129... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFindByNumber(t *testing.T) {
table := Load(data)
if len(Find(table, "949")) != 1 {
t.Fatal("Find Failed to find 1 match by Number")
}
} | explode_data.jsonl/5874 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 58
} | [
2830,
3393,
47131,
2833,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
8893,
2592,
340,
743,
2422,
7832,
484,
15761,
11,
330,
24,
19,
24,
2761,
961,
220,
16,
341,
197,
3244,
26133,
445,
9885,
21379,
311,
1477,
220,
16,
2432,
553,
5624,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrWrap1(t *testing.T) {
errorf, ok := I.FindFuncv("Errorf")
if !ok {
t.Fatal("FindFuncv failed: Errorf")
}
frame := &errors.Frame{
Pkg: "main",
Func: "TestErrWrap",
Code: `errorf("not found")?`,
File: `./flow_test.go`,
Line: 45,
}
retErr := NewVar(TyError, "err")
code := newBuilder().
D... | explode_data.jsonl/74954 | {
"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,
7747,
26787,
16,
1155,
353,
8840,
836,
8,
341,
18290,
69,
11,
5394,
1669,
358,
9998,
9626,
85,
445,
1454,
69,
1138,
743,
753,
562,
341,
197,
3244,
26133,
445,
9885,
9626,
85,
4641,
25,
4600,
69,
1138,
197,
630,
34465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnknownFieldFails(t *testing.T) {
_, ac := newNonRunningTestResourceAdmissionController(t)
req := &admissionv1beta1.AdmissionRequest{
Operation: admissionv1beta1.Create,
Kind: metav1.GroupVersionKind{
Group: "pkg.knative.dev",
Version: "v1alpha1",
Kind: "Resource",
},
}
marshaled, err ... | explode_data.jsonl/18333 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 260
} | [
2830,
3393,
13790,
1877,
37,
6209,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1613,
1669,
501,
8121,
18990,
2271,
4783,
2589,
2728,
2051,
1155,
340,
24395,
1669,
609,
329,
2728,
85,
16,
19127,
16,
17865,
2728,
1900,
515,
197,
197,
8432,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUtilUUID(t *testing.T) {
for id := 1; id < 11; id++ {
recordUUID, err := uuid.GenerateUUID()
t.Logf("Checking[%d]: %s\n", id, recordUUID)
if err != nil {
t.Fatalf("Failed to generate UUID %s: %s ", recordUUID, err)
} else if isValidUUID(recordUUID) == false {
t.Fatalf("Failed to validate UUID: %... | explode_data.jsonl/9658 | {
"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,
2742,
24754,
1155,
353,
8840,
836,
8,
341,
2023,
877,
1669,
220,
16,
26,
877,
366,
220,
16,
16,
26,
877,
1027,
341,
197,
71952,
24754,
11,
1848,
1669,
16040,
57582,
24754,
741,
197,
3244,
98954,
445,
40129,
25113,
67,
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... | 4 |
func TestAddGlobalArtifactToScope(t *testing.T) {
woc := newWoc()
art := wfv1.Artifact{
Name: "test-art",
ArtifactLocation: wfv1.ArtifactLocation{
S3: &wfv1.S3Artifact{
S3Bucket: wfv1.S3Bucket{
Bucket: "my-bucket",
},
Key: "some/key",
},
},
}
// Make sure if the artifact is not global, ... | explode_data.jsonl/54375 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 623
} | [
2830,
3393,
2212,
11646,
85578,
1249,
10803,
1155,
353,
8840,
836,
8,
341,
6692,
509,
1669,
501,
54,
509,
741,
197,
471,
1669,
289,
27890,
16,
50064,
20754,
515,
197,
21297,
25,
330,
1944,
37821,
756,
197,
197,
85578,
4707,
25,
289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientHook(t *testing.T) {
var g generator
g.clientHook("Foo")
got := g.pt.String()
want := "var newFooClientHook clientHook\n\n"
if diff := cmp.Diff(got, want); diff != "" {
t.Errorf("clientHook() (-got,+want): %s", diff)
}
} | explode_data.jsonl/40031 | {
"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,
2959,
31679,
1155,
353,
8840,
836,
8,
341,
2405,
342,
13823,
271,
3174,
6581,
31679,
445,
40923,
1138,
3174,
354,
1669,
342,
39326,
6431,
741,
50780,
1669,
330,
947,
501,
40923,
2959,
31679,
2943,
31679,
1699,
1699,
1837,
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 TestNestedSeq(t *testing.T) {
input := "(concat (0 1 2) (3 4 5))"
lex := lexer.NewLexer(input)
tokens, _ := lex.GetTokens()
parser := NewParser(tokens)
expressions, _ := parser.GetExpressions()
sym, ok := expressions[0].(expr.Seq).Exprs[0].(expr.Symbol)
if !ok {
t.Fatalf("Expected symbol to be symbol")
}... | explode_data.jsonl/43721 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 325
} | [
2830,
3393,
71986,
20183,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
11993,
20164,
320,
15,
220,
16,
220,
17,
8,
320,
18,
220,
19,
220,
20,
53740,
197,
2571,
1669,
53259,
7121,
92847,
5384,
340,
3244,
9713,
11,
716,
1669,
22429,
223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenericHTTPFeatures(t *testing.T) {
ht := StartHTTPTest(t, "base")
defer ht.Finish()
// CORS
w := ht.Get("/")
if ht.Assert.Equal(200, w.Code) {
ht.Assert.Empty(w.HeaderMap.Get("Access-Control-Allow-Origin"))
}
w = ht.Get("/", func(r *http.Request) {
r.Header.Set("Origin", "somewhere.com")
})
if... | explode_data.jsonl/46408 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 275
} | [
2830,
3393,
19964,
9230,
21336,
1155,
353,
8840,
836,
8,
341,
197,
426,
1669,
5145,
9230,
2271,
1155,
11,
330,
3152,
1138,
16867,
34323,
991,
18176,
2822,
197,
322,
90666,
198,
6692,
1669,
34323,
2234,
61710,
743,
34323,
11711,
12808,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGraph_BuildOrder(t *testing.T) {
testSuite := []struct {
title string
variables []string
dependencies map[string][]string
result []Group
}{
{
title: "single variable",
variables: []string{"myVariable"},
result: []Group{{Variables: []string{"myVariable"}}},
},
{
... | explode_data.jsonl/34532 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 744
} | [
2830,
3393,
11212,
96686,
4431,
1155,
353,
8840,
836,
8,
341,
18185,
28000,
1669,
3056,
1235,
341,
197,
24751,
286,
914,
198,
197,
2405,
2156,
82,
262,
3056,
917,
198,
197,
197,
54274,
2415,
14032,
45725,
917,
198,
197,
9559,
981,
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... | 2 |
func TestReadMultipleTopLevelDocuments(t *testing.T) {
testCases := []struct {
name string
input string
expected [][]byte
}{
{
"single top-level document",
"{\"foo\":1}",
[][]byte{
{0x0E, 0x00, 0x00, 0x00, 0x10, 'f', 'o', 'o', 0x00, 0x01, 0x00, 0x00, 0x00, 0x00},
},
},
{
"single ... | explode_data.jsonl/44883 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1128
} | [
2830,
3393,
4418,
32089,
5366,
4449,
27143,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
22427,
262,
914,
198,
197,
42400,
52931,
3782,
198,
197,
59403,
197,
197,
515,
298,
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... | 4 |
func TestReversiAnz36(t *testing.T) {
r := NewReversiAnz()
if r.GetOwnEdgeSideOtherCnt() != 0 {
t.Errorf("NG")
}
} | explode_data.jsonl/23059 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 58
} | [
2830,
3393,
693,
3004,
72,
2082,
89,
18,
21,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
693,
3004,
72,
2082,
89,
741,
743,
435,
2234,
14182,
11656,
16384,
11409,
33747,
368,
961,
220,
15,
341,
197,
3244,
13080,
445,
6140,
1138,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestRunDASH(t *testing.T) {
if testing.Short() {
t.Skip("skip test in short mode")
}
sess := newSessionForTesting(t)
defer sess.Close()
builder, err := sess.NewExperimentBuilder("dash")
if err != nil {
t.Fatal(err)
}
if !builder.Interruptible() {
t.Fatal("dash not marked as interruptible")
}
runexp... | explode_data.jsonl/26307 | {
"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,
6727,
35,
9537,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
20599,
1273,
304,
2805,
3856,
1138,
197,
532,
1903,
433,
1669,
501,
5283,
2461,
16451,
1155,
340,
16867,
21875,
10421,
741,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestWorkerErrNoneFuncs(t *testing.T) {
if !runIntegrationTests {
t.Skip("To run this test, use: go test -integration")
}
err := worker.Ready()
if err != ErrNoneFuncs {
t.Error("ErrNoneFuncs expected.")
}
} | explode_data.jsonl/43512 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 87
} | [
2830,
3393,
21936,
7747,
4064,
9626,
82,
1155,
353,
8840,
836,
8,
341,
743,
753,
6108,
52464,
18200,
341,
197,
3244,
57776,
445,
1249,
1598,
419,
1273,
11,
990,
25,
728,
1273,
481,
60168,
1138,
197,
532,
9859,
1669,
11864,
6503,
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... | 3 |
func TestParticiaTrie_DeleteNonExistent(t *testing.T) {
trie := NewTrie()
insertData := []testData{
{"Pepan", "Pepan Zdepan", success},
{"Honza", "Honza Novak", success},
{"Jenik", "Jenik Poustevnicek", success},
}
deleteData := []testData{
{"Pepan", "Pepan Zdepan", success},
{"Honza", "Honza Novak", suc... | explode_data.jsonl/2370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 409
} | [
2830,
3393,
5800,
24024,
51,
7231,
57418,
8121,
840,
18128,
1155,
353,
8840,
836,
8,
341,
197,
8927,
1669,
1532,
51,
7231,
2822,
59847,
1043,
1669,
3056,
1944,
1043,
515,
197,
197,
4913,
47,
747,
276,
497,
330,
47,
747,
276,
1863,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestRCManagerNotReady(t *testing.T) {
c := clientset.NewForConfigOrDie(&restclient.Config{Host: "", ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}})
fakePodControl := controller.FakePodControl{}
manager := NewReplicationManager(c, controller.NoResyncPeriodFunc, 2, 0)
mana... | explode_data.jsonl/37496 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 346
} | [
2830,
3393,
7380,
2043,
2623,
19202,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2943,
746,
7121,
2461,
2648,
2195,
18175,
2099,
3927,
2972,
10753,
90,
9296,
25,
7342,
8883,
2648,
25,
2732,
2972,
12614,
2648,
90,
2808,
5637,
25,
1273,
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 TestLogRecorder(t *testing.T) {
r := NewLogRecorder()
assert := assert.New(t)
assert.Empty(r.String())
r.Log(logx.LevelDebug, "")
r.Log(logx.LevelError, "msg")
r.Log(logx.LevelInfo, "", "k1", "v1", "k2", 2, 3)
r.Log(logx.LevelInfo, "msg", "k1", "v1")
res := r.String()
want := `level=DEBUG message=
level... | explode_data.jsonl/59264 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 410
} | [
2830,
3393,
2201,
47023,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
2201,
47023,
741,
6948,
1669,
2060,
7121,
1155,
340,
6948,
11180,
2601,
6431,
12367,
7000,
5247,
12531,
87,
25259,
7939,
11,
14676,
7000,
5247,
12531,
87,
25259,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLimitWorkspaceScope(t *testing.T) {
const mod = `
-- go.mod --
module mod.com
-- a/main.go --
package main
func main() {}
-- main.go --
package main
func main() {
var x int
}
`
withOptions(WithRootPath("a")).run(t, mod, func(t *testing.T, env *Env) {
env.OpenFile("a/main.go")
env.Await(
env.Diagnos... | explode_data.jsonl/38936 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 236
} | [
2830,
3393,
16527,
45981,
10803,
1155,
353,
8840,
836,
8,
341,
4777,
1463,
284,
22074,
313,
728,
10929,
39514,
4352,
1463,
905,
198,
313,
264,
15351,
18002,
39514,
1722,
1887,
271,
2830,
1887,
368,
5613,
313,
1887,
18002,
39514,
1722,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCaptureVariables(t *testing.T) {
tests := []struct {
s string
expected []string
}{
{
"${scheme}://${host}",
[]string{"scheme", "host"},
},
{
"http://www.nginx.org",
nil,
},
{
"${}",
[]string{""},
},
}
for _, test := range tests {
result := captureVariables(test.s)... | explode_data.jsonl/65834 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 216
} | [
2830,
3393,
27429,
22678,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
1903,
286,
914,
198,
197,
42400,
3056,
917,
198,
197,
59403,
197,
197,
515,
298,
197,
74013,
46141,
92,
72271,
3790,
24375,
298,
197,
1294,
917... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateModel_WithRef(t *testing.T) {
tt := templateTest{t, templates.MustGet("model").Lookup("schema")}
specDoc, err := loads.Spec("../fixtures/codegen/todolist.models.yml")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
schema := definitions["WithRef"]
opts := opts()
genModel, err ... | explode_data.jsonl/2515 | {
"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,
31115,
1712,
62,
2354,
3945,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
3811,
2271,
90,
83,
11,
19911,
50463,
1949,
445,
2528,
1827,
34247,
445,
17349,
42132,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
46928... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDialHost(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
md := newMockDialer()
md.setDial(md.unreachableDial)
_, err := dialHost(ctx, md)
if _, ok := err.(*ErrMaxConnectAttempts); !ok {
t.Fatalf("Didn't receive expected ErrMaxConnectAttempts. Got: %s", err)
}
e ... | explode_data.jsonl/55819 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 296
} | [
2830,
3393,
35,
530,
9296,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
741,
84374,
1669,
501,
11571,
35,
530,
261,
741,
84374,
980,
35,
530,
48645,
6307,
46550,
35,
530,
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... | 5 |
func TestCheck_Valid(t *testing.T) {
type args struct {
custom *check.Custom
}
type wants struct {
err error
script string
}
validQuery := `package main
import "influxdata/influxdb/monitor"
import "influxdata/influxdb/v1"
data = from(bucket: "_tasks")
|> range(start: -1m)
|> filter(fn: (r) =>
(r._me... | explode_data.jsonl/7556 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1882
} | [
2830,
3393,
3973,
97279,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1444,
1450,
353,
2028,
27649,
198,
197,
532,
13158,
6801,
2036,
341,
197,
9859,
262,
1465,
198,
197,
86956,
914,
198,
197,
630,
56322,
2859,
1669,
156... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPretty(t *testing.T) {
exp := "\u274c int value:\nexp 42\ngot -1"
got := fmtexpl.Pretty("int value", 42, -1)
if got != exp {
t.Errorf("\nexp %s\ngot %s", exp, got)
}
} | explode_data.jsonl/56816 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 85
} | [
2830,
3393,
51940,
1155,
353,
8840,
836,
8,
341,
48558,
1669,
2917,
84,
17,
22,
19,
66,
526,
897,
7190,
77,
4580,
220,
19,
17,
59,
968,
354,
481,
16,
698,
3174,
354,
1669,
8879,
29892,
1069,
21322,
445,
396,
897,
497,
220,
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... | 2 |
func TestGitGetter_setupGitEnvWithExisting_sshKey(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skipf("skipping on windows since the test requires sh")
return
}
// start with an existing ssh command configuration
os.Setenv("GIT_SSH_COMMAND", "ssh -o StrictHostKeyChecking=no")
defer os.Setenv("GIT_SSH_COMMA... | explode_data.jsonl/39702 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
46562,
31485,
21363,
46562,
14359,
2354,
53067,
82805,
1592,
1155,
353,
8840,
836,
8,
341,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
341,
197,
3244,
57776,
69,
445,
4886,
5654,
389,
11030,
2474,
279,
1273,
7460,
557,
1138... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestHTMLAllowed(t *testing.T) {
for _, test := range htmlTestsAllowing {
output, err := HTMLAllowing(test.input)
if err != nil {
t.Fatalf(Format, test.input, test.expected, output, err)
}
if output != test.expected {
t.Fatalf(Format, test.input, test.expected, output)
}
}
} | explode_data.jsonl/7071 | {
"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,
5835,
35382,
1155,
353,
8840,
836,
8,
1476,
2023,
8358,
1273,
1669,
2088,
5272,
18200,
18605,
287,
341,
197,
21170,
11,
1848,
1669,
9308,
18605,
287,
8623,
10046,
340,
197,
743,
1848,
961,
2092,
341,
298,
3244,
30762,
7,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestNewCommand(t *testing.T) {
// Arrange
ctx := context.Background()
wg := &sync.WaitGroup{}
lc := logger.MockLogger{}
testDefaultTimeout := "10s"
testDefaultRetryInterval := "1s"
tests := []struct {
name string
cmdArgs []string
timeout string
retryInterval string
expectedEr... | explode_data.jsonl/30991 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 996
} | [
2830,
3393,
3564,
4062,
1155,
353,
8840,
836,
8,
341,
197,
322,
40580,
198,
20985,
1669,
2266,
19047,
741,
72079,
1669,
609,
12996,
28384,
2808,
16094,
8810,
66,
1669,
5925,
24664,
7395,
16094,
18185,
3675,
7636,
1669,
330,
16,
15,
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... | 2 |
func TestConnAsyncCBDeadlock(t *testing.T) {
s := RunServerOnPort(TEST_PORT)
defer s.Shutdown()
ch := make(chan bool)
o := GetDefaultOptions()
o.Url = fmt.Sprintf("nats://127.0.0.1:%d", TEST_PORT)
o.ClosedCB = func(_ *Conn) {
ch <- true
}
o.AsyncErrorCB = func(nc *Conn, sub *Subscription, err error) {
// d... | explode_data.jsonl/44920 | {
"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,
9701,
6525,
12979,
28320,
1023,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
6452,
5475,
1925,
7084,
50320,
12377,
340,
16867,
274,
10849,
18452,
2822,
23049,
1669,
1281,
35190,
1807,
340,
22229,
1669,
2126,
3675,
3798,
741,
2222... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPS(t *testing.T) {
//
// Test Plan:
//
// - Spin up a named conatainer using appsody run (any one will do)
// - Use docker ps to wait until it is ready
// - execute 'appsody ps', and check it we get at least a header line and the
// right container in the output
// - use 'appsody stop' to stop the co... | explode_data.jsonl/42530 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 866
} | [
2830,
3393,
5012,
1155,
353,
8840,
836,
8,
341,
197,
2289,
197,
322,
3393,
9680,
510,
197,
2289,
197,
322,
481,
40685,
705,
264,
6941,
390,
459,
10453,
1667,
10500,
1076,
1598,
320,
3767,
825,
686,
653,
340,
197,
322,
481,
5443,
265... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldCreateMethodHandlers(t *testing.T) {
r := NewRouter()
items := map[string]func(string, HandlerProviderFunc){
http.MethodGet: r.Get,
http.MethodDelete: r.Delete,
http.MethodHead: r.Head,
http.MethodOptions: r.Options,
http.MethodPatch: r.Patch,
http.MethodPost: r.Post,
http.M... | explode_data.jsonl/18955 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 380
} | [
2830,
3393,
14996,
4021,
3523,
39949,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
9523,
2822,
46413,
1669,
2415,
14032,
60,
2830,
3609,
11,
19954,
5179,
9626,
1264,
197,
28080,
20798,
1949,
25,
257,
435,
2234,
345,
197,
28080,
20798... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoStructLevelValidation(t *testing.T) {
type Inner struct {
Test string `validate:"len=5"`
}
type Outer struct {
InnerStruct *Inner `validate:"required,nostructlevel"`
}
outer := &Outer{
InnerStruct: nil,
}
validate := New()
errs := validate.Struct(outer)
NotEqual(t, errs, nil)
AssertError... | explode_data.jsonl/77295 | {
"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,
2753,
9422,
4449,
13799,
1155,
353,
8840,
836,
8,
1476,
13158,
36356,
2036,
341,
197,
73866,
914,
1565,
7067,
2974,
2892,
28,
20,
8805,
197,
630,
13158,
55197,
2036,
341,
197,
197,
31597,
9422,
353,
31597,
1565,
7067,
2974,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDecompressStreamGzip(t *testing.T) {
cmd := exec.Command("sh", "-c", "touch /tmp/archive && gzip -f /tmp/archive")
output, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("Fail to create an archive file for test : %s.", output)
}
archive, err := os.Open(tmp + "archive.gz")
_, err = DecompressStrea... | explode_data.jsonl/81967 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
4900,
316,
1873,
3027,
38,
9964,
1155,
353,
8840,
836,
8,
341,
25920,
1669,
3883,
12714,
445,
927,
497,
6523,
66,
497,
330,
22020,
608,
5173,
71627,
1009,
57795,
481,
69,
608,
5173,
71627,
1138,
21170,
11,
1848,
1669,
5439... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMarshalLocalTime(t *testing.T) {
type timeStruct struct {
Time LocalTime
}
examples := []struct {
name string
in LocalTime
out string
}{
{
name: "normal",
out: "Time = 07:32:00\n",
in: LocalTime{
Hour: 7,
Minute: 32,
Second: 0,
Nanosecond: 0,
}},
{... | explode_data.jsonl/46364 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 452
} | [
2830,
3393,
55438,
7319,
1462,
1155,
353,
8840,
836,
8,
341,
13158,
882,
9422,
2036,
341,
197,
67567,
8774,
1462,
198,
197,
630,
8122,
4023,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
17430,
256,
8774,
1462,
198,
197,
13967,
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... | 3 |
func TestPrintRoleBinding(t *testing.T) {
tests := []struct {
binding rbac.RoleBinding
options printers.GenerateOptions
expected []metav1.TableRow
}{
// Basic role binding
{
binding: rbac.RoleBinding{
ObjectMeta: metav1.ObjectMeta{
Name: "binding1",
CreationTimestamp: metav1.... | explode_data.jsonl/21619 | {
"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,
8994,
9030,
15059,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
2233,
3961,
220,
18717,
580,
35955,
15059,
198,
197,
35500,
220,
55953,
57582,
3798,
198,
197,
42400,
3056,
4059,
402,
16,
18257,
3102,
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 TestDictValidatorEncode(t *testing.T) {
testCases := []encoderTestCase{
{
name: `KeysValidator=nil,Values.Validator=nil}"`,
schema: schema.Schema{
Fields: schema.Fields{
"d": {
Validator: &schema.Dict{},
},
},
},
customValidate: fieldValidator("d", `{"type": "object", "additi... | explode_data.jsonl/13166 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3221
} | [
2830,
3393,
13448,
14256,
32535,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
27008,
16458,
515,
197,
197,
515,
298,
11609,
25,
1565,
8850,
14256,
63358,
11,
6227,
13,
14256,
63358,
9863,
12892,
298,
1903,
3416,
25,
10802,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMongo_BlockUserWithTTL(t *testing.T) {
m, skip := prepMongo(t, true) // adds two comments
if skip {
return
}
assert.False(t, m.IsBlocked("radio-t", "user1"), "nothing blocked")
assert.NoError(t, m.SetBlock("radio-t", "user1", true, 500*time.Millisecond))
assert.True(t, m.IsBlocked("radio-t", "user1"), ... | explode_data.jsonl/54206 | {
"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,
54998,
51779,
1474,
2354,
51,
13470,
1155,
353,
8840,
836,
8,
341,
2109,
11,
10706,
1669,
21327,
54998,
1155,
11,
830,
8,
442,
11367,
1378,
6042,
198,
743,
10706,
341,
197,
853,
198,
197,
532,
6948,
50757,
1155,
11,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGrpc_LoadParaTxByTitle(t *testing.T) {
qapi.On("LoadParaTxByTitle", mock.Anything, mock.Anything, mock.Anything).Return(nil, nil)
_, err := g.LoadParaTxByTitle(getOkCtx(), &pb.ReqHeightByTitle{})
assert.NoError(t, err)
} | explode_data.jsonl/339 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 94
} | [
2830,
3393,
6464,
3992,
19553,
30205,
31584,
1359,
3851,
1155,
353,
8840,
836,
8,
341,
18534,
2068,
8071,
445,
5879,
30205,
31584,
1359,
3851,
497,
7860,
13311,
1596,
11,
7860,
13311,
1596,
11,
7860,
13311,
1596,
568,
5598,
27907,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParse(t *testing.T) {
testParse(t, clearsignInput, "Hello world\r\nline 2", "Hello world\nline 2\n")
testParse(t, clearsignInput2, "\r\n\r\n(This message has a couple of blank lines at the start and end.)\r\n\r\n", "\n\n(This message has a couple of blank lines at the start and end.)\n\n\n")
} | explode_data.jsonl/47769 | {
"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,
14463,
1155,
353,
8840,
836,
8,
341,
18185,
14463,
1155,
11,
2797,
7752,
2505,
11,
330,
9707,
1879,
12016,
1699,
1056,
220,
17,
497,
330,
9707,
1879,
1699,
1056,
220,
17,
1699,
1138,
18185,
14463,
1155,
11,
2797,
7752,
250... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVerify(t *testing.T) {
testRules := []struct {
Role string
Resource *auth.Resource
}{
{
Role: "*",
Resource: &auth.Resource{Type: "service", Name: "go.micro.apps", Endpoint: "Apps.PublicList"},
},
{
Role: "user.*",
Resource: &auth.Resource{Type: "service", Name: "go.micro.ap... | explode_data.jsonl/80454 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1371
} | [
2830,
3393,
32627,
1155,
353,
8840,
836,
8,
341,
18185,
26008,
1669,
3056,
1235,
341,
197,
197,
9030,
257,
914,
198,
197,
79487,
353,
3242,
20766,
198,
197,
59403,
197,
197,
515,
298,
197,
9030,
25,
257,
15630,
756,
298,
79487,
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 TestParseEventDeclaration(t *testing.T) {
t.Parallel()
result, errs := ParseProgram(`
event Transfer(to: Address, from: Address)
`)
require.Empty(t, errs)
utils.AssertEqualWithDiff(t,
[]ast.Declaration{
&ast.CompositeDeclaration{
CompositeKind: common.CompositeKindEvent,
Identifier: as... | explode_data.jsonl/35989 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1450
} | [
2830,
3393,
14463,
1556,
24489,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
9559,
11,
70817,
1669,
14775,
10690,
61528,
286,
1538,
23200,
12186,
25,
9177,
11,
504,
25,
9177,
340,
197,
24183,
17957,
11180,
1155,
11,
70817,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGossipAfterAbortOfSystemConfigTransactionAfterFailureDueToIntents(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
ctx := context.Background()
tc := testcluster.StartTestCluster(t, 1, base.TestClusterArgs{})
defer tc.Stopper().Stop(ctx)
require.NoError(t, tc.WaitForFullReplicat... | explode_data.jsonl/1141 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 736
} | [
2830,
3393,
38,
41473,
6025,
85891,
2124,
2320,
2648,
8070,
6025,
17507,
33060,
38544,
805,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
16867,
1487,
77940,
1155,
568,
7925,
1155,
692,
20985,
1669,
2266,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInitMap(t *testing.T) {
m1 := map[int]int{1: 1, 2: 4, 3: 9}
t.Log(m1[2])
t.Logf("len m1=%d", len(m1))
m2 := map[int]int{}
m2[4] = 16
t.Logf("len m2=%d", len(m2))
m3 := make(map[int]int, 10)
t.Logf("len m3=%d", len(m3))
} | explode_data.jsonl/74655 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 141
} | [
2830,
3393,
3803,
2227,
1155,
353,
8840,
836,
8,
341,
2109,
16,
1669,
2415,
18640,
63025,
90,
16,
25,
220,
16,
11,
220,
17,
25,
220,
19,
11,
220,
18,
25,
220,
24,
532,
3244,
5247,
1255,
16,
58,
17,
2546,
3244,
98954,
445,
2892,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCombine(t *testing.T) {
type args struct {
n int
k int
}
tests := []struct {
name string
args args
want [][]int
}{
{
name: "01",
args: args{
n: 4,
k: 2,
},
want: [][]int{
{1, 2},
{1, 3},
{1, 4},
{2, 3},
{2, 4},
{3, 4},
},
},
{
name: "02",
... | explode_data.jsonl/7369 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 380
} | [
2830,
3393,
81114,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
9038,
526,
198,
197,
16463,
526,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
52931,
396,
198,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestUnmarshal(t *testing.T) {
cgroupRoot := "/ecs/taskid"
cgroupMountPath := "/sys/fs/cgroup"
bytes := []byte("{\"CgroupRoot\":\"/ecs/taskid\",\"CgroupMountPath\":\"/sys/fs/cgroup\"," +
"\"CreatedAt\":\"0001-01-01T00:00:00Z\",\"DesiredStatus\":\"CREATED\",\"KnownStatus\":\"NONE\"}")
unmarshalledCgroup := &Cg... | explode_data.jsonl/68164 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 305
} | [
2830,
3393,
1806,
27121,
1155,
353,
8840,
836,
8,
341,
1444,
4074,
8439,
1669,
3521,
53717,
58186,
307,
698,
1444,
4074,
16284,
1820,
1669,
3521,
7791,
73036,
2899,
4074,
698,
70326,
1669,
3056,
3782,
99141,
34,
4074,
8439,
23488,
14,
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 TestMySQLServerRepoAll(t *testing.T) {
TestMySQLServerRepo_Execute(t)
TestMySQLServerRepo_Transaction(t)
TestMySQLServerRepo_Create(t)
TestMySQLServerRepo_GetAll(t)
TestMySQLServerRepo_GetByClusterID(t)
TestMySQLServerRepo_GetByID(t)
TestMySQLServerRepo_GetByHostInfo(t)
TestMySQLServerRepo_GetID(t)
TestMy... | explode_data.jsonl/80034 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
59224,
5475,
25243,
2403,
1155,
353,
8840,
836,
8,
341,
73866,
59224,
5475,
25243,
83453,
1155,
340,
73866,
59224,
5475,
25243,
34932,
1311,
1155,
340,
73866,
59224,
5475,
25243,
34325,
1155,
340,
73866,
59224,
5475,
25243,
1361... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVbdec32(t *testing.T) {
for _, test := range []struct {
name string
input []byte
want []uint32
}{
{
name: "first1", // first value fitting in 1 byte
input: []byte{0x00},
want: []uint32{0},
},
{
name: "last1", // last value fitting in 1 byte
input: []byte{0xb0},
want: []ui... | explode_data.jsonl/48360 | {
"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,
53,
65,
8169,
18,
17,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
22427,
3056,
3782,
198,
197,
50780,
220,
3056,
2496,
18,
17,
198,
197,
59403,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestProvider_Format(t *testing.T) {
mockSingle := storage.MockNvmeController()
for name, tc := range map[string]struct {
req storage.BdevFormatRequest
mbc *MockBackendConfig
expRes *storage.BdevFormatResponse
expErr error
}{
"empty input": {
req: storage.BdevFormatRequest{},
expErr: er... | explode_data.jsonl/67555 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1041
} | [
2830,
3393,
5179,
72999,
1155,
353,
8840,
836,
8,
341,
77333,
10888,
1669,
5819,
24664,
45,
85,
2660,
2051,
2822,
2023,
829,
11,
17130,
1669,
2088,
2415,
14032,
60,
1235,
341,
197,
24395,
262,
5819,
1785,
3583,
4061,
1900,
198,
197,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestMachoFiles(t *testing.T) {
skipUnlessDarwinAmd64(t)
t.Skip("Disabled because of issues with addr2line (see https://github.com/google/pprof/pull/313#issuecomment-364073010)")
// Load `file`, pretending it was mapped at `start`. Then get the symbol
// table. Check that it contains the symbol `sym` and that... | explode_data.jsonl/74916 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 832
} | [
2830,
3393,
44,
63429,
10809,
1155,
353,
8840,
836,
8,
341,
1903,
13389,
35587,
52673,
7526,
32,
2277,
21,
19,
1155,
692,
3244,
57776,
445,
25907,
1576,
315,
4714,
448,
10789,
17,
1056,
320,
4060,
3703,
1110,
5204,
905,
40689,
87146,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProviderRateLimiterDisable(t *testing.T) {
t.Log("testing providerratelimiter handler with qps enabled as false")
initEnv()
c := handler.Chain{}
c.AddHandler(&handler.ProviderRateLimiterHandler{})
config.GlobalDefinition = &model.GlobalCfg{}
config.GlobalDefinition.Cse.FlowControl.Provider.QPS.Enabled ... | explode_data.jsonl/62819 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 258
} | [
2830,
3393,
5179,
11564,
43,
17700,
25479,
1155,
353,
8840,
836,
8,
341,
3244,
5247,
445,
8840,
2059,
59609,
301,
17700,
7013,
448,
2804,
1690,
8970,
438,
895,
1138,
28248,
14359,
2822,
1444,
1669,
7013,
98269,
16094,
1444,
1904,
3050,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetRetryTimes(t *testing.T) {
assert := internal.NewAssert(t, "TestSetRetryTimes")
var number int
increaseNumber := func() error {
number++
return errors.New("error occurs")
}
err := Retry(increaseNumber, RetryDuration(time.Microsecond*50), RetryTimes(3))
assert.IsNotNil(err)
assert.Equal(3, numb... | explode_data.jsonl/30740 | {
"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,
1649,
51560,
18889,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
5306,
7121,
8534,
1155,
11,
330,
2271,
1649,
51560,
18889,
5130,
2405,
1372,
526,
198,
17430,
19947,
2833,
1669,
2915,
368,
1465,
341,
197,
57135,
22940,
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,
1,
1... | 1 |
func TestUnknownAuthorityError(t *testing.T) {
for i, tt := range unknownAuthorityErrorTests {
der, _ := pem.Decode([]byte(tt.cert))
if der == nil {
t.Errorf("#%d: Unable to decode PEM block", i)
}
c, err := ParseCertificate(der.Bytes)
if err != nil {
t.Errorf("#%d: Unable to parse certificate -> %v", ... | explode_data.jsonl/29002 | {
"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,
13790,
45532,
1454,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
17853,
1669,
2088,
9788,
45532,
1454,
18200,
341,
197,
197,
1107,
11,
716,
1669,
54184,
56372,
10556,
3782,
47152,
67016,
1171,
197,
743,
2694,
621,
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 TestEncryptionHeaderExistsTrue(t *testing.T) {
encImagePath := "../test/cirros-x86.qcow2_enc"
isImageEncrypted, err := EncryptionHeaderExists(encImagePath)
assert.NoError(t, err)
assert.True(t, isImageEncrypted)
} | explode_data.jsonl/24981 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 84
} | [
2830,
3393,
79239,
4047,
15575,
2514,
1155,
353,
8840,
836,
8,
341,
197,
954,
66356,
1669,
7005,
1944,
2899,
404,
3630,
6558,
23,
21,
11354,
18921,
17,
13781,
698,
19907,
1906,
7408,
14026,
11,
1848,
1669,
62055,
4047,
15575,
66941,
663... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCustomerUsecaseImpl_CheckAccoutExist(t *testing.T) {
t.Run("Test Normal Case", func(t *testing.T) {
mockAccountRepo := new(mocks.CustomerRepoMock)
mockAccountRepo.On("CheckAccoutExist", mockAccount.AccountNumber).Return(nil)
customerUsecase := usecase.CreateCustomerUsecase(mockAccountRepo)
isExist :... | explode_data.jsonl/70252 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
12792,
52,
5024,
519,
9673,
28188,
14603,
411,
25613,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
2271,
18437,
11538,
497,
2915,
1155,
353,
8840,
836,
8,
1476,
197,
77333,
7365,
25243,
1669,
501,
1255,
25183,
37293,
2524... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_AZUQueueStorageAnalyticsTurnedOn(t *testing.T) {
expectedCode := "azure-storage-queue-services-logging-enabled"
var tests = []struct {
name string
source string
mustIncludeResultCode string
mustExcludeResultCode string
}{
{
name: "check queue services storage a... | explode_data.jsonl/43004 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 759
} | [
2830,
3393,
1566,
57,
52,
7554,
5793,
60539,
19389,
291,
1925,
1155,
353,
8840,
836,
8,
341,
42400,
2078,
1669,
330,
39495,
62795,
12,
4584,
58292,
12,
25263,
54192,
1837,
2405,
7032,
284,
3056,
1235,
341,
197,
11609,
1698,
914,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestExportDictionaryValue(t *testing.T) {
t.Parallel()
t.Run("Empty", func(t *testing.T) {
t.Parallel()
script := `
access(all) fun main(): {String: Int} {
return {}
}
`
actual := exportValueFromScript(t, script)
expected := cadence.NewDictionary([]cad... | explode_data.jsonl/4623 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 478
} | [
2830,
3393,
16894,
8517,
1130,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
3244,
16708,
445,
3522,
497,
2915,
1155,
353,
8840,
836,
8,
1476,
197,
3244,
41288,
7957,
2822,
197,
86956,
1669,
22074,
310,
2615,
20388,
8,
2464,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSpanLink_MoveTo(t *testing.T) {
ms := generateTestSpanLink()
dest := NewSpanLink()
ms.MoveTo(dest)
assert.EqualValues(t, NewSpanLink(), ms)
assert.EqualValues(t, generateTestSpanLink(), dest)
} | explode_data.jsonl/63294 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 81
} | [
2830,
3393,
12485,
3939,
66352,
1249,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
6923,
2271,
12485,
3939,
741,
49616,
1669,
1532,
12485,
3939,
741,
47691,
31195,
1249,
27010,
340,
6948,
12808,
6227,
1155,
11,
1532,
12485,
3939,
1507,
9829... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUserCountsWithPostsByDay(t *testing.T) {
Setup()
t1 := &model.Team{}
t1.DisplayName = "DisplayName"
t1.Name = "zz" + model.NewId() + "b"
t1.Email = model.NewId() + "@nowhere.com"
t1.Type = model.TEAM_OPEN
t1 = Must(store.Team().Save(t1)).(*model.Team)
c1 := &model.Channel{}
c1.TeamId = t1.Id
c1.Dis... | explode_data.jsonl/55952 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 762
} | [
2830,
3393,
1474,
2507,
16056,
19631,
1359,
10159,
1155,
353,
8840,
836,
8,
341,
197,
21821,
2822,
3244,
16,
1669,
609,
2528,
65842,
16094,
3244,
16,
77574,
284,
330,
26456,
698,
3244,
16,
2967,
284,
330,
10400,
1,
488,
1614,
7121,
76... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRuleMultiValueAttribute(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := []string{
"select c1,c2,c3,c4 from tab1 where col_id REGEXP '[[:<:]]12[[:>:]]'",
}
for _, sql := range sqls {
q, err := NewQuery4Audit(sql)
if err == nil {
rule := q.RuleMultiValueAt... | explode_data.jsonl/76780 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
11337,
20358,
1130,
3907,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
3056,
917,
515,
197,
197,
1,
1742,
272,
16,
10109,
17,
10109,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSystemRootsError(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Windows does not use (or support) systemRoots")
}
defer func(oldSystemRoots *CertPool) { systemRoots = oldSystemRoots }(systemRootsPool())
opts := VerifyOptions{
Intermediates: NewCertPool(),
DNSName: "www.google.com",
... | explode_data.jsonl/29007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 294
} | [
2830,
3393,
2320,
8439,
82,
1454,
1155,
353,
8840,
836,
8,
341,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
341,
197,
3244,
57776,
445,
13164,
1558,
537,
990,
320,
269,
1824,
8,
1849,
8439,
82,
1138,
197,
630,
16867,
2915,
21972,
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 TestCatchUpClient_GetBlocks(t *testing.T) {
lg, err := logger.New(&logger.Config{
Level: "info",
OutputPath: []string{"stdout"},
ErrOutputPath: []string{"stderr"},
Encoding: "console",
})
require.NoError(t, err)
localConfigs, sharedConfig := newTestSetup(t, 2)
tr1, err := startTransp... | explode_data.jsonl/70494 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 460
} | [
2830,
3393,
57760,
2324,
2959,
13614,
29804,
1155,
353,
8840,
836,
8,
341,
8810,
70,
11,
1848,
1669,
5925,
7121,
2099,
9786,
10753,
515,
197,
197,
4449,
25,
260,
330,
2733,
756,
197,
80487,
1820,
25,
262,
3056,
917,
4913,
36358,
7115,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLabelsChanged(t *testing.T) {
g := Gmail{cache: newTestCache()}
g.cache.SetMsgLabels("id", []string{"a", "b"})
if !g.labelsChanged("id", []string{"a"}) {
t.Error(`labelsChanged("id", {"a"}) = false, expected true`)
}
if g.labelsChanged("id", []string{"a", "b"}) {
t.Error(`labelsChanged("id", {"a", "b"... | explode_data.jsonl/903 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 251
} | [
2830,
3393,
23674,
5389,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
60946,
90,
9360,
25,
501,
2271,
8233,
23509,
3174,
20087,
4202,
6611,
23674,
445,
307,
497,
3056,
917,
4913,
64,
497,
330,
65,
23625,
743,
753,
70,
39168,
5389,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestParser2(t *testing.T) {
gobatis.RegisterTemplateFile("./sql.tpl")
t.Run("select", func(t *testing.T) {
p, ok := gobatis.FindTemplateSqlParser("selectTestTable")
if !ok {
t.Fatal(ok)
}
md, err := p.ParseMetadata("mysql", TestTable{Id: 1, UserName: "user", Password: "pw", Status: 10})
if err != ni... | explode_data.jsonl/60507 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 740
} | [
2830,
3393,
6570,
17,
1155,
353,
8840,
836,
8,
341,
3174,
674,
3605,
19983,
7275,
1703,
13988,
3544,
34066,
1138,
3244,
16708,
445,
1742,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3223,
11,
5394,
1669,
74417,
3605,
9998,
7275,
826... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMiddleware_GraphQLBasicAuth(t *testing.T) {
env.SetEnv(env.Env{BasicAuthUsername: basicUsername, BasicAuthPassword: basicPass})
mw := &Middleware{}
t.Run("Testcase #1: Positive", func(t *testing.T) {
ctx := context.WithValue(context.Background(), candishared.ContextKeyHTTPHeader, http.Header{
"Authori... | explode_data.jsonl/44827 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 344
} | [
2830,
3393,
24684,
2646,
1935,
3588,
15944,
5087,
1155,
353,
8840,
836,
8,
341,
57538,
4202,
14359,
16978,
81214,
90,
15944,
5087,
11115,
25,
6770,
11115,
11,
14625,
5087,
4876,
25,
6770,
12187,
3518,
2109,
86,
1669,
609,
24684,
31483,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPreparedStatementWithStdlib(t *testing.T) {
db, cleanup := testCreateDB(t, 3)
defer cleanup()
var tm time.Time
if err := db.QueryRow("select_row").Scan(&tm); err != nil {
t.Fatal(err)
}
t.Log(tm)
} | explode_data.jsonl/74281 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
45405,
2354,
22748,
2740,
1155,
353,
8840,
836,
8,
341,
20939,
11,
21290,
1669,
1273,
4021,
3506,
1155,
11,
220,
18,
340,
16867,
21290,
2822,
2405,
17333,
882,
16299,
198,
743,
1848,
1669,
2927,
15685,
3102,
445,
1742,
8530,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewClusterComplexNameFromKubeClusterName(t *testing.T) {
tests := []struct {
name string
inputName string
expectedName string
expectedType string
}{
{
name: "single-word",
inputName: "myCluster",
expectedName: "myCluster",
expectedType: config.AirshipDefaultCluster... | explode_data.jsonl/57912 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 485
} | [
2830,
3393,
3564,
28678,
31137,
675,
3830,
42,
3760,
28678,
675,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
22427,
675,
262,
914,
198,
197,
42400,
675,
914,
198,
197,
42400,
929,
914,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMissingTables(t *testing.T) {
if testing.Short() {
t.Skip()
}
engine.se.Reload(context.Background())
execStatements(t, []string{
"create table t1(id11 int, id12 int, primary key(id11))",
"create table shortlived(id31 int, id32 int, primary key(id31))",
})
defer execStatements(t, []string{
"drop t... | explode_data.jsonl/10402 | {
"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,
25080,
21670,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
532,
80118,
4523,
38939,
2731,
5378,
19047,
2398,
67328,
93122,
1155,
11,
3056,
917,
515,
197,
197,
1,
3182,
1965,
259,
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... | 2 |
func TestNoopState(t *testing.T) {
noop := &noOp{}
require.Equal(t, "noop", noop.Name())
t.Run("must not transition to any state", func(t *testing.T) {
all := []state{&null{}, &invited{}, &requested{}, &responded{}, &completed{}}
for _, s := range all {
require.False(t, noop.CanTransitionTo(s))
}
})
} | explode_data.jsonl/2084 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 135
} | [
2830,
3393,
2753,
453,
1397,
1155,
353,
8840,
836,
8,
341,
197,
40162,
1669,
609,
2152,
7125,
16094,
17957,
12808,
1155,
11,
330,
40162,
497,
60829,
2967,
12367,
3244,
16708,
445,
24812,
537,
9142,
311,
894,
1584,
497,
2915,
1155,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestError(t *testing.T) {
var message = "The request was faulty"
var errorData = "This is a error"
err := errors.New(errorData)
response := Error(message, err)
if response.Code != 400 {
t.Error("Expected status code to be 400")
}
if response.Status != StatusError {
t.Error("Expected the status to be... | explode_data.jsonl/71747 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 172
} | [
2830,
3393,
1454,
1155,
353,
8840,
836,
8,
1476,
2405,
1943,
284,
330,
785,
1681,
572,
57571,
698,
2405,
1465,
1043,
284,
330,
1986,
374,
264,
1465,
1837,
9859,
1669,
5975,
7121,
6390,
1043,
340,
21735,
1669,
4600,
7333,
11,
1848,
692... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestDeletePostWithFileAttachments(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
// Create a post with a file attachment.
teamID := th.BasicTeam.Id
channelID := th.BasicChannel.Id
userID := th.BasicUser.Id
filename := "test"
data := []byte("abcd")
info1, err := th.App.DoUploadFile(th.Con... | explode_data.jsonl/26433 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 481
} | [
2830,
3393,
6435,
4133,
2354,
1703,
75740,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
197,
322,
4230,
264,
1736,
448,
264,
1034,
19984,
624,
197,
9196,
915,
1669,
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 Test_hcsTask_ID(t *testing.T) {
lt, _, _ := setupTestHcsTask(t)
if lt.ID() != t.Name() {
t.Fatalf("expect ID: '%s', got: '%s'", t.Name(), lt.ID())
}
} | explode_data.jsonl/56368 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 83
} | [
2830,
3393,
1523,
4837,
6262,
3450,
1155,
353,
8840,
836,
8,
341,
197,
4832,
11,
8358,
716,
1669,
6505,
2271,
39,
4837,
6262,
1155,
692,
743,
25175,
9910,
368,
961,
259,
2967,
368,
341,
197,
3244,
30762,
445,
17119,
3034,
25,
7677,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExampleSearchErr(t *testing.T) {
data := []byte(` { "xx" : [] ,"yy" :{ }, "test" : [ true , 0.1 , "abc", ["h"], {"a":"bc"} ] } `)
node, e := Get(data, "zz")
if e == nil {
t.Fatalf("node: %v, err: %v", node, e)
}
fmt.Println(e)
node, e = Get(data, "xx", 4)
if e == nil {
... | explode_data.jsonl/62341 | {
"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,
13314,
5890,
7747,
1155,
353,
8840,
836,
8,
341,
262,
821,
1669,
3056,
3782,
5809,
314,
330,
4146,
1,
549,
3056,
33821,
4807,
1,
549,
90,
2470,
330,
1944,
1,
549,
508,
830,
1154,
220,
15,
13,
16,
1154,
330,
13683,
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... | 5 |
func TestInputService2ProtocolTestSerializeOtherScalarTypesCase1(t *testing.T) {
sess := session.New()
svc := NewInputService2ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
input := &InputService2TestShapeInputService2TestCaseOperation1Input{
First: aws.Bool(true),
Fourth: aws.Int64(3),
... | explode_data.jsonl/46471 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 387
} | [
2830,
3393,
2505,
1860,
17,
20689,
2271,
15680,
11409,
20639,
4173,
4207,
16,
1155,
353,
8840,
836,
8,
341,
1903,
433,
1669,
3797,
7121,
741,
1903,
7362,
1669,
1532,
2505,
1860,
17,
20689,
2271,
57223,
11,
609,
8635,
10753,
90,
27380,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreCreate(t *testing.T) {
podA := &api.Pod{
ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"},
Spec: api.PodSpec{NodeName: "machine"},
}
podB := &api.Pod{
ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"},
Spec: api.PodSpec{NodeName: "machine2"},
}
testContext := a... | explode_data.jsonl/228 | {
"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,
6093,
4021,
1155,
353,
8840,
836,
8,
341,
3223,
347,
32,
1669,
609,
2068,
88823,
515,
197,
23816,
12175,
25,
6330,
80222,
63121,
25,
330,
7975,
497,
41962,
25,
330,
1944,
7115,
197,
7568,
992,
25,
981,
6330,
88823,
8327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChangeTrustValidateInvalidLimit(t *testing.T) {
kp0 := newKeypair0()
txSourceAccount := NewSimpleAccount(kp0.Address(), int64(9605939170639898))
changeTrust := ChangeTrust{
Line: CreditAsset{"ABCD", kp0.Address()},
Limit: "-1",
}
tx := Transaction{
SourceAccount: &txSourceAccount,
Operations: ... | explode_data.jsonl/62200 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
4072,
45548,
17926,
7928,
16527,
1155,
353,
8840,
836,
8,
341,
16463,
79,
15,
1669,
501,
6608,
1082,
1310,
15,
741,
46237,
3608,
7365,
1669,
1532,
16374,
7365,
5969,
79,
15,
26979,
1507,
526,
21,
19,
7,
24,
21,
15,
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... | 2 |
func TestNewRoleBinding(t *testing.T) {
want := &rbacv1.RoleBinding{
ObjectMeta: metav1.ObjectMeta{
Name: rbName,
Namespace: testNS,
},
RoleRef: rbacv1.RoleRef{
APIGroup: "rbac.authorization.k8s.io",
Kind: "ClusterRole",
Name: crName,
},
Subjects: []rbacv1.Subject{
{
Kind: ... | explode_data.jsonl/44204 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 292
} | [
2830,
3393,
3564,
9030,
15059,
1155,
353,
8840,
836,
8,
341,
50780,
1669,
609,
10681,
580,
85,
16,
35955,
15059,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
414,
18717,
675,
345,
298,
90823,
25,
1273,
2448,
345,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRegisterHandler(t *testing.T) {
// Reset Register
HandlerRegister = make(map[string]func() handlers.Handler)
err := Register("printer", NewTestHandler)
if err != nil {
t.Fatalf("Error should have been an HandlerAlreadyRegistered, not this : %v", err)
}
err = Register("printer", NewTestHandler)
if !... | explode_data.jsonl/75191 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
8690,
3050,
1155,
353,
8840,
836,
8,
1476,
197,
322,
16932,
8451,
198,
197,
3050,
8690,
284,
1281,
9147,
14032,
60,
2830,
368,
24083,
31010,
692,
9859,
1669,
8451,
445,
62956,
497,
1532,
2271,
3050,
340,
743,
1848,
961,
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... | 2 |
func TestConfig_GetYamlAttribute(t *testing.T) {
c := &Config{
ConnectEnabled: false,
}
if err := c.SetBoolValueByYamlAttribute("connect_enabled", true); err != nil {
t.Errorf("unable to update config value: %s", err)
}
assert.True(t, c.ConnectEnabled)
assert.Error(t, c.SetBoolValueByYamlAttribute("no_a_value... | explode_data.jsonl/22928 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
2648,
13614,
56,
9467,
3907,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
609,
2648,
515,
197,
197,
14611,
5462,
25,
895,
345,
197,
532,
743,
1848,
1669,
272,
57197,
1130,
1359,
56,
9467,
3907,
445,
6459,
18220,
497,
830,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQuadriWeekly(t *testing.T) {
doTestNWeekly(t, "[] bla (every 4th thursday)", moment.RecurQuadriWeekly, 4, tu.DtUtc("01.11.2019"), tu.DtUtc("31.10.2019"))
} | explode_data.jsonl/67521 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 76
} | [
2830,
3393,
43474,
461,
80516,
1155,
353,
8840,
836,
8,
341,
19935,
2271,
45,
80516,
1155,
11,
330,
1294,
84541,
320,
29015,
220,
19,
339,
270,
7181,
11583,
4445,
2817,
2352,
43474,
461,
80516,
11,
220,
19,
11,
9765,
909,
83,
97768,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetAtNeverBreaksSorting(t *testing.T) {
s := newSummary(10)
for _, i := range []float64{10, 10, 10, 10, 10} {
_ = s.Add(i, 1)
}
s.setAt(0, 30, 1)
checkSorted(s, t)
s.setAt(s.Len()-1, 0, 1)
checkSorted(s, t)
s.setAt(3, 10.1, 1)
checkSorted(s, t)
s.setAt(3, 9.9, 1)
checkSorted(s, t)
} | explode_data.jsonl/77560 | {
"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,
1649,
1655,
26155,
22524,
82,
71681,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
501,
19237,
7,
16,
15,
692,
2023,
8358,
600,
1669,
2088,
3056,
3649,
21,
19,
90,
16,
15,
11,
220,
16,
15,
11,
220,
16,
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... | 2 |
func TestMembershipInfoProvider(t *testing.T) {
peerSelfSignedData := common.SignedData{
Identity: []byte("peer0"),
Signature: []byte{1, 2, 3},
Data: []byte{4, 5, 6},
}
identityDeserializer := func(chainID string) msp.IdentityDeserializer {
return &mockDeserializer{}
}
//验证成员身份提供程序是否返回true
membersh... | explode_data.jsonl/43708 | {
"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,
80904,
1731,
5179,
1155,
353,
8840,
836,
8,
341,
197,
16537,
12092,
49312,
1043,
1669,
4185,
808,
1542,
1043,
515,
197,
197,
18558,
25,
220,
3056,
3782,
445,
16537,
15,
4461,
197,
197,
25088,
25,
3056,
3782,
90,
16,
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 TestSumPerKeyWithPartitionsNegativeBoundsFloat(t *testing.T) {
// We have two test cases, one for public partitions as a PCollection and one for public partitions as a slice (i.e., in-memory).
for _, tc := range []struct {
inMemory bool
}{
{true},
{false},
} {
triples := testutils.ConcatenateTriplesWit... | explode_data.jsonl/42961 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 775
} | [
2830,
3393,
9190,
3889,
1592,
2354,
5800,
5930,
38489,
11394,
5442,
1155,
353,
8840,
836,
8,
341,
197,
322,
1205,
614,
1378,
1273,
5048,
11,
825,
369,
584,
46688,
438,
264,
393,
6482,
323,
825,
369,
584,
46688,
438,
264,
15983,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSingleBothWaysPolicySinglePod(t *testing.T) {
gomega.RegisterTestingT(t)
logger := logrus.DefaultLogger()
logger.SetLevel(logging.DebugLevel)
logger.Debug("TestSingleBothWaysPolicySinglePod")
// Prepare input data.
const (
namespace = "default"
pod1Name = "pod1"
pod2Name = "pod2"
pod1IP = "... | explode_data.jsonl/19621 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2581
} | [
2830,
3393,
10888,
20629,
54,
942,
13825,
10888,
23527,
1155,
353,
8840,
836,
8,
341,
3174,
32696,
19983,
16451,
51,
1155,
340,
17060,
1669,
1487,
20341,
13275,
7395,
741,
17060,
4202,
4449,
51687,
20345,
4449,
340,
17060,
20345,
445,
227... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntegrationOBFS4ParseArgsError(t *testing.T) {
ctx := context.Background()
config := obfs4config()
config.Params = make(map[string][]string) // cause ParseArgs error
results := OBFS4Connect(ctx, config)
if results.Error.Error() != "missing argument 'node-id'" {
t.Fatal("not the error we expected")
}
} | explode_data.jsonl/53552 | {
"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,
52464,
20608,
8485,
19,
14463,
4117,
1454,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
25873,
1669,
1508,
3848,
19,
1676,
741,
25873,
58268,
284,
1281,
9147,
14032,
45725,
917,
8,
442,
5240,
14775,
4117,
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 TestClient_GetServerTLSConfig_renew(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode.")
}
// Start CA
ca := startCATestServer()
defer ca.Close()
clientDomain := "test.domain"
client, sr, pk := signDuration(ca, "127.0.0.1", 1*time.Minute)
// Start mTLS server
ctx, cancel := con... | explode_data.jsonl/58876 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1967
} | [
2830,
3393,
2959,
13614,
5475,
45439,
2648,
1288,
931,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
304,
2805,
3856,
13053,
197,
630,
197,
322,
5145,
9183,
198,
197,
924,
1669,
119... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.