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 TestParseActionArgs(t *testing.T) {
t.Parallel()
for _, c := range parseActionArgsCases {
cs := c
t.Run(cs.name, func(t *testing.T) {
ctx := context.Background()
got := ParseActionArgs(ctx, cs.args, cs.splitter)
if len(cs.expected) == 0 && len(got) == len(cs.expected) {
// Everything is good.
... | explode_data.jsonl/3431 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 210
} | [
2830,
3393,
14463,
2512,
4117,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2023,
8358,
272,
1669,
2088,
4715,
2512,
4117,
37302,
341,
197,
71899,
1669,
272,
198,
197,
3244,
16708,
41153,
2644,
11,
2915,
1155,
353,
8840,
836,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetEmojiImage(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
Client := th.Client
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableCustomEmoji = true })
emoji1 := &model.Emoji{
CreatorId: th.BasicUser.Id,
Name: model.NewId(),
}
emoji1, resp := Client.Cr... | explode_data.jsonl/26614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1184
} | [
2830,
3393,
1949,
92731,
1906,
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,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGroupByHasNoDuplicatedLabels(t *testing.T) {
in := `
route:
group_by: ['alertname', 'cluster', 'service', 'cluster']
receivers:
- name: 'team-X-mails'
`
_, err := Load(in)
expected := "duplicated label \"cluster\" in group_by"
if err == nil {
t.Fatalf("no error returned, expected:\n%q", expected)
}... | explode_data.jsonl/72898 | {
"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,
2808,
1359,
10281,
2753,
35,
98984,
23674,
1155,
353,
8840,
836,
8,
341,
17430,
1669,
22074,
8966,
510,
220,
1874,
3710,
25,
2509,
5083,
606,
516,
364,
18855,
516,
364,
7936,
516,
364,
18855,
15674,
53387,
1945,
510,
12,
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... | 3 |
func TestWithReadingWait(t *testing.T) {
t.Parallel()
Convey("Given a reading wait and dialer", t, func() {
dialer := &mockDialerStruct{}
dialer.readingWait = 5 * time.Second
Convey("And Dial is called with reading wait", func() {
_, err := mockDial(dialer, WithReadingWait(dialer.readingWait))
Convey("Th... | explode_data.jsonl/53411 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 152
} | [
2830,
3393,
2354,
31899,
14190,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
93070,
5617,
445,
22043,
264,
5290,
3783,
323,
27860,
261,
497,
259,
11,
2915,
368,
341,
197,
2698,
530,
261,
1669,
609,
16712,
35,
530,
261,
9422,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDesmosCLIProfileCreate_withFlags(t *testing.T) {
t.Parallel()
f := InitFixtures(t)
// Start Desmosd server
proc := f.GDStart()
defer proc.Stop(false)
// Save key addresses for later use
fooAddr := f.KeyAddress(keyFoo)
// Later usage variables
fooAcc := f.QueryAccount(fooAddr)
startTokens := sdk.To... | explode_data.jsonl/29799 | {
"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,
4896,
8631,
63959,
8526,
4021,
6615,
9195,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
1166,
1669,
15690,
25958,
18513,
1155,
692,
197,
322,
5145,
3874,
8631,
67,
3538,
198,
197,
15782,
1669,
282,
1224,
35,
3479,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAll(t *testing.T) {
t.Parallel()
ring := ring.New(10)
ring.Add(1)
objects := ring.All()
count := len(objects)
if count != 1 {
t.Errorf("Unexpected number of objects returned. Expected %d got %d", 1, count)
}
} | explode_data.jsonl/14675 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
2403,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
7000,
287,
1669,
10058,
7121,
7,
16,
15,
340,
7000,
287,
1904,
7,
16,
340,
197,
19210,
1669,
10058,
16764,
741,
18032,
1669,
2422,
73699,
340,
743,
1760,
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... | 2 |
func TestLock(t *testing.T) {
t.Parallel()
ctx := createContext(t)
lock := funcs[ast.GetLock]
f, err := lock.getFunction(ctx, datumsToConstants(types.MakeDatums(nil, 1)))
require.NoError(t, err)
v, err := evalBuiltinFunc(f, chunk.Row{})
require.NoError(t, err)
require.Equal(t, int64(1), v.GetInt64())
releaseL... | explode_data.jsonl/71327 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
11989,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
83674,
1155,
340,
58871,
1669,
76871,
58,
559,
2234,
11989,
921,
1166,
11,
1848,
1669,
5296,
670,
5152,
7502,
11,
3258,
6237,
1249,
9386,
52613,
50133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateModel_PropertyValidation(t *testing.T) {
funcMap := FuncMapFunc(DefaultLanguageFunc())
templ := template.Must(template.New("propertyValidationDocString").Funcs(funcMap).Parse(string(assets["validation/structfield.gotmpl"])))
tt := templateTest{t, templ}
var gmp GenSchema
gmp.Required = true
tt.a... | explode_data.jsonl/2493 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 422
} | [
2830,
3393,
31115,
1712,
68353,
13799,
1155,
353,
8840,
836,
8,
341,
29244,
2227,
1669,
18016,
2227,
9626,
87874,
13806,
9626,
2398,
197,
74860,
1669,
3811,
50463,
29963,
7121,
445,
3699,
13799,
9550,
703,
1827,
9626,
82,
18552,
2227,
568... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTimestamp_UnmarshalJSON(t *testing.T) {
testCases := []struct {
name string
time string
want model.Timestamp
}{
{
name: "time format 2019-12-31",
time: "2019-12-31",
want: model.Timestamp(time.Date(2019, 12, 31, 0, 0, 0, 0, time.UTC)),
},
{
name: "time format 2019-12-04T16:00:00.000Z"... | explode_data.jsonl/22666 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 444
} | [
2830,
3393,
20812,
40687,
27121,
5370,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
21957,
914,
198,
197,
50780,
1614,
49024,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
1678,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIncreasingBST(t *testing.T) {
t.Parallel()
tests := []struct {
in, want *TreeNode
}{
{
in: &TreeNode{
Val: 5,
Left: &TreeNode{
Val: 3,
Left: &TreeNode{
Val: 2,
Left: &TreeNode{Val: 1},
},
Right: &TreeNode{Val: 4},
},
Right: &TreeNode{
Val: 6,
... | explode_data.jsonl/80397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 844
} | [
2830,
3393,
80682,
61006,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
78216,
1669,
3056,
1235,
341,
197,
17430,
11,
1366,
353,
26597,
198,
197,
59403,
197,
197,
515,
298,
17430,
25,
609,
26597,
515,
571,
197,
2208,
25,
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... | 2 |
func TestUOpenInterest(t *testing.T) {
t.Parallel()
_, err := b.UOpenInterest(context.Background(), currency.NewPair(currency.BTC, currency.USDT))
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/76563 | {
"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,
52,
5002,
34556,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
293,
5255,
5002,
34556,
5378,
19047,
1507,
11413,
7121,
12443,
90475,
1785,
7749,
11,
11413,
67672,
10599,
1171,
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
] | 2 |
func Test_WatchTable_AddSameWatchResultTwiceSameTS_OneOutputRow(t *testing.T) {
ts, err := ptypes.TimestampProto(someWatchTime)
assert.Nil(t, err)
watchRec := &typed.KubeWatchResult{Kind: someKind, WatchType: typed.KubeWatchResult_ADD, Timestamp: ts, Payload: somePodPayload}
results := helper_runWatchTableProcessi... | explode_data.jsonl/38952 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 151
} | [
2830,
3393,
2763,
754,
2556,
21346,
19198,
14247,
2077,
22816,
558,
19198,
9951,
68201,
5097,
3102,
1155,
353,
8840,
836,
8,
341,
57441,
11,
1848,
1669,
281,
9242,
49024,
31549,
1141,
635,
14247,
1462,
340,
6948,
59678,
1155,
11,
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... | 1 |
func TestMaterializerManyToManySomeUnreachable(t *testing.T) {
ms := &vtctldatapb.MaterializeSettings{
Workflow: "workflow",
SourceKeyspace: "sourceks",
TargetKeyspace: "targetks",
TableSettings: []*vtctldatapb.TableMaterializeSettings{{
TargetTable: "t1",
SourceExpression: "select * from t1",... | explode_data.jsonl/61886 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1471
} | [
2830,
3393,
13415,
3135,
8441,
27361,
8373,
1806,
46550,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
609,
9708,
302,
507,
266,
391,
65,
44253,
551,
6086,
515,
197,
197,
62768,
25,
981,
330,
56249,
756,
197,
197,
3608,
8850,
1306,
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... | 1 |
func TestSet_SRem(t *testing.T) {
var testSRemKey = []byte("testSRemKey")
testAddData(t, testSRemKey, []byte("1"), []byte("2"), []byte("3"), []byte("4"), []byte("5"))
type args struct {
members [][]byte
}
m1 := [][]byte{[]byte("1")}
m2 := [][]byte{[]byte("4"), []byte("2"), []byte("3")}
tests := []struct {
na... | explode_data.jsonl/56407 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 542
} | [
2830,
3393,
1649,
1098,
6590,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
50,
6590,
1592,
284,
3056,
3782,
445,
1944,
50,
6590,
1592,
1138,
18185,
2212,
1043,
1155,
11,
1273,
50,
6590,
1592,
11,
3056,
3782,
445,
16,
3975,
3056,
3782,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProposal(t *testing.T) {
tests := []struct {
*network
success bool
}{
{newNetwork(nil, nil, nil), true},
{newNetwork(nil, nil, nopStepper), true},
{newNetwork(nil, nopStepper, nopStepper), false},
{newNetwork(nil, nopStepper, nopStepper, nil), false},
{newNetwork(nil, nopStepper, nopStepper, ni... | explode_data.jsonl/67343 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 708
} | [
2830,
3393,
98637,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
197,
9,
17511,
198,
197,
30553,
1807,
198,
197,
59403,
197,
197,
90,
931,
12320,
27907,
11,
2092,
11,
2092,
701,
830,
1583,
197,
197,
90,
931,
12320... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSyncPodsWithNetCreatesContainer(t *testing.T) {
kubelet, _, fakeDocker := makeTestKubelet(t)
fakeDocker.containerList = []docker.APIContainers{
{
// network container
Names: []string{"/k8s--net--foo.test--"},
ID: "9876",
},
}
err := kubelet.SyncPods([]Pod{
{
Name: "foo",
Namesp... | explode_data.jsonl/2829 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 393
} | [
2830,
3393,
12154,
23527,
16056,
6954,
54868,
4502,
1155,
353,
8840,
836,
8,
341,
16463,
3760,
1149,
11,
8358,
12418,
35,
13659,
1669,
1281,
2271,
42,
3760,
1149,
1155,
340,
1166,
726,
35,
13659,
18357,
852,
284,
3056,
28648,
24922,
746... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLocationValid(t *testing.T) {
cases := []struct {
in string
expected bool
}{
{"411", true},
{"412", true},
{"421", true},
{"422", true},
{"423", true},
{"431", true},
{"432", true},
{"420", false},
{"xxx", false},
}
for _, c := range cases {
got := LocationValid(c.in)
if got... | explode_data.jsonl/67943 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 189
} | [
2830,
3393,
4707,
4088,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
17430,
981,
914,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
4913,
19,
16,
16,
497,
830,
1583,
197,
197,
4913,
19,
16,
17,
497,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestContainerRuntimeOptionsv1(t *testing.T) {
t.Parallel()
client, err := newClient(t, address)
if err != nil {
t.Fatal(err)
}
defer client.Close()
var (
image Image
ctx, cancel = testContext()
id = t.Name()
)
defer cancel()
image, err = client.GetImage(ctx, testImage)
if err !=... | explode_data.jsonl/39641 | {
"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,
4502,
15123,
3798,
85,
16,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
25291,
11,
1848,
1669,
501,
2959,
1155,
11,
2621,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
2943,
10421,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFinalizeStructurals(t *testing.T) {
if !SupportedCPU() {
t.SkipNow()
}
testCases := []struct {
structurals uint64
whitespace uint64
quote_mask uint64
quote_bits uint64
expected_strls uint64
expected_pseudo uint64
}{
{0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
{0x1, 0x0, 0x0, 0x0, ... | explode_data.jsonl/18730 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 624
} | [
2830,
3393,
19357,
551,
9422,
324,
1127,
1155,
353,
8840,
836,
8,
341,
743,
753,
34636,
31615,
368,
341,
197,
3244,
57776,
7039,
741,
197,
532,
18185,
37302,
1669,
3056,
1235,
341,
197,
6472,
324,
1127,
257,
2622,
21,
19,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestSample1(t *testing.T) {
home := []int{0, 0}
items := [][]int{
{1, 1},
{-1, 1},
}
expect := 8
runSample(t, home, items, expect)
} | explode_data.jsonl/1267 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 73
} | [
2830,
3393,
17571,
16,
1155,
353,
8840,
836,
8,
341,
197,
5117,
1669,
3056,
396,
90,
15,
11,
220,
15,
532,
46413,
1669,
52931,
396,
515,
197,
197,
90,
16,
11,
220,
16,
1583,
197,
197,
19999,
16,
11,
220,
16,
1583,
197,
532,
2495... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransactionReadonly(t *testing.T) {
dialect := os.Getenv("GORM_DIALECT")
if dialect == "" {
dialect = "sqlite"
}
switch dialect {
case "mssql", "sqlite":
t.Skipf("%s does not support readonly transactions\n", dialect)
}
tx := DB.Begin()
u := User{Name: "transcation"}
if err := tx.Save(&u).Error; ... | explode_data.jsonl/28045 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 326
} | [
2830,
3393,
8070,
4418,
3243,
1155,
353,
8840,
836,
8,
341,
2698,
55056,
1669,
2643,
64883,
445,
38,
4365,
1557,
5863,
3965,
1138,
743,
42279,
621,
1591,
341,
197,
2698,
55056,
284,
330,
37042,
698,
197,
532,
8961,
42279,
341,
2722,
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... | 8 |
func TestUserMigration_String(t *testing.T) {
v := UserMigration{
ID: Int64(0),
GUID: String(""),
State: String(""),
LockRepositories: Bool(false),
ExcludeAttachments: Bool(false),
URL: String(""),
CreatedAt: String(""),
UpdatedAt: ... | explode_data.jsonl/33299 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 272
} | [
2830,
3393,
1474,
20168,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
2657,
20168,
515,
197,
29580,
25,
338,
1333,
21,
19,
7,
15,
1326,
197,
9600,
6463,
25,
2290,
923,
445,
4461,
197,
76424,
25,
1060,
923,
445,
4461,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestService_CreateJsonPostTask(t *testing.T) {
ctx := context.Background()
s := newService(t)
queue := &Queue{
ProjectID: "sinmetal-ci",
Region: "asia-northeast1",
Name: "gcpboxtest",
}
taskName, err := s.CreateJsonPostTask(ctx, queue, &JsonPostTask{
Routing: &Routing{
Service: "gcpbox",
... | explode_data.jsonl/69451 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
1860,
34325,
5014,
4133,
6262,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
1903,
1669,
501,
1860,
1155,
692,
46993,
1669,
609,
7554,
515,
197,
197,
7849,
915,
25,
330,
15940,
54008,
62384,
756,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestConditionMatchingErrorOperator(t *testing.T) {
beforeEach("mysql")
common.DB.Query("TRUNCATE TABLE logictree.conditions")
common.DB.Query("INSERT INTO logictree.conditions (field, operator, value, type, lt, rt) VALUES ('age', 'ASD', 4, 'equality', 1, 2)")
common.DB.Query("TRUNCATE TABLE logic... | explode_data.jsonl/62578 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
10547,
64430,
1454,
18461,
1155,
353,
8840,
836,
8,
341,
262,
17723,
445,
12272,
5130,
262,
4185,
22537,
15685,
445,
2378,
12633,
2336,
14363,
1487,
849,
765,
98704,
1138,
262,
4185,
22537,
15685,
445,
12698,
12496,
1487,
849,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMissingRegionOnEachServiceCall(t *testing.T) {
c := &client{
clients: map[string]*regionalClient{"us-east-1": nil},
}
_, err := c.DescribeInstances(context.Background(), "us-north-5", nil)
assert.EqualError(t, err, "no client found for region 'us-north-5'")
err = c.TerminateInstances(context.Backgroun... | explode_data.jsonl/3401 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
25080,
14091,
1925,
4854,
1860,
7220,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
609,
2972,
515,
197,
197,
31869,
25,
2415,
14032,
8465,
1580,
3914,
2959,
4913,
355,
39507,
12,
16,
788,
2092,
1583,
197,
630,
197,
6878,
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... | 1 |
func TestConfigs(t *testing.T) {
dir, err := os.Open("testdata")
if err != nil {
t.Fatal(err)
}
names, err := dir.Readdirnames(-1)
if err != nil {
t.Fatal(err)
}
for _, name := range names {
if *flagOnly != "" && !strings.Contains(name, *flagOnly) {
continue
}
if strings.HasSuffix(name, ".json") {
... | explode_data.jsonl/9278 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 197
} | [
2830,
3393,
84905,
1155,
353,
8840,
836,
8,
341,
48532,
11,
1848,
1669,
2643,
12953,
445,
92425,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
93940,
11,
1848,
1669,
5419,
2817,
44525,
11400,
4080,
16,
340,
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... | 8 |
func TestReadDMLBatchSize(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("set global tidb_dml_batch_size=1000")
se, err := session.CreateSession(store)
require.NoError(t, err)
// `select 1` to load the global variables.
_, _... | explode_data.jsonl/5754 | {
"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,
4418,
35,
2668,
21074,
1695,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTeamsService_ListTeamReposByID(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
mux.HandleFunc("/organizations/1/team/1/repos", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
wantAcceptHeaders := []string{mediaTypeTopicsPreview}
testHeader(t, r, "Accept", s... | explode_data.jsonl/4524 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 503
} | [
2830,
3393,
60669,
1860,
27104,
14597,
693,
966,
60572,
1155,
353,
8840,
836,
8,
341,
25291,
11,
59807,
11,
8358,
49304,
1669,
6505,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
69253,
14,
16,
78015,
14,
16,
49505,
497,
2915,
3622,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCnsShouldReturnErrorForEmptyNumber(t *testing.T) {
number := ``
_, err := brdocs.NewCns(number)
internal_test.AssertNotValidDocument(t, number, err, "Cns must not be empty")
} | explode_data.jsonl/52276 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 66
} | [
2830,
3393,
34,
4412,
14996,
5598,
1454,
2461,
3522,
2833,
1155,
353,
8840,
836,
8,
341,
57135,
1669,
1565,
3989,
197,
6878,
1848,
1669,
1411,
14120,
7121,
34,
4412,
17918,
340,
33343,
4452,
11711,
2623,
4088,
7524,
1155,
11,
1372,
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 |
func TestBuzzerDriverToggle(t *testing.T) {
d := initTestBuzzerDriver(newGpioTestAdaptor())
d.Off()
d.Toggle()
gobottest.Assert(t, d.State(), true)
d.Toggle()
gobottest.Assert(t, d.State(), false)
} | explode_data.jsonl/5908 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 87
} | [
2830,
3393,
33,
91447,
11349,
18897,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
2930,
2271,
33,
91447,
11349,
1755,
38,
11917,
2271,
2589,
32657,
2398,
2698,
13,
4596,
741,
2698,
80700,
741,
3174,
674,
1716,
477,
11711,
1155,
11,
294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAPISelector_SelectDefault(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
fmt.Fprint(w, testAPIServerEmptyResponseString)
}))
defer ts.Close()
u, _ := url.Parse(ts.URL)
actual, err := NewAPISelector(u).Select(context.TODO(), &Params{})
assert.E... | explode_data.jsonl/18679 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
7082,
5877,
58073,
3675,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
4232,
353,
1254,
9659,
8,
341,
197,
11009,
991,
1350,
3622,
11,
1273,
2537,
1637,
2836... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ForbiddenError_NoGroups(t *testing.T) {
principal := &models.Principal{
Username: "john",
}
err := NewForbidden(principal, "delete", "schema/things")
expectedErrMsg := "forbidden: user 'john' has insufficient permissions to delete schema/things"
assert.Equal(t, expectedErrMsg, err.Error())
} | explode_data.jsonl/52627 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 107
} | [
2830,
3393,
84368,
22108,
1454,
36989,
22173,
1155,
353,
8840,
836,
8,
341,
25653,
15702,
1669,
609,
6507,
17947,
15702,
515,
197,
197,
11115,
25,
330,
47817,
756,
197,
630,
9859,
1669,
1532,
69115,
24974,
15702,
11,
330,
4542,
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 Test_Format(t *testing.T) {
// &openpomodoro.Pomodoro{}: map[string]string{
// `%r%!r%R%!R%l%L`: "",
// `%d%t`: "",
// },
// &openpomodoro.Pomodoro{
// StartTime: time.Now(),
// Description: "working on stuff",
// Tags: []string{"work", "personal"},
// }: map[string]string{
// `%d`: "... | explode_data.jsonl/45954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1907
} | [
2830,
3393,
72999,
1155,
353,
8840,
836,
8,
341,
197,
322,
609,
2508,
79,
316,
347,
18307,
1069,
316,
347,
18307,
6257,
25,
2415,
14032,
30953,
515,
197,
322,
61400,
81,
89420,
81,
4,
49,
89420,
49,
4,
75,
4,
43,
44622,
8324,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCertPolicyOvNoCountry(t *testing.T) {
inputPath := "orgValNoCountry.pem"
expected := lint.Error
out := test.TestLint("e_cert_policy_ov_requires_country", inputPath)
if out.Status != expected {
t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status)
}
} | explode_data.jsonl/28460 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
36934,
13825,
46,
85,
2753,
16408,
1155,
353,
8840,
836,
8,
341,
22427,
1820,
1669,
330,
1775,
2208,
2753,
16408,
49373,
698,
42400,
1669,
57920,
6141,
198,
13967,
1669,
1273,
8787,
47556,
445,
68,
37097,
22773,
83981,
54949,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFindProcess(t *testing.T) {
process, err := FindProcess("go.exe")
if err != nil {
t.Errorf(err.Error())
return
}
if process == nil {
t.Fatal("no process with name go.exe")
return
}
} | explode_data.jsonl/76137 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 83
} | [
2830,
3393,
9885,
7423,
1155,
353,
8840,
836,
8,
341,
53314,
11,
1848,
1669,
7379,
7423,
445,
3346,
19399,
5130,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
3964,
6141,
2398,
197,
853,
198,
197,
630,
743,
1882,
621,
2092,
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
] | 3 |
func TestVersionComparison(t *testing.T) {
t.Run("Validate that version is outdated", func(t *testing.T) {
versions := []models.Version{
{Version: "1.1.1"},
{Version: "2.0.0"},
}
upgradeablePlugins := map[string]models.Plugin{
"0.0.0": {Versions: versions},
"1.0.0": {Versions: versions},
}
for ... | explode_data.jsonl/55411 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 414
} | [
2830,
3393,
5637,
33487,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
17926,
429,
2319,
374,
40526,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
28290,
1669,
3056,
6507,
35842,
515,
298,
197,
90,
5637,
25,
330,
16,
13,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAggregationBuiltinBitOr(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t;")
tk.MustExec("create table t(a bigint)")
tk.MustExec("insert into t values(null);")
result := tk.MustQuery("... | explode_data.jsonl/65445 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 405
} | [
2830,
3393,
9042,
34442,
33,
25628,
8344,
2195,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetNow(t *testing.T) {
// set the current function after the test finishes
defer func(f func() int64) { now = f }(now)
// expected value for the unchanged function
var original int64 = 1
// expected value for the changed function
var changed int64 = 2
// define the original (unchanged) functions
now ... | explode_data.jsonl/30391 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 316
} | [
2830,
3393,
1649,
7039,
1155,
353,
8840,
836,
8,
341,
197,
322,
738,
279,
1482,
729,
1283,
279,
1273,
33036,
198,
16867,
2915,
955,
2915,
368,
526,
21,
19,
8,
314,
1431,
284,
282,
95916,
3328,
692,
197,
322,
3601,
897,
369,
279,
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_handleError(t *testing.T) {
type args struct {
err error
enc encoding.EncodeFunc
}
tests := []struct {
name string
args args
expectedCode int
expectedHeaders map[string]string
}{
{name: "bad request", args: args{err: NewValidationError(), enc: json.Encode}, expectedC... | explode_data.jsonl/54957 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 687
} | [
2830,
3393,
10630,
1454,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
9859,
1465,
198,
197,
197,
954,
11170,
50217,
9626,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
31215,
310,
2827,
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 TestApp01myCustomerHndlrDB(t *testing.T) {
var err error
var td *TestData_App01myCustomer
var rcd App01myCustomer.App01myCustomer
var rcd2 App01myCustomer.App01myCustomer
t.Logf("TestCustomer.DB()...\n")
td = &TestData_App01myCustomer{}
td.Setup(t)
... | explode_data.jsonl/63209 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 318
} | [
2830,
3393,
2164,
15,
16,
2408,
12792,
39,
303,
19018,
3506,
1155,
353,
8840,
836,
8,
341,
262,
762,
1848,
260,
1465,
198,
262,
762,
17941,
688,
353,
83920,
36117,
15,
16,
2408,
12792,
198,
262,
762,
435,
4385,
260,
1845,
15,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestDeleteCredentialsIDNull(t *testing.T) {
k, _ := kuzzle.NewKuzzle(&internal.MockedConnection{}, nil)
err := k.Security.DeleteCredentials("strategy", "", nil)
assert.Error(t, err)
} | explode_data.jsonl/58817 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 70
} | [
2830,
3393,
6435,
27025,
915,
3280,
1155,
353,
8840,
836,
8,
341,
16463,
11,
716,
1669,
595,
14945,
7121,
42,
14945,
2099,
10481,
24664,
291,
4526,
22655,
2092,
340,
9859,
1669,
595,
21567,
18872,
27025,
445,
61914,
497,
7342,
2092,
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 |
func TestNewClientServerTest(t *testing.T) {
var got struct {
sync.Mutex
log []string
}
h := HandlerFunc(func(w ResponseWriter, r *Request) {
got.Lock()
defer got.Unlock()
got.log = append(got.log, r.Proto)
})
for _, v := range [2]bool{false, true} {
cst := newClientServerTest(t, v, h)
if _, err := c... | explode_data.jsonl/4733 | {
"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,
3564,
2959,
5475,
2271,
1155,
353,
8840,
836,
8,
341,
2405,
2684,
2036,
341,
197,
1903,
1721,
99014,
198,
197,
6725,
3056,
917,
198,
197,
532,
9598,
1669,
19954,
9626,
18552,
3622,
5949,
6492,
11,
435,
353,
1900,
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 TestPodSpecForKvdbAclToken(t *testing.T) {
fakeClient := fakek8sclient.NewSimpleClientset(
&v1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: "kvdb-auth-secret",
Namespace: "kube-test",
},
Data: map[string][]byte{
secretKeyKvdbACLToken: []byte("kvdb-acl-token"),
secretKeyKvdbUsername... | explode_data.jsonl/55469 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 574
} | [
2830,
3393,
23527,
8327,
2461,
42,
85,
1999,
32,
564,
3323,
1155,
353,
8840,
836,
8,
341,
1166,
726,
2959,
1669,
12418,
74,
23,
82,
2972,
7121,
16374,
2959,
746,
1006,
197,
197,
5,
85,
16,
74779,
515,
298,
23816,
12175,
25,
77520,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScalarBls12377G1Neg(t *testing.T) {
bls12377G1 := BLS12377G1()
one := bls12377G1.Scalar.One()
neg1 := bls12377G1.Scalar.New(-1)
require.Equal(t, one.Neg().Cmp(neg1), 0)
lotsOfThrees := bls12377G1.Scalar.New(333333)
expected := bls12377G1.Scalar.New(-333333)
require.Equal(t, lotsOfThrees.Neg().Cmp(expect... | explode_data.jsonl/15752 | {
"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,
20639,
33,
4730,
16,
17,
18,
22,
22,
38,
16,
47800,
1155,
353,
8840,
836,
8,
341,
96421,
82,
16,
17,
18,
22,
22,
38,
16,
1669,
425,
7268,
16,
17,
18,
22,
22,
38,
16,
741,
197,
603,
1669,
1501,
82,
16,
17,
18,
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 TestLoopRet(t *testing.T) {
const SCRIPT = `
for (var i = 0; i < 20; i++) { if (i > 1) {break;} else { i }}
`
testScript1(SCRIPT, _undefined, t)
} | explode_data.jsonl/75259 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 68
} | [
2830,
3393,
14620,
12020,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
2023,
320,
947,
600,
284,
220,
15,
26,
600,
366,
220,
17,
15,
26,
600,
2457,
314,
421,
320,
72,
861,
220,
16,
8,
314,
8960,
30031,
770,
314,
600,
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 |
func TestOptionsMarshal(t *testing.T) {
tu := &platform.TaskUpdate{}
// this is to make sure that string durations are properly marshaled into durations
if err := json.Unmarshal([]byte(`{"every":"10s", "offset":"1h"}`), tu); err != nil {
t.Fatal(err)
}
if tu.Options.Every != 10*time.Second {
t.Fatalf("option.e... | explode_data.jsonl/13937 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 373
} | [
2830,
3393,
3798,
55438,
1155,
353,
8840,
836,
8,
341,
3244,
84,
1669,
609,
15734,
28258,
4289,
16094,
197,
322,
419,
374,
311,
1281,
2704,
429,
914,
89104,
525,
10277,
31996,
5838,
1119,
89104,
198,
743,
1848,
1669,
2951,
38097,
10556,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewGossipStateProvider_BatchingOfStateRequest(t *testing.T) {
t.Parallel()
bootPeer, bootPort := newBootNode(0, newCommitter(), noopPeerIdentityAcceptor)
defer bootPeer.shutdown()
msgCount := DefAntiEntropyBatchSize + 5
expectedMessagesCnt := 2
for i := 1; i <= msgCount; i++ {
rawblock := pcomm.NewBl... | explode_data.jsonl/5646 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 935
} | [
2830,
3393,
3564,
38,
41473,
1397,
5179,
1668,
31924,
2124,
1397,
1900,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
4619,
30888,
11,
10459,
7084,
1669,
501,
17919,
1955,
7,
15,
11,
501,
1092,
16126,
1507,
60829,
30888,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsInt(t *testing.T) {
one := NewInt(1)
for _, a := range setStringTests {
x, ok := new(Rat).SetString(a.in)
if !ok {
continue
}
i := x.IsInt()
e := x.Denom().Cmp(one) == 0
if i != e {
t.Errorf("got IsInt(%v) == %v; want %v", x, i, e)
}
}
} | explode_data.jsonl/35071 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
3872,
1072,
1155,
353,
8840,
836,
8,
341,
197,
603,
1669,
1532,
1072,
7,
16,
340,
2023,
8358,
264,
1669,
2088,
738,
703,
18200,
341,
197,
10225,
11,
5394,
1669,
501,
2785,
266,
568,
1649,
703,
2877,
1858,
340,
197,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResetableLimitedReader(t *testing.T) {
maxReadBuffer := 400
t.Run("WhenMaxReadIsReachedInMultipleRead", func(t *testing.T) {
r := strings.NewReader(randomString(maxReadBuffer * 2))
m := NewResetableLimitedReader(r, uint64(maxReadBuffer))
toRead := make([]byte, maxReadBuffer)
_, err := m.Read(... | explode_data.jsonl/40047 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 473
} | [
2830,
3393,
14828,
480,
74477,
5062,
1155,
353,
8840,
836,
8,
972,
22543,
4418,
4095,
1669,
220,
19,
15,
15,
871,
3244,
16708,
445,
4498,
5974,
4418,
3872,
98526,
641,
32089,
4418,
497,
2915,
1155,
353,
8840,
836,
8,
972,
197,
7000,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransportGzipShort(t *testing.T) {
defer afterTest(t)
ts := httptest.NewServer(HandlerFunc(func(w ResponseWriter, r *Request) {
w.Header().Set("Content-Encoding", "gzip")
w.Write([]byte{0x1f, 0x8b})
}))
defer ts.Close()
tr := &Transport{}
defer tr.CloseIdleConnections()
c := &Client{Transport: tr}
... | explode_data.jsonl/4889 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
27560,
38,
9964,
12472,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
340,
57441,
1669,
54320,
70334,
7121,
5475,
7,
3050,
9626,
18552,
3622,
5949,
6492,
11,
435,
353,
1900,
8,
341,
197,
6692,
15753,
1005,
1649,
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 Test_Mock_AssertCalled_WithArguments_With_Repeatability(t *testing.T) {
var mockedService = new(TestExampleImplementation)
mockedService.On("Test_Mock_AssertCalled_WithArguments_With_Repeatability", 1, 2, 3).Return(5, 6, 7).Once()
mockedService.On("Test_Mock_AssertCalled_WithArguments_With_Repeatability"... | explode_data.jsonl/8610 | {
"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,
1245,
1176,
62222,
529,
20960,
62,
2354,
19139,
62,
2354,
50693,
375,
2096,
1403,
1155,
353,
8840,
836,
8,
8022,
2405,
46149,
1860,
284,
501,
31159,
13314,
36850,
7229,
2109,
67385,
1860,
8071,
445,
2271,
1245,
1176,
62222,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRangeCacheClearOverlappingMeta(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
ctx := context.Background()
firstDesc := roachpb.RangeDescriptor{
StartKey: roachpb.RKeyMin,
EndKey: roachpb.RKey("zzz"),
}
restDesc := roachpb.RangeDescriptor{
StartKey: firstDesc.EndKey,
... | explode_data.jsonl/28193 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 409
} | [
2830,
3393,
6046,
8233,
14008,
1918,
90619,
12175,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
16867,
1487,
77940,
1155,
568,
7925,
1155,
340,
20985,
1669,
2266,
19047,
2822,
42190,
11065,
1669,
926,
610,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDisableResolutionFlag_PreventsResolution(t *testing.T) {
for _, tc := range []struct {
description string
pr *v1beta1.PipelineRun
}{{
description: "inline pipelinespec is not resolved",
pr: &v1beta1.PipelineRun{
ObjectMeta: metav1.ObjectMeta{
Name: "pr",
Namespace: "foo",
... | explode_data.jsonl/68309 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1126
} | [
2830,
3393,
25479,
38106,
12135,
79561,
47664,
38106,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
42407,
914,
198,
197,
25653,
688,
353,
85,
16,
19127,
16,
1069,
8790,
6727,
198,
197,
15170,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestInodeIdsReuseIdsRecycled(t *testing.T) {
runTestCustomConfig(t, dirtyDelay100Ms, func(test *testHelper) {
workspace := test.NewWorkspace()
func() {
defer test.qfs.inodeIds.lock.Lock().Unlock()
test.qfs.inodeIds.reusableDelay = time.Millisecond * 2
// We want inode id GC to happen after we've flu... | explode_data.jsonl/1829 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 809
} | [
2830,
3393,
641,
534,
12701,
38081,
12701,
3820,
36576,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
10268,
2648,
1155,
11,
18595,
20039,
16,
15,
15,
21634,
11,
2915,
8623,
353,
1944,
5511,
8,
341,
197,
197,
42909,
1669,
1273,
7121,
459... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStrategyGenerate(t *testing.T) {
testcases := map[string]strategyTestCase{
"no user": {
MakeStrategy: NewStrategyGenerate,
PreferredUsername: "bob",
Identity: makeIdentity("", "idp", "bob", "", ""),
CreateResponse: makeUser("bobUserUID", "bob", "idp:bob"),
ExpectedActions: []t... | explode_data.jsonl/20535 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1078
} | [
2830,
3393,
19816,
31115,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
2415,
14032,
60,
61914,
16458,
515,
197,
197,
1,
2152,
1196,
788,
341,
298,
197,
8078,
19816,
25,
414,
1532,
19816,
31115,
345,
298,
197,
22482,
11115,
25,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStartAndEndOfQuarter(t *testing.T) {
timeQ1 := time.Date(2022, 2, 11, 11, 0, 0, 0, time.Local)
require.Equal(t, StartOfQuarter(2022, Quarter1th), StartOfQuarter2(timeQ1))
require.Equal(t, PreviousStartOfQuarter(2022, Quarter1th), PreviousStartOfQuarter2(timeQ1))
require.Equal(t, NextStartOfQuarter(2022, Qu... | explode_data.jsonl/80466 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 910
} | [
2830,
3393,
3479,
3036,
3727,
2124,
86608,
1155,
353,
8840,
836,
8,
341,
21957,
48,
16,
1669,
882,
8518,
7,
17,
15,
17,
17,
11,
220,
17,
11,
220,
16,
16,
11,
220,
16,
16,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
882,
20856... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPacketConnMulticastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
}
ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
if ifi == nil {
t.Skipf("not available on %s", runtime.GOOS)
}
m, ok := ne... | explode_data.jsonl/34652 | {
"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,
16679,
9701,
40404,
35446,
10286,
3798,
1155,
353,
8840,
836,
8,
341,
8961,
15592,
97574,
3126,
341,
2722,
330,
3376,
564,
497,
330,
10393,
24,
4660,
197,
3244,
57776,
69,
445,
1921,
7248,
389,
1018,
82,
497,
15592,
97574,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenModel_Issue252(t *testing.T) {
specDoc, err := loads.Spec("../fixtures/bugs/252/swagger.json")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
k := "SodaBrand"
opts := opts()
genModel, err := makeGenDefinition(k, "models", definitions[k], specDoc, opts)
require.NoError(t, err)
req... | explode_data.jsonl/2540 | {
"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,
9967,
1712,
7959,
83890,
17,
20,
17,
1155,
353,
8840,
836,
8,
341,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
14,
56176,
14,
17,
20,
17,
80930,
4323,
1138,
17957,
35699,
1155,
11,
1848,
692,
7452,
4054,
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... | 1 |
func TestTransformCompare(t *testing.T) {
// use local deterministic RNG
r := rand.New(rand.NewSource(0))
var srcL, srcH, tmpL, tmpH [StateSize]uint
for i := 0; i < 1000; i++ {
for j := 0; j < StateSize; j++ {
srcL[j] = uint(r.Uint64())
srcH[j] = uint(r.Uint64())
}
var dstGenericL, dstGenericH [StateS... | explode_data.jsonl/45216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
8963,
27374,
1155,
353,
8840,
836,
8,
341,
197,
322,
990,
2205,
72349,
72606,
198,
7000,
1669,
10382,
7121,
37595,
7121,
3608,
7,
15,
4390,
2405,
2286,
43,
11,
2286,
39,
11,
4174,
43,
11,
4174,
39,
508,
1397,
1695,
60,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestStructGetField(t *testing.T) {
foo := contact{
Name: "bill",
}
foo.Address.Street = "oak st"
foo.Address.Number = 3
out, err := starlight.Eval([]byte("out = foo.Address.Street"), map[string]interface{}{"foo": foo}, nil)
if err != nil {
t.Fatal(err)
}
o, ok := out["out"]
if !ok {
t.Fatal("out pa... | explode_data.jsonl/47066 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 218
} | [
2830,
3393,
9422,
1949,
1877,
1155,
353,
8840,
836,
8,
341,
197,
7975,
1669,
3645,
515,
197,
21297,
25,
330,
29642,
756,
197,
532,
197,
7975,
26979,
7758,
3744,
284,
330,
78,
585,
357,
698,
197,
7975,
26979,
31182,
284,
220,
18,
271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestGetLineSelf(t *testing.T) {
// Define a script.
var output []string
scr := NewScript()
scr.Begin = func(s *Script) { output = nil }
scr.AppendStmt(Auto("skip"), func(s *Script) {
nSkip := s.F(2).Int()
for i := 0; i < nSkip; i++ {
_, err := s.GetLine(nil)
if err != nil && err != io.EOF {
t.Fa... | explode_data.jsonl/3026 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 774
} | [
2830,
3393,
1949,
2460,
12092,
1155,
353,
8840,
836,
8,
341,
197,
322,
18614,
264,
5316,
624,
2405,
2550,
3056,
917,
198,
1903,
5082,
1669,
1532,
5910,
741,
1903,
5082,
28467,
284,
2915,
1141,
353,
5910,
8,
314,
2550,
284,
2092,
456,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTotal003(t *testing.T) {
text := `Go is expressive, concise, clean, and efficient.
Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines,
while its novel type system enables flexible and modular program construction. Go compiles quickly to machine ... | explode_data.jsonl/59207 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 843
} | [
2830,
3393,
7595,
15,
15,
18,
1155,
353,
8840,
836,
8,
341,
15425,
1669,
1565,
10850,
374,
77123,
11,
63594,
11,
4240,
11,
323,
11050,
624,
36120,
78010,
23783,
1281,
432,
4135,
311,
3270,
7468,
429,
633,
279,
1429,
700,
315,
91420,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidate_FragmentsOnCompositeTypes_ObjectIsValidInlineFragmentType(t *testing.T) {
testutil.ExpectPassesRule(t, graphql.FragmentsOnCompositeTypesRule, `
fragment validFragment on Pet {
... on Dog {
barks
}
}
`)
} | explode_data.jsonl/56009 | {
"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,
17926,
1400,
41956,
1925,
41685,
4173,
27839,
55470,
25324,
9488,
929,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
81893,
12187,
288,
11337,
1155,
11,
48865,
991,
41956,
1925,
41685,
4173,
11337,
11,
22074,
414,
12289,
2697,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsDirWithGoFiles(t *testing.T) {
initOverlay(t, `
{
"Replace": {
"goinoverlay/file.go": "dummy",
"directory/removed/by/file": "dummy",
"directory_with_go_dir/dir.go/file.txt": "dummy",
"otherdirectory/deleted.go": "",
"nonexistentdirectory/deleted.go": "",
"textfile.txt/file.go": "dummy"
}... | explode_data.jsonl/56051 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 609
} | [
2830,
3393,
3872,
6184,
2354,
10850,
10809,
1155,
353,
8840,
836,
8,
341,
28248,
32755,
1155,
11,
22074,
515,
197,
1,
23107,
788,
341,
197,
197,
59719,
1961,
21118,
23903,
18002,
788,
981,
330,
31390,
756,
197,
197,
1,
23037,
14,
4575... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func Test_signature_Encode(t *testing.T) {
t.Parallel()
type (
testCase struct {
name string
sign Signature
want *pb.Signature
}
testList []testCase
)
algos := GetAlgos()
tests := make(testList, 0, algos.Len())
for name, algo := range algos {
sign, _ := mockSignature(algo)
blob, _ := sign.Ra... | explode_data.jsonl/21345 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 313
} | [
2830,
3393,
39859,
93529,
534,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
13158,
2399,
197,
18185,
4207,
2036,
341,
298,
11609,
914,
198,
298,
69054,
32232,
198,
298,
50780,
353,
16650,
41152,
1568,
198,
197,
197,
630,
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 TestGetHostStatus(t *testing.T) {
RegisterMockDriver(t)
api := tests.NewMockAPI(t)
checkState := func(expected string) {
s, err := GetHostStatus(api)
if err != nil {
t.Fatalf("Unexpected error getting status: %v", err)
}
if s != expected {
t.Fatalf("Expected status: %s, got %s", s, expected)
}
... | explode_data.jsonl/4190 | {
"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,
1949,
9296,
2522,
1155,
353,
8840,
836,
8,
341,
79096,
11571,
11349,
1155,
340,
54299,
1669,
7032,
7121,
11571,
7082,
1155,
692,
25157,
1397,
1669,
2915,
15253,
914,
8,
341,
197,
1903,
11,
1848,
1669,
2126,
9296,
2522,
24827... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSignOrder(t *testing.T) {
signedOrder, err := SignTestOrder(testOrder)
require.NoError(t, err)
expectedSignature := "0x1c54a8db1f96a1851886d966b46ceff87c4c2bba6e1b2e3da7e183912b9a328334633f08385016ee5f94dcb3c7a9ca80c2de59de14b73607b2c4eaf64f3d89915103"
actualSignature := fmt.Sprintf("0x%s", common.Bytes2H... | explode_data.jsonl/18007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 181
} | [
2830,
3393,
7264,
4431,
1155,
353,
8840,
836,
8,
341,
1903,
1542,
4431,
11,
1848,
1669,
7075,
2271,
4431,
8623,
4431,
340,
17957,
35699,
1155,
11,
1848,
692,
42400,
25088,
1669,
330,
15,
87,
16,
66,
20,
19,
64,
23,
1999,
16,
69,
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 TestSQLQueryFactoryDefaultSortBadType(t *testing.T) {
s, _ := newMockProvider().init()
sel := squirrel.Select("*").From("mytable")
fb := database.MessageQueryFactory.NewFilter(context.Background())
f := fb.And(
fb.Eq("namespace", "ns1"),
)
assert.PanicsWithValue(t, "unknown sort type: 100", func() {
s.f... | explode_data.jsonl/34923 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
6688,
2859,
4153,
3675,
10231,
17082,
929,
1155,
353,
8840,
836,
8,
1476,
1903,
11,
716,
1669,
501,
11571,
5179,
1005,
2327,
741,
1903,
301,
1669,
90524,
14752,
29592,
1827,
3830,
445,
2408,
2005,
1138,
1166,
65,
1669,
4625,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreToServiceLister(t *testing.T) {
store := NewStore(MetaNamespaceKeyFunc)
store.Add(&api.Service{
ObjectMeta: api.ObjectMeta{Name: "foo"},
Spec: api.ServiceSpec{
Selector: map[string]string{},
},
})
store.Add(&api.Service{ObjectMeta: api.ObjectMeta{Name: "bar"}})
ssl := StoreToServiceLister{st... | explode_data.jsonl/38229 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 304
} | [
2830,
3393,
6093,
1249,
1860,
852,
261,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
1532,
6093,
3189,
1915,
22699,
1592,
9626,
340,
57279,
1904,
2099,
2068,
13860,
515,
197,
23816,
12175,
25,
6330,
80222,
63121,
25,
330,
7975,
7115,
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 TestAdd(t *testing.T) {
tc := New(DefaultExpiration, 0)
err := tc.Add(v1, v2, DefaultExpiration)
if err != nil {
t.Error("Couldn't add foo even though it shouldn't exist")
}
err = tc.Add(v1, v3, DefaultExpiration)
if err == nil {
t.Error("Successfully added another foo when it should have returned an err... | explode_data.jsonl/63759 | {
"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,
2212,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
1532,
87874,
66301,
11,
220,
15,
340,
9859,
1669,
17130,
1904,
3747,
16,
11,
348,
17,
11,
7899,
66301,
340,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
445,
38987,
944,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUtilGetJSONPost(t *testing.T) {
goodJsons := []string{
`{"login":"abc","name": "tom", "pass": "mylittlepony", "admin": true}`,
`{"login":1,"name": "tom", "pass": "mylittlepony", "admin": true}`,
`{"login":123,"name": "tom", "pass": "mylittlepony", "admin": true}`,
`{"login":"1234","name": "tom", "pass... | explode_data.jsonl/9661 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 528
} | [
2830,
3393,
2742,
1949,
5370,
4133,
1155,
353,
8840,
836,
8,
341,
3174,
1386,
5014,
82,
1669,
3056,
917,
515,
197,
197,
63,
4913,
3673,
3252,
13683,
2198,
606,
788,
330,
37401,
497,
330,
6385,
788,
330,
2408,
55392,
618,
88,
497,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckFactoryConfig(t *testing.T) {
assert := assert.New(t)
type testData struct {
factoryEnabled bool
expectError bool
imagePath string
initrdPath string
}
data := []testData{
{false, false, "", ""},
{false, false, "image", ""},
{false, false, "", "initrd"},
{true, false, "",... | explode_data.jsonl/11753 | {
"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,
3973,
4153,
2648,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
13158,
67348,
2036,
341,
197,
1166,
2919,
5462,
1807,
198,
197,
24952,
1454,
262,
1807,
198,
197,
31426,
1820,
414,
914,
198,
197,
28248,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestAppRequestMetricsHandlerPanickingHandler(t *testing.T) {
defer reset()
baseHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
panic("no!")
})
breaker := NewBreaker(BreakerParams{QueueDepth: 10, MaxConcurrency: 10, InitialCapacity: 10})
handler, err := NewAppRequestMetricsHandler(... | explode_data.jsonl/63525 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 555
} | [
2830,
3393,
2164,
1900,
27328,
3050,
35693,
16272,
3050,
1155,
353,
8840,
836,
8,
341,
16867,
7585,
741,
24195,
3050,
1669,
1758,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
30764,
445,
2152,
22988,
197,
3518... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChkEnumsType(t *testing.T) {
a := assert.New(t, false)
data := []*struct {
t *TypeAttribute
enums []*Enum
err bool
}{
{},
{
t: &TypeAttribute{Value: xmlenc.String{Value: TypeString}},
enums: []*Enum{
{Value: &Attribute{Value: xmlenc.String{Value: "123"}}},
{Value: &Attribute{V... | explode_data.jsonl/78944 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 802
} | [
2830,
3393,
1143,
74,
71586,
929,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
11,
895,
692,
8924,
1669,
29838,
1235,
341,
197,
3244,
257,
353,
929,
3907,
198,
197,
81848,
6237,
29838,
10766,
198,
197,
9859,
256,
1807,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestTimestamptzConvertsGoZeroToNull(t *testing.T) {
testutil.TestGoZeroToNullConversion(t, "timestamptz", (zeronull.Timestamptz)(time.Time{}))
} | explode_data.jsonl/30780 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 62
} | [
2830,
3393,
51,
4255,
309,
417,
89,
12012,
82,
10850,
17999,
1249,
3280,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
8787,
10850,
17999,
1249,
3280,
48237,
1155,
11,
330,
83,
4255,
309,
417,
89,
497,
320,
7070,
263,
617,
836,
4255,
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 |
func TestFindAndRemoveDeletedPodsWithActualState(t *testing.T) {
dswp, fakePodState, pod, expectedVolumeName, _ := prepareDSWPWithPodPV(t)
fakeASW := dswp.actualStateOfWorld
podName := util.GetUniquePodName(pod)
//let the pod be terminated
podGet, exist := dswp.podManager.GetPodByName(pod.Namespace, pod.Name)
if... | explode_data.jsonl/45748 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 827
} | [
2830,
3393,
9885,
3036,
13021,
26039,
23527,
16056,
28123,
1397,
1155,
353,
8840,
836,
8,
341,
2698,
2280,
79,
11,
12418,
23527,
1397,
11,
7509,
11,
3601,
18902,
675,
11,
716,
1669,
10549,
5936,
25674,
2354,
23527,
48469,
1155,
340,
116... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefaultBufferSizes(t *testing.T) {
s := stack.New([]string{ipv4.ProtocolName}, []string{tcp.ProtocolName}, stack.Options{})
// Check the default values.
ep, err := s.NewEndpoint(tcp.ProtocolNumber, ipv4.ProtocolNumber, &waiter.Queue{})
if err != nil {
t.Fatalf("NewEndpoint failed; %v", err)
}
defer fu... | explode_data.jsonl/22323 | {
"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,
3675,
4095,
34930,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
5611,
7121,
10556,
917,
90,
42676,
19,
54096,
675,
2137,
3056,
917,
90,
27161,
54096,
675,
2137,
5611,
22179,
6257,
692,
197,
322,
4248,
279,
1638,
2750,
624,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDriftctlRun_BasicFilter(t *testing.T) {
cases := TestCases{
{
name: "test filtering on Type",
stateResources: []*resource.Resource{},
remoteResources: []*resource.Resource{
&resource.Resource{
Id: "res1",
Type: "not-filtered",
Attrs: &resource.Attributes{},
},
... | explode_data.jsonl/5370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1190
} | [
2830,
3393,
8847,
2085,
12373,
6727,
1668,
5971,
5632,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3393,
37302,
515,
197,
197,
515,
298,
11609,
25,
1843,
330,
1944,
29670,
389,
3990,
756,
298,
24291,
11277,
25,
29838,
9233,
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... | 1 |
func TestClusterMemberByName(t *testing.T) {
membs := []*Member{
newTestMember(1, nil, "node1", nil),
newTestMember(2, nil, "node2", nil),
}
tests := []struct {
name string
match bool
}{
{"node1", true},
{"node2", true},
{"node3", false},
}
for i, tt := range tests {
c := newTestCluster(membs)
... | explode_data.jsonl/52330 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 263
} | [
2830,
3393,
28678,
9366,
16898,
1155,
353,
8840,
836,
8,
341,
14145,
1279,
1669,
29838,
9366,
515,
197,
8638,
2271,
9366,
7,
16,
11,
2092,
11,
330,
3509,
16,
497,
2092,
1326,
197,
8638,
2271,
9366,
7,
17,
11,
2092,
11,
330,
3509,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_InstallOperatorNoNamespace(t *testing.T) {
ns := t.Name()
cli := fmt.Sprintf("install operator -p %s", ns)
test.SetupCliTest(cli, context.CommandFactory{BuildCommands: BuildCommands}, &v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns}})
test.ExecuteCli()
cli = fmt.Sprintf("install operator")
test.Se... | explode_data.jsonl/24954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 203
} | [
2830,
3393,
62,
24690,
18461,
2753,
22699,
1155,
353,
8840,
836,
8,
341,
84041,
1669,
259,
2967,
741,
86448,
1669,
8879,
17305,
445,
12248,
5675,
481,
79,
1018,
82,
497,
12268,
340,
18185,
39820,
87014,
2271,
70249,
11,
2266,
12714,
415... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateGetDeleteAuthorizeCodes(t *testing.T) {
t.Parallel()
for k, m := range fositeStores {
t.Run(fmt.Sprintf("case=%s", k), TestHelperCreateGetDeleteAuthorizeCodes(m))
}
} | explode_data.jsonl/54415 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 74
} | [
2830,
3393,
4021,
1949,
6435,
37483,
20871,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2023,
595,
11,
296,
1669,
2088,
48390,
632,
69026,
341,
197,
3244,
16708,
28197,
17305,
445,
5638,
7846,
82,
497,
595,
701,
3393,
5511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegisterMsgService(t *testing.T) {
// Create an encoding config that doesn't register testdata Msg services.
encCfg := simapp.MakeTestEncodingConfig()
msr := middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry)
require.Panics(t, func() {
testdata.RegisterMsgServer(
msr,
testdata.MsgServerImpl{}... | explode_data.jsonl/2230 | {
"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,
8690,
6611,
1860,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
458,
11170,
2193,
429,
3171,
944,
4161,
1273,
691,
24205,
3516,
624,
197,
954,
42467,
1669,
1643,
676,
50133,
2271,
14690,
2648,
741,
47691,
81,
1669,
29679,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEqual(t *testing.T) {
var ts1, ts2 *Tensor
vv220 := []interface{}{[]int{1, 2, 3, 3}, []float64{4.0, 5.5, 6, 9}, []string{"a", "b", "c", "c"}}
ts1 = NewTensor(vv220)
vv221 := []interface{}{[]int{1, 2, 3, 3}, []float64{4.0, 5.5, 6, 9}, []string{"a", "b", "c", "c"}}
ts2 = NewTensor(vv221)
t.Logf("%v", ts1.E... | explode_data.jsonl/20818 | {
"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,
2993,
1155,
353,
8840,
836,
8,
341,
2405,
10591,
16,
11,
10591,
17,
353,
25336,
198,
5195,
85,
17,
17,
15,
1669,
3056,
4970,
6257,
90,
1294,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
18,
2137,
3056,
3649,
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 |
func TestCoordinatorToFilterOutPvtRWSetsWithWrongHash(t *testing.T) {
/*
Test case, where peer receives new block for commit
it has ns1:c1 in transient store, while it has wrong
hash, hence it will fetch ns1:c1 from other peers
*/
peerSelfSignedData := common.SignedData{
Identity: []byte{0, 1, 2},
Signatu... | explode_data.jsonl/40468 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1173
} | [
2830,
3393,
64304,
1249,
5632,
2662,
47,
9708,
49,
7433,
1415,
2354,
29185,
6370,
1155,
353,
8840,
836,
8,
341,
197,
3284,
197,
73866,
1142,
11,
1380,
14397,
21189,
501,
2504,
369,
5266,
198,
197,
23374,
702,
12268,
16,
48031,
16,
304... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCommandSide_ChangeProjectGrantMember(t *testing.T) {
type fields struct {
eventstore *eventstore.Eventstore
zitadelRoles []authz.RoleMapping
}
type args struct {
ctx context.Context
member *domain.ProjectGrantMember
}
type res struct {
want *domain.ProjectGrantMember
err func(error) bool... | explode_data.jsonl/64174 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2263
} | [
2830,
3393,
4062,
16384,
27588,
844,
7849,
67971,
9366,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
28302,
4314,
256,
353,
3087,
4314,
6904,
4314,
198,
197,
20832,
275,
15151,
25116,
3056,
3242,
89,
35955,
6807,
198,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestExcelizeExp(t *testing.T) {
f := excelize.NewFile()
sheet := "Sheet1"
// 设置单元格的值
f.SetCellValue(sheet, "A1", 100)
f.SetCellValue(sheet, "A2", 1)
f.SetCellFormula(sheet, "A3", "=A1+A2")
//f.DuplicateRowTo(sheet, 2, 3)
//f.RemoveRow(sheet, 2)
// 根据指定路径保存文件
f.SaveAs(pathPrefix + "BookExp_out.xlsx")
} | explode_data.jsonl/477 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 187
} | [
2830,
3393,
20055,
551,
8033,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
3438,
19412,
7121,
1703,
741,
1903,
3674,
1669,
330,
10541,
16,
698,
197,
322,
53054,
106251,
33983,
9370,
25511,
198,
1166,
4202,
23885,
61680,
11,
330,
32,
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 TestAppSettingsSet(t *testing.T) {
t.Parallel()
handler := fakeHTTPServer{}
server := httptest.NewServer(&handler)
defer server.Close()
deis, err := deis.New(false, server.URL, "abc")
if err != nil {
t.Fatal(err)
}
expected := api.AppSettings{
Owner: "test",
App: "example-go",
Rout... | explode_data.jsonl/13181 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 692
} | [
2830,
3393,
2164,
6086,
1649,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
53326,
1669,
12418,
9230,
5475,
16094,
41057,
1669,
54320,
70334,
7121,
5475,
2099,
17905,
340,
16867,
3538,
10421,
2822,
58351,
285,
11,
1848,
1669,
409... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCloneHash(t *testing.T) {
h1 := crypto.SHA256.New()
h1.Write([]byte("test"))
s1 := h1.Sum(nil)
h2 := cloneHash(h1, crypto.SHA256)
s2 := h2.Sum(nil)
if !bytes.Equal(s1, s2) {
t.Error("cloned hash generated a different sum")
}
} | explode_data.jsonl/36356 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
37677,
6370,
1155,
353,
8840,
836,
8,
341,
9598,
16,
1669,
19028,
808,
17020,
17,
20,
21,
7121,
741,
9598,
16,
4073,
10556,
3782,
445,
1944,
5455,
1903,
16,
1669,
305,
16,
41676,
27907,
340,
9598,
17,
1669,
14715,
6370,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_diffManager_GetChangedFiles_PRDiff(t *testing.T) {
server := httptest.NewServer( // mock server
http.FileServer(http.Dir("../../testutils")), // mock data stored at testutils/testdata
)
defer server.Close()
logger, err := testutils.GetLogger()
if err != nil {
t.Errorf("Can't get logger, received: %s... | explode_data.jsonl/12409 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1095
} | [
2830,
3393,
15850,
2043,
13614,
5389,
10809,
10571,
21751,
1155,
353,
8840,
836,
8,
341,
41057,
1669,
54320,
70334,
7121,
5475,
7,
442,
7860,
3538,
198,
197,
28080,
8576,
5475,
19886,
83757,
36800,
1944,
6031,
35674,
442,
7860,
821,
9768,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStringify(t *testing.T) {
assert := require.New(t)
assert.Nil(Stringify(nil))
assert.Equal([]string{
`0`, `1`, `2`,
}, Stringify([]interface{}{
0, 1, 2,
}))
assert.Equal([]string{
`0.5`, `0.55`, `0.555`, `0.555001`,
}, Stringify([]interface{}{
0.5, 0.55, 0.55500, 0.555001,
}))
assert.Equal... | explode_data.jsonl/45565 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 197
} | [
2830,
3393,
703,
1437,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
1373,
7121,
1155,
692,
6948,
59678,
2242,
1437,
27907,
4390,
6948,
12808,
10556,
917,
515,
197,
197,
63,
15,
7808,
1565,
16,
7808,
1565,
17,
12892,
197,
2137,
923,
1437,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateFailsRecovers(t *testing.T) {
l := loggingtest.New()
defer l.Close()
dc, err := testdataclient.NewDoc(`
foo: Path("/foo") -> setPath("/") -> "https://foo.example.org";
bar: Path("/bar") -> setPath("/") -> "https://bar.example.org";
baz: Path("/baz") -> setPath("/") -> "https://baz.example.org";... | explode_data.jsonl/58587 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 762
} | [
2830,
3393,
4289,
37,
6209,
3820,
8969,
1155,
353,
8840,
836,
8,
341,
8810,
1669,
8392,
1944,
7121,
741,
16867,
326,
10421,
2822,
87249,
11,
1848,
1669,
1273,
691,
2972,
7121,
9550,
61528,
197,
197,
7975,
25,
7933,
4283,
7975,
899,
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... | 9 |
func TestLevelDbConfig(t *testing.T) {
config := new(config.Datastore)
err := json.Unmarshal(defaultConfig, config)
if err != nil {
t.Fatal(err)
}
dir, err := ioutil.TempDir("", "ipfs-datastore-config-test")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(dir) // clean up
spec := make(map[string]interfa... | explode_data.jsonl/27796 | {
"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,
4449,
7994,
2648,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
501,
8754,
3336,
4314,
340,
9859,
1669,
2951,
38097,
18978,
2648,
11,
2193,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
48532,
11,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPostMessageStampRequest_Validate(t *testing.T) {
t.Parallel()
type fields struct {
Count int
}
tests := []struct {
name string
fields fields
wantErr bool
}{
{
"zero count",
fields{Count: 0},
false,
},
{
"negative count",
fields{Count: -1},
true,
},
{
"too large ... | explode_data.jsonl/40156 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 337
} | [
2830,
3393,
4133,
2052,
20906,
1900,
62,
17926,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
13158,
5043,
2036,
341,
197,
197,
2507,
526,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
55276,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCleanupTaskWaitsForStoppedSent(t *testing.T) {
cfg := getTestConfig()
ctrl := gomock.NewController(t)
mockTime := mock_ttime.NewMockTime(ctrl)
mockState := mock_dockerstate.NewMockTaskEngineState(ctrl)
mockClient := mock_dockerapi.NewMockDockerClient(ctrl)
mockImageManager := mock_engine.NewMockImageMana... | explode_data.jsonl/24581 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1063
} | [
2830,
3393,
67335,
6262,
54,
56479,
2461,
59803,
31358,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
633,
2271,
2648,
741,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
77333,
1462,
1669,
7860,
528,
1678,
7121,
11571,
1462,
62100,
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 TestUpdateMultiDatabaseTable(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop database if exists test2")
tk.MustExec("create database test2")
tk.MustExec("create table t(a int, b int generated always as (a+... | explode_data.jsonl/76262 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 171
} | [
2830,
3393,
4289,
20358,
5988,
2556,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
741,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPackets(t *testing.T) {
listener, sConn, cConn := createSocketPair(t)
defer func() {
listener.Close()
sConn.Close()
cConn.Close()
}()
// Verify all packets go through correctly.
// Small one.
data := []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
verifyPacketComms(t, cConn, sConn, data)
// 0 length packe... | explode_data.jsonl/51289 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 371
} | [
2830,
3393,
47,
18382,
1155,
353,
8840,
836,
8,
341,
14440,
798,
11,
274,
9701,
11,
272,
9701,
1669,
1855,
10286,
12443,
1155,
340,
16867,
2915,
368,
341,
197,
14440,
798,
10421,
741,
197,
1903,
9701,
10421,
741,
197,
1444,
9701,
1042... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEveryRuns(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
i := 0
runutil.RunEvery(ctx, 100*time.Millisecond, func() {
i++
})
// Sleep for a bit and ensure the value has increased.
time.Sleep(200 * time.Millisecond)
if i == 0 {
t.Error("Counter failed to increment with tick... | explode_data.jsonl/63816 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
11510,
73920,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
12367,
8230,
1669,
220,
15,
198,
56742,
1314,
16708,
11510,
7502,
11,
220,
16,
15,
15,
77053,
71482,
11,
2915,
368,
341,
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 TestNamespaceRepair(t *testing.T) {
ctrl := xtest.NewController(t)
defer ctrl.Finish()
ns, closer := newTestNamespaceWithIDOpts(t, defaultTestNs1ID,
namespace.NewOptions().SetRepairEnabled(true))
defer closer()
now := xtime.Now()
repairTimeRange := xtime.Range{Start: now, End: now.Add(time.Hour)}
opts :=... | explode_data.jsonl/35364 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 462
} | [
2830,
3393,
22699,
98386,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
856,
1944,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
84041,
11,
12128,
1669,
501,
2271,
22699,
2354,
915,
43451,
1155,
11,
1638,
2271,
47360,
16,
915,
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... | 3 |
func TestVMCStopContainer(t *testing.T) {
testForSkip(t)
var ctxt = context.Background()
c := make(chan struct{})
//creat a StopImageReq obj and send it to VMCProcess
go func() {
defer close(c)
sir := StopImageReq{CCID: ccintf.CCID{ChaincodeSpec: &pb.ChaincodeSpec{ChaincodeId: &pb.ChaincodeID{Name: "simple"... | explode_data.jsonl/74643 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 231
} | [
2830,
3393,
11187,
34,
10674,
4502,
1155,
353,
8840,
836,
8,
341,
18185,
2461,
35134,
1155,
692,
2405,
59162,
284,
2266,
19047,
2822,
1444,
1669,
1281,
35190,
2036,
6257,
692,
197,
322,
94739,
264,
14215,
1906,
27234,
2839,
323,
3624,
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... | 2 |
func TestDelete(t *testing.T) {
fc := &exec.FakeCommander{}
fuc := &exec.FakeUnsuccessfulCommander{}
cases := []struct {
Name string
Group *Group
Want []string
Err bool
Commander exec.CommanderDelegate
}{
{
Name: "Default",
Group: &Group{
Name: "fake-group",
},
Want: ... | explode_data.jsonl/64620 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 456
} | [
2830,
3393,
6435,
1155,
353,
8840,
836,
8,
341,
1166,
66,
1669,
609,
11748,
991,
726,
4062,
261,
16094,
1166,
1754,
1669,
609,
11748,
991,
726,
1806,
30950,
4062,
261,
16094,
1444,
2264,
1669,
3056,
1235,
341,
197,
21297,
414,
914,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.