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 Test_IntStrMap_Iterator(t *testing.T) {
expect := map[int]string{1: "a", 2: "b"}
m := gmap.NewIntStrMapFrom(expect)
m.Iterator(func(k int, v string) bool {
gtest.Assert(expect[k], v)
return true
})
// 断言返回值对遍历控制
i := 0
j := 0
m.Iterator(func(k int, v string) bool {
i++
return true
})
m.Iterator(f... | explode_data.jsonl/7642 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 214
} | [
2830,
3393,
32054,
2580,
2227,
7959,
465,
850,
1155,
353,
8840,
836,
8,
341,
24952,
1669,
2415,
18640,
30953,
90,
16,
25,
330,
64,
497,
220,
17,
25,
330,
65,
16707,
2109,
1669,
342,
2186,
7121,
1072,
2580,
2227,
3830,
89443,
340,
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 TestBuildTrafficConfiguration_NotRoutableConfiguration(t *testing.T) {
expected := &Config{
Targets: map[string]RevisionTargets{},
Configurations: map[string]*v1.Configuration{unreadyConfig.Name: unreadyConfig},
Revisions: map[string]*v1.Revision{},
}
expectedErr := errUnreadyConfiguration(unr... | explode_data.jsonl/17617 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 308
} | [
2830,
3393,
11066,
87229,
7688,
60816,
49,
411,
480,
7688,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
609,
2648,
515,
197,
197,
49030,
25,
286,
2415,
14032,
60,
33602,
49030,
38837,
197,
66156,
21449,
25,
2415,
14032,
8465,
85,
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... | 4 |
func TestConcurrentUsage(t *testing.T) {
originalTO := dsdk.RetryTimeout
dsdk.RetryTimeout = int64(5) // lower the retry timeout so any test failures that result in a retry loop don't take 5 minutes
defer func() { dsdk.RetryTimeout = originalTO }()
gock.New("http://127.0.0.1:7717").
Put("/v1/login").
Persist().... | explode_data.jsonl/19682 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 718
} | [
2830,
3393,
1109,
3231,
14783,
1155,
353,
8840,
836,
8,
341,
197,
9889,
5207,
1669,
11472,
7584,
2013,
15149,
7636,
198,
2698,
51295,
2013,
15149,
7636,
284,
526,
21,
19,
7,
20,
8,
442,
4722,
279,
22683,
9632,
773,
894,
1273,
27850,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequired(t *testing.T) {
assert := assert.New(t)
type User struct {
FirstName *string `required:"true"`
LastName *string `required:"false"`
Nickname string `required:"true"`
Age *int64 `required:"True"`
}
assert.EqualError(
v.Validate(User{}, valis.EachFields(tagrule.Required)),
"(r... | explode_data.jsonl/17246 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
8164,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
13158,
2657,
2036,
341,
197,
197,
26584,
353,
917,
1565,
6279,
2974,
1866,
8805,
197,
197,
27920,
220,
353,
917,
1565,
6279,
2974,
3849,
8805,
197,
183... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImageNameDigestFile(t *testing.T) {
image, err := random.Image(1024, 4)
if err != nil {
t.Fatalf("could not create image: %s", err)
}
digest, err := image.Digest()
if err != nil {
t.Fatalf("could not get image digest: %s", err)
}
opts := config.KanikoOptions{
NoPush: true,
Destina... | explode_data.jsonl/14803 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 317
} | [
2830,
3393,
1906,
675,
45217,
1703,
1155,
353,
8840,
836,
8,
341,
31426,
11,
1848,
1669,
4194,
7528,
7,
16,
15,
17,
19,
11,
220,
19,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
28077,
537,
1855,
2168,
25,
1018,
82,
497,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestDeviceService_Get_UUID(t *testing.T) {
// Given
client, mux, cleanup := newFixture()
defer cleanup()
uuid := "123456789123456789"
mux.HandleFunc("/"+deviceBasePath, func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodGet)
expected := "%24filter=uuid+eq+%27123456789123456789%27"
... | explode_data.jsonl/46816 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1376
} | [
2830,
3393,
6985,
1860,
13614,
57499,
1155,
353,
8840,
836,
8,
341,
197,
322,
16246,
198,
25291,
11,
59807,
11,
21290,
1669,
501,
18930,
741,
16867,
21290,
741,
10676,
2423,
1669,
330,
16,
17,
18,
19,
20,
21,
22,
23,
24,
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... | 2 |
func TestEmitNewValidBlockEventOnCommitWithoutBlock(t *testing.T) {
cs1, vss := randState(4)
vs2, vs3, vs4 := vss[1], vss[2], vss[3]
height, round := cs1.Height, 1
incrementRound(vs2, vs3, vs4)
partSize := types.BlockPartSizeBytes
newRoundCh := subscribe(cs1.eventBus, types.EventQueryNewRound)
validBlockCh :=... | explode_data.jsonl/81660 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 380
} | [
2830,
3393,
36,
1763,
3564,
4088,
4713,
1556,
1925,
33441,
26040,
4713,
1155,
353,
8840,
836,
8,
341,
71899,
16,
11,
348,
778,
1669,
10382,
1397,
7,
19,
340,
5195,
82,
17,
11,
6165,
18,
11,
6165,
19,
1669,
348,
778,
58,
16,
1125,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProcessCookieRefreshNotSet(t *testing.T) {
pcTest, err := NewProcessCookieTestWithOptionsModifiers(func(opts *options.Options) {
opts.Cookie.Expire = time.Duration(23) * time.Hour
})
if err != nil {
t.Fatal(err)
}
reference := time.Now().Add(time.Duration(-2) * time.Hour)
startSession := &sessions.... | explode_data.jsonl/36398 | {
"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,
7423,
20616,
14567,
2623,
1649,
1155,
353,
8840,
836,
8,
341,
82013,
2271,
11,
1848,
1669,
1532,
7423,
20616,
2271,
74238,
66937,
18552,
30885,
353,
2875,
22179,
8,
341,
197,
64734,
82918,
5121,
22922,
284,
882,
33795,
7,
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 TestParseInterface(t *testing.T) {
t.Parallel()
for _, kind := range common.CompositeKindsWithFieldsAndFunctions {
actual, err := ParseProgram(fmt.Sprintf(`
%s interface Test {
foo: Int
init(foo: Int)
fun getFoo(): Int
}
`, kind.K... | explode_data.jsonl/35978 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2003
} | [
2830,
3393,
14463,
5051,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
2023,
8358,
3093,
1669,
2088,
4185,
2961,
13607,
42,
8673,
2354,
8941,
3036,
25207,
341,
197,
88814,
11,
1848,
1669,
14775,
10690,
28197,
17305,
61528,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestExtensionsList(t *testing.T) {
client, err := clients.NewIdentityV2Client()
if err != nil {
t.Fatalf("Unable to create an identity client: %v", err)
}
allPages, err := extensions.List(client).AllPages()
if err != nil {
t.Fatalf("Unable to list extensions: %v", err)
}
allExtensions, err := extensio... | explode_data.jsonl/18362 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
31282,
852,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
8239,
7121,
18558,
53,
17,
2959,
741,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
17075,
311,
1855,
458,
9569,
2943,
25,
1018,
85,
497,
1848,
340,
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... | 5 |
func TestRecorder_Reset(t *testing.T) {
meta := map[string]interface{}{
"test": "meta",
}
rec := NewTestRecorder().
AddTitle("title").
AddSubTitle("subTitle").
AddMeta(meta).
AddMessageRequest(MessageRequest{})
rec.Reset()
assert.Equal(t, &Recorder{}, rec)
} | explode_data.jsonl/76384 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
47023,
67771,
1155,
353,
8840,
836,
8,
341,
84004,
1669,
2415,
14032,
31344,
67066,
197,
197,
1,
1944,
788,
330,
5490,
756,
197,
532,
67904,
1669,
1532,
2271,
47023,
25829,
197,
37972,
3851,
445,
2102,
38609,
197,
37972,
313... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTxBuilder(t *testing.T) {
_, pubkey, addr := testdata.KeyTestPubAddr()
marshaler := codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
txBuilder := newBuilder(nil)
memo := "sometestmemo"
msgs := []sdk.Msg{testdata.NewTestMsg(addr)}
accSeq := uint64(2) // Arbitrary account sequence
any, err := code... | explode_data.jsonl/2443 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1317
} | [
2830,
3393,
31584,
3297,
1155,
353,
8840,
836,
8,
341,
197,
6878,
95116,
11,
10789,
1669,
1273,
691,
9610,
2271,
29162,
13986,
2822,
2109,
28423,
261,
1669,
34647,
7121,
31549,
36913,
1337,
347,
439,
1804,
7121,
5051,
15603,
2398,
46237,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewQuerier(t *testing.T) {
input := CreateTestInput(t)
querier := NewQuerier(input.OracleKeeper)
query := abci.RequestQuery{
Path: "",
Data: []byte{},
}
_, err := querier(input.Ctx, []string{types.QueryParameters}, query)
require.NoError(t, err)
} | explode_data.jsonl/47464 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
3564,
2183,
261,
1268,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
4230,
2271,
2505,
1155,
692,
197,
15959,
1268,
1669,
1532,
2183,
261,
1268,
5384,
13,
48663,
77233,
692,
27274,
1669,
668,
5855,
9659,
2859,
515,
197,
69640,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHistogramHook(t *testing.T) {
var gotname string
var gotv *Histogram
clear()
Register(func(name string, v expvar.Var) {
gotname = name
gotv = v.(*Histogram)
})
name := "hist2"
v := NewHistogram(name, "help", []int64{1})
if gotname != name {
t.Errorf("got %v; want %v", gotname, name)
}
if gotv ... | explode_data.jsonl/19370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
77210,
31679,
1155,
353,
8840,
836,
8,
341,
2405,
2684,
606,
914,
198,
2405,
2684,
85,
353,
77210,
198,
40408,
741,
79096,
18552,
3153,
914,
11,
348,
1343,
947,
87968,
8,
341,
197,
3174,
354,
606,
284,
829,
198,
197,
317... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewFrameworkErrors(t *testing.T) {
tests := []struct {
name string
plugins *config.Plugins
pluginCfg []config.PluginConfig
wantErr string
}{
{
name: "duplicate plugin name",
plugins: &config.Plugins{
PreFilter: config.PluginSet{
Enabled: []config.Plugin{
{Name: duplica... | explode_data.jsonl/35738 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 505
} | [
2830,
3393,
3564,
14837,
13877,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
197,
18716,
256,
353,
1676,
21368,
6840,
198,
197,
197,
9138,
42467,
3056,
1676,
64378,
2648,
198,
197,
50780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNoServe(t *testing.T) {
tests := []testRun{{
Name: "file",
URL: remoteURL + "file.txt",
Status: http.StatusNotFound,
Expected: "404 page not found\n",
}, {
Name: "dir",
URL: remoteURL + "dir/",
Status: http.StatusNotFound,
Expected: "404 page not found\n",
}}
opt := ne... | explode_data.jsonl/12968 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
2753,
60421,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1944,
6727,
90,
515,
197,
21297,
25,
257,
330,
1192,
756,
197,
79055,
25,
414,
8699,
3144,
488,
330,
1192,
3909,
756,
197,
58321,
25,
256,
1758,
10538,
10372,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDependencyMockOutputMergeWithStateDefault(t *testing.T) {
t.Parallel()
cleanupTerraformFolder(t, TEST_FIXTURE_GET_OUTPUT)
tmpEnvPath := copyEnvironment(t, TEST_FIXTURE_GET_OUTPUT)
rootPath := util.JoinPath(tmpEnvPath, TEST_FIXTURE_GET_OUTPUT, "mock-outputs-merge-with-state", "merge-with-state-default", "l... | explode_data.jsonl/10134 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 510
} | [
2830,
3393,
36387,
11571,
5097,
52096,
2354,
1397,
3675,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
60639,
51,
13886,
627,
13682,
1155,
11,
13602,
42635,
41486,
12702,
23981,
340,
20082,
14359,
1820,
1669,
2975,
12723,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStringsNotFound(t *testing.T) {
assert := assert.New(t)
v := "quux"
a := []string{"bar", "foo", "bazz"}
assert.Equal(-1, slices.IndexOf(v, a))
} | explode_data.jsonl/18819 | {
"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,
20859,
10372,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
5195,
1669,
330,
446,
2200,
698,
11323,
1669,
3056,
917,
4913,
2257,
497,
330,
7975,
497,
330,
65,
9802,
63159,
6948,
12808,
4080,
16,
11,
3425... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequiredWith(t *testing.T) {
type Inner struct {
Field *string
}
fieldVal := "test"
test := struct {
Inner *Inner
FieldE string `validate:"omitempty" json:"field_e"`
FieldER string `validate:"required_with=FieldE" json:"field_er"`
Field1 string `validate:"omi... | explode_data.jsonl/77367 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 906
} | [
2830,
3393,
8164,
2354,
1155,
353,
8840,
836,
8,
341,
13158,
36356,
2036,
341,
197,
94478,
353,
917,
198,
197,
630,
39250,
2208,
1669,
330,
1944,
698,
18185,
1669,
2036,
341,
197,
197,
31597,
256,
353,
31597,
198,
197,
94478,
36,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPlaceContainerCPU(t *testing.T) {
s := &BinPackingPlacementStrategy{}
nodes := []*cluster.Node{}
for i := 0; i < 2; i++ {
nodes = append(nodes, createNode(fmt.Sprintf("node-%d", i), 1, 2))
}
// add 1 container 1CPU
config := createConfig(0, 1)
node1, err := s.PlaceContainer(config, nodes)
assert.No... | explode_data.jsonl/49365 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 331
} | [
2830,
3393,
17371,
4502,
31615,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
609,
28794,
47,
8985,
28237,
19816,
31483,
79756,
1669,
29838,
18855,
21714,
16094,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
17,
26,
600,
1027,
341,
197,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLedDriver(t *testing.T) {
var err interface{}
d := initTestLedDriver(newGpioTestAdaptor())
gobottest.Assert(t, d.Pin(), "1")
gobottest.Refute(t, d.Connection(), nil)
testAdaptorDigitalWrite = func() (err error) {
return errors.New("write error")
}
testAdaptorPwmWrite = func() (err error) {
return... | explode_data.jsonl/55077 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 283
} | [
2830,
3393,
60850,
11349,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
3749,
31483,
2698,
1669,
2930,
2271,
60850,
11349,
1755,
38,
11917,
2271,
2589,
32657,
12367,
3174,
674,
1716,
477,
11711,
1155,
11,
294,
82939,
1507,
330,
16,
1138,
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 TestReceive_2(t *testing.T) {
_, teardown := setupIpTest(t)
defer teardown()
// invalid packet length (packet length is less than 20bytes)
dev := createTapDevice()
want := psErr.InvalidPacketLength
got := Receive([]byte{}, dev)
if got != want {
t.Errorf("Receive() = %s; want %s", got, want)
}
// inval... | explode_data.jsonl/8507 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 888
} | [
2830,
3393,
14742,
62,
17,
1155,
353,
8840,
836,
8,
341,
197,
6878,
49304,
1669,
6505,
23378,
2271,
1155,
340,
16867,
49304,
2822,
197,
322,
8318,
10151,
3084,
320,
24829,
3084,
374,
2686,
1091,
220,
17,
15,
9651,
340,
27302,
1669,
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... | 9 |
func TestRunOnce(t *testing.T) {
cadvisor := &cadvisortest.Mock{}
cadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil)
cadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{
Usage: 400,
Capacity: 1000,
Available: 600,
}, nil)
cadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{
Usage... | explode_data.jsonl/39330 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1677
} | [
2830,
3393,
6727,
12522,
1155,
353,
8840,
836,
8,
341,
1444,
81794,
1669,
609,
34455,
2682,
371,
477,
24664,
16094,
1444,
81794,
8071,
445,
21605,
1731,
1827,
5598,
2099,
34455,
38012,
2068,
1321,
3814,
1731,
22655,
2092,
340,
1444,
81794... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAdService(t *testing.T) {
// Connecting
//url := "127.0.0.1:9555"
url := "adservice:9555"
conn := connect(t, url)
defer conn.Close()
// Creating context
ctx, cn := context.WithTimeout(context.Background(), timeout)
defer cn()
// Creating the stub
client := hipstershop.NewAdServiceClient(conn)
// ... | explode_data.jsonl/44004 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 234
} | [
2830,
3393,
2589,
1860,
1155,
353,
8840,
836,
8,
341,
197,
322,
83938,
198,
197,
322,
1085,
1669,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
24,
20,
20,
20,
698,
19320,
1669,
330,
7664,
1017,
25,
24,
20,
20,
20,
698,
32917,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoopBackManager_UpdateDevicesFromLocalConfig(t *testing.T) {
var mockexec = &mocks.GoMockExecutor{}
var manager = NewLoopBackManager(mockexec, "", "", logger)
manager.updateDevicesFromConfig()
assert.Equal(t, defaultNumberOfDevices, len(manager.devices))
} | explode_data.jsonl/73563 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
14620,
3707,
2043,
47393,
40835,
3830,
7319,
2648,
1155,
353,
8840,
836,
8,
341,
2405,
7860,
11748,
284,
609,
16712,
82,
67131,
11571,
25255,
16094,
2405,
6645,
284,
1532,
14620,
3707,
2043,
30389,
11748,
11,
7342,
7342,
5925,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVersionedCheckpointsSpecialCase6(t *testing.T) {
tree := NewMutableTree(db.NewMemDB(), 0)
tree.Set([]byte("Y"), []byte("MW79JQeV"))
tree.Set([]byte("7"), []byte("Kp0ToUJB"))
tree.Set([]byte("Z"), []byte("I26B1jPG"))
tree.Set([]byte("6"), []byte("ZG0iXq3h"))
tree.Set([]byte("2"), []byte("WOR27LdW"))
tre... | explode_data.jsonl/25132 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 412
} | [
2830,
3393,
5637,
291,
3973,
7706,
20366,
4207,
21,
1155,
353,
8840,
836,
8,
341,
51968,
1669,
1532,
11217,
6533,
9791,
7121,
18816,
3506,
1507,
220,
15,
692,
51968,
4202,
10556,
3782,
445,
56,
3975,
3056,
3782,
445,
54173,
22,
24,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestModifyCurrentContext(t *testing.T) {
conf := clientcmdapi.Config{
CurrentContext: "shaker-context",
Contexts: map[string]*clientcmdapi.Context{
"shaker-context": {AuthInfo: "blue-user", Cluster: "big-cluster", Namespace: "saw-ns"},
"not-this": {AuthInfo: "blue-user", Cluster: "big-cluster", Na... | explode_data.jsonl/12535 | {
"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,
44427,
5405,
1972,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
2943,
8710,
2068,
10753,
515,
197,
197,
5405,
1972,
25,
330,
927,
4407,
63633,
756,
197,
70871,
82,
25,
2415,
14032,
8465,
2972,
8710,
2068,
9328,
515,
298,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAPISelector_buildCandidateTags(t *testing.T) {
as := NewAPISelector(nil)
for _, tc := range testAPITagTestCases {
for i, params := range tc.P {
expectedJSON, _ := json.MarshalIndent(tc.E[i], "", " ")
tagSets, _ := as.buildCandidateTags(params)
actualJSON, _ := json.MarshalIndent(tagSets, "", " ... | explode_data.jsonl/18683 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 164
} | [
2830,
3393,
7082,
5877,
20801,
63901,
15930,
1155,
353,
8840,
836,
8,
341,
60451,
1669,
1532,
7082,
5877,
27907,
692,
2023,
8358,
17130,
1669,
2088,
1273,
2537,
952,
351,
2271,
37302,
341,
197,
2023,
600,
11,
3628,
1669,
2088,
17130,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestFirestoreCommit(t *testing.T) {
var expectedResponse *firestorepb.CommitResponse = &firestorepb.CommitResponse{}
mockFirestore.err = nil
mockFirestore.reqs = nil
mockFirestore.resps = append(mockFirestore.resps[:0], expectedResponse)
var formattedDatabase string = fmt.Sprintf("projects/%s/databases/%s"... | explode_data.jsonl/27384 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 345
} | [
2830,
3393,
48513,
33441,
1155,
353,
8840,
836,
8,
341,
2405,
3601,
2582,
353,
10796,
4314,
16650,
53036,
2582,
284,
609,
10796,
4314,
16650,
53036,
2582,
31483,
77333,
48513,
18441,
284,
2092,
198,
77333,
48513,
1327,
26358,
284,
2092,
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... | 5 |
func TestLibraryVariableSetUpdate(t *testing.T) {
libraryVariableSet := createTestLibraryVariableSet(t, getRandomName())
defer cleanLibraryVariableSet(t, libraryVariableSet.ID)
newLibraryVariableSetName := getRandomName()
const newDescription = "this should be updated"
libraryVariableSet.Name = newLibraryVariabl... | explode_data.jsonl/65968 | {
"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,
16915,
7827,
1649,
4289,
1155,
353,
8840,
836,
8,
341,
197,
18065,
7827,
1649,
1669,
1855,
2271,
16915,
7827,
1649,
1155,
11,
52436,
675,
2398,
16867,
4240,
16915,
7827,
1649,
1155,
11,
6733,
7827,
1649,
9910,
692,
8638,
169... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewContact(t *testing.T) {
a := assert.New(t)
input := &ast.Contact{
Email: &ast.Element{Content: ast.Content{Value: "user@example.com"}},
URL: &ast.Element{Content: ast.Content{Value: "https://example.com"}},
Name: &ast.Attribute{Value: xmlenc.String{Value: "name"}},
}
output := newContact(inpu... | explode_data.jsonl/3516 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
3564,
8732,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
692,
22427,
1669,
609,
559,
53975,
515,
197,
197,
4781,
25,
609,
559,
20139,
90,
2762,
25,
11763,
12614,
90,
1130,
25,
330,
872,
35487,
905,
48085,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequestResponseBody(t *testing.T) {
u, err := url.Parse("http://jsonplaceholder.typicode.com")
require.Nil(t, err)
client := NewClient(*u)
j := jsons.Parse(`{"userId": 1, "id": 101, "title": "title", "body": "body"}`)
req := client.NewRequest(t, "POST", "/posts", j)
assert.Nil(t, req.Body)
assert.NotNi... | explode_data.jsonl/48132 | {
"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,
1900,
29637,
1155,
353,
8840,
836,
8,
341,
10676,
11,
1848,
1669,
2515,
8937,
445,
1254,
1110,
2236,
12384,
49286,
13634,
905,
1138,
17957,
59678,
1155,
11,
1848,
340,
25291,
1669,
1532,
2959,
4071,
84,
692,
12428,
1669,
295... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTxSimulationResultWithPvtData(t *testing.T) {
rwSetBuilder := NewRWSetBuilder()
//公共RWS NS1+NS2
rwSetBuilder.AddToReadSet("ns1", "key1", version.NewHeight(1, 1))
rwSetBuilder.AddToReadSet("ns2", "key1", version.NewHeight(1, 1))
rwSetBuilder.AddToWriteSet("ns2", "key1", []byte("ns2-key1-value"))
//PVT RWSE... | explode_data.jsonl/37596 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2141
} | [
2830,
3393,
31584,
64554,
2077,
2354,
47,
9708,
1043,
1155,
353,
8840,
836,
8,
341,
7000,
86,
1649,
3297,
1669,
1532,
56368,
1649,
3297,
741,
322,
100070,
49,
7433,
3043,
16,
10,
2448,
17,
198,
7000,
86,
1649,
3297,
1904,
1249,
4418,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntExpressionBIT_AND(t *testing.T) {
assertClauseSerialize(t, table1ColInt.BIT_AND(table2ColInt), "(table1.col_int & table2.col_int)")
assertClauseSerialize(t, table1ColInt.BIT_AND(Int(11)), "(table1.col_int & $1)", int64(11))
} | explode_data.jsonl/41462 | {
"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,
1072,
9595,
20917,
21767,
1155,
353,
8840,
836,
8,
341,
6948,
28482,
15680,
1155,
11,
1965,
16,
6127,
1072,
1785,
952,
21767,
15761,
17,
6127,
1072,
701,
11993,
2005,
16,
13414,
4042,
609,
1965,
17,
13414,
4042,
19107,
6948,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_translate(t *testing.T) {
ctx := context.Background()
stack := &model.Stack{
Name: "name",
Services: map[string]*model.Service{
"1": {
Image: "image",
EnvFiles: []string{"/non-existing"},
},
},
}
if err := translate(ctx, stack, &StackDeployOptions{ForceBuild: false, Wait: false}); e... | explode_data.jsonl/23642 | {
"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,
66381,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
48227,
1669,
609,
2528,
58646,
515,
197,
21297,
25,
330,
606,
756,
197,
7568,
2161,
25,
2415,
14032,
8465,
2528,
13860,
515,
298,
197,
1,
16,
788,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestState_Channels(t *testing.T) {
t.Parallel()
st := setupNewState()
st.addChannel(channels[0])
st.addChannel(channels[1])
if got, exp := len(st.Channels()), 2; exp != got {
t.Errorf("Expected: %v, got: %v", exp, got)
}
for _, ch := range st.Channels() {
has := false
for _, channel := range channels... | explode_data.jsonl/32087 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 212
} | [
2830,
3393,
1397,
27588,
6680,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18388,
1669,
6505,
3564,
1397,
741,
18388,
1364,
9629,
7520,
6680,
58,
15,
2546,
18388,
1364,
9629,
7520,
6680,
58,
16,
2546,
743,
2684,
11,
1343,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCollectionReplica_addCollection(t *testing.T) {
node := newQueryNodeMock()
initTestMeta(t, node, 0, 0)
err := node.Stop()
assert.NoError(t, err)
} | explode_data.jsonl/11478 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 61
} | [
2830,
3393,
6482,
18327,
15317,
2891,
6482,
1155,
353,
8840,
836,
8,
341,
20831,
1669,
501,
2859,
1955,
11571,
741,
28248,
2271,
12175,
1155,
11,
2436,
11,
220,
15,
11,
220,
15,
340,
9859,
1669,
2436,
30213,
741,
6948,
35699,
1155,
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 |
func TestReadPersistentCache(t *testing.T) {
code := fmt.Sprintf(`
with open(r'%s', 'w') as f:
data = datadog_agent.read_persistent_cache("12345")
assert type(data) == type("")
f.write(data)
`, tmpfile.Name())
out, err := run(code)
if err != nil {
t.Fatal(err)
}
if out != "somevalue" {
t.Errorf("Unexpe... | explode_data.jsonl/24560 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 155
} | [
2830,
3393,
4418,
53194,
8233,
1155,
353,
8840,
836,
8,
341,
43343,
1669,
8879,
17305,
61528,
46948,
1787,
2601,
36165,
82,
516,
364,
86,
863,
438,
282,
510,
197,
8924,
284,
3258,
329,
538,
25730,
4125,
620,
13931,
11529,
445,
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... | 3 |
func TestHTTPStatusMessageFunc(t *testing.T) {
var successError = errors.New("Successful test error")
var failedError = errors.New("Failed test error")
var successMessage = "Overwrite error message."
authMiddleware, _ := New(&GinJWTMiddleware{
Key: key,
Timeout: time.Hour,
MaxRefresh: time... | explode_data.jsonl/64451 | {
"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,
9230,
2522,
2052,
9626,
1155,
353,
8840,
836,
8,
341,
2405,
2393,
1454,
284,
5975,
7121,
445,
36374,
1273,
1465,
1138,
2405,
4641,
1454,
284,
5975,
7121,
445,
9408,
1273,
1465,
1138,
2405,
2393,
2052,
284,
330,
1918,
4934,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKindFromToken(t *testing.T) {
const tk = `{ "type": "pollerID;kind" }`
k, err := KindFromToken("pollerID", tk)
if err != nil {
t.Fatal(err)
}
if k != "kind" {
t.Fatalf("unexpected kind %s", k)
}
k, err = KindFromToken("mismatched", tk)
if err == nil {
t.Fatal("unexpected nil error")
}
if k != "... | explode_data.jsonl/74217 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 162
} | [
2830,
3393,
10629,
3830,
3323,
1155,
353,
8840,
836,
8,
341,
4777,
17162,
284,
53692,
330,
1313,
788,
330,
30141,
261,
915,
26,
15314,
1,
335,
3989,
16463,
11,
1848,
1669,
16840,
3830,
3323,
445,
30141,
261,
915,
497,
17162,
340,
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... | 5 |
func TestArchiveConversation(t *testing.T) {
http.HandleFunc("/conversations.archive", okJSONHandler)
once.Do(startServer)
api := New("testing-token", OptionAPIURL("http://"+serverAddr+"/"))
err := api.ArchiveConversation("CXXXXXXXX")
if err != nil {
t.Errorf("Unexpected error: %s", err)
return
}
} | explode_data.jsonl/78539 | {
"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,
42502,
60313,
1155,
353,
8840,
836,
8,
341,
28080,
63623,
4283,
443,
72995,
82232,
497,
5394,
5370,
3050,
340,
197,
13184,
33596,
10639,
5475,
340,
54299,
1669,
1532,
445,
8840,
34841,
497,
6959,
7082,
3144,
445,
1254,
1110,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTrimSpaceAndNonPrintable_unicode(t *testing.T) {
extraChars := "state\uFEFF"
want := "state"
got := TrimSpaceAndNonPrintable(extraChars)
if want != got {
t.Fatalf("wrong trim, want: %q got: %q", want, got)
}
} | explode_data.jsonl/62249 | {
"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,
25656,
9914,
3036,
8121,
8994,
480,
54662,
1155,
353,
8840,
836,
8,
341,
8122,
2172,
32516,
1669,
330,
2454,
3770,
11419,
1748,
698,
50780,
1669,
330,
2454,
698,
3174,
354,
1669,
44376,
9914,
3036,
8121,
8994,
480,
83790,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestResources_ParseReserved(t *testing.T) {
cases := []struct {
Input string
Parsed []int
Err bool
}{
{
"1,2,3",
[]int{1, 2, 3},
false,
},
{
"3,1,2,1,2,3,1-3",
[]int{1, 2, 3},
false,
},
{
"3-1",
nil,
true,
},
{
"1-3,2-4",
[]int{1, 2, 3, 4},
false,
},
... | explode_data.jsonl/76942 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 441
} | [
2830,
3393,
11277,
77337,
53003,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
66588,
220,
914,
198,
197,
10025,
18112,
3056,
396,
198,
197,
197,
7747,
262,
1807,
198,
197,
59403,
197,
197,
515,
298,
197,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func 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/36183 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1254
} | [
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 TestDefaultFirmware(t *testing.T) {
assert := assert.New(t)
f, err := ioutil.TempFile(os.TempDir(), "qboot.bin")
assert.NoError(err)
assert.NoError(f.Close())
defer os.RemoveAll(f.Name())
h := hypervisor{}
defaultFirmwarePath = ""
p, err := h.firmware()
assert.NoError(err)
assert.Empty(p)
defaultFirm... | explode_data.jsonl/5135 | {
"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,
3675,
37,
53260,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
1166,
11,
1848,
1669,
43144,
65009,
1703,
9638,
65009,
6184,
1507,
330,
80,
4619,
29394,
1138,
6948,
35699,
3964,
340,
6948,
35699,
955,
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... | 1 |
func TestDataTypes(t *testing.T) {
d := Data{}
ind := reflect.Indirect(reflect.ValueOf(&d))
for name, value := range DataValues {
if name == "JSON" {
continue
}
e := ind.FieldByName(name)
e.Set(reflect.ValueOf(value))
}
id, err := dORM.Insert(&d)
throwFail(t, err)
throwFail(t, AssertIs(id, 1))
d = ... | explode_data.jsonl/18119 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 313
} | [
2830,
93200,
4173,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
2885,
16094,
197,
484,
1669,
8708,
13,
1425,
1226,
13321,
767,
6167,
2124,
2099,
67,
4390,
2023,
829,
11,
897,
1669,
2088,
2885,
6227,
341,
197,
743,
829,
621,
330,
5370,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPodLabelsShouldNotBeSelectorLabels(t *testing.T) {
labels := map[string]string{
"testlabel": "testvalue",
}
sset, err := makeStatefulSet(&monitoringv1.Alertmanager{
ObjectMeta: metav1.ObjectMeta{},
Spec: monitoringv1.AlertmanagerSpec{
PodMetadata: &monitoringv1.EmbeddedObjectMetadata{
Labels: l... | explode_data.jsonl/25239 | {
"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,
23527,
23674,
14996,
2623,
3430,
5877,
23674,
1155,
353,
8840,
836,
8,
341,
95143,
1669,
2415,
14032,
30953,
515,
197,
197,
1,
1944,
1502,
788,
330,
1944,
957,
756,
197,
532,
1903,
746,
11,
1848,
1669,
1281,
1397,
1262,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSetSoftMemoryLimit(t *testing.T) {
c, err := NewContainer(ContainerName)
if err != nil {
t.Errorf(err.Error())
}
oldMemLimit, err := c.MemoryLimit()
if err != nil {
t.Errorf(err.Error())
}
if err := c.SetSoftMemoryLimit(oldMemLimit * 4); err != nil {
t.Errorf(err.Error())
}
newMemLimit, err :... | explode_data.jsonl/2787 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
1649,
30531,
10642,
16527,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
1532,
4502,
75145,
675,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
3964,
6141,
2398,
197,
630,
61828,
18816,
16527,
11,
1848,
1669,
272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequestVerificationHeader_StableMarshal(t *testing.T) {
verifHeaderOrigin := generateRequestVerificationHeader("Key", "Inside")
verifHeaderFrom := generateRequestVerificationHeader("Value", "Outside")
verifHeaderFrom.SetOrigin(verifHeaderOrigin)
t.Run("non empty", func(t *testing.T) {
wire, err := verif... | explode_data.jsonl/79975 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 183
} | [
2830,
3393,
1900,
62339,
4047,
70645,
480,
55438,
1155,
353,
8840,
836,
8,
341,
197,
423,
333,
4047,
13298,
1669,
6923,
1900,
62339,
4047,
445,
1592,
497,
330,
24480,
1138,
197,
423,
333,
4047,
3830,
1669,
6923,
1900,
62339,
4047,
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 TestSyncSendTime(t *testing.T) {
var buf bytes.Buffer
s := NewSyncSender(&buf)
err := s.SendTime(someTime)
assert.NoError(t, err)
assert.Equal(t, someTimeEncoded, buf.Bytes())
} | explode_data.jsonl/80529 | {
"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,
12154,
11505,
1462,
1155,
353,
8840,
836,
8,
341,
2405,
6607,
5820,
22622,
198,
1903,
1669,
1532,
12154,
20381,
2099,
5909,
340,
9859,
1669,
274,
20176,
1462,
1141,
635,
1462,
340,
6948,
35699,
1155,
11,
1848,
340,
6948,
128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSimpleHandlerShouldWork(t *testing.T) {
r := NewRouter()
ctrl := gomock.NewController(t)
defer ctrl.Finish()
handler := NewMockHandler(ctrl)
handler.EXPECT().Handle(gomock.Any()).Return(nil)
r.MethodFunc(http.MethodGet, "/", handler.Handle)
r.ServeHTTP(httptest.NewRecorder(), httptest.NewRequest("GET... | explode_data.jsonl/18956 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
16374,
3050,
14996,
6776,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
9523,
2822,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
741,
53326,
1669,
1532,
11571,
3050,
62100,
340,
53326,
22402,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStackSetCongestionControl(t *testing.T) {
testCases := []struct {
cc tcpip.CongestionControlOption
err *tcpip.Error
}{
{"reno", nil},
{"cubic", nil},
{"blahblah", tcpip.ErrNoSuchFile},
}
for _, tc := range testCases {
t.Run(fmt.Sprintf("SetTransportProtocolOption(.., %v)", tc.cc), func(t *tes... | explode_data.jsonl/22329 | {
"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,
4336,
1649,
30421,
42498,
3273,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
63517,
220,
28051,
573,
727,
644,
42498,
3273,
5341,
198,
197,
9859,
353,
27161,
573,
6141,
198,
197,
59403,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestFindImportInternal(t *testing.T) {
withEmptyGoPath(func() {
// Check for src/internal/race, not just src/internal,
// so that we can run this test also against go1.5
// (which doesn't contain that file).
_, err := os.Stat(filepath.Join(runtime.GOROOT(), "src/internal/race"))
if err != nil {
t.Ski... | explode_data.jsonl/12426 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 388
} | [
2830,
3393,
9885,
11511,
11569,
1155,
353,
8840,
836,
8,
341,
46948,
3522,
10850,
1820,
18552,
368,
341,
197,
197,
322,
4248,
369,
2286,
30968,
7382,
578,
11,
537,
1101,
2286,
30968,
345,
197,
197,
322,
773,
429,
582,
646,
1598,
419,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrDisallowedType(t *testing.T) {
err := createTestTXT()
if err != nil {
t.Fatal(err)
}
defer deleteTestTXT()
// Create a new test request.
req, err := createRequest(testTXTName)
if err != nil {
t.Fatal(err)
}
// Upload the image.
_, err = New("file", req, &Options{
MaxFileSize: 1024,
Allo... | explode_data.jsonl/69269 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 177
} | [
2830,
3393,
7747,
4839,
20967,
929,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
1855,
2271,
62865,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
3698,
2271,
62865,
2822,
197,
322,
4230,
264,
501,
1273,
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... | 4 |
func TestDSV_Serialize_Basic(t *testing.T) {
d, e := dsv.NewDSV(dsv.DSVOpt{})
if e != nil {
t.Logf("failed to create dsv: %v", e)
t.FailNow()
}
ts := &[]*TagTest{
&TagTest{
Id: 42,
Name: "nAME",
Email: "eMAIL",
},
&TagTest{
Id: 64,
Name: "NaMe",
Email: "EmAiL",
},
}
bs, e := ... | explode_data.jsonl/11885 | {
"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,
5936,
53,
1098,
9050,
1668,
5971,
1155,
353,
8840,
836,
8,
341,
2698,
11,
384,
1669,
294,
3492,
7121,
5936,
53,
1500,
3492,
909,
50,
11169,
417,
37790,
743,
384,
961,
2092,
341,
197,
3244,
98954,
445,
16091,
311,
1855,
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... | 5 |
func TestFetchIntoObjectPool_hooks(t *testing.T) {
cfg, repo, _, locator, client := setup(t)
gitCmdFactory := git.NewExecCommandFactory(cfg)
ctx, cancel := testhelper.Context()
defer cancel()
pool, err := objectpool.NewObjectPool(cfg, locator, gitCmdFactory, nil, repo.GetStorageName(), gittest.NewObjectPoolName(... | explode_data.jsonl/1517 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 412
} | [
2830,
3393,
20714,
26591,
1190,
10551,
73113,
1155,
353,
8840,
836,
8,
341,
50286,
11,
15867,
11,
8358,
47117,
11,
2943,
1669,
6505,
1155,
340,
90731,
15613,
4153,
1669,
16345,
7121,
10216,
4062,
4153,
28272,
692,
20985,
11,
9121,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestKeeperDB_UpsertUpkeep(t *testing.T) {
t.Parallel()
store, orm, cleanup := setupKeeperDB(t)
defer cleanup()
db := store.DB
ethKeyStore := cltest.NewKeyStore(t, store.DB).Eth()
registry, _ := cltest.MustInsertKeeperRegistry(t, store, ethKeyStore)
upkeep := keeper.UpkeepRegistration{
UpkeepID: ... | explode_data.jsonl/27007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 533
} | [
2830,
3393,
77233,
3506,
6665,
1690,
529,
2324,
13096,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
57279,
11,
67602,
11,
21290,
1669,
6505,
77233,
3506,
1155,
340,
16867,
21290,
2822,
20939,
1669,
3553,
22537,
198,
197,
769,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCoinSendAccAuto(t *testing.T) {
kb, err := keys.NewKeyBaseFromDir(InitClientHome(t, ""))
require.NoError(t, err)
addr, seed := CreateAddr(t, name1, pw, kb)
cleanup, _, _, port := InitializeTestLCD(t, 1, []sdk.AccAddress{addr}, true)
defer cleanup()
acc := getAccount(t, port, addr)
initialBalance := acc... | explode_data.jsonl/25402 | {
"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,
41180,
11505,
14603,
13253,
1155,
353,
8840,
836,
8,
341,
16463,
65,
11,
1848,
1669,
6894,
7121,
1592,
3978,
3830,
6184,
7,
3803,
2959,
7623,
1155,
11,
77561,
17957,
35699,
1155,
11,
1848,
340,
53183,
11,
10320,
1669,
4230,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPanoNormalization(t *testing.T) {
testCases := getTests()
mc := &testdata.MockClient{}
ns := PanoramaNamespace(mc)
for _, tc := range testCases {
t.Run(tc.desc, func(t *testing.T) {
mc.Reset()
mc.AddResp("")
err := ns.Set("tmpl", "", "vr", tc.conf)
if err != nil {
t.Errorf("Error in set... | explode_data.jsonl/14706 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
47,
5652,
63070,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
633,
18200,
2822,
97662,
1669,
609,
92425,
24664,
2959,
16094,
84041,
1669,
10990,
48016,
22699,
69248,
692,
2023,
8358,
17130,
1669,
2088,
1273,
37302,
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... | 4 |
func TestCNIPluginVersion(t *testing.T) {
testCases := []struct {
version *cniPluginVersion
str string
}{
{
version: &cniPluginVersion{
Version: "1",
Dirty: false,
Hash: "hash",
},
str: "hash-1",
},
{
version: &cniPluginVersion{
Version: "1",
Dirty: true,
Hash:... | explode_data.jsonl/30407 | {
"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,
34,
14912,
11546,
5637,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
74954,
353,
66,
7751,
11546,
5637,
198,
197,
11355,
257,
914,
198,
197,
59403,
197,
197,
515,
298,
74954,
25,
609,
66,
7751,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_underscore_arrays_8(t *testing.T) {
tt(t, func() {
test, _ := test_()
test(`
test("intersection", function() {
var stooges = ['moe', 'curly', 'larry'], leaders = ['moe', 'groucho'];
equal(_.intersection(stooges, leaders).join(''), 'moe', 'can take the set intersection of two arrays');
... | explode_data.jsonl/68902 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 248
} | [
2830,
3393,
62,
53933,
68983,
62,
23,
1155,
353,
8840,
836,
8,
972,
3244,
83,
1155,
11,
2915,
368,
972,
197,
18185,
11,
716,
1669,
1273,
62,
18005,
197,
18185,
5809,
319,
220,
1273,
445,
73648,
497,
729,
368,
972,
262,
762,
42032,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_buildDownstreamTLSContext(t *testing.T) {
certA, err := cryptutil.CertificateFromBase64(aExampleComCert, aExampleComKey)
if !assert.NoError(t, err) {
return
}
srv, _ := NewServer("TEST", nil)
cacheDir, _ := os.UserCacheDir()
certFileName := filepath.Join(cacheDir, "pomerium", "envoy", "files", "tls-... | explode_data.jsonl/36950 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1863
} | [
2830,
3393,
20801,
4454,
4027,
45439,
1972,
1155,
353,
8840,
836,
8,
341,
1444,
529,
32,
11,
1848,
1669,
14436,
1314,
727,
20962,
3830,
3978,
21,
19,
2877,
13314,
1092,
36934,
11,
264,
13314,
1092,
1592,
340,
743,
753,
2207,
35699,
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 TestStacktraceFiltersZapMarshal(t *testing.T) {
withLogger(t, func(logger *zap.Logger, out *bytes.Buffer) {
marshal := func(enc zapcore.ObjectEncoder) error {
logger.Warn("marshal caused warn")
enc.AddString("f", "v")
return nil
}
logger.Error("test log", zap.Object("obj", zapcore.ObjectMarshalerFu... | explode_data.jsonl/18216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 365
} | [
2830,
3393,
4336,
15067,
28351,
57,
391,
55438,
1155,
353,
8840,
836,
8,
341,
46948,
7395,
1155,
11,
2915,
37833,
353,
92371,
12750,
11,
700,
353,
9651,
22622,
8,
341,
197,
2109,
28423,
1669,
2915,
66941,
32978,
2153,
8348,
19921,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMakeFunc(t *testing.T) {
o := js.Global.Get("Object").New()
for i := 3; i < 5; i++ {
x := i
if i == 4 {
break
}
o.Set("f", js.MakeFunc(func(this *js.Object, arguments []*js.Object) interface{} {
if this != o {
t.Fail()
}
if len(arguments) != 2 || arguments[0].Int() != 1 || arguments[1... | explode_data.jsonl/56797 | {
"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,
8078,
9626,
1155,
353,
8840,
836,
8,
341,
22229,
1669,
6994,
27381,
2234,
445,
1190,
1827,
3564,
741,
2023,
600,
1669,
220,
18,
26,
600,
366,
220,
20,
26,
600,
1027,
341,
197,
10225,
1669,
600,
198,
197,
743,
600,
621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestGetStarsJSON(t *testing.T) {
ctx := context.WithValue(context.Background(), hub.UserIDKey, "userID")
pkgID := "00000000-0000-0000-0000-000000000001"
t.Run("invalid input", func(t *testing.T) {
testCases := []struct {
errMsg string
packageID string
}{
{"package id not provided", ""},
{"in... | explode_data.jsonl/74683 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 549
} | [
2830,
3393,
1949,
61028,
5370,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
26124,
1130,
5378,
19047,
1507,
18719,
62081,
1592,
11,
330,
37506,
1138,
3223,
7351,
915,
1669,
330,
15,
15,
15,
15,
15,
15,
15,
15,
12,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBuildModTimestamp(t *testing.T) {
// round to seconds since this will be a unix timestamp
modTime := time.Now().AddDate(-1, 0, 0).Round(1 * time.Second).UTC()
folder := testlib.Mktmp(t)
writeGoodMain(t, folder)
config := config.Project{
Builds: []config.Build{
{
ID: "foo",
Env: []str... | explode_data.jsonl/54158 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 797
} | [
2830,
3393,
11066,
4459,
20812,
1155,
353,
8840,
836,
8,
341,
197,
322,
4778,
311,
6486,
2474,
419,
686,
387,
264,
51866,
11441,
198,
42228,
1462,
1669,
882,
13244,
1005,
2212,
1916,
4080,
16,
11,
220,
15,
11,
220,
15,
568,
27497,
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... | 6 |
func TestPartialLengthReader(t *testing.T) {
for i, test := range partialLengthReaderTests {
r := &partialLengthReader{readerFromHex(test.hexInput), 0, true}
out, err := ioutil.ReadAll(r)
if test.err != nil {
if err != test.err {
t.Errorf("%d: expected different error got:%s want:%s", i, err, test.err)
... | explode_data.jsonl/52944 | {
"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,
37314,
4373,
5062,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1273,
1669,
2088,
7130,
4373,
5062,
18200,
341,
197,
7000,
1669,
609,
37420,
4373,
5062,
90,
11149,
3830,
20335,
8623,
45639,
2505,
701,
220,
15,
11,
830,
532... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoveTxOfBlock(t *testing.T) {
q, mem := initEnv(0)
defer q.Close()
defer mem.Close()
err := add4Tx(mem.client)
if err != nil {
t.Error("add tx error", err.Error())
return
}
blkDetail := &types.BlockDetail{Block: blk}
msg5 := mem.client.NewMessage("mempool", types.EventAddBlock, blkDetail)
mem.... | explode_data.jsonl/16823 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 244
} | [
2830,
3393,
13021,
31584,
2124,
4713,
1155,
353,
8840,
836,
8,
341,
18534,
11,
1833,
1669,
2930,
14359,
7,
15,
340,
16867,
2804,
10421,
741,
16867,
1833,
10421,
2822,
9859,
1669,
912,
19,
31584,
39908,
6581,
340,
743,
1848,
961,
2092,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestUpdateHandler(t *testing.T) {
server, tk, job := testSetup(t)
url := tracker.UpdateURL(server, job, tracker.Parsing, "foobar")
getAndExpect(t, url, http.StatusMethodNotAllowed)
// Fail if job doesn't exist.
postAndExpect(t, url, http.StatusGone)
tk.AddJob(job)
// should update state to Parsing
pos... | explode_data.jsonl/53297 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 264
} | [
2830,
3393,
4289,
3050,
1155,
353,
8840,
836,
8,
341,
41057,
11,
17162,
11,
2618,
1669,
1273,
21821,
1155,
692,
19320,
1669,
28331,
16689,
3144,
21421,
11,
2618,
11,
28331,
1069,
28598,
11,
330,
50267,
5130,
10366,
3036,
17536,
1155,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestPreserveComments(t *testing.T) {
kustomizationContentWithComments := []byte(
`# shem qing some comments
# This is some comment we should preserve
# don't delete it
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../namespaces
- pod.yaml
- service.yaml
# something you may want to... | explode_data.jsonl/77186 | {
"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,
14367,
5852,
17373,
1155,
353,
8840,
836,
8,
341,
16463,
1450,
2022,
2762,
2354,
17373,
1669,
3056,
3782,
1006,
197,
197,
63,
2,
557,
336,
2804,
287,
1045,
6042,
198,
2,
1096,
374,
1045,
3980,
582,
1265,
21129,
198,
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... | 5 |
func TestRedfishRemoteDirectCdDvdNotAvailableInBootSources(t *testing.T) {
m := &redfishMocks.RedfishAPI{}
defer m.AssertExpectations(t)
systemID := computerSystemID
invalidSystem := getTestSystem()
invalidSystem.Boot.BootSourceOverrideTargetRedfishAllowableValues = []redfishClient.BootSource{
redfishClient.BOO... | explode_data.jsonl/12280 | {
"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,
6033,
18170,
24703,
16027,
90200,
35,
16598,
2623,
16485,
641,
17919,
32200,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
609,
1151,
18170,
72577,
20943,
18170,
7082,
16094,
16867,
296,
11711,
17536,
804,
1155,
692,
40293,
915,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOutboundListenerRouteV14(t *testing.T) {
_ = os.Setenv(features.EnableProtocolSniffingForOutbound.Name, "true")
defer func() { _ = os.Unsetenv(features.EnableProtocolSniffingForOutbound.Name) }()
testOutboundListenerRouteV14(t,
buildService("test1.com", "1.2.3.4", "unknown", tnow.Add(1*time.Second)),
b... | explode_data.jsonl/61260 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
2662,
10891,
2743,
4899,
53,
16,
19,
1155,
353,
8840,
836,
8,
341,
197,
62,
284,
2643,
4202,
3160,
47552,
32287,
20689,
20720,
3092,
287,
2461,
2662,
10891,
2967,
11,
330,
1866,
1138,
16867,
2915,
368,
314,
716,
284,
2643,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerlessEnabled(t *testing.T) {
type testCase struct {
name string
annotations map[string]string
expect bool
}
testcases := []testCase{
{
name: "enable_Serverless",
annotations: map[string]string{
common.InjectServerless: "true",
},
expect: true,
}, {
name: "enabl... | explode_data.jsonl/35574 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 394
} | [
2830,
3393,
5475,
1717,
5462,
1155,
353,
8840,
836,
8,
341,
13158,
54452,
2036,
341,
197,
11609,
286,
914,
198,
197,
197,
39626,
2415,
14032,
30953,
198,
197,
24952,
414,
1807,
198,
197,
630,
18185,
23910,
1669,
3056,
66194,
515,
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 TestStatusList(t *testing.T) {
defer gock.Off()
gock.New("https://api.github.com").
Get("/repos/octocat/hello-world/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e").
MatchParam("page", "1").
MatchParam("per_page", "30").
Reply(200).
Type("application/json").
SetHeaders(mockHeaders).
SetHeaders(... | explode_data.jsonl/29868 | {
"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,
2522,
852,
1155,
353,
8840,
836,
8,
341,
16867,
728,
377,
13,
4596,
2822,
3174,
1176,
7121,
445,
2428,
1110,
2068,
11021,
905,
38609,
197,
37654,
4283,
68354,
59182,
509,
266,
7530,
4791,
30084,
32518,
288,
14,
21,
67,
722... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetReadingsByDeviceError(t *testing.T) {
reset()
myMock := &dbMock.DBClient{}
myMock.On("ReadingsByDevice", mock.Anything, mock.Anything).Return([]models.Reading{}, fmt.Errorf("some error"))
dbClient = myMock
_, err := getReadingsByDevice("error", 0, context.Background(), logger.NewMockClient())
if e... | explode_data.jsonl/48177 | {
"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,
1949,
4418,
819,
1359,
6985,
1454,
1155,
353,
8840,
836,
8,
341,
70343,
741,
13624,
11571,
1669,
609,
1999,
11571,
22537,
2959,
31483,
13624,
11571,
8071,
445,
4418,
819,
1359,
6985,
497,
7860,
13311,
1596,
11,
7860,
13311,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenManNoGenTag(t *testing.T) {
echoCmd.DisableAutoGenTag = true
defer func() { echoCmd.DisableAutoGenTag = false }()
header := &GenManHeader{
Title: "Project",
Section: "2",
}
// We generate on a subcommand so we have both subcommands and parents
buf := new(bytes.Buffer)
if err := GenMan(echoCmd... | explode_data.jsonl/21957 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 199
} | [
2830,
3393,
9967,
1658,
2753,
9967,
5668,
1155,
353,
8840,
836,
8,
341,
5346,
15613,
10166,
480,
13253,
9967,
5668,
284,
830,
198,
16867,
2915,
368,
314,
1687,
15613,
10166,
480,
13253,
9967,
5668,
284,
895,
335,
2822,
20883,
1669,
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 TestPasswordEntry_Obfuscation(t *testing.T) {
entry, window := setupPasswordTest(t)
defer teardownImageTest(window)
c := window.Canvas()
test.Type(entry, "Hié™שרה")
assert.Equal(t, "Hié™שרה", entry.Text)
test.AssertRendersToMarkup(t, "password_entry/obfuscation_typed.xml", c)
} | explode_data.jsonl/12383 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
4876,
5874,
2232,
13233,
25034,
367,
1155,
353,
8840,
836,
8,
341,
48344,
11,
3241,
1669,
6505,
4876,
2271,
1155,
340,
16867,
49304,
1906,
2271,
15906,
340,
1444,
1669,
3241,
54121,
2822,
18185,
10184,
18238,
11,
330,
13048,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemove(t *testing.T) {
c, err := New(NumberLimit(3), PreSize(3))
if err != nil {
t.Fatalf("got err == %q, want err == nil", err)
}
tests := []struct{
desc string
change func()
vals []int
}{
{
desc: "Remove key 2 which doesn't exist",
change: func(){c.Remove(2)},
... | explode_data.jsonl/43869 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 674
} | [
2830,
3393,
13021,
1155,
353,
8840,
836,
8,
341,
220,
272,
11,
1848,
1669,
1532,
42999,
16527,
7,
18,
701,
4968,
1695,
7,
18,
1171,
220,
421,
1848,
961,
2092,
341,
262,
259,
30762,
445,
22390,
1848,
621,
1018,
80,
11,
1366,
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 TestErrorArgumentTooSmall(t *testing.T) {
prec := uint(64)
in := make([]big.Float, 2)
tol := math.Pow(2, -float64(3*prec/4))
in[0].SetPrec(prec).SetFloat64(tol / 129)
in[1].SetPrec(prec).SetInt64(-2)
pslq := New(prec).SetVerbose(verbose)
_, err := pslq.Run(in)
if err != ErrorArgumentTooSmall {
t.Error("E... | explode_data.jsonl/66846 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 227
} | [
2830,
3393,
1454,
9171,
31246,
25307,
1155,
353,
8840,
836,
8,
341,
197,
10645,
1669,
2622,
7,
21,
19,
340,
17430,
1669,
1281,
10556,
16154,
29794,
11,
220,
17,
340,
3244,
337,
1669,
6888,
54891,
7,
17,
11,
481,
3649,
21,
19,
7,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNewRawTransaction(t *testing.T) {
testInputTx := "3ad337270ac0ba14fbce812291b7d95338c878709ea8123a4d88c3c29efbc6ac"
testAmount := 65600
testScriptSig := []byte{118, 169, 20, 146, 3, 228, 122, 22, 247, 153, 222, 208, 53, 50, 227, 228, 82, 96, 111, 220, 82, 0, 126, 136, 172}
testScriptPubKey := []byte{169, 2... | explode_data.jsonl/67119 | {
"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,
3564,
20015,
8070,
1155,
353,
8840,
836,
8,
341,
18185,
2505,
31584,
1669,
330,
18,
329,
18,
18,
22,
17,
22,
15,
580,
15,
4645,
16,
19,
10798,
346,
23,
16,
17,
17,
24,
16,
65,
22,
67,
24,
20,
18,
18,
23,
66,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestForwardPortsReturnsErrorWhenAllBindsFailed(t *testing.T) {
server := httptest.NewServer(fakePortForwardServer(t, "allBindsFailed", nil, nil))
defer server.Close()
transport, upgrader, err := spdy.RoundTripperFor(&restclient.Config{})
if err != nil {
t.Fatal(err)
}
url, _ := url.Parse(server.URL)
dial... | explode_data.jsonl/70909 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 522
} | [
2830,
3393,
25925,
68273,
16446,
1454,
4498,
2403,
33,
8673,
9408,
1155,
353,
8840,
836,
8,
341,
41057,
1669,
54320,
70334,
7121,
5475,
74138,
7084,
25925,
5475,
1155,
11,
330,
541,
33,
8673,
9408,
497,
2092,
11,
2092,
1171,
16867,
3538... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientSDK(t *testing.T) {
manager := client.NewMemoryManager(nil)
handler := client.NewHandler(manager, herodot.NewJSONWriter(nil), []string{"foo", "bar"}, []string{"public"})
router := httprouter.New()
handler.SetRoutes(router)
server := httptest.NewServer(router)
c := hydra.NewOAuth2ApiWithBasePath(se... | explode_data.jsonl/20458 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1815
} | [
2830,
3393,
2959,
31534,
1155,
353,
8840,
836,
8,
341,
92272,
1669,
2943,
7121,
10642,
2043,
27907,
340,
53326,
1669,
2943,
7121,
3050,
55168,
11,
1059,
347,
354,
7121,
5370,
6492,
27907,
701,
3056,
917,
4913,
7975,
497,
330,
2257,
1434... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegexpLinkTransform(t *testing.T) {
specs := []struct {
path string
linkPath string
target string
originalURL url.URL
expectedURL string
}{
{"same", "same", "http://new/", url.URL{}, "http://new/"},
{"same", "same", "/new", url.URL{Scheme: "https", Host: "host"}, "https://host/ne... | explode_data.jsonl/30805 | {
"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,
3477,
4580,
3939,
8963,
1155,
353,
8840,
836,
8,
341,
98100,
82,
1669,
3056,
1235,
341,
197,
26781,
286,
914,
198,
197,
54238,
1820,
262,
914,
198,
197,
28861,
414,
914,
198,
197,
197,
9889,
3144,
2515,
20893,
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 TestGraphDefinition(t *testing.T) {
var fd ProcfdPlugin
graph := fd.GraphDefinition()
if actual := len(graph); actual != 1 {
t.Errorf("GraphDefinition(): %d should be 1", actual)
}
} | explode_data.jsonl/25526 | {
"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,
11212,
10398,
1155,
353,
8840,
836,
8,
341,
2405,
12414,
41087,
6902,
11546,
271,
66616,
1669,
12414,
40237,
10398,
741,
743,
5042,
1669,
2422,
24312,
1215,
5042,
961,
220,
16,
341,
197,
3244,
13080,
445,
11212,
10398,
4555,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSegment2(t *testing.T) {
dir := testutils.InitTestEnv(ModuleName, t)
c, mgr, driver := initTestContext(t, dir)
defer driver.Close()
defer mgr.Stop()
defer c.Close()
txn1 := mgr.StartTxn(nil)
db, _ := txn1.CreateDatabase("db")
schema := catalog.MockSchema(1)
rel, _ := db.CreateRelation(schema)
segCnt... | explode_data.jsonl/14655 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
21086,
17,
1155,
353,
8840,
836,
8,
341,
48532,
1669,
1273,
6031,
26849,
2271,
14359,
75295,
675,
11,
259,
340,
1444,
11,
57897,
11,
5579,
1669,
2930,
2271,
1972,
1155,
11,
5419,
340,
16867,
5579,
10421,
741,
16867,
57897,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReplyAndQuery(t *testing.T) {
cache, cleanup := withCache(t)
defer cleanup()
checksum := createReflectContract(t, cache)
gasMeter1 := NewMockGasMeter(TESTING_GAS_LIMIT)
igasMeter1 := GasMeter(gasMeter1)
// instantiate it with this store
store := NewLookup(gasMeter1)
api := NewMockAPI()
querier := Def... | explode_data.jsonl/62564 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 892
} | [
2830,
3393,
20841,
3036,
2859,
1155,
353,
8840,
836,
8,
341,
52680,
11,
21290,
1669,
448,
8233,
1155,
340,
16867,
21290,
741,
25157,
1242,
1669,
1855,
72789,
14067,
1155,
11,
6500,
692,
3174,
300,
68224,
16,
1669,
1532,
11571,
58728,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLayoutManager_SetGrid(t *testing.T) {
tests := []struct {
name string
sessions []*container.Session
wantLen int
}{
{
name: "no session given",
sessions: []*container.Session{},
wantLen: 0,
},
{
name: "multiple sessions given",
sessions: []*container.Session{{Name: "te... | explode_data.jsonl/73011 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 323
} | [
2830,
3393,
48748,
14812,
3543,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
1903,
8551,
29838,
3586,
20674,
198,
197,
50780,
11271,
220,
526,
198,
197,
59403,
197,
197,
515,
298,
11609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHistogramMerge(t *testing.T) {
ctx := context.Background()
test.RunProfiles(t, func(t *testing.T, profile test.Profile) {
descriptor := test.NewAggregatorTest(export.MeasureKind, profile.NumberKind, false)
agg1 := New(descriptor, boundaries[profile.NumberKind])
agg2 := New(descriptor, boundaries[prof... | explode_data.jsonl/2053 | {
"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,
77210,
52096,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
18185,
16708,
62719,
1155,
11,
2915,
1155,
353,
8840,
836,
11,
5526,
1273,
59872,
8,
341,
197,
52912,
6820,
1669,
1273,
7121,
9042,
58131,
2271,
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... | 4 |
func TestGetOperationsMap(t *testing.T) {
const (
sum = "+"
mul = "*"
sub = "-"
div = "/"
)
availableOperators := []string{sum, mul, sub, div}
m := GetOperationsMap()
for _, operator := range availableOperators {
_, ok := m[operator]
assert.True(t, ok, "Should exist")
}
} | explode_data.jsonl/22790 | {
"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,
1949,
35120,
2227,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
31479,
284,
6630,
698,
197,
2109,
360,
284,
15630,
698,
197,
28624,
284,
67773,
197,
63278,
284,
80455,
197,
340,
197,
10334,
77760,
1669,
3056,
917,
90,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJobStatusStrategy(t *testing.T) {
ctx := api.NewDefaultContext()
if !StatusStrategy.NamespaceScoped() {
t.Errorf("Job must be namespace scoped")
}
if StatusStrategy.AllowCreateOnUpdate() {
t.Errorf("Job should not allow create on update")
}
validSelector := map[string]string{"a": "b"}
validPodTempla... | explode_data.jsonl/8947 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 740
} | [
2830,
3393,
12245,
2522,
19816,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6330,
7121,
3675,
1972,
741,
743,
753,
2522,
19816,
46011,
39437,
368,
341,
197,
3244,
13080,
445,
12245,
1969,
387,
4473,
46960,
1138,
197,
532,
743,
8104,
1981... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_CreateUserUC_Should_Return_InternalError_If_Some_Error_Occur_When_Create_Token(t *testing.T) {
configs := map[string]mockConfigure{
"tokenManager": {
method: "GenerateToken",
customError: errors.New("some error"),
customResult: "",
},
}
sut := newCreateUserUseCaseToTest(configs)
_, er... | explode_data.jsonl/46772 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
34325,
1474,
5459,
36578,
616,
53316,
37238,
1454,
62,
2679,
1098,
635,
28651,
2232,
638,
324,
62,
4498,
34325,
1139,
1679,
1155,
353,
8840,
836,
8,
341,
25873,
82,
1669,
2415,
14032,
60,
16712,
28560,
515,
197,
197,
1,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReverseProxyMaxConnLimit(t *testing.T) {
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stderr)
const MaxTestConns = 2
connReceived := make(chan bool, MaxTestConns)
connContinue := make(chan bool)
backend := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
connR... | explode_data.jsonl/64227 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 725
} | [
2830,
3393,
45695,
16219,
5974,
9701,
16527,
1155,
353,
8840,
836,
8,
341,
6725,
4202,
5097,
1956,
30158,
909,
47560,
340,
16867,
1487,
4202,
5097,
9638,
77319,
692,
4777,
7487,
2271,
1109,
4412,
284,
220,
17,
198,
32917,
23260,
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... | 1 |
func TestChainNotFound(t *testing.T) {
mm := &mockSupportManager{
chains: make(map[string]*mockSupport),
}
m := newMockD()
defer close(m.recvChan)
ds := NewHandlerImpl(mm)
go ds.Handle(m)
m.recvChan <- makeSeek(systemChainID, &ab.SeekInfo{Start: seekNewest, Stop: seekNewest, Behavior: ab.SeekInfo_BLOCK_UNTI... | explode_data.jsonl/36275 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
18837,
10372,
1155,
353,
8840,
836,
8,
341,
2109,
76,
1669,
609,
16712,
7916,
2043,
515,
197,
23049,
1735,
25,
1281,
9147,
14032,
8465,
16712,
7916,
1326,
197,
630,
2109,
1669,
501,
11571,
35,
741,
16867,
3265,
1255,
40433,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMetricsMetadata_ToLabelValues_Error(t *testing.T) {
stringLabelValueMetadata := StringLabelValueMetadata{
queryLabelValueMetadata: newQueryLabelValueMetadata("nonExisting", "nonExistingColumn"),
}
queryLabelValuesMetadata := []LabelValueMetadata{stringLabelValueMetadata}
metadata := MetricsMetadata{Query... | explode_data.jsonl/64253 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 164
} | [
2830,
3393,
27328,
14610,
38346,
2476,
6227,
28651,
1155,
353,
8840,
836,
8,
341,
11357,
2476,
1130,
14610,
1669,
923,
2476,
1130,
14610,
515,
197,
27274,
2476,
1130,
14610,
25,
501,
2859,
2476,
1130,
14610,
445,
6280,
53067,
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 TestEachUint(t *testing.T) {
v := &Value{data: []uint{uint(1), uint(1), uint(1), uint(1), uint(1)}}
count := 0
replacedVals := make([]uint, 0)
assert.Equal(t, v, v.EachUint(func(i int, val uint) bool {
count++
replacedVals = append(replacedVals, val)
// abort early
if i == 2 {
return false
}
... | explode_data.jsonl/23459 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 241
} | [
2830,
3393,
4854,
21570,
1155,
353,
8840,
836,
8,
1476,
5195,
1669,
609,
1130,
90,
691,
25,
3056,
2496,
90,
2496,
7,
16,
701,
2622,
7,
16,
701,
2622,
7,
16,
701,
2622,
7,
16,
701,
2622,
7,
16,
9139,
532,
18032,
1669,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetAccountBalance(t *testing.T) {
t.Parallel()
_, err := b.GetAccountBalance()
if err == nil {
t.Error("Test Failed - GetAccountBalance() error")
}
} | explode_data.jsonl/79942 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 60
} | [
2830,
3393,
1949,
7365,
21190,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
6878,
1848,
1669,
293,
2234,
7365,
21190,
741,
743,
1848,
621,
2092,
341,
197,
3244,
6141,
445,
2271,
21379,
481,
2126,
7365,
21190,
368,
1465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeclarativeHelmInvalidValuesFile(t *testing.T) {
Given(t).
Path("helm").
When().
Declarative("declarative-apps/invalid-helm.yaml").
Then().
Expect(HealthIs(health.HealthStatusHealthy)).
Expect(SyncStatusIs(SyncStatusCodeUnknown)).
Expect(Condition(ApplicationConditionComparisonError, "does-not-e... | explode_data.jsonl/69396 | {
"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,
1912,
12821,
1388,
39,
23162,
7928,
6227,
1703,
1155,
353,
8840,
836,
8,
341,
9600,
2071,
1155,
4292,
197,
69640,
445,
51899,
38609,
197,
197,
4498,
25829,
197,
197,
1912,
12821,
1388,
445,
56305,
1388,
20023,
82,
14,
11808,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_AllowAll(t *testing.T) {
identityCache := cache.IdentityCache{
identity.NumericIdentity(identityFoo): labelsFoo,
identity.NumericIdentity(identityBar): labelsBar,
}
selectorCache := NewSelectorCache(identityCache)
tests := []struct {
test int
selector api.EndpointSelector
rules api.Rules... | explode_data.jsonl/50025 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 550
} | [
2830,
3393,
53629,
363,
2403,
1155,
353,
8840,
836,
8,
341,
197,
16912,
8233,
1669,
6500,
24423,
8233,
515,
197,
197,
16912,
2067,
12572,
18558,
86843,
40923,
1648,
9201,
40923,
345,
197,
197,
16912,
2067,
12572,
18558,
86843,
3428,
1648,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTrimMeasurementHistory(t *testing.T) {
f := newFixture(t)
defer f.Close()
c, _, _ := f.newController(noResyncPeriodFunc)
f.provider.On("GarbageCollect", mock.Anything, mock.Anything, mock.Anything).Return(nil)
{
run := newRun()
err := c.garbageCollectMeasurements(run, map[string]*v1alpha1.Measuremen... | explode_data.jsonl/75833 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 959
} | [
2830,
3393,
25656,
76548,
13424,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
340,
16867,
282,
10421,
741,
1444,
11,
8358,
716,
1669,
282,
4618,
2051,
39205,
1061,
1721,
23750,
9626,
692,
1166,
28306,
8071,
445,
43930,
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 TestEval(t *testing.T) {
defer func() {
if r := recover(); r != nil {
t.Failed()
t.Errorf("panic during execution: %v", r)
}
}()
mf := mapper.NewFactory(resolve.GetBasicResolver())
iCtx := test.NewActivityInitContext(Settings{}, mf)
act, err := New(iCtx)
assert.Nil(t, err)
tc := test.NewActivit... | explode_data.jsonl/2670 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
54469,
1155,
353,
8840,
836,
8,
1476,
16867,
2915,
368,
341,
197,
743,
435,
1669,
11731,
2129,
435,
961,
2092,
341,
298,
3244,
991,
5687,
741,
298,
3244,
13080,
445,
19079,
2337,
11320,
25,
1018,
85,
497,
435,
340,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.