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 TestComputeDHFailsOnLowOrder(t *testing.T) {
_, locPrivKey := genEphKeys()
for _, remLowOrderPubKey := range blacklist {
shared, err := computeDHSecret(&remLowOrderPubKey, locPrivKey)
assert.Error(t, err)
assert.Equal(t, err, ErrSharedSecretIsZero)
assert.Empty(t, shared)
}
} | explode_data.jsonl/39909 | {
"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,
46254,
35,
49716,
6209,
1925,
24187,
4431,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1329,
32124,
1592,
1669,
4081,
36,
759,
8850,
741,
2023,
8358,
1299,
24187,
4431,
29162,
1592,
1669,
2088,
66049,
341,
197,
197,
6100,
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 TestWaitForBuildToStart(t *testing.T) {
jobName := "ContinuousDelivery/piper-library"
jobID := strings.ReplaceAll(jobName, "/", "/job/")
t.Run("error - build not started", func(t *testing.T) {
// init
buildNumber := int64(43)
task := &mocks.Task{}
task.On("WaitToStart", time.Millisecond).Return(buildNu... | explode_data.jsonl/73397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 274
} | [
2830,
3393,
14190,
2461,
11066,
1249,
3479,
1155,
353,
8840,
836,
8,
341,
68577,
675,
1669,
330,
94780,
38121,
4322,
12858,
52421,
698,
68577,
915,
1669,
9069,
20858,
2403,
28329,
675,
11,
64657,
3521,
8799,
14,
5130,
3244,
16708,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUUID5RFC4122Validation(t *testing.T) {
tests := []struct {
param string
expected bool
}{
{"", false},
{"xxxa987Fbc9-4bed-3078-cf07-9141ba07c9f3", false},
{"9c858901-8a57-4791-81Fe-4c455b099bc9", false},
{"a987Fbc9-4bed-3078-cf07-9141ba07c9f3", false},
{"987Fbc97-4bed-5078-af07-9141ba07c9f3"... | explode_data.jsonl/77271 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 453
} | [
2830,
3393,
24754,
20,
64371,
19,
16,
17,
17,
13799,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
36037,
262,
914,
198,
197,
42400,
1807,
198,
197,
92,
4257,
197,
197,
4913,
497,
895,
1583,
197,
197,
4913,
4146,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateClean(t *testing.T) {
config := createValidTestConfig()
clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil)
clientConfig, err := clientBuilder.ClientConfig()
if err != nil {
t.Errorf("Unexpected error: %v", err)
}
matchStringArg(config.Clusters["clean"].Ser... | explode_data.jsonl/56164 | {
"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,
4021,
27529,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
1855,
4088,
2271,
2648,
741,
25291,
3297,
1669,
1532,
8121,
71686,
2959,
2648,
4071,
1676,
11,
330,
18377,
497,
609,
2648,
80010,
22655,
2092,
692,
25291,
2648,
11,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestContainsAndExcludes(t *testing.T) {
validate := New()
type ImpossibleStringTest struct {
Foo string `validate:"fieldcontains=Bar"`
Bar string `validate:"fieldexcludes=Foo"`
}
impossibleStringTest := &ImpossibleStringTest{
Foo: "foo",
Bar: "bar",
}
errs := validate.Struct(impossibleStringTest)
... | explode_data.jsonl/77301 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
23805,
3036,
840,
7396,
1155,
353,
8840,
836,
8,
341,
197,
7067,
1669,
1532,
2822,
13158,
82652,
703,
2271,
2036,
341,
197,
12727,
2624,
914,
1565,
7067,
2974,
2566,
13372,
28,
3428,
8805,
197,
197,
3428,
914,
1565,
7067,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStartTraceReception(t *testing.T) {
tests := []struct {
name string
host component.Host
wantErr bool
}{
{
name: "nil_host",
wantErr: true,
},
{
name: "valid_host",
host: componenttest.NewNopHost(),
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
... | explode_data.jsonl/53602 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 393
} | [
2830,
3393,
3479,
6550,
693,
995,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
63104,
262,
3692,
29840,
198,
197,
50780,
7747,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerConnectionsLeak(t *testing.T) {
var (
ctx = context.Background()
server = mustServer(t)(NewServer())
addr, listener = newTestListener(t)
client, cleanup = newTestClient(t, addr)
)
defer cleanup()
defer listener.Close()
connectionCountBefore := server.countConnection()
... | explode_data.jsonl/41083 | {
"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,
5475,
54751,
2304,
585,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
20985,
1797,
284,
2266,
19047,
741,
197,
41057,
688,
284,
1969,
5475,
1155,
2376,
3564,
5475,
2398,
197,
53183,
11,
11446,
220,
284,
501,
2271,
2743,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStartStopAdapter(t *testing.T) {
ctx, _ := rectesting.SetupFakeContext(t)
ctx, cancel := context.WithCancel(ctx)
envCfg := NewEnvConfig()
ce := adaptertest.NewTestClient()
adapter := NewAdapter(ctx, envCfg, ce)
done := make(chan struct{})
go func(ctx context.Context) {
err := adapter.Start(ctx)
if... | explode_data.jsonl/48891 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 204
} | [
2830,
3393,
3479,
10674,
5940,
1155,
353,
8840,
836,
8,
341,
20985,
11,
716,
1669,
7608,
59855,
39820,
52317,
1972,
1155,
340,
20985,
11,
9121,
1669,
2266,
26124,
9269,
7502,
340,
57538,
42467,
1669,
1532,
14359,
2648,
2822,
197,
346,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewClusterCommand(t *testing.T) {
fakeRootSettings := &environment.AirshipCTLSettings{
AirshipConfigPath: "../../testdata/k8s/config.yaml",
KubeConfigPath: "../../testdata/k8s/kubeconfig.yaml",
}
fakeRootSettings.InitConfig()
tests := []*testutil.CmdTest{
{
Name: "cluster-cmd-with-help",
... | explode_data.jsonl/46629 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 258
} | [
2830,
3393,
3564,
28678,
4062,
1155,
353,
8840,
836,
8,
341,
1166,
726,
8439,
6086,
1669,
609,
23294,
875,
404,
5270,
23871,
6086,
515,
197,
22985,
404,
5270,
2648,
1820,
25,
10208,
92425,
14109,
23,
82,
14730,
33406,
756,
197,
39340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExponentialGrowth__String(t *testing.T) {
g := &tester.ExponentialGrowth{Precision: 3}
assert.Equal(t, g.String(), "^3")
g = &tester.ExponentialGrowth{Precision: 42}
assert.Equal(t, g.String(), "^42")
g = &tester.ExponentialGrowth{Precision: 100}
assert.Equal(t, g.String(), "^100")
} | explode_data.jsonl/66520 | {
"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,
840,
59825,
38,
19089,
563,
703,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
609,
73358,
5121,
59825,
38,
19089,
90,
55501,
25,
220,
18,
532,
6948,
12808,
1155,
11,
342,
6431,
1507,
39915,
18,
5130,
3174,
284,
609,
73358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFmtDockerOpts(t *testing.T) {
secOpts := []dockerOpt{{"seccomp", "unconfined", ""}}
opts := FmtDockerOpts(secOpts, ':')
assert.Len(t, opts, 1)
assert.Contains(t, opts, "seccomp:unconfined", "Docker 1.10")
opts = FmtDockerOpts(secOpts, '=')
assert.Len(t, opts, 1)
assert.Contains(t, opts, "seccomp=unconf... | explode_data.jsonl/31185 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
93322,
35,
13659,
43451,
1155,
353,
8840,
836,
8,
341,
197,
5024,
43451,
1669,
3056,
28648,
21367,
2979,
1,
325,
638,
14435,
497,
330,
359,
6135,
1589,
497,
1591,
11248,
64734,
1669,
434,
2501,
35,
13659,
43451,
73104,
43451... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInitAccount(t *testing.T) {
testCases := []struct {
desc string
account *Account
email string
keyType string
expectedAccount *Account
}{
{
desc: "Existing account with all information",
account: &Account{
Email: "foo@foo.net",
KeyType: acme.EC2... | explode_data.jsonl/20644 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 845
} | [
2830,
3393,
3803,
7365,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
310,
914,
198,
197,
86866,
260,
353,
7365,
198,
197,
57549,
1843,
914,
198,
197,
23634,
929,
260,
914,
198,
197,
42400,
7365,
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 TestExactValidArgs(t *testing.T) {
tests := []struct {
name string
args []string
wantErr bool
}{
{
name: "no args",
args: []string{},
wantErr: true,
},
{
name: "with correct args",
args: []string{"a"},
wantErr: false,
},
{
name: "with invalid args",
ar... | explode_data.jsonl/59322 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 406
} | [
2830,
3393,
57954,
4088,
4117,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
3056,
917,
198,
197,
50780,
7747,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
262,
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... | 2 |
func TestDockerGetPort(t *testing.T) {
testCases := []struct {
desc string
container docker.ContainerJSON
serverPort string
expected string
}{
{
desc: "no binding, no server port label",
container: containerJSON(name("foo")),
expected: "",
},
{
desc: "binding, no server port l... | explode_data.jsonl/26365 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 611
} | [
2830,
3393,
35,
13659,
1949,
7084,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
981,
914,
198,
197,
53290,
220,
26588,
33672,
5370,
198,
197,
41057,
7084,
914,
198,
197,
42400,
256,
914,
198,
197,
594... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFindKeyAndType(t *testing.T) {
// out is either the matched type in case of a match or the original
// string up till the insertion point.
tests := []struct {
key string
hasExt bool
in, out string
}{
// Don't search past a private use extension.
{"co", false, "en-x-foo-u-co-pinyin", "en"},
... | explode_data.jsonl/27930 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 887
} | [
2830,
3393,
9885,
1592,
3036,
929,
1155,
353,
8840,
836,
8,
341,
197,
322,
700,
374,
2987,
279,
18054,
943,
304,
1142,
315,
264,
2432,
476,
279,
4024,
198,
197,
322,
914,
705,
11956,
279,
35927,
1459,
624,
78216,
1669,
3056,
1235,
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... | 6 |
func TestRowTableAddWithoutGeometry(t *testing.T) {
map_dao := &TableRowAddNonGeomImpl{&DaoImpl{}, false}
service := service.MakeTableRowService(map_dao)
uri_params := map[string]string{"table_id": "42"}
values := url.Values{}
values.Set("with_geometry", "0")
values.Set("name", "Some Name")
request := makeReques... | explode_data.jsonl/15448 | {
"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,
3102,
2556,
2212,
26040,
20787,
1155,
353,
8840,
836,
8,
341,
19567,
814,
3441,
1669,
609,
38558,
2212,
8121,
78708,
9673,
90,
5,
12197,
9673,
22655,
895,
532,
52934,
1669,
2473,
50133,
38558,
1860,
9147,
814,
3441,
340,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestCancelBatchOrders(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test, either api keys or manipulaterealorders isnt set correctly")
}
temp := []string{"4477045999", "4477381751", "4477381751"}
_, err := b.CancelBatchOrders(temp)
if err != nil {
t.E... | explode_data.jsonl/33172 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
9269,
21074,
24898,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
1369,
753,
4814,
92876,
6334,
12768,
24898,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
11,
2987,
6330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseDurationString_ShouldNotParseDurationStringWithOutOfOrderQuantitiesAndUnits(t *testing.T) {
duration, err := ParseDurationString("h1")
assert.EqualError(t, err, "could not parse 'h1' as a duration")
assert.Equal(t, time.Duration(0), duration)
} | explode_data.jsonl/12148 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 87
} | [
2830,
3393,
14463,
12945,
703,
36578,
616,
2623,
14463,
12945,
703,
2354,
31731,
4431,
44220,
1361,
3036,
26314,
1155,
353,
8840,
836,
8,
341,
89300,
11,
1848,
1669,
14775,
12945,
703,
445,
71,
16,
5130,
6948,
12808,
1454,
1155,
11,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDBCreate(t *testing.T) {
for _, item := range content {
var n model.Name
n.Name = item
t.Run(item, func(t *testing.T) {
body, _ := json.Marshal(n)
resp, err := http.Post(endpointPrefix+"/name/create", "application/json", bytes.NewBuffer(body))
if err != nil {
t.Error(err.Error())
}
if... | explode_data.jsonl/64858 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 291
} | [
2830,
3393,
3506,
4021,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1509,
1669,
2088,
2213,
341,
197,
2405,
308,
1614,
2967,
198,
197,
9038,
2967,
284,
1509,
198,
197,
3244,
16708,
5393,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
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... | 4 |
func TestModuleString(t *testing.T) {
input := `package a.b.c
import data.foo.bar
import input.xyz
p = true { not bar }
q = true { xyz.abc = 2 }
wildcard = true { bar[_] = 1 }`
mod := MustParseModule(input)
roundtrip, err := ParseModule("", mod.String())
if err != nil {
t.Fatalf("Unexpected error while parsi... | explode_data.jsonl/65310 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 198
} | [
2830,
3393,
3332,
703,
1155,
353,
8840,
836,
8,
1476,
22427,
1669,
1565,
1722,
264,
948,
520,
271,
474,
821,
58432,
22001,
198,
474,
1946,
55699,
271,
79,
284,
830,
314,
537,
3619,
456,
80,
284,
830,
314,
40511,
13,
13683,
284,
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... | 3 |
func TestGetWorkflowSpecBytes_ByWorkflowManifest(t *testing.T) {
store := NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch())
defer store.Close()
manager := NewResourceManager(store)
spec := &api.PipelineSpec{
WorkflowManifest: "some manifest",
Parameters: []*api.Parameter{
{Name: "param1", Value: "worl... | explode_data.jsonl/28396 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 167
} | [
2830,
3393,
1949,
62768,
8327,
7078,
85996,
62768,
38495,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
1532,
52317,
2959,
2043,
2195,
62396,
67811,
7121,
52317,
1462,
2461,
44338,
2398,
16867,
3553,
10421,
741,
92272,
1669,
1532,
32498,
31200... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVersionedTreeSpecial1(t *testing.T) {
tree := NewMutableTree(db.NewMemDB(), 100)
tree.Set([]byte("C"), []byte("so43QQFN"))
tree.SaveVersion()
tree.Set([]byte("A"), []byte("ut7sTTAO"))
tree.SaveVersion()
tree.Set([]byte("X"), []byte("AoWWC1kN"))
tree.SaveVersion()
tree.Set([]byte("T"), []byte("MhkWj... | explode_data.jsonl/25115 | {
"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,
5637,
291,
6533,
20366,
16,
1155,
353,
8840,
836,
8,
341,
51968,
1669,
1532,
11217,
6533,
9791,
7121,
18816,
3506,
1507,
220,
16,
15,
15,
692,
51968,
4202,
10556,
3782,
445,
34,
3975,
3056,
3782,
445,
704,
19,
18,
48026,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVersionedCheckpointsSpecialCase5(t *testing.T) {
tree := NewMutableTree(db.NewMemDB(), 0)
tree.Set([]byte("R"), []byte("ygZlIzeW"))
tree.SaveVersion()
tree.Set([]byte("j"), []byte("ZgmCWyo2"))
tree.SaveVersion()
tree.Set([]byte("R"), []byte("vQDaoz6Z"))
tree.SaveVersion()
tree.DeleteVersion(1)
tr... | explode_data.jsonl/25131 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
5637,
291,
3973,
7706,
20366,
4207,
20,
1155,
353,
8840,
836,
8,
341,
51968,
1669,
1532,
11217,
6533,
9791,
7121,
18816,
3506,
1507,
220,
15,
692,
51968,
4202,
10556,
3782,
445,
49,
3975,
3056,
3782,
445,
48765,
57,
75,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCopyErrorTarDstLockOutput(t *testing.T) {
env := BuildEnv(t)
imgpkg := Imgpkg{t, Logger{}, env.ImgpkgPath}
_, err := imgpkg.RunWithOpts(
[]string{"copy", "--tty", "-i", env.Image, "--to-tar", "file", "--lock-output", "bogus"},
RunOpts{AllowError: true},
)
if err == nil || !strings.Contains(err.Error(... | explode_data.jsonl/23223 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
12106,
1454,
62733,
54600,
11989,
5097,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
7854,
14359,
1155,
340,
39162,
30069,
1669,
2362,
21888,
7351,
90,
83,
11,
9514,
22655,
6105,
13,
13033,
30069,
1820,
532,
197,
6878,
1848,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestFilterAddLatest(t *testing.T) {
pver := wire.ProtocolVersion
data := []byte{0x01, 0x02}
msg := wire.NewMsgFilterAdd(data)
// Ensure the command is expected value.
wantCmd := "filteradd"
if cmd := msg.Command(); cmd != wantCmd {
t.Errorf("NewMsgFilterAdd: wrong command - got %v want %v",
cmd, wantC... | explode_data.jsonl/14207 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 380
} | [
2830,
3393,
5632,
2212,
31992,
1155,
353,
8840,
836,
8,
341,
3223,
423,
1669,
9067,
54096,
5637,
271,
8924,
1669,
3056,
3782,
90,
15,
87,
15,
16,
11,
220,
15,
87,
15,
17,
532,
21169,
1669,
9067,
7121,
6611,
5632,
2212,
2592,
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... | 5 |
func TestNewVersionHandler(t *testing.T) {
rec := httptest.NewRecorder()
req, _ := http.NewRequest(http.MethodGet, "/version", nil)
version := "2.0.0"
h := NewVersionHandler(version)
h(rec, req)
if rec.Code != http.StatusOK {
t.Errorf("Wrong response code expected %d actual %d",
http.StatusOK, rec.Code)
... | explode_data.jsonl/1926 | {
"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,
3564,
5637,
3050,
1155,
353,
8840,
836,
8,
341,
67904,
1669,
54320,
70334,
7121,
47023,
741,
24395,
11,
716,
1669,
1758,
75274,
19886,
20798,
1949,
11,
3521,
4366,
497,
2092,
340,
74954,
1669,
330,
17,
13,
15,
13,
15,
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... | 3 |
func TestCall_Call_InvalidArgs(t *testing.T) {
mockJSONRPC := &mocks.JSONRPC{}
mockGraphQL := &mocks.GraphQL{}
c := &Client{
c: mockJSONRPC,
g: mockGraphQL,
traceSemaphore: semaphore.NewWeighted(100),
}
ctx := context.Background()
resp, err := c.Call(
ctx,
&RosettaTypes.CallR... | explode_data.jsonl/55499 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 379
} | [
2830,
3393,
7220,
76028,
62,
7928,
4117,
1155,
353,
8840,
836,
8,
341,
77333,
5370,
29528,
1669,
609,
16712,
82,
18009,
29528,
16094,
77333,
88637,
1669,
609,
16712,
82,
40237,
3588,
31483,
1444,
1669,
609,
2959,
515,
197,
1444,
25,
106... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStateTreeConsistency(t *testing.T) {
tf.UnitTest(t)
ctx := context.Background()
bs := bstore.NewBlockstore(repo.NewInMemoryRepo().Datastore())
cst := cborutil.NewIpldStore(bs)
tree := NewState(cst)
var addrs []address.Address
for i := 100; i < 150; i++ {
a, err := address.NewIDAddress(uint64(i))
i... | explode_data.jsonl/9603 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 538
} | [
2830,
3393,
1397,
6533,
15220,
47094,
1155,
353,
8840,
836,
8,
341,
3244,
69,
25159,
2271,
1155,
692,
20985,
1669,
2266,
19047,
741,
93801,
1669,
293,
4314,
7121,
4713,
4314,
50608,
7121,
641,
10642,
25243,
1005,
1043,
4314,
2398,
1444,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFailbackSuceess(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
invoker := mock.NewMockInvoker(ctrl)
clusterInvoker := registerFailback(invoker).(*failbackClusterInvoker)
invoker.EXPECT().GetUrl().Return(failbackUrl).AnyTimes()
invoker.EXPECT().IsAvailable().Return(true)
mockResu... | explode_data.jsonl/6991 | {
"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,
19524,
1419,
50,
10521,
433,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
197,
14057,
10451,
1669,
7860,
7121,
11571,
47668,
62100,
340,
197,
18855,
47668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConverterRecursiveStructWithFieldMap(t *testing.T) {
fieldMap := make(map[string]codegen.FieldMapperEntry)
fieldMap["Five.One"] = codegen.FieldMapperEntry{
QualifiedName: "Five.Two",
Override: true,
}
fieldMap["Five.Two"] = codegen.FieldMapperEntry{
QualifiedName: "Five.One",
Override: tr... | explode_data.jsonl/62098 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 557
} | [
2830,
3393,
14920,
78542,
9422,
2354,
1877,
2227,
1155,
353,
8840,
836,
8,
341,
39250,
2227,
1669,
1281,
9147,
14032,
60,
95859,
17087,
10989,
5874,
340,
39250,
2227,
1183,
37020,
37067,
1341,
284,
2038,
4370,
17087,
10989,
5874,
515,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCreateBlock(t *testing.T) {
tmpdir, err := ioutil.TempDir("", "test")
testutil.Ok(t, err)
defer func() {
testutil.Ok(t, os.RemoveAll(tmpdir))
}()
b, err := OpenBlock(nil, createBlock(t, tmpdir, genSeries(1, 1, 0, 10)), nil)
if err == nil {
testutil.Ok(t, b.Close())
}
testutil.Ok(t, err)
} | explode_data.jsonl/9634 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
4021,
4713,
1155,
353,
8840,
836,
8,
341,
20082,
3741,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
1944,
1138,
18185,
1314,
54282,
1155,
11,
1848,
340,
16867,
2915,
368,
341,
197,
18185,
1314,
54282,
1155,
11,
2643,
8442... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFindIndexOfEmail_Fail(t *testing.T) {
x := []string{"testingATtest.com", "testingAtTest.com", "testingATtest.com"}
got := FindIndexOfEmail(x)
want := -1
if got != want {
t.Errorf("Got: %d, Wanted: %d", got, want)
}
} | explode_data.jsonl/45940 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 94
} | [
2830,
3393,
9885,
27376,
4781,
1400,
604,
1155,
353,
8840,
836,
8,
341,
10225,
1669,
3056,
917,
4913,
8840,
828,
1944,
905,
497,
330,
8840,
1655,
2271,
905,
497,
330,
8840,
828,
1944,
905,
63159,
3174,
354,
1669,
7379,
27376,
4781,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestStatusCmd(t *testing.T) {
releasesMockWithStatus := func(info *release.Info, hooks ...*release.Hook) []*release.Release {
info.LastDeployed = helmtime.Unix(1452902400, 0).UTC()
return []*release.Release{{
Name: "flummoxed-chickadee",
Namespace: "default",
Info: info,
Chart: &char... | explode_data.jsonl/50600 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1192
} | [
2830,
3393,
2522,
15613,
1155,
353,
8840,
836,
8,
341,
17200,
28299,
11571,
2354,
2522,
1669,
2915,
14208,
353,
22998,
20132,
11,
29677,
2503,
9,
22998,
3839,
1941,
8,
29838,
22998,
58693,
341,
197,
27043,
24682,
69464,
291,
284,
33765,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParticipantArbitraryIds(t *testing.T) {
_, err := NewParticipant(3, 2, testGenerator, curves.NewK256Scalar(), 4)
require.Error(t, err)
_, err = NewParticipant(0, 2, testGenerator, curves.NewK256Scalar(), 1)
require.Error(t, err)
_, err = NewParticipant(2, 2, testGenerator, curves.NewK256Scalar(), 2, 3, 5)... | explode_data.jsonl/77873 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
67504,
6953,
87851,
12701,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
1532,
67504,
7,
18,
11,
220,
17,
11,
1273,
12561,
11,
35933,
7121,
42,
17,
20,
21,
20639,
1507,
220,
19,
340,
17957,
6141,
1155,
11,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewTx(t *testing.T) {
t.Parallel()
t.Run("new tx, defaults", func(t *testing.T) {
tx := bt.NewTx()
assert.NotNil(t, tx)
assert.IsType(t, &bt.Tx{}, tx)
assert.Equal(t, uint32(1), tx.Version)
assert.Equal(t, uint32(0), tx.LockTime)
assert.Equal(t, 0, tx.InputCount())
assert.Equal(t, 0, tx.Output... | explode_data.jsonl/28734 | {
"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,
3564,
31584,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3244,
16708,
445,
931,
9854,
11,
16674,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
46237,
1669,
19592,
7121,
31584,
741,
197,
6948,
93882,
1155,
11,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJsonListValue_Get_OutOfRange(t *testing.T) {
list := NewJSONList(NewRegistry(), &structpb.ListValue{Values: []*structpb.Value{
{Kind: &structpb.Value_StringValue{StringValue: "hello"}},
{Kind: &structpb.Value_NumberValue{NumberValue: 1}}}})
if !IsError(list.Get(Int(-1))) {
t.Error("Negative index did n... | explode_data.jsonl/55360 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 202
} | [
2830,
3393,
5014,
852,
1130,
13614,
36675,
2124,
6046,
1155,
353,
8840,
836,
8,
341,
14440,
1669,
1532,
5370,
852,
35063,
15603,
1507,
609,
1235,
16650,
5814,
1130,
90,
6227,
25,
29838,
1235,
16650,
6167,
515,
197,
197,
90,
10629,
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... | 4 |
func TestGetSnapshotByID(t *testing.T) {
testCases := []struct {
name string
testFunc func(t *testing.T)
}{
{
name: "snapshotID not valid",
testFunc: func(t *testing.T) {
sourceVolumeID := "unit-test"
ctx := context.Background()
d, _ := NewFakeDriver(t)
d.cloud = &azure.Cloud{}
sna... | explode_data.jsonl/59392 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 908
} | [
2830,
3393,
1949,
15009,
60572,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
18185,
9626,
2915,
1155,
353,
8840,
836,
340,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
35501,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLoadAndMergeConfig(t *testing.T) {
tmpDir, err := ioutil.TempDir("", "merge-config")
require.NoError(t, err)
defer os.RemoveAll(tmpDir)
// No registries.d exists
config, err := loadAndMergeConfig(filepath.Join(tmpDir, "thisdoesnotexist"))
require.NoError(t, err)
assert.Equal(t, ®istryConfiguration{D... | explode_data.jsonl/63962 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1765
} | [
2830,
3393,
5879,
3036,
52096,
2648,
1155,
353,
8840,
836,
8,
341,
20082,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
19052,
25130,
1138,
17957,
35699,
1155,
11,
1848,
340,
16867,
2643,
84427,
10368,
6184,
692,
197,
322,
2308,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCharsetDecoder(t *testing.T) {
tests := []struct {
src string
want string
charsets []string
content []string
}{
{"=?utf-8?b?Q2Fmw6k=?=", "Café", nil, nil},
{"=?ISO-8859-1?Q?caf=E9?=", "café", nil, nil},
{"=?US-ASCII?Q?foo_bar?=", "foo bar", nil, nil},
{"=?utf-8?Q?=?=", "=?utf-8?Q?=?... | explode_data.jsonl/36206 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 727
} | [
2830,
3393,
78172,
20732,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
41144,
414,
914,
198,
197,
50780,
257,
914,
198,
197,
7450,
4917,
3056,
917,
198,
197,
27751,
220,
3056,
917,
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... | 4 |
func TestBackupAsOfSystemTime(t *testing.T) {
defer leaktest.AfterTest(t)()
const numAccounts = 1000
ctx, _, sqlDB, _, cleanupFn := BackupRestoreTestSetup(t, singleNode, numAccounts, InitNone)
defer cleanupFn()
var beforeTs, equalTs string
var rowCount int
sqlDB.QueryRow(t, `SELECT cluster_logical_timestamp(... | explode_data.jsonl/57594 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 651
} | [
2830,
3393,
56245,
2121,
2124,
2320,
1462,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
4777,
1629,
41369,
284,
220,
16,
15,
15,
15,
271,
20985,
11,
8358,
5704,
3506,
11,
8358,
21290,
24911,
1669,
4343... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_store_LazyQuery(t *testing.T) {
tests := []struct {
name string
req *logproto.QueryRequest
expected []*logproto.Stream
}{
{
"all",
newQuery("{foo=~\"ba.*\"}", from, from.Add(6*time.Millisecond), logproto.FORWARD),
[]*logproto.Stream{
{
Labels: "{foo=\"bar\"}",
Entrie... | explode_data.jsonl/58941 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2173
} | [
2830,
3393,
14809,
2351,
13619,
2859,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
24395,
414,
353,
839,
15110,
15685,
1900,
198,
197,
42400,
29838,
839,
15110,
33308,
198,
197,
59403,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSeriesSort(t *testing.T) {
tRef := time.Date(2017, 1, 1, 5, 30, 12, 0, time.UTC)
// Create new series
init := []Series{
NewSeriesFloat64("test", &SeriesInit{1, 0}, nil, 1.0, 2.0, 3.0, nil),
NewSeriesInt64("test", &SeriesInit{1, 0}, nil, 1, 2, 3, nil),
NewSeriesString("test", &SeriesInit{1, 0}, nil, ... | explode_data.jsonl/10003 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 805
} | [
2830,
3393,
25544,
10231,
1155,
353,
8840,
836,
8,
1476,
3244,
3945,
1669,
882,
8518,
7,
17,
15,
16,
22,
11,
220,
16,
11,
220,
16,
11,
220,
20,
11,
220,
18,
15,
11,
220,
16,
17,
11,
220,
15,
11,
882,
87069,
692,
197,
322,
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 TestAccKeycloakSamlIdentityProvider_basic(t *testing.T) {
t.Parallel()
samlName := acctest.RandomWithPrefix("tf-acc")
resource.Test(t, resource.TestCase{
ProviderFactories: testAccProviderFactories,
PreCheck: func() { testAccPreCheck(t) },
CheckDestroy: testAccCheckKeycloakSamlIdentityProv... | explode_data.jsonl/76728 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 215
} | [
2830,
3393,
14603,
1592,
88751,
50,
9467,
18558,
5179,
34729,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1903,
9467,
675,
1669,
1613,
67880,
26709,
2354,
14335,
445,
8935,
12,
4475,
5130,
50346,
8787,
1155,
11,
5101,
31363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPhaseNetwork(t *testing.T) {
runTestPhase(t, "lifecyclephases.example.com", "lifecycle_phases", "v1alpha2", true, 1, cloudup.PhaseNetwork)
} | explode_data.jsonl/17507 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 57
} | [
2830,
3393,
30733,
12320,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
30733,
1155,
11,
330,
75,
19517,
759,
2264,
7724,
905,
497,
330,
75,
19517,
9782,
2264,
497,
330,
85,
16,
7141,
17,
497,
830,
11,
220,
16,
11,
9437,
454,
35989,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSynRcvdBadSeqNumber(t *testing.T) {
c := context.New(t, defaultMTU)
defer c.Cleanup()
// Create TCP endpoint.
var err tcpip.Error
c.EP, err = c.Stack().NewEndpoint(tcp.ProtocolNumber, ipv4.ProtocolNumber, &c.WQ)
if err != nil {
t.Fatalf("NewEndpoint failed: %s", err)
}
// Bind to wildcard.
if err ... | explode_data.jsonl/76012 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1244
} | [
2830,
3393,
37134,
49,
13122,
67,
17082,
20183,
2833,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2266,
7121,
1155,
11,
1638,
8505,
52,
340,
16867,
272,
727,
60639,
2822,
197,
322,
4230,
26656,
14887,
624,
2405,
1848,
28051,
573,
6141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMaxInFlightMutating(t *testing.T) {
const AllowedMutatingInflightRequestsNo = 3
calls := &sync.WaitGroup{}
calls.Add(AllowedMutatingInflightRequestsNo)
responses := &sync.WaitGroup{}
responses.Add(AllowedMutatingInflightRequestsNo)
// Block is used to keep requests in flight for as long as we need to.... | explode_data.jsonl/68213 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 642
} | [
2830,
3393,
5974,
641,
45305,
51440,
1095,
1155,
353,
8840,
836,
8,
341,
4777,
57622,
51440,
1095,
641,
38390,
35295,
2753,
284,
220,
18,
271,
1444,
5583,
1669,
609,
12996,
28384,
2808,
16094,
1444,
5583,
1904,
7,
35382,
51440,
1095,
64... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestToStringKeys(t *testing.T) {
var test1 interface{} = map[interface{}]interface{}{
"Adam": "Smith",
"Isaac": "Newton",
}
result1, err := toStringKeys(test1)
th.AssertNoErr(t, err)
expected := map[string]interface{}{
"Adam": "Smith",
"Isaac": "Newton",
}
th.AssertDeepEquals(t, result1, expected... | explode_data.jsonl/23275 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
5870,
8850,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
16,
3749,
6257,
284,
2415,
58,
4970,
78134,
4970,
67066,
197,
197,
1,
37575,
788,
220,
330,
41885,
756,
197,
197,
1,
3872,
64705,
788,
330,
76377,
756,
197,
532,
9559... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetDeviceByName(t *testing.T) {
client, _, device, err := test.NewClientServer()
if err != nil {
t.Fatal(err)
}
assert := assert.New(t)
device2, err := client.GetDeviceByName(device.Name)
assert.NoError(err)
assert.EqualValues(device, device2)
} | explode_data.jsonl/34116 | {
"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,
1949,
6985,
16898,
1155,
353,
8840,
836,
8,
341,
25291,
11,
8358,
3671,
11,
1848,
1669,
1273,
7121,
2959,
5475,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
6948,
1669,
2060,
7121,
1155,
692,
5471... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKubeadmConfigReconciler_Reconcile_ReturnNilIfReferencedMachineIsNotFound(t *testing.T) {
g := NewWithT(t)
machine := newMachine(nil, "machine")
config := newKubeadmConfig(machine, "cfg")
objects := []client.Object{
// intentionally omitting machine
config,
}
myclient := helpers.NewFakeClientWithSch... | explode_data.jsonl/44310 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 231
} | [
2830,
3393,
42,
392,
3149,
76,
2648,
693,
40446,
5769,
50693,
40446,
457,
53316,
19064,
2679,
47447,
5767,
21605,
3872,
10372,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
2354,
51,
1155,
692,
2109,
3814,
1669,
501,
21605,
27907,
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 TestGCPBuilder(t *testing.T) {
test.CmdValidator(
t,
GCPBuilder(),
0,
[]string{flag.Output, flag.ProjectID, flag.GCPProjectID, flag.Network, flag.AtlasCIDRBlock, flag.Region},
)
} | explode_data.jsonl/1544 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
38,
7123,
3297,
1155,
353,
8840,
836,
8,
341,
18185,
64512,
14256,
1006,
197,
3244,
345,
197,
9600,
7123,
3297,
3148,
197,
197,
15,
345,
197,
197,
1294,
917,
90,
9903,
34246,
11,
5181,
30944,
915,
11,
5181,
1224,
7123,
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 |
func TestNewPRMMatchRepository(t *testing.T) {
_prm := NewPRMMatchRepository()
prm, ok := _prm.(*prmMatchRepository)
require.True(t, ok)
assert.Equal(t, &prmMatchRepository{prmCommon{prmTypeMatchRepository}}, prm)
} | explode_data.jsonl/36515 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
3564,
6480,
8035,
754,
4624,
1155,
353,
8840,
836,
8,
341,
197,
5294,
76,
1669,
1532,
6480,
8035,
754,
4624,
741,
25653,
76,
11,
5394,
1669,
716,
94043,
41399,
94043,
8331,
4624,
340,
17957,
32443,
1155,
11,
5394,
340,
694... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProviderSecretConfig(t *testing.T) {
integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "provider_secret_config",
Dependencies: []string{"@pulumi/pulumi"},
Quick: true,
})
} | explode_data.jsonl/76370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
5179,
19773,
2648,
1155,
353,
8840,
836,
8,
341,
2084,
17376,
80254,
2271,
1155,
11,
609,
60168,
80254,
2271,
3798,
515,
197,
197,
6184,
25,
688,
330,
19979,
21962,
5332,
756,
197,
197,
48303,
25,
3056,
917,
4913,
31,
79,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestTargetBlankNoOpener(t *testing.T) {
p := UGCPolicy()
p.AddTargetBlankToFullyQualifiedLinks(true)
p.AllowAttrs("target").Matching(Paragraph).OnElements("a")
tests := []test{
{
in: `<a href="/path" />`,
expected: `<a href="/path" rel="nofollow"/>`,
},
{
in: `<a href="/path" target... | explode_data.jsonl/28806 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 899
} | [
2830,
3393,
6397,
22770,
2753,
7125,
798,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
547,
38,
7123,
8018,
741,
3223,
1904,
6397,
22770,
1249,
67386,
65993,
24089,
3715,
340,
3223,
29081,
53671,
445,
5657,
1827,
64430,
7,
42165,
568,
1925... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNodeResource(t *testing.T) {
c := NewTestCluster()
ctx := context.Background()
nodename := "testnode"
store := &storemocks.Store{}
c.store = store
lock := &lockmocks.DistributedLock{}
store.On("CreateLock", mock.Anything, mock.Anything).Return(lock, nil)
lock.On("Lock", mock.Anything).Return(context.TO... | explode_data.jsonl/67526 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 982
} | [
2830,
3393,
1955,
4783,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
2271,
28678,
741,
20985,
1669,
2266,
19047,
741,
9038,
347,
1840,
1669,
330,
1944,
3509,
698,
57279,
1669,
609,
4314,
16712,
82,
38047,
16094,
1444,
16114,
284,
355... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetRawContainerInfoRoot(t *testing.T) {
var (
mockCadvisor = new(cadvisortest.Mock)
mockPodManager = new(kubepodtest.MockManager)
mockRuntimeCache = new(kubecontainertest.MockRuntimeCache)
cadvisorReq = &cadvisorapiv1.ContainerInfoRequest{}
containerPath = "/"
containerInfo = &cadvisorapi... | explode_data.jsonl/3071 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 284
} | [
2830,
3393,
1949,
20015,
4502,
1731,
8439,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
77333,
34,
81794,
257,
284,
501,
1337,
329,
2682,
371,
477,
24664,
340,
197,
77333,
23527,
2043,
256,
284,
501,
5969,
392,
747,
347,
1944,
24664... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAutoRetryConfigurableRetries(t *testing.T) {
t.Parallel()
stdout := new(bytes.Buffer)
stderr := new(bytes.Buffer)
rootPath := copyEnvironment(t, TEST_FIXTURE_AUTO_RETRY_CONFIGURABLE_RETRIES)
modulePath := util.JoinPath(rootPath, TEST_FIXTURE_AUTO_RETRY_CONFIGURABLE_RETRIES)
err := runTerragruntCommand(t... | explode_data.jsonl/10100 | {
"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,
13253,
51560,
2648,
18329,
12020,
4019,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
6736,
411,
1669,
501,
23158,
22622,
340,
6736,
615,
1669,
501,
23158,
22622,
340,
33698,
1820,
1669,
2975,
12723,
1155,
11,
13602,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntArray_LockFunc(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
s1 := []int{1, 2, 3, 4}
a1 := garray.NewIntArrayFrom(s1, true)
ch1 := make(chan int64, 3)
ch2 := make(chan int64, 3)
//go1
go a1.LockFunc(func(n1 []int) { //读写锁
time.Sleep(2 * time.Second) //暂停2秒
n1[2] = 6
ch2 <- gconv.Int64... | explode_data.jsonl/47624 | {
"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,
95338,
2351,
1176,
9626,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
1903,
16,
1669,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
532,
197,
11323,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnforceJWSAuthType(t *testing.T) {
wfe, _ := setupWFE(t)
testKeyIDJWS, _, _ := signRequestKeyID(t, 1, nil, "", "", wfe.nonceService)
testEmbeddedJWS, _, _ := signRequestEmbed(t, nil, "", "", wfe.nonceService)
// A hand crafted JWS that has both a Key ID and an embedded JWK
conflictJWSBody := `
{
"head... | explode_data.jsonl/15350 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1897
} | [
2830,
3393,
1702,
8833,
41,
7433,
5087,
929,
1155,
353,
8840,
836,
8,
341,
6692,
1859,
11,
716,
1669,
6505,
54,
11419,
1155,
692,
18185,
1592,
915,
41,
7433,
11,
8358,
716,
1669,
1841,
1900,
1592,
915,
1155,
11,
220,
16,
11,
2092,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestAzureMachineTemplate_ValidateCreate(t *testing.T) {
g := NewWithT(t)
tests := []struct {
name string
machineTemplate *AzureMachineTemplate
wantErr bool
}{
{
name: "azuremachinetemplate with marketplane image - full",
machineTemplate: createAzureMachineTemplateFromMachine(
... | explode_data.jsonl/42150 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1303
} | [
2830,
3393,
78107,
21605,
7275,
62,
17926,
4021,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
2354,
51,
1155,
692,
78216,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
2109,
3814,
7275,
353,
78107,
21605,
7275,
198,
197,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestHeap(t *testing.T) {
var (
values = []int{2, 8, 5, 1, 7, 9, 6, 3, 0, 4}
)
var items []Item
for _, value := range values {
items = append(items, Int(value))
}
heap := New(items)
for index := range values {
assert.Equal(t, index, int(heap.Pop().(Int)), "binaryheap.InitPop")
}
for _, value := r... | explode_data.jsonl/80902 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 198
} | [
2830,
3393,
27909,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
45939,
284,
3056,
396,
90,
17,
11,
220,
23,
11,
220,
20,
11,
220,
16,
11,
220,
22,
11,
220,
24,
11,
220,
21,
11,
220,
18,
11,
220,
15,
11,
220,
19,
532,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestToYAMLPath(t *testing.T) {
tests := []struct {
desc string
in string
expect Path
}{
{
desc: "all-uppercase",
in: "A.B.C.D",
expect: Path{"a", "b", "c", "d"},
},
}
for _, tt := range tests {
t.Run(tt.desc, func(t *testing.T) {
if got := ToYAMLPath(tt.in); !got.Equals(tt.... | explode_data.jsonl/70570 | {
"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,
1249,
56,
31102,
1820,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
41653,
256,
914,
198,
197,
17430,
257,
914,
198,
197,
24952,
7933,
198,
197,
59403,
197,
197,
515,
298,
41653,
25,
256,
330,
541,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVolumeClaimBasicV1(t *testing.T) {
yaml := `
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: my-volumeclaim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 360Gi`
volume, err := decodeVolumeClaim([]byte(yaml), CostimatorConfig{})
if err != n... | explode_data.jsonl/54608 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 393
} | [
2830,
3393,
18902,
45544,
15944,
53,
16,
1155,
353,
8840,
836,
8,
341,
14522,
9467,
1669,
22074,
220,
3093,
25,
66544,
18902,
45544,
198,
220,
6330,
5637,
25,
348,
16,
198,
220,
11160,
510,
262,
829,
25,
847,
66768,
7859,
198,
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... | 6 |
func TestAuthTokens(t *testing.T) {
startCmd := GetStartCmd()
args := []string{
"--" + authTokensDefFlagName, "/services/orb/keys",
"--" + authTokensDefFlagName, "/services/orb/outbox|admin&read|admin",
"--" + authTokensDefFlagName, "/services/orb/inbox||admin",
"--" + authTokensDefFlagName, "/services/orb/a... | explode_data.jsonl/31122 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 793
} | [
2830,
3393,
5087,
29300,
1155,
353,
8840,
836,
8,
341,
21375,
15613,
1669,
2126,
3479,
15613,
2822,
31215,
1669,
3056,
917,
515,
197,
197,
74757,
1,
488,
4166,
29300,
2620,
12135,
675,
11,
3521,
12779,
5144,
65,
14,
10563,
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... | 1 |
func TestNormalizedVariantKey(t *testing.T) {
type TNormData struct {
code int
chrom string
posindex uint8
pos uint32
epos uint32
sizeref uint8
sizealt uint8
esizeref uint8
esizealt uint8
vk uint64
eref string
ealt string
ref string
alt string
}
v... | explode_data.jsonl/40557 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1043
} | [
2830,
3393,
79082,
20746,
1592,
1155,
353,
8840,
836,
8,
341,
13158,
350,
24993,
1043,
2036,
341,
197,
43343,
257,
526,
198,
197,
23049,
441,
262,
914,
198,
197,
28164,
1252,
2622,
23,
198,
197,
28164,
414,
2622,
18,
17,
198,
197,
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... | 3 |
func TestClosedIntegrate(t *testing.T) {
basis := NewClosed(1, 1)
levels := []uint64{0, 1, 2, 3}
values := []float64{1.0, 0.25, 1.0 / 2.0 / 2.0, 1.0 / 2.0 / 2.0 / 2.0}
for i := range levels {
indices := internal.Compose([]uint64{levels[i]}, []uint64{0})
assert.Equal(basis.Integrate(indices), values[i], t)
}
... | explode_data.jsonl/27891 | {
"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,
26884,
1072,
57017,
1155,
353,
8840,
836,
8,
341,
2233,
10718,
1669,
1532,
26884,
7,
16,
11,
220,
16,
692,
197,
42564,
1669,
3056,
2496,
21,
19,
90,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
532,
45939,
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... | 2 |
func TestPhantom_IsEnabled(t *testing.T) {
for _, tc := range []struct {
desc string
ok bool
rfErr error // MockReadFile error.
spiValue int // Current SPI value.
num int
isEnabled bool
}{
// Supported states. "only" indicates that only that phantom is on/off, and
// "all" indica... | explode_data.jsonl/34846 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 854
} | [
2830,
3393,
3357,
30002,
31879,
5462,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
41653,
257,
914,
198,
197,
59268,
981,
1807,
198,
197,
7000,
69,
7747,
262,
1465,
442,
14563,
4418,
1703,
1465,
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... | 7 |
func TestSQLQueryFactoryFinalizeFail(t *testing.T) {
s, _ := newMockProvider().init()
fb := database.MessageQueryFactory.NewFilter(context.Background())
sel := squirrel.Select("*").From("mytable")
_, _, _, err := s.filterSelect(context.Background(), "ns", sel, fb.Eq("namespace", map[bool]bool{true: false}), nil, []... | explode_data.jsonl/34918 | {
"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,
6688,
2859,
4153,
19357,
551,
19524,
1155,
353,
8840,
836,
8,
341,
1903,
11,
716,
1669,
501,
11571,
5179,
1005,
2327,
741,
1166,
65,
1669,
4625,
8472,
2859,
4153,
7121,
5632,
5378,
19047,
2398,
1903,
301,
1669,
90524,
14752,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapFlat(t *testing.T) {
m := Map{
"foo": "bar",
"bar": Map{
"foo": "bar",
},
"baz": map[string]interface{}{
"foo": "bar",
},
}
assert.Equal(t, Map{
"foo": "bar",
"bar_foo": "bar",
"baz_foo": "bar",
}, m.Flat("_"))
} | explode_data.jsonl/10187 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
2227,
31019,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
5027,
515,
197,
197,
1,
7975,
788,
330,
2257,
756,
197,
197,
1,
2257,
788,
5027,
515,
298,
197,
1,
7975,
788,
330,
2257,
756,
197,
197,
1583,
197,
197,
1,
42573,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckRefErrUnsupported(t *testing.T) {
query := `arr = [[1,2],[3,4]]; arr[1][0].deadbeef`
_, errs := newTypeChecker().CheckBody(nil, MustParseBody(query))
if len(errs) != 1 {
t.Fatalf("Expected exactly one error but got: %v", errs)
}
details, ok := errs[0].Details.(*RefErrUnsupportedDetail)
if !ok {... | explode_data.jsonl/14566 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 292
} | [
2830,
3393,
3973,
3945,
7747,
41884,
1155,
353,
8840,
836,
8,
1476,
27274,
1669,
1565,
1118,
284,
4318,
16,
11,
17,
14955,
18,
11,
19,
97829,
2890,
58,
16,
1457,
15,
936,
33754,
1371,
823,
19324,
197,
6878,
70817,
1669,
501,
929,
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... | 6 |
func TestFieldLevelName(t *testing.T) {
type Test struct {
String string `validate:"custom1" json:"json1"`
Array []string `validate:"dive,custom2" json:"json2"`
Map map[string]string `validate:"dive,custom3" json:"json3"`
Array2 []string `validate:"custom4" json:"json... | explode_data.jsonl/77349 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 831
} | [
2830,
3393,
1877,
4449,
675,
1155,
353,
8840,
836,
8,
341,
13158,
3393,
2036,
341,
197,
4980,
914,
310,
1565,
7067,
2974,
9163,
16,
1,
414,
2951,
2974,
2236,
16,
8805,
197,
58743,
220,
3056,
917,
688,
1565,
7067,
2974,
67,
533,
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 TestMsgUpdateClassMetadata(t *testing.T) {
_, _, a1 := testdata.KeyTestPubAddr()
tests := map[string]struct {
src MsgUpdateClassMetadata
expErr bool
}{
"valid": {
src: MsgUpdateClassMetadata{Admin: a1.String(), ClassId: "C01", Metadata: []byte("hello world")},
expErr: false,
},
"invalid: ... | explode_data.jsonl/65134 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 492
} | [
2830,
3393,
6611,
4289,
1957,
14610,
1155,
353,
8840,
836,
8,
341,
197,
6878,
8358,
264,
16,
1669,
1273,
691,
9610,
2271,
29162,
13986,
2822,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
41144,
262,
24205,
4289,
1957,
14610,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRamStoreGetByIndex(t *testing.T) {
indexName := "nodeName"
indexKey := "node1"
indexers := cache.Indexers{
indexName: func(obj interface{}) ([]string, error) {
pod, ok := obj.(*v1.Pod)
if !ok {
return []string{}, nil
}
if len(pod.Spec.NodeName) == 0 {
return []string{}, nil
}
ret... | explode_data.jsonl/65624 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1216
} | [
2830,
3393,
63848,
6093,
1949,
1359,
1552,
1155,
353,
8840,
836,
8,
341,
26327,
675,
1669,
330,
93451,
698,
26327,
1592,
1669,
330,
3509,
16,
698,
26327,
388,
1669,
6500,
18338,
388,
515,
197,
26327,
675,
25,
2915,
6779,
3749,
28875,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGrayscaleRepoPersistence(t *testing.T) {
if err := server.OpenTest(); err != nil {
t.Fatalf("can't open test server: %v\n", err)
}
defer server.CloseTest()
uuid, _ := initTestRepo()
// Make grayscale and set various properties
config := dvid.NewConfig()
config.Set("BlockSize", "12,13,14")
config.Se... | explode_data.jsonl/31328 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 527
} | [
2830,
3393,
6464,
50348,
25243,
71562,
1155,
353,
8840,
836,
8,
341,
743,
1848,
1669,
3538,
12953,
2271,
2129,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
4814,
944,
1787,
1273,
3538,
25,
1018,
85,
1699,
497,
1848,
340,
197,
532,
168... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeriveMultiSigSegwit(t *testing.T) {
xpubs := []string{
"tpubDAiPiLZeUdwo9oJiE9GZnteXj2E2MEMUb4knc4yCD87bL9siDgYcvrZSHZQZcYTyraL3fxVBRCcMiyfr3oQfH1wNo8J5i8aRAN56dDXaZxC",
"tpubDBYBpkSfvt9iVSfdX2ArZq1Q8bVSro3sotbJhdZCG9rgfjdr4aZp7g7AF1P9w95X5fzuJzdZAqYWWU7nb37c594wR22hPY5VpYziXUN2yez",
"tpubDAaTEMnf9SPKJ... | explode_data.jsonl/80965 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 455
} | [
2830,
3393,
22171,
533,
20358,
47246,
10998,
88519,
1155,
353,
8840,
836,
8,
341,
10225,
9585,
82,
1669,
3056,
917,
515,
197,
197,
1,
790,
392,
6352,
72,
34767,
43,
59462,
52,
67,
1126,
24,
78,
41,
72,
36,
24,
38,
57,
23446,
55,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScpGetRemote(t *testing.T) {
t.Parallel()
fs := new(afero.MemMapFs)
tests := []struct {
path string
content []byte
ignore bool
}{
{"http://Foo.Bar/foo_Bar-Foo", []byte(`T€st Content 123`), false},
{"http://Doppel.Gänger/foo_Bar-Foo", []byte(`T€st Cont€nt 123`), false},
{"http://Doppel.Gäng... | explode_data.jsonl/69218 | {
"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,
3326,
79,
1949,
24703,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
53584,
1669,
501,
2877,
802,
78,
1321,
336,
2227,
48300,
692,
78216,
1669,
3056,
1235,
341,
197,
26781,
262,
914,
198,
197,
27751,
3056,
3782,
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 TestAssessRunStatusErrorMessageFromProviderInDryRunMode(t *testing.T) {
providerMessage := "Provider Error"
status, message, dryRunSummary := StartAssessRunStatusErrorMessageFromProvider(t, providerMessage, true)
assert.Equal(t, v1alpha1.AnalysisPhaseSuccessful, status)
assert.Equal(t, "", message)
expectedDr... | explode_data.jsonl/75845 | {
"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,
5615,
433,
6727,
2522,
21349,
3830,
5179,
641,
85215,
6727,
3636,
1155,
353,
8840,
836,
8,
341,
197,
19979,
2052,
1669,
330,
5179,
4600,
698,
23847,
11,
1943,
11,
9058,
6727,
19237,
1669,
5145,
5615,
433,
6727,
2522,
21349,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCallFunctionFailsOnNonFunction(t *testing.T) {
t.Parallel()
ctx := NewIsolate().NewContext()
ob, _ := ctx.Eval(`({x:3})`, "")
res, err := ob.Call(nil)
if err == nil {
t.Fatalf("Expected err, but got %v", res)
} else if err.Error() != "Not a function" {
t.Errorf("Wrong error message: %q", err)
}
} | explode_data.jsonl/81560 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
7220,
5152,
37,
6209,
1925,
8121,
5152,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
1532,
3872,
33066,
1005,
3564,
1972,
741,
63353,
11,
716,
1669,
5635,
5142,
831,
5809,
2306,
87,
25,
18,
5410,
7808... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetHostPublicIPv4AddressFromEC2Metadata(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: ec2Client,
... | explode_data.jsonl/41608 | {
"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,
1949,
9296,
12676,
58056,
19,
4286,
3830,
7498,
17,
14610,
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,
36844,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClient_HKeys(t *testing.T) {
mc := minimock.NewController(t)
defer mc.Finish()
tests := []struct {
name string
arg string
expectCommand string
mockResponse *api.ExecuteCommandResponse
mockErr error
wantResult ListResult
}{
{
name: "could_not_execute_c... | explode_data.jsonl/18542 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 945
} | [
2830,
3393,
2959,
2039,
8850,
1155,
353,
8840,
836,
8,
341,
97662,
1669,
21187,
1176,
7121,
2051,
1155,
340,
16867,
19223,
991,
18176,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
47903,
1843,
914,
198,
197,
24952... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReminderExecution(t *testing.T) {
testActorsRuntime := newTestActorsRuntime()
actorType, actorID := getTestActorTypeAndID()
actorKey := testActorsRuntime.constructCompositeKey(actorType, actorID)
fakeCallAndActivateActor(testActorsRuntime, actorKey)
err := testActorsRuntime.executeReminder(actorType, act... | explode_data.jsonl/12874 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 129
} | [
2830,
3393,
95359,
20294,
1155,
353,
8840,
836,
8,
341,
18185,
2414,
1087,
15123,
1669,
501,
2271,
2414,
1087,
15123,
741,
93410,
929,
11,
12089,
915,
1669,
633,
2271,
18870,
929,
3036,
915,
741,
93410,
1592,
1669,
1273,
2414,
1087,
151... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGuild_sortChannels(t *testing.T) {
snowflakes := []Snowflake{
NewSnowflake(6),
NewSnowflake(65),
NewSnowflake(324),
NewSnowflake(5435),
NewSnowflake(63453),
NewSnowflake(111111111),
}
guild := NewGuild()
for i := range snowflakes {
channel := NewChannel()
channel.ID = snowflakes[len(snowf... | explode_data.jsonl/55145 | {
"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,
72574,
18435,
35925,
1155,
353,
8840,
836,
8,
341,
1903,
3328,
1489,
2050,
1669,
3056,
62285,
63456,
515,
197,
197,
3564,
62285,
63456,
7,
21,
1326,
197,
197,
3564,
62285,
63456,
7,
21,
20,
1326,
197,
197,
3564,
62285,
634... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBindFunctionCall(t *testing.T) {
env := environment(map[string]interface{}{
"f0": NewFunction(StaticFunctionSignature{
Parameters: []Parameter{
{Name: "foo", Type: StringType},
{Name: "bar", Type: IntType},
},
ReturnType: BoolType,
}),
"f1": NewFunction(StaticFunctionSignature{
Param... | explode_data.jsonl/42566 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 790
} | [
2830,
3393,
9950,
5152,
7220,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
4573,
9147,
14032,
31344,
67066,
197,
197,
96171,
15,
788,
1532,
5152,
7,
11690,
5152,
25088,
515,
298,
197,
9706,
25,
3056,
4971,
515,
571,
197,
63121,
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 TestChannelDemux_WithInvalidChannel(t *testing.T) {
outputChannels := make(map[OutputLineId]chan Signal, 1)
outputChannels[0] = make(chan Signal, 1)
dmux := ChannelDemux{
OutputChannels: outputChannels,
Selector: func(inputSignal Signal) (outputLineId int, err error) {
return -2, nil //return some id n... | explode_data.jsonl/58641 | {
"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,
9629,
32003,
2200,
62,
2354,
7928,
9629,
1155,
353,
8840,
836,
8,
1476,
21170,
35925,
1669,
1281,
9147,
58,
5097,
2460,
764,
60,
5658,
27230,
11,
220,
16,
340,
21170,
35925,
58,
15,
60,
284,
1281,
35190,
27230,
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 |
func TestBubble(t *testing.T) {
type args struct {
array []int
}
tests := []struct {
name string
args args
want []int
}{
// TODO: Add test cases.
{name: "test_1", args: args{array: []int{1, 2, 3}}, want: []int{1, 2, 3}},
{name: "test_2", args: args{array: []int{3, 2, 1}}, want: []int{1, 2, 3}},
{nam... | explode_data.jsonl/7250 | {
"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,
75778,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
11923,
3056,
396,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
3056,
396,
198,
197,
59403,
197,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNeedsADRParamSetupReq(t *testing.T) {
type TestCase struct {
Name string
InputDevice *ttnpb.EndDevice
Band *band.Band
Needs bool
}
var tcs []TestCase
ForEachBand(t, func(makeBandName func(parts ...string) string, phy *band.Band, _ ttnpb.PHYVersion) {
tcs = append(tcs,
Test... | explode_data.jsonl/38427 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2436
} | [
2830,
3393,
65064,
96473,
2001,
21821,
27234,
1155,
353,
8840,
836,
8,
341,
13158,
30573,
2036,
341,
197,
21297,
286,
914,
198,
197,
66588,
6985,
353,
83,
1517,
16650,
18569,
6985,
198,
197,
12791,
437,
286,
353,
7053,
1785,
437,
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 TestEmptyFile(t *testing.T) {
tmpdir, err := ioutil.TempDir("", "disk_endpoint_test")
if err != nil {
t.Fatalf("Unable to create temp directory: %+v", err)
}
defer os.RemoveAll(tmpdir)
// Make sure that it starts clean, and a newly stored data can be retrieved.
testBrandNewDiskPersistenceCanStoreAndRetrie... | explode_data.jsonl/16546 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 300
} | [
2830,
3393,
3522,
1703,
1155,
353,
8840,
836,
8,
341,
20082,
3741,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
30496,
36699,
4452,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
17075,
311,
1855,
2730,
6220,
25,
68524,
85,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLsLong(t *testing.T) {
ctx := context.Background()
r := fstest.NewRun(t)
defer r.Finalise()
file1 := r.WriteBoth(ctx, "potato2", "------------------------------------------------------------", t1)
file2 := r.WriteBoth(ctx, "empty space", "-", t2)
fstest.CheckItems(t, r.Fremote, file1, file2)
var buf b... | explode_data.jsonl/51927 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 608
} | [
2830,
3393,
43,
82,
6583,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
7000,
1669,
48434,
477,
7121,
6727,
1155,
340,
16867,
435,
991,
977,
1064,
741,
17661,
16,
1669,
435,
4073,
20629,
7502,
11,
330,
19099,
4330,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test(t *testing.T) {
a := assertions.New(t)
A := memory.New()
B := memory.New()
err := New(A, B).HandleLog(&Entry{
message: "foo",
fields: log.Fields(),
time: time.Now(),
level: log.DebugLevel,
})
a.So(err, assertions.ShouldBeNil)
a.So(A.Entries, assertions.ShouldHaveLength, 1)
a.So(B.Entr... | explode_data.jsonl/49344 | {
"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,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
54836,
7121,
1155,
692,
22985,
1669,
4938,
7121,
741,
12791,
1669,
4938,
7121,
2822,
9859,
1669,
1532,
4346,
11,
425,
568,
6999,
2201,
2099,
5874,
515,
197,
24753,
25,
330,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetAPIPath(t *testing.T) {
apiPath := Go.GetAPIPath()
v := runtime.Version()[2:]
v = v[:3]
verNum, err := strconv.ParseFloat(v, 64)
if nil != err {
t.Error(err)
return
}
if verNum >= 1.4 {
if !strings.HasSuffix(apiPath, "src") {
t.Error("api path should end with \"src\"")
return
}
}... | explode_data.jsonl/152 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
1949,
7082,
1820,
1155,
353,
8840,
836,
8,
341,
54299,
1820,
1669,
5994,
2234,
7082,
1820,
2822,
5195,
1669,
15592,
35842,
10116,
17,
24135,
5195,
284,
348,
3447,
18,
2533,
197,
423,
4651,
11,
1848,
1669,
33317,
8937,
5442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnsubscribeUnblockPost(t *testing.T) {
mux := new(TypeMux)
defer mux.Stop()
sub := mux.Subscribe(testEvent(0))
unblocked := make(chan bool)
go func() {
mux.Post(testEvent(5))
unblocked <- true
}()
select {
case <-unblocked:
t.Errorf("Post returned before Unsubscribe")
default:
sub.Unsubscrib... | explode_data.jsonl/61575 | {
"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,
1806,
9384,
1806,
4574,
4133,
1155,
353,
8840,
836,
8,
341,
2109,
2200,
1669,
501,
22498,
44,
2200,
340,
16867,
59807,
30213,
2822,
28624,
1669,
59807,
82628,
8623,
1556,
7,
15,
1171,
20479,
61348,
1669,
1281,
35190,
1807,
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 TestErrorToFault(t *testing.T) {
assert.Nil(t, ErrorToFault(nil))
f := ErrorToFault(errors.New("test"))
if assert.NotNil(t, f) {
assert.Equal(t, reasoncode.ReasonCode(""), f.ReasonCode)
assert.Equal(t, "test", f.Message)
}
f = ErrorToFault(NewError("MyCode", "My message"))
if assert.NotNil(t, f) {
as... | explode_data.jsonl/17709 | {
"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,
1454,
1249,
58780,
1155,
353,
8840,
836,
8,
341,
6948,
59678,
1155,
11,
4600,
1249,
58780,
27907,
4390,
1166,
1669,
4600,
1249,
58780,
38881,
7121,
445,
1944,
5455,
743,
2060,
93882,
1155,
11,
282,
8,
341,
197,
6948,
12808,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddServiceWithProperties(t *testing.T) {
r := newTestResolver(t)
defer r.Close()
ctx := viewertest.NewContext(context.Background(), r.client)
mr := r.Mutation()
serviceTypeStrValue := "Foo"
serviceStrPropType := models.PropertyTypeInput{
Name: "service_str_prop",
Type: "string",
Stri... | explode_data.jsonl/7202 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 453
} | [
2830,
3393,
2212,
1860,
2354,
7903,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
501,
2271,
18190,
1155,
340,
16867,
435,
10421,
741,
20985,
1669,
1651,
83386,
7121,
1972,
5378,
19047,
1507,
435,
6581,
692,
2109,
81,
1669,
435,
1321,
22705... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapProxy_RemoveIfSameWithNilKey(t *testing.T) {
_, err := mp.RemoveIfSame(nil, "test")
AssertErrorNotNil(t, err, "remove did not return an error for nil key")
mp.Clear()
} | explode_data.jsonl/56970 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 69
} | [
2830,
3393,
2227,
16219,
66843,
2679,
19198,
2354,
19064,
1592,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
10490,
13270,
2679,
19198,
27907,
11,
330,
1944,
1138,
18017,
1454,
96144,
1155,
11,
1848,
11,
330,
5399,
1521,
537,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLiveUpdateRunTriggerLocalContainer(t *testing.T) {
f := newBDFixture(t, k8s.EnvDockerDesktop, container.RuntimeDocker)
defer f.TearDown()
runs := []model.LiveUpdateRunStep{
model.LiveUpdateRunStep{Command: model.ToUnixCmd("echo hello")},
model.LiveUpdateRunStep{Command: model.ToUnixCmd("echo a"), Trigg... | explode_data.jsonl/35169 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 409
} | [
2830,
3393,
20324,
4289,
6727,
17939,
7319,
4502,
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,
2822,
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 TestParseGroupVersion(t *testing.T) {
tests := []struct {
input string
g string
v string
}{
{input: "", g: "", v: ""},
{input: "v1", g: "", v: "v1"},
{input: "apps/v1", g: "apps", v: "v1"},
{input: "/v1", g: "", v: "v1"},
{input: "apps/", g: "apps", v: ""},
{input: "/apps/", g: "", v: "... | explode_data.jsonl/39018 | {
"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,
14463,
2808,
5637,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
22427,
914,
198,
197,
3174,
257,
914,
198,
197,
5195,
257,
914,
198,
197,
59403,
197,
197,
90,
1355,
25,
7342,
342,
25,
7342,
348,
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 TestFilesystemVersion_RelName(t *testing.T) {
type TestCase struct {
In FilesystemVersion
Out string
Panic bool
}
creat := FilesystemVersionCreation(time.Now())
tcs := []TestCase{
{
In: FilesystemVersion{
Type: FilesystemVersion_Snapshot,
Name: "foobar",
Creation: creat,
},
... | explode_data.jsonl/44344 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 371
} | [
2830,
3393,
1703,
8948,
5637,
88922,
675,
1155,
353,
8840,
836,
8,
1476,
13158,
30573,
2036,
341,
197,
70167,
262,
2887,
8948,
5637,
198,
197,
197,
2662,
256,
914,
198,
197,
10025,
31270,
1807,
198,
197,
630,
197,
94739,
1669,
2887,
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 TestForwardedMetricWithMetadataFromProtoBadMetricProto(t *testing.T) {
var res ForwardedMetricWithMetadata
pb := metricpb.ForwardedMetricWithMetadata{
Metric: testBadForwardedMetricProto,
Metadata: testForwardMetadata1Proto,
}
require.Error(t, res.FromProto(&pb))
} | explode_data.jsonl/75084 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 103
} | [
2830,
3393,
25925,
291,
54310,
2354,
14610,
3830,
31549,
17082,
54310,
31549,
1155,
353,
8840,
836,
8,
341,
2405,
592,
22164,
291,
54310,
2354,
14610,
198,
3223,
65,
1669,
18266,
16650,
26676,
1606,
291,
54310,
2354,
14610,
515,
197,
9209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGocloak_GetIssuer(t *testing.T) {
t.Parallel()
cfg := GetConfig(t)
client := NewClientWithDebug(t)
issuer, err := client.GetIssuer(cfg.GoCloak.Realm)
t.Log(issuer)
FailIfErr(t, err, "get issuer")
} | explode_data.jsonl/79509 | {
"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,
38,
509,
385,
585,
13614,
98902,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50286,
1669,
2126,
2648,
1155,
340,
25291,
1669,
1532,
2959,
2354,
7939,
1155,
340,
197,
66817,
11,
1848,
1669,
2943,
2234,
98902,
28272,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegister_koNamespace(t *testing.T) {
ctx := context.Background()
cfgBloomFilter :=
rpc.Config{
Config: rotate.Config{
Config: bloomfilter.Config{
N: 10000000,
P: 0.0000001,
HashName: "optimal",
},
TTL: 1500,
},
Port: 1234,
}
serviceConf := config.Service... | explode_data.jsonl/48332 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 416
} | [
2830,
3393,
8690,
4698,
78,
22699,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
50286,
33,
18474,
5632,
19687,
197,
7000,
3992,
10753,
515,
298,
66156,
25,
16919,
10753,
515,
571,
66156,
25,
51454,
5315,
10753,
515,
464,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mrCmd(t *testing.T) {
t.Parallel()
repo := copyTestRepo(t)
var mrID string
t.Run("create", func(t *testing.T) {
git := exec.Command("git", "checkout", "mrtest")
git.Dir = repo
b, err := git.CombinedOutput()
if err != nil {
t.Log(string(b))
t.Fatal(err)
}
cmd := exec.Command("../lab_bin"... | explode_data.jsonl/44429 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 799
} | [
2830,
3393,
92858,
15613,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
17200,
5368,
1669,
2975,
2271,
25243,
1155,
340,
2405,
17317,
915,
914,
198,
3244,
16708,
445,
3182,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
90731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.