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 TestIgnoreBadResetOnSynSent(t *testing.T) {
// Send SYN.
tcp := make(header.TCP, header.TCPMinimumSize)
tcp.Encode(&header.TCPFields{
SeqNum: 1234,
AckNum: 0,
DataOffset: header.TCPMinimumSize,
Flags: header.TCPFlagSyn,
WindowSize: 30000,
})
tcb := tcpconntrack.TCB{}
tcb.Init(tcp)
/... | explode_data.jsonl/17728 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 747
} | [
2830,
3393,
12497,
17082,
14828,
1925,
37134,
31358,
1155,
353,
8840,
836,
8,
341,
197,
322,
11000,
61694,
624,
3244,
4672,
1669,
1281,
25534,
836,
7123,
11,
4247,
836,
7123,
28695,
1695,
340,
3244,
4672,
50217,
2099,
2708,
836,
7123,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestV(t *testing.T) {
setFlags()
defer logging.swap(logging.newBuffers())
logging.verbosity.Set("2")
defer logging.verbosity.Set("0")
V(2).Info("test")
if !contains(infoLog, "I", t) {
t.Errorf("Info has wrong character: %q", contents(infoLog))
}
if !contains(infoLog, "test", t) {
t.Error("Info failed")... | explode_data.jsonl/8431 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
53,
1155,
353,
8840,
836,
8,
341,
8196,
9195,
741,
16867,
8392,
54537,
51687,
4618,
36219,
2398,
90085,
13,
65210,
4202,
445,
17,
1138,
16867,
8392,
13,
65210,
4202,
445,
15,
1138,
17446,
7,
17,
568,
1731,
445,
1944,
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... | 3 |
func TestAbsCollection_Every(t *testing.T) {
intColl := NewIntCollection([]int{1, 2, 3, 4})
if intColl.Every(func(item interface{}, key int) bool {
i := item.(int)
return i > 1
}) != false {
t.Fatal("Every错误")
}
if intColl.Every(func(item interface{}, key int) bool {
i := item.(int)
return i > 0
}) != ... | explode_data.jsonl/66441 | {
"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,
27778,
6482,
2089,
1204,
1155,
353,
8840,
836,
8,
341,
2084,
15265,
1669,
1532,
1072,
6482,
10556,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
3518,
743,
526,
15265,
5142,
1204,
18552,
5393,
3749,
22655,
1376,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGenerateHints(t *testing.T) {
t.Parallel()
alphabet := []rune("abc")
tests := []struct {
desc string
text string
matches []Range
want []hint
}{
{
desc: "no matches",
text: "foo",
want: []hint{},
},
{
desc: "single match",
text: "foo bar",
matches: []Range{
{1,... | explode_data.jsonl/70476 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 898
} | [
2830,
3393,
31115,
74933,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
69571,
18485,
1669,
3056,
81,
2886,
445,
13683,
5130,
78216,
1669,
3056,
1235,
341,
197,
41653,
262,
914,
198,
197,
15425,
262,
914,
198,
197,
2109,
9118,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDelegateCoins(t *testing.T) {
input := setupTestInput()
now := tmtime.Now()
ctx := input.ctx.WithBlockHeader(abci.Header{Time: now})
endTime := now.Add(24 * time.Hour)
origCoins := sdk.NewCoins(sdk.NewInt64Coin("hsn", 100))
delCoins := sdk.NewCoins(sdk.NewInt64Coin("hsn", 50))
addr1 := sdk.AccAddress(... | explode_data.jsonl/3534 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 591
} | [
2830,
3393,
9381,
69602,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
6505,
2271,
2505,
741,
80922,
1669,
17333,
1678,
13244,
741,
20985,
1669,
1946,
30608,
26124,
4713,
4047,
56085,
5855,
15753,
90,
1462,
25,
1431,
3518,
6246,
1462,
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 TestConnServers(t *testing.T) {
opts := GetDefaultOptions()
c := &Conn{Opts: opts}
c.ps = &parseState{}
c.setupServerPool()
validateURLs := func(serverUrls []string, expectedUrls ...string) {
var found bool
if len(serverUrls) != len(expectedUrls) {
stackFatalf(t, "Array should have %d elements, has %d... | explode_data.jsonl/44919 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 582
} | [
2830,
3393,
9701,
78139,
1155,
353,
8840,
836,
8,
341,
64734,
1669,
2126,
3675,
3798,
741,
1444,
1669,
609,
9701,
90,
43451,
25,
12185,
532,
1444,
57328,
284,
609,
6400,
1397,
16094,
1444,
25338,
5475,
10551,
2822,
197,
7067,
3144,
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 TestAttributeValue(t *testing.T) {
v := NewAttributeValueString("abc")
assert.EqualValues(t, AttributeValueSTRING, v.Type())
assert.EqualValues(t, "abc", v.StringVal())
v = NewAttributeValueInt(123)
assert.EqualValues(t, AttributeValueINT, v.Type())
assert.EqualValues(t, 123, v.IntVal())
v = NewAttributeV... | explode_data.jsonl/38191 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 436
} | [
2830,
3393,
78554,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
1532,
78554,
703,
445,
13683,
1138,
6948,
12808,
6227,
1155,
11,
16752,
1130,
16468,
11,
348,
10184,
2398,
6948,
12808,
6227,
1155,
11,
330,
13683,
497,
348,
6431,
2208,
12367... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPerformRequestWithLoggerAndTracer(t *testing.T) {
var lw bytes.Buffer
lout := log.New(&lw, "LOGGER ", log.LstdFlags)
var tw bytes.Buffer
tout := log.New(&tw, "TRACER ", log.LstdFlags)
client, err := NewClient(SetInfoLog(lout), SetTraceLog(tout), SetSniff(false))
if err != nil {
t.Fatal(err)
}
res,... | explode_data.jsonl/38020 | {
"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,
46951,
1900,
2354,
7395,
3036,
1282,
9584,
1155,
353,
8840,
836,
8,
341,
2405,
41073,
5820,
22622,
198,
8810,
411,
1669,
1487,
7121,
2099,
57053,
11,
330,
82400,
3670,
1487,
1214,
1834,
9195,
692,
2405,
4384,
5820,
22622,
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... | 8 |
func TestPerm_MustPlatformAdmin(t *testing.T) {
// setup types
secret := "superSecret"
u := new(library.User)
u.SetID(1)
u.SetName("foo")
u.SetToken("bar")
u.SetHash("baz")
u.SetAdmin(true)
tok, _ := token.CreateAccessToken(u, accessTokenDuration)
// setup database
db, _ := database.NewTest()
defer func... | explode_data.jsonl/8185 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 577
} | [
2830,
3393,
81245,
1245,
590,
17296,
7210,
1155,
353,
8840,
836,
8,
341,
197,
322,
6505,
4494,
198,
197,
20474,
1669,
330,
9522,
19773,
1837,
10676,
1669,
501,
93299,
7344,
340,
10676,
4202,
915,
7,
16,
340,
10676,
4202,
675,
445,
797... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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()
tests := []struct {
in database.Error
want string
}{
{
database.Error{Description: "some error"},
"some error",
},
{
database.Error{Description: "human-readable error"},
"human-readable error",
},
{
database.Error{
ErrorCode: database.... | explode_data.jsonl/7153 | {
"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,
1454,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
17430,
256,
4625,
6141,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
515,
298,
2698,
2211,
6141,
90,
5009,
25,
330,
14689,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListRepoTeams(t *testing.T) {
expectedTeams := []Team{
{ID: 1, Slug: "foo", Permission: RepoPull},
{ID: 2, Slug: "bar", Permission: RepoPush},
{ID: 3, Slug: "foobar", Permission: RepoAdmin},
}
ts := simpleTestServer(t, "/repos/org/repo/teams", expectedTeams)
defer ts.Close()
c := getClient(ts.URL)
... | explode_data.jsonl/6290 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 280
} | [
2830,
3393,
852,
25243,
60669,
1155,
353,
8840,
836,
8,
341,
42400,
60669,
1669,
3056,
14597,
515,
197,
197,
90,
915,
25,
220,
16,
11,
93613,
25,
330,
7975,
497,
18135,
25,
71509,
36068,
1583,
197,
197,
90,
915,
25,
220,
17,
11,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientStoreConfig(t *testing.T) {
var err error
config := &StoreConfig{}
config.DriverName = DriverNameClientStore
config.ClientStoreKey = "test"
config.TokenLifetime = "1h"
config.TokenMaxLifetime = "168h"
config.TokenContextName = "token"
config.CookieName = "cookiename"
config.CookiePath = "/"
con... | explode_data.jsonl/17577 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 362
} | [
2830,
3393,
2959,
6093,
2648,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
25873,
1669,
609,
6093,
2648,
16094,
25873,
41768,
675,
284,
14577,
675,
2959,
6093,
198,
25873,
11716,
6093,
1592,
284,
330,
1944,
698,
25873,
32277,
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... | 8 |
func TestStringBuilder_Empty(t *testing.T) {
mem := memory.NewCheckedAllocator(memory.NewGoAllocator())
defer mem.AssertSize(t, 0)
want := []string{"hello", "世界", "", "bye"}
ab := array.NewStringBuilder(mem)
defer ab.Release()
stringValues := func(a *array.String) []string {
vs := make([]string, a.Len())
f... | explode_data.jsonl/4257 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 355
} | [
2830,
3393,
69412,
76060,
1595,
1155,
353,
8840,
836,
8,
341,
14145,
1669,
4938,
7121,
12666,
42730,
63230,
7121,
10850,
42730,
2398,
16867,
1833,
11711,
1695,
1155,
11,
220,
15,
692,
50780,
1669,
3056,
917,
4913,
14990,
497,
330,
99489,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunner(t *testing.T) {
t.Run("example input", func(t *testing.T) {
data, err := file.ReadFullData("../example.txt")
if err != nil {
t.Fatal(err)
}
want := 739785
got := Runner(data)
if got != want {
t.Errorf("got %v want %v", got, want)
}
})
t.Run("full input", func(t *testing.T) {
da... | explode_data.jsonl/17925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
19486,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
8687,
1946,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
8924,
11,
1848,
1669,
1034,
6503,
9432,
1043,
17409,
8687,
3909,
1138,
197,
743,
1848,
961,
2092,
341,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestBatchError(t *testing.T) {
testCases := []struct {
req [2]string
errMsg string
}{
{
req: [2]string{"\xff\xff\xff\xff", "a"},
errMsg: "must be less than KeyMax",
},
{
req: [2]string{"a", "\xff\xff\xff\xff"},
errMsg: "must be less than or equal to KeyMax",
},
}
for i, c := r... | explode_data.jsonl/56598 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 421
} | [
2830,
3393,
21074,
1454,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
24395,
262,
508,
17,
30953,
198,
197,
9859,
6611,
914,
198,
197,
59403,
197,
197,
515,
298,
24395,
25,
262,
508,
17,
30953,
4913,
59,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFKVSWithCustomKeySerializer(t *testing.T) {
keySerializer := func(key interface{}) (string, error) {
keyString, ok := key.(string)
if !ok {
return "", errors.New("converting key to string failed")
}
return filepath.Join(storePath, fmt.Sprintf("mypath/%s/valuefile", keyString)), nil
}
testFKVS(t, ... | explode_data.jsonl/12215 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 123
} | [
2830,
3393,
26998,
26050,
2354,
10268,
1592,
13909,
1155,
353,
8840,
836,
8,
341,
23634,
13909,
1669,
2915,
4857,
3749,
28875,
320,
917,
11,
1465,
8,
341,
197,
23634,
703,
11,
5394,
1669,
1376,
12832,
917,
340,
197,
743,
753,
562,
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 TestDecimalMul(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("USE test")
tk.MustExec("create table t(a decimal(38, 17));")
tk.MustExec("insert into t select 0.5999991229316*0.918755041726043;")
res := tk.MustQuery("select * from t;")... | explode_data.jsonl/65468 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
11269,
59155,
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,
50463,
10216,
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... | 1 |
func TestAdoption(t *testing.T) {
var trueVar = true
testCases := []struct {
name string
existingOwnerReferences func(rs *v1beta1.ReplicaSet) []v1.OwnerReference
expectedOwnerReferences func(rs *v1beta1.ReplicaSet) []v1.OwnerReference
}{
{
"pod refers rs as an owner, not a controller",
... | explode_data.jsonl/73258 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1465
} | [
2830,
3393,
2589,
2047,
1155,
353,
8840,
836,
8,
341,
2405,
830,
3962,
284,
830,
198,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
503,
914,
198,
197,
8122,
11083,
13801,
31712,
2915,
17027,
353,
85,
16,
19127,
16,
2817,
79,
15317... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoGoPrefixArgOrRule(t *testing.T) {
dir, err := createFiles([]fileSpec{
{path: "WORKSPACE", content: ""},
})
if err != nil {
t.Fatal(err)
}
want := "-go_prefix not set"
if err := runGazelle(dir, nil); err == nil {
t.Fatalf("got success; want %q", want)
} else if !strings.Contains(err.Error(), want... | explode_data.jsonl/40383 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 157
} | [
2830,
3393,
2753,
10850,
14335,
2735,
2195,
11337,
1155,
353,
8840,
836,
8,
341,
48532,
11,
1848,
1669,
1855,
10809,
10556,
1192,
8327,
515,
197,
197,
90,
2343,
25,
330,
18470,
44641,
497,
2213,
25,
77496,
197,
3518,
743,
1848,
961,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestMetricsServiceV2GetLogMetricError(t *testing.T) {
errCode := codes.Internal
mockMetrics.err = grpc.Errorf(errCode, "test error")
var formattedMetricName string = MetricsMetricPath("[PROJECT]", "[METRIC]")
var request = &loggingpb.GetLogMetricRequest{
MetricName: formattedMetricName,
}
c, err := NewMe... | explode_data.jsonl/77780 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
27328,
1860,
53,
17,
1949,
2201,
54310,
1454,
1155,
353,
8840,
836,
8,
341,
9859,
2078,
1669,
13912,
32579,
198,
77333,
27328,
18441,
284,
47900,
13080,
3964,
2078,
11,
330,
1944,
1465,
5130,
2405,
23126,
54310,
675,
914,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCyclomatic(t *testing.T) {
testRule(t, "cyclomatic", &rule.CyclomaticRule{}, &lint.RuleConfig{
Arguments: []interface{}{int64(1)},
})
testRule(t, "cyclomatic-2", &rule.CyclomaticRule{}, &lint.RuleConfig{
Arguments: []interface{}{int64(3)},
})
} | explode_data.jsonl/32421 | {
"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,
34,
6179,
13487,
1155,
353,
8840,
836,
8,
341,
18185,
11337,
1155,
11,
330,
97484,
13487,
497,
609,
12937,
727,
6179,
13487,
11337,
22655,
609,
14957,
63961,
2648,
515,
197,
197,
19139,
25,
3056,
4970,
6257,
90,
396,
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,
1... | 1 |
func TestListenerFilter_Verify(t *testing.T) {
tests := []struct {
desc string
inFilter *ListenerFilter
inListener *listener.Listener
expect bool
}{
{
desc: "filter-fields-empty",
inFilter: &ListenerFilter{
Address: "",
Port: 0,
Type: "",
},
inListener: &listener.Li... | explode_data.jsonl/60718 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1437
} | [
2830,
3393,
2743,
5632,
2334,
261,
1437,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
41653,
981,
914,
198,
197,
17430,
5632,
256,
353,
2743,
5632,
198,
197,
17430,
2743,
353,
35039,
64091,
198,
197,
24952,
257,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestConnect(t *testing.T) {
t.Parallel()
connString := os.Getenv("PGX_TEST_DATABASE")
config := mustParseConfig(t, connString)
conn, err := pgx.ConnectConfig(context.Background(), config)
if err != nil {
t.Fatalf("Unable to establish connection: %v", err)
}
assertConfigsEqual(t, config, conn.Config(), ... | explode_data.jsonl/39996 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 355
} | [
2830,
3393,
14611,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
32917,
703,
1669,
2643,
64883,
445,
11383,
55,
11641,
45510,
1138,
25873,
1669,
1969,
14463,
2648,
1155,
11,
4534,
703,
692,
32917,
11,
1848,
1669,
17495,
87,
438... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSourceStatus_GetErrors(t *testing.T) {
t.Run("None", func(t *testing.T) {
x := SourceStatus{}
assert.Equal(t, uint64(0), x.GetErrors())
})
t.Run("NotRecent", func(t *testing.T) {
x := SourceStatus{
LastError: &Error{Time: metav1.Time{}},
Metrics: map[string]Metrics{"": {Errors: 1}},
}
asse... | explode_data.jsonl/49606 | {
"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,
3608,
2522,
13614,
13877,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
4064,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
10225,
1669,
8748,
2522,
16094,
197,
6948,
12808,
1155,
11,
2622,
21,
19,
7,
15,
701,
856,
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... | 1 |
func TestGetSetIP6(t *testing.T) {
ip := IP6{0x20, 0x01, 0x48, 0x60, 0, 0, 0x20, 0x01, 0, 0, 0, 0, 0, 0, 0x00, 0x68}
var r Record
r.Set(ip)
var ip2 IP6
require.NoError(t, r.Load(&ip2))
assert.Equal(t, ip, ip2)
} | explode_data.jsonl/39486 | {
"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,
1949,
1649,
3298,
21,
1155,
353,
8840,
836,
8,
341,
46531,
1669,
6790,
21,
90,
15,
87,
17,
15,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
19,
23,
11,
220,
15,
87,
21,
15,
11,
220,
15,
11,
220,
15,
11,
220,
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 TestMutateTime(t *testing.T) {
source := sourceImage(t)
want := time.Time{}
result, err := mutate.Time(source, want)
if err != nil {
t.Fatalf("failed to mutate a config: %v", err)
}
if configDigestsAreEqual(t, source, result) {
t.Fatal("mutating the created time MUST mutate the config digest")
}
got ... | explode_data.jsonl/3096 | {
"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,
51440,
349,
1462,
1155,
353,
8840,
836,
8,
341,
47418,
1669,
2530,
1906,
1155,
340,
50780,
1669,
882,
16299,
16094,
9559,
11,
1848,
1669,
67182,
16299,
12437,
11,
1366,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
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... | 4 |
func TestPairEscrowAddress(t *testing.T) {
for _, tc := range []struct {
pairId uint64
expected string
}{
{1, "cosmos17u9nx0h9cmhypp6cg9lf4q8ku9l3k8mz232su7m28m39lkz25dgqzkypxs"},
{2, "cosmos1dsm56ejte5wsvptgtlq8qy3qvw6vpgz8w3z77f7cyjkmayzq3fxsdtsn2d"},
} {
t.Run("", func(t *testing.T) {
require.Equal... | explode_data.jsonl/7246 | {
"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,
12443,
36121,
651,
4286,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
3223,
1310,
764,
256,
2622,
21,
19,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
90,
16,
11,
330,
9407,
8631... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSqrt2HighPrecision(t *testing.T) {
prec := uint(100/math.Log10(2)) + 1 // 100 decimal digits
x := new(big.Float).SetPrec(prec).SetInt64(2)
out := new(big.Float).SetPrec(prec)
pslq := New(prec)
pslq.Sqrt(x, out)
result := fmt.Sprintf("%.100f", out)
expected := "1.41421356237309504880168872420969807856967... | explode_data.jsonl/66839 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 220
} | [
2830,
3393,
50,
8140,
17,
11976,
55501,
1155,
353,
8840,
836,
8,
341,
197,
10645,
1669,
2622,
7,
16,
15,
15,
59705,
5247,
16,
15,
7,
17,
593,
488,
220,
16,
442,
220,
16,
15,
15,
12122,
18509,
198,
10225,
1669,
501,
75616,
29794,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnsupportedMethod(t *testing.T) {
router := MakeRouter()
router.GET("/zello/yes", printHello)
router.GET("/hello", printHello)
router.GET("/activity/:user", writeData)
RunRequest(router, "HEAD", "/activity/", 405, "Method Not Allowed", t)
} | explode_data.jsonl/15101 | {
"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,
41884,
3523,
1155,
353,
8840,
836,
8,
1476,
67009,
1669,
7405,
9523,
741,
67009,
17410,
4283,
89,
4791,
14,
9693,
497,
1173,
9707,
340,
67009,
17410,
4283,
14990,
497,
1173,
9707,
340,
67009,
17410,
4283,
7175,
11315,
872,
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... | 1 |
func TestRemovePathIfPresent(t *testing.T) {
for _, tt := range []struct {
input string
expected string
}{
{input: "http://foo.com", expected: "http://foo.com"},
{input: "http://foo.com/", expected: "http://foo.com"},
{input: "http://foo.com/api/v1", expected: "http://foo.com"},
{input: "http://foo.com... | explode_data.jsonl/50776 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 345
} | [
2830,
3393,
13021,
1820,
2679,
21195,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
22427,
262,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
90,
1355,
25,
330,
1254,
1110,
7975,
905,
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... | 2 |
func TestWorkerWait(t *testing.T) {
db, cleanup := storageTestEnv(t)
defer cleanup()
ctx := context.Background()
executor := &mockExecutor{t: t, dependencies: NewDependencyManager()}
worker := newWorker(db, executor, &testPublisherProvider{})
reporter := statusReporterFunc(func(ctx context.Context, taskID string... | explode_data.jsonl/11418 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1122
} | [
2830,
3393,
21936,
14190,
1155,
353,
8840,
836,
8,
341,
20939,
11,
21290,
1669,
5819,
2271,
14359,
1155,
340,
16867,
21290,
2822,
20985,
1669,
2266,
19047,
741,
67328,
4831,
1669,
609,
16712,
25255,
90,
83,
25,
259,
11,
19543,
25,
1532,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapProxy_ExecuteOnEntriesWithPredicate(t *testing.T) {
config := hazelcast.NewHazelcastConfig()
expectedValue := "newValue"
processor := newSimpleEntryProcessor(expectedValue)
config.SerializationConfig().AddDataSerializableFactory(processor.identifiedFactory.factoryId, processor.identifiedFactory)
client... | explode_data.jsonl/57040 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 348
} | [
2830,
3393,
2227,
16219,
83453,
1925,
24533,
2354,
36329,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
20144,
301,
3829,
7121,
39,
68326,
3829,
2648,
741,
42400,
1130,
1669,
330,
52830,
698,
197,
29474,
1669,
501,
16374,
5874,
22946,
15253,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateBucketIfNotExist(t *testing.T) {
err = testdb.CreateBucketIfNotExist("test")
if err != nil {
t.Fatalf("Could not create bucket. %v", err)
}
// Should not fail if we create bucket again
err = testdb.CreateBucketIfNotExist("test")
if err != nil {
t.Fatalf("Could not create bucket. %v", err)
}
} | explode_data.jsonl/51082 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
4021,
36018,
2679,
45535,
1155,
353,
8840,
836,
8,
341,
9859,
284,
1273,
1999,
7251,
36018,
2679,
45535,
445,
1944,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
12895,
537,
1855,
15621,
13,
1018,
85,
497,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestTopDownTime(t *testing.T) {
ast.RegisterBuiltin(&ast.Builtin{
Name: "test_sleep",
Decl: types.NewFunction(
types.Args(types.S),
nil,
),
})
RegisterFunctionalBuiltinVoid1("test_sleep", func(a ast.Value) error {
duration, err := time.ParseDuration(string(a.(ast.String)))
if err != nil {
p... | explode_data.jsonl/25217 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 435
} | [
2830,
3393,
5366,
4454,
1462,
1155,
353,
8840,
836,
8,
1476,
88836,
19983,
33,
25628,
2099,
559,
1785,
25628,
515,
197,
21297,
25,
330,
1944,
49393,
756,
197,
197,
21629,
25,
4494,
7121,
5152,
1006,
298,
98785,
51015,
52613,
808,
1326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJobRunsController_Create_ExternalInitiator_Success(t *testing.T) {
t.Parallel()
ethClient, _, assertMocksCalled := cltest.NewEthMocksWithStartupAssertions(t)
defer assertMocksCalled()
app, cleanup := cltest.NewApplication(t,
ethClient,
)
defer cleanup()
app.Start()
url := cltest.WebURL(t, "http://lo... | explode_data.jsonl/49844 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 356
} | [
2830,
3393,
12245,
73920,
2051,
34325,
62,
25913,
3803,
36122,
87161,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
769,
2959,
11,
8358,
2060,
72577,
20960,
1669,
1185,
1944,
7121,
65390,
11571,
16056,
39076,
90206,
1155,
340... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBiWeekly(t *testing.T) {
doTestNWeekly(t, "[] bla (every 2nd thursday)", moment.RecurBiWeekly, 2, tu.DtUtc("18.10.2019"), tu.DtUtc("17.10.2019"))
} | explode_data.jsonl/67519 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 72
} | [
2830,
3393,
36096,
80516,
1155,
353,
8840,
836,
8,
341,
19935,
2271,
45,
80516,
1155,
11,
330,
1294,
84541,
320,
29015,
220,
17,
303,
270,
7181,
11583,
4445,
2817,
2352,
36096,
80516,
11,
220,
17,
11,
9765,
909,
83,
97768,
445,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestController_GetUsers_200(t *testing.T) {
// prepare request
req := httptest.NewRequest(http.MethodGet, "/", nil)
rec := httptest.NewRecorder()
// prepare echo context
e := echo.New()
ctx := e.NewContext(req, rec)
// prepare controller
c := NewController()
err := c.GetUsers(ctx, "aaa")
if assert.NoEr... | explode_data.jsonl/46228 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
2051,
13614,
7137,
62,
17,
15,
15,
1155,
353,
8840,
836,
8,
341,
197,
322,
10549,
1681,
198,
24395,
1669,
54320,
70334,
75274,
19886,
20798,
1949,
11,
64657,
2092,
340,
67904,
1669,
54320,
70334,
7121,
47023,
741,
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... | 2 |
func TestInsecureAlgorithmErrorString(t *testing.T) {
tests := []struct {
sa SignatureAlgorithm
want string
}{
{MD2WithRSA, "x509: cannot verify signature: insecure algorithm MD2-RSA"},
{-1, "x509: cannot verify signature: insecure algorithm -1"},
{0, "x509: cannot verify signature: insecure algorithm 0"}... | explode_data.jsonl/68009 | {
"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,
641,
25132,
27847,
1454,
703,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
1903,
64,
256,
32232,
27847,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
90,
6076,
17,
2354,
73564,
11,
330,
87,
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... | 3 |
func TestGETPlayers(t *testing.T) {
store := StubPlayerStore{
map[string]int{
"Pepper": 20,
"Floyd": 10,
},
nil,
nil,
}
server := NewPlayerServer(&store)
t.Run("returns Pepper's score", func(t *testing.T) {
request := newGetScoreRequest("Pepper")
response := httptest.NewRecorder()
server.Serv... | explode_data.jsonl/29293 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 357
} | [
2830,
3393,
3806,
24257,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
66611,
4476,
6093,
515,
197,
19567,
14032,
63025,
515,
298,
197,
1,
10197,
6922,
788,
220,
17,
15,
345,
298,
197,
86555,
25796,
788,
220,
220,
16,
15,
345,
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 TestNewMapwatcherToEventMap(t *testing.T) {
k0, k1, k2 := []byte("foo0"), []byte("foo1"), []byte("foo2")
v0, v1, v2 := []byte("bar0"), []byte("bar1"), []byte("bar2")
ws := []*watcher{{key: k0}, {key: k1}, {key: k2}}
evs := []mvccpb.Event{
{
Type: mvccpb.PUT,
Kv: &mvccpb.KeyValue{Key: k0, Value: v0}... | explode_data.jsonl/67210 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1117
} | [
2830,
3393,
3564,
2227,
14321,
261,
1249,
1556,
2227,
1155,
353,
8840,
836,
8,
341,
16463,
15,
11,
595,
16,
11,
595,
17,
1669,
3056,
3782,
445,
7975,
15,
3975,
3056,
3782,
445,
7975,
16,
3975,
3056,
3782,
445,
7975,
17,
1138,
5195,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWalletSignTransaction(t *testing.T) {
wallet, err := initializeWallet()
assert.Nil(t, err)
// Build a mock transaction
gas := uint64(1000000)
gasPrice := int64(1000000000)
tx := types.NewTransaction(
0,
common.HexToAddress("0x6f6704e5a10332af6672e50b3d9754dc460dfa4d"),
big.NewInt(0),
gas,
big.... | explode_data.jsonl/25346 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
38259,
7264,
8070,
1155,
353,
8840,
836,
8,
341,
6692,
7464,
11,
1848,
1669,
9468,
38259,
741,
6948,
59678,
1155,
11,
1848,
692,
197,
322,
7854,
264,
7860,
7745,
198,
3174,
300,
1669,
2622,
21,
19,
7,
16,
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... | 1 |
func TestHasPrefix(t *testing.T) {
cases := []struct {
s interface{}
prefix interface{}
want interface{}
isErr bool
}{
{"abcd", "ab", true, false},
{"abcd", "cd", false, false},
{template.HTML("abcd"), "ab", true, false},
{template.HTML("abcd"), "cd", false, false},
{template.HTML("1234"), 1... | explode_data.jsonl/9220 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 320
} | [
2830,
3393,
10281,
14335,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
1903,
414,
3749,
16094,
197,
3223,
5060,
3749,
16094,
197,
50780,
256,
3749,
16094,
197,
19907,
7747,
220,
1807,
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... | 4 |
func TestValidateComponentConfig(t *testing.T) {
testCases := []struct {
name string
config *Config
errExpected bool
}{
{
name: "Valid default URL, no err",
config: &Config{ProwConfig: ProwConfig{Plank: Plank{
JobURLPrefixConfig: map[string]string{"*": "https://my-prow"}}}},
errExpect... | explode_data.jsonl/8087 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2018
} | [
2830,
3393,
17926,
2189,
2648,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
25873,
414,
353,
2648,
198,
197,
9859,
18896,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
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 TestReleaseAsset_String(t *testing.T) {
v := ReleaseAsset{
ID: Int64(0),
URL: String(""),
Name: String(""),
Label: String(""),
State: String(""),
ContentType: String(""),
Size: Int(0),
DownloadCount: I... | explode_data.jsonl/33280 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 425
} | [
2830,
3393,
16077,
16604,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
17381,
16604,
515,
197,
29580,
25,
338,
1333,
21,
19,
7,
15,
1326,
197,
79055,
25,
394,
923,
445,
4461,
197,
21297,
25,
2290,
923,
445,
4461,
197,
82126,
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 TestHealthWithBogusCheck(t *testing.T) {
h := New()
err := h.RegisterCheck(&Config{
ExecutionPeriod: 1,
InitialDelay: 1,
})
defer h.DeregisterAll()
assert.Error(t, err, "register bogus check should fail")
assert.Contains(t, err.Error(), "misconfigured check", "fail message")
assert.True(t, h.IsHeal... | explode_data.jsonl/28828 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
14542,
2354,
33,
538,
355,
3973,
1155,
353,
8840,
836,
8,
341,
9598,
1669,
1532,
2822,
9859,
1669,
305,
19983,
3973,
2099,
2648,
515,
197,
197,
20294,
23750,
25,
220,
16,
345,
197,
197,
6341,
20039,
25,
262,
220,
16,
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... | 1 |
func TestBadConn(t *testing.T) {
var err error
cn := conn{}
func() {
defer cn.errRecover(&err)
panic(io.EOF)
}()
if err != driver.ErrBadConn {
t.Fatalf("expected driver.ErrBadConn, got: %#v", err)
}
if !cn.bad {
t.Fatalf("expected cn.bad")
}
cn = conn{}
func() {
defer cn.errRecover(&err)
e := &E... | explode_data.jsonl/73482 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 240
} | [
2830,
3393,
17082,
9701,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
271,
1444,
77,
1669,
4534,
16094,
29244,
368,
341,
197,
16867,
13665,
18441,
693,
3688,
2099,
615,
340,
197,
30764,
37258,
86492,
340,
197,
69826,
743,
1848,
961,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAllocateTokensTruncation(t *testing.T) {
communityTax := sdk.NewDec(0)
ctx, _, _, k, sk, fck, _ := CreateTestInputAdvanced(t, false, 1000000, communityTax)
fmt.Println("====", k.GetCommunityTax(ctx))
sh := staking.NewHandler(sk)
// create validator with 10% commission
commission := staking.NewCommission... | explode_data.jsonl/45678 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1219
} | [
2830,
3393,
75380,
29300,
1282,
1347,
367,
1155,
353,
8840,
836,
8,
341,
197,
28402,
31349,
1669,
45402,
7121,
4900,
7,
15,
340,
20985,
11,
8358,
8358,
595,
11,
1901,
11,
282,
377,
11,
716,
1669,
4230,
2271,
2505,
35457,
1155,
11,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUGlobalLongShortRatio(t *testing.T) {
t.Parallel()
_, err := b.UGlobalLongShortRatio(context.Background(), currency.NewPair(currency.BTC, currency.USDT), "5m", 3, time.Time{}, time.Time{})
if err != nil {
t.Error(err)
}
_, err = b.UGlobalLongShortRatio(context.Background(), currency.NewPair(currency.BTC... | explode_data.jsonl/76567 | {
"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,
2941,
2042,
6583,
12472,
22777,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
293,
13,
2941,
2042,
6583,
12472,
22777,
5378,
19047,
1507,
11413,
7121,
12443,
90475,
1785,
7749,
11,
11413,
67672,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIAVLDefaultPruning(t *testing.T) {
//Expected stored / deleted version numbers for:
//numRecent = 5, storeEvery = 3
var states = []pruneState{
{[]int64{}, []int64{}},
{[]int64{1}, []int64{}},
{[]int64{1, 2}, []int64{}},
{[]int64{1, 2, 3}, []int64{}},
{[]int64{1, 2, 3, 4}, []int64{}},
{[]int64{1,... | explode_data.jsonl/44275 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 532
} | [
2830,
3393,
5863,
30698,
3675,
3533,
37202,
1155,
353,
8840,
836,
8,
341,
197,
322,
18896,
9768,
608,
11062,
2319,
5109,
369,
510,
197,
322,
2413,
25140,
284,
220,
20,
11,
3553,
11510,
284,
220,
18,
198,
2405,
5302,
284,
3056,
649,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerRejectHeadWithBody(t *testing.T) {
st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
// No response body.
})
defer st.Close()
st.greet()
st.writeHeaders(HeadersFrameParam{
StreamID: 1, // clients send odd numbers
BlockFragment: st.encodeHeader(":method", "HEAD"),
E... | explode_data.jsonl/71694 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
5475,
78413,
12346,
2354,
5444,
1155,
353,
8840,
836,
8,
341,
18388,
1669,
501,
5475,
58699,
1155,
11,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
197,
322,
2308,
2033,
2487,
624,
197,
3518,
16867,
357,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOrderCountMetafields(t *testing.T) {
setup()
defer teardown()
httpmock.RegisterResponder("GET", fmt.Sprintf("https://fooshop.myshopify.com/%s/orders/1/metafields/count.json", client.pathPrefix),
httpmock.NewStringResponder(200, `{"count": 3}`))
params := map[string]string{"created_at_min": "2016-01-01T... | explode_data.jsonl/17993 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 454
} | [
2830,
3393,
4431,
2507,
12175,
9007,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
28080,
16712,
19983,
30884,
445,
3806,
497,
8879,
17305,
445,
2428,
1110,
824,
9267,
453,
12618,
8675,
1437,
905,
12627,
82,
82818,
14,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_DeleteVote(t *testing.T) {
if testUser == nil || testUser.Id < 1 ||
testMovie == nil || testMovie.Id < 1 ||
testCycle == nil || testCycle.Id < 1 {
t.Skip("Skipping due to previous failure")
}
err := conn.DeleteVote(testUser.Id, testMovie.Id)
if err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/22023 | {
"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,
57418,
41412,
1155,
353,
8840,
836,
8,
341,
743,
1273,
1474,
621,
2092,
1369,
1273,
1474,
6444,
366,
220,
16,
8244,
197,
18185,
19668,
621,
2092,
1369,
1273,
19668,
6444,
366,
220,
16,
8244,
197,
18185,
44820,
621,
2092,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestStrArray_FilterEmpty(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
array := garray.NewStrArrayFrom(g.SliceStr{"", "1", "2", "0"})
t.Assert(array.FilterEmpty(), g.SliceStr{"1", "2", "0"})
})
gtest.C(t, func(t *gtest.T) {
array := garray.NewStrArrayFrom(g.SliceStr{"1", "2"})
t.Assert(array.FilterEmpty... | explode_data.jsonl/53117 | {
"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,
2580,
1857,
68935,
3522,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11923,
1669,
342,
1653,
7121,
2580,
1857,
3830,
3268,
95495,
2580,
4913,
497,
330,
16,
497,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPrint(t *testing.T) {
data := []byte(`{
"Name": "some-name",
"Project": "some-project",
"Zone": "some-zone",
"GCSPath": "gs://some-bucket/images",
"Vars": {
"instance_name": "i1",
"machine_type": {"Value": "n1-standard-1", "Required": true}
},
"Steps": {
"${instance_name}Delete": {
"DeleteResources"... | explode_data.jsonl/3882 | {
"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,
8994,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
3056,
3782,
5809,
515,
1,
675,
788,
330,
14689,
11494,
756,
1,
7849,
788,
330,
14689,
33696,
756,
1,
15363,
788,
330,
14689,
77763,
756,
89199,
6412,
1820,
788,
330,
5857,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOVSBridgeExternalIDs(t *testing.T) {
data := &testData{}
data.setup(t)
defer data.teardown(t)
returnedIDs, err := data.br.GetExternalIDs()
require.Nil(t, err, "Failed to get external IDs of the bridge")
assert.Empty(t, returnedIDs)
providedIDs := map[string]interface{}{"k1": "v1", "k2": "v2"}
err = d... | explode_data.jsonl/74750 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 311
} | [
2830,
3393,
38957,
16680,
11183,
25913,
30466,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
609,
1944,
1043,
16094,
8924,
25338,
1155,
340,
16867,
821,
31853,
37496,
1155,
692,
853,
291,
30466,
11,
1848,
1669,
821,
20937,
2234,
25913,
30466,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultiRangeBoundedBatchScanUnsortedOrder(t *testing.T) {
defer leaktest.AfterTest(t)()
s, _ := startNoSplitMergeServer(t)
ctx := context.TODO()
defer s.Stopper().Stop(ctx)
db := s.DB()
if err := setupMultipleRanges(ctx, db, "a", "b", "c", "d", "e", "f"); err != nil {
t.Fatal(err)
}
for _, key := ran... | explode_data.jsonl/36452 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 453
} | [
2830,
3393,
20358,
6046,
33,
13082,
21074,
26570,
1806,
28298,
4431,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
1903,
11,
716,
1669,
1191,
2753,
20193,
52096,
5475,
1155,
340,
20985,
1669,
2266,
90988,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImportDirectPostWithAttachments(t *testing.T) {
th := Setup(t)
defer th.TearDown()
testsDir, _ := fileutils.FindDir("tests")
testImage := filepath.Join(testsDir, "test.png")
testImage2 := filepath.Join(testsDir, "test.svg")
// create a temp file with same name as original but with a different first byt... | explode_data.jsonl/67146 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1247
} | [
2830,
3393,
11511,
16027,
4133,
2354,
75740,
1155,
353,
8840,
836,
8,
1476,
70479,
1669,
18626,
1155,
340,
16867,
270,
836,
682,
4454,
2822,
78216,
6184,
11,
716,
1669,
1034,
6031,
9998,
6184,
445,
23841,
1138,
18185,
1906,
1669,
26054,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConnectorServiceQuerySuccess(t *testing.T) {
// given
var (
fixAppName = "app-name"
fixURL = "http://some-url-with-token"
fixGQLObj = &gqlschema.ConnectorService{
URL: "http://some-url-with-token",
}
)
serviceMock := automock.NewApplicationSvc()
defer serviceMock.AssertExpectations(t)
se... | explode_data.jsonl/28765 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 230
} | [
2830,
3393,
35954,
1860,
2859,
7188,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
2405,
2399,
197,
1166,
941,
87994,
284,
330,
676,
11494,
698,
197,
1166,
941,
3144,
257,
284,
330,
1254,
1110,
14689,
25443,
26189,
34841,
698,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUserDefinedBool(t *testing.T) {
var flags FlagSet
flags.Init("test", ContinueOnError)
var b boolFlagVar
var err error
flags.Var(&b, "b", "usage")
if err = flags.Parse([]string{"-b", "-b", "-b", "-b=true", "-b=false", "-b", "barg", "-b"}); err != nil {
if b.count < 4 {
t.Error(err)
}
}
if b.coun... | explode_data.jsonl/53995 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
3393,
1474,
29361,
11233,
1155,
353,
8840,
836,
8,
341,
2405,
8042,
22666,
1649,
198,
59516,
26849,
445,
1944,
497,
15003,
74945,
340,
2405,
293,
1807,
12135,
3962,
198,
2405,
1848,
1465,
198,
59516,
87968,
2099,
65,
11,
330,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTenantPrefix(t *testing.T) {
tIDs := []roachpb.TenantID{
roachpb.SystemTenantID,
roachpb.MakeTenantID(2),
roachpb.MakeTenantID(999),
roachpb.MakeTenantID(math.MaxUint64),
}
for _, tID := range tIDs {
t.Run(fmt.Sprintf("%v", tID), func(t *testing.T) {
// Encode tenant ID.
k := MakeTenantPrefi... | explode_data.jsonl/56601 | {
"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,
71252,
14335,
1155,
353,
8840,
836,
8,
341,
3244,
30466,
1669,
3056,
64500,
16650,
836,
25121,
915,
515,
197,
197,
64500,
16650,
16620,
71252,
915,
345,
197,
197,
64500,
16650,
50133,
71252,
915,
7,
17,
1326,
197,
197,
64500... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReminderExecutionZeroDuration(t *testing.T) {
testActorsRuntime := newTestActorsRuntime()
actorType, actorID := getTestActorTypeAndID()
actorKey := testActorsRuntime.constructCompositeKey(actorType, actorID)
fakeCallAndActivateActor(testActorsRuntime, actorKey)
err := testActorsRuntime.executeReminder(ac... | explode_data.jsonl/60013 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
95359,
20294,
17999,
12945,
1155,
353,
8840,
836,
8,
341,
18185,
2414,
1087,
15123,
1669,
501,
2271,
2414,
1087,
15123,
741,
93410,
929,
11,
12089,
915,
1669,
633,
2271,
18870,
929,
3036,
915,
741,
93410,
1592,
1669,
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 TestReadPlainBYTE_ARRAY(t *testing.T) {
testData := [][]interface{}{
{("hello"), ("world")},
{("good"), (""), ("a"), ("b")},
}
for _, data := range testData {
res, _ := ReadPlainBYTE_ARRAY(bytes.NewReader(WritePlainBYTE_ARRAY(data)), uint64(len(data)))
if fmt.Sprintf("%v", data) != fmt.Sprintf("%v", re... | explode_data.jsonl/23895 | {
"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,
4418,
26982,
33908,
17724,
1155,
353,
8840,
836,
8,
341,
18185,
1043,
1669,
52931,
4970,
67066,
197,
197,
90,
445,
14990,
3975,
3489,
14615,
79583,
197,
197,
90,
445,
18536,
3975,
320,
3014,
701,
3489,
64,
3975,
3489,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPackObjectReturnsObjectWithDeltaBaseOffset(t *testing.T) {
const original = "Hello"
compressed, _ := compress(original)
delta, err := compress(string([]byte{
0x05, // Source size: 5.
0x0e, // Destination size: 14.
0x91, // (1000 0001) (instruction=copy, bitmask=0001)
0x00, // (0000 0000) (offset=0... | explode_data.jsonl/30628 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 660
} | [
2830,
3393,
30684,
1190,
16446,
1190,
2354,
20277,
3978,
6446,
1155,
353,
8840,
836,
8,
341,
4777,
4024,
284,
330,
9707,
698,
32810,
14318,
11,
716,
1669,
24611,
39809,
692,
85435,
11,
1848,
1669,
24611,
3609,
10556,
3782,
515,
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 TestGetServiceKeyByName(t *testing.T) {
Convey("Get service key by name", t, func() {
setup(MockRoute{"GET", "/v2/service_keys", getServiceKeyPayload, "", 200, "q=name:test01_key", nil}, t)
defer teardown()
c := &Config{
ApiAddress: server.URL,
Token: "foobar",
}
client, err := NewClient(c)
... | explode_data.jsonl/66019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 328
} | [
2830,
3393,
1949,
1860,
1592,
16898,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
1949,
2473,
1376,
553,
829,
497,
259,
11,
2915,
368,
341,
197,
84571,
66436,
4899,
4913,
3806,
497,
3521,
85,
17,
34186,
12631,
497,
85869,
1592,
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... | 1 |
func TestAPINewMultipartHandlerParallel(t *testing.T) {
defer DetectTestLeak(t)()
ExecObjectLayerAPITest(t, testAPINewMultipartHandlerParallel, []string{"NewMultipart"})
} | explode_data.jsonl/10704 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
2537,
687,
365,
44,
18204,
3050,
16547,
1155,
353,
8840,
836,
8,
341,
16867,
33287,
2271,
2304,
585,
1155,
8,
741,
197,
10216,
1190,
9188,
2537,
952,
477,
1155,
11,
1273,
2537,
687,
365,
44,
18204,
3050,
16547,
11,
3056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestNSERetryClient_Unregister(t *testing.T) {
t.Cleanup(func() { goleak.VerifyNone(t) })
var callCounter = &count.CallCounter{}
var counter = count.NewNetworkServiceEndpointRegistryClient(callCounter)
var client = chain.NewNetworkServiceEndpointRegistryClient(
retry.NewNetworkServiceEndpointRegistryClient(... | explode_data.jsonl/68614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 238
} | [
2830,
3393,
2448,
640,
15149,
2959,
40687,
6343,
1155,
353,
8840,
836,
8,
341,
3244,
727,
60639,
18552,
368,
314,
728,
273,
585,
54853,
4064,
1155,
8,
9568,
2405,
1618,
14099,
284,
609,
1830,
27017,
14099,
16094,
2405,
5546,
284,
1760,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadCRSpecFromEnvYaml(t *testing.T) {
os.Setenv("YAML_CONF", "")
_, err := ReadCRSpecFromEnvYaml()
if err == nil {
t.Fail()
}
setup(t)
cfg, err := ReadCRSpecFromEnvYaml()
if err != nil {
t.Fatalf("error reading config from env")
}
if cfg.Spec.Configs["qliksense"][0].Name != "acceptEULA" {
t.Fail... | explode_data.jsonl/60728 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
4418,
8973,
8327,
3830,
14359,
56,
9467,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
56,
31102,
29212,
497,
14676,
197,
6878,
1848,
1669,
4457,
8973,
8327,
3830,
14359,
56,
9467,
741,
743,
1848,
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,
1... | 5 |
func TestTradeActions_SyntheticOfferIds(t *testing.T) {
ht := StartHTTPTest(t, "offer_ids")
defer ht.Finish()
var records []horizon.Trade
w := ht.Get("/trades")
if ht.Assert.Equal(200, w.Code) {
if ht.Assert.PageOf(4, w.Body) {
ht.UnmarshalPage(w.Body, &records)
assertOfferType(ht, records[0].BaseOfferID, ... | explode_data.jsonl/6927 | {
"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,
39173,
12948,
1098,
1872,
17556,
39462,
12701,
1155,
353,
8840,
836,
8,
341,
197,
426,
1669,
5145,
9230,
2271,
1155,
11,
330,
25077,
8077,
1138,
16867,
34323,
991,
18176,
741,
2405,
7424,
3056,
19530,
16973,
8240,
1021,
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... | 3 |
func TestFooterRoundTrip(t *testing.T) {
buf := make([]byte, 100+maxFooterLen)
for _, format := range []TableFormat{
TableFormatRocksDBv2,
TableFormatLevelDB,
} {
t.Run(fmt.Sprintf("format=%d", format), func(t *testing.T) {
checksums := []ChecksumType{ChecksumTypeCRC32c}
if format != TableFormatLevelDB {... | explode_data.jsonl/40344 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 794
} | [
2830,
3393,
19445,
27497,
56352,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
1281,
10556,
3782,
11,
220,
16,
15,
15,
10,
2810,
19445,
11271,
340,
2023,
8358,
3561,
1669,
2088,
3056,
2556,
4061,
515,
197,
197,
2556,
4061,
49,
25183,
350... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkdir(t *testing.T) {
b := &Builder{flags: &BFlags{}, runConfig: &container.Config{}, disableCommit: true}
workingDir := "/app"
if runtime.GOOS == "windows" {
workingDir = "C:\app"
}
err := workdir(b, []string{workingDir}, nil, "")
if err != nil {
t.Fatalf("Error should be empty, got: %s", err.... | explode_data.jsonl/28279 | {
"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,
6776,
3741,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
609,
3297,
90,
11161,
25,
609,
33,
9195,
22655,
1598,
2648,
25,
609,
3586,
10753,
22655,
11156,
33441,
25,
830,
630,
197,
21152,
6184,
1669,
3521,
676,
1837,
743,
15592... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCrossShardPoolv2RemoveBlockByHeight(t *testing.T) {
ResetCrossShardPoolTest()
removeSinceBlockHeight := make(map[byte]uint64)
fromShardID := byte(0)
toShardID := byte(1)
removeSinceBlockHeight[fromShardID] = 4
crossShardPoolMapTest[toShardID].validPool[fromShardID] = append(crossShardPoolMapTest[toShardI... | explode_data.jsonl/74592 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 784
} | [
2830,
3393,
28501,
2016,
567,
10551,
85,
17,
13021,
4713,
1359,
3640,
1155,
353,
8840,
836,
8,
341,
197,
14828,
28501,
2016,
567,
10551,
2271,
741,
47233,
12549,
4713,
3640,
1669,
1281,
9147,
58,
3782,
60,
2496,
21,
19,
340,
42727,
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... | 7 |
func TestShouldHashSHA512Password(t *testing.T) {
hash, err := HashPassword("password", "aFr56HjK3DrB8t3S", HashingAlgorithmSHA512, 50000, 0, 0, 0, 16)
assert.NoError(t, err)
code, parameters, salt, hash, _ := crypt.DecodeSettings(hash)
assert.Equal(t, "6", code)
assert.Equal(t, "aFr56HjK3DrB8t3S", salt)
asser... | explode_data.jsonl/40164 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 247
} | [
2830,
3393,
14996,
6370,
33145,
20,
16,
17,
4876,
1155,
353,
8840,
836,
8,
341,
50333,
11,
1848,
1669,
6531,
4876,
445,
3833,
497,
330,
64,
22560,
20,
21,
39,
73,
42,
18,
8847,
33,
23,
83,
18,
50,
497,
6531,
287,
27847,
33145,
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 TestAdditionalCIDR(t *testing.T) {
runTestAWS(t, "additionalcidr.example.com", "additional_cidr", "v1alpha3", false, 3, true, false, nil)
runTestCloudformation(t, "additionalcidr.example.com", "additional_cidr", "v1alpha2", false, nil)
} | explode_data.jsonl/17506 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
3393,
29019,
54146,
49,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
36136,
1155,
11,
330,
35499,
20558,
81,
7724,
905,
497,
330,
35499,
68699,
81,
497,
330,
85,
16,
7141,
18,
497,
895,
11,
220,
18,
11,
830,
11,
895,
11,
2092,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_StrStrMap_Batch(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
m := gmap.NewStrStrMap()
m.Sets(map[string]string{"a": "a", "b": "b", "c": "c"})
t.Assert(m.Map(), map[string]string{"a": "a", "b": "b", "c": "c"})
m.Removes([]string{"a", "b"})
t.Assert(m.Map(), map[string]string{"c": "c"})
})
} | explode_data.jsonl/36007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 163
} | [
2830,
3393,
46171,
2580,
2227,
1668,
754,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
2109,
1669,
342,
2186,
7121,
2580,
2580,
2227,
2822,
197,
2109,
808,
1415,
9147,
14032,
30953... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue20575(t *testing.T) {
db := newTestDB(t, "people")
defer closeDB(t, db)
tx, err := db.Begin()
if err != nil {
t.Fatal(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
defer cancel()
_, err = tx.QueryContext(ctx, "SELECT|people|age,name|")
if err != nil {
t.Fatal... | explode_data.jsonl/16018 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 225
} | [
2830,
3393,
42006,
17,
15,
20,
22,
20,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
501,
2271,
3506,
1155,
11,
330,
16069,
1138,
16867,
3265,
3506,
1155,
11,
2927,
692,
46237,
11,
1848,
1669,
2927,
28467,
741,
743,
1848,
961,
2092,
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... | 5 |
func TestRuleOrderByMultiDirection(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := [][]string{
{
`SELECT col FROM tbl order by col desc, col2 asc`,
},
{
`SELECT col FROM tbl order by col, col2`,
},
}
for _, sql := range sqls[0] {
q, err := NewQuery4Audit(s... | explode_data.jsonl/76831 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 379
} | [
2830,
3393,
11337,
34605,
20358,
9268,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
52931,
917,
515,
197,
197,
515,
298,
197,
63,
4858,
1375,
4295,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStepper_Before(t *testing.T) {
st := Stepper{
N: 1,
U: Unum,
}
val, err := st.Before(2)
assert.NoError(t, err)
assert.Equal(t, 1, val)
} | explode_data.jsonl/78068 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
20903,
6922,
1668,
4642,
1155,
353,
8840,
836,
8,
341,
18388,
1669,
3360,
6922,
515,
197,
18317,
25,
220,
16,
345,
197,
15980,
25,
1230,
372,
345,
197,
532,
19302,
11,
1848,
1669,
357,
31153,
7,
17,
340,
6948,
35699,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestDelimiterRegexRegex(t *testing.T) {
delim := delimiterRegexp("--\\*")
tokens := Tokenize("-*--*---**---", delim)
if delim.str != nil ||
tokens[0].text.ToString() != "-*--*" ||
tokens[1].text.ToString() != "---*" ||
tokens[2].text.ToString() != "*---" {
t.Errorf("%s %d", tokens, len(tokens))
}
} | explode_data.jsonl/40863 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 147
} | [
2830,
3393,
91098,
32464,
32464,
1155,
353,
8840,
836,
8,
341,
2698,
39795,
1669,
29020,
3477,
4580,
21549,
3422,
9,
1138,
3244,
9713,
1669,
9660,
551,
13645,
9,
313,
9,
4421,
334,
4421,
497,
63209,
340,
743,
63209,
9528,
961,
2092,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestGocloak_LoginAdmin(t *testing.T) {
t.Parallel()
cfg := GetConfig(t)
client := NewClientWithDebug(t)
_, err := client.LoginAdmin(
cfg.Admin.UserName,
cfg.Admin.Password,
cfg.Admin.Realm)
FailIfErr(t, err, "LoginAdmin failed")
} | explode_data.jsonl/79520 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
38,
509,
385,
585,
79232,
7210,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50286,
1669,
2126,
2648,
1155,
340,
25291,
1669,
1532,
2959,
2354,
7939,
1155,
340,
197,
6878,
1848,
1669,
2943,
32499,
7210,
1006,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_Service_Echo(t *testing.T) {
bkoff := backoff.NewExponentialBackOff()
bkoff.MaxElapsedTime = time.Second * 15
err := backoff.Retry(func() error {
logger, _ := test.NewNullLogger()
logger.SetLevel(logrus.DebugLevel)
c := service.NewContainer(logger)
c.Register(ID, &Service{})
err := c.Init(&tes... | explode_data.jsonl/34498 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 718
} | [
2830,
3393,
52548,
2089,
958,
1155,
353,
8840,
836,
8,
341,
2233,
74,
1847,
1669,
1182,
1847,
7121,
840,
59825,
3707,
4596,
741,
2233,
74,
1847,
14535,
98483,
284,
882,
32435,
353,
220,
16,
20,
271,
9859,
1669,
1182,
1847,
2013,
15149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSyncConfig(t *testing.T) {
var testcases = []struct {
name string
oldRes []common.Resource
newRes []common.Resource
expect []common.Resource
}{
{
name: "empty",
oldRes: []common.Resource{},
newRes: []common.Resource{},
expect: []common.Resource{},
},
{
name: "append",
ol... | explode_data.jsonl/12951 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1571
} | [
2830,
3393,
12154,
2648,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
23910,
284,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
61828,
1061,
3056,
5464,
20766,
198,
197,
8638,
1061,
3056,
5464,
20766,
198,
197,
24952,
3056,
5464,
20766,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDecode(t *testing.T) {
t.Run("int", func(t *testing.T) {
var x int
err := conf.DecodeValues([]string{"10"}, conf.IntType, &x)
assert.NoError(t, err)
assert.Equal(t, 10, x)
err = conf.DecodeValues([]string{"10m"}, conf.DurationType, &x)
assert.NoError(t, err)
assert.Equal(t, int(time.Minute*10)... | explode_data.jsonl/20303 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 595
} | [
2830,
3393,
32564,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
396,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
2405,
856,
526,
271,
197,
9859,
1669,
2335,
56372,
6227,
10556,
917,
4913,
16,
15,
14345,
2335,
7371,
929,
11,
609... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUpdateUserHashedPassword(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
client := th.Client
password := "SuperSecurePass23!"
passwordHash := "$2a$10$CiS1iWVPUj7rQNdY6XW53.DmaPLsETIvmW2p0asp4Dqpofs10UL5W"
th.TestForSystemAdminAndLocal(t, func(t *testing.T, client *model.Client4) {
_, er... | explode_data.jsonl/47528 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 278
} | [
2830,
3393,
4289,
1474,
6370,
291,
4876,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
25291,
1669,
270,
11716,
271,
58199,
1669,
330,
19284,
49813,
12187,
17,
18,
24734,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtractCustomQueryParams(t *testing.T) {
testcases := []struct {
name string
config *mysql.Config
expectedParams map[string]string
expectedCustomParams map[string]string
expectedErr error
}{
{name: "nil config", expectedErr: ErrNilConfig},
{
name:... | explode_data.jsonl/47866 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 799
} | [
2830,
3393,
28959,
10268,
2859,
4870,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
338,
914,
198,
197,
25873,
2290,
353,
12272,
10753,
198,
197,
42400,
4870,
981,
2415,
14032,
30953,
198,
197,
42400,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLdFlagsFullTemplate(t *testing.T) {
run := time.Now().UTC()
commit := time.Now().AddDate(-1, 0, 0)
ctx := &context.Context{
Git: context.GitInfo{
CurrentTag: "v1.2.3",
Commit: "123",
CommitDate: commit,
},
Date: run,
Version: "1.2.3",
Env: map[string]string{"FOO": "123"},
}
... | explode_data.jsonl/54153 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 538
} | [
2830,
3393,
43,
67,
9195,
9432,
7275,
1155,
353,
8840,
836,
8,
341,
56742,
1669,
882,
13244,
1005,
21183,
741,
197,
17413,
1669,
882,
13244,
1005,
2212,
1916,
4080,
16,
11,
220,
15,
11,
220,
15,
692,
20985,
1669,
609,
2147,
9328,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInputService10ProtocolTestBlobAndTimestampShapesCase1(t *testing.T) {
sess := session.New()
svc := NewInputService10ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
input := &InputService10TestShapeInputService10TestCaseOperation1Input{
StructureParam: &InputService10TestShapeStructur... | explode_data.jsonl/46480 | {
"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,
16,
15,
20689,
2271,
37985,
3036,
20812,
92193,
4207,
16,
1155,
353,
8840,
836,
8,
341,
1903,
433,
1669,
3797,
7121,
741,
1903,
7362,
1669,
1532,
2505,
1860,
16,
15,
20689,
2271,
57223,
11,
609,
8635,
10753,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDeltaDecode(t *testing.T) {
t.Skipf("TODO: investigate this test failure")
for _, test := range []struct {
name string
input []byte
want []uint32
}{
{
name: "small",
input: []byte{0x03, 0x43, 0x01, 0x00, 0x04, 0x06, 0x42, 0x27, 0x08},
want: []uint32{3, 4, 5, 6, 9, 10, 15, 17, 18, 333},
... | explode_data.jsonl/42860 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 335
} | [
2830,
3393,
20277,
32564,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
69,
445,
14732,
25,
19314,
419,
1273,
7901,
1138,
2023,
8358,
1273,
1669,
2088,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
22427,
3056,
3782,
198,
197,
50780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccAWSS3BucketObject_defaultBucketSSE(t *testing.T) {
var obj1 s3.GetObjectOutput
resourceName := "aws_s3_bucket_object.object"
rInt := acctest.RandInt()
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccChec... | explode_data.jsonl/64975 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
14603,
14419,
1220,
18,
36018,
1190,
9993,
36018,
50,
925,
1155,
353,
8840,
836,
8,
341,
2405,
2839,
16,
274,
18,
25618,
5097,
198,
50346,
675,
1669,
330,
8635,
643,
18,
38749,
5314,
6035,
698,
7000,
1072,
1669,
1613,
6788... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetSpecificIndexer(t *testing.T) {
p := mock.TVIndexer{}
indexersCollection = []Indexer{p}
if _, err := GetIndexer("Unknown"); err == nil {
t.Error("Expected to have error when getting unknown indexer, got none")
}
if _, err := GetIndexer("TVIndexer"); err != nil {
t.Errorf("Got error while retrievi... | explode_data.jsonl/81820 | {
"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,
1949,
47514,
1552,
261,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
7860,
836,
53,
1552,
261,
16094,
26327,
388,
6482,
284,
3056,
1552,
261,
90,
79,
630,
743,
8358,
1848,
1669,
2126,
1552,
261,
445,
13790,
5038,
1848,
621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestPopulateCluster_IsolateMasters(t *testing.T) {
c := buildMinimalCluster()
c.Spec.IsolateMasters = fi.Bool(true)
cloud, err := BuildCloud(c)
if err != nil {
t.Fatalf("error from BuildCloud: %v", err)
}
err = PerformAssignments(c, cloud)
if err != nil {
t.Fatalf("error from PerformAssignments: %v", e... | explode_data.jsonl/75036 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 323
} | [
2830,
3393,
11598,
6334,
28678,
31879,
33066,
44,
14199,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1936,
88328,
28678,
741,
1444,
36473,
4506,
33066,
44,
14199,
284,
9136,
52497,
3715,
340,
197,
12361,
11,
1848,
1669,
7854,
16055,
1337,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPutReflect(t *testing.T) {
var a1 int16 = 42
var a2 float32 = 9.2
expected := make([]byte, 6)
lex.PutInt16(expected, a1)
lex.PutFloat32(expected[2:], a2)
actual := make([]byte, 6)
lex.PutReflect(actual, a1)
lex.PutReflect(actual[2:], a2)
assert.True(t, bytes.Equal(expected, actual))
} | explode_data.jsonl/50145 | {
"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,
19103,
72789,
1155,
353,
8840,
836,
8,
341,
2405,
264,
16,
526,
16,
21,
284,
220,
19,
17,
198,
2405,
264,
17,
2224,
18,
17,
284,
220,
24,
13,
17,
271,
42400,
1669,
1281,
10556,
3782,
11,
220,
21,
340,
197,
2571,
3982... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPipeWriteMultiThread(t *testing.T) {
pReader, pWriter := New(WithSizeLimit(0))
var errg errgroup.Group
for i := 0; i < 10; i++ {
errg.Go(func() error {
b := buf.New()
b.WriteString("abcd")
return pWriter.WriteMultiBuffer(buf.MultiBuffer{b})
})
}
time.Sleep(time.Millisecond * 100)
pWriter.Cl... | explode_data.jsonl/987 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
34077,
7985,
20358,
6855,
1155,
353,
8840,
836,
8,
341,
3223,
5062,
11,
281,
6492,
1669,
1532,
7,
2354,
1695,
16527,
7,
15,
4390,
2405,
1848,
70,
1848,
4074,
5407,
198,
2023,
600,
1669,
220,
15,
26,
600,
366,
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... | 1 |
func TestGetActionStr(t *testing.T) {
tt := []struct {
statement string
actionStr string
isError bool
}{
{
statement: "create table t (id int primary key)",
actionStr: sqlparser.CreateStr,
},
{
statement: "alter table t drop column c",
actionStr: sqlparser.AlterStr,
},
{
statement: "d... | explode_data.jsonl/42826 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 331
} | [
2830,
3393,
1949,
2512,
2580,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
3056,
1235,
341,
197,
89566,
914,
198,
197,
38933,
2580,
914,
198,
197,
19907,
1454,
256,
1807,
198,
197,
59403,
197,
197,
515,
298,
89566,
25,
330,
3182,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAmount(t *testing.T) {
tt := test.Start(t)
defer tt.Finish()
action := makeTestAction()
result := action.GetAmount("minus_one")
tt.Assert.NoError(action.Err)
tt.Assert.Equal(xdr.Int64(-10000000), result)
result = action.GetAmount("zero")
tt.Assert.NoError(action.Err)
tt.Assert.Equal(xdr.Int64(0), re... | explode_data.jsonl/554 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 230
} | [
2830,
3393,
10093,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
1273,
12101,
1155,
340,
16867,
17853,
991,
18176,
741,
38933,
1669,
1281,
2271,
2512,
2822,
9559,
1669,
1917,
2234,
10093,
445,
38365,
11667,
1138,
3244,
83,
11711,
35699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCommandNoEnvFileNoError(t *testing.T) {
tmp := os.TempDir()
cmd := cli.NewCommand("unit test")
cmd.SetArgs([]string{"-c", path.Join(tmp, ".rr.yaml"), "--dotenv", path.Join(tmp, ".env")})
var executed bool
f, err := os.Create(path.Join(tmp, ".env"))
require.NoError(t, err)
f2, err := os.Create(path.Jo... | explode_data.jsonl/17539 | {
"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,
4062,
2753,
14359,
1703,
2753,
1454,
1155,
353,
8840,
836,
8,
341,
20082,
1669,
2643,
65009,
6184,
2822,
25920,
1669,
21348,
7121,
4062,
445,
3843,
1273,
1138,
25920,
4202,
4117,
10556,
917,
4913,
12,
66,
497,
1815,
22363,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAPIServiceResourceErrorActionable(t *testing.T) {
tests := []struct {
name string
errs []error
actionable bool
}{
{
name: "Nil/Actionable",
errs: nil,
actionable: true,
},
{
name: "Empty/Actionable",
errs: nil,
actionable: true,
},
{
na... | explode_data.jsonl/31216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 476
} | [
2830,
3393,
2537,
95125,
4783,
1454,
2512,
480,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
9859,
82,
981,
3056,
841,
198,
197,
38933,
480,
1807,
198,
197,
59403,
197,
197,
515,
298,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMapProxy_GetAllWithNilKeys(t *testing.T) {
_, err := mp.GetAll(nil)
AssertErrorNotNil(t, err, "GetAll did not return an error for nil keys")
mp.Clear()
} | explode_data.jsonl/57023 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 65
} | [
2830,
3393,
2227,
16219,
13614,
2403,
2354,
19064,
8850,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
10490,
45732,
27907,
340,
18017,
1454,
96144,
1155,
11,
1848,
11,
330,
1949,
2403,
1521,
537,
470,
458,
1465,
369,
2092,
6894,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEffectiveProxyConfig(t *testing.T) {
cases := []struct {
name string
configs []config.Config
defaultConfig *meshconfig.ProxyConfig
proxy *NodeMetadata
expected *meshconfig.ProxyConfig
}{
{
name: "CR applies to matching namespace",
configs: []config.Config{
ne... | explode_data.jsonl/52375 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2476
} | [
2830,
3393,
67539,
16219,
2648,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
25873,
82,
981,
3056,
1676,
10753,
198,
197,
11940,
2648,
353,
23506,
1676,
75200,
2648,
198,
197,
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 TestStructInfo(t *testing.T) {
expect := StructInfo{
Type: reflect.TypeOf(testStruct{}),
RawSchema: []byte("Field1\x00Field2\x00Foo\x00Bar\x00Astolfo"),
Fields: []StructField{
{
Type: reflect.TypeOf(""),
Kind: reflect.String,
Name: []byte("Field1"),
Size: 2 * unsafe.Sizeof(0)... | explode_data.jsonl/9688 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 586
} | [
2830,
3393,
9422,
1731,
1155,
353,
8840,
836,
8,
341,
24952,
1669,
16139,
1731,
515,
197,
27725,
25,
414,
8708,
73921,
8623,
9422,
6257,
1326,
197,
11143,
672,
8632,
25,
3056,
3782,
445,
1877,
16,
3462,
15,
15,
1877,
17,
3462,
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... | 2 |
func TestGetParametersFromSsmParameterStoreWithAllResolvedNoPaging(t *testing.T) {
parametersList := []string{}
expectedValues := map[string]SsmParameterInfo{}
for i := 0; i < maxParametersRetrievedFromSsm/2; i++ {
name := "name_" + strconv.Itoa(i)
key := ssmNonSecurePrefix + name
parametersList = append(para... | explode_data.jsonl/56723 | {
"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,
1949,
9706,
3830,
50,
3563,
4971,
6093,
2354,
2403,
65394,
2753,
47,
4118,
1155,
353,
8840,
836,
8,
341,
67543,
852,
1669,
3056,
917,
16094,
42400,
6227,
1669,
2415,
14032,
60,
50,
3563,
4971,
1731,
31483,
2023,
600,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.