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 TestReadAWSCloudConfig(t *testing.T) {
tests := []struct {
name string
reader io.Reader
metadata AWSMetadata
expectError bool
zone string
}{
{
"No config reader",
nil, nil,
true, "",
},
{
"Empty config, no metadata",
strings.NewReader(""), nil,
true, "",
},
{
"... | explode_data.jsonl/65064 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 653
} | [
2830,
3393,
4418,
14419,
3540,
52178,
2648,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
271,
197,
61477,
256,
6399,
47431,
198,
197,
2109,
7603,
23245,
14610,
271,
197,
24952,
1454,
1807,
198,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestSyncHelm(t *testing.T) {
ctx := context.Background()
appServer := newTestAppServer()
testApp := newTestApp()
testApp.Spec.Source.RepoURL = "https://argoproj.github.io/argo-helm"
testApp.Spec.Source.Path = ""
testApp.Spec.Source.Chart = "argo-cd"
testApp.Spec.Source.TargetRevision = "0.7.*"
app, err :=... | explode_data.jsonl/46618 | {
"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,
12154,
39,
23162,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
28236,
5475,
1669,
501,
2271,
2164,
5475,
741,
18185,
2164,
1669,
501,
2271,
2164,
741,
18185,
2164,
36473,
30350,
2817,
5368,
3144,
284,
330,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKeyManagement(t *testing.T) {
// make the storage with reasonable defaults
cstore := NewInMemory()
algo := Secp256k1
n1, n2, n3 := "personal", "business", "other"
p1, p2 := nums, "really-secure!@#$"
// Check empty state
l, err := cstore.List()
require.Nil(t, err)
assert.Empty(t, l)
_, _, err = cst... | explode_data.jsonl/10669 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 975
} | [
2830,
3393,
1592,
22237,
1155,
353,
8840,
836,
8,
341,
197,
322,
1281,
279,
5819,
448,
13276,
16674,
198,
1444,
4314,
1669,
1532,
641,
10642,
2822,
69571,
3346,
1669,
4520,
79,
17,
20,
21,
74,
16,
198,
9038,
16,
11,
308,
17,
11,
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 TestReprOfDuration(t *testing.T) {
assert.Equal(t, "1000.0ms", ReprOfDuration(time.Second))
assert.Equal(t, "1111.6ms", ReprOfDuration(
time.Second+time.Millisecond*111+time.Microsecond*555))
} | explode_data.jsonl/19101 | {
"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,
693,
649,
2124,
12945,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
1155,
11,
330,
16,
15,
15,
15,
13,
15,
1011,
497,
1032,
649,
2124,
12945,
9730,
32435,
1171,
6948,
12808,
1155,
11,
330,
16,
16,
16,
16,
13,
21,
1011,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDelete_Run(t *testing.T) {
ctrl := gomock.NewController(t)
mockStore := mocks.NewMockPeeringConnectionDeleter(ctrl)
defer ctrl.Finish()
deleteOpts := &DeleteOpts{
DeleteOpts: &cli.DeleteOpts{
Entry: "to_delete",
Confirm: true,
},
store: mockStore,
}
mockStore.
EXPECT().
DeletePeeringC... | explode_data.jsonl/73925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
6435,
84158,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
77333,
6093,
1669,
68909,
7121,
11571,
10197,
4671,
4526,
1912,
273,
465,
62100,
340,
16867,
23743,
991,
18176,
2822,
15618,
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 TestInfo(t *testing.T) {
t.Skip()
client := NewClient(&Config{
URL: "http://api.kylin.alohaeos.com",
})
info, err := client.Info()
if err != nil {
t.Error(err)
}
fmt.Println(info)
} | explode_data.jsonl/58349 | {
"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,
1731,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
741,
25291,
1669,
1532,
2959,
2099,
2648,
515,
197,
79055,
25,
330,
1254,
1110,
2068,
5202,
88,
3732,
12168,
2267,
5918,
436,
905,
756,
197,
8824,
27043,
11,
1848,
1669,
294... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAutoscalingGroupBackwardCompatibility(t *testing.T) {
_, s, closeFn := framework.RunAMaster(nil)
defer closeFn()
transport := http.DefaultTransport
requests := []struct {
verb string
URL string
body string
expectedStatusCodes map[int]bool
expectedVer... | explode_data.jsonl/67591 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 636
} | [
2830,
3393,
19602,
436,
81552,
2808,
3707,
1606,
85880,
1155,
353,
8840,
836,
8,
341,
197,
6878,
274,
11,
3265,
24911,
1669,
12626,
16708,
1402,
2300,
27907,
340,
16867,
3265,
24911,
741,
197,
26445,
1669,
1758,
13275,
27560,
271,
23555,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRightBodySteve(t *testing.T) {
rawSkin := skin.GetDefaultSkin(false)
output := skin.RenderRightBody(rawSkin, skin.Options{
Scale: 16,
Overlay: true,
Slim: false,
})
f, err := os.OpenFile("rightbody_steve_test.png", os.O_CREATE|os.O_RDWR, 0777)
if err != nil {
t.Fatal(err)
}
defer f.Clos... | explode_data.jsonl/65007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
5979,
5444,
37495,
1155,
353,
8840,
836,
8,
341,
76559,
37186,
1669,
6787,
2234,
3675,
37186,
3576,
692,
21170,
1669,
6787,
27386,
5979,
5444,
22460,
37186,
11,
6787,
22179,
515,
197,
197,
6947,
25,
256,
220,
16,
21,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMemberVal(t *testing.T) {
gopClTest(t, `import "strings"
x := strings.NewReplacer("?", "!").Replace("hello, world???")
println("x:", x)
`, `package main
import (
fmt "fmt"
strings "strings"
)
func main() {
x := strings.NewReplacer("?", "!").Replace("hello, world???")
fmt.Println("x:", x)
}
`)
} | explode_data.jsonl/73659 | {
"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,
9366,
2208,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
1565,
474,
330,
18594,
1837,
87,
1669,
9069,
7121,
693,
90212,
445,
31011,
53074,
1827,
23107,
445,
14990,
11,
1879,
33015,
1138,
33655,
445,
87,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWrapKey_Failure(t *testing.T) {
recipientKeyHandle, err := keyset.NewHandle(ecdh.NISTP256ECDHKWKeyTemplate())
require.NoError(t, err)
recipientKey, err := keyio.ExtractPrimaryPublicKey(recipientKeyHandle)
require.NoError(t, err)
cek := random.GetRandomBytes(uint32(defKeySize))
apu := []byte("sender")
... | explode_data.jsonl/81254 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1078
} | [
2830,
3393,
26787,
1592,
1400,
9373,
1155,
353,
8840,
836,
8,
341,
197,
42610,
1592,
6999,
11,
1848,
1669,
1376,
746,
7121,
6999,
62540,
30621,
2067,
3846,
47,
17,
20,
21,
36,
6484,
57447,
54,
1592,
7275,
2398,
17957,
35699,
1155,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAccSpannerInstance_basic(t *testing.T) {
t.Parallel()
idName := fmt.Sprintf("spanner-test-%s", randString(t, 10))
vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckSpannerInstanceDestroyProducer(t),
Steps: []resource... | explode_data.jsonl/31768 | {
"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,
14603,
12485,
1194,
2523,
34729,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
15710,
675,
1669,
8879,
17305,
445,
1480,
1194,
16839,
11069,
82,
497,
10382,
703,
1155,
11,
220,
16,
15,
1171,
5195,
5082,
2271,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMemory_LoadCertificateTooManyCerts(t *testing.T) {
m, err := NewWithDefault()
require.NoError(t, err)
upca, err := upca.NewWithDefault("../upstreamca-memory/pkg/_test_data/keys/private_key.pem", "../upstreamca-memory/pkg/_test_data/keys/cert.pem")
require.NoError(t, err)
generateCsrResp, err := m.Genera... | explode_data.jsonl/73865 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 298
} | [
2830,
3393,
10642,
19553,
33202,
31246,
8441,
34,
15546,
1155,
353,
8840,
836,
8,
341,
2109,
11,
1848,
1669,
1532,
2354,
3675,
741,
17957,
35699,
1155,
11,
1848,
692,
59810,
924,
11,
1848,
1669,
705,
924,
7121,
2354,
3675,
17409,
454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSecp256k1LoadPrivkeyAndSerializeIsIdentity(t *testing.T) {
numberOfTests := 256
for i := 0; i < numberOfTests; i++ {
// Seed the test case with some random bytes
privKeyBytes := [32]byte{}
copy(privKeyBytes[:], crypto.CRandBytes(32))
// This function creates a private and public key in the underlyin... | explode_data.jsonl/49294 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
8430,
79,
17,
20,
21,
74,
16,
5879,
32124,
792,
3036,
15680,
3872,
18558,
1155,
353,
8840,
836,
8,
341,
197,
37823,
18200,
1669,
220,
17,
20,
21,
198,
2023,
600,
1669,
220,
15,
26,
600,
366,
17512,
18200,
26,
600,
1027... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRetriesNewOtherStatus_Is(t *testing.T) {
err := NewRetriesResult(NewResult(403, "this is an example error, %s", "yep"), 0, time.Now(), nil)
if protocol.ResultIs(err, NewRetriesResult(NewResult(200, "OK"), 0, time.Now(), nil)) {
t.Error("Did not expect event to be StatusCode=200")
}
} | explode_data.jsonl/66499 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
12020,
4019,
3564,
11409,
2522,
31879,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
1532,
12020,
4019,
2077,
35063,
2077,
7,
19,
15,
18,
11,
330,
574,
374,
458,
3110,
1465,
11,
1018,
82,
497,
330,
88,
747,
3975,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCreateImageStoreFailureCleanup(t *testing.T) {
logrus.SetLevel(logrus.DebugLevel)
trace.Logger.Level = logrus.DebugLevel
mds := mock.NewMockDataStore(nil)
imageCache := NewLookupCache(mds)
op := trace.NewOperation(context.Background(), "create image store error")
mds.SetCreateImageStoreError(fmt.Errorf(... | explode_data.jsonl/11683 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 417
} | [
2830,
3393,
4021,
1906,
6093,
17507,
67335,
1155,
353,
8840,
836,
8,
341,
90822,
4202,
4449,
12531,
20341,
20345,
4449,
340,
65058,
12750,
25259,
284,
1487,
20341,
20345,
4449,
271,
2109,
5356,
1669,
7860,
7121,
11571,
1043,
6093,
27907,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_AwsSnsTopicSubscriptionRedrivePolicy(t *testing.T) {
cases := []struct {
Name string
Content string
Expected helper.Issues
}{
{
Name: "missing redrive_policy",
Content: `
resource "aws_sns_topic_subscription" "this" {
endpoint = "https://example.com/"
protocol = "https"
topic_arn = ... | explode_data.jsonl/29234 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 555
} | [
2830,
3393,
1566,
8915,
50,
4412,
26406,
33402,
6033,
56935,
13825,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
21297,
257,
914,
198,
197,
197,
2762,
220,
914,
198,
197,
197,
18896,
13137,
2447,
778,
1137,
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 TestToAddress(t *testing.T) {
u := ToAddress("grpcs://some.url")
if strings.HasPrefix(u, "grpcs://") {
t.Fatal("expected url to have protocol trimmed")
}
u = ToAddress("grpc://some.url")
if strings.HasPrefix(u, "grpc://") {
t.Fatal("expected url to have protocol trimmed")
}
u = ToAddress("https://some.u... | explode_data.jsonl/78486 | {
"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,
1249,
4286,
1155,
353,
8840,
836,
8,
341,
10676,
1669,
2014,
4286,
445,
901,
47313,
1110,
14689,
7315,
1138,
743,
9069,
94357,
8154,
11,
330,
901,
47313,
1110,
899,
341,
197,
3244,
26133,
445,
7325,
2515,
311,
614,
11507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQueryPostBasic(t *testing.T) {
f := newFixture(t)
f.server, _ = New().
WithAddresses([]string{":8182"}).
WithStore(f.server.store).
WithManager(f.server.manager).
Init(context.Background())
setup := []tr{
{http.MethodPost, "/query", `{"query": "a=data.k.x with data.k as {\"x\" : 7}"}`, 200, `{"re... | explode_data.jsonl/79016 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
2859,
4133,
15944,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
340,
1166,
12638,
11,
716,
284,
1532,
25829,
197,
197,
2354,
52290,
10556,
917,
90,
788,
23,
16,
23,
17,
9207,
4292,
197,
197,
2354,
6093,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBindQueryParams(t *testing.T) {
e := New()
req := httptest.NewRequest(http.MethodGet, "/?id=1&name=Jon+Snow", nil)
rec := httptest.NewRecorder()
c := e.NewContext(req, rec)
u := new(user)
err := c.Bind(u)
if assert.NoError(t, err) {
assert.Equal(t, 1, u.ID)
assert.Equal(t, "Jon Snow", u.Name)
}
} | explode_data.jsonl/72317 | {
"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,
9950,
2859,
4870,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
1532,
741,
24395,
1669,
54320,
70334,
75274,
19886,
20798,
1949,
11,
3521,
30,
307,
28,
16,
5,
606,
28,
37152,
10,
62285,
497,
2092,
340,
67904,
1669,
54320,
7033... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuilder_buildManagedClusterCollectorWithClient(t *testing.T) {
const headers = `# HELP acm_managed_cluster_info Managed cluster information
# TYPE acm_managed_cluster_info gauge
`
envTest, kubeconfig, _, _ := setupEnvTest(t)
_, err := envtest.InstallCRDs(envTest.Config, envtest.CRDInstallOptions{
Paths: [... | explode_data.jsonl/20153 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1170
} | [
2830,
3393,
3297,
20801,
27192,
28678,
53694,
2354,
2959,
1155,
353,
8840,
836,
8,
341,
4777,
7102,
284,
1565,
2,
55471,
1613,
76,
79889,
28441,
3109,
60744,
10652,
1995,
198,
2,
12454,
1613,
76,
79889,
28441,
3109,
30890,
198,
3989,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestGetTeamsForUserSanitization(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
team, resp := th.Client.CreateTeam(&model.Team{
DisplayName: t.Name() + "_1",
Name: GenerateTestTeamName(),
Email: th.GenerateTestEmail(),
Type: model.TEAM_OPEN,
AllowedDomai... | explode_data.jsonl/70721 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1116
} | [
2830,
3393,
1949,
60669,
2461,
1474,
23729,
275,
2022,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
197,
9196,
11,
9039,
1669,
270,
11716,
7251,
14597,
2099,
2528,
6584... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStatServer_startCollector(t *testing.T) {
teardown := setupTestCase(t)
defer teardown(t)
type args struct {
errs chan error
}
tests := []struct {
name string
ss *StatServer
args args
wantErr bool
}{
{
name: "OK",
ss: &StatServer{
stats: nil,
collector: collector.N... | explode_data.jsonl/678 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 504
} | [
2830,
3393,
15878,
5475,
4906,
53694,
1155,
353,
8840,
836,
8,
341,
197,
665,
37496,
1669,
6505,
16458,
1155,
340,
16867,
49304,
1155,
340,
13158,
2827,
2036,
341,
197,
9859,
82,
26023,
1465,
198,
197,
532,
78216,
1669,
3056,
1235,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetAppProtectResource(t *testing.T) {
tests := []struct {
kind string
key string
wantErr bool
errMsg string
msg string
}{
{
kind: "APPolicy",
key: "testing/test1",
wantErr: false,
msg: "Policy, positive",
},
{
kind: "APPolicy",
key: "testing/tes... | explode_data.jsonl/19390 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1286
} | [
2830,
3393,
1949,
2164,
61547,
4783,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
197,
15314,
262,
914,
198,
197,
23634,
257,
914,
198,
197,
50780,
7747,
1807,
198,
197,
9859,
6611,
220,
914,
198,
197,
21169,
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... | 6 |
func TestSearchPostsInTeamForUser(t *testing.T) {
perPage := 5
searchTerm := "searchTerm"
setup := func(t *testing.T, enableElasticsearch bool) (*TestHelper, []*model.Post) {
th := Setup(t).InitBasic()
posts := make([]*model.Post, 7)
for i := 0; i < cap(posts); i++ {
post, err := th.App.CreatePost(th.Cont... | explode_data.jsonl/26440 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2144
} | [
2830,
3393,
5890,
19631,
641,
14597,
2461,
1474,
1155,
353,
8840,
836,
8,
341,
197,
94622,
1669,
220,
20,
198,
45573,
17249,
1669,
330,
1836,
17249,
1837,
84571,
1669,
2915,
1155,
353,
8840,
836,
11,
7283,
36,
51179,
1836,
1807,
8,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIPNetContains(t *testing.T) {
for _, tt := range ipNetContainsTests {
if ok := tt.net.Contains(tt.ip); ok != tt.ok {
t.Errorf("IPNet(%v).Contains(%v) = %v, want %v", tt.net, tt.ip, ok, tt.ok)
}
}
} | explode_data.jsonl/14223 | {
"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,
3298,
6954,
23805,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
5997,
6954,
23805,
18200,
341,
197,
743,
5394,
1669,
17853,
5071,
11545,
47152,
23171,
1215,
5394,
961,
17853,
18165,
341,
298,
3244,
13080,
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... | 3 |
func TestReplaceClusterIndex(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec(`use test`)
tk.Session().GetSessionVars().EnableClusteredIndex = variable.ClusteredIndexDefModeOn
tk.MustExec(`drop table if exists rt1pk`)
tk.MustExec(`create ta... | explode_data.jsonl/76267 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 726
} | [
2830,
3393,
23107,
28678,
1552,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50463,
10216,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDockerAuth(t *testing.T) {
var (
configJsonFileName = "config.json"
testEnvKey = "TMP_PULL_DOCKER_CFG_AUTH_ENV_FOO_BAR"
)
var fileInfo *os.File
content := "{ \"auths\": { \"test-server-1.tld\":{\"auth\":\"Zm9vOmJhcgo=\",\"email\":\"test@email.test.com\"}}}"
tmpDirPath, err := ioutil.TempD... | explode_data.jsonl/30415 | {
"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,
1949,
35,
13659,
5087,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
25873,
5014,
10903,
284,
330,
1676,
4323,
698,
197,
18185,
14359,
1592,
260,
284,
330,
42234,
60284,
1557,
16678,
640,
21760,
22675,
22027,
1400,
19499,
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... | 7 |
func TestNewBoot_HappyCase(t *testing.T) {
config := `
---
myEntry:
name: ut
enabled: true
`
filePath := createFileAtTestTempDir(t, "ut-boot.yaml", config)
boot := NewBoot(WithBootConfigPath(filePath))
boot.AddShutdownHookFunc("ut-shutdown", func() {
// noop
})
boot.Bootstrap(context.TODO())
assert.Not... | explode_data.jsonl/59557 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 382
} | [
2830,
3393,
3564,
17919,
2039,
11144,
4207,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
22074,
10952,
2408,
5874,
510,
220,
829,
25,
8621,
198,
220,
8970,
25,
830,
198,
19324,
17661,
1820,
1669,
1855,
1703,
1655,
2271,
12151,
6184,
1155,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMake(t *testing.T) {
expected := instanceMap{}
is := &instanceManager{}
is.make()
if !reflect.DeepEqual(is.catalog, expected) {
t.Errorf("Catalog's type: '%s' expected: '%s'",
reflect.TypeOf(is.catalog).String(),
reflect.TypeOf(expected).String())
}
} | explode_data.jsonl/55189 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
8078,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
2867,
2227,
16094,
19907,
1669,
609,
4851,
2043,
31483,
19907,
10117,
741,
743,
753,
34913,
94750,
9623,
62559,
11,
3601,
8,
341,
197,
3244,
13080,
445,
41606,
594,
943,
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 TestReadWriter(t *testing.T) {
source := &dataSourceWrite{}
readWriter := NewReadWriter(source, time.Second, time.Millisecond*10)
writeData := []byte{1, 2}
readWriter.Write(writeData)
start := time.Now()
data := make([]byte, 100)
count, err := readWriter.Read(data)
dur := time.Since(start)
if err != i... | explode_data.jsonl/49964 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 311
} | [
2830,
3393,
4418,
6492,
1155,
353,
8840,
836,
8,
341,
47418,
1669,
609,
64860,
7985,
16094,
37043,
6492,
1669,
1532,
4418,
6492,
12437,
11,
882,
32435,
11,
882,
71482,
9,
16,
15,
692,
24945,
1043,
1669,
3056,
3782,
90,
16,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestClient_GetEntitlementCodeStatus(t *testing.T) {
t.Parallel()
testCases := []struct {
statusCode int
options *Options
count int
userID string
codes []string
respBody string
}{
// TODO: expand with other test cases, including negative scenarios
{
http.StatusOK,
&Optio... | explode_data.jsonl/82350 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 765
} | [
2830,
3393,
2959,
13614,
2250,
45337,
2078,
2522,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18185,
37302,
1669,
3056,
1235,
341,
197,
23847,
2078,
526,
198,
197,
35500,
262,
353,
3798,
198,
197,
18032,
414,
526,
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... | 9 |
func TestSetStatement(t *testing.T) {
if testing.Short() {
t.Skip()
}
if !checkIfOptionIsSupported(t, "log_builtin_as_identified_by_password") {
// the combination of setting this option and support for "set password" only works on a few flavors
log.Info("Cannot test SetStatement on this flavor")
return
}
... | explode_data.jsonl/10399 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 572
} | [
2830,
3393,
1649,
8636,
1155,
353,
8840,
836,
8,
1476,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
532,
743,
753,
2028,
2679,
5341,
3872,
34636,
1155,
11,
330,
839,
73829,
11898,
38399,
1870,
3710,
10122,
899,
341,
197,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestProgressNoopOverflow(t *testing.T) {
for key, progress := range makeProgressIndicators() {
progress.SetTotal(10)
for i := 0; i < 200; i++ {
progress.Advance()
}
assert.Equal(t, 100, progress.GetCompletionPercent(), "[%s] Progress indicator should be at 100%", key)
assert.False(t, progress.IsDone(... | explode_data.jsonl/32261 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 143
} | [
2830,
3393,
9496,
2753,
453,
42124,
1155,
353,
8840,
836,
8,
341,
2023,
1376,
11,
5098,
1669,
2088,
1281,
9496,
1425,
42052,
368,
341,
197,
88971,
4202,
7595,
7,
16,
15,
340,
197,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
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... | 3 |
func TestParseJobAndGuidBookmarkName(t *testing.T) {
type Case struct {
input string
expectErr bool
guid uint64
jobid string
}
cases := []Case{
{
`p1/sync#zrepl_CURSOR_G_932f3a7089080ce2_J_push with legitimate name`,
false, 0x932f3a7089080ce2, "push with legitimate name",
},
{
input: ... | explode_data.jsonl/38224 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 502
} | [
2830,
3393,
14463,
12245,
3036,
16686,
72228,
675,
1155,
353,
8840,
836,
8,
1476,
13158,
11538,
2036,
341,
197,
22427,
257,
914,
198,
197,
24952,
7747,
1807,
271,
197,
3174,
2423,
220,
2622,
21,
19,
198,
197,
68577,
307,
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 TestValidateIntFromStringFails(t *testing.T) {
input := "not a number"
_, errMsg := validateIntFromString(input)
if errMsg == "" {
t.Errorf("validateIntFromString() returned no errors for invalid input %v", input)
}
} | explode_data.jsonl/65877 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
17926,
1072,
44491,
37,
6209,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
330,
1921,
264,
1372,
698,
197,
6878,
60078,
1669,
9593,
1072,
44491,
5384,
692,
743,
60078,
621,
1591,
341,
197,
3244,
13080,
445,
7067,
1072,
44491,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetEnvEnum(t *testing.T) {
t.Parallel()
testVarKey := "TEST_ONLY_FOR_UNIT_TEST_ENUM"
panicFunc := func() {
_ = util.GetEnvEnum(testVarKey, "smtp", []string{"mock", "foo"})
}
assert.Panics(t, panicFunc)
res := util.GetEnvEnum(testVarKey, "smtp", []string{"mock", "smtp"})
assert.Equal(t, "smtp", res)... | explode_data.jsonl/6083 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
1949,
14359,
10766,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18185,
3962,
1592,
1669,
330,
10033,
31263,
14516,
31718,
11641,
31894,
1837,
30764,
9626,
1669,
2915,
368,
341,
197,
197,
62,
284,
4094,
2234,
14359,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSend(t *testing.T) {
ch := make(chan *pb.ChaincodeMessage)
stream := newInProcStream(ch, ch)
//good send (non-blocking send and receive)
msg := &pb.ChaincodeMessage{}
go stream.Send(msg)
msg2, _ := stream.Recv()
assert.Equal(t, msg, msg2, "send != recv")
//close the channel
close(ch)
//bad send, ... | explode_data.jsonl/68810 | {
"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,
11505,
1155,
353,
8840,
836,
8,
341,
23049,
1669,
1281,
35190,
353,
16650,
98269,
1851,
2052,
692,
44440,
1669,
501,
641,
24508,
3027,
7520,
11,
521,
692,
197,
322,
18536,
3624,
320,
6280,
78761,
3624,
323,
5258,
340,
21169,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decode_byte_array_from_base64_with_newlines(t *testing.T) {
should := require.New(t)
data := []byte{}
err := json.Unmarshal([]byte(`"A\rQ\nID"`), &data)
should.Nil(err)
should.Equal([]byte{1, 2, 3}, data)
err = jsoner.DefaultAPI().Unmarshal([]byte(`"A\rQ\nID"`), &data)
should.Nil(err)
should.Equal([]b... | explode_data.jsonl/57886 | {
"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,
15227,
19737,
3858,
5673,
7651,
21,
19,
6615,
5921,
7969,
1155,
353,
8840,
836,
8,
341,
197,
5445,
1669,
1373,
7121,
1155,
340,
8924,
1669,
3056,
3782,
16094,
9859,
1669,
2951,
38097,
10556,
3782,
5809,
1,
32,
12016,
48,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContentTypeCreateWithoutID(t *testing.T) {
var err error
assert := assert.New(t)
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
assert.Equal(r.Method, "POST")
assert.Equal(r.RequestURI, "/spaces/id1/content_types")
checkHeaders(r, assert)
w.WriteHeader(200)
fmt.Fprint... | explode_data.jsonl/66081 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 266
} | [
2830,
3393,
29504,
4021,
26040,
915,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
6948,
1669,
2060,
7121,
1155,
692,
53326,
1669,
1758,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6948,
12808,
2601,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResolveTerraformModulesNoPaths(t *testing.T) {
t.Parallel()
configPaths := []string{}
expected := []*TerraformModule{}
actualModules, actualErr := ResolveTerraformModules(configPaths, mockOptions, mockHowThesePathsWereFound)
assert.Nil(t, actualErr, "Unexpected error: %v", actualErr)
assertModuleListsE... | explode_data.jsonl/26633 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
56808,
51,
13886,
627,
28201,
2753,
26901,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
25873,
26901,
1669,
3056,
917,
16094,
42400,
1669,
29838,
51,
13886,
627,
3332,
31483,
88814,
28201,
11,
5042,
7747,
1669,
47302... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPyModuleNew(t *testing.T) {
fmt.Println(assert.CallerInfo()[0])
name := "test_module"
moduleA := pymodule.New(name)
defer py.DecRef(moduleA)
defer func() { assert.Equal(t, 1, py.RefCnt(moduleA)) }()
assert.NotNil(t, moduleA)
moduleB := pymodule.New(name)
defer py.DecRef(moduleB)
defer func() { asse... | explode_data.jsonl/33466 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
13828,
3332,
3564,
1155,
353,
8840,
836,
8,
341,
11009,
12419,
75846,
727,
13956,
1731,
10116,
15,
9604,
11609,
1669,
330,
1944,
10750,
1837,
54020,
32,
1669,
45760,
1756,
7121,
3153,
340,
16867,
4510,
22442,
3945,
19123,
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 TestRepairTruncate(t *testing.T) {
corruptf := func(p string, offset int64) error {
f, err := openLast(p)
if err != nil {
return err
}
defer f.Close()
return f.Truncate(offset - 4)
}
testRepair(t, makeEnts(10), corruptf, 9)
} | explode_data.jsonl/6816 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
98386,
1282,
26900,
1155,
353,
8840,
836,
8,
341,
1444,
269,
6585,
69,
1669,
2915,
1295,
914,
11,
4347,
526,
21,
19,
8,
1465,
341,
197,
1166,
11,
1848,
1669,
1787,
5842,
1295,
340,
197,
743,
1848,
961,
2092,
341,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPutFileToMissingDirectoryReturnsErr(t *testing.T) {
beforeTest(t)
conn := _getConnection(t)
defer conn.Close()
client := agaveproto.NewSftpRelayClient(conn)
// create a temp file to put
tmpTestFilePath, err := _createTempFile("", ".bin")
if err != nil {
assert.FailNowf(t, err.Error(), "Unable to cr... | explode_data.jsonl/32556 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 572
} | [
2830,
3393,
19103,
1703,
1249,
25080,
9310,
16446,
7747,
1155,
353,
8840,
836,
8,
341,
63234,
2271,
1155,
692,
32917,
1669,
716,
52414,
1155,
340,
16867,
4534,
10421,
2822,
25291,
1669,
933,
523,
15110,
7121,
50,
25068,
6740,
352,
2959,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTaskExecutionPatchExecute(t *testing.T) {
Convey("With a task in the DB and a Connector", t, func() {
sc := data.MockConnector{}
testTask := task.Task{
Id: "testTaskId",
Activated: false,
Priority: 10,
}
sc.MockTaskConnector.CachedTasks = append(sc.MockTaskConnector.CachedTasks, testT... | explode_data.jsonl/9569 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 430
} | [
2830,
3393,
6262,
20294,
43622,
17174,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2354,
264,
3383,
304,
279,
5952,
323,
264,
54814,
497,
259,
11,
2915,
368,
341,
197,
29928,
1669,
821,
24664,
35954,
16094,
197,
18185,
6262,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMergeRuntimeContainers(t *testing.T) {
g := gomega.NewGomegaWithT(t)
scenarios := map[string]struct {
containerBase *v1.Container
containerOverride *v1.Container
expected *v1.Container
}{
"BasicMerge": {
containerBase: &v1.Container{
Name: "kserve-container",
Image: "defaul... | explode_data.jsonl/54484 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1046
} | [
2830,
3393,
52096,
15123,
74632,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
692,
29928,
60494,
1669,
2415,
14032,
60,
1235,
341,
197,
53290,
3978,
257,
353,
85,
16,
33672,
198,
197,
53290,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNonEncryptied(t *testing.T) {
k1 := GenerateRandomKey()
ek, _ := EncryptKey(k1, "", "")
k2, _ := ek.Decrypt("")
assert.Equal(t, k1, k2)
} | explode_data.jsonl/79083 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 72
} | [
2830,
3393,
8121,
61520,
1122,
1155,
353,
8840,
836,
8,
341,
16463,
16,
1669,
19813,
13999,
1592,
741,
197,
1225,
11,
716,
1669,
55459,
1592,
5969,
16,
11,
7342,
14676,
16463,
17,
11,
716,
1669,
26857,
22442,
3571,
31764,
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 |
func TestFloat32_Equal(t *testing.T) {
testcases := []struct {
name string
s Float32
t Float32
expect bool
}{
{
name: "test Float32 Equal, s is empty",
s: Float32{},
t: map[float32]struct{}{2: {}, 1.3: {}, 4.1: {}},
expect: false,
},
{
name: "test Float32 Equal, ... | explode_data.jsonl/60120 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 839
} | [
2830,
3393,
5442,
18,
17,
2089,
1751,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
1903,
414,
13001,
18,
17,
198,
197,
3244,
414,
13001,
18,
17,
198,
197,
24952,
1807,
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... | 3 |
func TestSuccessfulWikiGetAllPagesRequest(t *testing.T) {
ctx, cancel := testhelper.Context()
defer cancel()
stop, serverSocketPath := runWikiServiceServer(t)
defer stop()
client, conn := newWikiClient(t, serverSocketPath)
defer conn.Close()
wikiRepo, _, cleanupFunc := setupWikiRepo(t)
defer cleanupFunc()
... | explode_data.jsonl/48804 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 524
} | [
2830,
3393,
36374,
53896,
1949,
2403,
17713,
1900,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
1273,
18764,
9328,
741,
16867,
9121,
2822,
62644,
11,
3538,
10286,
1820,
1669,
1598,
53896,
1860,
5475,
1155,
340,
16867,
2936,
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... | 2 |
func TestParserText(t *testing.T) {
assertText(t, `$`, `$`)
assertText(t, `\\$`, `\$`)
assertText(t, "{", "{")
assertText(t, `\}`, `}`)
assertText(t, `\abc`, `\abc`)
assertText(t, `foo${f:\}}bar`, `foo}bar`)
assertText(t, `\{`, `\{`)
assertText(t, "I need \\\\\\$", "I need \\$")
assertText(t, `\`, `\`)
assert... | explode_data.jsonl/60273 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 463
} | [
2830,
3393,
6570,
1178,
1155,
353,
8840,
836,
8,
341,
6948,
1178,
1155,
11,
55693,
7808,
55693,
24183,
6948,
1178,
1155,
11,
1565,
3422,
3,
7808,
1565,
65039,
24183,
6948,
1178,
1155,
11,
13868,
497,
13868,
1138,
6948,
1178,
1155,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseInvalidRequest(t *testing.T) {
invalid := []string{
"webs.mynamespace.pood.inter.webs.test.", // Request must be for pod or svc subdomain.
"too.long.for.what.I.am.trying.to.pod.inter.webs.tests.", // Too long.
}
for i, query := range invalid {
m := new(dns.Msg)
m.SetQuestion(qu... | explode_data.jsonl/37941 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 216
} | [
2830,
3393,
14463,
7928,
1900,
1155,
353,
8840,
836,
8,
341,
197,
11808,
1669,
3056,
917,
515,
197,
197,
1,
88895,
744,
1872,
1680,
556,
1386,
14139,
30239,
1279,
5958,
10465,
338,
442,
6145,
1969,
387,
369,
7509,
476,
46154,
1186,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestController_New(t *testing.T) {
t.Run("test success", func(t *testing.T) {
controller, err := New(&operation.Config{
StoreProvider: ariesmemstorage.NewProvider(),
VDRI: &vdrmock.MockVDRegistry{},
})
require.NoError(t, err)
require.NotNil(t, controller)
})
t.Run("test failure", func(t ... | explode_data.jsonl/26409 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 266
} | [
2830,
3393,
2051,
39582,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
2393,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
61615,
11,
1848,
1669,
1532,
2099,
9262,
10753,
515,
298,
197,
6093,
5179,
25,
264,
4019,
10536,
16172,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStartCmdWithInvalidCIDVersion(t *testing.T) {
startCmd := GetStartCmd()
args := []string{
"--" + hostURLFlagName, "localhost:8247",
"--" + hostMetricsURLFlagName, "localhost:8248",
"--" + externalEndpointFlagName, "orb.example.com",
"--" + ipfsURLFlagName, "localhost:8081",
"--" + casTypeFlagName,... | explode_data.jsonl/31125 | {
"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,
3479,
15613,
2354,
7928,
54146,
5637,
1155,
353,
8840,
836,
8,
341,
21375,
15613,
1669,
2126,
3479,
15613,
2822,
31215,
1669,
3056,
917,
515,
197,
197,
74757,
1,
488,
3468,
3144,
12135,
675,
11,
330,
8301,
25,
23,
17,
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 TestUserStoreUpdateUpdateAt(t *testing.T) {
Setup()
u1 := &model.User{}
u1.Email = model.NewId()
Must(store.User().Save(u1))
Must(store.Team().SaveMember(&model.TeamMember{TeamId: model.NewId(), UserId: u1.Id}))
time.Sleep(10 * time.Millisecond)
if err := (<-store.User().UpdateUpdateAt(u1.Id)).Err; err !... | explode_data.jsonl/5086 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 235
} | [
2830,
3393,
1474,
6093,
4289,
4289,
1655,
1155,
353,
8840,
836,
8,
341,
197,
21821,
2822,
10676,
16,
1669,
609,
2528,
7344,
16094,
10676,
16,
24066,
284,
1614,
7121,
764,
741,
9209,
590,
31200,
7344,
1005,
8784,
8154,
16,
1171,
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... | 4 |
func TestGetChaincodeCollectionData(t *testing.T) {
cryptoProvider, err := sw.NewDefaultSecurityLevelWithKeystore(sw.NewDummyKeyStore())
require.NoError(t, err)
scc := &SCC{
BuiltinSCCs: map[string]struct{}{"lscc": {}},
Support: &SupportImpl{GetMSPIDs: getMSPIDs},
ACLProvider: mockAclProvide... | explode_data.jsonl/11801 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1095
} | [
2830,
3393,
1949,
18837,
1851,
6482,
1043,
1155,
353,
8840,
836,
8,
341,
1444,
9444,
5179,
11,
1848,
1669,
2021,
7121,
3675,
15352,
4449,
2354,
6608,
63373,
58902,
7121,
43344,
1592,
6093,
2398,
17957,
35699,
1155,
11,
1848,
340,
1903,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetMarginLoanOrders(t *testing.T) {
t.Parallel()
if h.APIKey == "" || h.APISecret == "" || h.APIAuthPEMKey == "" {
t.Skip()
}
_, err := h.GetMarginLoanOrders("hptusdt", "", "", "", "", "", "", "")
if err != nil {
t.Errorf("Test failed - Huobi TestGetMarginLoanOrders: %s", err)
}
} | explode_data.jsonl/24340 | {
"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,
1949,
21681,
71255,
24898,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
743,
305,
24922,
1592,
621,
1591,
1369,
305,
29837,
1637,
50856,
621,
1591,
1369,
305,
24922,
5087,
1740,
44,
1592,
621,
1591,
341,
197,
3244,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_DeleteHappyPath(t *testing.T) {
// arrange
store := &orderTestRepo{
DeleteResult: struct{ Err error }{Err: nil},
}
svr := api.NewOrderServer(store)
ctx := context.Background()
// act
_, err := svr.Delete(ctx, &ordercomm.DeleteOrderRequest{Id: uuid.New().String()})
// assert
if err != nil {
t.Fa... | explode_data.jsonl/36869 | {
"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,
57418,
32847,
1820,
1155,
353,
8840,
836,
8,
341,
197,
322,
30893,
198,
57279,
1669,
609,
1358,
2271,
25243,
515,
197,
96672,
2077,
25,
2036,
90,
15495,
1465,
335,
90,
7747,
25,
2092,
1583,
197,
532,
1903,
18920,
1669,
633... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVersionComparison(t *testing.T) {
testutil.AssertEquals(t, NewHeight(10, 100).Compare(NewHeight(9, 1000)), 1)
testutil.AssertEquals(t, NewHeight(10, 100).Compare(NewHeight(10, 90)), 1)
testutil.AssertEquals(t, NewHeight(10, 100).Compare(NewHeight(11, 1)), -1)
testutil.AssertEquals(t, NewHeight(10, 100).Com... | explode_data.jsonl/20998 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 136
} | [
2830,
3393,
5637,
33487,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
11711,
4315,
1155,
11,
1532,
3640,
7,
16,
15,
11,
220,
16,
15,
15,
568,
27374,
35063,
3640,
7,
24,
11,
220,
16,
15,
15,
15,
5731,
220,
16,
340,
18185,
1314,
117... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMaxRange(t *testing.T) {
start := FromHexP("000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
end := FromHexP("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")
r := MaxRange()
if !r.Start.Equals(start) {
t... | explode_data.jsonl/66589 | {
"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,
5974,
6046,
1155,
353,
8840,
836,
8,
341,
21375,
1669,
5542,
20335,
47,
445,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
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... | 3 |
func TestMqMsgStream_ComputeProduceChannelIndexes(t *testing.T) {
f := &fixture{t: t}
parameters := f.setup()
defer f.teardown()
factory := &ProtoUDFactory{}
for i := range parameters {
func(client mqclient.Client) {
m, err := NewMqMsgStream(context.Background(), 100, 100, client, factory.NewUnmarshalDispatc... | explode_data.jsonl/55279 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 571
} | [
2830,
3393,
44,
80,
6611,
3027,
16946,
8492,
1336,
13373,
9629,
62229,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
609,
59612,
90,
83,
25,
259,
532,
67543,
1669,
282,
25338,
741,
16867,
282,
31853,
37496,
2822,
1166,
2919,
1669,
609,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLoadSchedulerConf(t *testing.T) {
configuration := `
actions: "enqueue, allocate, backfill"
configurations:
- name: enqueue
arguments:
"overcommit-factor": 1.5
tiers:
- plugins:
- name: priority
- name: gang
- name: conformance
- plugins:
- name: drf
- name: predicates
- name: proportion
-... | explode_data.jsonl/69278 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2670
} | [
2830,
3393,
5879,
38878,
15578,
1155,
353,
8840,
836,
8,
341,
197,
21138,
1669,
22074,
4020,
25,
330,
61373,
11,
22089,
11,
1182,
7559,
698,
1676,
21449,
510,
12,
829,
25,
53757,
198,
220,
5977,
510,
262,
330,
1975,
17413,
74097,
788,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLegacyReplicaCalcMissingMetrics(t *testing.T) {
tc := legacyReplicaCalcTestCase{
currentReplicas: 4,
expectedReplicas: 3,
resource: &resourceInfo{
name: v1.ResourceCPU,
requests: []resource.Quantity{resource.MustParse("1.0"), resource.MustParse("1.0"), resource.MustParse("1.0"), resource.Must... | explode_data.jsonl/26689 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 220
} | [
2830,
3393,
77415,
18327,
15317,
47168,
25080,
27328,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
19588,
18327,
15317,
47168,
16458,
515,
197,
20121,
18327,
52210,
25,
220,
220,
19,
345,
197,
42400,
18327,
52210,
25,
220,
18,
345,
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... | 1 |
func TestPongWireErrors(t *testing.T) {
pver := wire.ProtocolVersion
pverNoPong := wire.BIP0031Version
wireErr := &wire.MessageError{}
basePong := wire.NewMsgPong(123123) // 0x1e0f3
basePongEncoded := []byte{
0xf3, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
}
tests := []struct {
in *wire.MsgPong // Va... | explode_data.jsonl/6623 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 891
} | [
2830,
3393,
47,
644,
37845,
13877,
1155,
353,
8840,
836,
8,
341,
3223,
423,
1669,
9067,
54096,
5637,
198,
3223,
423,
2753,
47,
644,
1669,
9067,
1785,
3298,
15,
15,
18,
16,
5637,
198,
6692,
554,
7747,
1669,
609,
35531,
8472,
1454,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestEth_GetLogs_NoLogs(t *testing.T) {
param := make([]map[string][]string, 1)
param[0] = make(map[string][]string)
param[0]["topics"] = []string{}
call(t, "eth_getLogs", param)
} | explode_data.jsonl/832 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 83
} | [
2830,
3393,
65390,
13614,
51053,
36989,
51053,
1155,
353,
8840,
836,
8,
341,
36037,
1669,
1281,
10556,
2186,
14032,
45725,
917,
11,
220,
16,
340,
36037,
58,
15,
60,
284,
1281,
9147,
14032,
45725,
917,
340,
36037,
58,
15,
9868,
55152,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildHttpRoutesForCompositeDependency(t *testing.T) {
dependencyInst := "mydep"
instName := "myinst"
component := v1alpha2.Component{
ObjectMeta: metav1.ObjectMeta{
Name: "mycomponent1",
},
}
expected := []*v1alpha3.HTTPRoute{
{
Match: []*v1alpha3.HTTPMatchRequest{
{
Authority: &v1alp... | explode_data.jsonl/54869 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 442
} | [
2830,
3393,
11066,
2905,
26653,
2461,
41685,
36387,
1155,
353,
8840,
836,
8,
341,
197,
53690,
8724,
1669,
330,
2408,
14891,
698,
88656,
675,
1669,
330,
2408,
6308,
698,
52228,
1669,
348,
16,
7141,
17,
5119,
515,
197,
23816,
12175,
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 TestFormattedProvider_OpenStore(t *testing.T) {
t.Run("Fail to open store in underlying provider", func(t *testing.T) {
provider := formattedstore.NewProvider(&mock.Provider{
ErrOpenStore: errors.New("open store failure"),
},
&exampleformatters.NoOpFormatter{})
require.NotNil(t, provider)
store, er... | explode_data.jsonl/28235 | {
"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,
43500,
5179,
51747,
6093,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
19524,
311,
1787,
3553,
304,
16533,
9109,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
19979,
1669,
23126,
4314,
7121,
5179,
2099,
16712,
36208,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNamespaceTickError(t *testing.T) {
ctrl := xtest.NewController(t)
defer ctrl.Finish()
fakeErr := errors.New("fake error")
ns, closer := newTestNamespace(t)
defer closer()
for i := range testShardIDs {
shard := NewMockdatabaseShard(ctrl)
if i == 0 {
shard.EXPECT().Tick(context.NewNoOpCanncellable... | explode_data.jsonl/35339 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
22699,
22213,
1454,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
856,
1944,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
1166,
726,
7747,
1669,
5975,
7121,
445,
30570,
1465,
1138,
84041,
11,
12128,
1669,
501,
2271,
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... | 3 |
func TestGetRepoInfoFromURL(t *testing.T) {
type scenario struct {
serviceDefinition ServiceDefinition
testName string
repoURL string
test func(*RepoInformation)
}
scenarios := []scenario{
{
githubServiceDef,
"Returns repository information for git remote url",
"gi... | explode_data.jsonl/13594 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 688
} | [
2830,
3393,
1949,
25243,
1731,
3830,
3144,
1155,
353,
8840,
836,
8,
341,
13158,
15048,
2036,
341,
197,
52934,
10398,
5362,
10398,
198,
197,
18185,
675,
688,
914,
198,
197,
17200,
5368,
3144,
1843,
914,
198,
197,
18185,
1060,
2915,
4071,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBot_AnswerCallbackQuery(t *testing.T) {
type fields struct {
apiClient apiClient
}
tests := []struct {
name string
fields fields
wantResult bool
wantErr bool
}{
{
name: "test1",
fields: fields{
apiClient: &mockAPIClient{
method: "answerCallbackQuery",
interfaceM... | explode_data.jsonl/46092 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 437
} | [
2830,
3393,
23502,
32699,
3559,
7494,
2859,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
54299,
2959,
6330,
2959,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
55276,
257,
5043,
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... | 1 |
func Test_orderKeyRight(t *testing.T) {
testcases := []struct {
orderKey int
want int
}{
{orderKey: 13, want: 0}, // 13 is the index of last column
{orderKey: 5, want: 6},
}
wg := sync.WaitGroup{}
for i, tc := range testcases {
t.Run(fmt.Sprintln(i), func(t *testing.T) {
config := newConfig()
... | explode_data.jsonl/69223 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 287
} | [
2830,
3393,
7869,
1592,
5979,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
42245,
1592,
526,
198,
197,
50780,
257,
526,
198,
197,
59403,
197,
197,
90,
1358,
1592,
25,
220,
16,
18,
11,
1366,
25,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBlockGlobalDelete(t *testing.T) {
if err := DB.Delete(&User{}).Error; err == nil || !errors.Is(err, gorm.ErrMissingWhereClause) {
t.Errorf("should returns missing WHERE clause while deleting error")
}
if err := DB.Session(&gorm.Session{AllowGlobalUpdate: true}).Delete(&User{}).Error; err != nil {
t.Err... | explode_data.jsonl/31680 | {
"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,
4713,
11646,
6435,
1155,
353,
8840,
836,
8,
341,
743,
1848,
1669,
5952,
18872,
2099,
1474,
6257,
568,
1454,
26,
1848,
621,
2092,
1369,
753,
7650,
4506,
3964,
11,
342,
493,
27862,
25080,
9064,
28482,
8,
341,
197,
3244,
1308... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateAppWithNoNameSpaceWhenRequired(t *testing.T) {
Given(t).
Path(guestbookPath).
When().
CreateWithNoNameSpace().
Then().
And(func(app *Application) {
var updatedApp *Application
for i := 0; i < 3; i++ {
obj, err := AppClientset.ArgoprojV1alpha1().Applications(ArgoCDNamespace).Get(conte... | explode_data.jsonl/66702 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 298
} | [
2830,
3393,
4021,
2164,
2354,
2753,
675,
9914,
4498,
8164,
1155,
353,
8840,
836,
8,
341,
9600,
2071,
1155,
4292,
197,
69640,
3268,
3045,
2190,
1820,
4292,
197,
197,
4498,
25829,
197,
75569,
2354,
2753,
675,
9914,
25829,
197,
197,
12209,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnableDefaultJWT(t *testing.T) {
app = nil
os.Setenv("PREST_JWT_DEFAULT", "false")
os.Setenv("PREST_DEBUG", "false")
config.Load()
nd := appTest()
serverd := httptest.NewServer(nd)
defer serverd.Close()
respd, err := http.Get(serverd.URL)
if err != nil {
t.Errorf("expected no errors, but got %v", er... | explode_data.jsonl/51061 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
11084,
3675,
55172,
1155,
353,
8840,
836,
8,
341,
28236,
284,
2092,
198,
25078,
4202,
3160,
445,
17357,
784,
10598,
18454,
13811,
497,
330,
3849,
1138,
25078,
4202,
3160,
445,
17357,
784,
11139,
497,
330,
3849,
1138,
25873,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStream_ReadRTValue(t *testing.T) {
t.Run("test", func(t *testing.T) {
assert := base.NewAssert(t)
testRange := getTestRange(streamPosBody, 3*streamBlockSize, 80, 80, 61)
for key := range streamTestSuccessCollections {
for _, testData := range streamTestSuccessCollections[key] {
for _, i := range ... | explode_data.jsonl/21231 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1570
} | [
2830,
3393,
3027,
38381,
5350,
1130,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6948,
1669,
2331,
7121,
8534,
1155,
340,
197,
18185,
6046,
1669,
633,
2271,
6046,
20574,
4859,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEth_SendTransaction_ContractDeploy(t *testing.T) {
param := make([]map[string]string, 1)
param[0] = make(map[string]string)
param[0]["from"] = "0x" + fmt.Sprintf("%x", from)
param[0]["data"] = "0x6080604052348015600f57600080fd5b5060117f775a94827b8fd9b519d36cd827093c664f93347070a554f65e4a6f56cd7388986040516... | explode_data.jsonl/849 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 282
} | [
2830,
3393,
65390,
46267,
8070,
15100,
2144,
69464,
1155,
353,
8840,
836,
8,
341,
36037,
1669,
1281,
10556,
2186,
14032,
30953,
11,
220,
16,
340,
36037,
58,
15,
60,
284,
1281,
9147,
14032,
30953,
340,
36037,
58,
15,
9868,
1499,
1341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWriteAheadLogFile_InitializeAndReadAll(t *testing.T) {
testDir, err := ioutil.TempDir("", t.Name())
assert.NoErrorf(t, err, "generate temporary test dir")
defer os.RemoveAll(testDir)
basicLog, err := zap.NewProduction()
assert.NoError(t, err)
logger := basicLog.Sugar()
// Create
wal, entries, err :... | explode_data.jsonl/43678 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1059
} | [
2830,
3393,
7985,
87962,
98857,
62,
9928,
3036,
4418,
2403,
1155,
353,
8840,
836,
8,
341,
18185,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
259,
2967,
2398,
6948,
35699,
69,
1155,
11,
1848,
11,
330,
19366,
13340,
1273,
5419,
5130,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_Menu_AddsQuit(t *testing.T) {
w := createWindow("Menu Test").(*window)
mainMenu := fyne.NewMainMenu(fyne.NewMenu("File"))
bar := buildMenuOverlay(mainMenu, w.canvas)
assert.NotNil(t, bar)
assert.Equal(t, 1, len(mainMenu.Items))
assert.Equal(t, 2, len(mainMenu.Items[0].Items)) // separator+quit inserted
... | explode_data.jsonl/4663 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
54098,
21346,
82,
42856,
1155,
353,
8840,
836,
8,
341,
6692,
1669,
1855,
4267,
445,
3514,
3393,
1827,
4071,
5507,
340,
36641,
3514,
1669,
51941,
811,
7121,
86228,
955,
81708,
7121,
3514,
445,
1703,
5455,
90709,
1669,
1936,
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 TestRangeRemovalFromContent(t *testing.T) {
bm := NewBitmap()
for i := 100; i < 10000; i++ {
bm.AddInt(i * 3)
}
bm.AddRange(21, 26)
bm.AddRange(9, 14)
bm.RemoveRange(11, 16)
bm.RemoveRange(0, 30000)
c := bm.GetCardinality()
assert.EqualValues(t, 00, c)
} | explode_data.jsonl/20333 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
6046,
6590,
13516,
3830,
2762,
1155,
353,
8840,
836,
8,
341,
2233,
76,
1669,
1532,
16773,
741,
2023,
600,
1669,
220,
16,
15,
15,
26,
600,
366,
220,
16,
15,
15,
15,
15,
26,
600,
1027,
341,
197,
2233,
76,
1904,
1072,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGraphDefinition(t *testing.T) {
var nginx NginxPlugin
graphdef := nginx.GraphDefinition()
if len(graphdef) != 3 {
t.Errorf("GetTempfilename: %d should be 3", len(graphdef))
}
} | explode_data.jsonl/71307 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 70
} | [
2830,
3393,
11212,
10398,
1155,
353,
8840,
836,
8,
341,
2405,
70482,
451,
8163,
87,
11546,
271,
66616,
750,
1669,
70482,
40237,
10398,
741,
743,
2422,
24312,
750,
8,
961,
220,
18,
341,
197,
3244,
13080,
445,
1949,
12151,
8404,
25,
101... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTerragruntGenerateBlockOverwrite(t *testing.T) {
t.Parallel()
generateTestCase := filepath.Join(TEST_FIXTURE_CODEGEN_PATH, "generate-block", "overwrite")
cleanupTerraformFolder(t, generateTestCase)
cleanupTerragruntFolder(t, generateTestCase)
runTerragrunt(t, fmt.Sprintf("terragrunt apply -auto-approve ... | explode_data.jsonl/10158 | {
"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,
51402,
68305,
3850,
31115,
4713,
1918,
4934,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3174,
13220,
16458,
1669,
26054,
22363,
50320,
42635,
41486,
10020,
11085,
7944,
11,
330,
19366,
9425,
497,
330,
64915,
1138,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSuccessfulSend(t *testing.T) {
impl, err := newTestSenderCheckerImpl(&smscTestClientOptions{false, false, 0}, time.Hour)
if err != nil {
t.Fatal(err)
}
_, err = impl.Send("+7 921 123 45 67", "test", false)
if err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/23019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
36374,
11505,
1155,
353,
8840,
836,
8,
341,
197,
6383,
11,
1848,
1669,
501,
2271,
20381,
35188,
9673,
2099,
41392,
66,
2271,
2959,
3798,
90,
3849,
11,
895,
11,
220,
15,
2137,
882,
73550,
340,
743,
1848,
961,
2092,
341,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestService_ListReleases(t *testing.T) {
tcs := []struct {
svc Service
expectedRes []*model.ReleaseInfo
expectedErr error
}{
{ // TC#1
svc: Service{
storage: &storage.Fake{
GetErr: errFake,
},
},
expectedErr: errFake,
},
{ // TC#2
svc: Service{
storage: &storage.Fake{
... | explode_data.jsonl/1999 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 894
} | [
2830,
3393,
1860,
27104,
693,
28299,
1155,
353,
8840,
836,
8,
341,
3244,
4837,
1669,
3056,
1235,
341,
197,
1903,
7362,
5362,
271,
197,
42400,
1061,
29838,
2528,
58693,
1731,
198,
197,
42400,
7747,
1465,
198,
197,
59403,
197,
197,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOrderUpdate(t *testing.T) {
setup()
defer teardown()
httpmock.RegisterResponder("PUT", fmt.Sprintf("https://fooshop.myshopify.com/%s/orders/1.json", client.pathPrefix),
httpmock.NewStringResponder(201, `{"order":{"id": 1}}`))
order := Order{
ID: 1,
FinancialStatus: "paid",
Fulfil... | explode_data.jsonl/17991 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
4431,
4289,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
28080,
16712,
19983,
30884,
445,
6221,
497,
8879,
17305,
445,
2428,
1110,
824,
9267,
453,
12618,
8675,
1437,
905,
12627,
82,
82818,
14,
16,
4323,
497,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSample1(t *testing.T) {
n, m := 6, 3
A := []int{1, 2, 3, 1, 2, 3}
runSample(t, n, m, A, 3)
} | explode_data.jsonl/39366 | {
"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,
17571,
16,
1155,
353,
8840,
836,
8,
341,
9038,
11,
296,
1669,
220,
21,
11,
220,
18,
198,
22985,
1669,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
16,
11,
220,
17,
11,
220,
18,
532,
56742,
17571,
1155,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestInsecureSecretsUpdated(t *testing.T) {
expected := time.Now()
target := SecretProviderImpl{
LastUpdated: expected,
}
os.Setenv(EnvSecretStore, "true")
target.InsecureSecretsUpdated()
assert.Equal(t, expected, target.LastUpdated, "LastUpdated should not have changed")
// Give a little time between ... | explode_data.jsonl/39203 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
641,
25132,
19773,
82,
16196,
1155,
353,
8840,
836,
8,
1476,
42400,
1669,
882,
13244,
741,
28861,
1669,
8599,
5179,
9673,
515,
197,
197,
5842,
16196,
25,
3601,
345,
197,
630,
25078,
4202,
3160,
7,
14359,
19773,
6093,
11,
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 TestSessionValidationFailure(t *testing.T) {
patTest, err := NewPassAccessTokenTest(PassAccessTokenTestOptions{
ValidToken: false,
})
require.NoError(t, err)
t.Cleanup(patTest.Close)
// An unsuccessful validation will return 403 and not set the auth cookie.
code, cookie := patTest.getCallbackEndpoint()
a... | explode_data.jsonl/36390 | {
"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,
5283,
13799,
17507,
1155,
353,
8840,
836,
8,
341,
3223,
266,
2271,
11,
1848,
1669,
1532,
12187,
37649,
2271,
5304,
395,
37649,
2271,
3798,
515,
197,
197,
4088,
3323,
25,
895,
345,
197,
3518,
17957,
35699,
1155,
11,
1848,
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 TestConfigureTransport(t *testing.T) {
t1 := &http.Transport{}
err := ConfigureTransport(t1)
if err != nil {
t.Fatal(err)
}
if got := fmt.Sprintf("%#v", t1); !strings.Contains(got, `"h2"`) {
// Laziness, to avoid buildtags.
t.Errorf("stringification of HTTP/1 transport didn't contain \"h2\": %v", got)
... | explode_data.jsonl/16057 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 517
} | [
2830,
3393,
28560,
27560,
1155,
353,
8840,
836,
8,
341,
3244,
16,
1669,
609,
1254,
87669,
16094,
9859,
1669,
22169,
27560,
1155,
16,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
743,
2684,
1669,
8879,
17305,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigLoad(t *testing.T) {
mk := NewMockKubeSettings()
cfg := config.NewConfig(mk)
assert.Nil(t, cfg.Load("testdata/k9s.yml"))
assert.Equal(t, 2, cfg.K9s.RefreshRate)
assert.Equal(t, 2000, cfg.K9s.Logger.BufferSize)
assert.Equal(t, int64(200), cfg.K9s.Logger.TailCount)
assert.Equal(t, "minikube", cfg.K... | explode_data.jsonl/19251 | {
"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,
2648,
5879,
1155,
353,
8840,
836,
8,
341,
2109,
74,
1669,
1532,
11571,
42,
3760,
6086,
741,
50286,
1669,
2193,
7121,
2648,
1255,
74,
340,
6948,
59678,
1155,
11,
13286,
13969,
445,
92425,
14109,
24,
82,
33936,
28075,
6948,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOcSpanKindToInternal(t *testing.T) {
tests := []struct {
ocAttrs *octrace.Span_Attributes
ocKind octrace.Span_SpanKind
otlpKind otlptrace.Span_SpanKind
}{
{
ocKind: octrace.Span_CLIENT,
otlpKind: otlptrace.Span_CLIENT,
},
{
ocKind: octrace.Span_SERVER,
otlpKind: otlptrace.Span_... | explode_data.jsonl/8738 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 918
} | [
2830,
3393,
46,
66,
12485,
10629,
1249,
11569,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
197,
509,
53671,
220,
353,
78,
10597,
578,
85309,
55581,
3604,
198,
197,
197,
509,
10629,
256,
297,
10597,
578,
85309,
109... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_StrStrMap_FilterEmpty(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
m := gmap.NewStrStrMap()
m.Set("1", "")
m.Set("2", "2")
t.Assert(m.Size(), 2)
t.Assert(m.Get("1"), "")
t.Assert(m.Get("2"), "2")
m.FilterEmpty()
t.Assert(m.Size(), 1)
t.Assert(m.Get("2"), "2")
})
} | explode_data.jsonl/36014 | {
"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,
46171,
2580,
2227,
68935,
3522,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
2109,
1669,
342,
2186,
7121,
2580,
2580,
2227,
741,
197,
2109,
4202,
445,
16,
497,
14676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTypedArrayBuffers(t *testing.T) {
t.Parallel()
ctx := NewIsolate().NewContext()
uint8Array, err := ctx.Eval(`
new Uint8Array(4).fill(4, 1, 3) // taken from a MDN example
`, "test.js")
if err != nil {
t.Fatal(err)
}
bytes := uint8Array.Bytes()
if !reflect.DeepEqual(bytes, []byte{0, 4, 4, 0}) {
t... | explode_data.jsonl/81580 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
44466,
1857,
36219,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
1532,
3872,
33066,
1005,
3564,
1972,
2822,
8254,
23,
1857,
11,
1848,
1669,
5635,
5142,
831,
61528,
197,
8638,
27883,
23,
1857,
7,
19,
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... | 3 |
func Test_validateAndSanitizeExternalLabels(t *testing.T) {
tests := []struct {
name string
inputLabels map[string]string
expectedLabels map[string]string
returnErrorOnCreate bool
}{
{"success_case_no_labels",
map[string]string{},
map[string]string{},
false,
},
{"suc... | explode_data.jsonl/78814 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 520
} | [
2830,
3393,
42681,
3036,
23729,
26310,
25913,
23674,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
394,
914,
198,
197,
22427,
23674,
260,
2415,
14032,
30953,
198,
197,
42400,
23674,
414,
2415,
14032,
30953,
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 TestTLSClientCertsNoCerts(t *testing.T) {
configEntity := endpointConfigEntity{}
testlookup := lookup.New(configBackend)
testlookup.UnmarshalKey("client", &configEntity.Client)
//Set client tls paths to empty strings
configEntity.Client.TLSCerts.Client.Cert.Path = ""
configEntity.Client.TLSCerts.Client.Key... | explode_data.jsonl/34097 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 351
} | [
2830,
3393,
45439,
2959,
34,
15546,
2753,
34,
15546,
1155,
353,
8840,
836,
8,
1476,
25873,
3030,
1669,
14887,
2648,
3030,
16094,
18185,
21020,
1669,
18615,
7121,
8754,
29699,
340,
18185,
21020,
38097,
1592,
445,
2972,
497,
609,
1676,
3030... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDiffListFail(t *testing.T) {
s := newScaffold(t)
defer s.reset()
d := &dg{cmValue: "baz", secretValue: "baz"}
s.client.getFunc = d.get
err := s.executeCommand("diff", "dev")
require.NotNil(t, err)
a := assert.New(t)
a.Contains(err.Error(), "not implemented")
} | explode_data.jsonl/72087 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
21751,
852,
19524,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
501,
50,
27864,
1155,
340,
16867,
274,
13857,
741,
2698,
1669,
609,
35138,
90,
6226,
1130,
25,
330,
42573,
497,
6234,
1130,
25,
330,
42573,
16707,
1903,
6581,
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... | 1 |
func TestApp_VisibleCommands(t *testing.T) {
app := &App{
Commands: []*Command{
{
Name: "frob",
HelpName: "foo frob",
Action: func(_ *Context) error { return nil },
},
{
Name: "frib",
HelpName: "foo frib",
Hidden: true,
Action: func(_ *Context) error { return nil },... | explode_data.jsonl/52570 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 503
} | [
2830,
3393,
2164,
2334,
23066,
30479,
1155,
353,
8840,
836,
8,
341,
28236,
1669,
609,
2164,
515,
197,
197,
30479,
25,
29838,
4062,
515,
298,
197,
515,
571,
21297,
25,
257,
330,
69,
22740,
756,
571,
197,
12689,
675,
25,
330,
7975,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCAConfigSecurityProviderLabel(t *testing.T) {
backend, err := config.FromFile(configTestFilePath)()
if err != nil {
t.Fatal("Failed to get config backend")
}
customBackend := getCustomBackend(backend...)
cryptoConfig := ConfigFromBackend(customBackend).(*Config)
// Test SecurityProviderLabel
val, o... | explode_data.jsonl/58382 | {
"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,
5049,
2648,
15352,
5179,
2476,
1155,
353,
8840,
836,
8,
341,
197,
20942,
11,
1848,
1669,
2193,
11439,
1703,
8754,
2271,
19090,
8,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
445,
9408,
311,
633,
2193,
19163,
1138,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestIssue13893_Expect100(t *testing.T) {
// test that the Server doesn't filter out Expect headers.
req := reqBytes(`PUT /readbody HTTP/1.1
User-Agent: PycURL/7.22.0
Host: 127.0.0.1:9000
Accept: */*
Expect: 100-continue
Content-Length: 10
HelloWorld
`)
var buf bytes.Buffer
conn := &rwTestConn{
Reader: byte... | explode_data.jsonl/22482 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 242
} | [
2830,
3393,
42006,
16,
18,
23,
24,
18,
62,
17536,
16,
15,
15,
1155,
353,
8840,
836,
8,
341,
197,
322,
1273,
429,
279,
8422,
3171,
944,
4051,
700,
32085,
7102,
624,
24395,
1669,
4232,
7078,
5809,
6221,
608,
878,
2599,
10130,
14,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDexPreoptProfile(t *testing.T) {
config := android.TestConfig("out", nil, "", nil)
ctx := android.BuilderContextForTesting(config)
globalSoong := globalSoongConfigForTests()
global := GlobalConfigForTests(ctx)
module := testSystemModuleConfig(ctx, "test")
module.ProfileClassListing = android.OptionalPat... | explode_data.jsonl/56810 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 378
} | [
2830,
3393,
35,
327,
4703,
2912,
8526,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
2103,
8787,
2648,
445,
411,
497,
2092,
11,
7342,
2092,
340,
20985,
1669,
2103,
15641,
1972,
2461,
16451,
8754,
340,
18842,
4416,
644,
1669,
3644,
4416,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegisterContainerInstance(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockEC2Metadata := mock_ec2.NewMockEC2MetadataClient(mockCtrl)
additionalAttributes := map[string]string{"my_custom_attribute": "Custom_Value1",
"my_other_custom_attribute": "Custom_Value2",
}
client, ... | explode_data.jsonl/61445 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 867
} | [
2830,
3393,
8690,
4502,
2523,
1155,
353,
8840,
836,
8,
341,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
7860,
15001,
991,
18176,
741,
77333,
7498,
17,
14610,
1669,
7860,
36844,
17,
7121,
11571,
7498,
17,
14610,
295... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestUnknownDriver(t *testing.T) {
if !testutils.IsRunningInContainer() {
defer testutils.SetupTestOSContext(t)()
}
_, err := createTestNetwork("unknowndriver", "testnetwork", options.Generic{}, nil, nil)
if err == nil {
t.Fatal("Expected to fail. But instead succeeded")
}
if _, ok := err.(types.NotFoun... | explode_data.jsonl/6351 | {
"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,
13790,
11349,
1155,
353,
8840,
836,
8,
341,
743,
753,
1944,
6031,
4506,
18990,
641,
4502,
368,
341,
197,
16867,
1273,
6031,
39820,
2271,
3126,
1972,
1155,
8,
741,
197,
630,
197,
6878,
1848,
1669,
1855,
2271,
12320,
445,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestMsgFilter_NotByWebhook(t *testing.T) {
var webhookID disgord.Snowflake = 456
var botID disgord.Snowflake = 123
messageWithWebhookID := &disgord.Message{
Author: &disgord.User{},
WebhookID: webhookID,
}
messageWithoutWebhookID := &disgord.Message{
Author: &disgord.User{},
WebhookID: 0,
}
... | explode_data.jsonl/1329 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 464
} | [
2830,
3393,
6611,
5632,
60816,
1359,
5981,
20873,
1155,
353,
8840,
836,
8,
341,
2405,
75268,
915,
32183,
539,
808,
3328,
63456,
284,
220,
19,
20,
21,
198,
2405,
10924,
915,
32183,
539,
808,
3328,
63456,
284,
220,
16,
17,
18,
271,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.