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 TestDataProvenanceSingleFileBundle(t *testing.T) {
f := newFixture(t)
// Dummy up since we are not using ld...
// Note: No bundle 'revision'...
version.Version = "0.10.7"
version.Vcs = "ac23eb45"
version.Timestamp = "today"
version.Hostname = "foo.bar.com"
// No bundle plugin initialized, just a legacy... | explode_data.jsonl/79000 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 441
} | [
2830,
93200,
1336,
1037,
681,
10888,
1703,
8409,
1155,
353,
8840,
836,
8,
1476,
1166,
1669,
501,
18930,
1155,
692,
197,
322,
50567,
705,
2474,
582,
525,
537,
1667,
26129,
9338,
197,
322,
7036,
25,
220,
2308,
12894,
364,
28342,
6,
9338... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWithMetricsUnmarshalers(t *testing.T) {
unmarshaler := &customMetricsUnmarshaler{}
f := NewFactory(WithMetricsUnmarshalers(unmarshaler))
cfg := createDefaultConfig().(*Config)
// disable contacting broker
cfg.Metadata.Full = false
cfg.ProtocolVersion = "2.0.0"
t.Run("custom_encoding", func(t *testing.T... | explode_data.jsonl/70858 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 294
} | [
2830,
3393,
2354,
27328,
1806,
27121,
388,
1155,
353,
8840,
836,
8,
341,
20479,
27121,
261,
1669,
609,
9163,
27328,
1806,
27121,
261,
16094,
1166,
1669,
1532,
4153,
7,
2354,
27328,
1806,
27121,
388,
18364,
27121,
261,
1171,
50286,
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 TestRemittanceOriginatorCountryOfResidenceAlphaNumeric(t *testing.T) {
ro := mockRemittanceOriginator()
ro.RemittanceData.CountryOfResidence = "®"
err := ro.Validate()
require.EqualError(t, err, fieldError("CountryOfResidence", ErrNonAlphanumeric, ro.RemittanceData.CountryOfResidence).Error())
} | explode_data.jsonl/32939 | {
"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,
6590,
87191,
13298,
850,
16408,
2124,
1061,
7087,
19384,
36296,
1155,
353,
8840,
836,
8,
341,
197,
299,
1669,
7860,
6590,
87191,
13298,
850,
741,
197,
299,
11398,
87191,
1043,
62413,
2124,
1061,
7087,
284,
330,
11909,
1837,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMaxLineLengthValidSpec(t *testing.T) {
ctx := context.TODO()
for _, f := range []string{"a", "b"} {
for _, err := range eclint.Lint(ctx, fmt.Sprintf("./testdata/max_line_length/%s", f)) {
if err != nil {
t.Fatalf("no errors where expected, got %s", err)
}
}
}
} | explode_data.jsonl/82394 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
5974,
2460,
4373,
4088,
8327,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
90988,
2822,
2023,
8358,
282,
1669,
2088,
3056,
917,
4913,
64,
497,
330,
65,
9207,
341,
197,
2023,
8358,
1848,
1669,
2088,
59958,
396,
1214,
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... | 4 |
func TestGetMachineReadableFormat(t *testing.T) {
type args struct {
// client *occlient.Client
appName string
projectName string
active bool
}
tests := []struct {
name string
args args
want App
}{
{
name: "Test Case: machine readable output for application",
args: args{
app... | explode_data.jsonl/72393 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1319
} | [
2830,
3393,
1949,
21605,
57938,
4061,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
197,
322,
2943,
414,
353,
509,
2972,
11716,
198,
197,
28236,
675,
257,
914,
198,
197,
72470,
675,
914,
198,
197,
74770,
414,
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... | 1 |
func Test_Hoverfly_SetMiddleware_CanSetRemote(t *testing.T) {
RegisterTestingT(t)
unit := NewHoverflyWithConfiguration(&Configuration{})
muxRouter := mux.NewRouter()
muxRouter.HandleFunc("/process", processHandlerOkay).Methods("POST")
server := httptest.NewServer(muxRouter)
defer server.Close()
err := unit.Se... | explode_data.jsonl/45386 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 219
} | [
2830,
3393,
2039,
1975,
21642,
14812,
24684,
920,
276,
1649,
24703,
1155,
353,
8840,
836,
8,
341,
79096,
16451,
51,
1155,
692,
81189,
1669,
1532,
34379,
21642,
2354,
7688,
2099,
7688,
6257,
692,
2109,
2200,
9523,
1669,
59807,
7121,
9523,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseDefaultConfigEnv(t *testing.T) {
mount, err := CreateMount()
require.NoError(t, err)
require.NotNil(t, mount)
defer func() { assert.NoError(t, mount.Release()) }()
origVal, err := mount.GetConfigOption("log_file")
assert.NoError(t, err)
err = os.Setenv("CEPH_ARGS", "--log_file /dev/null")
assert... | explode_data.jsonl/29517 | {
"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,
14463,
3675,
2648,
14359,
1155,
353,
8840,
836,
8,
341,
2109,
629,
11,
1848,
1669,
4230,
16284,
741,
17957,
35699,
1155,
11,
1848,
340,
17957,
93882,
1155,
11,
6470,
340,
16867,
2915,
368,
314,
2060,
35699,
1155,
11,
6470,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHelmManifestFromChartRepo(t *testing.T) {
service := newService(".")
source := &argoappv1.ApplicationSource{Chart: "my-chart", TargetRevision: ">= 1.0.0"}
request := &apiclient.ManifestRequest{Repo: &argoappv1.Repository{}, ApplicationSource: source, NoCache: true}
response, err := service.GenerateManifest... | explode_data.jsonl/5663 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 250
} | [
2830,
3393,
39,
23162,
38495,
3830,
14488,
25243,
1155,
353,
8840,
836,
8,
341,
52934,
1669,
501,
1860,
5680,
1138,
47418,
1669,
609,
12088,
676,
85,
16,
17521,
3608,
90,
14488,
25,
330,
2408,
44627,
497,
13483,
33602,
25,
330,
9922,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogsExporter_Default(t *testing.T) {
ld := pdata.NewLogs()
le, err := NewLogsExporter(&fakeLogsExporterConfig, componenttest.NewNopExporterCreateSettings(), newPushLogsData(nil))
assert.NotNil(t, le)
assert.NoError(t, err)
assert.Equal(t, consumer.Capabilities{MutatesData: false}, le.Capabilities())
ass... | explode_data.jsonl/59604 | {
"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,
51053,
88025,
60336,
1155,
353,
8840,
836,
8,
341,
197,
507,
1669,
70311,
7121,
51053,
741,
197,
273,
11,
1848,
1669,
1532,
51053,
88025,
2099,
30570,
51053,
88025,
2648,
11,
3692,
1944,
7121,
45,
453,
88025,
4021,
6086,
150... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCrMergedRenameIntoNewDir(t *testing.T) {
test(t,
users("alice", "bob"),
as(alice,
mkfile("a/b", "hello"),
),
as(bob,
disableUpdates(),
),
as(alice,
rename("a/b", "d/e"),
),
as(bob, noSync(),
write("a/c", "world"),
reenableUpdates(),
lsdir("a/", m{"c": "FILE"}),
lsdir("d/",... | explode_data.jsonl/31355 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 289
} | [
2830,
3393,
16001,
44,
51525,
88757,
26591,
3564,
6184,
1155,
353,
8840,
836,
8,
341,
18185,
1155,
345,
197,
90896,
445,
63195,
497,
330,
47086,
4461,
197,
60451,
17643,
558,
345,
298,
2109,
74,
1192,
445,
64,
3470,
497,
330,
14990,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTx_DeleteBucket_ErrTxClosed(t *testing.T) {
db := MustOpenDB()
defer db.MustClose()
tx, err := db.Begin(true)
if err != nil {
t.Fatal(err)
}
if err := tx.Commit(); err != nil {
t.Fatal(err)
}
if err := tx.DeleteBucket([]byte("foo")); err != bolt.ErrTxClosed {
t.Fatalf("unexpected error: %s", err)... | explode_data.jsonl/1695 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
31584,
57418,
36018,
93623,
51,
12125,
9259,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
15465,
5002,
3506,
741,
16867,
2927,
50463,
7925,
741,
46237,
11,
1848,
1669,
2927,
28467,
3715,
340,
743,
1848,
961,
2092,
341,
197,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestGetSourceMount(t *testing.T) {
// must be able to find source mount for /
mnt, _, err := getSourceMount("/")
assert.NilError(t, err)
assert.Equal(t, mnt, "/")
// must be able to find source mount for current directory
cwd, err := os.Getwd()
assert.NilError(t, err)
_, _, err = getSourceMount(cwd)
asse... | explode_data.jsonl/51546 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
1949,
3608,
16284,
1155,
353,
8840,
836,
8,
341,
197,
322,
1969,
387,
2952,
311,
1477,
2530,
6470,
369,
38981,
2109,
406,
11,
8358,
1848,
1669,
71003,
16284,
61710,
6948,
59678,
1454,
1155,
11,
1848,
340,
6948,
12808,
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 TestPolicy_Set(t *testing.T) {
type args struct {
directive string
sources []string
}
tests := []struct {
name string
p *Policy
args args
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt.p.Set(tt.args.directive, tt.args.sources)
})
}
} | explode_data.jsonl/10345 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
13825,
14812,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
2698,
1226,
533,
914,
198,
197,
1903,
2360,
256,
3056,
917,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
3223,
262,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMultiModule_OneBrokenModule(t *testing.T) {
testenv.NeedsGo1Point(t, 15)
const mod = `
-- a/go.mod --
module a.com
go 1.12
-- a/main.go --
package main
-- b/go.mod --
module b.com
go 1.12
require (
example.com v1.2.3
)
-- b/go.sum --
-- b/main.go --
package b
import "example.com/blah"
func main() {
b... | explode_data.jsonl/37375 | {
"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,
20358,
3332,
68201,
90526,
3332,
1155,
353,
8840,
836,
8,
341,
18185,
3160,
2067,
68,
6767,
10850,
16,
2609,
1155,
11,
220,
16,
20,
692,
4777,
1463,
284,
22074,
313,
264,
25525,
10929,
39514,
4352,
264,
905,
271,
3346,
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... | 4 |
func TestReviewHandler_CheckReviewRights(t *testing.T) {
productId := uint64(4)
sess := models.Session{
Value: "fdsfdsfdsf",
UserData: models.UserId{
Id: 3,
},
}
t.Run("CheckReviewRights_success", func(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
reviewUCase := mock.NewMockUs... | explode_data.jsonl/71561 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1029
} | [
2830,
3393,
19432,
3050,
28188,
19432,
81875,
1155,
353,
8840,
836,
8,
341,
197,
46166,
1669,
2622,
21,
19,
7,
19,
340,
1903,
433,
1669,
4119,
20674,
515,
197,
47399,
25,
330,
64834,
64834,
64834,
69,
756,
197,
31672,
1043,
25,
4119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakeDir(t *testing.T) {
//Successfully create directory
err := makeDir(targetTest)
assert.NoError(t, err)
//Failed case
err = makeDir("./azure.go")
var e *os.PathError
if !errors.As(err, &e) {
t.Errorf("Unexpected Error: %v", err)
}
// Remove the directory created
err = os.RemoveAll(targetTest)
... | explode_data.jsonl/36857 | {
"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,
8078,
6184,
1155,
353,
8840,
836,
8,
341,
197,
322,
35959,
1855,
6220,
198,
9859,
1669,
1281,
6184,
8637,
2271,
340,
6948,
35699,
1155,
11,
1848,
692,
197,
322,
9408,
1142,
198,
9859,
284,
1281,
6184,
13988,
39495,
18002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChannelMemberJson(t *testing.T) {
o := ChannelMember{ChannelId: NewId(), UserId: NewId()}
json := o.ToJson()
ro := ChannelMemberFromJson(strings.NewReader(json))
require.Equal(t, o.ChannelId, ro.ChannelId, "ids do not match")
} | explode_data.jsonl/80897 | {
"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,
9629,
9366,
5014,
1155,
353,
8840,
836,
8,
341,
22229,
1669,
13434,
9366,
90,
9629,
764,
25,
1532,
764,
1507,
40883,
25,
1532,
764,
23509,
30847,
1669,
297,
3274,
5014,
741,
197,
299,
1669,
13434,
9366,
3830,
5014,
51442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestForm_Extended_Append(t *testing.T) {
form := &extendedForm{}
form.ExtendBaseWidget(form)
form.Items = []*FormItem{{Text: "test1", Widget: NewEntry()}}
assert.Equal(t, 1, len(form.Items))
form.Append("test2", NewEntry())
assert.True(t, len(form.Items) == 2)
item := &FormItem{Text: "test3", Widget: NewE... | explode_data.jsonl/8945 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
1838,
62,
53190,
36117,
408,
1155,
353,
8840,
836,
8,
341,
37410,
1669,
609,
41098,
1838,
16094,
37410,
16146,
408,
3978,
4548,
16760,
340,
37410,
12054,
284,
29838,
57559,
2979,
1178,
25,
330,
1944,
16,
497,
12980,
25,
1532... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnstructuredHash(t *testing.T) {
cases := []struct {
desc string
unstructured string
hash string
err string
}{
{"minimal", `
apiVersion: test/v1
kind: TestResource
metadata:
name: my-resource`, "244782mkb7", ""},
{"with spec", `
apiVersion: test/v1
kind: TestResource
me... | explode_data.jsonl/32278 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 318
} | [
2830,
3393,
1806,
51143,
6370,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
41653,
260,
914,
198,
197,
20479,
51143,
914,
198,
197,
50333,
260,
914,
198,
197,
9859,
688,
914,
198,
197,
59403,
197,
197,
4913,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPlayerRecentlyPlayed(t *testing.T) {
client, server := testClientFile(http.StatusOK, "test_data/player_recently_played.txt")
defer server.Close()
items, err := client.PlayerRecentlyPlayed()
if err != nil {
t.Fatal(err)
}
if len(items) != 20 {
t.Error("Too few or too many items were returned")
}
... | explode_data.jsonl/80127 | {
"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,
4476,
45137,
85930,
1155,
353,
8840,
836,
8,
341,
25291,
11,
3538,
1669,
1273,
2959,
1703,
19886,
52989,
11,
330,
1944,
1769,
59503,
62361,
398,
22144,
291,
3909,
1138,
16867,
3538,
10421,
2822,
46413,
11,
1848,
1669,
2943,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestApp_ParseSliceFlags(t *testing.T) {
var parsedOption, firstArg string
var parsedIntSlice []int
var parsedStringSlice []string
app := &App{
Commands: []*Command{
{
Name: "cmd",
Flags: []Flag{
&IntSliceFlag{Name: "p", Value: NewIntSlice(), Usage: "set one or more ip addr"},
&StringSli... | explode_data.jsonl/52572 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 654
} | [
2830,
3393,
2164,
77337,
33236,
9195,
1155,
353,
8840,
836,
8,
341,
2405,
15676,
5341,
11,
1156,
2735,
914,
198,
2405,
15676,
1072,
33236,
3056,
396,
198,
2405,
15676,
703,
33236,
3056,
917,
271,
28236,
1669,
609,
2164,
515,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIsLoggingTerminalError(t *testing.T) {
terminalErrs := []error{
errors.New("docker returned: configured logging driver does not support reading"),
&docker.Error{
Status: 501,
Message: "configured logging driver does not support reading",
},
&docker.Error{
Status: 501,
Message: "not imple... | explode_data.jsonl/76336 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 265
} | [
2830,
3393,
3872,
34575,
47890,
1454,
1155,
353,
8840,
836,
8,
341,
197,
36327,
7747,
82,
1669,
3056,
841,
515,
197,
73424,
7121,
445,
28648,
5927,
25,
19755,
8392,
5579,
1558,
537,
1824,
5290,
4461,
197,
197,
5,
28648,
6141,
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... | 3 |
func TestAccAWSDataSourceIAMServerCertificate_matchNamePrefix(t *testing.T) {
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckIAMServerCertificateDestroy,
Steps: []resource.TestStep{
{
Config: testAcc... | explode_data.jsonl/6773 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 178
} | [
2830,
3393,
14603,
36136,
17173,
73707,
5475,
33202,
10708,
675,
14335,
1155,
353,
8840,
836,
8,
341,
50346,
41288,
7957,
2271,
1155,
11,
5101,
31363,
515,
197,
197,
4703,
3973,
25,
257,
2915,
368,
314,
1273,
14603,
4703,
3973,
1155,
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 TestName_mangle(t *testing.T) {
tables := []struct{
input string
expect Expected
}{
{
"FILE",
Expected{ s: "FILE", e: nil },
},
{
"--counter",
Expected{ s: "counter", e: nil },
},
{
"--counter-strike",
... | explode_data.jsonl/35251 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 753
} | [
2830,
3393,
675,
717,
4044,
1155,
353,
8840,
836,
8,
341,
262,
12632,
1669,
3056,
1235,
515,
286,
1946,
914,
198,
286,
1720,
31021,
198,
262,
335,
515,
286,
341,
260,
330,
6041,
756,
260,
31021,
90,
274,
25,
330,
6041,
497,
384,
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 TestChecksOfSameTypeOnSameFileGroupedTogether(t *testing.T) {
scanInstruction := testconfigcreator.NewFileScanInstruction([]*ipb.FileCheck{
&ipb.FileCheck{
FilesToCheck: []*ipb.FileSet{testconfigcreator.SingleFileWithPath("/path")},
CheckType: &ipb.FileCheck_Existence{Existence: &ipb.ExistenceCheck{Sho... | explode_data.jsonl/24459 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 435
} | [
2830,
3393,
49820,
2124,
19198,
929,
1925,
19198,
1703,
2808,
291,
80987,
1155,
353,
8840,
836,
8,
341,
1903,
4814,
16664,
1669,
1273,
1676,
32398,
7121,
1703,
26570,
16664,
85288,
573,
65,
8576,
3973,
515,
197,
197,
5,
573,
65,
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... | 4 |
func TestServerStartClock(t *testing.T) {
defer leaktest.AfterTest(t)()
// Set a high max-offset so that, if the server's clock is pushed by
// MaxOffset, we don't hide that under the latency of the Start operation
// which would allow the physical clock to catch up to the pushed one.
params := base.TestServerArg... | explode_data.jsonl/70827 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 390
} | [
2830,
3393,
5475,
3479,
26104,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
197,
322,
2573,
264,
1550,
1932,
23761,
773,
429,
11,
421,
279,
3538,
594,
8866,
374,
15391,
553,
198,
197,
322,
7487,
6446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQualifiedNameString(t *testing.T) {
testCases := []struct {
in, out string
}{
{"*", "*"},
// Keyword.
{"DATABASE", `"DATABASE"`},
{"dAtAbAse", `"dAtAbAse"`},
// Ident format: starts with [a-zA-Z_] or extended ascii,
// and is then followed by [a-zA-Z0-9$_] or extended ascii.
{"foo$09", "foo$0... | explode_data.jsonl/47775 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 312
} | [
2830,
3393,
92251,
703,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
17430,
11,
700,
914,
198,
197,
59403,
197,
197,
4913,
78729,
15630,
7115,
197,
197,
322,
48970,
624,
197,
197,
4913,
46499,
497,
53305,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFailGracefullyUnknownEntryType(t *testing.T) {
err := add("test", []string{})
if err.Error() != "unknown entry type" {
t.Errorf(`err.Error() = %q, want "unknown entry type"`, err.Error())
}
} | explode_data.jsonl/25080 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 76
} | [
2830,
3393,
19524,
86543,
3641,
13790,
5874,
929,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
912,
445,
1944,
497,
3056,
917,
37790,
743,
1848,
6141,
368,
961,
330,
16088,
4343,
943,
1,
341,
197,
3244,
13080,
5809,
615,
6141,
368,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAllTemplates(t *testing.T) {
ch1 := &chart.Chart{
Metadata: &chart.Metadata{Name: "ch1"},
Templates: []*chart.File{
{Name: "templates/foo", Data: []byte("foo")},
{Name: "templates/bar", Data: []byte("bar")},
},
}
dep1 := &chart.Chart{
Metadata: &chart.Metadata{Name: "laboratory mice"},
Templ... | explode_data.jsonl/74704 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 354
} | [
2830,
3393,
2403,
51195,
1155,
353,
8840,
836,
8,
341,
23049,
16,
1669,
609,
15941,
42667,
515,
197,
9209,
7603,
25,
609,
15941,
46475,
63121,
25,
330,
331,
16,
7115,
197,
10261,
76793,
25,
29838,
15941,
8576,
515,
298,
197,
63121,
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 TestProcessMetrics(t *testing.T) {
// Reset hostname cache
cache.Cache.Flush()
cfg := &config.Config{
// Global tags should be ignored and sent as metadata
TagsConfig: config.TagsConfig{
Env: "test_env",
Tags: []string{"key:val"},
},
}
cfg.Sanitize(zap.NewNop())
ms := []datadog.Metric{
NewGa... | explode_data.jsonl/46798 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 351
} | [
2830,
3393,
7423,
27328,
1155,
353,
8840,
836,
8,
341,
197,
322,
16932,
28115,
6500,
198,
52680,
46130,
61559,
2822,
50286,
1669,
609,
1676,
10753,
515,
197,
197,
322,
7962,
9492,
1265,
387,
12036,
323,
3208,
438,
11160,
198,
197,
10261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkflowRemoveTaskTemplate(t *testing.T) {
workflow := &Workflow{
TaskTemplates: []TaskTemplate{
TaskTemplate{
TaskName: "First",
Initial: true,
},
TaskTemplate{
TaskName: "Second",
Initial: false,
},
TaskTemplate{
TaskName: "Third",
Initial: false,
},
},
}
... | explode_data.jsonl/19599 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 256
} | [
2830,
3393,
62768,
13021,
6262,
7275,
1155,
353,
8840,
836,
8,
341,
197,
56249,
1669,
609,
62768,
515,
197,
81153,
51195,
25,
3056,
6262,
7275,
515,
298,
81153,
7275,
515,
571,
81153,
675,
25,
330,
5338,
756,
571,
197,
6341,
25,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUpdateValidatorByPowerIndex(t *testing.T) {
app, ctx, _, _ := bootstrapValidatorTest(t, 0, 100)
_, addrVals := generateAddresses(app, ctx, 1)
bondedPool := app.StakingKeeper.GetBondedPool(ctx)
notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx)
app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress()... | explode_data.jsonl/6093 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 731
} | [
2830,
3393,
4289,
14256,
1359,
14986,
1552,
1155,
353,
8840,
836,
8,
341,
28236,
11,
5635,
11,
8358,
716,
1669,
26925,
14256,
2271,
1155,
11,
220,
15,
11,
220,
16,
15,
15,
340,
197,
6878,
10789,
52452,
1669,
6923,
52290,
11462,
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 TestMaxDocSize(t *testing.T) {
if testing.Verbose() {
logp.LogInit(logp.LOG_DEBUG, "", false, true, []string{"mongodb", "mongodbdetailed"})
}
// more docs than configured
trans := transaction{
documents: []interface{}{
"1234567",
"123",
"12",
},
}
mongodb := mongodbModForTests()
mongodb.sen... | explode_data.jsonl/35545 | {
"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,
5974,
9550,
1695,
1155,
353,
8840,
836,
8,
341,
743,
7497,
42505,
8297,
368,
341,
197,
6725,
79,
5247,
3803,
12531,
79,
36202,
11139,
11,
7342,
895,
11,
830,
11,
3056,
917,
4913,
37197,
497,
330,
71155,
347,
8940,
10111,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateChainFromBlock(t *testing.T) {
viper.Set("peer.fileSystemPath", "/var/hyperledger/test/")
defer os.RemoveAll("/var/hyperledger/test/")
testChainID := "mytestchainid"
block, err := configtxtest.MakeGenesisBlock(testChainID)
if err != nil {
fmt.Printf("Failed to create a config block, err %s\n", err... | explode_data.jsonl/47991 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1005
} | [
2830,
3393,
4021,
18837,
3830,
4713,
1155,
353,
8840,
836,
8,
341,
5195,
12858,
4202,
445,
16537,
9715,
2320,
1820,
497,
3521,
947,
7530,
39252,
50704,
12697,
53006,
16867,
2643,
84427,
4283,
947,
7530,
39252,
50704,
12697,
53006,
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... | 1 |
func TestEcho(t *testing.T) {
ms := mock.MustCreateTestService(t)
ms.Start()
defer ms.Stop()
message := "hello"
args := &bounce.Bounce_Bounce_Args{
Msg: message,
}
ctx := context.Background()
var result bounce.Bounce_Bounce_Result
ms.MockClients().Echo.EXPECT().Echo(gomock.Any(), &echo.Request{Message: me... | explode_data.jsonl/54098 | {
"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,
74994,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
7860,
50463,
4021,
2271,
1860,
1155,
340,
47691,
12101,
741,
16867,
9829,
30213,
2822,
24753,
1669,
330,
14990,
698,
31215,
1669,
609,
64302,
1785,
9734,
1668,
9734,
87581,
82,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStringRel(t *testing.T) {
want := []struct {
a string
b string
rel float64
}{
{a: "foo", b: "bar", rel: 0.0},
{a: "foo", b: "foo", rel: 1.0},
{a: "foobar", b: "foobaz", rel: 1 - float64(1)/float64(6)},
{a: "", b: "b", rel: 0.0},
{a: "a", b: "", rel: 0.0},
{a: "", b: "", rel: 1.0},
{a:... | explode_data.jsonl/68144 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 351
} | [
2830,
3393,
703,
6740,
1155,
353,
8840,
836,
8,
341,
50780,
1669,
3056,
1235,
341,
197,
11323,
256,
914,
198,
197,
2233,
256,
914,
198,
197,
197,
3748,
2224,
21,
19,
198,
197,
59403,
197,
197,
90,
64,
25,
330,
7975,
497,
293,
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 TestGitCommandCatFile(t *testing.T) {
gitCmd := newDummyGitCommand()
gitCmd.OSCommand.command = func(cmd string, args ...string) *exec.Cmd {
assert.EqualValues(t, "cat", cmd)
assert.EqualValues(t, []string{"test.txt"}, args)
return exec.Command("echo", "-n", "test")
}
o, err := gitCmd.CatFile("test.txt... | explode_data.jsonl/38373 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
46562,
4062,
26801,
1703,
1155,
353,
8840,
836,
8,
341,
90731,
15613,
1669,
501,
43344,
46562,
4062,
741,
90731,
15613,
57054,
4062,
14143,
284,
2915,
14160,
914,
11,
2827,
2503,
917,
8,
353,
11748,
64512,
341,
197,
6948,
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... | 1 |
func TestAvgProposerPriority(t *testing.T) {
// Create Validator set without calling IncrementProposerPriority:
tcs := []struct {
vs ValidatorSet
want int64
}{
0: {ValidatorSet{Validators: []*Validator{{ProposerPriority: 0}, {ProposerPriority: 0}, {ProposerPriority: 0}}}, 0},
1: {ValidatorSet{Validators: [... | explode_data.jsonl/28319 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 358
} | [
2830,
3393,
39447,
2008,
23438,
20555,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
32566,
738,
2041,
8098,
52835,
2008,
23438,
20555,
510,
3244,
4837,
1669,
3056,
1235,
341,
197,
5195,
82,
256,
32566,
1649,
198,
197,
50780,
526,
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... | 2 |
func TestDeleteStmt(t *testing.T) {
buf := NewBuffer()
builder := DeleteFrom("table").Where(Eq("a", 1)).Comment("DELETE TEST")
err := builder.Build(dialect.MySQL, buf)
require.NoError(t, err)
require.Equal(t, "/* DELETE TEST */\nDELETE FROM `table` WHERE (`a` = ?)", buf.String())
require.Equal(t, []interface{}{1}... | explode_data.jsonl/76514 | {
"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,
6435,
31063,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
1532,
4095,
741,
44546,
1669,
10428,
3830,
445,
2005,
1827,
9064,
10722,
80,
445,
64,
497,
220,
16,
4579,
10677,
445,
14424,
13602,
1138,
9859,
1669,
7363,
25212,
1500,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFirstMatchGetsNoRoute(t *testing.T) {
req := events.APIGatewayProxyRequest{
Path: "/test",
HTTPMethod: http.MethodGet,
}
route := &Route{
func(_ events.APIGatewayProxyRequest) bool {
return false
},
dummyHandler,
}
r := NewRouter()
r.AddRoute("test", route)
_, _, err := r.firstMatc... | explode_data.jsonl/4497 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 151
} | [
2830,
3393,
5338,
8331,
49358,
2753,
4899,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
4357,
24922,
40709,
16219,
1900,
515,
197,
69640,
25,
981,
3521,
1944,
756,
197,
197,
9230,
3523,
25,
1758,
20798,
1949,
345,
197,
630,
7000,
2133,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequestRetry(t *testing.T) {
var retryCounter uint
p := &gophercloud.ProviderClient{}
p.UseTokenLock()
p.SetToken(client.TokenID)
p.MaxBackoffRetries = 3
p.RetryBackoffFunc = retryTest(&retryCounter, t)
th.SetupHTTP()
defer th.TeardownHTTP()
th.Mux.HandleFunc("/route", func(w http.ResponseWriter, ... | explode_data.jsonl/5896 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 263
} | [
2830,
3393,
1900,
51560,
1155,
353,
8840,
836,
8,
341,
2405,
22683,
14099,
2622,
271,
3223,
1669,
609,
70,
16940,
12361,
36208,
2959,
16094,
3223,
9046,
3323,
11989,
741,
3223,
4202,
3323,
12805,
32277,
915,
340,
3223,
14535,
3707,
1847,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExportedNonTagged(t *testing.T) {
type Bla struct {
A string
Another string `json:"another"`
yetAnother string // unused because unexported
EvenAYaml string `yaml:"even_a_yaml"`
}
schemaRef, _, err := NewSchemaRefForValue(&Bla{}, UseAllExportedFields())
require.NoError(t, err)
requir... | explode_data.jsonl/55875 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 279
} | [
2830,
3393,
16894,
291,
8121,
5668,
3556,
1155,
353,
8840,
836,
8,
341,
13158,
2502,
64,
2036,
341,
197,
22985,
688,
914,
198,
197,
197,
14037,
262,
914,
1565,
2236,
2974,
41963,
8805,
197,
14522,
295,
14037,
914,
442,
20006,
1576,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateMetricTasksError(t *testing.T) {
run := &v1alpha1.AnalysisRun{
Spec: v1alpha1.AnalysisRunSpec{
Metrics: []v1alpha1.Metric{{
Name: "success-rate",
}},
},
Status: v1alpha1.AnalysisRunStatus{
Phase: v1alpha1.AnalysisPhaseRunning,
MetricResults: []v1alpha1.MetricResult{{
Name: "... | explode_data.jsonl/75813 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 422
} | [
2830,
3393,
31115,
54310,
25449,
1454,
1155,
353,
8840,
836,
8,
341,
56742,
1669,
609,
85,
16,
7141,
16,
8624,
9092,
6727,
515,
197,
7568,
992,
25,
348,
16,
7141,
16,
8624,
9092,
6727,
8327,
515,
298,
9209,
13468,
25,
3056,
85,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMemberChangeRoleNoBoxes(t *testing.T) {
tc, owner, other, _, name := memberSetupMultiple(t)
defer tc.Cleanup()
assertRole(tc, name, owner.Username, keybase1.TeamRole_OWNER)
assertRole(tc, name, other.Username, keybase1.TeamRole_NONE)
// add other.Username as a writer
if err := SetRoleWriter(context.TOD... | explode_data.jsonl/13518 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 372
} | [
2830,
3393,
9366,
4072,
9030,
2753,
93665,
1155,
353,
8840,
836,
8,
341,
78255,
11,
6372,
11,
1008,
11,
8358,
829,
1669,
4462,
21821,
32089,
1155,
340,
16867,
17130,
727,
60639,
2822,
6948,
9030,
44415,
11,
829,
11,
6372,
42777,
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... | 6 |
func TestValidate_UniqueOperationNames_FragmentAndOperationNamedTheSame(t *testing.T) {
testutil.ExpectPassesRule(t, graphql.UniqueOperationNamesRule, `
query Foo {
...Foo
}
fragment Foo on Type {
field
}
`)
} | explode_data.jsonl/23172 | {
"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,
17926,
62,
22811,
8432,
7980,
1400,
6017,
3036,
8432,
15810,
785,
19198,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
81893,
12187,
288,
11337,
1155,
11,
48865,
87443,
8432,
7980,
11337,
11,
22074,
414,
3239,
33428,
341,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetHostPublicIPv4AddressFromEC2MetadataFailWithError(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
ec2MetadataClient := mock_ec2.NewMockEC2MetadataClient(ctrl)
ec2Client := mock_ec2.NewMockClient(ctrl)
agent := &ecsAgent{
ec2MetadataClient: ec2MetadataClient,
ec2Client: ... | explode_data.jsonl/41609 | {
"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,
1949,
9296,
12676,
58056,
19,
4286,
3830,
7498,
17,
14610,
19524,
66102,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
197,
757,
17,
14610,
2959,
1669,
7860... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCustomerMetadata(t *testing.T) {
conn := NewConnection("", false)
m := make(map[string]interface{})
m["integration_name"] = "QBO"
mockCustomer := conn.NewCustomer()
mockCustomer.Id = 34
mockCustomer.Metadata = m
b, err := json.Marshal(mockCustomer)
if err != nil {
t.Fatal(err)
}
if string(b) != `... | explode_data.jsonl/14999 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
12792,
14610,
1155,
353,
8840,
836,
8,
341,
32917,
1669,
1532,
4526,
19814,
895,
340,
2109,
1669,
1281,
9147,
14032,
31344,
37790,
2109,
1183,
60168,
1269,
1341,
284,
330,
48,
4677,
698,
77333,
12792,
1669,
4534,
7121,
12792,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkflow_GetSemaphoreKeys(t *testing.T) {
assert := assert.New(t)
wf := Workflow{
ObjectMeta: metav1.ObjectMeta{
Name: "test",
Namespace: "test",
},
Spec: WorkflowSpec{
Synchronization: &Synchronization{
Semaphore: &SemaphoreRef{ConfigMapKeyRef: &corev1.ConfigMapKeySelector{
Loca... | explode_data.jsonl/26051 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 774
} | [
2830,
3393,
62768,
13614,
74614,
8850,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
6692,
69,
1669,
60173,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
414,
330,
1944,
756,
298,
90823,
25,
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 TestCertificateRequestOperation(t *testing.T) {
certificateARN := "arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012"
domainName := "example.com"
aliases := []string{"www.example.com"}
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockClient := client.NewMock... | explode_data.jsonl/29936 | {
"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,
33202,
1900,
8432,
1155,
353,
8840,
836,
8,
341,
1444,
20962,
9051,
1669,
330,
1885,
25,
8635,
25,
580,
76,
25,
355,
39507,
12,
16,
25,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
16,
17,
25,
63586,
14,
16,
17,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestTerminationPolicy(t *testing.T) {
sset, err := makeStatefulSet(&monitoringv1.Alertmanager{
Spec: monitoringv1.AlertmanagerSpec{},
}, defaultTestConfig, "")
if err != nil {
t.Fatalf("Unexpected error while making StatefulSet: %v", err)
}
for _, c := range sset.Spec.Template.Spec.Containers {
if c.Te... | explode_data.jsonl/25263 | {
"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,
21209,
32096,
13825,
1155,
353,
8840,
836,
8,
341,
1903,
746,
11,
1848,
1669,
1281,
1397,
1262,
1649,
2099,
32225,
287,
85,
16,
40143,
13297,
515,
197,
7568,
992,
25,
16558,
85,
16,
40143,
13297,
8327,
38837,
197,
2137,
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 Test_primePalindrome(t *testing.T) {
ast := assert.New(t)
for _, tc := range tcs {
fmt.Printf("~~%v~~\n", tc)
ast.Equal(tc.ans, primePalindrome(tc.N), "输入:%v", tc)
}
} | explode_data.jsonl/56736 | {
"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,
38217,
68694,
1155,
353,
8840,
836,
8,
341,
88836,
1669,
2060,
7121,
1155,
692,
2023,
8358,
17130,
1669,
2088,
259,
4837,
341,
197,
11009,
19367,
445,
5817,
4,
85,
5817,
59,
77,
497,
17130,
340,
197,
88836,
12808,
44415,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContextTypedError(t *testing.T) {
c, _ := CreateTestContext(httptest.NewRecorder())
c.Error(errors.New("externo 0")).SetType(ErrorTypePublic) // nolint: errcheck
c.Error(errors.New("interno 0")).SetType(ErrorTypePrivate) // nolint: errcheck
for _, err := range c.Errors.ByType(ErrorTypePublic) {
assert.... | explode_data.jsonl/26814 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
1972,
44466,
1454,
1155,
353,
8840,
836,
8,
341,
1444,
11,
716,
1669,
4230,
2271,
1972,
73392,
83,
70334,
7121,
47023,
2398,
1444,
6141,
38881,
7121,
445,
4301,
78,
220,
15,
15197,
1649,
929,
37396,
929,
12676,
8,
220,
442... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateRepoAndID(t *testing.T) {
ctx, cancel, config, tempdir := initConfig(t)
defer cancel()
defer os.RemoveAll(tempdir)
defer libkbfs.CheckConfigAndShutdown(ctx, t, config)
h, err := tlfhandle.ParseHandle(
ctx, config.KBPKI(), config.MDOps(), nil, "user1", tlf.Private)
require.NoError(t, err)
id1, ... | explode_data.jsonl/26650 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 468
} | [
2830,
3393,
4021,
25243,
3036,
915,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
11,
2193,
11,
2730,
3741,
1669,
2930,
2648,
1155,
340,
16867,
9121,
741,
16867,
2643,
84427,
9758,
3741,
340,
16867,
3051,
21310,
3848,
10600,
2648,
3036... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDisconnectOutput(t *testing.T) {
tt := TaskTemplate{
DataPipeTemplates: []DataPipeTemplate{
DataPipeTemplate{
SourceActionName: "Action1",
SourceOutputName: "out1",
TaskOutputName: "out2",
},
},
}
err := tt.DisconnectOutput("out2")
assert.Nil(t, err)
assert.Equal(t, 0, len(tt.Da... | explode_data.jsonl/19606 | {
"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,
60651,
5097,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
5430,
7275,
515,
197,
40927,
34077,
51195,
25,
3056,
1043,
34077,
7275,
515,
298,
40927,
34077,
7275,
515,
571,
197,
3608,
2512,
675,
25,
330,
2512,
16,
756,
571,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestETH_GetTransactionByBlockHashAndIndex(t *testing.T) {
txHash := sendTestTransaction(t)
time.Sleep(time.Second * 5)
param := []string{txHash.String()}
rpcRes := call(t, "eth_getTransactionReceipt", param)
require.Nil(t, rpcRes.Error)
receipt := make(map[string]interface{})
err := json.Unmarshal(rpcRes... | explode_data.jsonl/837 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 305
} | [
2830,
3393,
7625,
13614,
8070,
1359,
4713,
6370,
3036,
1552,
1155,
353,
8840,
836,
8,
341,
46237,
6370,
1669,
3624,
2271,
8070,
1155,
692,
21957,
31586,
9730,
32435,
353,
220,
20,
692,
36037,
1669,
3056,
917,
90,
3998,
6370,
6431,
23509... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_piecesOf(t *testing.T) {
var tests = []struct {
input string
output []string
}{
{"", []string{}},
{"foo", []string{"foo"}},
{"123", []string{"123"}},
{"foo1bar", []string{"foo", "1", "bar"}},
{"2bar3foo", []string{"2", "bar", "3", "foo"}},
}
for _, test := range tests {
result := piecesO... | explode_data.jsonl/40686 | {
"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,
83479,
2124,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
22427,
220,
914,
198,
197,
21170,
3056,
917,
198,
197,
59403,
197,
197,
4913,
497,
3056,
917,
6257,
1583,
197,
197,
4913,
7975,
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... | 3 |
func TestSelectNullLookup(t *testing.T) {
ctx := context.Background()
conn, err := mysql.Connect(ctx, &vtParams)
require.NoError(t, err)
defer conn.Close()
exec(t, conn, "insert into t6(id1, id2) values(1, 'a'), (2, 'b'), (3, null)")
defer exec(t, conn, "set workload = oltp;delete from t6")
for _, workload := ... | explode_data.jsonl/52408 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 569
} | [
2830,
3393,
3379,
3280,
34247,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
32917,
11,
1848,
1669,
10564,
43851,
7502,
11,
609,
9708,
4870,
340,
17957,
35699,
1155,
11,
1848,
340,
16867,
4534,
10421,
2822,
67328,
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... | 1 |
func TestPush(t *testing.T) {
vwoInstance, err := getInstance("./testdata/testdata.json")
assert.Nil(t, err, "error fetching instance")
userID := testdata.GetRandomUser()
tagKey := ""
tagValue := ""
pushed := vwoInstance.Push(tagKey, tagValue, userID)
assert.False(t, pushed, "Invalid params")
tagKey = testdat... | explode_data.jsonl/14283 | {
"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,
16644,
1155,
353,
8840,
836,
8,
341,
5195,
1126,
2523,
11,
1848,
1669,
37886,
13988,
92425,
12697,
691,
4323,
1138,
6948,
59678,
1155,
11,
1848,
11,
330,
841,
44234,
2867,
1138,
19060,
915,
1669,
1273,
691,
2234,
13999,
1474... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScan(t *testing.T) {
s, err := Run()
ok(t, err)
defer s.Close()
c, err := redis.Dial("tcp", s.Addr())
ok(t, err)
// We cheat with scan. It always returns everything.
s.Set("key", "value")
// No problem
{
res, err := redis.Values(c.Do("SCAN", 0))
ok(t, err)
equals(t, 2, len(res))
var c int
... | explode_data.jsonl/23153 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 848
} | [
2830,
3393,
26570,
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,
20870,
98462,
445,
27161,
497,
274,
93626,
2398,
59268,
1155,
11,
1848,
692,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSubQuery(t *testing.T) {
catalogStore, err := store.Open("catalog_subq", store.DefaultOptions())
require.NoError(t, err)
defer os.RemoveAll("catalog_subq")
dataStore, err := store.Open("sqldata_subq", store.DefaultOptions())
require.NoError(t, err)
defer os.RemoveAll("sqldata_subq")
engine, err := New... | explode_data.jsonl/64083 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 937
} | [
2830,
3393,
3136,
2859,
1155,
353,
8840,
836,
8,
341,
1444,
7750,
6093,
11,
1848,
1669,
3553,
12953,
445,
26539,
5228,
80,
497,
3553,
13275,
3798,
2398,
17957,
35699,
1155,
11,
1848,
340,
16867,
2643,
84427,
445,
26539,
5228,
80,
5130,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestObjectPutString(t *testing.T) {
ctx := context.Background()
c, rollback := makeConnectionWithContainer(t)
defer rollback()
err := c.ObjectPutString(ctx, CONTAINER, OBJECT, CONTENTS, "")
if err != nil {
t.Fatal(err)
}
defer func() {
err = c.ObjectDelete(ctx, CONTAINER, OBJECT)
if err != nil {
t.... | explode_data.jsonl/12671 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 268
} | [
2830,
3393,
1190,
19103,
703,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
11,
60414,
1669,
1281,
4526,
2354,
4502,
1155,
340,
16867,
60414,
741,
9859,
1669,
272,
8348,
19103,
703,
7502,
11,
16120,
34521,
11,
39786... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConvertBoolsOptionalToRequired(t *testing.T) {
lines, err := convertTypes(
"Foo", "Bar",
`struct Foo {
1: required bool one
}
struct Bar {
1: optional bool one
}`,
nil,
nil,
)
assert.NoError(t, err)
assertPrettyEqual(t, trim(`
out.One = (*bool)(&(in.One))
`), lines)
} | explode_data.jsonl/62026 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 136
} | [
2830,
3393,
12012,
1233,
3069,
15309,
1249,
8164,
1155,
353,
8840,
836,
8,
341,
78390,
11,
1848,
1669,
5508,
4173,
1006,
197,
197,
1,
40923,
497,
330,
3428,
756,
197,
197,
63,
1235,
33428,
341,
298,
197,
16,
25,
2567,
1807,
825,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSignerAddCommandBadKeyPath(t *testing.T) {
tmpDir, err := ioutil.TempDir("", "docker-sign-test-")
assert.NilError(t, err)
defer os.RemoveAll(tmpDir)
config.SetDir(tmpDir)
cli := test.NewFakeCli(&fakeClient{})
cli.SetNotaryClient(notaryfake.GetEmptyTargetsNotaryRepository)
cmd := newSignerAddCommand(cli... | explode_data.jsonl/23300 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 270
} | [
2830,
3393,
7264,
261,
2212,
4062,
17082,
1592,
1820,
1155,
353,
8840,
836,
8,
341,
20082,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
28648,
27953,
16839,
12,
1138,
6948,
59678,
1454,
1155,
11,
1848,
340,
16867,
2643,
84427,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDecodeBytes(t *testing.T) {
t.Parallel()
re := require.New(t)
key := "abcdefghijklmnopqrstuvwxyz"
for i := 0; i < len(key); i++ {
_, k, err := DecodeBytes(EncodeBytes([]byte(key[:i])))
re.NoError(err)
re.Equal(key[:i], string(k))
}
} | explode_data.jsonl/7540 | {
"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,
32564,
7078,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
17200,
1669,
1373,
7121,
1155,
340,
23634,
1669,
330,
67512,
698,
2023,
600,
1669,
220,
15,
26,
600,
366,
2422,
4857,
1215,
600,
1027,
341,
197,
197,
6878,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLessThanOrEqualToMatcherDatetime(t *testing.T) {
logger := logging.NewLogger(&logging.LoggerOptions{})
attrName := "value"
dto := &dtos.MatcherDTO{
MatcherType: "LESS_THAN_OR_EQUAL_TO",
UnaryNumeric: &dtos.UnaryNumericMatcherDataDTO{
DataType: "DATETIME",
Value: int64(960293532000), // 06/06/20... | explode_data.jsonl/34809 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 475
} | [
2830,
3393,
27451,
89387,
37554,
94191,
1155,
353,
8840,
836,
8,
341,
17060,
1669,
8392,
7121,
7395,
2099,
25263,
12750,
3798,
37790,
60943,
675,
1669,
330,
957,
698,
98864,
1669,
609,
8047,
436,
76452,
14923,
515,
197,
197,
37554,
929,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKubeletReserved(t *testing.T) {
validConfigs := []struct {
conf string
kubeReserved string
systemReserved string
}{
{
conf: `
`,
systemReserved: "",
kubeReserved: "",
},
{
conf: `
kubelet:
kubeReserved: "cpu=100m,memory=100Mi,ephemeral-storage=1Gi"
systemReserved: "... | explode_data.jsonl/4374 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 570
} | [
2830,
3393,
42,
3760,
1149,
53003,
1155,
353,
8840,
836,
8,
1476,
56322,
84905,
1669,
3056,
1235,
341,
197,
67850,
1843,
914,
198,
197,
16463,
3760,
53003,
256,
914,
198,
197,
40293,
53003,
914,
198,
197,
59403,
197,
197,
515,
298,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQueryCondition(t *testing.T) {
setup := func() *queryConditionTestContext {
ctx := &queryConditionTestContext{}
store := mockstore.NewSQLStoreMock()
store.ExpectedDatasource = &models.DataSource{Id: 1, Type: "graphite"}
ctx.reducer = `{"type":"avg"}`
ctx.evaluator = `{"type":"gt","params":[100]}`
... | explode_data.jsonl/32630 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2143
} | [
2830,
3393,
2859,
10547,
1155,
353,
8840,
836,
8,
341,
84571,
1669,
2915,
368,
353,
1631,
10547,
2271,
1972,
341,
197,
20985,
1669,
609,
1631,
10547,
2271,
1972,
16094,
197,
57279,
1669,
7860,
4314,
7121,
6688,
6093,
11571,
741,
197,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenreService_Index(t *testing.T) {
f, err := ioutil.ReadFile(testGenreList)
if err != nil {
t.Fatal(err)
}
init := make([]*Genre, 0)
err = json.Unmarshal(f, &init)
if err != nil {
t.Fatal(err)
}
tests := []struct {
name string
file string
opts []Option
wantGenres []*Genr... | explode_data.jsonl/41086 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 497
} | [
2830,
3393,
37525,
1860,
50361,
1155,
353,
8840,
836,
8,
341,
1166,
11,
1848,
1669,
43144,
78976,
8623,
37525,
852,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
28248,
1669,
1281,
85288,
37525,
11,
220,
15,
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... | 4 |
func TestChannelsService_DeleteVideo(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc("/channels/ch/videos/1", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "DELETE")
})
_, err := client.Channels.DeleteVideo("ch", 1)
if err != nil {
t.Errorf("Channels.DeleteVideo returned unexpected... | explode_data.jsonl/49789 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
35925,
1860,
57418,
10724,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
32425,
21284,
72945,
14,
16,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
18185,
3523,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTraceExporter_NilLogger(t *testing.T) {
te, err := NewTraceExporter(fakeTraceExporterConfig, nil, newTraceDataPusher(nil))
require.Nil(t, te)
require.Equal(t, errNilLogger, err)
} | explode_data.jsonl/70306 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
6550,
88025,
1604,
321,
7395,
1155,
353,
8840,
836,
8,
341,
197,
665,
11,
1848,
1669,
1532,
6550,
88025,
74138,
6550,
88025,
2648,
11,
2092,
11,
501,
6550,
1043,
16644,
261,
27907,
1171,
17957,
59678,
1155,
11,
1013,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestPrivateActivityNoHeatmapHasContentForOtherUser(t *testing.T) {
defer prepareTestEnv(t)()
testPrivateActivityDoSomethingForActionEntries(t)
session := loginUser(t, privateActivityTestOtherUser)
hasContent := testPrivateActivityHelperHasHeatmapContentFromSession(t, session)
assert.True(t, hasContent, "use... | explode_data.jsonl/51665 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
16787,
4052,
2753,
61306,
2186,
10281,
2762,
2461,
11409,
1474,
1155,
353,
8840,
836,
8,
341,
16867,
10549,
2271,
14359,
1155,
8,
741,
18185,
16787,
4052,
5404,
23087,
2461,
2512,
24533,
1155,
692,
25054,
1669,
87169,
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 TestInputBuilderFactoryForAzurePlan(t *testing.T) {
// given
var (
inputComponentList = fixKymaComponentList()
mappedComponentList = mapToGQLComponentConfigurationInput(inputComponentList)
toDisableComponents = []string{"kiali"}
kebOverrides = []*gqlschema.ConfigEntryInput{
{Key: "key-1", Valu... | explode_data.jsonl/69386 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 951
} | [
2830,
3393,
2505,
89139,
2461,
78107,
20485,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
2405,
2399,
197,
22427,
2189,
852,
220,
284,
5046,
42,
1600,
64,
2189,
852,
741,
197,
2109,
5677,
2189,
852,
284,
2415,
1249,
38,
3588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValueBinder_CustomFuncWithError(t *testing.T) {
c := createTestContext("/search?nr=en&id=1&id=101", nil, nil)
b := QueryParamsBinder(c)
id := int64(99)
givenCustomFunc := func(values []string) []error {
assert.Equal(t, []string{"1", "101"}, values)
return []error{
errors.New("first error"),
err... | explode_data.jsonl/82535 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 193
} | [
2830,
3393,
1130,
44055,
57402,
9626,
66102,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1855,
2271,
1972,
4283,
1836,
30,
19618,
61757,
42621,
28,
16,
42621,
28,
16,
15,
16,
497,
2092,
11,
2092,
340,
2233,
1669,
11361,
4870,
44055,
133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBackupErrors(t *testing.T) {
if runtime.GOOS == "windows" {
return
}
env, cleanup := withTestEnvironment(t)
defer cleanup()
testSetupBackupData(t, env)
// Assume failure
inaccessibleFile := filepath.Join(env.testdata, "0", "0", "9", "0")
rtest.OK(t, os.Chmod(inaccessibleFile, 0000))
defer func() {... | explode_data.jsonl/43547 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 328
} | [
2830,
3393,
56245,
13877,
1155,
353,
8840,
836,
8,
341,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
341,
197,
853,
198,
197,
532,
57538,
11,
21290,
1669,
448,
2271,
12723,
1155,
340,
16867,
21290,
2822,
18185,
21821,
56245,
1043,
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 TestModifiersInMultipaths(t *testing.T) {
AddModifier("case", func(jsonStr, arg string) string {
if arg == "upper" {
return strings.ToUpper(jsonStr)
}
if arg == "lower" {
return strings.ToLower(jsonStr)
}
return jsonStr
})
jsonStr := `{"friends": [
{"age": 44, "first": "Dale", "last": "Murphy"... | explode_data.jsonl/43473 | {
"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,
66937,
641,
57251,
26286,
1155,
353,
8840,
836,
8,
341,
37972,
34405,
445,
5638,
497,
2915,
9304,
2580,
11,
1392,
914,
8,
914,
341,
197,
743,
1392,
621,
330,
13574,
1,
341,
298,
853,
9069,
49396,
9304,
2580,
340,
197,
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... | 3 |
func TestUsageSingleTenant(t *testing.T) {
// TODO(emilien): This test is failing for now
t.Skip("This is not passing now, will fix later")
clients.RequireLong(t)
client, err := clients.NewComputeV2Client()
th.AssertNoErr(t, err)
server, err := CreateServer(t, client)
th.AssertNoErr(t, err)
DeleteServer(t, c... | explode_data.jsonl/69634 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 350
} | [
2830,
3393,
14783,
10888,
71252,
1155,
353,
8840,
836,
8,
341,
197,
322,
5343,
52073,
321,
3591,
1648,
1096,
1273,
374,
21394,
369,
1431,
198,
3244,
57776,
445,
1986,
374,
537,
12299,
1431,
11,
686,
5046,
2937,
5130,
197,
31869,
81288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDaoReportUser(t *testing.T) {
var (
c = context.TODO()
id = int64(0)
)
convey.Convey("ReportUser", t, func(ctx convey.C) {
res, err := d.ReportUser(c, id)
ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) {
ctx.So(err, convey.ShouldBeNil)
ctx.So(res, convey.Should... | explode_data.jsonl/51294 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 152
} | [
2830,
3393,
12197,
10361,
1474,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
1444,
220,
284,
2266,
90988,
741,
197,
15710,
284,
526,
21,
19,
7,
15,
340,
197,
340,
37203,
5617,
4801,
5617,
445,
10361,
1474,
497,
259,
11,
2915,
7502... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDecodeAccountStore(t *testing.T) {
cdc := makeTestCodec()
acc := auth.NewBaseAccountWithAddress(delAddr1)
globalAccNumber := uint64(10)
kvPairs := cmn.KVPairs{
cmn.KVPair{Key: auth.AddressStoreKey(delAddr1), Value: cdc.MustMarshalBinaryBare(acc)},
cmn.KVPair{Key: auth.GlobalAccountNumberKey, Value: cd... | explode_data.jsonl/13738 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 436
} | [
2830,
3393,
32564,
7365,
6093,
1155,
353,
8840,
836,
8,
341,
1444,
7628,
1669,
1281,
2271,
36913,
741,
197,
4475,
1669,
4166,
7121,
3978,
7365,
2354,
4286,
55927,
13986,
16,
340,
18842,
14603,
2833,
1669,
2622,
21,
19,
7,
16,
15,
692,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStaleIfErrorRequest(t *testing.T) {
resetTest()
now := time.Now()
tmock := transportMock{
response: &http.Response{
Status: http.StatusText(http.StatusOK),
StatusCode: http.StatusOK,
Header: http.Header{
"Date": []string{now.Format(time.RFC1123)},
"Cache-Control": []string{"n... | explode_data.jsonl/77640 | {
"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,
623,
1574,
2679,
1454,
1900,
1155,
353,
8840,
836,
8,
341,
70343,
2271,
741,
80922,
1669,
882,
13244,
741,
3244,
16712,
1669,
7557,
11571,
515,
197,
21735,
25,
609,
1254,
12574,
515,
298,
58321,
25,
257,
1758,
10538,
1178,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMaxAcceptedHTLCs(t *testing.T) {
t.Parallel()
// We'll kick off the test by creating our channels which both are
// loaded with 5 BTC each.
aliceChannel, bobChannel, cleanUp, err := CreateTestChannels()
if err != nil {
t.Fatalf("unable to create test channels: %v", err)
}
defer cleanUp()
// One ove... | explode_data.jsonl/46449 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 742
} | [
2830,
3393,
5974,
65906,
2545,
8556,
82,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
1205,
3278,
10323,
1007,
279,
1273,
553,
6825,
1039,
11744,
892,
2176,
525,
198,
197,
322,
6661,
448,
220,
20,
36045,
1817,
624,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateOverhead(t *testing.T) {
successCase := []struct {
Name string
overhead core.ResourceList
}{
{
Name: "Valid Overhead for CPU + Memory",
overhead: core.ResourceList{
core.ResourceName(core.ResourceCPU): resource.MustParse("10"),
core.ResourceName(core.ResourceMemory): resour... | explode_data.jsonl/25702 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 374
} | [
2830,
3393,
17926,
1918,
1983,
1155,
353,
8840,
836,
8,
341,
30553,
4207,
1669,
3056,
1235,
341,
197,
21297,
257,
914,
198,
197,
197,
1975,
1983,
6200,
20766,
852,
198,
197,
59403,
197,
197,
515,
298,
21297,
25,
330,
4088,
6065,
1983,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRejectBadTransformer(t *testing.T) {
g := gomega.NewGomegaWithT(t)
isvc := makeTestInferenceService()
isvc.Spec.Default.Transformer = &TransformerSpec{}
g.Expect(isvc.validate(c)).Should(gomega.MatchError(ExactlyOneTransformerViolatedError))
} | explode_data.jsonl/1497 | {
"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,
78413,
17082,
46358,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
340,
19907,
7362,
1669,
1281,
2271,
641,
2202,
1860,
741,
19907,
7362,
36473,
13275,
11815,
34527,
284,
609,
46358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSignature_Verify(t *testing.T) {
sign := "9BTmNxD/GsDQog3GdLZ9yUfzSnTc9ZJbvILMW+Hsxjo="
date := "1635008381"
path := "/v1/pay/method"
method := "POST"
params := `{
"port": "h5",
"area": "china",
"currency": "CNY"
}`
err := New(key, secret, ttl).Verify(path, method, json.RawMessage(params), ... | explode_data.jsonl/40095 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 168
} | [
2830,
3393,
25088,
2334,
261,
1437,
1155,
353,
8840,
836,
8,
1476,
69054,
1669,
330,
24,
17602,
76,
45,
15764,
15792,
82,
35,
48,
538,
18,
38,
67,
43,
57,
24,
88,
52,
69,
89,
20720,
51,
66,
24,
57,
41,
54929,
1715,
54173,
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 TestNamespaceAggregateTilesSkipBootstrappingShards(t *testing.T) {
ctrl := xtest.NewController(t)
defer ctrl.Finish()
ctx := context.NewBackground()
defer ctx.Close()
start := xtime.Now().Truncate(targetBlockSize)
opts, err := NewAggregateTilesOptions(
start, start.Add(targetBlockSize), time.Second, tar... | explode_data.jsonl/35386 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 586
} | [
2830,
3393,
22699,
64580,
58365,
35134,
17919,
495,
3629,
2016,
2347,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
856,
1944,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
20985,
1669,
2266,
7121,
8706,
741,
16867,
5635,
10421,
282... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStaticSplits(t *testing.T) {
defer leaktest.AfterTest(t)()
splits := config.StaticSplits()
for i := 1; i < len(splits); i++ {
if !splits[i-1].Less(splits[i]) {
t.Errorf("previous split %q should be less than next split %q", splits[i-1], splits[i])
}
}
} | explode_data.jsonl/25322 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 116
} | [
2830,
3393,
11690,
50,
39033,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
1903,
39033,
1669,
2193,
58826,
50,
39033,
741,
2023,
600,
1669,
220,
16,
26,
600,
366,
2422,
1141,
39033,
1215,
600,
1027,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestForCompositeResource(t *testing.T) {
name := "coolcomposites.example.org"
labels := map[string]string{"cool": "very"}
annotations := map[string]string{"example.org/cool": "very"}
group := "example.org"
version := "v1beta1"
kind := "CoolComposite"
listKind := "CoolCompositeList"
singular := "coolcompos... | explode_data.jsonl/19843 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3305
} | [
2830,
3393,
2461,
41685,
4783,
1155,
353,
8840,
836,
8,
341,
11609,
1669,
330,
42196,
874,
80139,
7724,
2659,
698,
95143,
1669,
2415,
14032,
30953,
4913,
42196,
788,
330,
1204,
16707,
197,
39626,
1669,
2415,
14032,
30953,
4913,
8687,
2659... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWithCustomBaseURLwithInvalidURL(t *testing.T) {
_, err := Prepare(&http.Request{}, WithCustomBaseURL("hello/{account}.{service}.core.windows.net/",
map[string]interface{}{
"account": "myaccount",
"service": "blob",
}))
if err == nil {
t.Fatalf("autorest: WithCustomBaseURL should fail fo UR... | explode_data.jsonl/20941 | {
"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,
2354,
10268,
3978,
3144,
4197,
7928,
3144,
1155,
353,
8840,
836,
8,
972,
197,
6878,
1848,
1669,
31166,
2099,
1254,
9659,
22655,
3085,
10268,
3978,
3144,
445,
14990,
9388,
4608,
65884,
7936,
7810,
2153,
68113,
5071,
14,
4723,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUserStoreGetByAuthData(t *testing.T) {
Setup()
teamId := model.NewId()
auth := "123" + model.NewId()
u1 := &model.User{}
u1.Email = model.NewId()
u1.AuthData = &auth
u1.AuthService = "service"
Must(store.User().Save(u1))
Must(store.Team().SaveMember(&model.TeamMember{TeamId: teamId, UserId: u1.Id})... | explode_data.jsonl/5099 | {
"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,
1474,
6093,
1949,
1359,
5087,
1043,
1155,
353,
8840,
836,
8,
341,
197,
21821,
2822,
197,
9196,
764,
1669,
1614,
7121,
764,
2822,
78011,
1669,
330,
16,
17,
18,
1,
488,
1614,
7121,
764,
2822,
10676,
16,
1669,
609,
2528,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExample(t *testing.T) {
for i, tc := range tests {
tc := tc
t.Run(fmt.Sprintf("Test %v", i), func(t *testing.T) {
t.Parallel()
input, err := aoc2020.ReadStringRecords(tc.input)
if err != nil {
t.Errorf(err.Error())
}
rules := ParseRules(input[0])
answer := MatchingMessages(input[1... | explode_data.jsonl/22369 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 207
} | [
2830,
3393,
13314,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
17130,
1669,
2088,
7032,
341,
197,
78255,
1669,
17130,
198,
197,
3244,
16708,
28197,
17305,
445,
2271,
1018,
85,
497,
600,
701,
2915,
1155,
353,
8840,
836,
8,
341,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestOpen(t *testing.T) {
const filename = "mmap_test.go"
r, err := Open(filename)
if err != nil {
t.Fatalf("Open: %v", err)
}
got := make([]byte, r.Len())
if _, err := r.ReadAt(got, 0); err != nil && err != io.EOF {
t.Fatalf("ReadAt: %v", err)
}
want, err := ioutil.ReadFile(filename)
if err != nil {
... | explode_data.jsonl/54582 | {
"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,
5002,
1155,
353,
8840,
836,
8,
341,
4777,
3899,
284,
330,
76,
2186,
4452,
18002,
698,
7000,
11,
1848,
1669,
5264,
10961,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
5002,
25,
1018,
85,
497,
1848,
340,
197,
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... | 7 |
func TestWFLevelServiceAccount(t *testing.T) {
woc := newWoc()
woc.execWf.Spec.ServiceAccountName = "foo"
tmplCtx, err := woc.createTemplateContext(wfv1.ResourceScopeLocal, "")
assert.NoError(t, err)
ctx := context.Background()
_, err = woc.executeContainer(ctx, woc.execWf.Spec.Entrypoint, tmplCtx.GetTemplateSco... | explode_data.jsonl/75364 | {
"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,
32131,
4449,
1860,
7365,
1155,
353,
8840,
836,
8,
341,
6692,
509,
1669,
501,
54,
509,
741,
6692,
509,
15776,
54,
69,
36473,
13860,
7365,
675,
284,
330,
7975,
698,
3244,
54010,
23684,
11,
1848,
1669,
289,
509,
2520,
7275,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreatedUpdatedInt64(t *testing.T) {
assert.NoError(t, PrepareEngine())
type CreatedUpdatedInt64 struct {
Id int64
Name string
Value float64 `xorm:"numeric"`
Created int64 `xorm:"created"`
Created2 int64 `xorm:"created"`
Updated int64 `xorm:"updated"`
}
assertSync(t, &Crea... | explode_data.jsonl/19206 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 271
} | [
2830,
3393,
11694,
16196,
1072,
21,
19,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
4571,
12367,
13158,
4290,
16196,
1072,
21,
19,
2036,
341,
197,
67211,
981,
526,
21,
19,
198,
197,
21297,
257,
914,
198,
197,
47399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMigrateEmptyRecord(t *testing.T) {
type args struct {
accounts v034accounts.GenesisState
deposits []v034gov.DepositWithMetadata
}
tests := []struct {
name string
args args
}{
{"No Accounts", args{v034accounts.GenesisState{}, []v034gov.DepositWithMetadata{}}},
{"Deposited account", args{v034acc... | explode_data.jsonl/20850 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 456
} | [
2830,
3393,
44,
34479,
3522,
6471,
1155,
353,
8840,
836,
8,
1476,
13158,
2827,
2036,
341,
197,
197,
26206,
348,
15,
18,
19,
26206,
65384,
13774,
1397,
198,
197,
58351,
966,
1199,
3056,
85,
15,
18,
19,
53203,
34848,
34054,
2354,
14610,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUintJsonUnmarshalAndMarshal(t *testing.T) {
var ts TestUintStruct
jstr := `{"int":10,"float":1.0,"bool":true,"string":"50","null_value":null}`
expected := `{"int":10,"float":1,"bool":1,"string":50,"null_value":null}`
err := json.Unmarshal([]byte(jstr), &ts)
if err != nil {
t.Errorf("Not Expected error w... | explode_data.jsonl/13388 | {
"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,
21570,
5014,
1806,
27121,
3036,
55438,
1155,
353,
8840,
836,
8,
341,
2405,
10591,
3393,
21570,
9422,
198,
12428,
495,
1669,
1565,
4913,
396,
788,
16,
15,
1335,
3649,
788,
16,
13,
15,
1335,
2641,
788,
1866,
1335,
917,
3252,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMigrateWrongDeposit(t *testing.T) {
require.Panics(t, func() {
Migrate(
v034accounts.GenesisState{
accountDeposited,
accountBurned,
},
types.Coins{},
types.DecCoins{},
[]v034gov.DepositWithMetadata{
{
ProposalID: 1,
Deposit: v034gov.Deposit{
ProposalID: 1,
De... | explode_data.jsonl/20851 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
44,
34479,
29185,
78982,
1155,
353,
8840,
836,
8,
341,
17957,
1069,
276,
1211,
1155,
11,
2915,
368,
341,
197,
9209,
34479,
1006,
298,
5195,
15,
18,
19,
26206,
65384,
13774,
1397,
515,
571,
86866,
7839,
436,
1608,
345,
571,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParamsQuery(t *testing.T) {
keeper, ctx := testkeeper.OracleKeeper(t)
wctx := sdk.WrapSDKContext(ctx)
params := types.DefaultParams()
keeper.SetParams(ctx, params)
response, err := keeper.Params(wctx, &types.QueryParamsRequest{})
require.NoError(t, err)
require.Equal(t, &types.QueryParamsResponse{Param... | explode_data.jsonl/28408 | {
"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,
4870,
2859,
1155,
353,
8840,
836,
8,
341,
197,
18861,
11,
5635,
1669,
1273,
18861,
13,
48663,
77233,
1155,
340,
6692,
3773,
1669,
45402,
38968,
31534,
1972,
7502,
340,
25856,
1669,
4494,
13275,
4870,
741,
197,
18861,
4202,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGenTestFilename(t *testing.T) {
cases := []struct {
str string
want string
}{
{"abc", "Abc"},
{"ABC", "aBC"},
{"AbC", "abC"},
{"αβγ", "Αβγ"},
{"123", "123"},
{"1a2", "1A2"},
{"12a", "12A"},
{"⌘", "⌘"},
}
for _, c := range cases {
got := genTestFilename(c.str)
if c... | explode_data.jsonl/72204 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 226
} | [
2830,
3393,
9967,
2271,
20759,
1155,
353,
8840,
836,
8,
972,
1444,
2264,
1669,
3056,
1235,
972,
197,
11355,
220,
914,
319,
197,
50780,
914,
319,
197,
92,
1666,
197,
197,
4913,
13683,
497,
330,
5830,
66,
45426,
197,
197,
4913,
25411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLegacyQueryTaxCaps(t *testing.T) {
input := CreateTestInput(t)
querier := NewLegacyQuerier(input.TreasuryKeeper, input.Cdc)
input.TreasuryKeeper.SetTaxCap(input.Ctx, "ukrw", sdk.NewInt(1000000000))
input.TreasuryKeeper.SetTaxCap(input.Ctx, "usdr", sdk.NewInt(1000000))
input.TreasuryKeeper.SetTaxCap(input... | explode_data.jsonl/6691 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 348
} | [
2830,
3393,
77415,
2859,
31349,
60741,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
4230,
2271,
2505,
1155,
340,
197,
15959,
1268,
1669,
1532,
77415,
2183,
261,
1268,
5384,
836,
265,
26102,
77233,
11,
1946,
727,
7628,
692,
22427,
836,
265... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResolveTerraformModulesOneModuleWithIncludesNoDependencies(t *testing.T) {
t.Parallel()
moduleB := &TerraformModule{
Path: canonical(t, "../test/fixture-modules/module-b/module-b-child"),
Dependencies: []*TerraformModule{},
Config: config.TerragruntConfig{
Terraform: &config.TerraformConfig... | explode_data.jsonl/26635 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 330
} | [
2830,
3393,
56808,
51,
13886,
627,
28201,
3966,
3332,
2354,
55834,
2753,
48303,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
54020,
33,
1669,
609,
51,
13886,
627,
3332,
515,
197,
69640,
25,
260,
42453,
1155,
11,
7005,
1944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRowsImplicitClose(t *testing.T) {
db := newTestDB(t, "people")
defer closeDB(t, db)
rows, err := db.Query("SELECT|people|age,name|")
if err != nil {
t.Fatal(err)
}
want, fail := 2, errors.New("fail")
r := rows.rowsi.(*rowsCursor)
r.errPos, r.err = want, fail
got := 0
for rows.Next() {
got++
}... | explode_data.jsonl/16012 | {
"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,
9024,
59558,
7925,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
501,
2271,
3506,
1155,
11,
330,
16069,
1138,
16867,
3265,
3506,
1155,
11,
2927,
692,
68438,
11,
1848,
1669,
2927,
15685,
445,
4858,
91,
16069,
91,
424,
22006,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.