text stringlengths 93 16.4k | id stringlengths 20 40 | metadata dict | input_ids listlengths 45 2.05k | attention_mask listlengths 45 2.05k | complexity int64 1 9 |
|---|---|---|---|---|---|
func Test_Validate_RollingUpdate(t *testing.T) {
grid := []struct {
Input kops.RollingUpdate
OnMasterIG bool
ExpectedErrors []string
}{
{
Input: kops.RollingUpdate{},
},
{
Input: kops.RollingUpdate{
MaxUnavailable: intStr(intstr.FromInt(0)),
},
},
{
Input: kops.RollingUpda... | explode_data.jsonl/61622 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1483
} | [
2830,
3393,
62,
17926,
2568,
965,
287,
4289,
1155,
353,
8840,
836,
8,
341,
49018,
1669,
3056,
1235,
341,
197,
66588,
688,
595,
3721,
71212,
287,
4289,
198,
197,
86391,
18041,
1914,
257,
1807,
198,
197,
197,
18896,
13877,
3056,
917,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestServiceResolver_UpdateServiceMutation(t *testing.T) {
assert := assert.New(t)
t.Run("Success", func(t *testing.T) {
name := "exampleName"
namespace := "exampleNamespace"
updatedServiceFix := fixService(name, namespace, map[string]string{
"test": "test",
})
updatedGQLServiceFix := &gqlschema.Serv... | explode_data.jsonl/51134 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 985
} | [
2830,
3393,
1860,
18190,
47393,
1860,
53998,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
3244,
16708,
445,
7188,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
11609,
1669,
330,
8687,
675,
698,
197,
56623,
1669,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeepEqualRecursiveStruct(t *testing.T) {
a, b := new(Recursive), new(Recursive)
*a = Recursive{12, a}
*b = Recursive{12, b}
if !DeepEqual(a, b) {
t.Error("DeepEqual(recursive same) = false, want true")
}
} | explode_data.jsonl/29539 | {
"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,
33464,
2993,
78542,
9422,
1155,
353,
8840,
836,
8,
341,
11323,
11,
293,
1669,
501,
7,
78542,
701,
501,
7,
78542,
340,
197,
33742,
284,
85896,
90,
16,
17,
11,
264,
532,
197,
33279,
284,
85896,
90,
16,
17,
11,
293,
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... | 2 |
func TestLookupResolverIPFailure(t *testing.T) {
expected := errors.New("mocked error")
rlc := resolverLookupClient{}
addr, err := rlc.do(context.Background(), brokenHostLookupper{
err: expected,
})
if !errors.Is(err, expected) {
t.Fatalf("not the error we expected: %+v", err)
}
if len(addr) != 0 {
t.Fatal... | explode_data.jsonl/79473 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
34247,
18190,
3298,
17507,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
5975,
7121,
445,
16712,
291,
1465,
1138,
197,
2381,
66,
1669,
36220,
34247,
2959,
16094,
53183,
11,
1848,
1669,
435,
17257,
16521,
5378,
19047,
1507,
10865,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJoinCoverPath(t *testing.T) {
testCases := []coverProfileTestCase{
{
"/",
"foo/bar/baz.go",
"/foo/bar/baz.go",
},
{
"/users/foo/bar",
"foo/bar/baz.go",
"/users/foo/bar/baz.go",
},
{
"/users/bailey/workspace/go/src/github.com/blend/go-sdk/",
"github.com/blend/go-sdk/assert/ass... | explode_data.jsonl/60254 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 404
} | [
2830,
3393,
12292,
30896,
1820,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
3688,
8526,
16458,
515,
197,
197,
515,
298,
197,
3115,
756,
298,
197,
1,
7975,
49513,
3470,
1370,
18002,
756,
298,
197,
3115,
7975,
49513,
3470,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQuery_Read_Happy(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mc := mocks.NewMockConnector(ctrl)
mc.EXPECT().Read(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).
Do(func(_ context.Context, ei *dosa.EntityInfo, keys map[string]dosa.FieldValue, minimumFields []string) {
... | explode_data.jsonl/70144 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 523
} | [
2830,
3393,
2859,
38381,
2039,
11144,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
97662,
1669,
68909,
7121,
11571,
35954,
62100,
340,
97662,
22402,
7285,
1005,
4418,
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... | 1 |
func TestDomainsConfig_Success(t *testing.T) {
assert := assertlib.New(t)
globalConfig := viper.New()
sampleDomain := domain.ConfigItem{
Domains: []string{"localhost", "other"},
AllUsersGroup: 2,
TempUsersGroup: 3,
}
globalConfig.Set("domains", []domain.ConfigItem{sampleDomain})
config, err := Domai... | explode_data.jsonl/61945 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
74713,
2648,
87161,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
2740,
7121,
1155,
340,
18842,
2648,
1669,
95132,
7121,
741,
1903,
1516,
13636,
1669,
7947,
10753,
1234,
515,
197,
10957,
316,
1735,
25,
286,
3056,
917,
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... | 1 |
func TestTransportRemovesH2ConnsAfterIdle(t *testing.T) {
if testing.Short() {
t.Skip("skipping in short mode")
}
trFunc := func(tr *Transport) {
tr.MaxConnsPerHost = 1
tr.MaxIdleConnsPerHost = 1
tr.IdleConnTimeout = 10 * time.Millisecond
}
cst := newClientServerTest(t, h2Mode, HandlerFunc(func(w Response... | explode_data.jsonl/14135 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 360
} | [
2830,
3393,
27560,
6590,
10088,
39,
17,
1109,
4412,
6025,
41370,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
304,
2805,
3856,
1138,
197,
630,
25583,
9626,
1669,
2915,
7624,
353,
27560,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScanSnapshot(t *testing.T) {
ctx := context.Background()
packageID := "00000000-0000-0000-0000-000000000001"
version := "1.0.0"
image := "repo/image:tag"
t.Run("error scanning image", func(t *testing.T) {
t.Parallel()
scannerMock := &Mock{}
scannerMock.On("Scan", image).Return(nil, tests.ErrFake)
... | explode_data.jsonl/45782 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1261
} | [
2830,
3393,
26570,
15009,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
197,
1722,
915,
1669,
330,
15,
15,
15,
15,
15,
15,
15,
15,
12,
15,
15,
15,
15,
12,
15,
15,
15,
15,
12,
15,
15,
15,
15,
12,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInitializeShouldExtractTar(t *testing.T) {
const expectedFile = "/test/testfile.txt"
tarPath := filepath.Join(testDir, testTar)
extraMountPoints := []*MountPoint{}
extraDirectories := []string{}
dir := filepath.Join(tmpDir, "TestInitializeShouldExtractTar")
chroot := NewChroot(dir, isExistingDir)
err... | explode_data.jsonl/38797 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 203
} | [
2830,
3393,
9928,
14996,
28959,
62733,
1155,
353,
8840,
836,
8,
341,
4777,
3601,
1703,
284,
3521,
1944,
12697,
1192,
3909,
1837,
3244,
277,
1820,
1669,
26054,
22363,
8623,
6184,
11,
1273,
62733,
340,
8122,
2172,
16284,
11411,
1669,
29838,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIdFiltersParsing(t *testing.T) {
service := Service{}
service.ParseFilters([]string{"aws_vpc=myid"})
if !reflect.DeepEqual(service.Filter, []ResourceFilter{
{
ResourceName: "aws_vpc",
FieldPath: "id",
AcceptableValues: []string{"myid"},
}}) {
t.Errorf("failed to parse, got %v", se... | explode_data.jsonl/16847 | {
"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,
764,
28351,
68839,
1155,
353,
8840,
836,
8,
341,
52934,
1669,
5362,
16094,
52934,
8937,
28351,
10556,
917,
4913,
8635,
2273,
3992,
80470,
307,
1,
8824,
743,
753,
34913,
94750,
21656,
31696,
11,
3056,
4783,
5632,
515,
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... | 2 |
func Test_Properties_ValidatePrivateAzureRegistryServer(t *testing.T) {
p := &Properties{}
p.OrchestratorProfile = &OrchestratorProfile{}
p.OrchestratorProfile.OrchestratorType = Kubernetes
p.OrchestratorProfile.KubernetesConfig = &KubernetesConfig{}
p.OrchestratorProfile.KubernetesConfig.PrivateAzureRegistryServ... | explode_data.jsonl/17862 | {
"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,
1088,
9249,
62,
17926,
16787,
78107,
15603,
5475,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
609,
7903,
16094,
3223,
90449,
331,
15111,
850,
8526,
284,
609,
2195,
331,
15111,
850,
8526,
16094,
3223,
90449,
331,
15111,
850,
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... | 3 |
func Test_endpointName(t *testing.T) {
type args struct {
h *zipkincore.Endpoint
}
tests := []struct {
name string
args args
want string
}{
{
name: "Found ServiceName",
args: args{
h: &zipkincore.Endpoint{
ServiceName: "zipkin",
},
},
want: "zipkin",
},
{
name: "No ServiceN... | explode_data.jsonl/57265 | {
"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,
36699,
675,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
9598,
353,
9964,
7989,
2153,
90409,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
914,
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 TestClientGetOffset(t *testing.T) {
seedBroker := NewMockBroker(t, 1)
leader := NewMockBroker(t, 2)
leaderAddr := leader.Addr()
metadata := new(MetadataResponse)
metadata.AddTopicPartition("foo", 0, leader.BrokerID(), nil, nil, nil, ErrNoError)
metadata.AddBroker(leaderAddr, leader.BrokerID())
seedBroker.R... | explode_data.jsonl/54402 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 426
} | [
2830,
3393,
2959,
1949,
6446,
1155,
353,
8840,
836,
8,
341,
197,
22602,
65545,
1669,
1532,
11571,
65545,
1155,
11,
220,
16,
340,
197,
37391,
1669,
1532,
11571,
65545,
1155,
11,
220,
17,
340,
197,
37391,
13986,
1669,
7653,
93626,
2822,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEngine_SnapshotsDisabled(t *testing.T) {
sfile := MustOpenSeriesFile()
defer sfile.Close()
// Generate temporary file.
dir, _ := ioutil.TempDir("", "tsm")
walPath := filepath.Join(dir, "wal")
os.MkdirAll(walPath, 0777)
defer os.RemoveAll(dir)
// Create a tsm1 engine.
db := path.Base(dir)
opt := tsd... | explode_data.jsonl/28097 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 414
} | [
2830,
3393,
4571,
1098,
6861,
27634,
25907,
1155,
353,
8840,
836,
8,
341,
1903,
1192,
1669,
15465,
5002,
25544,
1703,
741,
16867,
274,
1192,
10421,
2822,
197,
322,
19813,
13340,
1034,
624,
48532,
11,
716,
1669,
43144,
65009,
6184,
19814,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestZstdChunkedFooter(t *testing.T) {
max := int64(200000)
for off := int64(0); off <= max; off += 1023 {
size := max - off
checkZstdChunkedFooter(t, off, size, size/2)
}
} | explode_data.jsonl/10604 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
57,
1834,
28304,
291,
19445,
1155,
353,
8840,
836,
8,
341,
22543,
1669,
526,
21,
19,
7,
17,
15,
15,
15,
15,
15,
340,
2023,
1007,
1669,
526,
21,
19,
7,
15,
1215,
1007,
2651,
1932,
26,
1007,
1421,
220,
16,
15,
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... | 2 |
func TestGameServerApplyToPodGameServerContainer(t *testing.T) {
t.Parallel()
name := "mycontainer"
gs := &GameServer{
Spec: GameServerSpec{
Container: name,
Template: corev1.PodTemplateSpec{
Spec: corev1.PodSpec{
Containers: []corev1.Container{
{Name: name, Image: "foo/mycontainer"},
{... | explode_data.jsonl/19640 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 322
} | [
2830,
3393,
4868,
5475,
28497,
1249,
23527,
4868,
5475,
4502,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
11609,
1669,
330,
2408,
3586,
698,
3174,
82,
1669,
609,
4868,
5475,
515,
197,
7568,
992,
25,
4050,
5475,
8327,
515,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCrossStructEqFieldValidation(t *testing.T) {
type Inner struct {
CreatedAt *time.Time
}
type Test struct {
Inner *Inner
CreatedAt *time.Time `validate:"eqcsfield=Inner.CreatedAt"`
}
now := time.Now().UTC()
inner := &Inner{
CreatedAt: &now,
}
test := &Test{
Inner: inner,
Created... | explode_data.jsonl/77230 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 938
} | [
2830,
3393,
28501,
9422,
27312,
1877,
13799,
1155,
353,
8840,
836,
8,
1476,
13158,
36356,
2036,
341,
197,
84062,
1655,
353,
1678,
16299,
198,
197,
630,
13158,
3393,
2036,
341,
197,
197,
31597,
257,
353,
31597,
198,
197,
84062,
1655,
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 TestAddUser(t *testing.T) {
fmt.Println("-- addUser --")
// Valid case 1
userJSON := `{
"email": "` + USER_EMAIL + `",
"password": "` + USER_PWD + `",
"username": "` + USER_USERNAME + `"
}`
reader = strings.NewReader(userJSON) // Convert string to reader
request, err := clie... | explode_data.jsonl/74525 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 816
} | [
2830,
3393,
2212,
1474,
1155,
353,
8840,
836,
8,
341,
11009,
12419,
21549,
77475,
1177,
5130,
197,
322,
7818,
1142,
220,
16,
271,
19060,
5370,
1669,
1565,
515,
197,
197,
1,
2332,
788,
35973,
488,
13872,
29548,
488,
1565,
756,
197,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestProps_EncryptJWT(t *testing.T) {
props := NewProps()
err := props.UnmarshalJSON("{\"exp\":1, \"ninchat.com/metadata\":{\"key\":\"value\"}}")
if err != nil {
t.Error(err)
}
token, err := props.EncryptToJWT("123456789ABC", "VGhpcyBpcyBhIGZha2Uga2V5IGdlbmVyYXRlZCBmb3I=")
if err != nil {
t.Error(err)
}... | explode_data.jsonl/6398 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 370
} | [
2830,
3393,
5992,
93529,
3571,
55172,
1155,
353,
8840,
836,
8,
341,
77691,
1669,
1532,
5992,
741,
9859,
1669,
6914,
38097,
5370,
99141,
4580,
11693,
16,
11,
7245,
78460,
9686,
905,
3183,
7603,
92729,
792,
23488,
957,
2105,
3417,
1138,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestMakeStatefulSetSpecWebRoutePrefix(t *testing.T) {
a := monitoringv1.Alertmanager{}
replicas := int32(1)
a.Spec.Version = operator.DefaultAlertmanagerVersion
a.Spec.Replicas = &replicas
statefulSet, err := makeStatefulSetSpec(&a, defaultTestConfig)
if err != nil {
t.Fatal(err)
}
amArgs := statefulSe... | explode_data.jsonl/25245 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 225
} | [
2830,
3393,
8078,
1397,
1262,
1649,
8327,
5981,
4899,
14335,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
16558,
85,
16,
40143,
13297,
16094,
73731,
52210,
1669,
526,
18,
17,
7,
16,
340,
11323,
36473,
35842,
284,
5675,
13275,
9676,
13297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_defaultModelBuildTask_buildPathPatternsForPrefixPathType(t *testing.T) {
type args struct {
path string
}
tests := []struct {
name string
args args
want []string
wantErr error
}{
{
name: "/ with prefix pathType",
args: args{
path: "/",
},
want: []string{"/*"},
},
{... | explode_data.jsonl/63632 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 691
} | [
2830,
3393,
9993,
1712,
11066,
6262,
20801,
1820,
57656,
2461,
14335,
1820,
929,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
26781,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPollServiceInstanceInProgressProvisioningWithOperation(t *testing.T) {
fakeKubeClient, fakeCatalogClient, fakeClusterServiceBrokerClient, testController, sharedInformers := newTestController(t, fakeosb.FakeClientConfiguration{
PollLastOperationReaction: &fakeosb.PollLastOperationReaction{
Response: &osb.... | explode_data.jsonl/58158 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 723
} | [
2830,
3393,
49207,
1860,
2523,
88711,
1336,
13013,
287,
2354,
8432,
1155,
353,
8840,
836,
8,
341,
1166,
726,
42,
3760,
2959,
11,
12418,
41606,
2959,
11,
12418,
28678,
1860,
65545,
2959,
11,
1273,
2051,
11,
6094,
37891,
388,
1669,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapParsing(t *testing.T) {
m := new(MessageWithMap)
const in = `name_mapping:<key:1234 value:"Feist"> name_mapping:<key:1 value:"Beatles">` +
`msg_mapping:<key:-4, value:<f: 2.0>,>` + // separating commas are okay
`msg_mapping<key:-2 value<f: 4.0>>` + // no colon after "value"
`msg_mapping:<value:<f: 5... | explode_data.jsonl/9705 | {
"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,
2227,
68839,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
501,
29359,
2354,
2227,
340,
4777,
304,
284,
1565,
606,
26930,
31252,
792,
25,
16,
17,
18,
19,
897,
2974,
6123,
380,
755,
829,
26930,
31252,
792,
25,
16,
897,
2974,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateInteractor_ExecuteCreate(t *testing.T) {
type args struct {
req *CreateRequest
}
tests := []struct {
name string
mockset func(
repo *mold.MockRepository,
service *mold.MockService,
out *MockCreateOutputPort,
)
args args
}{
{
name: "empty source",
mockset: func(repo *mold... | explode_data.jsonl/81106 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1255
} | [
2830,
3393,
4021,
3306,
5621,
83453,
4021,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
24395,
353,
4021,
1900,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
77333,
746,
2915,
1006,
298,
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 TestDescription(t *testing.T) {
cases := []struct {
name string
message string
reason string
fallback string
expected string
}{
{
name: "prefer message over reason or fallback",
message: "hello",
reason: "world",
fallback: "doh",
expected: "hello",
},
{
name: "... | explode_data.jsonl/78935 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 338
} | [
2830,
3393,
5009,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
24753,
220,
914,
198,
197,
17200,
1497,
256,
914,
198,
197,
1166,
3420,
914,
198,
197,
42400,
914,
198,
197,
59403,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestMappedPage_Write_number(t *testing.T) {
mp, err := NewMappedPage(filepath.Join(t.TempDir(), t.Name()), 128)
assert.NoError(t, err)
mp.PutUint32(10, 0)
mp.PutUint64(999, 8)
mp.PutUint8(50, 16)
assert.Equal(t, uint32(999), mp.ReadUint32(8))
assert.Equal(t, uint64(10), mp.ReadUint64(0))
assert.Equal(t, ui... | explode_data.jsonl/31831 | {
"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,
83345,
2665,
31825,
5500,
1155,
353,
8840,
836,
8,
341,
53230,
11,
1848,
1669,
1532,
83345,
2665,
34793,
22363,
1155,
65009,
6184,
1507,
259,
2967,
11858,
220,
16,
17,
23,
340,
6948,
35699,
1155,
11,
1848,
340,
53230,
39825,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFindInFiles(t *testing.T) {
expected := []testableMutation{
{
location: "testdata/mixed/main.go:13:2",
variableName: "x",
newValueRendered: "\"some new value for x!\"",
},
{
location: "testdata/mixed/main.go:24:3",
variableName: "x",
newValueRendered: "\"changed... | explode_data.jsonl/27338 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2227
} | [
2830,
3393,
9885,
641,
10809,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
3056,
1944,
480,
53998,
515,
197,
197,
515,
298,
53761,
25,
260,
330,
92425,
3183,
3286,
15351,
18002,
25,
16,
18,
25,
17,
756,
298,
2405,
2156,
675,
25,
257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFuturesBatchOrder(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test: api keys not set or canManipulateRealOrders set to false")
}
var data []PlaceBatchOrderData
var tempData PlaceBatchOrderData
tempData.Symbol = "BTCUSD_PERP"
tempData.Side = "BUY"... | explode_data.jsonl/76619 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 214
} | [
2830,
3393,
37,
74606,
21074,
4431,
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,
25,
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 Test_write_val_empty_array(t *testing.T) {
should := require.New(t)
val := []int{}
str, err := jsoner.DefaultAPI().MarshalToString(val)
should.Nil(err)
should.Equal("[]", str)
} | explode_data.jsonl/57880 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
9165,
6189,
15124,
3858,
1155,
353,
8840,
836,
8,
341,
197,
5445,
1669,
1373,
7121,
1155,
340,
19302,
1669,
3056,
396,
16094,
11355,
11,
1848,
1669,
2951,
261,
13275,
7082,
1005,
55438,
5870,
9098,
340,
197,
5445,
59678,
396... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLastSegment(t *testing.T) {
for _, tc := range lastSegmentSplitTests {
roles := fuzzy.RuneRoles([]byte(tc.str), nil)
got := fuzzy.LastSegment(tc.str, roles)
if got != tc.want {
t.Errorf("str %v: want %v; got %v", tc.str, tc.want, got)
}
}
} | explode_data.jsonl/58126 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
5842,
21086,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
1537,
21086,
20193,
18200,
341,
197,
197,
14643,
1669,
52733,
2013,
2886,
25116,
10556,
3782,
44415,
9528,
701,
2092,
692,
197,
3174,
354,
1669,
52733,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProposerSelection1(t *testing.T) {
vset := NewValidatorSet([]*Validator{
newValidator([]byte("foo"), 1000),
newValidator([]byte("bar"), 300),
newValidator([]byte("baz"), 330),
})
var proposers []string
for i := 0; i < 99; i++ {
val := vset.GetProposer()
proposers = append(proposers, string(val.Ad... | explode_data.jsonl/28315 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 334
} | [
2830,
3393,
2008,
23438,
11177,
16,
1155,
353,
8840,
836,
8,
341,
5195,
746,
1669,
1532,
14256,
1649,
85288,
14256,
515,
197,
8638,
14256,
10556,
3782,
445,
7975,
3975,
220,
16,
15,
15,
15,
1326,
197,
8638,
14256,
10556,
3782,
445,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestORM_CloseDB(t *testing.T) {
closeORM, err := NewSqlite3ORM(false, "/tmp/", "test_close.db", nil)
require.Nil(t, err)
defer DeleteDB("/tmp/test_close.db")
err = closeORM.Close()
require.Nil(t, err)
// query after close DB
products, err := closeORM.getAllUpdatedProducts(0, -1)
require.Error(t, err)
req... | explode_data.jsonl/77893 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1181
} | [
2830,
3393,
4365,
68185,
3506,
1155,
353,
8840,
836,
8,
341,
27873,
4365,
11,
1848,
1669,
1532,
8269,
632,
18,
4365,
3576,
11,
3521,
5173,
28105,
330,
1944,
12704,
7076,
497,
2092,
340,
17957,
59678,
1155,
11,
1848,
340,
16867,
10428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListMeshServices(t *testing.T) {
assert := tassert.New(t)
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockKubeController := k8s.NewMockController(mockCtrl)
mc := MeshCatalog{
kubeController: mockKubeController,
}
testCases := []struct {
name string
services map[string]string ... | explode_data.jsonl/69756 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 438
} | [
2830,
3393,
852,
14194,
11025,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
259,
2207,
7121,
1155,
340,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
7860,
15001,
991,
18176,
2822,
77333,
42,
3760,
2051,
1669,
595,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSubDomainMatcher(t *testing.T) {
assert := assert.On(t)
cases := []struct {
pattern string
input context.Context
output bool
}{
{
pattern: "v2ray.com",
input: proxy.ContextWithTarget(context.Background(), net.TCPDestination(net.DomainAddress("www.v2ray.com"), 80)),
output: ... | explode_data.jsonl/31300 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 496
} | [
2830,
3393,
3136,
13636,
37554,
1155,
353,
8840,
836,
8,
972,
6948,
1669,
2060,
8071,
1155,
7229,
1444,
2264,
1669,
3056,
1235,
972,
197,
3223,
3227,
914,
319,
197,
22427,
256,
2266,
9328,
319,
197,
21170,
220,
1807,
319,
197,
92,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAuth(t *testing.T) {
t.Log("Given the need to be able to AuthN and AuthZ access.")
{
testID := 0
t.Logf("\tTest %d:\tWhen handling a single user.", testID)
{
privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
if err != nil {
t.Fatalf("\t%s\tTest %d:\tShould be able to create a private key:... | explode_data.jsonl/74561 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1364
} | [
2830,
3393,
5087,
1155,
353,
8840,
836,
8,
341,
3244,
5247,
445,
22043,
279,
1184,
311,
387,
2952,
311,
7366,
45,
323,
7366,
57,
2615,
13053,
197,
515,
197,
18185,
915,
1669,
220,
15,
198,
197,
3244,
98954,
4921,
83,
2271,
1018,
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... | 9 |
func TestResume_Generic(t *testing.T) {
RunScenarios(t, eOperation.CopyAndSync()|eOperation.Resume(), eTestFromTo.AllSync(), eValidate.Auto(), params{
recursive: true,
debugSkipFiles: []string{
"/fileb",
"/filec",
},
}, nil, testFiles{
defaultSize: "1K",
shouldTransfer: []interface{}{
folder(""),
... | explode_data.jsonl/43013 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 187
} | [
2830,
3393,
28563,
29085,
1155,
353,
8840,
836,
8,
341,
85952,
3326,
60494,
1155,
11,
384,
8432,
31770,
3036,
12154,
368,
91,
68,
8432,
15346,
1507,
384,
2271,
3830,
1249,
16764,
12154,
1507,
384,
17926,
6477,
1507,
3628,
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 TestReceive(t *testing.T) {
t.Run("Receive message test", func(t *testing.T) {
Init(clientId)
_, err := Receive(subName)
if err != nil {
t.Error(err)
} else {
log.Println("Receive message test is successful.")
}
})
} | explode_data.jsonl/4860 | {
"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,
14742,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
14742,
1943,
1273,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
98762,
12805,
764,
692,
197,
197,
6878,
1848,
1669,
37422,
10624,
675,
692,
197,
743,
1848,
961,
2092,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetImmutable(t *testing.T) {
db := dbm.NewMemDB()
tree, cID := newAlohaTree(t, db)
store := UnsafeNewStore(tree)
require.True(t, tree.Set([]byte("hello"), []byte("adios")))
hash, ver, err := tree.SaveVersion()
cID = types.CommitID{Version: ver, Hash: hash}
require.Nil(t, err)
_, err = store.GetImmuta... | explode_data.jsonl/38058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 396
} | [
2830,
3393,
1949,
58890,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
2927,
76,
7121,
18816,
3506,
741,
51968,
11,
272,
915,
1669,
501,
32,
385,
4223,
6533,
1155,
11,
2927,
340,
57279,
1669,
73067,
3564,
6093,
21298,
692,
17957,
32443,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateProjectIncorrectProjectNameCmd(t *testing.T) {
credentialmanager.MockAuthCreds = true
cmd := fmt.Sprintf("update project Sockshop -t token -u user -r https://github.com/user/upstream.git --mock")
_, err := executeActionCommandC(cmd)
if !errorContains(err, "contains upper case letter(s) or special c... | explode_data.jsonl/53459 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
4289,
7849,
40468,
7849,
675,
15613,
1155,
353,
8840,
836,
8,
341,
197,
66799,
13297,
24664,
5087,
34,
53369,
284,
830,
271,
25920,
1669,
8879,
17305,
445,
2386,
2390,
328,
1176,
8675,
481,
83,
3950,
481,
84,
1196,
481,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGatherOnSetLocalDescription(t *testing.T) {
lim := test.TimeOut(time.Second * 30)
defer lim.Stop()
report := test.CheckRoutines(t)
defer report()
pcOfferGathered := make(chan SessionDescription)
pcAnswerGathered := make(chan SessionDescription)
s := SettingEngine{}
api := NewAPI(WithSettingEngine(s)... | explode_data.jsonl/8653 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 602
} | [
2830,
3393,
38,
1856,
1925,
1649,
7319,
5009,
1155,
353,
8840,
836,
8,
341,
197,
4659,
1669,
1273,
16299,
2662,
9730,
32435,
353,
220,
18,
15,
340,
16867,
4568,
30213,
2822,
69931,
1669,
1273,
10600,
49,
28628,
1155,
340,
16867,
1895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClient_WriteBufferOverflow(t *testing.T) {
ctrl := gomock.NewController(t)
defer func() {
time.Sleep(100 * time.Millisecond)
ctrl.Finish()
}()
closedErr := wspubsub.NewConnectionClosedError(errors.New("i/o timeout"))
message := wspubsub.NewTextMessageFromString("TEST")
logger := mock.NewMockLogger(... | explode_data.jsonl/34127 | {
"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,
2959,
31825,
4095,
42124,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
2915,
368,
341,
197,
21957,
31586,
7,
16,
15,
15,
353,
882,
71482,
340,
197,
84381,
991,
18176,
741,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_PopSafe(t *testing.T) {
a := NewSet()
a.Add("a")
a.Add("b")
a.Add("c")
a.Add("d")
captureSet := NewSet()
captureSet.Add(a.Pop())
captureSet.Add(a.Pop())
captureSet.Add(a.Pop())
captureSet.Add(a.Pop())
finalNil := a.Pop()
if captureSet.Cardinality() != 4 {
t.Error("unexpected captureSet cardin... | explode_data.jsonl/208 | {
"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,
1088,
453,
25663,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
1532,
1649,
2822,
11323,
1904,
445,
64,
1138,
11323,
1904,
445,
65,
1138,
11323,
1904,
445,
66,
1138,
11323,
1904,
445,
67,
5130,
1444,
11850,
1649,
1669,
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... | 5 |
func TestAllGennaroDkgRounds(t *testing.T) {
// Initiate two participants
p1, _ := NewParticipant(1, 2, testGenerator, curves.NewK256Scalar(), 2)
p2, _ := NewParticipant(2, 2, testGenerator, curves.NewK256Scalar(), 1)
// Running round 1
bcast1, p2psend1, _ := p1.Round1(nil)
bcast2, p2psend2, _ := p2.Round1(nil)
... | explode_data.jsonl/77870 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 708
} | [
2830,
3393,
2403,
38,
2667,
17165,
35,
7351,
49,
3095,
1155,
353,
8840,
836,
8,
341,
197,
322,
15690,
6493,
1378,
13026,
198,
3223,
16,
11,
716,
1669,
1532,
67504,
7,
16,
11,
220,
17,
11,
1273,
12561,
11,
35933,
7121,
42,
17,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestObjectHistory(t *testing.T) {
s := RunBasicJetStreamServer()
defer shutdown(s)
nc, js := jsClient(t, s)
defer nc.Close()
obs, err := js.CreateObjectStore(&nats.ObjectStoreConfig{Bucket: "OBJS"})
expectOk(t, err)
_, err = obs.PutBytes("A", bytes.Repeat([]byte("A"), 100))
expectOk(t, err)
_, err = o... | explode_data.jsonl/75498 | {
"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,
1190,
13424,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
6452,
15944,
35641,
3027,
5475,
741,
16867,
23766,
1141,
692,
197,
1016,
11,
6994,
1669,
6994,
2959,
1155,
11,
274,
340,
16867,
25126,
10421,
2822,
197,
5481,
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... | 2 |
func TestParser_ParseStructArrayObject(t *testing.T) {
src := `
package api
type Response struct {
Code int
Table [][]string
Data []struct{
Field1 uint
Field2 string
}
}
// @Success 200 {object} Response
// @Router /api/{id} [get]
func Test(){
}
`
expected := `{
"api.Response": {
"type": "object",
... | explode_data.jsonl/63566 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 782
} | [
2830,
3393,
6570,
77337,
9422,
1857,
1190,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
22074,
1722,
6330,
271,
1313,
5949,
2036,
341,
90774,
526,
198,
197,
2556,
52931,
917,
198,
40927,
3056,
1235,
515,
197,
94478,
16,
2622,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCleanName(t *testing.T) {
tests := []struct {
input string
expected string
}{
{input: " beat index pattern", expected: "beatindexpattern"},
{input: "Beat@Index.!", expected: "BeatIndex"},
{input: "beatIndex", expected: "beatIndex"},
}
for idx, test := range tests {
output := clean(test.input... | explode_data.jsonl/3906 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 171
} | [
2830,
3393,
27529,
675,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
22427,
262,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
90,
1355,
25,
330,
9382,
1922,
5383,
497,
3601,
25,
330,
22227,
1252,
14339,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerRumSwitch(t *testing.T) {
ucfg, err := common.NewConfigFrom(m{"rum": m{"enabled": true, "allow_origins": []string{"*"}}})
assert.NoError(t, err)
apm, teardown, err := setupServer(t, ucfg, nil)
require.NoError(t, err)
defer teardown()
baseUrl, client := apm.client(false)
for _, url := range []str... | explode_data.jsonl/4942 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 230
} | [
2830,
3393,
5475,
49,
372,
16837,
1155,
353,
8840,
836,
8,
341,
197,
1754,
4817,
11,
1848,
1669,
4185,
7121,
2648,
3830,
1255,
4913,
10721,
788,
296,
4913,
15868,
788,
830,
11,
330,
7183,
35328,
1330,
788,
3056,
917,
4913,
9,
30975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCountQuery(t *testing.T) {
testReset()
q := testTable.Query()
q.GroupBy("col0")
q.Limit(8)
q.Offset(10)
cq := q.CountQuery()
want := "SELECT COUNT(*) AS `count` FROM (SELECT `t1`.`col0`, `t1`.`col1` FROM `test` AS `t1` GROUP BY `t1`.`col0`) AS `t2`"
testGotWant(t, cq.String(), want)
} | explode_data.jsonl/62363 | {
"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,
2507,
2859,
1155,
353,
8840,
836,
8,
341,
18185,
14828,
2822,
18534,
1669,
1273,
2556,
15685,
741,
18534,
5407,
1359,
445,
2074,
15,
1138,
18534,
1214,
2353,
7,
23,
340,
18534,
61958,
7,
16,
15,
340,
1444,
80,
1669,
2804,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSanitizeTaints(t *testing.T) {
oldNode := BuildTestNode("ng1-1", 1000, 1000)
taints := make([]apiv1.Taint, 0)
taints = append(taints, apiv1.Taint{
Key: ReschedulerTaintKey,
Value: "test1",
Effect: apiv1.TaintEffectNoSchedule,
})
taints = append(taints, apiv1.Taint{
Key: "test-taint",
Valu... | explode_data.jsonl/44991 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 262
} | [
2830,
3393,
23729,
26310,
51,
1641,
82,
1155,
353,
8840,
836,
8,
341,
61828,
1955,
1669,
7854,
2271,
1955,
445,
968,
16,
12,
16,
497,
220,
16,
15,
15,
15,
11,
220,
16,
15,
15,
15,
340,
3244,
1641,
82,
1669,
1281,
10556,
391,
344... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogfmtLogger(t *testing.T) {
t.Parallel()
buf := &bytes.Buffer{}
logger := log.NewLogfmtLogger(buf)
if err := logger.Log("hello", "world"); err != nil {
t.Fatal(err)
}
if want, have := "hello=world\n", buf.String(); want != have {
t.Errorf("want %#v, have %#v", want, have)
}
buf.Reset()
if err :... | explode_data.jsonl/74761 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 357
} | [
2830,
3393,
2201,
12501,
7395,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
26398,
1669,
609,
9651,
22622,
16094,
17060,
1669,
1487,
7121,
2201,
12501,
7395,
10731,
692,
743,
1848,
1669,
5925,
5247,
445,
14990,
497,
330,
14615,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUserEntityDisableSUCCESS(t *testing.T) {
resp, _ := sendPut("http://localhost:8080/TESTING/YourAccount&q=Disable", UserEntityDisableSUCCESS, auth.Header.Get("Authorization"))
response := responseToString(resp)
compareResults(t, response, HyperText.CustomResponses["success-disabled"])
} | explode_data.jsonl/59345 | {
"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,
1474,
3030,
25479,
39308,
1155,
353,
8840,
836,
8,
341,
34653,
11,
716,
1669,
3624,
19103,
445,
1254,
1110,
8301,
25,
23,
15,
23,
15,
14,
10033,
1718,
14,
7771,
7365,
62735,
28,
25479,
497,
2657,
3030,
25479,
39308,
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 TestGetExpiryFromExpirePriorityQueue(t *testing.T) {
messageChan := make(chan *entities.Message)
input := AggregationInput{
MessageChan: messageChan,
WorkerNum: 2,
CorrelateFields: fields,
ActiveExpiryTimeout: testActiveExpiry,
InactiveExpiryTimeout: testInactiveExpiry,
}... | explode_data.jsonl/8706 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 660
} | [
2830,
3393,
1949,
840,
48209,
3830,
8033,
554,
20555,
7554,
1155,
353,
8840,
836,
8,
341,
24753,
46019,
1669,
1281,
35190,
353,
10499,
8472,
340,
22427,
1669,
4598,
34442,
2505,
515,
197,
46733,
46019,
25,
1843,
1943,
46019,
345,
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... | 2 |
func TestSpanProcessorNegativeLatency(t *testing.T) {
zsp := NewSpanProcessor()
ts := &testSpan{
spanContext: trace.NewSpanContext(trace.SpanContextConfig{
TraceID: [16]byte{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1},
SpanID: [8]byte{1, 2, 3, 4, 5, 6, 7, 8},
TraceFlags: 1,
Remote: false,... | explode_data.jsonl/34889 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 385
} | [
2830,
3393,
12485,
22946,
38489,
23140,
2251,
1155,
353,
8840,
836,
8,
341,
20832,
2154,
1669,
1532,
12485,
22946,
741,
57441,
1669,
609,
1944,
12485,
515,
197,
197,
1480,
1972,
25,
11655,
7121,
12485,
1972,
55458,
85309,
1972,
2648,
515,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInitDestroy(t *testing.T) {
module := NewClassifierModule()
if err := module.Initialize(); err != nil {
t.Errorf("Initialize returned error: %v", err)
}
if err := module.Destroy(); err != nil {
t.Errorf("Destroy returned error: %v", err)
}
} | explode_data.jsonl/61055 | {
"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,
3803,
14245,
1155,
353,
8840,
836,
8,
341,
54020,
1669,
1532,
33895,
3332,
741,
743,
1848,
1669,
4688,
45829,
2129,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
9928,
5927,
1465,
25,
1018,
85,
497,
1848,
340,
197,
532,
743... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestEventDestroy(t *testing.T) {
defaultCtx := context.Background()
testCases := []struct {
name string
ctx context.Context
event *types.Event
entity string
check string
expectedErrCode ErrCode
}{
{
name: "No Params",
ctx: ... | explode_data.jsonl/34058 | {
"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,
1556,
14245,
1155,
353,
8840,
836,
8,
341,
11940,
23684,
1669,
2266,
19047,
2822,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
20985,
1797,
2266,
9328,
198,
197,
28302,
1843,
353,
9242,
6904,
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 TestValidateStepFunctionActivityName(t *testing.T) {
validTypes := []string{
"foo",
"FooBar123",
}
invalidTypes := []string{
strings.Repeat("W", 81), // length > 80
}
for _, v := range validTypes {
_, errors := validateSfnActivityName(v, "name")
if len(errors) != 0 {
t.Fatalf("%q should be a va... | explode_data.jsonl/78597 | {
"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,
17926,
8304,
5152,
4052,
675,
1155,
353,
8840,
836,
8,
341,
56322,
4173,
1669,
3056,
917,
515,
197,
197,
1,
7975,
756,
197,
197,
1,
40923,
3428,
16,
17,
18,
756,
197,
630,
197,
11808,
4173,
1669,
3056,
917,
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... | 5 |
func TestStopAndWait(t *testing.T) {
t.Run("nothing running, returns immediately", func(t *testing.T) {
cron := newWithSeconds()
cron.Start()
ctx := cron.Stop()
select {
case <-ctx.Done():
case <-time.After(time.Millisecond):
t.Error("context was not done immediately")
}
})
t.Run("repeated calls to... | explode_data.jsonl/8314 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1236
} | [
2830,
3393,
10674,
92812,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
41212,
4303,
11,
4675,
7069,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
1444,
2248,
1669,
501,
2354,
15343,
741,
197,
1444,
2248,
12101,
741,
197,
20985,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMarshalKRBPriv(t *testing.T) {
t.Parallel()
var a KRBPriv
b, err := hex.DecodeString(testdata.MarshaledKRB5priv)
if err != nil {
t.Fatalf("Test vector read error: %v", err)
}
err = a.Unmarshal(b)
if err != nil {
t.Fatalf("Unmarshal error: %v", err)
}
mb, err := a.Marshal()
if err != nil {
t.Fat... | explode_data.jsonl/69298 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 359
} | [
2830,
3393,
55438,
42,
29259,
32124,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2405,
264,
730,
29259,
32124,
198,
2233,
11,
1848,
1669,
12371,
56372,
703,
8623,
691,
83691,
75303,
42,
29259,
20,
11887,
340,
743,
1848,
961,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestCheckAlgorithmSuccess(t *testing.T) {
err := checkAlgorithm(&jose.JSONWebKey{
Algorithm: "RS256",
Key: &rsa.PublicKey{},
}, &jose.JSONWebSignature{
Signatures: []jose.Signature{
{
Header: jose.Header{
Algorithm: "RS256",
},
},
},
})
if err != nil {
t.Errorf("RS256 key: Ex... | explode_data.jsonl/15348 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 620
} | [
2830,
3393,
3973,
27847,
7188,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
1779,
27847,
2099,
73,
960,
18009,
5981,
1592,
515,
197,
197,
27847,
25,
330,
11451,
17,
20,
21,
756,
197,
55242,
25,
981,
609,
60869,
49139,
1592,
38837,
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 TestGetResourcesNotMatchApp(t *testing.T) {
const appStream = `
{
"services": [
{
"name": "erp"
}
]
}
`
preparePolicyDataInStore([]byte(appStream), t)
evaluator, err := NewWithStore(conf, testPS)
if err != nil {
t.Errorf("Unable to initialize evaluator due to error [%v].", err)
return
}
s... | explode_data.jsonl/48853 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 297
} | [
2830,
3393,
1949,
11277,
2623,
8331,
2164,
1155,
353,
8840,
836,
8,
341,
4777,
906,
3027,
284,
22074,
197,
515,
197,
197,
1,
12779,
788,
2278,
197,
197,
515,
298,
197,
31486,
788,
330,
22632,
698,
197,
197,
532,
197,
197,
921,
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 TestSimpleProducer(t *testing.T) {
_, err := SimpleProducer([]string{"127.0.0.1:9092"}, 0, 0, nil)
// without a running kafka this should result in an error
if err == nil {
t.Error("SimpleProducer() expected error got nil")
} else {
t.Logf("SimpleProducer() error = %v", err)
}
} | explode_data.jsonl/68625 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
16374,
45008,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
8993,
45008,
10556,
917,
4913,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
24,
15,
24,
17,
14345,
220,
15,
11,
220,
15,
11,
2092,
340,
197,
322,
2041,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestState_UpdateProtoCaps(t *testing.T) {
t.Parallel()
st := setupNewState()
fakeNetInfo := irc.NewNetworkInfo()
fakeNetInfo.ParseISupport(&irc.Event{Args: []string{
"NICK", "CHANTYPES=!", "PREFIX=(q)@", "CHANMODES=,,,q",
}})
fakeNetInfo.ParseMyInfo(&irc.Event{Args: []string{
"nick", "irc.test.net", "t... | explode_data.jsonl/32076 | {
"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,
1397,
47393,
31549,
60741,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18388,
1669,
6505,
3564,
1397,
2822,
1166,
726,
6954,
1731,
1669,
79923,
7121,
12320,
1731,
741,
1166,
726,
6954,
1731,
8937,
1637,
2800,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestCloudDatastoreWithMemcacheTestSuite(t *testing.T) {
ctx := context.Background()
for name, test := range testsuite.TestSuite {
t.Run(name, func(t *testing.T) {
// Skip the failure that happens when you firstly appended another middleware layer.
switch name {
case
"LocalCache_Basic",
"LocalC... | explode_data.jsonl/22388 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 336
} | [
2830,
3393,
16055,
1043,
4314,
2354,
18816,
9360,
2271,
28000,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
2023,
829,
11,
1273,
1669,
2088,
7032,
9302,
8787,
28000,
341,
197,
3244,
16708,
3153,
11,
2915,
1155,
353,
8840... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetTTL(t *testing.T) {
testCases := []struct {
caseNo int
coldStorage string
table string
coldTTL string
deleteTTL string
expected string
}{
{
1, "s3", "traces", "100s", "60s",
"Delete TTL should be greater than cold storage move TTL.",
},
{
2, "s3", "traces", ... | explode_data.jsonl/9930 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 568
} | [
2830,
3393,
1649,
51,
13470,
1155,
353,
8840,
836,
8,
1476,
18185,
37302,
1669,
3056,
1235,
341,
197,
2722,
2753,
414,
526,
198,
197,
1444,
813,
5793,
914,
198,
197,
26481,
981,
914,
198,
197,
1444,
813,
51,
13470,
257,
914,
198,
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 TestCastleLinkables(t *testing.T) {
tt := []struct {
home, castle string
want []string
fail bool
}{
{"home1", "dotfiles",
[]string{
".dir1",
".file1",
".dir2/.file1",
".dir2/.file2",
".dir3/.subdir1/.file1",
".dir3/.subdir1/.file2",
}, false},
{"home1", "pr... | explode_data.jsonl/56644 | {
"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,
86603,
3939,
4788,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
3056,
1235,
341,
197,
197,
5117,
11,
32584,
914,
198,
197,
50780,
260,
3056,
917,
198,
197,
63052,
260,
1807,
198,
197,
59403,
197,
197,
4913,
5117,
16,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEditFile(t *testing.T) {
prepareTestEnv(t)
session := loginUser(t, "user2")
testEditFile(t, session, "user2", "repo1", "master", "README.md")
} | explode_data.jsonl/62573 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 65
} | [
2830,
3393,
4036,
1703,
1155,
353,
8840,
836,
8,
341,
197,
13609,
2271,
14359,
1155,
340,
25054,
1669,
87169,
1155,
11,
330,
872,
17,
1138,
18185,
4036,
1703,
1155,
11,
3797,
11,
330,
872,
17,
497,
330,
23476,
16,
497,
330,
13629,
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 |
func TestSqlite3_CreateTableOptions(t *testing.T) {
a := assert.New(t, false)
builder := core.NewBuilder("")
a.NotNil(builder)
var s = dialect.Sqlite3("sqlite3_driver", "")
// 空的 meta
a.NotError(s.CreateTableOptionsSQL(builder, nil))
a.Equal(builder.Len(), 0)
// engine
builder.Reset()
a.NotError(s.CreateTab... | explode_data.jsonl/11878 | {
"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,
8269,
632,
18,
34325,
2556,
3798,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
11,
895,
340,
44546,
1669,
6200,
7121,
3297,
31764,
11323,
93882,
30750,
340,
2405,
274,
284,
42279,
23005,
632,
18,
445,
37042,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMsgCreateKpiFeatures_ValidateBasic(t *testing.T) {
tests := []struct {
name string
msg MsgCreateKpiFeatures
err error
}{
{
name: "invalid address",
msg: MsgCreateKpiFeatures{
Creator: "invalid_address",
},
err: sdkerrors.ErrInvalidAddress,
}, {
name: "valid address",
msg: Ms... | explode_data.jsonl/72072 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 276
} | [
2830,
3393,
6611,
4021,
42,
2493,
21336,
62,
17926,
15944,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
21169,
220,
24205,
4021,
42,
2493,
21336,
198,
197,
9859,
220,
1465,
198,
197,
59403,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNewFloat32(t *testing.T) {
testCases := []struct {
name string
input []float32
expect []float32
}{
{
name: "test Float32 New, s nothing",
input: nil,
expect: nil,
},
{
name: "test Float32 New, inputs multiple elements",
input: []float32{1, 1.5, 1.2},
expect: []float32{1... | explode_data.jsonl/60100 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 227
} | [
2830,
3393,
3564,
5442,
18,
17,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
22427,
220,
3056,
3649,
18,
17,
198,
197,
24952,
3056,
3649,
18,
17,
198,
197,
59403,
197,
197,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLoad(t *testing.T) {
testCases := []loadTestCase{
loadTestCase{
name: "No config files",
expectedConfig: &latest.Config{
Version: latest.Version,
Providers: []*latest.Provider{
DevSpaceCloudProviderConfig,
},
},
},
loadTestCase{
name: "Get latest config and add devspace-clou... | explode_data.jsonl/54493 | {
"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,
5879,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1078,
16458,
515,
197,
49386,
16458,
515,
298,
11609,
25,
330,
2753,
2193,
3542,
756,
298,
42400,
2648,
25,
609,
19350,
10753,
515,
571,
77847,
25,
5535,
35842,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChordAngleBetweenPoints(t *testing.T) {
for iter := 0; iter < 10; iter++ {
m := randomFrame()
x := m.col(0)
y := m.col(1)
z := m.col(2)
if got := ChordAngleBetweenPoints(z, z).Angle(); got != 0 {
t.Errorf("ChordAngleBetweenPoints(%v, %v) = %v, want 0", z, z, got)
}
if got, want := ChordAngle... | explode_data.jsonl/52182 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 425
} | [
2830,
3393,
1143,
539,
15939,
25477,
11411,
1155,
353,
8840,
836,
8,
341,
2023,
5367,
1669,
220,
15,
26,
5367,
366,
220,
16,
15,
26,
5367,
1027,
341,
197,
2109,
1669,
4194,
4369,
741,
197,
10225,
1669,
296,
13414,
7,
15,
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... | 6 |
func TestPathMapper(t *testing.T) {
for _, testcase := range []struct {
spec pathSpec
expected string
err error
}{
{
spec: manifestRevisionPathSpec{
name: "foo/bar",
revision: "sha256:abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789",
},
expected: "/docker/registr... | explode_data.jsonl/8267 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1404
} | [
2830,
3393,
1820,
10989,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
70080,
1669,
2088,
3056,
1235,
341,
197,
98100,
257,
1815,
8327,
198,
197,
42400,
914,
198,
197,
9859,
414,
1465,
198,
197,
59403,
197,
197,
515,
298,
98100,
25,
14455... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnable(t *testing.T) {
defer CaptureLog(t).Release()
Enable()
if GetLevel() != log.InfoLevel {
t.Fatal("wrong level")
}
EnableWith(log.DebugLevel)
if GetLevel() != log.DebugLevel {
t.Fatal("wrong level")
}
t.Logf("cwd: %v", dir.GetCurrentDir())
SetupLoggingFormat("json", 1)
SetupLoggingFormat... | explode_data.jsonl/4687 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
11084,
1155,
353,
8840,
836,
8,
341,
16867,
39885,
2201,
1155,
568,
16077,
2822,
197,
11084,
741,
743,
2126,
4449,
368,
961,
1487,
20132,
4449,
341,
197,
3244,
26133,
445,
34870,
2188,
1138,
197,
630,
197,
11084,
2354,
12531... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApiTest_ResponseBody(t *testing.T) {
apitest.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
_, _ = w.Write([]byte(`{"id": "1234", "name": "Andy"}`))
w.WriteHeader(http.StatusOK)
}).
Get("/user/1234").
Expect(t).
Body(`{"id": "1234", "name": "Andy"}`).
Status(http.StatusOK).
End()
} | explode_data.jsonl/54779 | {
"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,
6563,
2271,
62,
29637,
1155,
353,
8840,
836,
8,
341,
69898,
97105,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
197,
6878,
716,
284,
289,
4073,
10556,
3782,
5809,
4913,
307,
788,
330,
16,
17,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRead_closedMidstream(t *testing.T) {
assert := assert.New(t)
server, log, cleanup := setup(t)
defer cleanup()
server.append([][]byte{[]byte("hello"), []byte("world")})
var allEntries []blog.Entry
entriesCh := make(chan []blog.Entry)
wait := parallel.Go(func() {
for entries := range entriesCh {
allE... | explode_data.jsonl/57 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 197
} | [
2830,
3393,
4418,
44697,
33648,
4027,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
41057,
11,
1487,
11,
21290,
1669,
6505,
1155,
340,
16867,
21290,
741,
41057,
2057,
10556,
1294,
3782,
90,
1294,
3782,
445,
14990,
397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteControllerAndExpectations(t *testing.T) {
rs := newReplicaSet(1, map[string]string{"foo": "bar"})
client := fake.NewSimpleClientset(rs)
stopCh := make(chan struct{})
defer close(stopCh)
manager, informers := testNewReplicaSetControllerFromClient(client, stopCh, 10)
informers.Apps().V1().ReplicaSet... | explode_data.jsonl/7981 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 546
} | [
2830,
3393,
6435,
2051,
3036,
17536,
804,
1155,
353,
8840,
836,
8,
341,
41231,
1669,
501,
18327,
15317,
1649,
7,
16,
11,
2415,
14032,
30953,
4913,
7975,
788,
330,
2257,
23625,
25291,
1669,
12418,
7121,
16374,
2959,
746,
17027,
340,
6264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTSNew(t *testing.T) {
expectPrintedTS(t, "new Foo()", "new Foo();\n")
expectPrintedTS(t, "new Foo<number>()", "new Foo();\n")
expectPrintedTS(t, "new Foo<number, boolean>()", "new Foo();\n")
expectPrintedTS(t, "new Foo!()", "new Foo();\n")
expectPrintedTS(t, "new Foo!<number>()", "new Foo();\n")
expectP... | explode_data.jsonl/82329 | {
"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,
9951,
3564,
1155,
353,
8840,
836,
8,
341,
24952,
8994,
291,
9951,
1155,
11,
330,
931,
33428,
50514,
330,
931,
33428,
2129,
59,
77,
1138,
24952,
8994,
291,
9951,
1155,
11,
330,
931,
33428,
39982,
13555,
497,
330,
931,
33428... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestString(t *testing.T) {
// test invalid base explicitly
var panicStr string
func() {
defer func() {
panicStr = recover().(string)
}()
natOne.utoa(1)
}()
if panicStr != "invalid base" {
t.Errorf("expected panic for invalid base")
}
for _, a := range strTests {
s := string(a.x.utoa(a.b))
if... | explode_data.jsonl/57381 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 356
} | [
2830,
3393,
703,
1155,
353,
8840,
836,
8,
341,
197,
322,
1273,
8318,
2331,
20975,
198,
2405,
21975,
2580,
914,
198,
29244,
368,
341,
197,
16867,
2915,
368,
341,
298,
30764,
2580,
284,
11731,
1005,
7,
917,
340,
197,
197,
69826,
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 TestLoggingEvent(t *testing.T) {
log := map[Event]string{}
SetListener(func(cls Event, msg string) {
log[cls] = msg
})
SetEvents(EventRequest)
defer TestResetEvents()
Write(EventResponse, "this shouldn't be in the log")
if s, ok := log[EventResponse]; ok {
t.Fatalf("unexpected log entry %s", s)
}
cons... | explode_data.jsonl/62215 | {
"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,
34575,
1556,
1155,
353,
8840,
836,
8,
341,
6725,
1669,
2415,
58,
1556,
30953,
16094,
22212,
2743,
18552,
20398,
3665,
11,
3750,
914,
8,
341,
197,
6725,
58,
18074,
60,
284,
3750,
198,
197,
3518,
22212,
7900,
30469,
1900,
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... | 1 |
func TestInterfaces(t *testing.T) {
c, err := NewContainer(ContainerName)
if err != nil {
t.Errorf(err.Error())
}
if _, err := c.Interfaces(); err != nil {
t.Errorf(err.Error())
}
} | explode_data.jsonl/2777 | {
"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,
41066,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
1532,
4502,
75145,
675,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
3964,
6141,
2398,
197,
630,
743,
8358,
1848,
1669,
272,
28159,
2129,
1848,
961,
2092,
341... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 3 |
func TestCompiler_compileSwap_v128(t *testing.T) {
const x1Lo, x1Hi uint64 = 100000, 200000
const x2Lo, x2Hi uint64 = 1, 2
tests := []struct {
x1OnRegister, x2OnRegister bool
}{
{x1OnRegister: true, x2OnRegister: true},
{x1OnRegister: true, x2OnRegister: false},
{x1OnRegister: false, x2OnRegister: true},
... | explode_data.jsonl/13228 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 969
} | [
2830,
3393,
38406,
74170,
46179,
2273,
16,
17,
23,
1155,
353,
8840,
836,
8,
341,
4777,
856,
16,
4262,
11,
856,
16,
13048,
2622,
21,
19,
284,
220,
16,
15,
15,
15,
15,
15,
11,
220,
17,
15,
15,
15,
15,
15,
198,
4777,
856,
17,
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... | 3 |
func TestServerReceiveTimeout(t *testing.T) {
s, c := makeTestServer()
s.SetTimeout(time.Second)
s.SetRetries(2)
var serverErr error
s.writeHandler = func(filename string, wt io.WriterTo) error {
buf := &bytes.Buffer{}
_, serverErr = wt.WriteTo(buf)
return serverErr
}
defer s.Shutdown()
filename := "test-... | explode_data.jsonl/17560 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 343
} | [
2830,
3393,
5475,
14742,
7636,
1155,
353,
8840,
836,
8,
341,
1903,
11,
272,
1669,
1281,
2271,
5475,
741,
1903,
4202,
7636,
9730,
32435,
340,
1903,
4202,
12020,
4019,
7,
17,
340,
2405,
3538,
7747,
1465,
198,
1903,
3836,
3050,
284,
2915... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCalculate2(t *testing.T) {
origin := bgp.NewPathAttributeOrigin(0)
aspathParam := []bgp.AsPathParamInterface{bgp.NewAs4PathParam(2, []uint32{65001})}
aspath := bgp.NewPathAttributeAsPath(aspathParam)
nexthop := bgp.NewPathAttributeNextHop("10.0.0.1")
med := bgp.NewPathAttributeMultiExitDisc(0)
pathAttri... | explode_data.jsonl/14520 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 749
} | [
2830,
3393,
47866,
17,
1155,
353,
8840,
836,
8,
1476,
197,
8611,
1669,
8951,
79,
7121,
1820,
3907,
13298,
7,
15,
340,
60451,
2343,
2001,
1669,
3056,
12220,
79,
20242,
93492,
5051,
90,
12220,
79,
7121,
2121,
19,
93492,
7,
17,
11,
305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUntarInvalidSymlink(t *testing.T) {
// TODO Windows. There may be a way of running this, but turning off for now
if runtime.GOOS == "windows" {
t.Skip("hardlinks on Windows")
}
for i, headers := range [][]*tar.Header{
{ // try reading victim/hello (../)
{
Name: "dotdot",
Typeflag: tar.Ty... | explode_data.jsonl/82002 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1128
} | [
2830,
3393,
20250,
277,
7928,
34667,
44243,
1155,
353,
8840,
836,
8,
341,
197,
322,
5343,
5515,
13,
2619,
1231,
387,
264,
1616,
315,
4303,
419,
11,
714,
13054,
1007,
369,
1431,
198,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestTCPConnWithProcessSocketTimeouts(t *testing.T) {
const (
localIP = "192.168.33.10"
remoteIP = "172.19.12.13"
localPort = 38842
remotePort = 443
sock uintptr = 0xff1234
flowTimeout = time.Hour
socketTimeout = time.Minute... | explode_data.jsonl/70812 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2271
} | [
2830,
3393,
49896,
9701,
2354,
7423,
10286,
7636,
82,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
8854,
3298,
2290,
284,
330,
16,
24,
17,
13,
16,
21,
23,
13,
18,
18,
13,
16,
15,
698,
197,
197,
18147,
3298,
1060,
284,
330,
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 TestHmhdBox_MaxBitrate(t *testing.T) {
hb := HmhdBox{
maxBitrate: 11,
}
if hb.MaxBitrate() != 11 {
t.Fatalf("MaxBitrate() not correct.")
}
} | explode_data.jsonl/11011 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 73
} | [
2830,
3393,
39,
76,
15990,
1611,
58843,
8344,
7698,
1155,
353,
8840,
836,
8,
341,
9598,
65,
1669,
472,
76,
15990,
1611,
515,
197,
22543,
8344,
7698,
25,
220,
16,
16,
345,
197,
630,
743,
45135,
14535,
8344,
7698,
368,
961,
220,
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
] | 2 |
func TestWorkdir(t *testing.T) {
b := newBuilderWithMockBackend()
sb := newDispatchRequest(b, '`', nil, newBuildArgs(make(map[string]*string)), newStagesBuildResults())
workingDir := "/app"
if runtime.GOOS == "windows" {
workingDir = "C:\\app"
}
cmd := &instructions.WorkdirCommand{
Path: workingDir,
}
err ... | explode_data.jsonl/34868 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 163
} | [
2830,
3393,
6776,
3741,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
501,
3297,
2354,
11571,
29699,
741,
24842,
1669,
501,
11283,
1900,
1883,
11,
55995,
516,
2092,
11,
501,
11066,
4117,
36944,
9147,
14032,
8465,
917,
5731,
501,
623,
1134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCodeUint8Slice(t *testing.T) {
var buf = make([]byte, 64)
var v []uint8 = []uint8{1}
var n uint64
n = EncodeUint8Slice(buf, v)
var d = make([]uint8, 2)
n = DecodeUint8Slice(buf[:n], &d)
if v[0] != d[0] {
t.Errorf("error %d != %d", v[0], d[0])
}
if n != SizeofUint8Slice(v) {
t.Errorf("error %d != %... | explode_data.jsonl/58556 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
2078,
21570,
23,
33236,
1155,
353,
8840,
836,
8,
341,
2405,
6607,
284,
1281,
10556,
3782,
11,
220,
21,
19,
340,
2405,
348,
3056,
2496,
23,
284,
3056,
2496,
23,
90,
16,
532,
2405,
308,
2622,
21,
19,
198,
9038,
284,
5656... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateCmdValidate(t *testing.T) {
t.Parallel()
g := &generateCmd{}
r := &cobra.Command{}
// validate cmd with 1 arg
err := g.validate(r, []string{"../pkg/engine/testdata/simple/kubernetes.json"})
if err != nil {
t.Fatalf("unexpected error validating 1 arg: %s", err.Error())
}
g = &generateCmd{}
... | explode_data.jsonl/58943 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
31115,
15613,
17926,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3174,
1669,
609,
19366,
15613,
16094,
7000,
1669,
609,
59410,
12714,
31483,
197,
322,
9593,
5439,
448,
220,
16,
1392,
198,
9859,
1669,
342,
19520,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestEqualError(t *testing.T) {
testcases := []struct {
errA error
errB error
expected bool
}{
{
errA: nil,
errB: nil,
expected: true,
},
{
errA: errors.New("sample error"),
errB: nil,
expected: false,
},
{
errA: nil,
errB: errors.New("sample... | explode_data.jsonl/7029 | {
"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,
2993,
1454,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
9859,
32,
257,
1465,
198,
197,
9859,
33,
257,
1465,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
515,
298,
9859,
32,
25,
257,
2092,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestShipper_SyncBlocks_e2e(t *testing.T) {
objtesting.ForeachStore(t, func(t *testing.T, bkt objstore.Bucket) {
// TODO(GiedriusS): consider switching to BucketWithMetrics() everywhere?
metrics := prometheus.NewRegistry()
metricsBucket := objstore.BucketWithMetrics("test", bkt, metrics)
dir, err := iouti... | explode_data.jsonl/15561 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2435
} | [
2830,
3393,
29624,
712,
1098,
1721,
29804,
2204,
17,
68,
1155,
353,
8840,
836,
8,
341,
22671,
8840,
991,
8539,
6093,
1155,
11,
2915,
1155,
353,
8840,
836,
11,
293,
5840,
2839,
4314,
1785,
11152,
8,
341,
197,
197,
322,
5343,
6699,
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 TestInterceptorOnGet(t *testing.T) {
is := newMockedInfoSchema(t).
AddTable(model.TempTableNone, 1).
AddTable(model.TempTableGlobal, 3).
AddTable(model.TempTableLocal, 5)
noTempTableData := []*kv.Entry{
// normal table data
{Key: encodeTableKey(1), Value: []byte("v1")},
{Key: encodeTableKey(1, 1), Va... | explode_data.jsonl/13202 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2339
} | [
2830,
3393,
32786,
1925,
1949,
1155,
353,
8840,
836,
8,
341,
19907,
1669,
501,
11571,
291,
1731,
8632,
1155,
4292,
197,
37972,
2556,
7635,
65009,
2556,
4064,
11,
220,
16,
4292,
197,
37972,
2556,
7635,
65009,
2556,
11646,
11,
220,
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... | 8 |
func TestStateProposerSelection0(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
config := configSetup(t)
cs1, vss := makeState(ctx, t, makeStateArgs{config: config})
height, round := cs1.Height, cs1.Round
newRoundCh := subscribe(ctx, t, cs1.eventBus, types.EventQueryNewRo... | explode_data.jsonl/54255 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 546
} | [
2830,
3393,
1397,
2008,
23438,
11177,
15,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
741,
25873,
1669,
2193,
21821,
1155,
692,
71899,
16,
11,
348,
778,
1669,
1281,
1397,
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 TestIsGroup(t *testing.T) {
tests := []struct {
reg string
group bool
}{
{"US", false},
{"001", true},
{"958", false},
{"419", true},
{"203", false},
{"020", false},
{"900", false},
{"999", false},
{"QO", true},
{"EU", true},
{"AA", false},
{"XK", false},
}
for i, tt := range test... | explode_data.jsonl/15840 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
3872,
2808,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
37013,
256,
914,
198,
197,
44260,
1807,
198,
197,
59403,
197,
197,
4913,
2034,
497,
895,
1583,
197,
197,
4913,
15,
15,
16,
497,
830,
1583,
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 TestExportKindFor(t *testing.T) {
exporter := Exporter{}
got := exporter.ExportKindFor(nil, aggregation.Kind(rune(0)))
want := metric.CumulativeExportKind
if got != want {
t.Errorf("ExportKindFor() = %q, want %q", got, want)
}
} | explode_data.jsonl/8035 | {
"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,
16894,
10629,
2461,
1155,
353,
8840,
836,
8,
341,
59440,
261,
1669,
22191,
261,
16094,
3174,
354,
1669,
57378,
81077,
10629,
2461,
27907,
11,
51629,
54199,
2601,
2886,
7,
15,
5929,
50780,
1669,
18266,
727,
372,
22160,
16894,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLinuxConnReceiveInvalidFamily(t *testing.T) {
c, s := testLinuxConn(t, nil)
s.recvmsg.from = &unix.SockaddrNetlink{
// Should always be AF_NETLINK
Family: unix.AF_NETLINK + 1,
}
_, got := c.Receive()
if want := errInvalidFamily; want != got {
t.Fatalf("unexpected error:\n- want: %v\n- got: %v", ... | explode_data.jsonl/33488 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
46324,
9701,
14742,
7928,
15192,
1155,
353,
8840,
836,
8,
341,
1444,
11,
274,
1669,
1273,
46324,
9701,
1155,
11,
2092,
692,
1903,
40433,
3236,
6387,
284,
609,
56646,
808,
1176,
6214,
6954,
2080,
515,
197,
197,
322,
12260,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCachedChartsRefreshErrorPropagation(t *testing.T) {
tests := []struct {
name string
repos []*models.Repo
}{
{"invalid repo url", []*models.Repo{{Name: "stable", URL: "./localhost"}}},
{"inexistant repo", []*models.Repo{{Name: "stable", URL: "http://localhost"}}},
}
defer func() { models.MockRepos... | explode_data.jsonl/37977 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
70293,
64878,
14567,
1454,
35172,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
17200,
966,
29838,
6507,
2817,
5368,
198,
197,
59403,
197,
197,
4913,
11808,
15867,
2515,
497,
298... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMainMakeVersionStringNoCommit(t *testing.T) {
assert := assert.New(t)
savedCommit := commit
commit = ""
defer func() {
commit = savedCommit
}()
v := makeVersionString()
testVersionString(assert, v, version, unknown, specs.Version)
} | explode_data.jsonl/52200 | {
"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,
6202,
8078,
5637,
703,
2753,
33441,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
1903,
4141,
33441,
1669,
5266,
198,
197,
17413,
284,
35829,
16867,
2915,
368,
341,
197,
197,
17413,
284,
6781,
33441,
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 TestFunctionCall(t *testing.T) {
fn1 := func(ctx *context.Context, in context.Valuer, arg1 []context.Valuer) ([]context.Valuer, error) {
v1, _ := in.Value(ctx)
v2, _ := arg1[0].Value(ctx)
return []context.Valuer{context.NewConstValuer(v1.(int) + v2.(int))}, nil
}
fn, err := NewFunction(fn1)
assert.NoEr... | explode_data.jsonl/82025 | {
"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,
5152,
7220,
1155,
353,
8840,
836,
8,
341,
40095,
16,
1669,
2915,
7502,
353,
2147,
9328,
11,
304,
2266,
77819,
8801,
11,
1392,
16,
3056,
2147,
77819,
8801,
8,
34923,
2147,
77819,
8801,
11,
1465,
8,
341,
197,
5195,
16,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.