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 TestDaoReportUsers(t *testing.T) {
var (
c = context.TODO()
ids = []int64{1, 2, 3}
)
convey.Convey("ReportUsers", t, func(ctx convey.C) {
users, userMap, err := d.ReportUsers(c, ids)
ctx.Convey("Then err should be nil.users,userMap should not be nil.", func(ctx convey.C) {
ctx.So(err, convey.Should... | explode_data.jsonl/51295 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 184
} | [
2830,
3393,
12197,
10361,
7137,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
1444,
256,
284,
2266,
90988,
741,
197,
197,
3365,
284,
3056,
396,
21,
19,
90,
16,
11,
220,
17,
11,
220,
18,
532,
197,
340,
37203,
5617,
4801,
5617,
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 Test_ResolveTypes_ObjectField_Fail(t *testing.T) {
data := `
models:
Custom:
field1: NonExisting
`
old, err := unmarshalSpec([]byte(data))
assert.Equal(t, err, nil)
errors := enrichSpec(old)
assert.Equal(t, len(errors), 1)
assert.Equal(t, strings.Contains(errors[0].Message, "NonExisting"), true)
} | explode_data.jsonl/79850 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
62,
56808,
4173,
27839,
1877,
1400,
604,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
22074,
6507,
510,
220,
8406,
510,
262,
2070,
16,
25,
11581,
53067,
198,
3989,
61828,
11,
1848,
1669,
650,
27121,
8327,
10556,
3782,
2592,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_TX_BatchReplace(t *testing.T) {
table := createInitTable()
defer dropTable(table)
gtest.C(t, func(t *gtest.T) {
tx, err := db.Begin()
if err != nil {
gtest.Error(err)
}
if _, err := tx.BatchReplace(table, g.List{
{
"id": 2,
"passport": "USER_2",
"password": "PASS_2... | explode_data.jsonl/41308 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 485
} | [
2830,
3393,
18819,
1668,
754,
23107,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
1855,
3803,
2556,
741,
16867,
5943,
2556,
15761,
692,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
46237,
11,
1848,
1669,
2927,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestCredentialRedaction(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Depends on unimplemented containerd bind-mount support on Windows")
}
t.Parallel()
ctx := namespaces.WithNamespace(context.Background(), "buildkit-test")
tmpdir, err := ioutil.TempDir("", "buildkit-state")
require.NoError(t, e... | explode_data.jsonl/12590 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 271
} | [
2830,
3393,
48265,
6033,
1311,
1155,
353,
8840,
836,
8,
341,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
341,
197,
3244,
57776,
445,
7839,
1412,
389,
650,
54071,
5476,
67,
10719,
59588,
1824,
389,
5515,
1138,
197,
630,
3244,
41288,
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 TestNewBuilder(t *testing.T) {
cd := testClusterDeployment()
c := fakeClient(cd)
controllerName := "test-controller-name"
expected := &builder{
c: c,
cd: cd,
controllerName: controllerName,
urlToUse: activeURL,
}
actual := NewBuilder(c, cd, controllerName)
assert.Equal... | explode_data.jsonl/35042 | {
"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,
3564,
3297,
1155,
353,
8840,
836,
8,
341,
72826,
1669,
1273,
28678,
75286,
741,
1444,
1669,
12418,
2959,
75912,
340,
61615,
675,
1669,
330,
1944,
67245,
11494,
698,
42400,
1669,
609,
17850,
515,
197,
1444,
25,
1060,
272,
345... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSpendableCoinsPeriodicVestingAcc(t *testing.T) {
now := osttime.Now()
endTime := now.Add(24 * time.Hour)
periods := types.Periods{
types.Period{Length: int64(12 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}},
types.Period{Length: int64(6 * 60 * 60), Amo... | explode_data.jsonl/31293 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 639
} | [
2830,
3393,
50,
3740,
480,
69602,
23750,
292,
53,
59855,
14603,
1155,
353,
8840,
836,
8,
341,
80922,
1669,
36896,
1678,
13244,
741,
6246,
1462,
1669,
1431,
1904,
7,
17,
19,
353,
882,
73550,
340,
197,
19304,
82,
1669,
4494,
14834,
3127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWitnessSizes(t *testing.T) {
for _, test := range witnessSizeTests {
test := test
t.Run(test.name, func(t *testing.T) {
size := test.genWitness(t).SerializeSize()
if size != test.expSize {
t.Fatalf("size mismatch, want: %v, got: %v",
test.expSize, size)
}
})
}
} | explode_data.jsonl/45761 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
98413,
34930,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
11298,
1695,
18200,
341,
197,
18185,
1669,
1273,
198,
197,
3244,
16708,
8623,
2644,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
13832,
1669,
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... | 2 |
func TestNewProtobufDataPointWithType(t *testing.T) {
Convey("A nil datapoint value", t, func() {
dp := sfxmodel.DataPoint{}
Convey("should error when converted", func() {
_, err := NewProtobufDataPointWithType(&dp, sfxmodel.MetricType_COUNTER)
So(err, ShouldEqual, errDatapointValueNotSet)
})
Convey("wit... | explode_data.jsonl/81468 | {
"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,
3564,
12423,
18464,
1043,
2609,
73716,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
32,
2092,
61723,
781,
897,
497,
259,
11,
2915,
368,
341,
197,
55256,
1669,
274,
8298,
2528,
3336,
2609,
16094,
197,
93070,
5617,
445,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestJaro(t *testing.T) {
for _, row := range jaro_testdata {
res := Jaro(row[0], row[1])
expected, err := strconv.ParseFloat(row[2], 64)
if err != nil {
t.Error("bad row in test data")
}
if math.Abs(res-expected) > 0.001 {
t.Errorf("Jaro(%q, %q) => %.3f, expected %.3f", row[0], row[1], res, expect... | explode_data.jsonl/58059 | {
"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,
41,
17165,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
2802,
1669,
2088,
502,
17165,
4452,
691,
341,
197,
10202,
1669,
619,
17165,
7835,
58,
15,
1125,
2802,
58,
16,
2546,
197,
42400,
11,
1848,
1669,
33317,
8937,
5442,
7835,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRouterMultiLevelUnmatch(t *testing.T) {
// Create empty handler
h := new(Handler)
// Create empty context
c := new(Context)
c.Params = Params{}
// Create route
r := Route("/a/b/c", h)
// Non-matching routes
rs := []string{"/", "", "/:a/b/c", "/A/B/C", "/some/thing", "some/thing", "/more/levels/to/b... | explode_data.jsonl/35798 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
9523,
20358,
4449,
1806,
6347,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
4287,
7013,
198,
9598,
1669,
501,
7,
3050,
692,
197,
322,
4230,
4287,
2266,
198,
1444,
1669,
501,
14001,
340,
1444,
58268,
284,
34352,
31483,
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 TestGetStorageAccessKeys(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
cloud := &Cloud{}
value := "foo bar"
tests := []struct {
results storage.AccountListKeysResult
expectedKey string
expectErr bool
err error
}{
{storage.AccountListKeysResult{}, "", true, nil}... | explode_data.jsonl/69822 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 544
} | [
2830,
3393,
1949,
5793,
6054,
8850,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
197,
12361,
1669,
609,
16055,
16094,
16309,
1669,
330,
7975,
3619,
1837,
78216,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestCorrelateRecordsForInterNodeDenyFlow(t *testing.T) {
messageChan := make(chan *entities.Message)
input := AggregationInput{
MessageChan: messageChan,
WorkerNum: 2,
CorrelateFields: fields,
}
ap, _ := InitAggregationProcess(input)
// Test the scenario, where src record has egress deny rule
... | explode_data.jsonl/8701 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 485
} | [
2830,
3393,
10580,
3748,
349,
25876,
2461,
3306,
1955,
23619,
88,
18878,
1155,
353,
8840,
836,
8,
341,
24753,
46019,
1669,
1281,
35190,
353,
10499,
8472,
340,
22427,
1669,
4598,
34442,
2505,
515,
197,
46733,
46019,
25,
257,
1943,
46019,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCrConflictMoveAndSetexRemovedFile(t *testing.T) {
test(t,
users("alice", "bob"),
as(alice,
mkdir("a"),
write("a/b", "hello"),
),
as(bob,
disableUpdates(),
),
as(alice,
rm("a/b"),
),
as(bob, noSync(),
rename("a/b", "a/c"),
setex("a/c", true),
reenableUpdates(),
lsdir("a/... | explode_data.jsonl/31374 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 249
} | [
2830,
3393,
16001,
57974,
9860,
3036,
1649,
327,
42642,
1703,
1155,
353,
8840,
836,
8,
341,
18185,
1155,
345,
197,
90896,
445,
63195,
497,
330,
47086,
4461,
197,
60451,
17643,
558,
345,
298,
88650,
445,
64,
4461,
298,
24945,
445,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdate(t *testing.T) {
catalogStore, err := store.Open("catalog_update", store.DefaultOptions())
require.NoError(t, err)
defer os.RemoveAll("catalog_update")
dataStore, err := store.Open("sqldata_update", store.DefaultOptions())
require.NoError(t, err)
defer os.RemoveAll("sqldata_update")
engine, err ... | explode_data.jsonl/64062 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1213
} | [
2830,
3393,
4289,
1155,
353,
8840,
836,
8,
341,
1444,
7750,
6093,
11,
1848,
1669,
3553,
12953,
445,
26539,
8882,
497,
3553,
13275,
3798,
2398,
17957,
35699,
1155,
11,
1848,
340,
16867,
2643,
84427,
445,
26539,
8882,
5130,
8924,
6093,
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 TestTranscodingOGG(t *testing.T) {
var inputPath = "/tmp/ffmpeg/ogg"
var outputPath = "/tmp/ffmpeg/out/ogg.mp4"
trans := new(transcoder.Transcoder)
err := trans.Initialize(inputPath, outputPath)
assert.Nil(t, err)
done := trans.Run(false)
err = <-done
assert.Nil(t, err)
} | explode_data.jsonl/57663 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
3167,
48367,
12223,
38,
1155,
353,
8840,
836,
8,
1476,
2405,
1946,
1820,
284,
3521,
5173,
14,
72422,
14,
16108,
698,
2405,
95017,
284,
3521,
5173,
14,
72422,
48316,
14,
16108,
16870,
19,
1837,
72453,
1669,
501,
33089,
40170,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatchPod(t *testing.T) {
testCases := []struct {
in *api.Pod
fieldSelector fields.Selector
expectMatch bool
}{
{
in: &api.Pod{
Spec: api.PodSpec{NodeName: "nodeA"},
},
fieldSelector: fields.ParseSelectorOrDie("spec.nodeName=nodeA"),
expectMatch: true,
},
{
in: &a... | explode_data.jsonl/34739 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1712
} | [
2830,
3393,
8331,
23527,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
17430,
310,
353,
2068,
88823,
198,
197,
39250,
5877,
5043,
14752,
269,
198,
197,
24952,
8331,
256,
1807,
198,
197,
59403,
197,
197,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestConfigFix(t *testing.T) {
testCases := []struct {
cfg *Config
err error
}{
{cfg: &Config{}, err: ErrIllegalTopic},
{cfg: &Config{MQ: MQConfig{BlobDeleteTopic: "test"}}, err: ErrIllegalTopic},
{cfg: &Config{MQ: MQConfig{BlobDeleteTopic: "test", ShardRepairTopic: "test1"}}, err: ErrIllegalTopic},
{... | explode_data.jsonl/7361 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 353
} | [
2830,
3393,
2648,
25958,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
50286,
353,
2648,
198,
197,
9859,
1465,
198,
197,
59403,
197,
197,
90,
14072,
25,
609,
2648,
22655,
1848,
25,
15495,
33713,
26406,
1583,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKustomize(t *testing.T) {
testCase := &tests.KustomizeTestCase{
Package: "../../../../tests/legacy_kustomizations/knative-eventing-install",
Expected: "test_data/expected",
}
tests.RunTestCase(t, testCase)
} | explode_data.jsonl/49692 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 86
} | [
2830,
3393,
42,
1450,
551,
1155,
353,
8840,
836,
8,
341,
18185,
4207,
1669,
609,
23841,
11352,
1450,
551,
16458,
515,
197,
10025,
1434,
25,
220,
63392,
23841,
14,
39884,
4698,
1450,
8040,
14109,
29738,
39687,
287,
57899,
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 |
func TestEncode(t *testing.T) {
t.Parallel()
b := new(bytes.Buffer)
err := Encode(b, sample(t))
ok(t, err)
equals(t, b.String(), "127.0.0.1 foobar\n192.168.0.1 bazbaz blahbar\nfe80::1%lo0 bazbaz\n")
b.Reset()
err = Encode(b, comment(t))
ok(t, err)
equals(t, b.String(), "# Don't delete this line!\n\n192.168.0.... | explode_data.jsonl/43700 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 168
} | [
2830,
3393,
32535,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2233,
1669,
501,
23158,
22622,
340,
9859,
1669,
56562,
1883,
11,
6077,
1155,
1171,
59268,
1155,
11,
1848,
340,
197,
7176,
1155,
11,
293,
6431,
1507,
330,
16,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBastionAdditionalUserData(t *testing.T) {
runTestAWS(t, "bastionuserdata.example.com", "bastionadditional_user-data", "v1alpha2", true, 1, true, false, nil)
} | explode_data.jsonl/17492 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 65
} | [
2830,
3393,
33,
559,
290,
29019,
39485,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
36136,
1155,
11,
330,
28011,
290,
23496,
7724,
905,
497,
330,
28011,
290,
35499,
3317,
13945,
497,
330,
85,
16,
7141,
17,
497,
830,
11,
220,
16,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestConnectionCreateMany(t *testing.T) {
assert := assert.New(t)
tx, err := Default().Begin()
assert.Nil(err)
defer tx.Rollback()
err = createTable(tx)
assert.Nil(err)
var objects []DatabaseMapped
for x := 0; x < 10; x++ {
objects = append(objects, benchObj{
Name: fmt.Sprintf("test_object_%d", ... | explode_data.jsonl/33845 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 290
} | [
2830,
3393,
4526,
4021,
8441,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
46237,
11,
1848,
1669,
7899,
1005,
11135,
741,
6948,
59678,
3964,
340,
16867,
9854,
88918,
2822,
9859,
284,
1855,
2556,
27301,
340,
6948,
596... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReportWorkflowResource_ScheduledWorkflowIDNotEmpty_NoExperiment_Success(t *testing.T) {
store := NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch())
defer store.Close()
manager := NewResourceManager(store)
job := &api.Job{
Name: "j1",
Enabled: true,
PipelineSpec: &api.PipelineSpec{Wo... | explode_data.jsonl/77056 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 988
} | [
2830,
3393,
10361,
62768,
4783,
1098,
26644,
62768,
915,
27416,
36989,
77780,
87161,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
1532,
52317,
2959,
2043,
2195,
62396,
67811,
7121,
52317,
1462,
2461,
44338,
2398,
16867,
3553,
10421,
741,
9227... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddEndpointsWithUnknownEventKindShouldNotPanic(t *testing.T) {
h, l := newHandler()
h.Handle(resource.Event{
Kind: resource.None,
Entry: entryForEndpoints(serviceName, createTime, "v1"),
})
expectNoNotification(t, l)
} | explode_data.jsonl/37583 | {
"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,
2212,
80786,
2354,
13790,
1556,
10629,
14996,
2623,
47,
31270,
1155,
353,
8840,
836,
8,
341,
9598,
11,
326,
1669,
501,
3050,
2822,
9598,
31421,
23599,
6904,
515,
197,
197,
10629,
25,
220,
5101,
18475,
345,
197,
197,
5874,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateAnnontatedApplication(t *testing.T) {
tests := map[string]struct {
engine chaosTypes.EngineInfo
isErr bool
}{
"Test Positive-1": {
engine: chaosTypes.EngineInfo{
Instance: &v1alpha1.ChaosEngine{
ObjectMeta: metav1.ObjectMeta{
Name: "validate-annotation-p2",
Namespa... | explode_data.jsonl/32126 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1455
} | [
2830,
3393,
17926,
27093,
544,
657,
4988,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
80118,
26915,
4173,
54424,
1731,
198,
197,
19907,
7747,
220,
1807,
198,
197,
59403,
197,
197,
1,
2271,
43903,
12,
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... | 6 |
func TestPluginVolume(t *testing.T) {
lun := 0
vol := &api.Volume{
Name: "vol1",
VolumeSource: api.VolumeSource{
FC: &api.FCVolumeSource{
TargetWWNs: []string{"some_wwn"},
FSType: "ext4",
Lun: &lun,
},
},
}
doTestPlugin(t, volume.NewSpecFromVolume(vol))
} | explode_data.jsonl/12301 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
11546,
18902,
1155,
353,
8840,
836,
8,
341,
8810,
359,
1669,
220,
15,
198,
5195,
337,
1669,
609,
2068,
79106,
515,
197,
21297,
25,
330,
12536,
16,
756,
197,
17446,
4661,
3608,
25,
6330,
79106,
3608,
515,
298,
197,
6754,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatDeterminant(t *testing.T) {
mat1 := NewMatWithSize(101, 101, MatTypeCV32F)
ret := Determinant(mat1)
if ret != 0 {
t.Error("TestMatDeterminant error.")
}
} | explode_data.jsonl/81736 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 71
} | [
2830,
3393,
11575,
92648,
517,
1155,
353,
8840,
836,
8,
341,
59874,
16,
1669,
1532,
11575,
2354,
1695,
7,
16,
15,
16,
11,
220,
16,
15,
16,
11,
6867,
929,
19589,
18,
17,
37,
340,
11262,
1669,
34907,
517,
33397,
16,
340,
743,
2112,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStorageQuota(t *testing.T) {
wf := unmarshalWF(wfWithPVC)
cancel, controller := newController(wf)
defer cancel()
controller.kubeclientset.(*fake.Clientset).BatchV1().(*batchfake.FakeBatchV1).Fake.PrependReactor("create", "persistentvolumeclaims", func(action k8stesting.Action) (bool, runtime.Object, erro... | explode_data.jsonl/71030 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 410
} | [
2830,
3393,
5793,
2183,
6089,
1155,
353,
8840,
836,
8,
341,
6692,
69,
1669,
650,
27121,
32131,
3622,
69,
2354,
47,
11287,
692,
84441,
11,
6461,
1669,
501,
2051,
3622,
69,
340,
16867,
9121,
2822,
61615,
5202,
3760,
2972,
746,
41399,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConcurrentOrderers(t *testing.T) {
// Determine number of orderers to use - environment can override
const numOrderersDefault = 10000
numOrderersEnv := os.Getenv("TEST_MASSIVE_ORDERER_COUNT")
numOrderers, err := strconv.Atoi(numOrderersEnv)
if err != nil {
numOrderers = numOrderersDefault
}
channel, ... | explode_data.jsonl/76246 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
1109,
3231,
4431,
388,
1155,
353,
8840,
836,
8,
341,
197,
322,
29901,
1372,
315,
1973,
388,
311,
990,
481,
4573,
646,
2812,
198,
4777,
1629,
4431,
388,
3675,
284,
220,
16,
15,
15,
15,
15,
198,
22431,
4431,
388,
14359,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFindTeamByName(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
Client := th.BasicClient
Client.Logout()
if _, err := Client.FindTeamByName(th.BasicTeam.Name); err == nil {
t.Fatal("Should have failed when not logged in.")
}
} | explode_data.jsonl/48525 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 94
} | [
2830,
3393,
9885,
14597,
16898,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
71724,
1669,
270,
48868,
2959,
198,
71724,
5247,
411,
2822,
743,
8358,
1848,
1669,
8423,
9998,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConnectivityCheck(t *testing.T) {
// Connectivity is ok when server return 200
server := NewHTTPServerTest(200)
connectivity := CheckConnectivity(server.endpoint)
assert.Equal(t, config.HTTPConnectivitySuccess, connectivity)
server.stop()
// Connectivity is ok when server return 500
server = NewHTTPSer... | explode_data.jsonl/82449 | {
"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,
14611,
1927,
3973,
1155,
353,
8840,
836,
8,
341,
197,
322,
96054,
374,
5394,
979,
3538,
470,
220,
17,
15,
15,
198,
41057,
1669,
1532,
9230,
5475,
2271,
7,
17,
15,
15,
340,
56905,
1927,
1669,
4248,
14611,
1927,
21421,
609... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReverseBool(t *testing.T) {
type args struct {
s []bool
}
tests := []struct {
name string
args args
want []bool
}{
{name: "testcase1", args: args{s: []bool{true, true, false, false, false}}, want: []bool{false, false, false, true, true}},
{name: "testcase2", args: args{s: []bool{}}, want: []boo... | explode_data.jsonl/73909 | {
"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,
45695,
11233,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1903,
3056,
2641,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
3056,
2641,
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... | 2 |
func TestGet_fileSubdir(t *testing.T) {
dst := tempDir(t)
u := testModule("basic//subdir")
if err := Get(dst, u); err != nil {
t.Fatalf("err: %s", err)
}
mainPath := filepath.Join(dst, "sub.tf")
if _, err := os.Stat(mainPath); err != nil {
t.Fatalf("err: %s", err)
}
} | explode_data.jsonl/812 | {
"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,
1949,
2458,
3136,
3741,
1155,
353,
8840,
836,
8,
341,
52051,
1669,
2730,
6184,
1155,
340,
10676,
1669,
1273,
3332,
445,
22342,
322,
1966,
3741,
5130,
743,
1848,
1669,
2126,
30260,
11,
575,
1215,
1848,
961,
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,
1,
1,
1,
1,
1,
1... | 3 |
func TestQueryERC20ToDenom(t *testing.T) {
var (
erc20 = "0xb462864E395d88d6bc7C5dd5F3F5eb4cc2599255"
denom = "uatom"
)
response := types.QueryERC20ToDenomResponse{
Denom: denom,
CosmosOriginated: true,
}
input := CreateTestEnv(t)
ctx := input.Context
input.GravityKeeper.setCosmosOriginatedDen... | explode_data.jsonl/8804 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
2859,
27434,
17,
15,
1249,
23619,
316,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
197,
2962,
17,
15,
284,
330,
15,
7929,
19,
21,
17,
23,
21,
19,
36,
18,
24,
20,
67,
23,
23,
67,
21,
8904,
22,
34,
20,
631,
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 TestThrottledLogger(t *testing.T) {
// Install a fake log func for testing.
log := make(chan string)
infoDepth = func(depth int, args ...interface{}) {
log <- fmt.Sprint(args...)
}
interval := 100 * time.Millisecond
tl := NewThrottledLogger("name", interval)
start := time.Now()
go tl.Infof("test %v", 1... | explode_data.jsonl/28497 | {
"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,
1001,
46689,
832,
7395,
1155,
353,
8840,
836,
8,
341,
197,
322,
19242,
264,
12418,
1487,
2915,
369,
7497,
624,
6725,
1669,
1281,
35190,
914,
340,
27043,
19776,
284,
2915,
53675,
526,
11,
2827,
2503,
4970,
28875,
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 Test_validate_list(t *testing.T) {
should := require.New(t)
schemas, err := ThriftSchemas(`
struct Request {
1: list<string> words;
}
`)
should.Nil(err)
obj := NewObject()
obj.Schema = schemas["Request"]
obj.Set("words", NewList("hello", "world"))
should.Panics(func() {
obj.Set("words", 1)
})
shoul... | explode_data.jsonl/61926 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
42681,
2019,
1155,
353,
8840,
836,
8,
341,
197,
5445,
1669,
1373,
7121,
1155,
340,
1903,
31126,
11,
1848,
1669,
29565,
2085,
50,
31126,
61528,
6472,
6145,
341,
197,
197,
16,
25,
1140,
4947,
29,
4244,
280,
197,
532,
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 TestServer_Request_Reject_Pseudo_ExactlyOne(t *testing.T) {
// 8.1.2.3 Request Pseudo-Header Fields
// "All HTTP/2 requests MUST include exactly one valid value" ...
testRejectRequest(t, func(st *serverTester) {
st.addLogFilter("duplicate pseudo-header")
st.bodylessReq1(":method", "GET", ":method", "POST")
... | explode_data.jsonl/71626 | {
"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,
5475,
44024,
50693,
583,
1088,
21952,
62531,
32739,
3966,
1155,
353,
8840,
836,
8,
341,
197,
322,
220,
23,
13,
16,
13,
17,
13,
18,
6145,
393,
21952,
12,
4047,
24580,
198,
197,
322,
330,
2403,
10130,
14,
17,
7388,
27732,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransportIssue10457(t *testing.T) {
defer afterTest(t) // used to fail in goroutine leak check
ts := httptest.NewServer(HandlerFunc(func(w ResponseWriter, r *Request) {
// Send a response with no body, keep-alive
// (implicit), and then lie and immediately close the
// connection. This forces the Trans... | explode_data.jsonl/4916 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 392
} | [
2830,
3393,
27560,
42006,
16,
15,
19,
20,
22,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
8,
442,
1483,
311,
3690,
304,
45198,
14159,
23352,
1779,
198,
57441,
1669,
54320,
70334,
7121,
5475,
7,
3050,
9626,
18552,
3622,
5949... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInstanceIdentity(t *testing.T) {
imports := make(testImporter)
conf := Config{Importer: imports}
makePkg := func(src string) {
fset := token.NewFileSet()
f, err := parser.ParseFile(fset, "", src, 0)
if err != nil {
t.Fatal(err)
}
name := f.Name.Name
pkg, err := conf.Check(name, fset, []*ast.F... | explode_data.jsonl/55563 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 355
} | [
2830,
3393,
2523,
18558,
1155,
353,
8840,
836,
8,
341,
21918,
82,
1669,
1281,
8623,
77289,
340,
67850,
1669,
5532,
90,
77289,
25,
15202,
532,
77438,
47,
7351,
1669,
2915,
14705,
914,
8,
341,
197,
1166,
746,
1669,
3950,
7121,
1703,
164... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAppend(t *testing.T) {
randomBools := make([]bool, 128)
rng := rand.New(rand.NewSource(1))
for i := 0; i < len(randomBools); i++ {
randomBools[i] = rng.Intn(2) == 1
}
for i := 0; i < len(randomBools)-1; i++ {
a := New(randomBools[0:i]...)
b := New(randomBools[i:]...)
a.Append(b)
if !equal(a... | explode_data.jsonl/67082 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
3393,
23877,
1155,
353,
8840,
836,
8,
341,
83628,
1233,
3069,
1669,
1281,
10556,
2641,
11,
220,
16,
17,
23,
692,
7000,
968,
1669,
10382,
7121,
37595,
7121,
3608,
7,
16,
4390,
2023,
600,
1669,
220,
15,
26,
600,
366,
2422,
25110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTrueVerifier(t *testing.T) {
tests := []struct {
name string
write []byte
wantError bool
}{
{
name: "test okay hash",
write: []byte("hello world"),
wantError: false,
},
{
name: "test wrong hash",
write: []byte("HELLO WORLD"),
wantError: false,
},
{... | explode_data.jsonl/38056 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 351
} | [
2830,
3393,
2514,
82394,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
24945,
257,
3056,
3782,
198,
197,
50780,
1454,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
414,
330,
1944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCase1(t *testing.T) {
var (
input = []int{1, 2, 3, 4}
expected = []int{1, 3, 6, 10}
)
result := runningSum(input)
if !reflect.DeepEqual(result, expected) {
t.Errorf("Running result = %v; \n expected = %v", result, expected)
}
} | explode_data.jsonl/61046 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
30573,
16,
1155,
353,
8840,
836,
8,
1476,
2405,
2399,
197,
22427,
262,
284,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
532,
197,
42400,
284,
3056,
396,
90,
16,
11,
220,
18,
11,
220,
21,
11,
220,
16,
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... | 2 |
func TestDate(t *testing.T) {
d := time.Date(2013, time.August, 27, 22, 25, 11, 0, time.UTC)
if dummys.Call("toUnixTimestamp", d).Int() != int(d.Unix()) {
t.Fail()
}
d2 := js.Global.Get("Date").New(d.UnixNano() / 1000000).Interface().(time.Time)
if !d2.Equal(d) {
t.Fail()
}
} | explode_data.jsonl/56788 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
1916,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
882,
8518,
7,
17,
15,
16,
18,
11,
882,
875,
768,
590,
11,
220,
17,
22,
11,
220,
17,
17,
11,
220,
17,
20,
11,
220,
16,
16,
11,
220,
15,
11,
882,
87069,
340,
743,
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 TestGetEnvOrDefaultGetFromEnv(t *testing.T) {
require.NoError(t, os.Setenv(envKeyName, "VALUE"))
assert.Equal(t, "VALUE", GetEnvOrDefault(envKeyName, "DEFAULT_VALUE"))
require.NoError(t, os.Unsetenv(envKeyName))
} | explode_data.jsonl/78025 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 89
} | [
2830,
3393,
1949,
14359,
14188,
1949,
3830,
14359,
1155,
353,
8840,
836,
8,
341,
17957,
35699,
1155,
11,
2643,
4202,
3160,
16978,
58660,
11,
330,
23832,
5455,
6948,
12808,
1155,
11,
330,
23832,
497,
2126,
14359,
14188,
16978,
58660,
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 |
func TestApiServerLeaseEndpointReconcilerEnabled(t *testing.T) {
testCases := []string{
`
kubernetesVersion: v1.11.3
`,
`
kubernetesVersion: v1.10.2
`}
for _, testCase := range testCases {
confBody := singleAzConfigYaml + testCase
c, _ := ClusterFromBytes([]byte(confBody))
if enabled, err := c.ApiServerLea... | explode_data.jsonl/4381 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
6563,
5475,
2304,
519,
27380,
693,
40446,
5769,
5462,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
917,
515,
197,
197,
3989,
74,
29827,
5637,
25,
348,
16,
13,
16,
16,
13,
18,
198,
12892,
197,
197,
3989,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestMarshalJSON(t *testing.T) {
m := &m1{}
m.F1.Set("f1")
m.F2.Set("")
m.F3.Set(nil)
m.F4.Set(nil)
m.F5.Set("")
m.F9 = make([]string, 0)
m.F10 = []string{"1"}
bs, err := MarshalJSON(m)
if err != nil {
t.Fatalf("unexpected err %v", err)
}
if !bytes.Equal(bs, []byte(`{"f1":"f1","f4":null,"F5":"","F10":... | explode_data.jsonl/4250 | {
"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,
55438,
5370,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
609,
76,
16,
16094,
2109,
991,
16,
4202,
445,
69,
16,
1138,
2109,
991,
17,
4202,
31764,
2109,
991,
18,
4202,
27907,
340,
2109,
991,
19,
4202,
27907,
340,
2109,
991,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpgrade(t *testing.T) {
path := "github.com/hyperledger/fabric/examples/chaincode/go/example02/cmd"
testUpgrade(t, "example02", "0", "example02", "1", path, "", nil, nil, nil)
testUpgrade(t, "example02", "0", "example02", "", path, EmptyVersionErr("example02").Error(), nil, nil, nil)
testUpgrade(t, "examp... | explode_data.jsonl/46557 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2249
} | [
2830,
3393,
43861,
1155,
353,
8840,
836,
8,
341,
26781,
1669,
330,
5204,
905,
7530,
39252,
50704,
6663,
28897,
67020,
14,
8819,
1851,
25525,
65182,
15,
17,
83033,
1837,
18185,
43861,
1155,
11,
330,
8687,
15,
17,
497,
330,
15,
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 TestExtractPartialRead(t *testing.T) {
rc := mutate.Extract(invalidImage{})
if _, err := io.Copy(ioutil.Discard, io.LimitReader(rc, 1)); err != nil {
t.Errorf("Could not read one byte from reader")
}
if err := rc.Close(); err != nil {
t.Errorf("rc.Close: %v", err)
}
} | explode_data.jsonl/3089 | {
"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,
28959,
37314,
4418,
1155,
353,
8840,
836,
8,
341,
30295,
1669,
67182,
5121,
2144,
5900,
1891,
1906,
37790,
743,
8358,
1848,
1669,
6399,
31770,
1956,
30158,
909,
47560,
11,
6399,
1214,
2353,
5062,
35429,
11,
220,
16,
5905,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRunInformersFinished(t *testing.T) {
fi := &fixedInformer{sunk: true}
defer func() {
if !fi.Done() {
t.Fatalf("Test didn't wait for informers to finish")
}
}()
ctx, cancel := context.WithCancel(TestContextWithLogger(t))
t.Cleanup(cancel)
waitInformers, err := RunInformers(ctx.Done(), fi)
if err... | explode_data.jsonl/45301 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 239
} | [
2830,
3393,
6727,
37891,
388,
24890,
1155,
353,
8840,
836,
8,
341,
30839,
1669,
609,
22021,
641,
34527,
84386,
3122,
25,
830,
532,
16867,
2915,
368,
341,
197,
743,
753,
9983,
60422,
368,
341,
298,
3244,
30762,
445,
2271,
3207,
944,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigDecodeBytes(t *testing.T) {
t.Parallel()
// Test with some input
src := []byte("abc")
key := base64.StdEncoding.EncodeToString(src)
result, err := decodeBytes(key)
if err != nil {
t.Fatalf("err: %s", err)
}
if !bytes.Equal(src, result) {
t.Fatalf("bad: %#v", result)
}
// Test with no inp... | explode_data.jsonl/67908 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 198
} | [
2830,
3393,
2648,
32564,
7078,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
322,
3393,
448,
1045,
1946,
198,
41144,
1669,
3056,
3782,
445,
13683,
1138,
23634,
1669,
2331,
21,
19,
36086,
14690,
50217,
5870,
14705,
692,
9559... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInitPipelineOpts_Validate(t *testing.T) {
testCases := map[string]struct {
inProjectEnvs []string
inProjectName string
expectedError error
}{
"invalid project name": {
inProjectName: "",
expectedError: errNoProjectInWorkspace,
},
}
for name, tc := range testCases {
t.Run(name, func(t *t... | explode_data.jsonl/50734 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 310
} | [
2830,
3393,
3803,
34656,
43451,
62,
17926,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
17430,
7849,
1702,
11562,
3056,
917,
198,
197,
17430,
7849,
675,
914,
271,
197,
42400,
1454,
1465,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRecover_startHandlerFunc_GET(t *testing.T) {
t.Parallel()
rec, _, _ := testSetup()
ctx, w, r, _ := testRequest(rec.Authboss, "GET")
if err := rec.startHandlerFunc(ctx, w, r); err != nil {
t.Error("Unexpected error:", err)
}
if w.Code != http.StatusOK {
t.Error("Unexpected status:", w.Code)
}
bo... | explode_data.jsonl/61493 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 262
} | [
2830,
3393,
693,
3688,
4906,
3050,
9626,
12702,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
67904,
11,
8358,
716,
1669,
1273,
21821,
741,
20985,
11,
289,
11,
435,
11,
716,
1669,
1273,
1900,
20635,
25233,
33314,
11,
330,
380... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue30100(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
orgEnable := core.PreparedPlanCacheEnabled()
defer core.SetPreparedPlanCache(orgEnable)
core.SetPreparedPlanCache(true)
se, err := session.CreateSession4TestWithOpt(store, &session.Opt{
PreparedPlanCache: kvcache.NewSim... | explode_data.jsonl/5536 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 493
} | [
2830,
3393,
42006,
18,
15,
16,
15,
15,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
741,
87625,
11084,
1669,
6200,
28770,
7212,
20485,
8233,
5462,
741,
16867,
6200,
4202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnaryClientInterceptor(t *testing.T) {
clientConn, err := grpc.Dial("fake:connection", grpc.WithInsecure())
if err != nil {
t.Fatalf("failed to create client connection: %v", err)
}
defer clientConn.Close()
sr := NewSpanRecorder()
tp := oteltest.NewTracerProvider(oteltest.WithSpanRecorder(sr))
unaryI... | explode_data.jsonl/79674 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3184
} | [
2830,
3393,
94545,
2959,
32786,
1155,
353,
8840,
836,
8,
341,
25291,
9701,
11,
1848,
1669,
47900,
98462,
445,
30570,
25,
7742,
497,
47900,
26124,
641,
25132,
2398,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
16091,
311,
1855,
2943... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMemCache_Delete(t *testing.T) {
assert := assert.New(t)
err := cMem.Set("test", "aaa", time.Millisecond*500)
assert.Nil(err)
cMem.Del("test")
_, err = cMem.Get("test")
assert.True(isNotExits(err))
} | explode_data.jsonl/74755 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
18816,
8233,
57418,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
9859,
1669,
272,
18816,
4202,
445,
1944,
497,
330,
32646,
497,
882,
71482,
9,
20,
15,
15,
340,
6948,
59678,
3964,
340,
1444,
18816,
909,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCommonLogFormatter_Format(t *testing.T) {
clf := CommonLogFormatter{}
testCases := []struct {
name string
data map[string]interface{}
expectedLog string
}{
{
name: "OriginStatus & OriginContentSize are nil",
data: map[string]interface{}{
StartUTC: time.Date(200... | explode_data.jsonl/61894 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1507
} | [
2830,
3393,
10839,
2201,
14183,
72999,
1155,
353,
8840,
836,
8,
341,
39407,
69,
1669,
7718,
2201,
14183,
31483,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
8924,
286,
2415,
14032,
31344,
16094,
197,
42400,
2201,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDefaultExtensionsToIgnore(t *testing.T) {
t.Run("should success get 35 extensions to ignore", func(t *testing.T) {
assert.Len(t, GetDefaultExtensionsToIgnore(), 35)
})
} | explode_data.jsonl/70911 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
1949,
3675,
31282,
1249,
12497,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5445,
2393,
633,
220,
18,
20,
19721,
311,
10034,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6948,
65819,
1155,
11,
2126,
3675,
31282,
1249,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoggingServiceV2WriteLogEntriesError(t *testing.T) {
errCode := codes.Internal
mockLogging.err = grpc.Errorf(errCode, "test error")
var entries []*loggingpb.LogEntry = nil
var request = &loggingpb.WriteLogEntriesRequest{
Entries: entries,
}
c, err := NewClient(context.Background(), clientOpt)
if err... | explode_data.jsonl/77760 | {
"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,
34575,
1860,
53,
17,
7985,
2201,
24533,
1454,
1155,
353,
8840,
836,
8,
341,
9859,
2078,
1669,
13912,
32579,
198,
77333,
34575,
18441,
284,
47900,
13080,
3964,
2078,
11,
330,
1944,
1465,
5130,
2405,
10695,
29838,
25263,
16650,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue29755(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("set tidb_enable_vectorized_expression = on;")
tk.MustQuery("select char(123, NULL, 123)").Check(testkit.Rows("{{"))
tk.MustQuery("select char(NULL... | explode_data.jsonl/65618 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 216
} | [
2830,
3393,
42006,
17,
24,
22,
20,
20,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTeamsService_AddTeamProjectBySlug(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
opt := &TeamProjectOptions{
Permission: String("admin"),
}
wantAcceptHeaders := []string{mediaTypeProjectsPreview}
mux.HandleFunc("/orgs/o/teams/s/projects/1", func(w http.ResponseWriter, r *http.Re... | explode_data.jsonl/4550 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 450
} | [
2830,
3393,
60669,
1860,
21346,
14597,
7849,
1359,
54968,
1155,
353,
8840,
836,
8,
341,
25291,
11,
59807,
11,
8358,
49304,
1669,
6505,
741,
16867,
49304,
2822,
64838,
1669,
609,
14597,
7849,
3798,
515,
197,
197,
14966,
25,
923,
445,
288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddTeamMembersDomainConstrained(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
client := th.SystemAdminClient
team := th.BasicTeam
team.AllowedDomains = "domain1.com, domain2.com"
_, response := client.UpdateTeam(team)
require.Nil(t, response.Error)
// create two users on allowed domai... | explode_data.jsonl/70728 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 662
} | [
2830,
3393,
2212,
14597,
24371,
13636,
1109,
57727,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
25291,
1669,
270,
16620,
7210,
2959,
198,
197,
9196,
1669,
270,
48868,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunInContainerNoSuchPod(t *testing.T) {
fakeCommandRunner := fakeContainerCommandRunner{}
kubelet, _, fakeDocker := makeTestKubelet(t)
fakeDocker.containerList = []docker.APIContainers{}
kubelet.runner = &fakeCommandRunner
podName := "podFoo"
podNamespace := "etcd"
containerName := "containerFoo"
outp... | explode_data.jsonl/2847 | {
"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,
6727,
641,
4502,
65531,
23527,
1155,
353,
8840,
836,
8,
341,
1166,
726,
4062,
19486,
1669,
12418,
4502,
4062,
19486,
16094,
16463,
3760,
1149,
11,
8358,
12418,
35,
13659,
1669,
1281,
2271,
42,
3760,
1149,
1155,
340,
1166,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRoundRobinMsgRouter(t *testing.T) {
for _, tc := range []struct {
partitionCount int
source int64
want []int
}{
{
partitionCount: 8,
source: 9,
want: []int{1, 2, 3, 4, 5, 6, 7, 0, 1},
},
{
partitionCount: 5,
source: 2,
want: ... | explode_data.jsonl/66482 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 382
} | [
2830,
3393,
27497,
76671,
6611,
9523,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
72872,
680,
2507,
526,
198,
197,
47418,
260,
526,
21,
19,
198,
197,
50780,
1843,
3056,
396,
198,
197,
59403,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRuleImpreciseDataType(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := [][]string{
{
`CREATE TABLE tab2 (
p_id BIGINT UNSIGNED NOT NULL,
a_id BIGINT UNSIGNED NOT NULL,
hours float NOT null,
PRIMARY KEY (p_id, a_id)
... | explode_data.jsonl/76783 | {
"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,
11337,
25216,
2758,
1064,
22653,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
52931,
917,
515,
197,
197,
515,
298,
197,
63,
22599,
1436... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteRunningJob(t *testing.T) {
withRepository(func(r *RedisJobRepository) {
job := addLeasedJob(t, r, "queue1", "cluster1")
result, err := r.DeleteJobs([]*api.Job{job})
if err != nil {
t.Fatalf("deleting jobs failed with error %s", err)
}
err, deletionOccurred := result[job]
assert.Nil(t, er... | explode_data.jsonl/32046 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
6435,
18990,
12245,
1155,
353,
8840,
836,
8,
341,
46948,
4624,
18552,
2601,
353,
48137,
12245,
4624,
8,
341,
197,
68577,
1669,
912,
2304,
1475,
12245,
1155,
11,
435,
11,
330,
4584,
16,
497,
330,
18855,
16,
5130,
197,
9559,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAdmin_ExportFile(t *testing.T) {
ts, _, teardown := startupT(t)
defer teardown()
c1 := store.Comment{Text: "test test #1",
Locator: store.Locator{SiteID: "radio-t", URL: "https://radio-t.com/blah1"}}
c2 := store.Comment{Text: "test test #2", ParentID: "p1",
Locator: store.Locator{SiteID: "radio-t", UR... | explode_data.jsonl/51833 | {
"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,
7210,
62,
16894,
1703,
1155,
353,
8840,
836,
8,
341,
57441,
11,
8358,
49304,
1669,
20567,
51,
1155,
340,
16867,
49304,
2822,
1444,
16,
1669,
3553,
56730,
90,
1178,
25,
330,
1944,
1273,
671,
16,
756,
197,
197,
33831,
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 TestNewThrowErrorIfInvalidArgsForFormat(t *testing.T) {
_, err := New(1, "YYYY-MM-DD")
assert.EqualError(t, err, "First argument must be a datetime string")
_, err = New("2018-01-01", 2)
assert.EqualError(t, err, "Second argument must be a format string")
} | explode_data.jsonl/73975 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
3564,
23079,
1454,
2679,
7928,
4117,
2461,
4061,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
1532,
7,
16,
11,
330,
28189,
18506,
40175,
1138,
6948,
12808,
1454,
1155,
11,
1848,
11,
330,
5338,
5693,
1969,
387,
264,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_wrap_int(t *testing.T) {
should := require.New(t)
str, err := MarshalToString(WrapInt64(100))
should.Nil(err)
should.Equal("100", str)
} | explode_data.jsonl/51196 | {
"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,
38550,
4042,
1155,
353,
8840,
836,
8,
341,
197,
5445,
1669,
1373,
7121,
1155,
340,
11355,
11,
1848,
1669,
35667,
5870,
14031,
4611,
1072,
21,
19,
7,
16,
15,
15,
1171,
197,
5445,
59678,
3964,
340,
197,
5445,
12808,
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 |
func TestGetChannelStateNoChannelInBlockchain(t *testing.T) {
stateServiceTest.channelServiceMock.Put(
stateServiceTest.defaultChannelKey,
stateServiceTest.defaultChannelData,
)
stateServiceTest.channelServiceMock.blockchainReader.readChannelFromBlockchain =
func(channelID *big.Int) (*blockchain.MultiPartyEscr... | explode_data.jsonl/6079 | {
"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,
1949,
9629,
1397,
2753,
9629,
641,
98898,
1155,
353,
8840,
836,
8,
341,
24291,
1860,
2271,
16195,
1860,
11571,
39825,
1006,
197,
24291,
1860,
2271,
8764,
9629,
1592,
345,
197,
24291,
1860,
2271,
8764,
9629,
1043,
345,
197,
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 TestInitInsertSql(t *testing.T) {
table := model.SQLTable{
DbName: "hera",
Table: "user_tags",
Types: nil,
PrimaryKey: "",
Columns: []string{"a", "B", "c"},
ColumnsDefaultValue: nil,
PrimaryKeyIndex: 0,
InsertSQL: "",
Qu... | explode_data.jsonl/52694 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 279
} | [
2830,
3393,
3803,
13780,
8269,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
1614,
25095,
2556,
515,
197,
197,
7994,
675,
25,
1060,
330,
1923,
64,
756,
197,
197,
2556,
25,
2290,
330,
872,
16333,
756,
197,
197,
4173,
25,
2290,
2092,
345... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRemoveSpaceManagerByUsername(t *testing.T) {
Convey("Remove manager by username", t, func() {
setup(MockRoute{"DELETE", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/managers", "", "", 200, "", nil}, t)
defer teardown()
c := &Config{
ApiAddress: server.URL,
Token: "foobar",
}
client, e... | explode_data.jsonl/59994 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 257
} | [
2830,
3393,
13021,
9914,
2043,
91519,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
13021,
6645,
553,
5934,
497,
259,
11,
2915,
368,
341,
197,
84571,
66436,
4899,
4913,
14424,
497,
3521,
85,
17,
26734,
2434,
3470,
66,
22,
65,
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 TestArray_Rand(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []interface{}{0, 1, 2, 3, 4, 5, 6}
array1 := garray.NewArrayFrom(a1)
t.Assert(len(array1.Rands(2)), 2)
t.Assert(len(array1.Rands(10)), 10)
t.AssertIN(array1.Rands(1)[0], a1)
})
gtest.C(t, func(t *gtest.T) {
s1 := []interface{}{"a", ... | explode_data.jsonl/13904 | {
"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,
1857,
2568,
437,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11323,
16,
1669,
3056,
4970,
6257,
90,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
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 TestMultiStageDockerBuildWithSecondImageDirty(t *testing.T) {
f := newIBDFixture(t, k8s.EnvGKE)
defer f.TearDown()
manifest := NewSanchoDockerBuildMultiStageManifest(f)
iTargetID1 := manifest.ImageTargets[0].ID()
iTargetID2 := manifest.ImageTargets[1].ID()
result1 := store.NewImageBuildResultSingleRef(iTarg... | explode_data.jsonl/38262 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 446
} | [
2830,
3393,
20358,
19398,
35,
13659,
11066,
2354,
15666,
1906,
36485,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
3256,
5262,
12735,
1155,
11,
595,
23,
82,
81214,
38,
3390,
340,
16867,
282,
836,
682,
4454,
2822,
197,
42315,
1669,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestInvalidateSession(t *testing.T) {
dir1, s1 := testServer(t)
defer os.RemoveAll(dir1)
defer s1.Shutdown()
testrpc.WaitForLeader(t, s1.RPC, "dc1")
// Create a session
state := s1.fsm.State()
if err := state.EnsureNode(1, &structs.Node{Node: "foo", Address: "127.0.0.1"}); err != nil {
t.Fatalf("err: %s... | explode_data.jsonl/35333 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
641,
7067,
5283,
1155,
353,
8840,
836,
8,
341,
48532,
16,
11,
274,
16,
1669,
1273,
5475,
1155,
340,
16867,
2643,
84427,
14161,
16,
340,
16867,
274,
16,
10849,
18452,
2822,
18185,
29414,
99153,
52621,
1155,
11,
274,
16,
201... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTPDUSetUDH(t *testing.T) {
// also tests tpdu.TPDU.UDH
b := tpdu.TPDU{}
udh := b.UDH
if len(udh) != 0 {
t.Errorf("initial udh should be empty")
}
for _, p := range []tpdu.UserDataHeader{
nil,
{tpdu.InformationElement{ID: 1, Data: []byte{5, 6, 7}}},
{tpdu.InformationElement{ID: 1, Data: []byte{1, ... | explode_data.jsonl/28773 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 235
} | [
2830,
3393,
4239,
21547,
1649,
4656,
39,
1155,
353,
8840,
836,
8,
341,
197,
322,
1083,
7032,
18101,
1054,
836,
47,
21547,
13,
4656,
39,
198,
2233,
1669,
18101,
1054,
836,
47,
21547,
16094,
197,
661,
71,
1669,
293,
13,
4656,
39,
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 TestReduce(t *testing.T) {
type args struct {
s []uint64
f func(sum, value uint64) uint64
neutral uint64
}
tests := []struct {
name string
args args
want uint64
}{
{
name: "basic",
args: args{
s: []uint64{1, 3, 4},
f: func(sum, value uint64) uint64 { return s... | explode_data.jsonl/55615 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 334
} | [
2830,
3393,
50325,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1903,
981,
3056,
2496,
21,
19,
198,
197,
1166,
981,
2915,
19713,
11,
897,
2622,
21,
19,
8,
2622,
21,
19,
198,
197,
197,
59568,
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... | 1 |
func TestConversion(t *testing.T) {
actual := []error{fmt.Errorf("B"), fmt.Errorf("A")}
expected := []error{fmt.Errorf("A"), fmt.Errorf("B")}
Sort(actual)
assert.Equal(t, expected, actual)
} | explode_data.jsonl/70054 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
48237,
1155,
353,
8840,
836,
8,
341,
88814,
1669,
3056,
841,
90,
12501,
13080,
445,
33,
3975,
8879,
13080,
445,
32,
42132,
42400,
1669,
3056,
841,
90,
12501,
13080,
445,
32,
3975,
8879,
13080,
445,
33,
42132,
7568,
371,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestCollection_Distinct(t *testing.T) {
mgoClient := Ins()
result, err := mgoClient.C("test").Distinct("name", bson.M{})
if err != nil {
t.Errorf("Distinct error: %s", err)
t.FailNow()
}
t.Log("Distinct ok", result)
} | explode_data.jsonl/30096 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
6482,
1557,
380,
7800,
1155,
353,
8840,
836,
8,
341,
2109,
3346,
2959,
1669,
9726,
741,
9559,
11,
1848,
1669,
296,
3346,
2959,
727,
445,
1944,
1827,
72767,
445,
606,
497,
50980,
1321,
37790,
743,
1848,
961,
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,
1,
1,
1,
1,
1,
1... | 2 |
func TestBuildConfigBinaryWithImageSource(t *testing.T) {
source := &SourceRef{
Name: "binarybuild",
SourceImage: &ImageRef{
Reference: reference.DockerImageReference{
Name: "foo",
Registry: "bar",
},
},
}
build := &BuildRef{Source: source, Binary: true}
config, err := build.BuildConfig()
i... | explode_data.jsonl/17583 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
11066,
2648,
21338,
2354,
1906,
3608,
1155,
353,
8840,
836,
8,
341,
47418,
1669,
609,
3608,
3945,
515,
197,
21297,
25,
330,
25891,
5834,
756,
197,
197,
3608,
1906,
25,
609,
1906,
3945,
515,
298,
197,
8856,
25,
5785,
909,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIoBufferClone(t *testing.T) {
for i := 16; i < 1024+16; i++ {
s := randString(i)
buffer := NewIoBufferString(s)
nb := buffer.Clone()
if nb.String() != s {
t.Errorf("Clone() expect %s but got %s", s, nb.String())
}
}
} | explode_data.jsonl/24058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
42799,
4095,
37677,
1155,
353,
8840,
836,
8,
341,
2023,
600,
1669,
220,
16,
21,
26,
600,
366,
220,
16,
15,
17,
19,
10,
16,
21,
26,
600,
1027,
341,
197,
1903,
1669,
10382,
703,
1956,
340,
197,
31122,
1669,
1532,
42799,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAPI_AuthorizeUser(t *testing.T) {
a := apiWithTempDB(t)
_, mock := tconf.MockedProvider(t, a.config, "")
a.ext.UseProviders(mock)
// no token
_, err := a.AuthorizeUser(nil, "", nil)
assert.Error(t, err)
// bad token
_, err = a.AuthorizeUser(nil, "bad", nil)
assert.Error(t, err)
// bad provider
at, e... | explode_data.jsonl/75407 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 632
} | [
2830,
3393,
7082,
1566,
1553,
551,
1474,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
6330,
2354,
12151,
3506,
1155,
340,
197,
6878,
7860,
1669,
259,
6135,
24664,
291,
5179,
1155,
11,
264,
5423,
11,
14676,
11323,
9220,
9046,
37351,
30389,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateCapacityAllocatable(t *testing.T) {
socketDir, socketName, _, err := tmpSocketDir()
topologyStore := topologymanager.NewFakeManager()
require.NoError(t, err)
defer os.RemoveAll(socketDir)
testManager, err := newManagerImpl(socketName, nil, topologyStore)
as := assert.New(t)
as.NotNil(testManager)
... | explode_data.jsonl/82143 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2024
} | [
2830,
3393,
4289,
29392,
25154,
15086,
1155,
353,
8840,
836,
8,
341,
58279,
6184,
11,
7575,
675,
11,
8358,
1848,
1669,
4174,
10286,
6184,
741,
42118,
2449,
6093,
1669,
44882,
13297,
7121,
52317,
2043,
741,
17957,
35699,
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 Test_ParseIncludeMatchingRule_EnvVar(t *testing.T) {
os.Setenv("NRIA_INCLUDE_MATCHING_METRICS", "process.name:\n - regex \"kube*\" \n")
defer os.Unsetenv("NRIA_INCLUDE_MATCHING_METRICS")
configStr := "license_key: abc123"
f, err := ioutil.TempFile("", "yaml_config_test")
assert.NoError(t, err)
f.WriteString... | explode_data.jsonl/22929 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 226
} | [
2830,
3393,
77337,
22283,
64430,
11337,
62,
14359,
3962,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
45,
78263,
48081,
40824,
1718,
33387,
84172,
497,
330,
4630,
2644,
7190,
77,
481,
20180,
7245,
97717,
9,
2105,
1124,
77,
1138... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPrincipalCombined(t *testing.T) {
msp1, err := setup("testdata/idemix/MSP1OU1", "MSP1OU1")
assert.NoError(t, err)
id1, err := getDefaultSigner(msp1)
assert.NoError(t, err)
ou := &msp.OrganizationUnit{
OrganizationalUnitIdentifier: id1.GetOrganizationalUnits()[0].OrganizationalUnitIdentifier,
MspIden... | explode_data.jsonl/46053 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 534
} | [
2830,
3393,
31771,
94268,
1155,
353,
8840,
836,
8,
341,
47691,
79,
16,
11,
1848,
1669,
6505,
445,
92425,
38146,
336,
941,
10270,
4592,
16,
11922,
16,
497,
330,
44,
4592,
16,
11922,
16,
1138,
6948,
35699,
1155,
11,
1848,
692,
15710,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetClientTLSConfigInvalidArgs(t *testing.T) {
// 1.
cfg := &ClientTLSConfig{
CertFiles: []string{"root.pem"},
Client: KeyCertFiles{
KeyFile: "no_tls_client-key.pem",
CertFile: "no_tls_client-cert.pem",
},
}
_, err := GetClientTLSConfig(cfg, nil)
assert.Error(t, err)
assert.Contains(t, err.Er... | explode_data.jsonl/43279 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 705
} | [
2830,
3393,
1949,
2959,
45439,
2648,
7928,
4117,
1155,
353,
8840,
836,
8,
341,
197,
322,
220,
16,
624,
50286,
1669,
609,
2959,
45439,
2648,
515,
197,
6258,
529,
10809,
25,
3056,
917,
4913,
2888,
49373,
7115,
197,
71724,
25,
5309,
3693... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_perEncodingTestList2(t *testing.T) {
testList21, err := createTestList2Msg0Items()
assert.NilError(t, err, "Error creating TestList2 PDU")
per, err := PerEncodeTestList2(testList21)
assert.NilError(t, err)
t.Logf("TestList2 PER\n%v", hex.Dump(per))
// Generating APER bytes with Go APER lib
perNew, e... | explode_data.jsonl/7757 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 652
} | [
2830,
3393,
5678,
14690,
2271,
852,
17,
1155,
353,
8840,
836,
8,
1476,
18185,
852,
17,
16,
11,
1848,
1669,
1855,
2271,
852,
17,
6611,
15,
4353,
741,
6948,
59678,
1454,
1155,
11,
1848,
11,
330,
1454,
6825,
3393,
852,
17,
393,
21547,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKillContainerInPod(t *testing.T) {
manager, fakeDocker := newTestDockerManager()
pod := makePod("qux", nil)
containers := []*FakeContainer{
{
ID: "1111",
Name: "/k8s_foo_qux_new_1234_42",
},
{
ID: "2222",
Name: "/k8s_bar_qux_new_1234_42",
},
}
containerToKill := containers[0]
con... | explode_data.jsonl/31157 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 367
} | [
2830,
3393,
53734,
4502,
641,
23527,
1155,
353,
8840,
836,
8,
341,
92272,
11,
12418,
35,
13659,
1669,
501,
2271,
35,
13659,
2043,
2822,
3223,
347,
1669,
1281,
23527,
445,
446,
87,
497,
2092,
340,
197,
39399,
1669,
29838,
52317,
4502,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_ObjectTracker_TryCancelExpect_CancelBeforeExpected(t *testing.T) {
g := gomega.NewWithT(t)
ot := newObjTracker(schema.GroupVersionKind{}, func() objData {
return objData{retries: 2}
})
ct := makeCT("test-template")
// TryCancelExpect calls should be tracked, even if an object hasn't been Expected yet... | explode_data.jsonl/52326 | {
"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,
27839,
31133,
1139,
884,
9269,
17536,
97485,
10227,
18896,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
2354,
51,
1155,
340,
197,
354,
1669,
74259,
31133,
42735,
5407,
5637,
10629,
22655,
2915,
368,
2839,
1043,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestArray_Shuffle(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []interface{}{0, 1, 2, 3, 4, 5, 6}
array1 := garray.NewArrayFrom(a1)
t.Assert(array1.Shuffle().Len(), 7)
})
} | explode_data.jsonl/13905 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
1857,
36578,
13208,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11323,
16,
1669,
3056,
4970,
6257,
90,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
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 TestTagDefault2(t *testing.T) {
assert.NoError(t, PrepareEngine())
type DefaultStruct2 struct {
Id int64
Name string
}
assertSync(t, new(DefaultStruct2))
tables, err := testEngine.DBMetas()
assert.NoError(t, err)
var defaultVal string
var isDefaultExist bool
tableName := testEngine.GetColumnMapp... | explode_data.jsonl/19211 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 253
} | [
2830,
3393,
5668,
3675,
17,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
4571,
12367,
13158,
7899,
9422,
17,
2036,
341,
197,
67211,
256,
526,
21,
19,
198,
197,
21297,
914,
198,
197,
630,
6948,
12154,
1155,
11,
501,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLLRBTreeReset(t *testing.T) {
context := &commonLLRBTreeTestContextStruct{t: t}
context.tree = NewLLRBTree(CompareInt, context)
context.tree.Reset()
} | explode_data.jsonl/46751 | {
"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,
4086,
29259,
6533,
14828,
1155,
353,
8840,
836,
8,
341,
28413,
1669,
609,
5464,
4086,
29259,
6533,
2271,
1972,
9422,
90,
83,
25,
259,
532,
28413,
25728,
284,
1532,
4086,
29259,
6533,
7,
27374,
1072,
11,
2266,
340,
28413,
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 |
func TestSyncBlockVolumeDisabled(t *testing.T) {
modeBlock := v1.PersistentVolumeBlock
modeFile := v1.PersistentVolumeFilesystem
// All of these should bind as feature set is not enabled for BlockVolume
// meaning volumeMode will be ignored and dropped
tests := []controllerTest{
{
// syncVolume binds a reques... | explode_data.jsonl/28996 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1457
} | [
2830,
3393,
12154,
4713,
18902,
25907,
1155,
353,
8840,
836,
8,
341,
60247,
4713,
1669,
348,
16,
61655,
18902,
4713,
198,
60247,
1703,
1669,
348,
16,
61655,
18902,
1703,
8948,
198,
197,
322,
2009,
315,
1493,
1265,
10719,
438,
4565,
738,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetBlobStorageMetaData(t *testing.T) {
t.Run("Nothing at all passed", func(t *testing.T) {
m := make(map[string]string)
_, err := getBlobStorageMetadata(m)
assert.NotNil(t, err)
})
t.Run("All parameters passed and parsed", func(t *testing.T) {
m := make(map[string]string)
m["accountName"] = "acc... | explode_data.jsonl/24156 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 242
} | [
2830,
3393,
1949,
37985,
5793,
37307,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
23780,
518,
678,
5823,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
2109,
1669,
1281,
9147,
14032,
30953,
340,
197,
197,
6878,
1848,
1669,
633,
379... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_limitClock(t *testing.T) {
debug("test")
lim := newLimiter(1 * time.Second)
tests := []struct {
name string
limit *simpleRateLimit
}{
{"", lim},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Logf("Number of running go routines %v: %v", "before", runtime.NumGoroutine())
... | explode_data.jsonl/18853 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 215
} | [
2830,
3393,
14763,
26104,
1155,
353,
8840,
836,
8,
341,
39730,
445,
1944,
1138,
197,
4659,
1669,
501,
43,
17700,
7,
16,
353,
882,
32435,
340,
78216,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
8810,
2353,
353,
22944,
11564,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOpen_ReturnsError_WithBadArgs(t *testing.T) {
stringRef := "foo"
testCases := []interface{}{42, time.Now(), &stringRef}
for _, tc := range testCases {
t.Run(fmt.Sprintf("%v", tc), func(t *testing.T) {
_, err := gorm.Open("postgresql", tc)
if err == nil {
t.Error("Should got error with invalid da... | explode_data.jsonl/28033 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 204
} | [
2830,
3393,
5002,
53316,
82,
1454,
62,
2354,
17082,
4117,
1155,
353,
8840,
836,
8,
341,
11357,
3945,
1669,
330,
7975,
698,
18185,
37302,
1669,
3056,
4970,
6257,
90,
19,
17,
11,
882,
13244,
1507,
609,
917,
3945,
532,
2023,
8358,
17130,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInitializeWallet(t *testing.T) {
rand.Seed(time.Now().UnixNano())
userID := rand.Int()
addr := test.RandServerAddress(t)
err := Create(addr, userID)
require.NoError(t, err)
err = UnloadWallet(addr, userID)
require.NoError(t, err)
err = Create(addr, userID)
require.NoError(t, err)
} | explode_data.jsonl/1639 | {
"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,
9928,
38259,
1155,
353,
8840,
836,
8,
341,
7000,
437,
5732,
291,
9730,
13244,
1005,
55832,
83819,
2398,
19060,
915,
1669,
10382,
7371,
741,
53183,
1669,
1273,
2013,
437,
5475,
4286,
1155,
692,
9859,
1669,
4230,
24497,
11,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientDNSCertificate(t *testing.T) {
inputPath := "dnsNameClientCert.pem"
expected := lint.NA
out := test.TestLint("e_dnsname_bad_character_in_label", inputPath)
if out.Status != expected {
t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status)
}
} | explode_data.jsonl/47144 | {
"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,
2959,
61088,
33202,
1155,
353,
8840,
836,
8,
341,
22427,
1820,
1669,
330,
45226,
675,
2959,
36934,
49373,
698,
42400,
1669,
57920,
2067,
32,
198,
13967,
1669,
1273,
8787,
47556,
445,
68,
71125,
606,
34199,
40988,
1243,
6106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileExistingFiles(t *testing.T) {
fh1 := createFile()
defer os.Remove(fh1.Name())
fh2 := createFile()
defer os.Remove(fh2.Name())
fh3 := createFile()
defer os.Remove(fh3.Name())
s, _ := serializers.NewCirconusSerializer(time.Millisecond)
f := File{
Files: []string{fh1.Name(), fh2.Name(), fh3.Na... | explode_data.jsonl/3857 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 281
} | [
2830,
3393,
1703,
53067,
10809,
1155,
353,
8840,
836,
8,
341,
1166,
71,
16,
1669,
1855,
1703,
741,
16867,
2643,
13270,
89148,
16,
2967,
2398,
1166,
71,
17,
1669,
1855,
1703,
741,
16867,
2643,
13270,
89148,
17,
2967,
2398,
1166,
71,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetJobConfigInvalidResponse(t *testing.T) {
httpmock.Activate()
defer httpmock.DeactivateAndReset()
ctx := context.Background()
responder, _ := httpmock.NewJsonResponder(200, invalidTestResponse)
httpmock.RegisterResponder("GET", fakeJobConfigURL, responder)
client := getTestJobManagerClient()
resp, er... | explode_data.jsonl/32357 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
1949,
12245,
2648,
7928,
2582,
1155,
353,
8840,
836,
8,
341,
28080,
16712,
14140,
731,
741,
16867,
1758,
16712,
8934,
16856,
3036,
14828,
741,
20985,
1669,
2266,
19047,
741,
10202,
20328,
11,
716,
1669,
1758,
16712,
7121,
5014... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPullImages(t *testing.T) {
tests := map[string]struct {
client docker.Docker
wantErrorCount int
}{
"simple": {
client: FakeDockerClient{
imageExists: false,
pullFails: false,
},
wantErrorCount: 0,
},
"image exists": {
client: FakeDockerClient{
imageExists: true,
... | explode_data.jsonl/61547 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 370
} | [
2830,
3393,
36068,
14228,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
25291,
260,
26588,
909,
13659,
198,
197,
50780,
1454,
2507,
526,
198,
197,
59403,
197,
197,
1,
22944,
788,
341,
298,
25291,
25,
3696... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRailsFKUsage(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec(`CREATE TABLE author_addresses (
id bigint(20) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4`)
tk.MustEx... | explode_data.jsonl/65600 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 615
} | [
2830,
3393,
52490,
26998,
14783,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50463,
10216... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.