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 TestSentPostQuerySingle(t *testing.T) {
keeper, ctx := setupKeeper(t)
wctx := sdk.WrapSDKContext(ctx)
msgs := createNSentPost(keeper, ctx, 2)
for _, tc := range []struct {
desc string
request *types.QueryGetSentPostRequest
response *types.QueryGetSentPostResponse
err error
}{
{
desc: ... | explode_data.jsonl/82111 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 486
} | [
2830,
3393,
31358,
4133,
2859,
10888,
1155,
353,
8840,
836,
8,
341,
197,
18861,
11,
5635,
1669,
6505,
77233,
1155,
340,
6692,
3773,
1669,
45402,
38968,
31534,
1972,
7502,
340,
21169,
82,
1669,
1855,
2448,
306,
4133,
7,
18861,
11,
5635,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateFormatReader(t *testing.T) {
format := NewEDIFileFormat("test")
fileDecl := `{
"file_declaration": {
"segment_delimiter": "\n",
"element_delimiter": "*",
"segment_declarations": [
{
"name": "ISA",
"is_target": true,
"elements": [
{ "name": "e3", "index": 3 },
{... | explode_data.jsonl/47479 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 473
} | [
2830,
3393,
4021,
4061,
5062,
1155,
353,
8840,
836,
8,
341,
59416,
1669,
1532,
23114,
1703,
4061,
445,
1944,
1138,
17661,
21629,
1669,
1565,
515,
197,
197,
1,
1192,
77926,
788,
341,
298,
197,
1,
23169,
18029,
17700,
788,
2917,
77,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChannelPullWithDigestsFilter(t *testing.T) {
t.Parallel()
cs := &cryptoService{}
cs.On("VerifyBlock", mock.Anything).Return(nil)
receivedBlocksChan := make(chan *proto.SignedGossipMessage, 2)
adapter := new(gossipAdapterMock)
configureAdapter(adapter, discovery.NetworkMember{PKIid: pkiIDInOrg1})
adapter... | explode_data.jsonl/66333 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 525
} | [
2830,
3393,
9629,
36068,
2354,
45217,
82,
5632,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
71899,
1669,
609,
35772,
1860,
16094,
71899,
8071,
445,
32627,
4713,
497,
7860,
13311,
1596,
568,
5598,
27907,
340,
17200,
8771,
29804,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMonitorForChange(t *testing.T) {
g := gomega.NewGomegaWithT(t)
configDescriptor := model.ConfigDescriptor{model.Gateway}
store := memory.Make(configDescriptor)
var (
callCount int
configs []*model.Config
err error
)
someConfigFunc := func() ([]*model.Config, error) {
switch callCount ... | explode_data.jsonl/3130 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 562
} | [
2830,
3393,
30098,
2461,
4072,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
692,
25873,
11709,
1669,
1614,
10753,
11709,
90,
2528,
1224,
12043,
630,
57279,
1669,
4938,
50133,
8754,
11709,
692,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestSendGreaterThanMTU(t *testing.T) {
const maxPayload = 100
c := context.New(t, uint32(header.TCPMinimumSize+header.IPv4MinimumSize+maxPayload))
defer c.Cleanup()
c.CreateConnected(789, 30000, nil)
testBrokenUpWrite(t, c, maxPayload)
} | explode_data.jsonl/22300 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
11505,
85720,
8505,
52,
1155,
353,
8840,
836,
8,
341,
4777,
1932,
29683,
284,
220,
16,
15,
15,
198,
1444,
1669,
2266,
7121,
1155,
11,
2622,
18,
17,
25534,
836,
7123,
28695,
1695,
10,
2708,
46917,
85,
19,
28695,
1695,
10,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSearchBuildURL(t *testing.T) {
client := setupTestClient(t)
tests := []struct {
Indices []string
Types []string
Expected string
}{
{
[]string{},
[]string{},
"/_search",
},
{
[]string{"index1"},
[]string{},
"/index1/_search",
},
{
[]string{"index1", "index2"},
[]s... | explode_data.jsonl/37523 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 498
} | [
2830,
3393,
5890,
11066,
3144,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
6505,
2271,
2959,
1155,
692,
78216,
1669,
3056,
1235,
341,
197,
197,
31941,
220,
3056,
917,
198,
197,
197,
4173,
262,
3056,
917,
198,
197,
197,
18896,
914,
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... | 4 |
func TestHtlcIncomingResolverExitCancel(t *testing.T) {
t.Parallel()
defer timeout(t)()
ctx := newIncomingResolverTestContext(t, true)
ctx.registry.notifyResolution = invoices.NewFailResolution(
testResCircuitKey, testAcceptHeight,
invoices.ResultInvoiceAlreadyCanceled,
)
ctx.resolve()
ctx.waitForResult(fa... | explode_data.jsonl/30614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 123
} | [
2830,
3393,
39,
11544,
66,
97564,
18190,
15339,
9269,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
16867,
9632,
1155,
8,
2822,
20985,
1669,
501,
97564,
18190,
2271,
1972,
1155,
11,
830,
340,
20985,
55568,
24681,
38106,
284,
640... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetBranchesWithHttpBodyError(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, "Basic Q2xpZW50SWQ6Q2xpZW50K1NlY3JldA==", r.Header.Get("Authorization"))
w.Header().Set("Content-Type", "application/json")
fmt.Fprintln(w, "{\"access_to... | explode_data.jsonl/50991 | {
"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,
1949,
18197,
288,
2354,
2905,
5444,
1454,
1155,
353,
8840,
836,
8,
1476,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6948,
12808,
1155,
11,
330,
15944... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBatchProcessorSentByTimeout(t *testing.T) {
sink := new(consumertest.TracesSink)
cfg := createDefaultConfig().(*Config)
sendBatchSize := 100
cfg.SendBatchSize = uint32(sendBatchSize)
cfg.Timeout = 100 * time.Millisecond
creationSet := componenttest.NewNopProcessorCreateSettings()
requestCount := 5
spa... | explode_data.jsonl/25023 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 573
} | [
2830,
3393,
21074,
22946,
31358,
1359,
7636,
1155,
353,
8840,
836,
8,
341,
1903,
766,
1669,
501,
17868,
1242,
83386,
8240,
2434,
45094,
340,
50286,
1669,
1855,
3675,
2648,
1005,
4071,
2648,
340,
32817,
21074,
1695,
1669,
220,
16,
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... | 6 |
func TestLTVersionChange(t *testing.T) {
asgName, ltName := "testasg", "launcher"
ltVersions := []*string{aws.String("1"), aws.String("2")}
instanceTypes := []*string{aws.String("t2.large"), aws.String("m4.xlarge")}
a := &autoScalingMock{}
e := &ec2Mock{}
for i := 0; i < 2; i++ {
e.On("DescribeLaunchTemplateV... | explode_data.jsonl/68669 | {
"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,
27404,
5637,
4072,
1155,
353,
8840,
836,
8,
341,
60451,
70,
675,
11,
25175,
675,
1669,
330,
1944,
300,
70,
497,
330,
77191,
698,
197,
4832,
69015,
1669,
29838,
917,
90,
8635,
6431,
445,
16,
3975,
31521,
6431,
445,
17,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequest_Timezone(t *testing.T) {
tests := []struct {
name string
request *alice.Request
want string
}{
{
name: "",
request: getReq(0),
want: "UTC",
}, {
name: "",
request: getReq(1),
want: "UTC",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testin... | explode_data.jsonl/18219 | {
"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,
1900,
39080,
8684,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
23555,
353,
63195,
9659,
198,
197,
50780,
262,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
262,
8324,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConsensusConfig_ValidateBasic(t *testing.T) {
// nolint: lll
testcases := map[string]struct {
modify func(*ConsensusConfig)
expectErr bool
}{
"TimeoutPropose": {func(c *ConsensusConfig) { c.TimeoutPropose = time.Second }, false},
"TimeoutPropose negative": {func... | explode_data.jsonl/66921 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1056
} | [
2830,
3393,
15220,
13626,
2648,
62,
17926,
15944,
1155,
353,
8840,
836,
8,
341,
197,
322,
308,
337,
396,
25,
326,
654,
198,
18185,
23910,
1669,
2415,
14032,
60,
1235,
341,
197,
42228,
1437,
262,
2915,
4071,
15220,
13626,
2648,
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... | 1 |
func TestCopyVehicle(t *testing.T) {
a := assert.New(t)
gen := &generatorMock{}
id := DefaultID + "-copied"
original := &Vehicle{
id: DefaultID,
name: DefaultName,
communicationID: DefaultCommunicationID,
isCarbonCopy: Original,
version: DefaultVersion,
newVersion: ... | explode_data.jsonl/36302 | {
"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,
12106,
34602,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
692,
82281,
1669,
609,
35851,
11571,
16094,
15710,
1669,
7899,
915,
488,
6523,
37728,
1122,
698,
197,
9889,
1669,
609,
34602,
515,
197,
15710,
25,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUpdateUnblockedDependencies(t *testing.T) {
assert := assert.New(t)
assert.NoError(db.ClearCollections(task.Collection, build.Collection))
b := build.Build{Id: "build0"}
tasks := []task.Task{
{Id: "t0", BuildId: b.Id},
{Id: "t1", BuildId: b.Id, Status: evergreen.TaskFailed},
{
Id: "t2",
Bu... | explode_data.jsonl/60453 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1113
} | [
2830,
3393,
4289,
1806,
61348,
48303,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
6948,
35699,
9791,
13524,
52730,
17483,
28629,
11,
1936,
28629,
1171,
2233,
1669,
1936,
25212,
90,
764,
25,
330,
5834,
15,
16707,
324... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListFormat(t *testing.T) {
item0 := &operations.ListJSONItem{
Path: "a",
Name: "a",
Encrypted: "encryptedFileName",
Size: 1,
MimeType: "application/octet-stream",
ModTime: operations.Timestamp{
When: t1,
Format: "2006-01-02T15:04:05.000000000Z07:00"},
IsDir: false,
Hash... | explode_data.jsonl/51949 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1543
} | [
2830,
3393,
852,
4061,
1155,
353,
8840,
836,
8,
341,
22339,
15,
1669,
609,
38163,
5814,
5370,
1234,
515,
197,
69640,
25,
414,
330,
64,
756,
197,
21297,
25,
414,
330,
64,
756,
197,
197,
7408,
14026,
25,
330,
36444,
10903,
756,
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 TestCacheExclusion(t *testing.T) {
fsDirs, err := getRandomDisks(1)
if err != nil {
t.Fatal(err)
}
cconfig := CacheConfig{Expiry: 30, Drives: fsDirs}
cobjects, err := newServerCacheObjects(cconfig)
if err != nil {
t.Fatal(err)
}
cobj := cobjects.(*cacheObjects)
GlobalServiceDoneCh <- struct{}{}
testC... | explode_data.jsonl/74494 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 548
} | [
2830,
3393,
8233,
840,
8957,
1155,
353,
8840,
836,
8,
341,
53584,
97384,
11,
1848,
1669,
52436,
4839,
2787,
7,
16,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
1444,
1676,
1669,
19479,
2648,
90,
840,
48209,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteV3Space(t *testing.T) {
Convey("Delete V3 Space", t, func() {
setup(MockRoute{"DELETE", "/v3/spaces/space-guid", []string{""}, "", http.StatusAccepted, "", nil}, t)
defer teardown()
c := &Config{ApiAddress: server.URL, Token: "foobar"}
client, err := NewClient(c)
So(err, ShouldBeNil)
err =... | explode_data.jsonl/54702 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 161
} | [
2830,
3393,
6435,
53,
18,
9914,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
6435,
647,
18,
11487,
497,
259,
11,
2915,
368,
341,
197,
84571,
66436,
4899,
4913,
14424,
497,
3521,
85,
18,
26734,
2434,
2687,
1306,
83692,
497,
3056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTruncatingByteSliceTarget(t *testing.T) {
defer func() {
if p := recover(); p != nil {
t.Error("_panic", "panic", p, "stack", string(debug.Stack()))
}
}()
var buf [100]byte
s := buf[:]
if err := stringGroup.Get(dummyCtx, "short", TruncatingByteSliceSink(&s)); err != nil {
t.Fatal(err)
}
if want... | explode_data.jsonl/62848 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 278
} | [
2830,
3393,
1282,
1347,
1095,
7153,
33236,
6397,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
368,
341,
197,
743,
281,
1669,
11731,
2129,
281,
961,
2092,
341,
298,
3244,
6141,
16975,
19079,
497,
330,
19079,
497,
281,
11,
330,
7693,
497,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRSAPublicKeyBytes(t *testing.T) {
t.Parallel()
provider, _, cleanup := currentTestConfig.Provider(t)
defer cleanup()
k, err := provider.KeyGen(&bccsp.RSAKeyGenOpts{Temporary: false})
if err != nil {
t.Fatalf("Failed generating RSA key [%s]", err)
}
pk, err := k.PublicKey()
if err != nil {
t.Fatal... | explode_data.jsonl/29286 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 225
} | [
2830,
3393,
11451,
2537,
475,
1592,
7078,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
19979,
11,
8358,
21290,
1669,
1482,
2271,
2648,
36208,
1155,
340,
16867,
21290,
2822,
16463,
11,
1848,
1669,
9109,
9610,
9967,
2099,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildBodyFromResponse(t *testing.T) {
d := entity.Definition{
Response: "hey",
ResponseFile: "lorem.fix",
}
assert.Equal(t, []byte("hey"), d.BuildBody("path"))
} | explode_data.jsonl/68885 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 72
} | [
2830,
3393,
11066,
5444,
3830,
2582,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
5387,
49947,
4054,
515,
197,
69604,
25,
257,
330,
35561,
756,
197,
69604,
1703,
25,
330,
385,
1826,
67785,
756,
197,
630,
6948,
12808,
1155,
11,
3056,
3782... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestCookieSyncNoCookiesBrokenGDPR(t *testing.T) {
rr := doConfigurablePost(`{"bidders":["appnexus", "audienceNetwork", "random"],"gdpr_consent":"GLKHGKGKKGK"}`, nil, true, map[openrtb_ext.BidderName]usersync.Usersyncer{}, config.GDPR{UsersyncIfAmbiguous: true}, config.CCPA{})
assert.Equal(t, rr.Header().Get("Con... | explode_data.jsonl/21691 | {
"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,
20616,
12154,
2753,
50672,
90526,
40849,
6480,
1155,
353,
8840,
836,
8,
341,
197,
634,
1669,
653,
2648,
18329,
4133,
5809,
4913,
65,
99129,
36799,
676,
77,
23666,
497,
330,
7880,
1835,
12320,
497,
330,
11463,
68882,
28584,
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... | 1 |
func TestSearch(t *testing.T) {
fmt.Println("Testing Search(SearchGet) API")
// create a public project named "search"
projectID1, err := dao.AddProject(models.Project{
Name: "search",
OwnerID: int(nonSysAdminID),
})
require.Nil(t, err)
defer dao.DeleteProject(projectID1)
err = dao.AddProjectMetadata(&mo... | explode_data.jsonl/11600 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1490
} | [
2830,
3393,
5890,
1155,
353,
8840,
836,
8,
341,
11009,
12419,
445,
16451,
7542,
73554,
1949,
8,
5333,
1138,
197,
322,
1855,
264,
584,
2390,
6941,
330,
1836,
698,
72470,
915,
16,
11,
1848,
1669,
24775,
1904,
7849,
20289,
30944,
515,
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 TestAddCommandWithMissingParams(t *testing.T) {
cmdTests := []struct {
desc string
flags []keyValuePair
wantErr string
}{
{"Missing env-name flag",
[]keyValuePair{flag("pipelines-folder", "~/pipelines.yaml")},
`required flag(s) "env-name" not set`},
}
for _, tt := range cmdTests {
t.Run(tt... | explode_data.jsonl/81108 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
2212,
4062,
2354,
25080,
4870,
1155,
353,
8840,
836,
8,
341,
25920,
18200,
1669,
3056,
1235,
341,
197,
41653,
262,
914,
198,
197,
59516,
256,
3056,
792,
22448,
198,
197,
50780,
7747,
914,
198,
197,
59403,
197,
197,
4913,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPVCControlUpdateMetaInfoSuccess(t *testing.T) {
g := NewGomegaWithT(t)
tc := newTidbCluster()
pvc := newPVC(tc)
pod := newPod(tc)
fakeClient, pvcLister, _, recorder := newFakeClientAndRecorder()
control := NewRealPVCControl(fakeClient, recorder, pvcLister)
fakeClient.AddReactor("update", "persistentvol... | explode_data.jsonl/66720 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 238
} | [
2830,
3393,
47,
11287,
3273,
4289,
12175,
1731,
7188,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
340,
78255,
1669,
501,
51,
307,
65,
28678,
741,
3223,
7362,
1669,
501,
47,
11287,
44415,
340,
3223,
347,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSqlite3_AddConstraintStmtHook(t *testing.T) {
a := assert.New(t, false)
suite := test.NewSuite(a, test.Sqlite3)
defer suite.Close()
suite.ForEach(func(t *test.Driver) {
db := t.DB
for _, query := range sqlite3CreateTable {
_, err := db.Exec(query)
t.NotError(err)
}
defer clearSqlite3Create... | explode_data.jsonl/11875 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 223
} | [
2830,
3393,
8269,
632,
18,
21346,
17890,
31063,
31679,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
11,
895,
340,
96572,
1669,
1273,
7121,
28000,
2877,
11,
1273,
23005,
632,
18,
340,
16867,
16182,
10421,
2822,
96572,
677... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRulesMerging(t *testing.T) {
yamlFile, err := ioutil.ReadFile("testdata/data-access-merge-1.yaml")
if err != nil {
t.Fatalf("Error reading test data file: %s", err.Error())
}
dar, err := ParseDataAccess(yamlFile)
if err != nil {
t.Fatalf("Error while parsing rules: %s", err.Error())
}
das := dar.Ac... | explode_data.jsonl/26670 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 272
} | [
2830,
3393,
26008,
44,
95296,
1155,
353,
8840,
836,
8,
341,
14522,
9467,
1703,
11,
1848,
1669,
43144,
78976,
445,
92425,
13167,
42156,
12,
19052,
12,
16,
33406,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
1454,
5290,
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... | 6 |
func TestRBACTypes(t *testing.T) {
f := forest.NewForest()
config := &HNCConfig{
translator: fakeGRTranslator{},
Forest: f,
Log: zap.New(),
}
tests := []struct {
name string
configs []api.ResourceSpec
allow bool
}{
{
name: "No redundant enforced resources configured",
config... | explode_data.jsonl/11111 | {
"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,
29259,
6823,
1804,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
13638,
7121,
49578,
741,
25873,
1669,
609,
39,
9949,
2648,
515,
197,
197,
44357,
25,
12418,
8626,
51653,
38837,
197,
197,
49578,
25,
257,
282,
345,
197,
24201,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPopulateCacheInExpectedOrder(t *testing.T) {
logrus.SetLevel(logrus.DebugLevel)
trace.EnableTracing()
trace.Logger.Level = logrus.DebugLevel
op := trace.NewOperation(context.Background(), "test")
storeURL, _ := util.ImageStoreNameToURL("testStore")
storageURLStr := storeURL.String()
url1, _ := url.P... | explode_data.jsonl/11684 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 721
} | [
2830,
3393,
11598,
6334,
8233,
641,
18896,
4431,
1155,
353,
8840,
836,
8,
341,
90822,
4202,
4449,
12531,
20341,
20345,
4449,
340,
65058,
32287,
1282,
4527,
741,
65058,
12750,
25259,
284,
1487,
20341,
20345,
4449,
271,
39703,
1669,
11655,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSettingString(t *testing.T) {
tests := []struct {
s Setting
want string
}{
{Setting{SettingMaxFrameSize, 123}, "[MAX_FRAME_SIZE = 123]"},
{Setting{1<<16 - 1, 123}, "[UNKNOWN_SETTING_65535 = 123]"},
}
for i, tt := range tests {
got := fmt.Sprint(tt.s)
if got != tt.want {
t.Errorf("%d. for ... | explode_data.jsonl/17655 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
15400,
703,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
1903,
262,
20037,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
90,
15400,
90,
15400,
5974,
4369,
1695,
11,
220,
16,
17,
18,
2137,
10545,
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 TestRunBenchmarkErrors(t *testing.T) {
tests := []struct {
opts BenchmarkOptions
wantErr string
}{
{
opts: BenchmarkOptions{
MaxRequests: -1,
},
wantErr: "max requests cannot be negative",
},
{
opts: BenchmarkOptions{
MaxDuration: -time.Second,
},
wantErr: "duration cannot ... | explode_data.jsonl/56432 | {
"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,
6727,
84971,
13877,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
64734,
262,
61622,
3798,
198,
197,
50780,
7747,
914,
198,
197,
59403,
197,
197,
515,
298,
64734,
25,
61622,
3798,
515,
571,
197,
5974,
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 TestHandleRateLimit(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
session := createFakeEventFeedSession(ctx)
// empty rate limit item, do nothing
session.handleRateLimit(ctx)
require.Len(t, session.rateLimitQueue, 0)
require.Equal(t, defaultRegionRateLimitQueueSize... | explode_data.jsonl/32890 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 245
} | [
2830,
3393,
6999,
11564,
16527,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
2822,
25054,
1669,
1855,
52317,
1556,
28916,
5283,
7502,
692,
197,
322,
4287,
4379,
3930,
1509,
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... | 2 |
func TestRunMigratorMigrationDesyncedFromData(t *testing.T) {
store := NewMockStoreIface()
ticker := glock.NewMockTicker(time.Second)
progressValues := []float64{
0.20, // inital check
0.25, 0.30, 0.35, 0.40, 0.45, // after up (x5)
0.45, // re-check
0.50, 0.55... | explode_data.jsonl/11537 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 457
} | [
2830,
3393,
6727,
44,
5233,
850,
20168,
4896,
1721,
291,
3830,
1043,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
1532,
11571,
6093,
40,
1564,
741,
3244,
5215,
1669,
342,
1023,
7121,
11571,
87278,
9730,
32435,
692,
88971,
6227,
1669,
3056... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGitIgnoreExist(t *testing.T) {
fileName := "Python"
ts := newTestServer()
if _, _, err := gitIgnoreExists(ts.URL, fileName); err != nil {
t.Errorf("gitIgnoreExists(%s) was incorrect. Got: error to exist git ignore %s, want: nil error", fileName, fileName)
}
fileName = "gitIgnoreNotFound"
if _, _, err ... | explode_data.jsonl/7961 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 185
} | [
2830,
3393,
46562,
12497,
25613,
1155,
353,
8840,
836,
8,
341,
17661,
675,
1669,
330,
30280,
698,
57441,
1669,
501,
2271,
5475,
741,
743,
8358,
8358,
1848,
1669,
16345,
12497,
15575,
35864,
20893,
11,
12665,
1215,
1848,
961,
2092,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestLabels(t *testing.T) {
tests := []struct {
description string
options config.SkaffoldOptions
expectedLabels map[string]string
}{
{
description: "empty",
options: config.SkaffoldOptions{},
expectedLabels: map[string]string{},
},
{
description: "cleanup",
options:... | explode_data.jsonl/31972 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1170
} | [
2830,
3393,
23674,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
42407,
262,
914,
198,
197,
35500,
286,
2193,
808,
74,
2649,
813,
3798,
198,
197,
42400,
23674,
2415,
14032,
30953,
198,
197,
59403,
197,
197,
515,
298... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHubHash(t *testing.T) {
cases := []struct {
name string
key1 string
key2 string
equal bool
}{
{
name: "same key",
key1: "http://localhost",
key2: "http://localhost",
equal: true,
},
{
name: "same key",
key1: "http://localhost",
key2: "http://remotehost",
equal: ... | explode_data.jsonl/32206 | {
"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,
19316,
6370,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
23634,
16,
220,
914,
198,
197,
23634,
17,
220,
914,
198,
197,
7727,
1751,
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... | 5 |
func TestPrintObjectSpecificMessage(t *testing.T) {
f := NewFactory(nil)
tests := []struct {
obj runtime.Object
expectOutput bool
}{
{
obj: &api.Service{},
expectOutput: false,
},
{
obj: &api.Pod{},
expectOutput: false,
},
{
obj: &api.Service{Spec: api... | explode_data.jsonl/43211 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 385
} | [
2830,
3393,
8994,
1190,
47514,
2052,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
1532,
4153,
27907,
340,
78216,
1669,
3056,
1235,
341,
197,
22671,
688,
15592,
8348,
198,
197,
24952,
5097,
1807,
198,
197,
59403,
197,
197,
515,
298,
22671,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStdCopyDetectsCorruptedFrame(t *testing.T) {
stdOutBytes := []byte(strings.Repeat("o", startingBufLen))
stdErrBytes := []byte(strings.Repeat("e", startingBufLen))
buffer, err := getSrcBuffer(stdOutBytes, stdErrBytes)
if err != nil {
t.Fatal(err)
}
reader := &customReader{
correctCalls: 1,
n: ... | explode_data.jsonl/52161 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
22748,
12106,
57193,
82,
10580,
85954,
4369,
1155,
353,
8840,
836,
8,
341,
6736,
2662,
7078,
1669,
3056,
3782,
51442,
2817,
10979,
445,
78,
497,
5916,
15064,
11271,
1171,
6736,
7747,
7078,
1669,
3056,
3782,
51442,
2817,
10979,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigurationHasNoKubectlAnnotation(t *testing.T) {
s := createServiceWithKubectlAnnotation()
c := MakeConfiguration(s)
if v, ok := c.Annotations[corev1.LastAppliedConfigAnnotation]; ok {
t.Errorf(`Annotation[%s] = %q, want: ""`, corev1.LastAppliedConfigAnnotation, v)
}
} | explode_data.jsonl/45491 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
7688,
10281,
2753,
42,
53380,
19711,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1855,
1860,
2354,
42,
53380,
19711,
741,
1444,
1669,
7405,
7688,
1141,
340,
743,
348,
11,
5394,
1669,
272,
91172,
58,
98645,
16,
24682,
75856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMsgEditNFTValidateBasicMethod(t *testing.T) {
newMsgEditNFT := types.NewMsgEditNFT(id, denom, nftName, tokenURI, uriHash, tokenData, "")
err := newMsgEditNFT.ValidateBasic()
require.Error(t, err)
newMsgEditNFT = types.NewMsgEditNFT("", denom, nftName, tokenURI, uriHash, tokenData, address.String())
err ... | explode_data.jsonl/28173 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
6611,
4036,
45,
3994,
17926,
15944,
3523,
1155,
353,
8840,
836,
8,
341,
8638,
6611,
4036,
45,
3994,
1669,
4494,
7121,
6611,
4036,
45,
3994,
3724,
11,
49744,
11,
308,
723,
675,
11,
3950,
10301,
11,
13071,
6370,
11,
3950,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContainerMounts(t *testing.T) {
const testSandboxID = "test-id"
for desc, test := range map[string]struct {
statFn func(string) (os.FileInfo, error)
criMounts []*runtime.Mount
securityContext *runtime.LinuxContainerSecurityContext
expectedMounts []*runtime.Mount
}{
"should setup ro... | explode_data.jsonl/6410 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2100
} | [
2830,
3393,
4502,
16284,
82,
1155,
353,
8840,
836,
8,
341,
4777,
1273,
50,
31536,
915,
284,
330,
1944,
12897,
698,
2023,
6560,
11,
1273,
1669,
2088,
2415,
14032,
60,
1235,
341,
197,
78085,
24911,
688,
2915,
3609,
8,
320,
436,
8576,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_findMissingContainers(t *testing.T) {
tests := []struct {
name string
projectEnts serialized.Object
profileEnts serialized.Object
want []string
wantErr bool
}{
{
name: "equal without container",
projectEnts: serialized.Object(map[string]interface{}{
"com.apple.develop... | explode_data.jsonl/59052 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1058
} | [
2830,
3393,
21814,
25080,
74632,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
72470,
2250,
82,
32916,
8348,
198,
197,
197,
5365,
2250,
82,
32916,
8348,
198,
197,
50780,
286,
3056,
917,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestACLReplication_updateLocalACLs_RateLimit(t *testing.T) {
dir1, s1 := testServerWithConfig(t, func(c *Config) {
c.Datacenter = "dc2"
c.ACLDatacenter = "dc1"
c.ACLReplicationToken = "secret"
c.ACLReplicationApplyLimit = 1
})
defer os.RemoveAll(dir1)
defer s1.Shutdown()
testutil.WaitForLeader(t, s1.R... | explode_data.jsonl/34823 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 511
} | [
2830,
3393,
55393,
18327,
1693,
8882,
7319,
55393,
82,
2568,
349,
16527,
1155,
353,
8840,
836,
8,
341,
48532,
16,
11,
274,
16,
1669,
1273,
5475,
2354,
2648,
1155,
11,
2915,
1337,
353,
2648,
8,
341,
197,
1444,
3336,
3057,
284,
330,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseUnaryOperators(t *testing.T) {
checkParseExpression(t, "-(123)", "(unary - 123)")
checkParseExpression(t, "- 123 + 2", "(infix + (unary - 123) 2)")
checkParseExpression(t, "not true", "(unary not true)")
} | explode_data.jsonl/33531 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
14463,
94545,
77760,
1155,
353,
8840,
836,
8,
341,
25157,
14463,
9595,
1155,
11,
6523,
7,
16,
17,
18,
11583,
11993,
359,
658,
481,
220,
16,
17,
18,
19107,
25157,
14463,
9595,
1155,
11,
6523,
220,
16,
17,
18,
488,
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 TestCoinChange(t *testing.T) {
var tests = []struct {
coins []int
amount int
expect int
}{
{[]int{1, 2, 5}, 11, 3},
{[]int{2}, 3, -1},
{[]int{7, 2, 3, 6}, 13, 2},
{[]int{3, 2, 4}, 6, 2},
}
for _, test := range tests {
if got, _ := coinChange(test.coins, test.amount); got != test.expect {
t... | explode_data.jsonl/25383 | {
"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,
41180,
4072,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
197,
29609,
220,
3056,
396,
198,
197,
197,
6045,
526,
198,
197,
24952,
526,
198,
197,
59403,
197,
197,
90,
1294,
396,
90,
16,
11,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestIndexerOnDelete(t *testing.T) {
myRowID := EncodeSequence(1)
var multiKeyIndex MultiKeyIndex
ctx := NewMockContext()
storeKey := sdk.NewKVStoreKey("test")
store := prefix.NewStore(ctx.KVStore(storeKey), []byte{multiKeyIndex.prefix})
specs := map[string]struct {
srcFunc IndexerFunc
expDeleted... | explode_data.jsonl/42809 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 938
} | [
2830,
3393,
1552,
261,
1925,
6435,
1155,
353,
8840,
836,
8,
341,
13624,
3102,
915,
1669,
56562,
14076,
7,
16,
692,
2405,
7299,
1592,
1552,
17439,
1592,
1552,
198,
20985,
1669,
1532,
11571,
1972,
741,
57279,
1592,
1669,
45402,
7121,
8270... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRepoRecursiveTemplates(t *testing.T) {
var b bytes.Buffer
repo := NewRepository(nil)
err := repo.AddFile("c1", cirularDeps1)
assert.NoError(t, err)
err = repo.AddFile("c2", cirularDeps2)
assert.NoError(t, err)
templ, err := repo.Get("c1")
assert.Nil(t, err)
data := testData{
Name: "Root",
Child... | explode_data.jsonl/49690 | {
"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,
25243,
78542,
51195,
1155,
353,
8840,
836,
8,
1476,
2405,
293,
5820,
22622,
198,
17200,
5368,
1669,
1532,
4624,
27907,
692,
9859,
1669,
15867,
1904,
1703,
445,
66,
16,
497,
29470,
1276,
35,
7124,
16,
340,
6948,
35699,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestState_EachChannel(t *testing.T) {
t.Parallel()
st := setupNewState()
st.addChannel(channels[0])
st.addChannel(channels[1])
i := 0
st.EachChannel(func(ch Channel) bool {
has := false
for _, channel := range channels {
if channel == ch.String() {
has = true
break
}
}
if got, exp := h... | explode_data.jsonl/32085 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 224
} | [
2830,
3393,
1397,
2089,
610,
9629,
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,
8230,
1669,
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... | 4 |
func TestShardDel(t *testing.T) {
elements := []struct {
s *shard
ws *workers
n int
}{
{
s: &shard{elements: make(map[string]element), q: &queue{}},
ws: &workers{wn: 1, number: 256},
n: 128,
},
{
s: &shard{elements: make(map[string]element), q: &queue{}},
ws: &workers{wn: 4, number: 25... | explode_data.jsonl/5397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 690
} | [
2830,
3393,
2016,
567,
16532,
1155,
353,
8840,
836,
8,
341,
197,
21423,
1669,
3056,
1235,
341,
197,
1903,
220,
353,
927,
567,
198,
197,
6692,
82,
353,
54958,
198,
197,
9038,
220,
526,
198,
197,
59403,
197,
197,
515,
298,
1903,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestAllRegisteredUnitsAreRemoteSafe(t *testing.T) {
assert := assert.New(t)
for id := range registry.JobTypeNames() {
grip.Infoln("testing job is remote ready:", id)
factory, err := registry.GetJobFactory(id)
assert.NoError(err)
assert.NotNil(factory)
job := factory()
assert.NotNil(job)
assert.E... | explode_data.jsonl/25011 | {
"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,
2403,
41430,
26314,
11526,
24703,
25663,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
2023,
877,
1669,
2088,
19424,
45293,
929,
7980,
368,
341,
197,
3174,
4561,
5337,
8400,
77,
445,
8840,
2618,
374,
8699,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceSetCreds(t *testing.T) {
adminTestBed, err := prepareAdminXLTestBed()
if err != nil {
t.Fatal("Failed to initialize a single node XL backend for admin handler tests.")
}
defer adminTestBed.TearDown()
// Initialize admin peers to make admin RPC calls. Note: In a
// single node setup, this degene... | explode_data.jsonl/7919 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 924
} | [
2830,
3393,
1860,
1649,
34,
53369,
1155,
353,
8840,
836,
8,
341,
64394,
2271,
15686,
11,
1848,
1669,
10549,
7210,
36530,
2271,
15686,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
445,
9408,
311,
9468,
264,
3175,
2436,
29881,
19163,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerAllowsBlockingRemoteAddr(t *testing.T) {
defer afterTest(t)
ts := httptest.NewUnstartedServer(HandlerFunc(func(w ResponseWriter, r *Request) {
fmt.Fprintf(w, "RA:%s", r.RemoteAddr)
}))
conns := make(chan net.Conn)
ts.Listener = &blockingRemoteAddrListener{
Listener: ts.Listener,
conns: conn... | explode_data.jsonl/22405 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 724
} | [
2830,
3393,
5475,
79595,
48266,
24703,
13986,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
340,
57441,
1669,
54320,
70334,
7121,
1806,
46723,
5475,
7,
3050,
9626,
18552,
3622,
5949,
6492,
11,
435,
353,
1900,
8,
341,
197,
11009... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestYesFilter_AddChildren(t *testing.T) {
tests := []struct {
name string
filters []Filter
}{
{"happy", []Filter{&YesFilter{}}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
f := &YesFilter{}
if got := f.AddChildren(tt.filters...); got != f || len(f.Children()) != 0 {
t... | explode_data.jsonl/25902 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
9454,
5632,
21346,
11539,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
1166,
8612,
3056,
5632,
198,
197,
59403,
197,
197,
4913,
56521,
497,
3056,
5632,
90,
5,
9454,
5632,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestWrongSecret(t *testing.T) {
req := GivenRequest("POST")
plugin := New()
revision, _, _, proceed, err := plugin.Extract(buildConfig, "wrongsecret", "", req)
if err != webhook.ErrSecretMismatch {
t.Errorf("Expected %v, got %v", webhook.ErrSecretMismatch, err)
}
if proceed {
t.Error("Expected 'proceed'... | explode_data.jsonl/26508 | {
"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,
29185,
19773,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
16246,
1900,
445,
2946,
1138,
197,
9138,
1669,
1532,
741,
197,
28342,
11,
8358,
8358,
10354,
11,
1848,
1669,
9006,
5121,
2144,
43333,
2648,
11,
330,
34870,
20474,
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 Test_nextMultipleOf(t *testing.T) {
type args struct {
n int
m int
}
tests := []struct {
name string
args args
want int
}{
// this function just gives us the next multiple of a particular value;
// test some common occurrences in our system
{"a", args{8, 11}, 11},
{"b", args{24, 11}, 33},
{... | explode_data.jsonl/32830 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 278
} | [
2830,
3393,
11257,
32089,
2124,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
9038,
526,
198,
197,
2109,
526,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
526,
198,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestStringLogicalTypeFallback(t *testing.T) {
schema := `{"type": "string", "logicalType": "this_logical_type_does_not_exist"}`
testSchemaValid(t, schema)
testBinaryCodecPass(t, schema, "test string", []byte("\x16\x74\x65\x73\x74\x20\x73\x74\x72\x69\x6e\x67"))
} | explode_data.jsonl/12001 | {
"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,
703,
64312,
929,
87206,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
1669,
1565,
4913,
1313,
788,
330,
917,
497,
330,
30256,
929,
788,
330,
574,
86484,
1819,
96374,
7913,
35906,
9207,
3989,
18185,
8632,
4088,
1155,
11,
10802,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImpose(t *testing.T) {
var ctx, ctx4 Context
ctx2 := NewTrace()
ctx3 := ctx2.NewParent()
ctx4 = NilContext
fmt.Println("Context: ", ctx, ctx2, ctx3, ctx4, NewTrace())
imp := Message{Hello, nil, time.Now(), ctx2, "world"}
noodle := make(chan Message)
p2p := make(chan Message)
go pirateListen(noodle) //... | explode_data.jsonl/40484 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 375
} | [
2830,
3393,
25216,
960,
1155,
353,
8840,
836,
8,
341,
2405,
5635,
11,
5635,
19,
9608,
198,
20985,
17,
1669,
1532,
6550,
741,
20985,
18,
1669,
5635,
17,
7121,
8387,
741,
20985,
19,
284,
32274,
1972,
198,
11009,
12419,
445,
1972,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestConcurrentCreate(t *testing.T) {
defer runtime.GOMAXPROCS(runtime.NumCPU())
if unprivileged() {
t.Skip("skipping test in unprivileged mode.")
}
var wg sync.WaitGroup
options := BusyboxTemplateOptions
for i := 0; i < 10; i++ {
wg.Add(1)
go func(i int) {
c, err := NewContainer(strconv.Itoa(i))
... | explode_data.jsonl/2744 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 260
} | [
2830,
3393,
1109,
3231,
4021,
1155,
353,
8840,
836,
8,
341,
16867,
15592,
1224,
1898,
2954,
9117,
6412,
89467,
39847,
31615,
12367,
743,
650,
97288,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
304,
650,
97288,
3856,
13053,
197,
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 TestModifyVector(t *testing.T) {
v := New()
v.PushBack(1)
v.PushBack(2)
v.PushBack(3)
//[1,2,3]
assert.Equal(t, 3, v.PopBack())
//[1 2]
v.PushBack(4)
//[1 2 4]
v.SetAt(1, 9)
assert.Equal(t, 9, v.At(1))
//[1 9 4]
v.InsertAt(0, 8)
//[8 1 9 4]
assert.Equal(t, "[8 1 9 4]", v.String())
v.Clear()
ass... | explode_data.jsonl/33852 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
44427,
3781,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
1532,
741,
5195,
34981,
3707,
7,
16,
340,
5195,
34981,
3707,
7,
17,
340,
5195,
34981,
3707,
7,
18,
340,
197,
65637,
16,
11,
17,
11,
18,
921,
6948,
12808,
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... | 1 |
func TestFor(t *testing.T) {
gopClTest(t, `
a := [1, 3.4, 5]
for i := 0; i < 3; i=i+1 {
println(i)
}
for {
println("loop")
}
`, `package main
import fmt "fmt"
func main() {
a := []float64{1, 3.4, 5}
for i := 0; i < 3; i = i + 1 {
fmt.Println(i)
}
for {
fmt.Println("loop")
}
}
`)
} | explode_data.jsonl/73638 | {
"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,
2461,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
22074,
64,
1669,
508,
16,
11,
220,
18,
13,
19,
11,
220,
20,
921,
1958,
600,
1669,
220,
15,
26,
600,
366,
220,
18,
26,
600,
21397,
10,
16,
341,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDebugFlag(t *testing.T) {
clf := CommandLineFlags{
Debug: true,
}
cfg := service.MakeDefaultConfig()
require.False(t, cfg.Debug)
err := Configure(&clf, cfg)
require.NoError(t, err)
require.True(t, cfg.Debug)
} | explode_data.jsonl/47171 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
7939,
12135,
1155,
353,
8840,
836,
8,
341,
39407,
69,
1669,
78218,
9195,
515,
197,
34424,
25,
830,
345,
197,
532,
50286,
1669,
2473,
50133,
3675,
2648,
741,
17957,
50757,
1155,
11,
13286,
20345,
340,
9859,
1669,
22169,
2099,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExpandWithSequence(t *testing.T) {
var seq wfv1.Sequence
var items []wfv1.Item
var err error
seq = wfv1.Sequence{
Count: intstrutil.ParsePtr("10"),
}
items, err = expandSequence(&seq)
assert.NoError(t, err)
assert.Equal(t, 10, len(items))
assert.Equal(t, "0", items[0].GetStrVal())
assert.Equal(t, ... | explode_data.jsonl/70982 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 840
} | [
2830,
3393,
38946,
2354,
14076,
1155,
353,
8840,
836,
8,
341,
2405,
12981,
289,
27890,
16,
63537,
198,
2405,
3589,
3056,
86,
27890,
16,
9399,
198,
2405,
1848,
1465,
271,
78561,
284,
289,
27890,
16,
63537,
515,
197,
197,
2507,
25,
526,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContainerTopError(t *testing.T) {
client := &Client{
client: newMockClient(errorMock(http.StatusInternalServerError, "Server error")),
}
_, err := client.ContainerTop(context.Background(), "nothing", []string{})
if err == nil || err.Error() != "Error response from daemon: Server error" {
t.Fatalf("expe... | explode_data.jsonl/4469 | {
"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,
4502,
5366,
1454,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
609,
2959,
515,
197,
25291,
25,
501,
11571,
2959,
6390,
11571,
19886,
66760,
11,
330,
5475,
1465,
30154,
197,
532,
197,
6878,
1848,
1669,
2943,
33672,
5366,
5378,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTopDownBase64UrlBuiltins(t *testing.T) {
tests := []struct {
note string
rules []string
expected interface{}
}{
{"encode-1", []string{`p = x { base64url.encode("hello", x) }`}, `"aGVsbG8="`},
{"encode-2", []string{`p = x { base64url.encode("there", x) }`}, `"dGhlcmU="`},
{"decode-1", []str... | explode_data.jsonl/25215 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 272
} | [
2830,
3393,
5366,
4454,
3978,
21,
19,
2864,
54300,
1330,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
9038,
1272,
257,
914,
198,
197,
7000,
2425,
262,
3056,
917,
198,
197,
42400,
3749,
16094,
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... | 2 |
func TestCopyDir(t *testing.T) {
type args struct {
src, dst string
}
tests := []struct {
name string
args args
wantErr bool
}{
{
"test copyDir when src is dir",
args{src: "/root/test", dst: "/tmp"},
false,
},
{
"test copyDir when src is not exist",
args{src: "/root/Notexist", dst... | explode_data.jsonl/64622 | {
"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,
12106,
6184,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
41144,
11,
10648,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
198,
197,
50780,
7747,
1807,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMocker_GuildWebhooks(t *testing.T) {
t.Run("success", func(t *testing.T) {
m, s := NewSession(t)
var guildID discord.GuildID = 123
expect := []discord.Webhook{
{
ID: 456,
ChannelID: 789,
GuildID: guildID,
User: discord.User{ID: 012},
},
{
ID: 789,
... | explode_data.jsonl/49376 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 442
} | [
2830,
3393,
11571,
261,
2646,
1498,
5981,
38560,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5630,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
2109,
11,
274,
1669,
1532,
5283,
1155,
692,
197,
2405,
26411,
915,
31041,
1224,
1498,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMutexExcludes(t *testing.T) {
t.Parallel()
dir, remove := mustTempDir(t)
defer remove()
path := filepath.Join(dir, "lock")
mu := lockedfile.MutexAt(path)
t.Logf("mu := MutexAt(_)")
unlock, err := mu.Lock()
if err != nil {
t.Fatalf("mu.Lock: %v", err)
}
t.Logf("unlock, _ := mu.Lock()")
mu2 :=... | explode_data.jsonl/44953 | {
"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,
38099,
840,
7396,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
48532,
11,
4057,
1669,
1969,
12151,
6184,
1155,
340,
16867,
4057,
2822,
26781,
1669,
26054,
22363,
14161,
11,
330,
1023,
5130,
2109,
84,
1669,
16061,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImageRef_WebP(t *testing.T) {
Startup(nil)
srcBytes, err := ioutil.ReadFile(resources + "webp+alpha.webp")
require.NoError(t, err)
src := bytes.NewReader(srcBytes)
img, err := NewImageFromReader(src)
require.NoError(t, err)
require.NotNil(t, img)
defer img.Close()
// check random access by encoding... | explode_data.jsonl/38807 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 191
} | [
2830,
3393,
1906,
3945,
62,
5981,
47,
1155,
353,
8840,
836,
8,
341,
197,
39076,
27907,
692,
41144,
7078,
11,
1848,
1669,
43144,
78976,
52607,
488,
330,
2911,
79,
10,
7141,
6411,
79,
1138,
17957,
35699,
1155,
11,
1848,
692,
41144,
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 TestServiceNotImported(t *testing.T) {
for _, mode := range []EndpointMode{EndpointsOnly, EndpointSliceOnly} {
t.Run(mode.String(), func(t *testing.T) {
c, ic, cleanup := newTestServiceImportCache(mode)
defer cleanup()
ic.createKubeService(t, c)
// Check that the service does not have ClusterSet I... | explode_data.jsonl/50090 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
1860,
2623,
11511,
291,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
3856,
1669,
2088,
3056,
27380,
3636,
90,
80786,
7308,
11,
47269,
33236,
7308,
92,
341,
197,
3244,
16708,
31356,
6431,
1507,
2915,
1155,
353,
8840,
836,
8,
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 TestError_ErrorPassedBack(t *testing.T) {
impl := &serviceImpl{
Method4Fn: func(stream Server_Method4Stream) error {
return errs.New("marker")
},
}
testCompat(t, impl, func(t *testing.T, cli Client, ensure func(*Out, error)) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
... | explode_data.jsonl/9698 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
1454,
28651,
64723,
3707,
1155,
353,
8840,
836,
8,
341,
197,
6383,
1669,
609,
7936,
9673,
515,
197,
84589,
19,
24911,
25,
2915,
20574,
8422,
44844,
19,
3027,
8,
1465,
341,
298,
853,
70817,
7121,
445,
27742,
1138,
197,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetHistoricTrades(t *testing.T) {
t.Parallel()
currencyPair, err := currency.NewPairFromString("BTCUSDT")
if err != nil {
t.Fatal(err)
}
start, err := time.Parse(time.RFC3339, "2020-01-02T15:04:05Z")
if err != nil {
t.Fatal(err)
}
result, err := b.GetHistoricTrades(context.Background(),
currencyP... | explode_data.jsonl/76662 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 251
} | [
2830,
3393,
1949,
48983,
292,
1282,
3452,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
1444,
5088,
12443,
11,
1848,
1669,
11413,
7121,
12443,
44491,
445,
59118,
2034,
10599,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWriter(t *testing.T) {
tests := []*testRec{
mkTestRec("hey\n", ""),
mkTestRec("ho", "with name"),
}
exp := `4 5000
hey
2 5000 with name
ho
`
buf := writeData(t, tests)
d := buf.Bytes()
assert.Equal(t, exp, string(d))
readAndVerifyData(t, bytes.NewBuffer(d), tests)
} | explode_data.jsonl/44789 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
6492,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
29838,
1944,
3820,
515,
197,
2109,
74,
2271,
3820,
445,
35561,
1699,
497,
72712,
197,
2109,
74,
2271,
3820,
445,
6161,
497,
330,
4197,
829,
4461,
197,
532,
48558,
1669,
1565... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransferOfPrivateRWSet(t *testing.T) {
t.Parallel()
chainID := "testChainID"
// First gossip instance
g := &mocks.GossipMock{}
coord1 := new(coordinatorMock)
gossipChannel := make(chan *proto.GossipMessage)
commChannel := make(chan proto.ReceivedMessage)
gossipChannelFactory := func(ch chan *proto.G... | explode_data.jsonl/5647 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2222
} | [
2830,
3393,
21970,
2124,
16787,
56368,
1649,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
8819,
915,
1669,
330,
1944,
18837,
915,
1837,
197,
322,
5512,
57487,
2867,
198,
3174,
1669,
609,
16712,
82,
1224,
41473,
11571,
1609... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNodeDrainerConfig(t *testing.T) {
validConfigs := []struct {
conf string
nodeDrainer api.NodeDrainer
}{
{
conf: `
`,
nodeDrainer: api.NodeDrainer{
Enabled: false,
DrainTimeout: 5,
IAMRole: api.IAMRole{},
},
},
{
conf: `
experimental:
nodeDrainer:
enab... | explode_data.jsonl/4372 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 588
} | [
2830,
3393,
1955,
8847,
1743,
2648,
1155,
353,
8840,
836,
8,
1476,
56322,
84905,
1669,
3056,
1235,
341,
197,
67850,
286,
914,
198,
197,
20831,
8847,
1743,
6330,
21714,
8847,
1743,
198,
197,
59403,
197,
197,
515,
298,
67850,
25,
22074,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOption_WithCheckRedirect(t *testing.T) {
client, err := NewClient("test", "https://goolnk.com/33BD2j",
WithCheckRedirect(func(redirectReq *http.Request, redirectVia []*http.Request) error {
return errors.New("Redirect triggered")
}))
if err != nil {
t.Fatal(err)
}
err = client.Get(nil, "")
assert... | explode_data.jsonl/68688 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 135
} | [
2830,
3393,
5341,
62,
2354,
3973,
17725,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
1532,
2959,
445,
1944,
497,
330,
2428,
1110,
70,
1749,
49436,
905,
14,
18,
18,
9548,
17,
73,
756,
197,
197,
2354,
3973,
17725,
18552,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestConnectClosure(t *testing.T) {
var wg sync.WaitGroup
wg.Add(1)
defer wg.Wait()
srv := serve(func(conn conn) {
defer wg.Done()
_, _, err := conn.ReadMessage()
assert.True(t, websocket.IsCloseError(err, websocket.CloseNormalClosure))
})
defer srv.Close()
conn, err := DefaultDialer.Dial("ws://" + s... | explode_data.jsonl/9351 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 218
} | [
2830,
3393,
14611,
53854,
1155,
353,
8840,
836,
8,
341,
2405,
63581,
12811,
28384,
2808,
198,
72079,
1904,
7,
16,
340,
16867,
63581,
28384,
2822,
1903,
10553,
1669,
8683,
18552,
20571,
4534,
8,
341,
197,
16867,
63581,
60422,
741,
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... | 1 |
func TestMvUnicode(t *testing.T) {
wantTitle := "Меры безопасности для защиты сервера _ petrashov.ru"
src := "unicode.md"
dest := "%title%/index.md"
testFs := newTmpFS(t)
copyFile(t, testFs, filepath.Join("testdata", src), src)
err := mv(testFs, src, dest)
require.NoError(t, err)
require.False(t, fileExists(... | explode_data.jsonl/36834 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 206
} | [
2830,
3393,
44,
85,
33920,
1155,
353,
8840,
836,
8,
341,
50780,
3851,
1669,
330,
37991,
134373,
136762,
19849,
141947,
92764,
1478,
716,
6753,
81,
988,
859,
23581,
698,
41144,
1669,
330,
24519,
21324,
698,
49616,
1669,
5962,
2102,
53381,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMutipleRecursiveExtractStructCache(t *testing.T) {
validate := New()
type Recursive struct {
Field *string `validate:"required,len=5,ne=string"`
}
var test Recursive
current := reflect.ValueOf(test)
name := "Recursive"
proceed := make(chan struct{})
sc := validate.extractStructCache(current, nam... | explode_data.jsonl/77337 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
51440,
3778,
78542,
28959,
9422,
8233,
1155,
353,
8840,
836,
8,
1476,
197,
7067,
1669,
1532,
2822,
13158,
85896,
2036,
341,
197,
94478,
353,
917,
1565,
7067,
2974,
6279,
29619,
28,
20,
11,
811,
28,
917,
8805,
197,
630,
240... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOutgoing(t *testing.T) {
graphSpec := types.GraphSpec{
Edges: []types.Edge{{Source: "n1", Target: "n2"}, {Source: "n1", Target: "n3"}, {Source: "n2", Target: "n4"}},
}
outgoing := Outgoing(&graphSpec, "n1")
if !compare(outgoing, []string{"n2", "n3"}) {
t.Error("")
}
outgoing = Outgoing(&graphSpec... | explode_data.jsonl/62517 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
2662,
9546,
1155,
353,
8840,
836,
8,
1476,
66616,
8327,
1669,
4494,
40237,
8327,
515,
197,
197,
41122,
25,
3056,
9242,
13,
11656,
2979,
3608,
25,
330,
77,
16,
497,
13483,
25,
330,
77,
17,
14345,
314,
3608,
25,
330,
77,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKeyTranslation(t *testing.T) {
pid := test.RandPeerIDFatal(t)
pkname := namesys.PkKeyForID(pid)
ipnsname := ipns.RecordKey(pid)
pkk, err := escapeDhtKey("/pk/" + pid.Pretty())
if err != nil {
t.Fatal(err)
}
ipnsk, err := escapeDhtKey("/ipns/" + pid.Pretty())
if err != nil {
t.Fatal(err)
}
if p... | explode_data.jsonl/49637 | {
"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,
1592,
24412,
1155,
353,
8840,
836,
8,
341,
78799,
1669,
1273,
2013,
437,
30888,
915,
62396,
1155,
340,
3223,
74,
606,
1669,
5036,
1047,
1069,
74,
1592,
2461,
915,
37844,
340,
46531,
4412,
606,
1669,
5997,
4412,
49959,
1592,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildGenericLabels(t *testing.T) {
type testCase struct {
name string
os OperatingSystem
expectedOsLabel string
expectedError bool
}
testCases := []testCase{
{
name: "os linux",
os: OperatingSystemLinux,
expectedOsLabel: "linux",
expect... | explode_data.jsonl/50914 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 735
} | [
2830,
3393,
11066,
19964,
23674,
1155,
353,
8840,
836,
8,
341,
13158,
54452,
2036,
341,
197,
11609,
310,
914,
198,
197,
25078,
1060,
35133,
2320,
198,
197,
42400,
28867,
2476,
914,
198,
197,
42400,
1454,
256,
1807,
198,
197,
532,
18185,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_ToJSON(t *testing.T) {
t.Parallel()
a := assert.New(t)
s := &onedrive.Session{}
data := s.Marshal()
a.Equal(data, `{"AuthURL":"","AccessToken":"","RefreshToken":"","ExpiresAt":"0001-01-01T00:00:00Z"}`)
} | explode_data.jsonl/36102 | {
"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,
38346,
5370,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
1669,
2060,
7121,
1155,
340,
1903,
1669,
609,
19684,
56935,
20674,
31483,
8924,
1669,
274,
37271,
741,
11323,
12808,
2592,
11,
1565,
4913,
5087,
3144,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCLI(t *testing.T) {
snapshotter := cupaloy.New(cupaloy.SnapshotSubdirectory("tests"))
for testName, args := range cliTests {
t.Run(testName, func(t *testing.T) {
output, teardown := setupTest(args)
defer teardown()
runCommand()
err := snapshotter.SnapshotMulti(testName, output)
if err !=... | explode_data.jsonl/76437 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 158
} | [
2830,
3393,
63959,
1155,
353,
8840,
836,
8,
1476,
1903,
9601,
465,
1669,
10525,
278,
2253,
7121,
1337,
20534,
2253,
808,
9601,
3136,
23037,
445,
23841,
28075,
2023,
94396,
11,
2827,
1669,
2088,
21348,
18200,
341,
197,
3244,
16708,
8623,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClassifyFlow(t *testing.T) {
module := NewClassifierModule()
dumpPackets, err := utils.ReadDumpFile("../../godpi_example/dumps/http.cap")
if err != nil {
t.Fatal(err)
}
for i := 0; i < 3; i++ {
<-dumpPackets
}
packet := <-dumpPackets
flow := types.CreateFlowFromPacket(packet)
result := module.Clas... | explode_data.jsonl/61049 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
1957,
1437,
18878,
1155,
353,
8840,
836,
8,
341,
54020,
1669,
1532,
33895,
3332,
741,
2698,
1510,
47,
18382,
11,
1848,
1669,
12439,
6503,
51056,
1703,
36800,
39711,
2493,
39304,
3446,
11793,
15627,
27388,
1138,
743,
1848,
961,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestCalculateExchangeRateAsFloat(t *testing.T) {
desoToDaoCoinBaseUnitsScalingFactor := getDESOToDAOCoinBaseUnitsScalingFactor()
// equivalent to 100.00000001
scaledExchangeRate := uint256.NewInt().Add(
uint256.NewInt().Mul(lib.OneE38, uint256.NewInt().SetUint64(100)), // 100
uint256.NewInt().Div(lib... | explode_data.jsonl/63836 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 583
} | [
2830,
3393,
47866,
31564,
11564,
2121,
5442,
1155,
353,
8840,
836,
8,
341,
2698,
28830,
1249,
12197,
41180,
3978,
26314,
59684,
20661,
1669,
633,
1150,
13880,
1249,
6352,
7612,
1961,
3978,
26314,
59684,
20661,
2822,
197,
322,
13578,
311,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHashDel(t *testing.T) {
s, err := Run()
ok(t, err)
defer s.Close()
c, err := proto.Dial(s.Addr())
ok(t, err)
defer c.Close()
s.HSet("wim", "zus", "jet")
s.HSet("wim", "teun", "vuur")
s.HSet("wim", "gijs", "lam")
s.HSet("wim", "kees", "bok")
mustDo(t, c, "HDEL", "wim", "zus", "gijs", proto.Int(2))
... | explode_data.jsonl/11370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 389
} | [
2830,
3393,
6370,
16532,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
6452,
741,
59268,
1155,
11,
1848,
340,
16867,
274,
10421,
741,
1444,
11,
1848,
1669,
18433,
98462,
1141,
93626,
2398,
59268,
1155,
11,
1848,
340,
16867,
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... | 1 |
func TestUnmarshalFromFileWithPrefix(t *testing.T) {
t.Parallel()
conf := config{}
b := NewConfigReaderBuilder().WithFs(afero.NewOsFs()).WithConfigFile("testdata/config.yaml")
fooURL, err := b.Build().GetString("genCode.downstream.foo.serviceURL")
require.Nil(t, err)
assert.Equal(t, "https://foo.example.com", fo... | explode_data.jsonl/53791 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 301
} | [
2830,
3393,
1806,
27121,
43633,
2354,
14335,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
67850,
1669,
2193,
16094,
2233,
1669,
1532,
2648,
5062,
3297,
1005,
2354,
48300,
2877,
802,
78,
7121,
28867,
48300,
6011,
2354,
2648,
1703... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDownload__lastRefresh(t *testing.T) {
start := time.Now()
time.Sleep(5 * time.Millisecond) // force start to be before our calls
if when := lastRefresh(""); when.Before(start) {
t.Errorf("expected time.Now()")
}
// make a temp dir (initially with nothing in it)
dir, err := ioutil.TempDir("", "lastRef... | explode_data.jsonl/29466 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
11377,
563,
4259,
14567,
1155,
353,
8840,
836,
8,
341,
21375,
1669,
882,
13244,
741,
21957,
31586,
7,
20,
353,
882,
71482,
8,
442,
5344,
1191,
311,
387,
1573,
1039,
6738,
271,
743,
979,
1669,
1537,
14567,
97918,
979,
31153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransformImportedNestedTypes(t *testing.T) {
schema := []byte(`
syntax = "proto3";
package test;
import "google/protobuf/any.proto";
message OtherMessage {
google.protobuf.Any.Type details = 1;
}
`)
input := new(bytes.Buffer)
input.Write(schema)
output := new(bytes.Buffer)
transformer :... | explode_data.jsonl/2072 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 251
} | [
2830,
3393,
8963,
11511,
291,
71986,
4173,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
1669,
3056,
3782,
61528,
197,
1903,
13662,
284,
330,
15110,
18,
876,
197,
197,
1722,
1273,
401,
197,
21918,
330,
17485,
14,
32921,
14,
3767,
57322,
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... | 3 |
func TestAnnotatingExecuteBatchKeyspaceIds(t *testing.T) {
keyspace, shards := setUpSandboxWithTwoShards("TestAnnotatingExecuteBatchKeyspaceIds")
_, err := rpcVTGate.ExecuteBatchKeyspaceIds(
context.Background(),
[]*vtgatepb.BoundKeyspaceIdQuery{
{
Query: &querypb.BoundQuery{
Sql: "INSERT INTO table (... | explode_data.jsonl/7849 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 502
} | [
2830,
3393,
2082,
1921,
1095,
17174,
21074,
8850,
1306,
12701,
1155,
353,
8840,
836,
8,
341,
23634,
8746,
11,
74110,
1669,
18620,
50,
31536,
2354,
11613,
2016,
2347,
445,
2271,
2082,
1921,
1095,
17174,
21074,
8850,
1306,
12701,
1138,
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 TestGetJobsInvalidResponse(t *testing.T) {
httpmock.Activate()
defer httpmock.DeactivateAndReset()
ctx := context.Background()
responder, _ := httpmock.NewJsonResponder(200, invalidTestResponse)
httpmock.RegisterResponder("GET", fakeJobsURL, responder)
client := getTestJobManagerClient()
_, err := client.G... | explode_data.jsonl/32347 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
1949,
40667,
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,
3088... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetHeaderFooter(t *testing.T) {
localFilePath := GetLocalPath(filepath.Join("DocumentElements", "HeaderFooters"), "HeadersFooters.doc")
remoteFolder := path.Join(remoteBaseTestDataFolder, "DocumentElements", "HeaderFooters")
remoteName := "TestGetHeaderFooter.docx"
headerFooterIndex := 0
options := map[s... | explode_data.jsonl/23189 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
1949,
4047,
19445,
1155,
353,
8840,
836,
8,
1476,
8854,
19090,
1669,
2126,
7319,
1820,
34793,
22363,
445,
7524,
11868,
497,
330,
4047,
41820,
388,
3975,
330,
10574,
41820,
388,
23671,
1138,
197,
18147,
13682,
1669,
1815,
22363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestReaderGlobalSeqNum(t *testing.T) {
f, err := os.Open(filepath.FromSlash("testdata/h.sst"))
require.NoError(t, err)
r, err := NewReader(f, ReaderOptions{})
require.NoError(t, err)
const globalSeqNum = 42
r.Properties.GlobalSeqNum = globalSeqNum
iter, err := r.NewIter(nil /* lower */, nil /* upper */)
... | explode_data.jsonl/40342 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
5062,
11646,
20183,
4651,
1155,
353,
8840,
836,
8,
341,
1166,
11,
1848,
1669,
2643,
12953,
34793,
11439,
88004,
445,
92425,
7530,
514,
267,
5455,
17957,
35699,
1155,
11,
1848,
692,
7000,
11,
1848,
1669,
1532,
5062,
955,
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 TestMarshalAndUnmarshalBlock(t *testing.T) {
testBlock := &data.Block{Commands: []data.Command{data.Command("test")}}
testQC := data.CreateQuorumCert(testBlock)
numSigs, _ := rand.Int(rand.Reader, big.NewInt(10))
for j := int64(0); j < numSigs.Int64(); j++ {
id, _ := rand.Int(rand.Reader, big.NewInt(1000))
... | explode_data.jsonl/69359 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 364
} | [
2830,
3393,
55438,
3036,
1806,
27121,
4713,
1155,
353,
8840,
836,
8,
341,
18185,
4713,
1669,
609,
691,
28477,
90,
30479,
25,
3056,
691,
12714,
90,
691,
12714,
445,
1944,
899,
11248,
18185,
61042,
1669,
821,
7251,
2183,
33006,
36934,
862... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDeletedChannelsForTeam(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer th.TearDown()
Client := th.Client
team := th.BasicTeam
channels, resp := Client.GetDeletedChannelsForTeam(team.Id, 0, 100, "")
CheckForbiddenStatus(t, resp)
th.LoginTeamAdmin()
channels, resp = Client.GetDele... | explode_data.jsonl/65648 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 488
} | [
2830,
3393,
1949,
26039,
35925,
2461,
14597,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
1005,
3803,
2320,
7210,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
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... | 5 |
func TestDecompressStreamXz(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Xz not present in msys2")
}
cmd := exec.Command("sh", "-c", "touch /tmp/archive && xz -f /tmp/archive")
output, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("Fail to create an archive file for test : %s.", output)
}
ar... | explode_data.jsonl/81969 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 181
} | [
2830,
3393,
4900,
316,
1873,
3027,
55,
89,
1155,
353,
8840,
836,
8,
341,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
341,
197,
3244,
57776,
445,
55,
89,
537,
3042,
304,
296,
7791,
17,
1138,
197,
532,
25920,
1669,
3883,
12714,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestLiveUpdateInFirstImageOfImageDependency(t *testing.T) {
f := newBDFixture(t, k8s.EnvDockerDesktop, container.RuntimeDocker)
defer f.TearDown()
steps := []model.LiveUpdateSyncStep{model.LiveUpdateSyncStep{
Source: f.JoinPath("sancho-base"),
Dest: "/go/src/github.com/tilt-dev/sancho-base",
}}
lu := ... | explode_data.jsonl/35179 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 326
} | [
2830,
3393,
20324,
4289,
641,
5338,
1906,
2124,
1906,
36387,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
33,
5262,
12735,
1155,
11,
595,
23,
82,
81214,
35,
13659,
23597,
11,
5476,
16706,
35,
13659,
340,
16867,
282,
836,
682,
4454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestForDatabase(t *testing.T) {
assert := assert.New(t)
badSpecs := []string{
"mem:stuff",
"mem::",
"mem:",
"ldb:",
"random:",
"random:random",
"/file/ba:d",
"aws://[t:b]",
"aws://t",
"aws://t:",
}
for _, spec := range badSpecs {
_, err := ForDatabase(spec)
assert.Error(err, spec)
}
... | explode_data.jsonl/49593 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 501
} | [
2830,
3393,
2461,
5988,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
2233,
329,
8327,
82,
1669,
3056,
917,
515,
197,
197,
1,
10536,
25,
57304,
756,
197,
197,
1,
10536,
486,
756,
197,
197,
1,
10536,
55120,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestStruct(t *testing.T) {
testSturctCode(t)
testStructTag(t)
testStructArray(t)
testEmbedded(t)
testStructUseCase(t)
msgpack.StructAsArray = true
testStructUseCase(t)
} | explode_data.jsonl/64222 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
9422,
1155,
353,
8840,
836,
8,
341,
18185,
623,
324,
302,
2078,
1155,
340,
18185,
9422,
5668,
1155,
340,
18185,
9422,
1857,
1155,
340,
18185,
83466,
1155,
692,
18185,
9422,
10253,
4207,
1155,
340,
21169,
4748,
51445,
2121,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshal_Challenge(t *testing.T) {
t.Parallel()
challenge, _ := hex.DecodeString(testChallengeFromAcceptor)
var wt WrapToken
err := wt.Unmarshal(challenge, true)
assert.Nil(t, err, "Unexpected error occurred.")
assert.Equal(t, getChallengeReference(), &wt, "Token not decoded as expected.")
} | explode_data.jsonl/54227 | {
"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,
1806,
27121,
27588,
15832,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
23049,
15832,
11,
716,
1669,
12371,
56372,
703,
8623,
62078,
3830,
11654,
15349,
340,
2405,
40473,
42187,
3323,
198,
9859,
1669,
40473,
38097,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOutOfOrderPodEvents(t *testing.T) {
const (
defaultAllowIPSetName = "weave-E.1.0W^NGSp]0_t5WwH/]gX@L"
runBarIPSetName = "weave-bZ~x=yBgzH)Ht()K*Uv3z{M]Y"
podIP = "10.32.0.10"
)
m := newMockIPSet()
controller := New("qux", false, &mockIPTables{}, &m)
defaultNamespace := &corea... | explode_data.jsonl/31788 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1034
} | [
2830,
3393,
31731,
4431,
23527,
7900,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
11940,
18605,
3298,
69778,
284,
330,
896,
523,
13431,
13,
16,
13,
15,
54,
61,
6140,
6406,
60,
15,
528,
20,
54,
86,
39,
73977,
70,
55,
31,
43,
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... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.