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 TestReconciler_ScaleDown_Partial(t *testing.T) {
// Has desired 10
job := mock.Job()
// Create 20 existing allocations
var allocs []*structs.Allocation
for i := 0; i < 20; i++ {
alloc := mock.Alloc()
alloc.Job = job
alloc.JobID = job.ID
alloc.NodeID = uuid.Generate()
alloc.Name = structs.AllocName(... | explode_data.jsonl/67231 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 408
} | [
2830,
3393,
693,
40446,
5769,
1098,
2246,
4454,
1088,
20894,
1155,
353,
8840,
836,
8,
341,
197,
322,
11443,
12685,
220,
16,
15,
198,
68577,
1669,
7860,
45293,
2822,
197,
322,
4230,
220,
17,
15,
6350,
69642,
198,
2405,
5574,
82,
29838,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJob_delimiter(t *testing.T) {
type fields struct {
session session.ServiceFormatter
info Response
}
tests := []struct {
name string
fields fields
want string
}{
{
name: "tab",
fields: fields{
info: Response{
ColumnDelimiter: "TAB",
},
},
want: "\t",
},
{
n... | explode_data.jsonl/19875 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 638
} | [
2830,
3393,
12245,
18029,
17700,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
25054,
3797,
13860,
14183,
198,
197,
27043,
262,
5949,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
55276,
5043,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSingleThreadGet(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
os.Setenv("MM_FEATUREFLAGS_COLLAPSEDTHREADS", "true")
defer os.Unsetenv("MM_FEATUREFLAGS_COLLAPSEDTHREADS")
th.App.UpdateConfig(func(cfg *model.Config) {
*cfg.ServiceSettings.ThreadAutoFollow = true
*cfg.ServiceSettings.Col... | explode_data.jsonl/47576 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 631
} | [
2830,
3393,
10888,
6855,
1949,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
25078,
4202,
3160,
445,
8035,
30827,
32748,
74317,
2537,
20275,
47519,
50,
497,
330,
1866,
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 TestPopUp_Move_Constrained(t *testing.T) {
label := NewLabel("Hi")
win := test.NewWindow(NewLabel("OK"))
win.Resize(fyne.NewSize(60, 40))
pop := NewPopUp(label, win.Canvas())
pos := fyne.NewPos(30, 20)
pop.Move(pos)
innerPos := pop.Content.Position()
assert.Less(t, innerPos.X-theme.Padding(), pos.X,
"c... | explode_data.jsonl/65216 | {
"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,
11598,
2324,
66352,
15100,
57727,
1155,
353,
8840,
836,
8,
341,
29277,
1669,
1532,
2476,
445,
13048,
1138,
68452,
1669,
1273,
7121,
4267,
35063,
2476,
445,
3925,
5455,
68452,
77707,
955,
81708,
7121,
1695,
7,
21,
15,
11,
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 TestMappingRuleMarkTombstonedAlreadyTombstoned(t *testing.T) {
err := testMappingRule2.markTombstoned(UpdateMetadata{})
require.Error(t, err)
require.True(t, strings.Contains(err.Error(), "bar is already tombstoned"))
} | explode_data.jsonl/64585 | {
"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,
6807,
11337,
8949,
51,
2855,
7720,
291,
38370,
51,
2855,
7720,
291,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
1273,
6807,
11337,
17,
18406,
51,
2855,
7720,
291,
7,
4289,
14610,
37790,
17957,
6141,
1155,
11,
1848,
340,
1795... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_validIPSetType(t *testing.T) {
testCases := []struct {
setType Type
valid bool
}{
{ // case[0]
setType: Type("foo"),
valid: false,
},
{ // case[1]
setType: HashIPPortNet,
valid: true,
},
{ // case[2]
setType: HashIPPort,
valid: true,
},
{ // case[3]
setType: Ha... | explode_data.jsonl/74016 | {
"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,
8337,
3298,
1649,
929,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
8196,
929,
3990,
198,
197,
56322,
256,
1807,
198,
197,
59403,
197,
197,
90,
442,
1142,
58,
15,
921,
298,
8196,
929,
25,
3990,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceImpl_GetSeasons(t *testing.T) {
var (
firstSeason = dto.Season{
LegacyID: 1273,
LeagueID: 1,
Name: "2005/2006",
IsCurrentSeason: false,
}
secondSeason = dto.Season{
LegacyID: 1274,
LeagueID: 1,
Name: "2006/2007",
IsCurrent... | explode_data.jsonl/28416 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
50603,
13614,
34860,
82,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
42190,
34860,
284,
28335,
5732,
1497,
515,
298,
15070,
791,
2757,
915,
25,
286,
220,
16,
17,
22,
18,
345,
298,
197,
70107,
915,
25,
286,
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 TestUnschedulablePodBecomesSchedulable(t *testing.T) {
tests := []struct {
name string
init func(kubernetes.Interface, string) error
pod *pausePodConfig
update func(kubernetes.Interface, string) error
}{
{
name: "node gets added",
pod: &pausePodConfig{
Name: "pod-1",
},
update: f... | explode_data.jsonl/131 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2601
} | [
2830,
3393,
1806,
72243,
360,
480,
23527,
33,
757,
20347,
50,
2397,
360,
480,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
28248,
256,
2915,
5969,
29827,
41065,
11,
914,
8,
1465,
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... | 2 |
func TestEvidence_Misbehavior(t *testing.T) {
blocks := fetchBlockChain(t)
testnet := loadTestnet(t)
seenEvidence := 0
for _, block := range blocks {
if len(block.Evidence.Evidence) != 0 {
seenEvidence += len(block.Evidence.Evidence)
}
}
require.Equal(t, testnet.Evidence, seenEvidence,
"difference betwee... | explode_data.jsonl/35036 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
92602,
1245,
285,
55866,
1155,
353,
8840,
836,
8,
341,
2233,
34936,
1669,
7807,
4713,
18837,
1155,
340,
18185,
4711,
1669,
2795,
2271,
4711,
1155,
340,
197,
28312,
92602,
1669,
220,
15,
198,
2023,
8358,
2504,
1669,
2088,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPubackMessageEncode(t *testing.T) {
msgBytes := []byte{
byte(PUBACK << 4),
2,
0, // packet ID MSB (0)
7, // packet ID LSB (7)
}
msg := NewPubackMessage()
msg.SetPacketId(7)
dst := make([]byte, 10)
n, err := msg.Encode(dst)
require.NoError(t, err, "Error decoding message.")
require.Equal(t, l... | explode_data.jsonl/23229 | {
"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,
29162,
473,
2052,
32535,
1155,
353,
8840,
836,
8,
341,
21169,
7078,
1669,
3056,
3782,
515,
197,
31422,
5304,
4493,
4032,
1115,
220,
19,
1326,
197,
197,
17,
345,
197,
197,
15,
11,
442,
10151,
3034,
10292,
33,
320,
15,
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 TestInvalidSKI(t *testing.T) {
t.Parallel()
provider, _, cleanup := currentTestConfig.Provider(t)
defer cleanup()
k, err := provider.GetKey(nil)
if err == nil {
t.Fatal("Error should be different from nil in this case")
}
if k != nil {
t.Fatal("Return value should be equal to nil in this case")
}
k,... | explode_data.jsonl/29250 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
7928,
81545,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
19979,
11,
8358,
21290,
1669,
1482,
2271,
2648,
36208,
1155,
340,
16867,
21290,
2822,
16463,
11,
1848,
1669,
9109,
51723,
27907,
340,
743,
1848,
621,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestLiveUpdateMultipleContainersFallsBackForSomeUserRunFailuresSomeNonUserFailures(t *testing.T) {
f := newBDFixture(t, k8s.EnvDockerDesktop, container.RuntimeDocker)
defer f.TearDown()
f.docker.ExecErrorsToThrow = []error{
userFailureErrDocker,
fmt.Errorf("not a user failure"),
userFailureErrDocker,
}
... | explode_data.jsonl/35166 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 374
} | [
2830,
3393,
20324,
4289,
32089,
74632,
37,
5583,
3707,
2461,
8373,
1474,
6727,
19524,
1413,
8373,
8121,
1474,
19524,
1413,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
33,
5262,
12735,
1155,
11,
595,
23,
82,
81214,
35,
13659,
23597,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestService_WaitForDataChanged(t *testing.T) {
dataChanged := make(chan struct{}, 1)
ms := MetaClient{}
ms.WaitForDataChangedFn = func() chan struct{} {
return dataChanged
}
calls := make(chan bool, 2)
ms.DatabasesFn = func() []meta.DatabaseInfo {
calls <- true
return nil
}
s := subscriber.NewServic... | explode_data.jsonl/80723 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 419
} | [
2830,
3393,
1860,
2763,
1315,
2461,
1043,
5389,
1155,
353,
8840,
836,
8,
341,
8924,
5389,
1669,
1281,
35190,
2036,
22655,
220,
16,
340,
47691,
1669,
15819,
2959,
16094,
47691,
99153,
1043,
5389,
24911,
284,
2915,
368,
26023,
2036,
6257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateFork(t *testing.T) {
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
t.Errorf("Bad method: %s", r.Method)
}
if r.URL.Path != "/repos/k8s/kuber/forks" {
t.Errorf("Bad request path: %s", r.URL.Path)
}
w.WriteHeade... | explode_data.jsonl/6308 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 270
} | [
2830,
3393,
4021,
37,
669,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
13470,
1220,
2836,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
743,
435,
20798,
961,
1758,
20798,
4133,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSortPresubmitRepoOrder(t *testing.T) {
tests := []struct {
name string
presubmits map[string][]prowConfig.Presubmit
expectedRepos []string
}{
{
name: "empty list of presubmits",
presubmits: map[string][]prowConfig.Presubmit{},
expectedRepos: []string{},
},
{
na... | explode_data.jsonl/22112 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 720
} | [
2830,
3393,
10231,
14367,
392,
1763,
25243,
4431,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
3223,
416,
392,
44703,
262,
2415,
14032,
45725,
79,
651,
2648,
1069,
416,
392,
1763,
198,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestUAutoCancelAllOpenOrders(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test: api keys not set or canManipulateRealOrders set to false")
}
_, err := b.UAutoCancelAllOpenOrders(context.Background(), currency.NewPair(currency.BTC, currency.USDT), 30)
if... | explode_data.jsonl/76576 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
52,
13253,
9269,
2403,
5002,
24898,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
1369,
753,
4814,
92876,
6334,
12768,
24898,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBlockPoolStatus(t *testing.T) {
var err error
n := 3
for n > 0 {
n--
err = testBlockPoolStatus(t)
if err != nil {
t.Log(err)
continue
} else {
return
}
}
if err != nil {
t.Errorf("no pass out of 3: %v", err)
}
} | explode_data.jsonl/33103 | {
"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,
4713,
10551,
2522,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
9038,
1669,
220,
18,
198,
2023,
308,
861,
220,
15,
341,
197,
9038,
7088,
197,
9859,
284,
1273,
4713,
10551,
2522,
1155,
340,
197,
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... | 4 |
func TestToBuffer(t *testing.T) {
t.Parallel()
for name, tc := range toBufferTT {
tc := tc
t.Run(name, func(t *testing.T) {
t.Parallel()
if got := hotlm.ToBuffer(tc.value); got != tc.want {
t.Fatalf("\n\twant: %+v\n\tgot: %+v", tc.want, got)
}
})
}
} | explode_data.jsonl/77737 | {
"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,
1249,
4095,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2023,
829,
11,
17130,
1669,
2088,
311,
4095,
14903,
341,
197,
78255,
1669,
17130,
198,
197,
3244,
16708,
3153,
11,
2915,
1155,
353,
8840,
836,
8,
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... | 2 |
func TestDataConfigValidation_Flags(t *testing.T) {
tests := []struct {
name string
fa flagsAndArgs
shouldFail bool
}{
{
name: "env-file-source and literal are both set",
fa: flagsAndArgs{
LiteralSources: []string{"one", "two"},
EnvFileSource: "three",
},
shouldFail: true,
... | explode_data.jsonl/53903 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 481
} | [
2830,
93200,
2648,
13799,
1400,
22851,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
1166,
64,
260,
8042,
3036,
4117,
198,
197,
197,
5445,
19524,
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... | 6 |
func TestExecuteScriptAsyncWithTimeoutWithCaps(t *testing.T) {
ctx := context.Background()
d, err := CreateSession(ctx, wdAddress(), 3, &capabilities.Capabilities{
AlwaysMatch: map[string]interface{}{
"timeouts": map[string]interface{}{
"script": 5000,
},
},
})
if err != nil {
t.Fatal(err)
}
defe... | explode_data.jsonl/68742 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 341
} | [
2830,
3393,
17174,
5910,
6525,
2354,
7636,
2354,
60741,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
2698,
11,
1848,
1669,
4230,
5283,
7502,
11,
45404,
4286,
1507,
220,
18,
11,
609,
94392,
78963,
8456,
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... | 7 |
func TestNewADS1015Driver(t *testing.T) {
// Does it return a pointer to an instance of ADS1x15Driver?
var bm interface{} = NewADS1015Driver(newI2cTestAdaptor())
_, ok := bm.(*ADS1x15Driver)
if !ok {
t.Errorf("NewADS1015Driver() should have returned a *ADS1x15Driver")
}
} | explode_data.jsonl/42577 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
3564,
49541,
16,
15,
16,
20,
11349,
1155,
353,
8840,
836,
8,
341,
197,
322,
12553,
432,
470,
264,
7445,
311,
458,
2867,
315,
64235,
16,
87,
16,
20,
11349,
5267,
2405,
34868,
3749,
6257,
284,
1532,
49541,
16,
15,
16,
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 TestReadInterleavedFrameOrRequest(t *testing.T) {
byts := []byte("DESCRIBE rtsp://example.com/media.mp4 RTSP/1.0\r\n" +
"Accept: application/sdp\r\n" +
"CSeq: 2\r\n" +
"\r\n")
byts = append(byts, []byte{0x24, 0x6, 0x0, 0x4, 0x1, 0x2, 0x3, 0x4}...)
var f InterleavedFrame
f.Payload = make([]byte, 10)
var... | explode_data.jsonl/74946 | {
"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,
4418,
3306,
273,
4141,
4369,
2195,
1900,
1155,
353,
8840,
836,
8,
341,
197,
1694,
2576,
1669,
3056,
3782,
445,
30910,
49,
49306,
16677,
2154,
1110,
8687,
905,
29506,
16870,
19,
10635,
4592,
14,
16,
13,
15,
12016,
1699,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNilLogger(t *testing.T) {
module := "LoggerConfig"
funcname := "NilLogger()"
type test struct {
name string
input []LoggerConfig
wants Logger
}
var tests = []test{
{
name: "test nil logger config routine",
input: []LoggerConfig{
NilLogger(),
},
wants: &nilLogger{},
},
}
var... | explode_data.jsonl/2590 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 432
} | [
2830,
3393,
19064,
7395,
1155,
353,
8840,
836,
8,
341,
54020,
1669,
330,
7395,
2648,
698,
29244,
606,
1669,
330,
19064,
7395,
368,
1837,
13158,
1273,
2036,
341,
197,
11609,
220,
914,
198,
197,
22427,
3056,
7395,
2648,
198,
197,
6692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseWithFuncsNoPtr(t *testing.T) {
type foo struct{}
err := ParseWithFuncs(foo{}, nil)
assert.EqualError(t, err, "env: expected a pointer to a Struct")
} | explode_data.jsonl/78785 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
14463,
2354,
9626,
82,
2753,
5348,
1155,
353,
8840,
836,
8,
341,
13158,
15229,
2036,
16094,
9859,
1669,
14775,
2354,
9626,
82,
71880,
22655,
2092,
340,
6948,
12808,
1454,
1155,
11,
1848,
11,
330,
3160,
25,
3601,
264,
7445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDriftctlCmd_Help(t *testing.T) {
cmd := NewDriftctlCmd(mocks.MockBuild{})
cases := []struct {
args []string
}{
{args: []string{}},
{args: []string{"help"}},
{args: []string{"--help"}},
{args: []string{"-h"}},
}
for _, tt := range cases {
output, err := test.Execute(&cmd.Command, tt.args...)
... | explode_data.jsonl/36197 | {
"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,
8847,
2085,
12373,
15613,
2039,
1267,
1155,
353,
8840,
836,
8,
341,
25920,
1669,
1532,
8847,
2085,
12373,
15613,
1255,
25183,
24664,
11066,
6257,
692,
1444,
2264,
1669,
3056,
1235,
341,
197,
31215,
3056,
917,
198,
197,
59403,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDirectiveMap_WithPrefix(t *testing.T) {
a := assert.New(t)
d := DirectiveMap{
"string_format": "NONE",
"smartling.file_charset": "UTF-16",
}
m := map[string]string{
"smartling.string_format": "NONE",
"smartling.file_charset": "UTF-16",
}
a.EqualValues(m, d.WithPrefix())
} | explode_data.jsonl/76200 | {
"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,
62076,
2227,
62,
2354,
14335,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
340,
2698,
1669,
56752,
2227,
515,
197,
197,
1,
917,
8955,
788,
688,
330,
45425,
756,
197,
197,
1,
39803,
2718,
9715,
65883,
788,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDiagnosisKeysForHours(t *testing.T) {
db, mock, _ := sqlmock.New(sqlmock.QueryMatcherOption(sqlmock.QueryMatcherEqual))
defer db.Close()
region := "302"
startHour := uint32(100)
endHour := uint32(200)
currentRollingStartIntervalNumber := int32(2651450)
minRollingStartIntervalNumber := timemath.RollingS... | explode_data.jsonl/64736 | {
"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,
21685,
49815,
8850,
2461,
23235,
1155,
353,
8840,
836,
8,
341,
20939,
11,
7860,
11,
716,
1669,
5704,
16712,
7121,
13148,
16712,
15685,
37554,
5341,
13148,
16712,
15685,
37554,
2993,
1171,
16867,
2927,
10421,
2822,
197,
3943,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateBigQueryInput(t *testing.T) {
for _, testcase := range []struct {
name string
cmd *bigquery.CreateCommand
want *fastly.CreateBigQueryInput
wantError string
}{
{
name: "required values set flag serviceID",
cmd: createCommandRequired(),
want: &fastly.CreateBigQueryInpu... | explode_data.jsonl/67597 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1136
} | [
2830,
3393,
4021,
15636,
2859,
2505,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
70080,
1669,
2088,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
25920,
981,
353,
16154,
1631,
79811,
198,
197,
50780,
414,
353,
9349,
398,
7251,
15636,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFQN(t *testing.T) {
uu := []struct {
ns, n string
e string
}{
{"fred", "blee", "fred/blee"},
{"", "blee", "blee"},
}
for _, u := range uu {
assert.Equal(t, u.e, client.FQN(u.ns, u.n))
}
} | explode_data.jsonl/41755 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 115
} | [
2830,
3393,
37,
87054,
1155,
353,
8840,
836,
8,
341,
10676,
84,
1669,
3056,
1235,
341,
197,
84041,
11,
308,
914,
198,
197,
7727,
257,
914,
198,
197,
59403,
197,
197,
4913,
27993,
497,
330,
891,
68,
497,
330,
27993,
14,
891,
68,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadConfig(t *testing.T) {
t.Run("config does not exist", func(t *testing.T) {
_, err := LoadConfig("doesnotexist.yml")
require.Error(t, err)
})
t.Run("malformed config", func(t *testing.T) {
_, err := LoadConfig("testdata/cfg/malformedconfig.yml")
require.EqualError(t, err, "unable to parse config... | explode_data.jsonl/38429 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 621
} | [
2830,
3393,
5879,
2648,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1676,
1558,
537,
3000,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
6878,
1848,
1669,
8893,
2648,
445,
27057,
1921,
28575,
33936,
1138,
197,
17957,
6141,
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 TestCacheQueryer_PodsForService(t *testing.T) {
service := &corev1.Service{
TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Service"},
ObjectMeta: metav1.ObjectMeta{Name: "service", Namespace: "default"},
Spec: corev1.ServiceSpec{
Selector: map[string]string{
"app": "one",
},
},
}
pod1 :... | explode_data.jsonl/45670 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1090
} | [
2830,
3393,
8233,
2859,
261,
76861,
2461,
1860,
1155,
353,
8840,
836,
8,
341,
52934,
1669,
609,
98645,
16,
13860,
515,
197,
27725,
12175,
25,
256,
77520,
16,
10184,
12175,
90,
7082,
5637,
25,
330,
85,
16,
497,
16840,
25,
330,
1860,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOrderBookRequest(t *testing.T) {
hmock := httptest.NewClient()
client := &Client{
HorizonURL: "https://localhost/",
HTTP: hmock,
}
orderBookRequest := OrderBookRequest{BuyingAssetType: AssetTypeNative, SellingAssetCode: "USD", SellingAssetType: AssetType4, SellingAssetIssuer: "GBVOL67TMUQBGL4TZY... | explode_data.jsonl/82477 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 584
} | [
2830,
3393,
4431,
7134,
1900,
1155,
353,
8840,
836,
8,
341,
9598,
16712,
1669,
54320,
70334,
7121,
2959,
741,
25291,
1669,
609,
2959,
515,
197,
13292,
269,
16973,
3144,
25,
330,
2428,
1110,
8301,
35075,
197,
197,
9230,
25,
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,
1... | 3 |
func TestMessageTransaction_ValidateCustom(t *testing.T) {
xmss := helper.GetAliceXMSS(6)
message := ""
fee := uint64(1)
xmssPK := misc.UCharVectorToBytes(xmss.PK())
messageTx := NewTestMessageTransaction(message, fee, xmssPK, nil)
// Transaction must be nil, as message length is 0
assert.Nil(t, messageTx.tx)
} | explode_data.jsonl/10386 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 116
} | [
2830,
3393,
2052,
8070,
62,
17926,
10268,
1155,
353,
8840,
836,
8,
341,
10225,
76,
778,
1669,
13137,
2234,
61686,
52337,
1220,
7,
21,
340,
24753,
1669,
8389,
1166,
2127,
1669,
2622,
21,
19,
7,
16,
340,
10225,
76,
778,
22242,
1669,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_nthBit(t *testing.T) {
type args struct {
n int
b []byte
}
tests := []struct {
name string
args args
want int
}{
{"a", args{0, []byte{0xA0}}, 1},
{"b", args{1, []byte{0xA0}}, 0},
{"c", args{2, []byte{0xA0}}, 1},
{"d", args{9, []byte{0xAB, 0xCD}}, 1},
}
for _, tt := range tests {
t.Ru... | explode_data.jsonl/32820 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 254
} | [
2830,
3393,
78342,
8344,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
9038,
526,
198,
197,
2233,
3056,
3782,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
526,
198,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestEc2Instance_LoadDetails(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
ec2Instance, mockEC2ApiHelper := getMockInstance(ctrl)
mockEC2ApiHelper.EXPECT().GetInstanceDetails(&instanceID).Return(nwInterfaces, nil)
mockEC2ApiHelper.EXPECT().GetSubnet(&subnetID).Return(subnet, nil)
err ... | explode_data.jsonl/750 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 288
} | [
2830,
3393,
50730,
17,
2523,
19553,
7799,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
197,
757,
17,
2523,
11,
7860,
7498,
17,
6563,
5511,
1669,
633,
11571,
2523,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFloat32_Pop(t *testing.T) {
testcases := []struct {
name string
s Float32
expect bool
}{
{
name: "test Float32 Pop, s is not empty",
s: map[float32]struct{}{1: {}, 1.5: {}, 1.2: {}},
expect: true,
},
{
name: "test Float32 Pop, s is empty",
s: map[float32]struct... | explode_data.jsonl/60103 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 375
} | [
2830,
3393,
5442,
18,
17,
1088,
453,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
1903,
414,
13001,
18,
17,
198,
197,
24952,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
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... | 5 |
func TestDeleteEventSubscription(t *testing.T) {
// Intializing plugin token
evcommon.Token.Tokens = map[string]string{
"ILO": "token",
}
config.SetUpMockConfig(t)
defer func() {
err := common.TruncateDB(common.InMemory)
if err != nil {
t.Fatalf("error: %v", err)
}
err = common.TruncateDB(common.OnDis... | explode_data.jsonl/18096 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 885
} | [
2830,
3393,
6435,
1556,
33402,
1155,
353,
8840,
836,
8,
341,
197,
322,
1333,
530,
4849,
9006,
3950,
198,
74837,
5464,
32277,
836,
9713,
284,
2415,
14032,
30953,
515,
197,
197,
7044,
1593,
788,
330,
5839,
756,
197,
532,
25873,
4202,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestDiscoveryProviderWithTargetFilter(t *testing.T) {
ctx := newMockContext()
expectedNumPeers := len(peers) - 1
discoveryService, err := NewEndpointDiscoveryWrapper(ctx, "testchannel", clientmocks.NewDiscoveryService(peers...), WithTargetFilter(newMockFilter(p3)))
assert.NoError(t, err, "error creating disc... | explode_data.jsonl/45590 | {
"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,
67400,
5179,
2354,
6397,
5632,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
501,
11571,
1972,
2822,
42400,
4651,
10197,
388,
1669,
2422,
65079,
388,
8,
481,
220,
16,
271,
34597,
7449,
1860,
11,
1848,
1669,
1532,
27380,
67400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEntry_SelectSnapDown(t *testing.T) {
// down snaps to end, but it also moves
e, window := setupSelection(false)
defer teardownImageTest(window)
c := window.Canvas()
assert.Equal(t, 1, e.CursorRow)
assert.Equal(t, 5, e.CursorColumn)
test.AssertImageMatches(t, "entry/selection_initial.png", c.Capture())
... | explode_data.jsonl/57318 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
5874,
58073,
61871,
4454,
1155,
353,
8840,
836,
8,
341,
197,
322,
1495,
51304,
311,
835,
11,
714,
432,
1083,
10797,
198,
7727,
11,
3241,
1669,
6505,
11177,
3576,
340,
16867,
49304,
1906,
2271,
15906,
340,
1444,
1669,
3241,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPartitionSpansSkipsIncompatibleNodes(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
// The spans that we're going to plan for.
span := roachpb.Span{Key: roachpb.Key("A"), EndKey: roachpb.Key("Z")}
gatewayNode := roachpb.NodeID(2)
ranges := []testSpanResolverRange{{"A", 1}, {"B... | explode_data.jsonl/43685 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2305
} | [
2830,
3393,
49978,
6406,
596,
19290,
3077,
641,
34842,
12288,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
16867,
1487,
77940,
1155,
568,
7925,
1155,
692,
197,
322,
576,
44295,
429,
582,
2299,
2087,
311,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSiteStats(t *testing.T) {
t.Parallel()
c := qt.New(t)
siteConfig := `
baseURL = "http://example.com/blog"
paginate = 1
defaultContentLanguage = "nn"
[languages]
[languages.nn]
languageName = "Nynorsk"
weight = 1
title = "Hugo på norsk"
[languages.en]
languageName = "English"
weight = 2
title = "Hugo in... | explode_data.jsonl/31277 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 620
} | [
2830,
3393,
17597,
16635,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
1669,
38949,
7121,
1155,
692,
1903,
632,
2648,
1669,
22074,
3152,
3144,
284,
330,
1254,
1110,
8687,
905,
37462,
1837,
38465,
284,
220,
16,
198,
2258,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIncident_ListIncidentNotes(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc("/incidents/1/notes", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
_, _ = w.Write([]byte(`{"notes": [{"id": "1","content":"foo"}]}`))
})
client := defaultTestClient(server.URL, "foo")
id := ... | explode_data.jsonl/76393 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 223
} | [
2830,
3393,
39245,
1713,
27104,
39245,
1713,
21667,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
2840,
6880,
14,
16,
14,
18286,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
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 |
func TestPublishedData(t *testing.T) {
tests := []struct {
Name string
PublishedName string
Error error
}{
{
Name: "empty",
Error: rerror.ErrNotFound,
},
{
Name: "not found",
PublishedName: "pr",
Error: rerror.ErrNotFound,
},
{
Name: "ok",
... | explode_data.jsonl/36778 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 486
} | [
2830,
3393,
28886,
1043,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
21297,
688,
914,
198,
197,
10025,
11669,
675,
914,
198,
197,
58421,
260,
1465,
198,
197,
59403,
197,
197,
515,
298,
21297,
25,
220,
330,
3194,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAgentConnectAuthorize_serviceWrite(t *testing.T) {
t.Parallel()
assert := assert.New(t)
a := NewTestAgent(t.Name(), TestACLConfig())
defer a.Shutdown()
// Create an ACL
var token string
{
args := map[string]interface{}{
"Name": "User Token",
"Type": "client",
"Rules": `service "foo" { pol... | explode_data.jsonl/33673 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 396
} | [
2830,
3393,
16810,
14611,
37483,
12267,
7985,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
6948,
1669,
2060,
7121,
1155,
340,
11323,
1669,
1532,
2271,
16810,
1155,
2967,
1507,
3393,
55393,
2648,
2398,
16867,
264,
10849,
18452,
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... | 2 |
func TestEncodeSecret(t *testing.T) {
cases := []struct {
desc string
secretYaml string
expect string
err string
}{
// empty map
{"empty data", `
apiVersion: v1
kind: Secret
type: my-type`, `{"data":"","kind":"Secret","name":"","type":"my-type"}`, ""},
// one key
{"one key", `
apiVers... | explode_data.jsonl/32280 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 576
} | [
2830,
3393,
32535,
19773,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
41653,
981,
914,
198,
197,
197,
20474,
56,
9467,
914,
198,
197,
24952,
257,
914,
198,
197,
9859,
286,
914,
198,
197,
59403,
197,
197,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnginePutGetDelete(t *testing.T) {
defer leaktest.AfterTest(t)()
runWithAllEngines(func(engine Engine, t *testing.T) {
// Test for correct handling of empty keys, which should produce errors.
for i, err := range []error{
engine.Put(mvccKey(""), []byte("")),
engine.Put(NilKey, []byte("")),
func()... | explode_data.jsonl/38109 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 850
} | [
2830,
3393,
4571,
19103,
1949,
6435,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
56742,
2354,
2403,
4106,
1543,
18552,
48974,
8200,
11,
259,
353,
8840,
836,
8,
341,
197,
197,
322,
3393,
369,
4396,
1158... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateChainingVirtualService(t *testing.T) {
features.EnableVirtualServiceDelegate = true
testCases := []struct {
name string
in proto.Message
valid bool
}{
{
name: "root simple",
in: &networking.VirtualService{
Hosts: []string{"foo.bar"},
Gateways: []string{"test-gateway"},
... | explode_data.jsonl/56365 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1361
} | [
2830,
3393,
17926,
1143,
2056,
33026,
1860,
1155,
353,
8840,
836,
8,
341,
1166,
22462,
32287,
33026,
1860,
9381,
284,
830,
198,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
17430,
262,
18433,
8472,
198,
197,
5632... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLimiter_Wait__NoSleep(t *testing.T) {
lim := NewLimiter(40, 1, 1)
isWaitDone := false
go func() {
lim.Wait()
lim.Wait()
isWaitDone = true
}()
time.Sleep(time.Millisecond * 50)
assert.Equal(t, isWaitDone, true)
} | explode_data.jsonl/38236 | {
"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,
43,
17700,
2763,
1315,
563,
2753,
41745,
1155,
353,
8840,
836,
8,
341,
197,
4659,
1669,
1532,
43,
17700,
7,
19,
15,
11,
220,
16,
11,
220,
16,
340,
19907,
14190,
17453,
1669,
895,
271,
30680,
2915,
368,
341,
197,
197,
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 TestVarInMain(t *testing.T) {
gopClTest(t, `
package main
func main() {
v := []uint64{2, 3, 5}
var n = len(v)
println(n)
}`, `package main
import fmt "fmt"
func main() {
v := []uint64{2, 3, 5}
var n = len(v)
fmt.Println(n)
}
`)
} | explode_data.jsonl/73599 | {
"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,
3962,
641,
6202,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
22074,
1722,
1887,
271,
2830,
1887,
368,
341,
5195,
1669,
3056,
2496,
21,
19,
90,
17,
11,
220,
18,
11,
220,
20,
532,
2405,
308,
284,
2422,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHlen(t *testing.T) {
c := &internal.MockedConnection{
MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse {
parsedQuery := &types.KuzzleRequest{}
json.Unmarshal(query, parsedQuery)
assert.Equal(t, "ms", parsedQuery.Controller)
assert.Equal(t, "hlen", parsedQuery.Actio... | explode_data.jsonl/68815 | {
"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,
39,
2892,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
609,
10481,
24664,
291,
4526,
515,
197,
9209,
1176,
11505,
25,
2915,
10741,
3056,
3782,
11,
2606,
4494,
15685,
3798,
8,
353,
9242,
11352,
14945,
2582,
341,
298,
3223,
181... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandles(t *testing.T) {
handler := NewPodResourceAllocation()
//TODO: Connect, Delete operation negative tests
tests := []admission.Operation{admission.Create, admission.Update}
for _, test := range tests {
if !handler.Handles(test) {
t.Errorf("Expected handling all operations, including: %v", test)
... | explode_data.jsonl/16638 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
65928,
1155,
353,
8840,
836,
8,
341,
53326,
1669,
1532,
23527,
4783,
78316,
741,
197,
322,
14732,
25,
13015,
11,
10428,
5666,
8225,
7032,
198,
78216,
1669,
3056,
329,
2728,
56297,
90,
329,
2728,
7251,
11,
25293,
16689,
630,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestDealsWithFinalizeEarly(t *testing.T) {
//stm: @CHAIN_SYNCER_LOAD_GENESIS_001, @CHAIN_SYNCER_FETCH_TIPSET_001,
//stm: @CHAIN_SYNCER_START_001, @CHAIN_SYNCER_SYNC_001, @BLOCKCHAIN_BEACON_VALIDATE_BLOCK_VALUES_01
//stm: @CHAIN_SYNCER_COLLECT_CHAIN_001, @CHAIN_SYNCER_COLLECT_HEADERS_001, @CHAIN_SYNCER_VALIDATE_... | explode_data.jsonl/53300 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 750
} | [
2830,
3393,
1912,
1127,
2354,
19357,
551,
41198,
1155,
353,
8840,
836,
8,
341,
197,
322,
24855,
25,
569,
90733,
39189,
640,
24042,
42362,
83366,
62,
15,
15,
16,
11,
569,
90733,
39189,
640,
57925,
1139,
3298,
5884,
62,
15,
15,
16,
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... | 1 |
func TestResilverTime(t *testing.T) {
t.Parallel()
require.Greater(
t,
resilverTime(sampleStatusResilverOutput),
float64(6000),
)
require.Equal(
t,
float64(0),
resilverTime(sampleStatusNormalOutput),
)
} | explode_data.jsonl/18990 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
1061,
47030,
1462,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
17957,
1224,
28362,
1006,
197,
3244,
345,
197,
10202,
47030,
1462,
32968,
2522,
1061,
47030,
5097,
1326,
197,
8139,
21,
19,
7,
21,
15,
15,
15,
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... | 1 |
func TestMergeSchema_assignQueryType(t *testing.T) {
// create the first schema
schema1, err := graphql.LoadSchema(`
type Query {
firstName: String!
}
`)
// make sure nothing went wrong
assert.Nil(t, err)
// and the second schema we are going to make
schema2, err := graphql.LoadSchema(`
type Query... | explode_data.jsonl/20233 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 287
} | [
2830,
3393,
52096,
8632,
20688,
2859,
929,
1155,
353,
8840,
836,
8,
341,
197,
322,
1855,
279,
1156,
10802,
198,
1903,
3416,
16,
11,
1848,
1669,
48865,
13969,
8632,
61528,
298,
13158,
11361,
341,
571,
42190,
675,
25,
923,
4894,
298,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSandboxMaxTimeout(t *testing.T) {
ctx := context.Background()
sandbox, err := newService(&observation.TestContext).CreateSandbox(ctx, CreateOptions{})
if err != nil {
t.Fatalf("unexpected error creating sandbox: %s", err)
}
defer sandbox.Close()
script := `
while true do end
`
if _, err := sandbo... | explode_data.jsonl/21498 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 196
} | [
2830,
3393,
50,
31536,
5974,
7636,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
1903,
31536,
11,
1848,
1669,
501,
1860,
2099,
77960,
8787,
1972,
568,
4021,
50,
31536,
7502,
11,
4230,
3798,
37790,
743,
1848,
961,
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... | 4 |
func TestSumPerKeyNoClampingForNegativeMinValueFloat64(t *testing.T) {
var triples []testutils.TripleWithFloatValue
for key := 0; key < 100; key++ {
triples = append(triples, testutils.TripleWithFloatValue{key, key, 0})
}
p, s, col := ptest.CreateList(triples)
col = beam.ParDo(s, testutils.ExtractIDFromTripleWit... | explode_data.jsonl/42979 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 372
} | [
2830,
3393,
9190,
3889,
1592,
2753,
5066,
30457,
2461,
38489,
6217,
1130,
5442,
21,
19,
1155,
353,
8840,
836,
8,
341,
2405,
88561,
3056,
1944,
6031,
836,
461,
694,
2354,
5442,
1130,
198,
2023,
1376,
1669,
220,
15,
26,
1376,
366,
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... | 3 |
func TestRegexp(t *testing.T) {
if testing.Short() {
t.Skip()
}
execStatements(t, []string{
"create table yes_stream(id int, val varbinary(128), primary key(id))",
"create table no_stream(id int, val varbinary(128), primary key(id))",
})
defer execStatements(t, []string{
"drop table yes_stream",
"drop t... | explode_data.jsonl/10410 | {
"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,
3477,
4580,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
630,
67328,
93122,
1155,
11,
3056,
917,
515,
197,
197,
1,
3182,
1965,
9834,
12673,
3724,
526,
11,
1044,
762,
25891,
7,
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 TestErrWrap(t *testing.T) {
errorf, ok := I.FindFuncv("Errorf")
if !ok {
t.Fatal("FindFuncv failed: Errorf")
}
defer func() {
if e := recover(); e != nil {
frame, ok := e.(*errors.Frame)
if !ok {
t.Fatal("TestErrWrap failed:", e)
}
fmt.Println(frame.Args...)
}
}()
frame := &errors.Fram... | explode_data.jsonl/74953 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 363
} | [
2830,
3393,
7747,
26787,
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,
16867,
2915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestGetQuerySnippetGETBothQueryAndBody(t *testing.T) {
queryPart := "SELECT column"
bodyPart := "FROM table"
expectedQuery := "SELECT column\nFROM table"
body := bytes.NewBufferString(bodyPart)
req, err := http.NewRequest("GET", "", body)
checkErr(t, err)
params := make(url.Values)
params.Set("query", qu... | explode_data.jsonl/31701 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
1949,
2859,
87852,
3806,
20629,
2859,
3036,
5444,
1155,
353,
8840,
836,
8,
341,
27274,
5800,
1669,
330,
4858,
3250,
698,
35402,
5800,
1669,
330,
30093,
1965,
698,
42400,
2859,
1669,
330,
4858,
3250,
1699,
30093,
1965,
1837,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPipelineGet(t *testing.T) {
clock := clockwork.NewFakeClock()
pdata := []*v1alpha1.Pipeline{
tb.Pipeline("pipeline", tb.PipelineNamespace("ns"),
// created 5 minutes back
cb.PipelineCreationTimestamp(clock.Now().Add(-5*time.Minute)),
),
tb.Pipeline("pipeline2", tb.PipelineNamespace("ns"),
//... | explode_data.jsonl/29889 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 487
} | [
2830,
3393,
34656,
1949,
1155,
353,
8840,
836,
8,
341,
84165,
1669,
8866,
1778,
7121,
52317,
26104,
2822,
3223,
691,
1669,
29838,
85,
16,
7141,
16,
1069,
8790,
515,
197,
62842,
1069,
8790,
445,
51258,
497,
16363,
1069,
8790,
22699,
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 TestCarver_EnergySeamShouldNotBeDetected(t *testing.T) {
var seams [][]Seam
var totalEnergySeams int
img := image.NewNRGBA(image.Rect(0, 0, ImgWidth, ImgHeight))
dx, dy := img.Bounds().Dx(), img.Bounds().Dy()
var c = NewCarver(dx, dy)
for x := 0; x < ImgWidth; x++ {
width, height := img.Bounds().Max.X, i... | explode_data.jsonl/8686 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 287
} | [
2830,
3393,
8852,
423,
2089,
9997,
1514,
309,
14996,
2623,
3430,
17076,
1569,
1155,
353,
8840,
836,
8,
341,
2405,
73688,
52931,
1514,
309,
198,
2405,
2790,
32675,
1514,
4122,
526,
271,
39162,
1669,
2168,
7121,
45,
58927,
10075,
32153,
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... | 5 |
func TestNiceMD_Del(t *testing.T) {
nmd := metautils.NiceMD(metadata.Pairs(testPairs...))
assert.Equal(t, "uno", nmd.Get("singlekey"), "for present single-key value it should return it")
nmd.Del("singlekey").Del("doesnt exist")
assert.Empty(t, nmd.Get("singlekey"), "after deletion singlekey shouldn't exist")
} | explode_data.jsonl/48146 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 111
} | [
2830,
3393,
44978,
6076,
1557,
301,
1155,
353,
8840,
836,
8,
341,
9038,
2277,
1669,
8823,
6031,
2067,
558,
6076,
54436,
1069,
4720,
8623,
54228,
1112,
1171,
6948,
12808,
1155,
11,
330,
16311,
497,
308,
2277,
2234,
445,
15338,
792,
3975,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMuxComplicatedNotFound(t *testing.T) {
decorateRouter := func(r *Mux) {
// Root router with groups
r.Get("/auth", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("auth get"))
})
r.Route("/public", func(r Router) {
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
w.Writ... | explode_data.jsonl/42870 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1174
} | [
2830,
3393,
44,
2200,
13552,
13724,
10372,
1155,
353,
8840,
836,
8,
341,
197,
47976,
9523,
1669,
2915,
2601,
353,
44,
2200,
8,
341,
197,
197,
322,
18854,
9273,
448,
5203,
198,
197,
7000,
2234,
4283,
3242,
497,
2915,
3622,
1758,
37508,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAppImportExport(t *testing.T) {
config, db, dir, logger, skip, err := simapp.SetupSimulation("leveldb-app-sim", "Simulation")
if skip {
t.Skip("skipping application import/export simulation")
}
require.NoError(t, err, "simulation setup failed")
defer func() {
db.Close()
require.NoError(t, os.Remove... | explode_data.jsonl/23010 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1289
} | [
2830,
3393,
2164,
11511,
16894,
1155,
353,
8840,
836,
8,
341,
25873,
11,
2927,
11,
5419,
11,
5925,
11,
10706,
11,
1848,
1669,
1643,
676,
39820,
64554,
445,
3449,
783,
65,
20023,
1331,
318,
497,
330,
64554,
1138,
743,
10706,
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... | 1 |
func TestCacheKVMergeIteratorDeleteLast(t *testing.T) {
st := newCacheKVStore()
// set some items and write them
nItems := 5
for i := 0; i < nItems; i++ {
st.Set(keyFmt(i), valFmt(i))
}
st.Write()
// set some more items and leave dirty
for i := nItems; i < nItems*2; i++ {
st.Set(keyFmt(i), valFmt(i))
}
... | explode_data.jsonl/6652 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
8233,
42,
11187,
10080,
11951,
6435,
5842,
1155,
353,
8840,
836,
8,
341,
18388,
1669,
501,
8233,
82707,
6093,
2822,
197,
322,
738,
1045,
3589,
323,
3270,
1105,
198,
9038,
4353,
1669,
220,
20,
198,
2023,
600,
1669,
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... | 4 |
func TestRoute_SetMiddlewares(t *testing.T) {
r := Route{}
r.SetMiddleware(middleware.AuthBase{Secret: "secret"}, 600*time.Second)
preLen := len(r.Middlewares)
if preLen != 5 {
t.Errorf("Unauthenticated routes should have 5 middlewares by default, actual default: %d", preLen)
}
r.Authenticated = true
r.SetMidd... | explode_data.jsonl/26148 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 214
} | [
2830,
3393,
4899,
14812,
43935,
37903,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
9572,
16094,
7000,
4202,
24684,
1255,
11603,
25233,
3978,
90,
19773,
25,
330,
20474,
14345,
220,
21,
15,
15,
77053,
32435,
340,
40346,
11271,
1669,
2422,
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 TestSelectableFieldLabelConversions(t *testing.T) {
apitesting.TestSelectableFieldLabelConversionsOfKind(t,
"v1",
"Pod",
ToSelectableFields(&api.Pod{}),
nil,
)
} | explode_data.jsonl/34743 | {
"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,
68707,
1877,
2476,
1109,
28290,
1155,
353,
8840,
836,
8,
341,
69898,
275,
59855,
8787,
68707,
1877,
2476,
1109,
28290,
2124,
10629,
1155,
345,
197,
197,
1,
85,
16,
756,
197,
197,
1,
23527,
756,
197,
197,
1249,
68707,
8941,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGitLabProviderBadToken(t *testing.T) {
b := testGitLabBackend()
defer b.Close()
bURL, _ := url.Parse(b.URL)
p := testGitLabProvider(bURL.Host)
session := &sessions.SessionState{AccessToken: "unexpected_gitlab_access_token"}
_, err := p.GetEmailAddress(session)
assert.NotEqual(t, nil, err)
} | explode_data.jsonl/12892 | {
"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,
46562,
29046,
5179,
17082,
3323,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
1273,
46562,
29046,
29699,
741,
16867,
293,
10421,
2822,
2233,
3144,
11,
716,
1669,
2515,
8937,
1883,
20893,
340,
3223,
1669,
1273,
46562,
29046,
5179,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJetStreamCrossAccountMirrorsAndSources(t *testing.T) {
conf := createConfFile(t, []byte(`
listen: 127.0.0.1:-1
no_auth_user: rip
jetstream: {max_mem_store: 64GB, max_file_store: 10TB}
accounts {
JS {
jetstream: enabled
users = [ { user: "rip", pass: "pass" } ]
exports [
{ service: ... | explode_data.jsonl/29167 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1656
} | [
2830,
3393,
35641,
3027,
28501,
7365,
58461,
31686,
3036,
32200,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
1855,
15578,
1703,
1155,
11,
3056,
3782,
61528,
197,
14440,
268,
25,
220,
16,
17,
22,
13,
15,
13,
15,
13,
16,
10944,
16,
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 TestAddTemperateToThermostatData(t *testing.T) {
Convey("Given an exisiting json", t, func() {
thermoJSON := []byte(`{
"b6UaPCSjpgE56SMNlaigf4Sir6gJ8Twj": {
"id": "b6UaPCSjpgE56SMNlaigf4Sir6gJ8Twj",
"name": "Chill place",
"ambient_temperature_c": 20.5,... | explode_data.jsonl/4845 | {
"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,
2212,
21988,
79113,
1249,
1001,
261,
54725,
1043,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
22043,
458,
505,
285,
5853,
2951,
497,
259,
11,
2915,
368,
341,
197,
197,
696,
6355,
5370,
1669,
3056,
3782,
5809,
515,
310,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPercentageGrowth__String(t *testing.T) {
g := &tester.PercentageGrowth{Increase: 102.5}
assert.Equal(t, g.String(), "%102.50")
g = &tester.PercentageGrowth{Increase: 66.66}
assert.Equal(t, g.String(), "%66.66")
g = &tester.PercentageGrowth{Increase: 100}
assert.Equal(t, g.String(), "%100.00")
} | explode_data.jsonl/66516 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 127
} | [
2830,
3393,
36167,
38,
19089,
563,
703,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
609,
73358,
14834,
16133,
38,
19089,
90,
69556,
25,
220,
16,
15,
17,
13,
20,
532,
6948,
12808,
1155,
11,
342,
6431,
1507,
5962,
16,
15,
17,
13,
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... | 1 |
func TestClientRTMPAuth(t *testing.T) {
t.Run("publish", func(t *testing.T) {
p, ok := testProgram("rtspDisable: yes\n" +
"hlsDisable: yes\n" +
"paths:\n" +
" all:\n" +
" publishUser: testuser\n" +
" publishPass: testpass\n" +
" readIps: [127.0.0.0/16]\n")
require.Equal(t, true, ok)
d... | explode_data.jsonl/63222 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 856
} | [
2830,
3393,
2959,
5350,
5781,
5087,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
27502,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3223,
11,
5394,
1669,
1273,
10690,
445,
3342,
2154,
25479,
25,
9834,
1699,
1,
3610,
298,
197,
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 TestTemplate_IsMainContainerNamed(t *testing.T) {
t.Run("Default", func(t *testing.T) {
x := &Template{}
assert.True(t, x.IsMainContainerName("main"))
})
t.Run("ContainerSet", func(t *testing.T) {
x := &Template{ContainerSet: &ContainerSetTemplate{Containers: []ContainerNode{{Container: corev1.Container{N... | explode_data.jsonl/26052 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 161
} | [
2830,
3393,
7275,
31879,
6202,
4502,
15810,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
3675,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
10225,
1669,
609,
7275,
16094,
197,
6948,
32443,
1155,
11,
856,
4506,
6202,
4502,
675,
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 TestDockerGetIPAddress(t *testing.T) {
testCases := []struct {
desc string
container docker.ContainerJSON
network string
expected string
}{
{
desc: "one network, no network label",
container: containerJSON(withNetwork("testnet", ipv4("10.11.12.13"))),
expected: "10.11.12.13",
}... | explode_data.jsonl/26366 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1001
} | [
2830,
3393,
35,
13659,
1949,
87976,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
414,
914,
198,
197,
53290,
26588,
33672,
5370,
198,
197,
9038,
2349,
256,
914,
198,
197,
42400,
220,
914,
198,
197,
594... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTeamCrud(t *testing.T) {
teardown := tests.Setup(t)
defer teardown(t)
crud := db.TeamCrud{Db: db.NewDb()}
t.Run("create teams", func(t *testing.T) {
quizId := tests.TestRandomString()
teams := tests.TestTeams(quizId, 2)
err := crud.CreateTeams(teams)
assert.Nil(t, err, "error must be nil")
})
... | explode_data.jsonl/71878 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 565
} | [
2830,
3393,
14597,
92061,
1155,
353,
8840,
836,
8,
341,
197,
665,
37496,
1669,
7032,
39820,
1155,
340,
16867,
49304,
1155,
692,
1444,
66355,
1669,
2927,
65842,
92061,
90,
7994,
25,
2927,
7121,
7994,
368,
630,
3244,
16708,
445,
3182,
726... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDNSNameWasValidTLD(t *testing.T) {
inputPath := "dnsNameWasValidTLD.pem"
expected := lint.Pass
out := test.TestLint("e_dnsname_not_valid_tld", inputPath)
if out.Status != expected {
t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status)
}
} | explode_data.jsonl/24845 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
61088,
675,
26034,
4088,
51,
12335,
1155,
353,
8840,
836,
8,
341,
22427,
1820,
1669,
330,
45226,
675,
26034,
4088,
51,
12335,
49373,
698,
42400,
1669,
57920,
87768,
198,
13967,
1669,
1273,
8787,
47556,
445,
68,
71125,
606,
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... | 2 |
func TestSeriesFileCompactor(t *testing.T) {
sfile := MustOpenSeriesFile(t)
defer sfile.Close()
// Disable automatic compactions.
for _, p := range sfile.Partitions() {
p.CompactThreshold = 0
}
var names [][]byte
var tagsSlice []models.Tags
for i := 0; i < 10000; i++ {
names = append(names, []byte(fmt.Spr... | explode_data.jsonl/78508 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 420
} | [
2830,
3393,
25544,
1703,
13552,
5621,
1155,
353,
8840,
836,
8,
341,
1903,
1192,
1669,
15465,
5002,
25544,
1703,
1155,
340,
16867,
274,
1192,
10421,
2822,
197,
322,
28027,
16962,
1367,
4020,
624,
2023,
8358,
281,
1669,
2088,
274,
1192,
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... | 9 |
func TestDiscoverCluster(t *testing.T) {
nodeList := createMockNodes(allocatableMap, schedulableNodeMap)
ms := &MockClusterScrapper{
mockGetKubernetesServiceID: func() (string, error) {
return testClusterName, nil
},
mockGetAllNodes: func() ([]*v1.Node, error) {
return nodeList, nil
},
}
clusterProces... | explode_data.jsonl/62015 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 244
} | [
2830,
3393,
50002,
28678,
1155,
353,
8840,
836,
8,
341,
20831,
852,
1669,
1855,
11571,
12288,
7,
4742,
15086,
2227,
11,
5575,
360,
480,
1955,
2227,
340,
47691,
1669,
609,
11571,
28678,
3326,
5518,
515,
197,
77333,
1949,
42,
29827,
1860,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExpandPrivateDescribeAddressesInput(t *testing.T) {
rd := schema.TestResourceDataRaw(t, newSchema(), map[string]interface{}{
"ip_type": true,
"private_ip": "192.168.0.1",
})
rd.SetId("192.168.0.1")
tests := []struct {
name string
args *schema.ResourceData
want *computing.DescribeAddressesInpu... | explode_data.jsonl/35516 | {
"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,
38946,
16787,
74785,
52290,
2505,
1155,
353,
8840,
836,
8,
341,
92356,
1669,
10802,
8787,
4783,
1043,
20015,
1155,
11,
501,
8632,
1507,
2415,
14032,
31344,
67066,
197,
197,
1,
573,
1819,
788,
262,
830,
345,
197,
197,
1,
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 TestCacheableObject(t *testing.T) {
gvk := schema.GroupVersionKind{Group: "group", Version: "version", Kind: "MockCacheableObject"}
creater := &mockCreater{obj: &runtimetesting.MockCacheableObject{}}
typer := &mockTyper{gvk: &gvk}
serializer := json.NewSerializer(json.DefaultMetaFactory, creater, typer, false)... | explode_data.jsonl/13330 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
8233,
79176,
1155,
353,
8840,
836,
8,
341,
3174,
48363,
1669,
10802,
5407,
5637,
10629,
90,
2808,
25,
330,
4074,
497,
6079,
25,
330,
4366,
497,
16840,
25,
330,
11571,
8233,
79176,
16707,
197,
837,
962,
1669,
609,
16712,
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... | 1 |
func TestCircularReference(t *testing.T) {
dep := testDeploy.DeepCopy()
dep.SetOwnerReferences([]metav1.OwnerReference{{
Name: testPod.GetName(),
Kind: testPod.GetKind(),
APIVersion: testPod.GetAPIVersion(),
}})
cluster := newCluster(testPod, testRS, dep)
err := cluster.ensureSynced()
assert.Ni... | explode_data.jsonl/75186 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
82440,
8856,
1155,
353,
8840,
836,
8,
341,
197,
14891,
1669,
1273,
69464,
55602,
12106,
741,
197,
14891,
4202,
13801,
31712,
10556,
4059,
402,
16,
49920,
8856,
90,
515,
197,
21297,
25,
981,
1273,
23527,
60304,
3148,
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 TestGBK(t *testing.T) {
s, err := file.ToString("testdata/gbk.txt")
assert.Nil(t, err)
encoding, name, certain := charset.DetermineEncoding([]byte(s), "")
fmt.Println(encoding, name, certain)
decoded, err := cs.NewDecoder("GBK").Decode(s)
assert.Nil(t, err)
assert.Equal(t, "中华人民共和国合同法", decoded)
s, err ... | explode_data.jsonl/4638 | {
"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,
82194,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
1034,
5418,
445,
92425,
4846,
40029,
3909,
1138,
6948,
59678,
1155,
11,
1848,
692,
197,
17159,
11,
829,
11,
3654,
1669,
11617,
909,
24308,
14690,
10556,
3782,
1141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSearchEmoji(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
Client := th.Client
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableCustomEmoji = true })
searchTerm1 := model.NewId()
searchTerm2 := model.NewId()
emojis := []*model.Emoji{
{
CreatorId: th.BasicU... | explode_data.jsonl/26615 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 674
} | [
2830,
3393,
5890,
92731,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
271,
70479,
5105,
16689,
2648,
18552,
28272,
353,
2528,
10753,
8,
314,
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... | 1 |
func TestClusterID(t *testing.T) {
testData := []struct {
Input string
Error bool
Expected *ClusterId
}{
{
// empty
Input: "",
Error: true,
},
{
// missing SubscriptionId
Input: "/",
Error: true,
},
{
// missing value for SubscriptionId
Input: "/subscriptions/",
Err... | explode_data.jsonl/64119 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 991
} | [
2830,
3393,
28678,
915,
1155,
353,
8840,
836,
8,
341,
18185,
1043,
1669,
3056,
1235,
341,
197,
66588,
262,
914,
198,
197,
58421,
262,
1807,
198,
197,
197,
18896,
353,
28678,
764,
198,
197,
92,
4257,
197,
197,
515,
298,
197,
322,
428... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetOrganization(t *testing.T) {
for idx, tt := range getOrganizationTests {
tt := tt
t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
t.Parallel()
s := &svc{rest: v3client{
Organizations: tt.mockOrgs,
}}
resp, err := s.GetOrganization(context.Background(), tt.org)
if tt.errorText !... | explode_data.jsonl/10369 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 266
} | [
2830,
3393,
1949,
41574,
1155,
353,
8840,
836,
8,
341,
2023,
7187,
11,
17853,
1669,
2088,
633,
41574,
18200,
341,
197,
3244,
83,
1669,
17853,
198,
197,
3244,
16708,
28197,
17305,
4430,
67,
497,
7187,
701,
2915,
1155,
353,
8840,
836,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAsFormURLEncoded(t *testing.T) {
r, err := Prepare(mocks.NewRequest(), AsFormURLEncoded())
if err != nil {
fmt.Printf("ERROR: %v", err)
}
if r.Header.Get(headerContentType) != mimeTypeFormPost {
t.Fatalf("autorest: AsFormURLEncoded failed to add header (%s=%s)", headerContentType, r.Header.Get(he... | explode_data.jsonl/20947 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
2121,
1838,
1511,
867,
1016,
6737,
1155,
353,
8840,
836,
8,
972,
7000,
11,
1848,
1669,
31166,
1255,
25183,
75274,
1507,
1634,
1838,
1511,
867,
1016,
6737,
13116,
743,
1848,
961,
2092,
972,
197,
11009,
19367,
445,
3682,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestWalk(t *testing.T) {
// There are two important things to make sure of here. That we actually
// hit all of the paths (once), and that the fileinfo we get is the one we
// expected.
if os.Geteuid() == 0 {
t.Skip("unpriv.* tests only work with non-root privileges")
}
dir, err := ioutil.TempDir("", "um... | explode_data.jsonl/23890 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1079
} | [
2830,
3393,
48849,
1155,
353,
8840,
836,
8,
341,
197,
322,
2619,
525,
1378,
2989,
2513,
311,
1281,
2704,
315,
1588,
13,
2938,
582,
3520,
198,
197,
322,
4201,
678,
315,
279,
12716,
320,
13184,
701,
323,
429,
279,
1034,
2733,
582,
633... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestReconcileAndPropagateCustomPipelineTaskRunSpec(t *testing.T) {
names.TestingSeed()
prName := "test-pipeline-run"
ps := []*v1beta1.Pipeline{simpleHelloWorldPipeline}
prs := []*v1beta1.PipelineRun{{
ObjectMeta: metav1.ObjectMeta{
Name: prName,
Namespace: "foo",
Annotations: map[string]str... | explode_data.jsonl/68283 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 904
} | [
2830,
3393,
693,
40446,
457,
3036,
2008,
46836,
10268,
34656,
6262,
6727,
8327,
1155,
353,
8840,
836,
8,
341,
93940,
8787,
287,
41471,
741,
25653,
675,
1669,
330,
1944,
2268,
8790,
22973,
698,
35009,
1669,
29838,
85,
16,
19127,
16,
1069... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTranslateProbePorts(t *testing.T) {
probe := &api.Probe{
Handler: api.Handler{
HTTPGet: &api.HTTPGetAction{
Port: intstr.FromString("foo"),
},
},
}
unit := &api.Unit{
Ports: []api.ContainerPort{
{
Name: "foo",
ContainerPort: 8080,
},
},
}
newProbe := TranslateProbe... | explode_data.jsonl/12537 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 276
} | [
2830,
3393,
27473,
81426,
68273,
1155,
353,
8840,
836,
8,
341,
197,
52329,
1669,
609,
2068,
7763,
1371,
515,
197,
197,
3050,
25,
6330,
31010,
515,
298,
197,
9230,
1949,
25,
609,
2068,
27358,
1949,
2512,
515,
571,
98459,
25,
526,
495,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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(t *testing.T) {
us := NewUnixSocket("/tmp/us.socket")
us.SetContextHandler(func(context string) string {
fmt.Println(context)
now := "response from server: " + time.Now().String()
return now
})
go us.StartServer()
time.Sleep(time.Second * 10)
} | explode_data.jsonl/161 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
5475,
1155,
353,
8840,
836,
8,
341,
70175,
1669,
1532,
55832,
10286,
4283,
5173,
62431,
25926,
1138,
70175,
4202,
1972,
3050,
18552,
5378,
914,
8,
914,
341,
197,
11009,
12419,
5378,
340,
197,
80922,
1669,
330,
2322,
504,
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... | 1 |
func TestText_MakeValid(t *testing.T) {
cases := []struct {
name string
fontProp *props.Text
assert func(t *testing.T, prop *props.Text)
}{
{
"When family is not defined, should define arial",
&props.Text{
Family: "",
},
func(t *testing.T, prop *props.Text) {
assert.Equal(t, prop.Fam... | explode_data.jsonl/68877 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 680
} | [
2830,
3393,
1178,
1245,
726,
4088,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
27769,
2008,
353,
4761,
1979,
198,
197,
6948,
256,
2915,
1155,
353,
8840,
836,
11,
2004,
353,
4761,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetMetricValues(t *testing.T) {
client := NewMockClient()
client.Config = resourceIDConfig
t.Run("return no error when no metric values are returned but log and send event", func(t *testing.T) {
client.Resources = ResourceConfiguration{
Metrics: []Metric{
{
Namespace: "namespace",
Nam... | explode_data.jsonl/22778 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 733
} | [
2830,
3393,
1949,
54310,
6227,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
1532,
11571,
2959,
741,
25291,
10753,
284,
5101,
915,
2648,
271,
3244,
16708,
445,
689,
902,
1465,
979,
902,
18266,
2750,
525,
5927,
714,
1487,
323,
3624,
1538,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrorComma(t *testing.T) {
doc := NewDocument("test1", []byte(`<?php
$abc = $DB->get_record('abc',)`))
doc.Load()
args, _ := doc.ArgumentListAndFunctionCallAt(protocol.Position{
Line: 1,
Character: 29,
})
assert.Equal(t, []protocol.Range{
{Start: protocol.Position{Line: 1, Character: 22}, End:... | explode_data.jsonl/588 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 185
} | [
2830,
3393,
1454,
1092,
1728,
1155,
353,
8840,
836,
8,
341,
59536,
1669,
1532,
7524,
445,
1944,
16,
497,
3056,
3782,
5809,
1316,
1208,
198,
3,
13683,
284,
400,
3506,
405,
455,
14192,
492,
13683,
516,
46186,
1171,
59536,
13969,
2822,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_GenericDriver_Exec(t *testing.T) {
db, mock, err := sqlmock.New()
if err != nil {
t.Errorf("sqlmock.New().error != nil, wants nil")
}
defer db.Close()
stmt := "CREATE TABLE HELLO (id INT);"
dialect := MySQLDialect{}
d, _ := NewGenericDriver(db, dialect)
mock.ExpectBegin()
mock.ExpectExec(escap... | explode_data.jsonl/78094 | {
"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,
29085,
11349,
62,
10216,
1155,
353,
8840,
836,
8,
341,
20939,
11,
7860,
11,
1848,
1669,
5704,
16712,
7121,
2822,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
3544,
16712,
7121,
1005,
841,
961,
2092,
11,
6801,
2092,
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... | 3 |
func TestTransferAXFRExampleOrg(t *testing.T) {
transfer := newTestTransfer()
ctx := context.TODO()
w := dnstest.NewMultiRecorder(&test.ResponseWriter{})
m := &dns.Msg{}
m.SetAxfr(transfer.xfrs[0].Zones[0])
_, err := transfer.ServeDNS(ctx, w, m)
if err != nil {
t.Error(err)
}
validateAXFRResponse(t, w)
} | explode_data.jsonl/39436 | {
"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,
21970,
2954,
37,
787,
87,
1516,
42437,
1155,
353,
8840,
836,
8,
341,
197,
24188,
1669,
501,
2271,
21970,
2822,
20985,
1669,
2266,
90988,
741,
6692,
1669,
47488,
267,
477,
7121,
20358,
47023,
2099,
1944,
37508,
37790,
2109,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPopulateCluster_BastionIdleTimeoutInvalidNegative_Required(t *testing.T) {
c := buildMinimalCluster()
c.Spec.Topology.Masters = kopsapi.TopologyPrivate
c.Spec.Topology.Nodes = kopsapi.TopologyPrivate
c.Spec.Topology.Bastion = &kopsapi.BastionSpec{}
c.Spec.Topology.Bastion.IdleTimeoutSeconds = fi.Int64(-1... | explode_data.jsonl/75046 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
11598,
6334,
28678,
1668,
559,
290,
41370,
7636,
7928,
38489,
62,
8164,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1936,
88328,
28678,
2822,
1444,
36473,
17557,
2449,
1321,
14199,
284,
595,
3721,
2068,
17557,
2449,
16787,
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 TestManageSellManageBuyOfferOfferID(t *testing.T) {
hmock := httptest.NewClient()
client := &Client{
AuroraURL: "https://localhost/",
HTTP: hmock,
}
testCases := []struct {
desc string
payload string
}{
{
desc: "offer_id as a string",
payload: manageSellBuyOfferOperationsPage,
}... | explode_data.jsonl/67649 | {
"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,
33076,
68533,
33076,
17482,
39462,
39462,
915,
1155,
353,
8840,
836,
8,
341,
9598,
16712,
1669,
54320,
70334,
7121,
2959,
741,
25291,
1669,
609,
2959,
515,
197,
22985,
324,
6215,
3144,
25,
330,
2428,
1110,
8301,
35075,
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 TestAgent_RegisterCheck_ACLDeny(t *testing.T) {
t.Parallel()
a := NewTestAgent(t.Name(), TestACLConfig())
defer a.Shutdown()
args := &structs.CheckDefinition{
Name: "test",
TTL: 15 * time.Second,
}
t.Run("no token", func(t *testing.T) {
req, _ := http.NewRequest("PUT", "/v1/agent/check/register", js... | explode_data.jsonl/33614 | {
"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,
16810,
73124,
3973,
97627,
23619,
88,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
1669,
1532,
2271,
16810,
1155,
2967,
1507,
3393,
55393,
2648,
2398,
16867,
264,
10849,
18452,
2822,
31215,
1669,
609,
1235,
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 TestDeleteEventsByDeviceName(t *testing.T) {
dbClientMock := newMockDB(true)
dic := mocks.NewMockDIC()
dic.Update(di.ServiceConstructorMap{
container.DBClientInterfaceName: func(get di.Get) interface{} {
return dbClientMock
},
})
tests := []struct {
Name string
deviceName st... | explode_data.jsonl/54248 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 464
} | [
2830,
3393,
6435,
7900,
1359,
6985,
675,
1155,
353,
8840,
836,
8,
341,
20939,
2959,
11571,
1669,
501,
11571,
3506,
3715,
692,
2698,
292,
1669,
68909,
7121,
11571,
93161,
741,
2698,
292,
16689,
55493,
13860,
13288,
2227,
515,
197,
53290,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCoinout(t *testing.T) {
client := v1.New(&v1.Config{
Key: os.Getenv("BFKEY"),
Secret: os.Getenv("BFSECRET"),
})
coin, err := client.Coinout(coins.NewForOut().SetPagination(10, 0, 0))
assert.NoError(t, err)
for i, v := range *coin {
fmt.Printf("%d: %+v\n", i, v)
}
} | explode_data.jsonl/41205 | {
"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,
41180,
411,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
348,
16,
7121,
2099,
85,
16,
10753,
515,
197,
55242,
25,
262,
2643,
64883,
445,
19883,
4784,
4461,
197,
7568,
50856,
25,
2643,
64883,
445,
19883,
65310,
4461,
197,
351... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.