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 TestAccAWSS3BucketObject_updatesWithVersioningViaAccessPoint(t *testing.T) {
var originalObj, modifiedObj s3.GetObjectOutput
rName := acctest.RandomWithPrefix("tf-acc-test")
resourceName := "aws_s3_bucket_object.test"
accessPointResourceName := "aws_s3_access_point.test"
sourceInitial := testAccAWSS3BucketOb... | explode_data.jsonl/64963 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 637
} | [
2830,
3393,
14603,
14419,
1220,
18,
36018,
1190,
57829,
2354,
5637,
287,
54428,
6054,
2609,
1155,
353,
8840,
836,
8,
341,
2405,
4024,
5261,
11,
10807,
5261,
274,
18,
25618,
5097,
198,
7000,
675,
1669,
1613,
67880,
26709,
2354,
14335,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_getWorkflowsHandler_FilterByRepo(t *testing.T) {
api, tsURL := newTestServer(t)
admin, _ := assets.InsertAdminUser(t, api.mustDB())
localConsumer, err := authentication.LoadConsumerByTypeAndUserID(context.TODO(), api.mustDB(), sdk.ConsumerLocal, admin.ID, authentication.LoadConsumerOptions.WithAuthentifie... | explode_data.jsonl/31085 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1105
} | [
2830,
3393,
3062,
6776,
38140,
3050,
68935,
1359,
25243,
1155,
353,
8840,
836,
8,
341,
54299,
11,
10591,
3144,
1669,
501,
2271,
5475,
1155,
692,
64394,
11,
716,
1669,
11770,
23142,
7210,
1474,
1155,
11,
6330,
69419,
3506,
2398,
8854,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewHTTPBasicAuth(t *testing.T) {
server := httptest.NewServer(
http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
username, password, ok := r.BasicAuth()
if !(ok && username == "user" && password == "password123") {
t.Fatalf("Basic authorization header was not set correctly: ex... | explode_data.jsonl/16313 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 294
} | [
2830,
3393,
3564,
9230,
15944,
5087,
1155,
353,
8840,
836,
8,
341,
41057,
1669,
54320,
70334,
7121,
5475,
1006,
197,
28080,
89164,
1006,
298,
29244,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
571,
72358,
11,
3552,
11,
5394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRESTClientRequires(t *testing.T) {
if _, err := RESTClientFor(&Config{Host: "127.0.0.1", Codec: testapi.Default.Codec()}); err == nil {
t.Errorf("unexpected non-error")
}
if _, err := RESTClientFor(&Config{Host: "127.0.0.1", GroupVersion: testapi.Default.GroupVersion()}); err == nil {
t.Errorf("unexpect... | explode_data.jsonl/25920 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 199
} | [
2830,
3393,
38307,
2959,
46961,
1155,
353,
8840,
836,
8,
341,
743,
8358,
1848,
1669,
25414,
2959,
2461,
2099,
2648,
90,
9296,
25,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
497,
67077,
25,
1273,
2068,
13275,
20274,
66,
368,
14088,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSolution(t *testing.T) {
t.Parallel()
type in struct {
x, y, z int
}
type out struct {
a, b, c int
}
var cases = []struct {
in in
want out
}{
{in: in{x: 1, y: 2, z: 3}, want: out{a: 3, b: 1, c: 2}},
{in: in{x: 41, y: 59, z: 31}, want: out{a: 31, b: 41, c: 59}},
}
for i, tt := range case... | explode_data.jsonl/40429 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 340
} | [
2830,
3393,
36842,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
13158,
304,
2036,
341,
197,
10225,
11,
379,
11,
1147,
526,
198,
197,
630,
13158,
700,
2036,
341,
197,
11323,
11,
293,
11,
272,
526,
198,
197,
532,
2405,
5048,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFernetKeys(t *testing.T) {
m := SFernetKeyManager{}
err := m.InitKeys("", 2)
if err != nil {
t.Fatalf("fail to initkeys %s", err)
}
buf := make([]byte, 128)
for i := 0; i < 10; i += 1 {
msgLen, err := rand.Read(buf)
if err != nil {
t.Fatalf("rand.Read fail %s", err)
}
msg, err := m.Encrypt(b... | explode_data.jsonl/60518 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 294
} | [
2830,
3393,
37,
13845,
8850,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
23463,
13845,
1592,
2043,
16094,
9859,
1669,
296,
26849,
8850,
19814,
220,
17,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
18403,
311,
2930,
10563,
1018,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAppPgcContCount(t *testing.T) {
var (
c = context.Background()
)
convey.Convey("PgcContCount", t, func(ctx convey.C) {
upCnt, err := d.PgcContCount(c)
ctx.Convey("Then err should be nil.upCnt should not be nil.", func(ctx convey.C) {
ctx.So(err, convey.ShouldBeNil)
ctx.So(upCnt, convey.ShouldNot... | explode_data.jsonl/69221 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
2164,
47,
20669,
818,
2507,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
1444,
284,
2266,
19047,
741,
197,
340,
37203,
5617,
4801,
5617,
445,
47,
20669,
818,
2507,
497,
259,
11,
2915,
7502,
20001,
727,
8,
341,
197,
598... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLake_Equalize(t *testing.T) {
tcs := []struct{
name string
cells []IndexHeight
want []IndexHeight
} {
{
name: "basin",
cells: []IndexHeight{
{Height: 0.0, Water: 0.1},
{Height: 1.0, Water: 0.1},
{Height: 1.0, Water: 0.1},
{Height: 1.0, Water: 0.1},
{Height: 1.0, Water: 0.1},... | explode_data.jsonl/5212 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1104
} | [
2830,
3393,
81289,
2089,
1751,
551,
1155,
353,
8840,
836,
8,
341,
3244,
4837,
1669,
3056,
1235,
515,
197,
11609,
914,
198,
197,
1444,
6436,
3056,
1552,
3640,
198,
197,
50780,
3056,
1552,
3640,
198,
197,
92,
341,
197,
197,
515,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEnvAddOnManagedNodeGroups(t *testing.T) {
cfg := NewDefault()
defer func() {
os.RemoveAll(cfg.ConfigPath)
os.RemoveAll(cfg.KubectlCommandsOutputPath)
os.RemoveAll(cfg.RemoteAccessCommandsOutputPath)
}()
os.Setenv("AWS_K8S_TESTER_EKS_ADD_ON_NODE_GROUPS_ENABLE", "false")
defer os.Unsetenv("AWS_K8S_TE... | explode_data.jsonl/69897 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 432
} | [
2830,
3393,
14359,
2212,
1925,
27192,
1955,
22173,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
1532,
3675,
741,
16867,
2915,
368,
341,
197,
25078,
84427,
28272,
10753,
1820,
340,
197,
25078,
84427,
28272,
11352,
53380,
30479,
5097,
1820,
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 TestValidIP4ToReturnFalseOnEmptyAddress(t *testing.T) {
result := ipparser.ValidIP4("")
if result == true {
t.Fatalf("Expected ValidIP() to be false but got true")
}
} | explode_data.jsonl/70073 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
4088,
3298,
19,
1249,
5598,
4049,
1925,
3522,
4286,
1155,
353,
8840,
836,
8,
341,
9559,
1669,
5997,
9657,
47156,
3298,
19,
445,
5130,
743,
1102,
621,
830,
341,
197,
3244,
30762,
445,
18896,
7818,
3298,
368,
311,
387,
895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_locationPath(t *testing.T) {
tests := []struct {
name string
path string
scheme source.Scheme
real string
virtual string
expected string
}{
{
name: "dir:.",
scheme: source.DirectoryScheme,
path: ".",
real: "/home/usr/file",
virtual: "file",
expec... | explode_data.jsonl/25490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1159
} | [
2830,
3393,
13126,
1820,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
26781,
257,
914,
198,
197,
1903,
8058,
256,
2530,
92719,
198,
197,
91874,
257,
914,
198,
197,
9558,
220,
914,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBundle_Reconcile(t *testing.T) {
b := NewBundle(yaml.GetName())
spec := &v1beta1.ToolsetSpec{}
app := application.NewTestYAMLApplication(t)
out, _ := yamlv3.Marshal(testHelperResource)
app.SetDeploy(spec, true).SetGetYaml(spec, string(out))
b.AddApplication(app.Application())
resources := []*clientgo... | explode_data.jsonl/48066 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 152
} | [
2830,
3393,
8409,
50693,
40446,
457,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
1532,
8409,
7021,
9467,
60304,
12367,
98100,
1669,
609,
85,
16,
19127,
16,
24439,
746,
8327,
16094,
28236,
1669,
3766,
7121,
2271,
56,
31102,
4988,
1155,
692... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAccResourceAppPackage(t *testing.T) {
resource.UnitTest(t, resource.TestCase{
ProviderFactories: providerFactories,
Steps: []resource.TestStep{
// initial creation
{
Config: testAccResourceAppFileConfig,
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("splunkconfig_... | explode_data.jsonl/82442 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1628
} | [
2830,
3393,
14603,
4783,
2164,
13100,
1155,
353,
8840,
836,
8,
341,
50346,
25159,
2271,
1155,
11,
5101,
31363,
515,
197,
197,
5179,
17417,
2433,
25,
9109,
17417,
2433,
345,
197,
197,
33951,
25,
3056,
9233,
8787,
8304,
515,
298,
197,
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 TestUpgrade(t *testing.T) {
yaml := `apiVersion: skaffold/v1alpha5
kind: Config
build:
artifacts:
- image: gcr.io/k8s-skaffold/skaffold-example
test:
- image: gcr.io/k8s-skaffold/skaffold-example
structureTests:
- ./test/*
deploy:
kubectl:
manifests:
- k8s-*
profiles:
- name: test profi... | explode_data.jsonl/71757 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 569
} | [
2830,
3393,
43861,
1155,
353,
8840,
836,
8,
341,
14522,
9467,
1669,
1565,
2068,
5637,
25,
1901,
2649,
813,
5457,
16,
7141,
20,
198,
15314,
25,
5532,
198,
5834,
510,
220,
35036,
510,
220,
481,
2168,
25,
342,
5082,
4245,
14109,
23,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestData(t *testing.T) {
service := compose.EnsureUp(t, "redis")
addEntry(t, service.Host(), "foo", 1)
ms := mbtest.NewFetcher(t, getConfig(service.Host()))
ms.WriteEvents(t, "")
} | explode_data.jsonl/53887 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
93200,
1155,
353,
8840,
836,
8,
341,
52934,
1669,
30335,
22834,
19098,
2324,
1155,
11,
330,
21748,
5130,
12718,
5874,
1155,
11,
2473,
29840,
1507,
330,
7975,
497,
220,
16,
692,
47691,
1669,
10016,
1944,
7121,
97492,
1155,
11,
6676... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvVectWire(t *testing.T) {
// Block 203707 hash.
hashStr := "3264bc2ac36a60840790ba1d475d01367e7c723da941069e9dc"
baseHash, err := chainhash.NewHashFromStr(hashStr)
if err != nil {
t.Errorf("NewHashFromStr: %v", err)
}
// errInvVect is an inventory vector with an error.
errInvVect := InvVect{
Type... | explode_data.jsonl/6595 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2185
} | [
2830,
3393,
15174,
92801,
37845,
1155,
353,
8840,
836,
8,
341,
197,
322,
8362,
220,
17,
15,
18,
22,
15,
22,
5175,
624,
50333,
2580,
1669,
330,
18,
17,
21,
19,
8904,
17,
580,
18,
21,
64,
21,
15,
23,
19,
15,
22,
24,
15,
4645,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_PromReporter_OnNewLongestChain(t *testing.T) {
t.Run("with nothing in the database", func(t *testing.T) {
d := pgtest.NewSqlDB(t)
backend := new(mocks.PrometheusBackend)
backend.Test(t)
reporter := services.NewPromReporter(d, backend, 10*time.Millisecond)
var subscribeCalls atomic.Int32
backen... | explode_data.jsonl/42273 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1443
} | [
2830,
3393,
1088,
441,
52766,
35482,
3564,
6583,
477,
18837,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
4197,
4302,
304,
279,
4625,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
2698,
1669,
17495,
1944,
7121,
8269,
3506,
1155,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAddVolumePublication(t *testing.T) {
mockCtrl := gomock.NewController(t)
// Create a mocked persistent store client
mockStoreClient := mockpersistentstore.NewMockStoreClient(mockCtrl)
// Set the store client behavior we don't care about for this testcase
mockStoreClient.EXPECT().GetVolumeTransactions(gomo... | explode_data.jsonl/62739 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 456
} | [
2830,
3393,
2212,
18902,
72390,
1155,
353,
8840,
836,
8,
341,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
197,
322,
4230,
264,
46149,
24999,
3553,
2943,
198,
77333,
6093,
2959,
1669,
7860,
69389,
4314,
7121,
11571,
6093,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApiTest_AddsJSONBodyToRequest(t *testing.T) {
handler := http.NewServeMux()
handler.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) {
data, _ := ioutil.ReadAll(r.Body)
if string(data) != `{"a": 12345}` {
w.WriteHeader(http.StatusInternalServerError)
return
}
if r.Header.Get("C... | explode_data.jsonl/54781 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 250
} | [
2830,
3393,
6563,
2271,
21346,
82,
5370,
5444,
1249,
1900,
1155,
353,
8840,
836,
8,
341,
53326,
1669,
1758,
7121,
60421,
44,
2200,
741,
53326,
63623,
4283,
14990,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGitGetter_branchUpdate(t *testing.T) {
if !testHasGit {
t.Log("git not found, skipping")
t.Skip()
}
g := new(GitGetter)
dst := tempDir(t)
// First setup the state with a fresh branch
repo := testGitRepo(t, "branch-update")
repo.git("checkout", "-b", "test-branch")
repo.commitFile("branch.txt", "b... | explode_data.jsonl/39695 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 431
} | [
2830,
3393,
46562,
31485,
28031,
4289,
1155,
353,
8840,
836,
8,
341,
743,
753,
1944,
10281,
46562,
341,
197,
3244,
5247,
445,
12882,
537,
1730,
11,
42659,
1138,
197,
3244,
57776,
741,
197,
630,
3174,
1669,
501,
6699,
275,
31485,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestGetNodeValue(t *testing.T) {
testCase := []struct {
nodeType string
nodeValue string
err bool
}{{
nodeType: "proto",
nodeValue: "tcp",
err: false,
}, {
nodeType: "src",
nodeValue: "192.168.0.1",
err: false,
}, {
nodeType: "src",
nodeValue: "192.168.a",
err: ... | explode_data.jsonl/6710 | {
"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,
1949,
1955,
1130,
1155,
353,
8840,
836,
8,
341,
18185,
4207,
1669,
3056,
1235,
341,
197,
20831,
929,
220,
914,
198,
197,
20831,
1130,
914,
198,
197,
9859,
981,
1807,
198,
197,
15170,
515,
197,
20831,
929,
25,
220,
330,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestKVStoreClientFactoryConfigValidation(t *testing.T) {
testCases := []struct {
config loadtest.Config
err bool
}{
{loadtest.Config{Size: 1, Rate: 1000, Time: 1000, Count: -1}, true}, // invalid tx size
{loadtest.Config{Size: 10, Rate: 1000, Time: 1000, Count: -1}, true}, // tx size is too small
... | explode_data.jsonl/31449 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 702
} | [
2830,
3393,
82707,
6093,
2959,
4153,
2648,
13799,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
25873,
2795,
1944,
10753,
198,
197,
9859,
262,
1807,
198,
197,
59403,
197,
197,
90,
1078,
1944,
10753,
90,
1695,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOOPMetric(t *testing.T) {
if err := applyMixerRule(oopPromConfigs); err != nil {
fatalf(t, "could not apply required out of process configs: %v", err)
}
defer func() {
if err := deleteMixerRule(oopPromConfigs); err != nil {
t.Logf("could not clear out of process config: %v", err)
}
}()
allowRule... | explode_data.jsonl/81433 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 154
} | [
2830,
3393,
46,
3067,
54310,
1155,
353,
8840,
836,
8,
341,
743,
1848,
1669,
3796,
44,
39014,
11337,
10108,
453,
35186,
84905,
1215,
1848,
961,
2092,
341,
197,
1166,
266,
3104,
1155,
11,
330,
28077,
537,
3796,
2567,
700,
315,
1882,
423... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBadConnectStatus(t *testing.T) {
l, err := net.Listen("tcp", "localhost:0")
if err != nil {
t.Fatalf("Unable to listen: %s", err)
}
hs := &http.Server{
Handler: http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) {
resp.WriteHeader(403) // forbidden
}),
}
go func() {
if err := ... | explode_data.jsonl/15725 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 280
} | [
2830,
3393,
17082,
14611,
2522,
1155,
353,
8840,
836,
8,
341,
8810,
11,
1848,
1669,
4179,
68334,
445,
27161,
497,
330,
8301,
25,
15,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
17075,
311,
8844,
25,
1018,
82,
497,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSegSelector(t *testing.T) {
tests := map[string]struct {
PrepareMocks func(db *mock_pathdb.MockPathDB,
c *mock_revcache.MockRevCache) []*seg.PathSegment
ErrorAssertion require.ErrorAssertionFunc
}{
"PathDB error": {
PrepareMocks: func(db *mock_pathdb.MockPathDB,
c *mock_revcache.MockRevCache)... | explode_data.jsonl/54718 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1184
} | [
2830,
3393,
10998,
5877,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
50590,
72577,
2915,
9791,
353,
16712,
2638,
1999,
24664,
1820,
3506,
345,
298,
1444,
353,
16712,
1288,
7362,
1777,
24664,
36184,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRetriesNewOtherType_Is(t *testing.T) {
err := NewRetriesResult(NewResult(404, "this is an example error, %s", "yep"), 0, time.Now(), nil)
if protocol.ResultIs(err, NewResult(200, "OK")) {
t.Error("Expected error to be a [Normal, ExampleStatusFailed], filtered by eventtype failed")
}
} | explode_data.jsonl/66497 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
12020,
4019,
3564,
11409,
929,
31879,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
1532,
12020,
4019,
2077,
35063,
2077,
7,
19,
15,
19,
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,
1... | 2 |
func TestMDServerBasics(t *testing.T) {
// setup
ctx := context.Background()
config := MakeTestConfigOrBust(t, "test_user")
defer config.Shutdown(ctx)
mdServer := config.MDServer()
session, err := config.KBPKI().GetCurrentSession(ctx)
require.NoError(t, err)
uid := session.UID
// (1) get metadata -- allocate... | explode_data.jsonl/82296 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1638
} | [
2830,
3393,
6076,
5475,
33603,
1211,
1155,
353,
8840,
836,
8,
341,
197,
322,
6505,
198,
20985,
1669,
2266,
19047,
741,
25873,
1669,
7405,
2271,
2648,
2195,
33,
590,
1155,
11,
330,
1944,
3317,
1138,
16867,
2193,
10849,
18452,
7502,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestSetBaseURL(t *testing.T) {
ts1 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
_, _ = fmt.Fprintln(w, "ts1"+r.URL.Path)
}))
defer ts1.Close()
ts2 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
_, _ = fmt.Fprintln(w, "ts2"+r.U... | explode_data.jsonl/7662 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 363
} | [
2830,
3393,
1649,
3978,
3144,
1155,
353,
8840,
836,
8,
341,
57441,
16,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
197,
6878,
716,
284,
8879,
991,
33655,
3622,
11,
330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCacheKVStoreNoNilSet(t *testing.T) {
mem := dbadapter.Store{DB: dbm.NewMemDB()}
st := cachekv.NewStore(mem)
require.Panics(t, func() { st.Set([]byte("key"), nil) }, "setting a nil value should panic")
require.Panics(t, func() { st.Set(nil, []byte("value")) }, "setting a nil key should panic")
require.Pani... | explode_data.jsonl/6648 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 151
} | [
2830,
3393,
8233,
82707,
6093,
2753,
19064,
1649,
1155,
353,
8840,
836,
8,
341,
14145,
1669,
2927,
19731,
38047,
90,
3506,
25,
2927,
76,
7121,
18816,
3506,
23509,
18388,
1669,
60287,
1225,
85,
7121,
6093,
39908,
340,
17957,
1069,
276,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExecutePodCommand(t *testing.T) {
tests := []struct {
name string
containerName string
expectedContainerName string
command []string
errorMode v1.HookErrorMode
expectedErrorMode v1.HookErrorMode
timeout time.Duration
expected... | explode_data.jsonl/62115 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1474
} | [
2830,
3393,
17174,
23527,
4062,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
1698,
914,
198,
197,
53290,
675,
260,
914,
198,
197,
42400,
4502,
675,
914,
198,
197,
45566,
2290,
3056,
917,
198,
197,
18290,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGroupInt8(t *testing.T) {
v := &Value{data: []int8{int8(1), int8(1), int8(1), int8(1), int8(1), int8(1)}}
grouped := v.GroupInt8(func(i int, val int8) string {
return fmt.Sprintf("%v", i%2 == 0)
}).data.(map[string][]int8)
assert.Equal(t, 2, len(grouped))
assert.Equal(t, 3, len(grouped["true"]))
ass... | explode_data.jsonl/23429 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 168
} | [
2830,
3393,
2808,
1072,
23,
1155,
353,
8840,
836,
8,
1476,
5195,
1669,
609,
1130,
90,
691,
25,
3056,
396,
23,
90,
396,
23,
7,
16,
701,
526,
23,
7,
16,
701,
526,
23,
7,
16,
701,
526,
23,
7,
16,
701,
526,
23,
7,
16,
701,
526... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestX(t *testing.T) {
const src = `
package p
func _() {}
`
_, err := format([]byte(src), 0)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/64606 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
55,
1155,
353,
8840,
836,
8,
341,
4777,
2286,
284,
22074,
1722,
281,
198,
2830,
716,
368,
5613,
3989,
197,
6878,
1848,
1669,
3561,
10556,
3782,
14705,
701,
220,
15,
340,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_newCompactionPlanHandler(t *testing.T) {
type args struct {
sessions *SessionManager
cm *ChannelManager
meta *meta
allocator allocator
flush chan UniqueID
}
tests := []struct {
name string
args args
want *compactionPlanHandler
}{
{
"test new handler",
args{
&Se... | explode_data.jsonl/9514 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 401
} | [
2830,
3393,
5921,
13552,
1311,
20485,
3050,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1903,
8551,
220,
353,
5283,
2043,
198,
197,
98316,
286,
353,
9629,
2043,
198,
197,
84004,
414,
353,
5490,
198,
197,
197,
57631,
436... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckIssueWithSig(t *testing.T) {
to, path := createCheckerTestObjects(t)
defer func() {
to.stor.close(t)
err := common.CleanTemporaryDirs(path)
assert.NoError(t, err, "failed to clean test data dirs")
}()
tx := createIssueWithSig(t, 1000)
info := defaultCheckerInfo(t)
_, err := to.tc.checkIssue... | explode_data.jsonl/63078 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 210
} | [
2830,
3393,
3973,
42006,
2354,
47246,
1155,
353,
8840,
836,
8,
341,
31709,
11,
1815,
1669,
1855,
35188,
2271,
11543,
1155,
692,
16867,
2915,
368,
341,
197,
31709,
1236,
269,
4653,
1155,
692,
197,
9859,
1669,
4185,
727,
2675,
59362,
9738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildHostNameForCellDependency(t *testing.T) {
dependencyInst := "mydep"
expected := dependencyInst + "--gateway-service"
actual := BuildHostNameForCellDependency(dependencyInst)
if diff := cmp.Diff(expected, actual); diff != "" {
t.Errorf("BuildHostNameForCellDependency (-expected, +actual)\n%v", diff)
... | explode_data.jsonl/54865 | {
"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,
11066,
85305,
2461,
3599,
36387,
1155,
353,
8840,
836,
8,
341,
197,
53690,
8724,
1669,
330,
2408,
14891,
698,
42400,
1669,
24036,
8724,
488,
14482,
46473,
23461,
698,
88814,
1669,
7854,
85305,
2461,
3599,
36387,
91573,
2251,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestHelmManifestFromChartRepoWithValueFileOutsideRepo(t *testing.T) {
service := newService(".")
source := &argoappv1.ApplicationSource{
Chart: "my-chart",
TargetRevision: ">= 1.0.0",
Helm: &argoappv1.ApplicationSourceHelm{
ValueFiles: []string{"../my-chart-2/my-chart-2-values.yaml"},
},
}
... | explode_data.jsonl/58027 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 209
} | [
2830,
3393,
39,
23162,
38495,
3830,
14488,
25243,
22767,
1703,
41365,
25243,
1155,
353,
8840,
836,
8,
341,
52934,
1669,
501,
1860,
5680,
1138,
47418,
1669,
609,
12088,
676,
85,
16,
17521,
3608,
515,
197,
197,
14488,
25,
688,
330,
2408,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUtime(t *testing.T) {
defer chtmpdir(t)()
touch(t, "file1")
buf := &unix.Utimbuf{
Modtime: 12345,
}
err := unix.Utime("file1", buf)
if err != nil {
t.Fatalf("Utime: %v", err)
}
fi, err := os.Stat("file1")
if err != nil {
t.Fatal(err)
}
if fi.ModTime().Unix() != 12345 {
t.Errorf("Utime: ... | explode_data.jsonl/35459 | {
"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,
52,
1678,
1155,
353,
8840,
836,
8,
341,
16867,
272,
426,
1307,
3741,
1155,
8,
2822,
3244,
3026,
1155,
11,
330,
1192,
16,
5130,
26398,
1669,
609,
56646,
5255,
20091,
5909,
515,
197,
197,
4459,
1678,
25,
220,
16,
17,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_Kafka_Types(t *testing.T) {
var Codec = codec.New()
schema.RegisterCodec(Codec)
sdkTypes.RegisterCodec(Codec)
codec.RegisterCrypto(Codec)
codec.RegisterEvidences(Codec)
vesting.RegisterCodec(Codec)
Codec.Seal()
cliContext := context.NewCLIContext().WithCodec(Codec)
fromAddress := "cosmos1pkkayn066m... | explode_data.jsonl/50594 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 622
} | [
2830,
3393,
10102,
21883,
1139,
1804,
1155,
353,
8840,
836,
8,
1476,
2405,
67077,
284,
34647,
7121,
741,
1903,
3416,
19983,
36913,
7,
36913,
340,
1903,
7584,
4173,
19983,
36913,
7,
36913,
340,
43343,
66,
19983,
58288,
7,
36913,
340,
433... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSubscriptionPanicOnUndefinedResponseType(t *testing.T) {
defer func() {
if r := recover(); r != nil {
assert.Equal(t, "Undefined response type: 0", r)
}
}()
event := connectionEvent{}
event.Bytes()
} | explode_data.jsonl/58988 | {
"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,
33402,
47,
31270,
1925,
30571,
53388,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
368,
341,
197,
743,
435,
1669,
11731,
2129,
435,
961,
2092,
341,
298,
6948,
12808,
1155,
11,
330,
30571,
2033,
943,
25,
220,
15,
497,
435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildConfigNoOutput(t *testing.T) {
url, err := url.Parse("https://github.com/openshift/origin.git")
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
source := &SourceRef{URL: url}
build := &BuildRef{Source: source}
config, err := build.BuildConfig()
if err != nil {
t.Fatalf("unexpected error... | explode_data.jsonl/23738 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
11066,
2648,
2753,
5097,
1155,
353,
8840,
836,
8,
341,
19320,
11,
1848,
1669,
2515,
8937,
445,
2428,
1110,
5204,
905,
14,
24175,
47833,
14,
8611,
32799,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
53859,
1465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateAgent_Http_NormalUserExistWithName(t *testing.T) {
tc := testutils.Setup(t)
testutils.LoadFixtures(t, tc.FixturePath())
// user with agent:create scope
user, accessToken, err := tc.UserWithScopes("foo", "agent:create")
assert.Equal(t, user.GithubLogin, "foo")
assert.NoError(t, err)
// Mocks the ... | explode_data.jsonl/9417 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 347
} | [
2830,
3393,
4289,
16810,
2039,
1209,
74900,
1474,
25613,
54523,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
1273,
6031,
39820,
1155,
340,
18185,
6031,
13969,
25958,
18513,
1155,
11,
17130,
991,
12735,
1820,
12367,
197,
322,
1196,
448,
8315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetWithScalars(t *testing.T) {
assertParseOneTerm(t, "number", "{1,2,3,4.5}", SetTerm(IntNumberTerm(1), IntNumberTerm(2), IntNumberTerm(3), FloatNumberTerm(4.5)))
assertParseOneTerm(t, "bool", "{true, false, true}", SetTerm(BooleanTerm(true), BooleanTerm(false), BooleanTerm(true)))
assertParseOneTerm(t, "st... | explode_data.jsonl/50459 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 367
} | [
2830,
3393,
1649,
2354,
54005,
1155,
353,
8840,
836,
8,
341,
6948,
14463,
3966,
17249,
1155,
11,
330,
4082,
497,
13868,
16,
11,
17,
11,
18,
11,
19,
13,
20,
9545,
2573,
17249,
24123,
2833,
17249,
7,
16,
701,
1333,
2833,
17249,
7,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_AddPodToVolume_Positive_ExistingVolumeNewNode(t *testing.T) {
// Arrange
volumePluginMgr, plugin := volumetesting.GetTestVolumePluginMgr(t)
asw := NewActualStateOfWorld("mynode" /* nodeName */, volumePluginMgr)
devicePath := "fake/device/path"
pod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "p... | explode_data.jsonl/28879 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 812
} | [
2830,
3393,
21346,
23527,
1249,
18902,
44246,
3404,
62,
53067,
18902,
3564,
1955,
1155,
353,
8840,
836,
8,
341,
197,
322,
40580,
198,
5195,
4661,
11546,
25567,
11,
9006,
1669,
62820,
57824,
287,
2234,
2271,
18902,
11546,
25567,
1155,
340,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestGenesisBad(t *testing.T) {
// test some bad ones from raw json
testCases := [][]byte{
{}, // empty
{1, 1, 1, 1, 1}, // junk
[]byte(`{}`), // empty
[]byte(`{"chain_id":"mychain","validators":[{}]}`), // invalid validator
[]byte(`{"chain_id":"chain","initial_height":"-1"}`), // nega... | explode_data.jsonl/61609 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 675
} | [
2830,
3393,
84652,
17082,
1155,
353,
8840,
836,
8,
341,
197,
322,
1273,
1045,
3873,
6174,
504,
7112,
2951,
198,
18185,
37302,
1669,
52931,
3782,
515,
197,
197,
22655,
1060,
442,
4287,
198,
197,
197,
90,
16,
11,
220,
16,
11,
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,
1,
1,
1,
1,
1... | 2 |
func TestHelmManifestFromChartRepoWithValueFileLinks(t *testing.T) {
t.Run("Valid symlink", func(t *testing.T) {
service := newService("../..")
source := &argoappv1.ApplicationSource{
Chart: "my-chart",
TargetRevision: ">= 1.0.0",
Helm: &argoappv1.ApplicationSourceHelm{
ValueFiles: []string{"... | explode_data.jsonl/5679 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 450
} | [
2830,
3393,
39,
23162,
38495,
3830,
14488,
25243,
22767,
1703,
24089,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
4088,
83221,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
52934,
1669,
501,
1860,
17409,
496,
1138,
197,
47418,
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 TestOneNodeDaemonLaunchesPod(t *testing.T) {
forEachStrategy(t, func(t *testing.T, strategy *apps.DaemonSetUpdateStrategy) {
closeFn, dc, informers, clientset := setup(t)
defer closeFn()
ns := framework.CreateNamespaceOrDie(clientset, "one-node-daemonset-test", t)
defer framework.DeleteNamespaceOrDie(clie... | explode_data.jsonl/70039 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 511
} | [
2830,
3393,
3966,
1955,
89177,
32067,
288,
23527,
1155,
353,
8840,
836,
8,
341,
2023,
4854,
19816,
1155,
11,
2915,
1155,
353,
8840,
836,
11,
8282,
353,
27635,
909,
64,
7291,
1649,
4289,
19816,
8,
341,
197,
27873,
24911,
11,
19402,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRoaringPostingsAddIterator(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
first := NewPostingsList()
postingsIter := postings.NewMockIterator(mockCtrl)
gomock.InOrder(
postingsIter.EXPECT().Next().Return(true),
postingsIter.EXPECT().Current().Return(postings.ID(42)),
p... | explode_data.jsonl/64026 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 332
} | [
2830,
3393,
38872,
3249,
4133,
819,
2212,
11951,
1155,
353,
8840,
836,
8,
341,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
7860,
15001,
991,
18176,
2822,
42190,
1669,
1532,
4133,
819,
852,
2822,
51172,
819,
8537,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRefSerialization(t *testing.T) {
for _, x := range []struct {
test Ref
expected string
}{
{Ref{Name: Name{Image: "alpine"}, Tag: "a123"}, `"alpine:a123"`},
{Ref{Name: Name{Domain: "quay.io", Image: "weaveworks/foobar"}, Tag: "baz"}, `"quay.io/weaveworks/foobar:baz"`},
} {
serialized, err := js... | explode_data.jsonl/60185 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 350
} | [
2830,
3393,
3945,
35865,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
856,
1669,
2088,
3056,
1235,
341,
197,
18185,
257,
8550,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
90,
3945,
63121,
25,
3988,
90,
1906,
25,
330,
278,
38038,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapProxy_Clear(t *testing.T) {
testKey := "testingKey1"
testValue := "testingValue"
mp.Put(testKey, testValue)
err := mp.Clear()
if err != nil {
t.Fatal(err)
} else {
size, err := mp.Size()
AssertEqualf(t, err, size, int32(0), "Map clear failed.")
}
} | explode_data.jsonl/56980 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 115
} | [
2830,
3393,
2227,
16219,
57744,
1155,
353,
8840,
836,
8,
341,
18185,
1592,
1669,
330,
8840,
1592,
16,
698,
18185,
1130,
1669,
330,
8840,
1130,
698,
53230,
39825,
8623,
1592,
11,
1273,
1130,
340,
9859,
1669,
10490,
13524,
741,
743,
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 TestInitializeBootstrapChannel(t *testing.T) {
cleanup := configtest.SetDevFabricConfigPath(t)
defer cleanup()
genesisFile := produceGenesisFile(t, genesisconfig.SampleSingleMSPSoloProfile, "testchannelid")
defer os.Remove(genesisFile)
fileLedgerLocation, _ := ioutil.TempDir("", "main_test-")
defer os.Remo... | explode_data.jsonl/32650 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 332
} | [
2830,
3393,
9928,
45511,
9629,
1155,
353,
8840,
836,
8,
341,
1444,
60639,
1669,
2193,
1944,
4202,
14592,
81731,
2648,
1820,
1155,
340,
16867,
21290,
2822,
82281,
13774,
1703,
1669,
8193,
84652,
1703,
1155,
11,
59366,
1676,
76266,
10888,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRemittanceOriginatorIdentificationNumberIssuerInvalid_IdentificationNumber(t *testing.T) {
ro := mockRemittanceOriginator()
ro.IdentificationNumber = ""
ro.IdentificationNumberIssuer = "zz"
err := ro.Validate()
require.EqualError(t, err, fieldError("IdentificationNumberIssuer", ErrInvalidProperty, ro.Id... | explode_data.jsonl/32948 | {
"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,
6590,
87191,
13298,
850,
95212,
2833,
98902,
7928,
21576,
306,
2404,
2833,
1155,
353,
8840,
836,
8,
341,
197,
299,
1669,
7860,
6590,
87191,
13298,
850,
741,
197,
299,
6444,
306,
2404,
2833,
284,
8389,
197,
299,
6444,
306,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMainFatalWriter(t *testing.T) {
assert := assert.New(t)
const cmd = "foo"
const msg = "moo FAILURE"
// create buffer to save logger output
buf := &bytes.Buffer{}
savedBefore := runtimeBeforeSubcommands
savedLogOutput := kataLog.Logger.Out
savedCLIExiter := cli.OsExiter
savedCommands := runtimeComma... | explode_data.jsonl/52206 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 406
} | [
2830,
3393,
6202,
62396,
6492,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
4777,
5439,
284,
330,
7975,
698,
4777,
3750,
284,
330,
76,
2624,
64024,
1837,
197,
322,
1855,
4147,
311,
3581,
5925,
2550,
198,
26398,
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... | 1 |
func TestJson2Struct_slice_int(t *testing.T) {
ret, err := Json2Struct("auto_name", "[1,2,3,42]", GoStructType)
fmt.Printf("ret:\n %s, %v\n", ret, err)
} | explode_data.jsonl/72749 | {
"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,
5014,
17,
9422,
26488,
4042,
1155,
353,
8840,
836,
8,
341,
11262,
11,
1848,
1669,
8308,
17,
9422,
445,
3902,
1269,
497,
10545,
16,
11,
17,
11,
18,
11,
19,
17,
19076,
5994,
9422,
929,
340,
11009,
19367,
445,
2122,
7190,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_validator_ValidateConfiguration(t *testing.T) {
t.Parallel()
secret := &v1.Secret{}
secret.StringData = make(map[string]string)
secret.StringData["username"] = "user"
secret.StringData["password"] = "password"
secret.StringData["endpoint"] = "endpoint"
t.Run("successful validation", func(t *testing.T... | explode_data.jsonl/75149 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2516
} | [
2830,
3393,
64959,
62,
17926,
7688,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
20474,
1669,
609,
85,
16,
74779,
16094,
197,
20474,
6431,
1043,
284,
1281,
9147,
14032,
30953,
340,
197,
20474,
6431,
1043,
1183,
5113,
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 TestIgnoredFiles(t *testing.T) {
const ws = `
-- go.mod --
module mod.com
go 1.15
-- _foo/x.go --
package x
var _ = foo.Bar
`
runner.Run(t, ws, func(t *testing.T, env *Env) {
env.OpenFile("_foo/x.go")
env.Await(
OnceMet(
CompletedWork(lsp.DiagnosticWorkTitle(lsp.FromDidOpen), 1),
NoDiagnostics("... | explode_data.jsonl/38928 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 167
} | [
2830,
3393,
43337,
3018,
10809,
1155,
353,
8840,
836,
8,
341,
4777,
17624,
284,
22074,
313,
728,
10929,
39514,
4352,
1463,
905,
271,
3346,
220,
16,
13,
16,
20,
198,
313,
716,
7975,
10776,
18002,
39514,
1722,
856,
271,
947,
716,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestErrors(t *testing.T) {
testCases := []struct {
name string
values string
want error
}{
{"EC1", "not good", AppError(EC1)},
}
testData := []*myErrors.Error{
{
Id: "mkit.service.account",
Code: 422,
Detail: "proto validation: sumo-val-error",
Status: http.StatusText(422),
}... | explode_data.jsonl/30317 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 789
} | [
2830,
3393,
13877,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
45939,
914,
198,
197,
50780,
256,
1465,
198,
197,
59403,
197,
197,
4913,
7498,
16,
497,
330,
1921,
1661,
497,
1845,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestToWeirdCase(t *testing.T) {
t0 := toWeirdCase("abc def")
e0 := "AbC DeF"
if t0 != e0 {
t.Errorf("for %s, expected: %s, got %s", "abc def", "AbC DeF", e0)
}
t0 = toWeirdCase("ABC")
e0 = "AbC"
if t0 != e0 {
t.Errorf("for %s, expected: %s, got %s", "ABC", "AbC", e0)
}
t0 = toWeirdCase("This is a t... | explode_data.jsonl/81145 | {
"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,
1249,
1654,
2603,
4207,
1155,
353,
8840,
836,
8,
1476,
3244,
15,
1669,
311,
1654,
2603,
4207,
445,
13683,
707,
1138,
7727,
15,
1669,
330,
5830,
34,
1581,
37,
698,
743,
259,
15,
961,
384,
15,
341,
197,
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... | 4 |
func TestGocloak_GetToken(t *testing.T) {
t.Parallel()
cfg := GetConfig(t)
client := NewClientWithDebug(t)
SetUpTestUser(t, client)
newToken, err := client.GetToken(
cfg.GoCloak.Realm,
TokenOptions{
ClientID: cfg.GoCloak.ClientID,
ClientSecret: cfg.GoCloak.ClientSecret,
Username: cfg.GoCloa... | explode_data.jsonl/79518 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 318
} | [
2830,
3393,
38,
509,
385,
585,
13614,
3323,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50286,
1669,
2126,
2648,
1155,
340,
25291,
1669,
1532,
2959,
2354,
7939,
1155,
340,
22212,
2324,
2271,
1474,
1155,
11,
2943,
340,
8638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMachineSetToDeployments(t *testing.T) {
machineDeployment := v1alpha1.MachineDeployment{
ObjectMeta: metav1.ObjectMeta{
Name: "withMatchingLabels",
Namespace: "test",
},
Spec: v1alpha1.MachineDeploymentSpec{
Selector: metav1.LabelSelector{
MatchLabels: map[string]string{
"foo": ... | explode_data.jsonl/72976 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1228
} | [
2830,
3393,
21605,
1649,
1249,
69464,
1368,
1155,
353,
8840,
836,
8,
341,
2109,
3814,
75286,
1669,
348,
16,
7141,
16,
1321,
3814,
75286,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
414,
330,
4197,
64430,
23674,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetContainerInPod(t *testing.T) {
expectedName := "mycontainer"
imageName := "myimage"
// no container fails
container, err := GetMatchingContainer([]v1.Container{}, expectedName)
assert.NotNil(t, err)
// one container will allow any name
container, err = GetMatchingContainer([]v1.Container{{Name: "fo... | explode_data.jsonl/9464 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 301
} | [
2830,
3393,
1949,
4502,
641,
23527,
1155,
353,
8840,
836,
8,
341,
42400,
675,
1669,
330,
2408,
3586,
698,
31426,
675,
1669,
330,
2408,
1805,
1837,
197,
322,
902,
5476,
14525,
198,
53290,
11,
1848,
1669,
2126,
64430,
4502,
10556,
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,
1... | 1 |
func TestClient_Servers(t *testing.T) {
var err error
var tv *Version
record(t, "servers/version", func(c *Client) {
tv = testVersion(t, c)
})
testPool := createTestPool(t, "servers/create_pool", testServiceID, tv.Number, "servers22")
// Create
var server *Server
var altServer *Server
record(t, "servers/cr... | explode_data.jsonl/8318 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1292
} | [
2830,
3393,
2959,
1098,
18729,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
2405,
11086,
353,
5637,
198,
71952,
1155,
11,
330,
67696,
64413,
497,
2915,
1337,
353,
2959,
8,
341,
197,
92810,
284,
1273,
5637,
1155,
11,
272,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestValidateV1Beta1InvalidYAML(t *testing.T) {
manifest := `---
invalidyaml
`
_, err := Validate(manifest)
if err == nil || err.Error() != "could not parse the manifest as yaml to retrieve the apiVersion" {
t.Errorf("Didn't get expected error from manifest.TestValidateV1Beta1InvalidYAML(), instead got: %s", ... | explode_data.jsonl/80474 | {
"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,
17926,
53,
16,
64811,
16,
7928,
56,
31102,
1155,
353,
8840,
836,
8,
341,
197,
42315,
1669,
1565,
10952,
11808,
41466,
198,
197,
3989,
197,
6878,
1848,
1669,
23282,
60671,
6962,
340,
743,
1848,
621,
2092,
1369,
1848,
6141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCreateDevice(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
th.Mux.HandleFunc("/API/SoEntryFGHA", func(w http.ResponseWriter, r *http.Request) {
th.TestMethod(t, r, "POST")
th.TestHeader(t, r, "X-Auth-Token", fakeclient.TokenID)
th.TestJSONRequest(t, r, createRequest)
w.WriteHeader(http.St... | explode_data.jsonl/45985 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 834
} | [
2830,
3393,
4021,
6985,
1155,
353,
8840,
836,
8,
341,
70479,
39820,
9230,
741,
16867,
270,
94849,
37496,
9230,
2822,
70479,
1321,
2200,
63623,
4283,
7082,
14,
4416,
5874,
12001,
17020,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseFileError(t *testing.T) {
p := NewParser(nil)
err := p.ParseFile("testdata/__no_such_file")
if err == nil {
t.Errorf("an error was expected, got none")
}
} | explode_data.jsonl/49358 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 71
} | [
2830,
3393,
14463,
1703,
1454,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1532,
6570,
27907,
340,
9859,
1669,
281,
8937,
1703,
445,
92425,
79463,
2152,
643,
1387,
2458,
1138,
743,
1848,
621,
2092,
341,
197,
3244,
13080,
445,
276,
1465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test4(t *testing.T) {
for i := 0; i < 100; i++ {
fmt.Println(base64.StdEncoding.EncodeToString([]byte(convert.IntToStr(i))))
}
} | explode_data.jsonl/22071 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
19,
1155,
353,
8840,
836,
8,
341,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
15,
26,
600,
1027,
341,
197,
11009,
12419,
12663,
21,
19,
36086,
14690,
50217,
5870,
10556,
3782,
60808,
7371,
67557,
1956,
22788,
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
] | 2 |
func Test_ParseCore(t *testing.T) {
app := ctl.NewApplication("test", "A test command-line tool").Terminate(nil)
//app.UsageWriter(os.Stderr)
cli := ctl.NewControl(&ctl.ControlDefinition{
App: app,
Output: os.Stdout,
ErrOutput: os.Stderr,
})
app.Command("foo", "foo description")
app.Command("bar"... | explode_data.jsonl/6329 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 656
} | [
2830,
3393,
77337,
5386,
1155,
353,
8840,
836,
8,
341,
28236,
1669,
64935,
7121,
4988,
445,
1944,
497,
330,
32,
1273,
3210,
8447,
5392,
1827,
62519,
27907,
340,
197,
322,
676,
85900,
6492,
9638,
77319,
692,
86448,
1669,
64935,
7121,
327... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCronFunc(t *testing.T) {
assert.NotPanics(t, func() {
var calls = 0
mjob, _ := CronFunc("* * * * * *", func() { calls++ }, nil)
defer mjob.Cancel()
<-time.After(time.Second + 100*time.Nanosecond)
if calls != 1 {
t.Errorf("called %d times, expected 1\n", calls)
}
})
} | explode_data.jsonl/56061 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
34,
2248,
9626,
1155,
353,
8840,
836,
8,
341,
6948,
15000,
35693,
1211,
1155,
11,
2915,
368,
341,
197,
2405,
6738,
284,
220,
15,
198,
197,
2109,
8799,
11,
716,
1669,
55817,
9626,
29592,
353,
353,
353,
353,
353,
497,
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 TestCommandLine_CheckLoggedIn(t *testing.T) {
options := server.Options{}.WithAuth(true).WithInMemoryStore(true).WithAdminPassword(auth.SysAdminPassword)
bs := servertest.NewBufconnServer(options)
bs.Start()
cl := commandline{}
cmd, _ := cl.NewCmd()
cl.context = context.Background()
cl.passwordReader = pwR... | explode_data.jsonl/54120 | {
"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,
71885,
28188,
28559,
1155,
353,
8840,
836,
8,
341,
35500,
1669,
3538,
22179,
46391,
2354,
5087,
3715,
568,
2354,
641,
10642,
6093,
3715,
568,
2354,
7210,
4876,
27435,
59418,
7210,
4876,
340,
93801,
1669,
1420,
1621,
477,
7121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEmptyUsername(t *testing.T) {
db := Init(test_host, test_coll)
defer db.del()
tAddUser(t, db)
if db.User("").Valid(pass) {
t.Errorf("user.Valid() return true for an invalid user")
}
} | explode_data.jsonl/65263 | {
"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,
3522,
11115,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
15690,
8623,
12848,
11,
1273,
43597,
340,
16867,
2927,
33012,
2822,
3244,
2212,
1474,
1155,
11,
2927,
340,
743,
2927,
7344,
80821,
4088,
39790,
8,
341,
197,
3244,
13080... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenBankIO(t *testing.T) {
files := []string{
"NC_001422.gb",
"NC_000913.3.min.gb",
}
for _, file := range files {
in := testutils.ReadTestfile(t, file)
state := pars.FromString(in)
parser := pars.AsParser(GenBankParser)
result, err := parser.Parse(state)
if err != nil {
t.Errorf("in file %... | explode_data.jsonl/6540 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 290
} | [
2830,
3393,
9967,
25828,
3810,
1155,
353,
8840,
836,
8,
341,
74075,
1669,
3056,
917,
515,
197,
197,
1,
9949,
62,
15,
15,
16,
19,
17,
17,
77262,
756,
197,
197,
1,
9949,
62,
15,
15,
15,
24,
16,
18,
13,
18,
4358,
77262,
756,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_Cache1(t *testing.T) {
var fn, fs, ca, original string
fn = "./test.txt"
Write(fn, "\nFoobar\n", true)
Reset()
Write(fn, "\nFoobar\n", true)
Write(fn, "\nFoobar\n", true)
fs, _ = file.Read(fn)
ca, _ = Read(fn)
original = fs
if fs == ca {
t.Fatalf("CachedFile Test 1 failed")
}
Stop()
fs, _... | explode_data.jsonl/63481 | {
"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,
920,
1777,
16,
1155,
353,
8840,
836,
8,
341,
2405,
5168,
11,
8619,
11,
2162,
11,
4024,
914,
271,
40095,
284,
5924,
1944,
3909,
1837,
60373,
24008,
11,
2917,
77,
91879,
31393,
1699,
497,
830,
340,
197,
14828,
741,
60373,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFlipManagerChannelFlip(t *testing.T) {
// ensure only members of a channel are included in the flip
runWithMemberTypes(t, func(mt chat1.ConversationMembersType) {
switch mt {
case chat1.ConversationMembersType_TEAM:
default:
return
}
ctc := makeChatTestContext(t, "FlipManagerChannelFlip", 3)
d... | explode_data.jsonl/51273 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1411
} | [
2830,
3393,
46808,
2043,
9629,
46808,
1155,
353,
8840,
836,
8,
341,
197,
322,
5978,
1172,
3613,
315,
264,
5496,
525,
5230,
304,
279,
18287,
198,
56742,
2354,
9366,
4173,
1155,
11,
2915,
81618,
6236,
16,
4801,
22323,
24371,
929,
8,
341... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestLastLineShort(t *testing.T) {
filename, err := fs.TempFilenameWithText(shortText)
assert.Nil(t, err)
defer os.Remove(filename)
val, err := LastLine(filename)
assert.Nil(t, err)
assert.Equal(t, "last line", val)
} | explode_data.jsonl/37837 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 89
} | [
2830,
3393,
5842,
2460,
12472,
1155,
353,
8840,
836,
8,
341,
66434,
11,
1848,
1669,
8619,
65009,
20759,
2354,
1178,
37890,
1178,
340,
6948,
59678,
1155,
11,
1848,
340,
16867,
2643,
13270,
10961,
692,
19302,
11,
1848,
1669,
7996,
2460,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBaremetalHostsSortByRole(t *testing.T) {
cases := []struct {
name string
hosts []*baremetal.Host
expectedHosts []string
}{
{
name: "default",
hosts: []*baremetal.Host{
{Name: "master-0", Role: "master"},
{Name: "master-1", Role: "master"},
{Name: "master-2", Role: "... | explode_data.jsonl/71473 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 965
} | [
2830,
3393,
33,
546,
54008,
9296,
82,
10231,
1359,
9030,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
197,
44692,
260,
29838,
54102,
54008,
29840,
198,
197,
42400,
9296,
82,
3056,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestResolveReferencesNoClusterServiceClass(t *testing.T) {
fakeKubeClient, fakeCatalogClient, _, testController, _ := newTestController(t, noFakeActions())
instance := getTestServiceInstance()
modified, err := testController.resolveReferences(instance)
if err == nil {
t.Fatalf("Should have failed with no s... | explode_data.jsonl/58185 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 639
} | [
2830,
3393,
56808,
31712,
2753,
28678,
1860,
1957,
1155,
353,
8840,
836,
8,
341,
1166,
726,
42,
3760,
2959,
11,
12418,
41606,
2959,
11,
8358,
1273,
2051,
11,
716,
1669,
501,
2271,
2051,
1155,
11,
902,
52317,
12948,
12367,
56256,
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... | 8 |
func TestCallback(t *testing.T) {
policy := newRetryPolicy()
called := false
policy.ingest(&retryPolicyRequest{
data: []byte("tes"),
ingestionURL: "http://google.com",
httpRequest: func(data []byte, ingestionURL string) error {
return nil
},
callback: func(err error) {
called = true
},
})... | explode_data.jsonl/40706 | {
"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,
7494,
1155,
353,
8840,
836,
8,
341,
3223,
8018,
1669,
501,
51560,
13825,
2822,
1444,
4736,
1669,
895,
198,
3223,
8018,
13,
287,
477,
2099,
44848,
13825,
1900,
515,
197,
8924,
25,
260,
3056,
3782,
445,
2338,
4461,
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 TestTTLStrategyFailed(t *testing.T) {
var err error
var un *unstructured.Unstructured
var ten int32 = 10
controller := newTTLController()
// Veirfy we do not enqueue if not completed
wf := test.LoadWorkflowFromBytes([]byte(failedWf))
wf.Spec.TTLStrategy = &wfv1.TTLStrategy{SecondsAfterFailure: &ten}
wf.S... | explode_data.jsonl/48743 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 349
} | [
2830,
3393,
51,
13470,
19816,
9408,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
2405,
650,
353,
359,
51143,
10616,
51143,
198,
2405,
5779,
526,
18,
17,
284,
220,
16,
15,
271,
61615,
1669,
501,
51,
13470,
2051,
2822,
197,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRouterMixedParams(t *testing.T) {
api := []*Route{
{http.MethodGet, "/teacher/:tid/room/suggestions", ""},
{http.MethodGet, "/teacher/:id", ""},
}
testRouterAPI(t, api)
api2 := []*Route{
{http.MethodGet, "/teacher/:id", ""},
{http.MethodGet, "/teacher/:tid/room/suggestions", ""},
}
testRouterAPI(... | explode_data.jsonl/47135 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
9523,
86433,
4870,
1155,
353,
8840,
836,
8,
341,
54299,
1669,
29838,
4899,
515,
197,
197,
90,
1254,
20798,
1949,
11,
3521,
23360,
11315,
24449,
14,
2966,
2687,
37882,
497,
77496,
197,
197,
90,
1254,
20798,
1949,
11,
3521,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteRef(t *testing.T) {
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodDelete {
t.Errorf("Bad method: %s", r.Method)
}
if r.URL.Path != "/repos/k8s/kuber/git/refs/heads/my-feature" {
t.Errorf("Bad request path: %s", r.URL.Pat... | explode_data.jsonl/6256 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
6435,
3945,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
13470,
1220,
2836,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
743,
435,
20798,
961,
1758,
20798,
6435,
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... | 3 |
func TestResourcePermissionsCreate_NotebookPath_NotExists(t *testing.T) {
_, err := qa.ResourceFixture{
Fixtures: []qa.HTTPFixture{
{
Method: http.MethodGet,
Resource: "/api/2.0/workspace/get-status?path=%2FDevelopment%2FInit",
Response: common.APIErrorBody{
ErrorCode: "INVALID_REQUEST",
M... | explode_data.jsonl/50882 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 308
} | [
2830,
3393,
4783,
23851,
4021,
1604,
1272,
2190,
1820,
60816,
15575,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
88496,
20766,
18930,
515,
197,
12727,
941,
18513,
25,
3056,
15445,
27358,
18930,
515,
298,
197,
515,
571,
84589,
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 TestShutdownMultipleErrors(t *testing.T) {
f := newFixture(t)
shutdownErrs := []error{errors.New("err1"), nil, errors.New("err3")}
// Add mock httpListeners to the server
for _, err := range shutdownErrs {
m := &mockHTTPListener{}
if err != nil {
retVal := errors.New(err.Error())
m.ShutdownHook = f... | explode_data.jsonl/79036 | {
"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,
62004,
32089,
13877,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
692,
36196,
18452,
7747,
82,
1669,
3056,
841,
90,
7650,
7121,
445,
615,
16,
3975,
2092,
11,
5975,
7121,
445,
615,
18,
899,
630,
197,
322,
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 TestEnsureRemoveAllWithFile(t *testing.T) {
tmp, err := os.CreateTemp("", "test-ensure-removeall-with-dir")
if err != nil {
t.Fatal(err)
}
tmp.Close()
if err := ensureRemoveAll(context.Background(), tmp.Name()); err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/8832 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 103
} | [
2830,
3393,
64439,
13021,
2403,
2354,
1703,
1155,
353,
8840,
836,
8,
341,
20082,
11,
1848,
1669,
2643,
7251,
12151,
19814,
330,
1944,
12,
27289,
48625,
541,
26189,
45283,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
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... | 3 |
func TestIncompatibleMemoryStorageForProduction(t *testing.T) {
jaeger := &v1.Jaeger{
Spec: v1.JaegerSpec{
Strategy: v1.DeploymentStrategyProduction,
Storage: v1.JaegerStorageSpec{
Type: "memory",
},
},
}
normalize(context.Background(), jaeger)
assert.Equal(t, v1.DeploymentStrategyAllInOne, jaeger.... | explode_data.jsonl/21847 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
641,
34842,
10642,
5793,
2461,
44967,
1155,
353,
8840,
836,
8,
341,
197,
5580,
1878,
1669,
609,
85,
16,
3503,
64,
1878,
515,
197,
7568,
992,
25,
348,
16,
3503,
64,
1878,
8327,
515,
298,
197,
19816,
25,
348,
16,
34848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSegmentMerging(t *testing.T) {
tests := []struct {
name string
stop func(tcpip.Endpoint)
resume func(tcpip.Endpoint)
}{
{
"stop work",
func(ep tcpip.Endpoint) {
ep.(interface{ StopWork() }).StopWork()
},
func(ep tcpip.Endpoint) {
ep.(interface{ ResumeWork() }).ResumeWork()
... | explode_data.jsonl/22296 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 925
} | [
2830,
3393,
21086,
44,
95296,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
62644,
256,
2915,
98203,
573,
90409,
340,
197,
10202,
3885,
2915,
98203,
573,
90409,
340,
197,
59403,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGormDBCreateGroupTwice(t *testing.T) {
db, cleanup := qtest.TestDB(t)
defer cleanup()
admin := qtest.CreateFakeUser(t, db, 10)
course := &pb.Course{}
qtest.CreateCourse(t, db, admin, course)
var users []*pb.User
enrollments := []pb.Enrollment_UserStatus{pb.Enrollment_STUDENT, pb.Enrollment_STUDENT}
/... | explode_data.jsonl/13562 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 605
} | [
2830,
3393,
38,
493,
3506,
4021,
2808,
22816,
558,
1155,
353,
8840,
836,
8,
341,
20939,
11,
21290,
1669,
2804,
1944,
8787,
3506,
1155,
340,
16867,
21290,
2822,
64394,
1669,
2804,
1944,
7251,
52317,
1474,
1155,
11,
2927,
11,
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,
1,
1,
1,
1,
1,
1... | 8 |
func TestEnvVarVersion(t *testing.T) {
for _, format := range formats {
format := format
t.Run(fmt.Sprintf("amd64-%s", format), func(t *testing.T) {
os.Setenv("SEMVER", "v1.0.0-0.1.b1+git.abcdefgh")
accept(t, acceptParms{
Name: fmt.Sprintf("env-var-version_%s", format),
Conf: "env-var-ver... | explode_data.jsonl/15458 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
14359,
3962,
5637,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
3561,
1669,
2088,
19856,
341,
197,
59416,
1669,
3561,
198,
197,
3244,
16708,
28197,
17305,
445,
67913,
21,
19,
11069,
82,
497,
3561,
701,
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... | 1 |
func TestLoadConfigFrom_IgnoresMainConfigFileIfMissing(t *testing.T) {
assert := assertlib.New(t)
appenv.SetDefaultEnvToTest() // to ensure it tries to find the config.test file
// create a temp config file
tmpFile, deferFunc := createTmpFile("config-*.test.yaml", assert)
defer deferFunc()
fileName := filepath.... | explode_data.jsonl/61934 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 164
} | [
2830,
3393,
5879,
2648,
3830,
7959,
70,
2152,
416,
6202,
2648,
1703,
2679,
25080,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
2740,
7121,
1155,
340,
28236,
3160,
4202,
3675,
14359,
1249,
2271,
368,
442,
311,
5978,
432,
16297,
311,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetName(t *testing.T) {
testCases := []struct {
desc string
cookieName string
backendName string
expectedCookieName string
}{
{
desc: "with backend name, without cookie name",
cookieName: "",
backendName: "/my/BACKEND-v1.0~rc1",
... | explode_data.jsonl/58887 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 475
} | [
2830,
3393,
49403,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
2290,
914,
198,
197,
197,
16236,
675,
260,
914,
198,
197,
197,
20942,
675,
286,
914,
198,
197,
42400,
20616,
675,
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 |
func TestListGatewayResourceType(t *testing.T) {
g := NewWithT(t)
clientSet := kube.NewFakeClient()
store := memory.NewController(memory.Make(collections.All))
controller := NewController(clientSet, store, controller2.Options{})
gwClassType := collections.K8SServiceApisV1Alpha1Gatewayclasses.Resource()
gwSpecTy... | explode_data.jsonl/61230 | {
"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,
852,
40709,
4783,
929,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
2354,
51,
1155,
692,
25291,
1649,
1669,
80958,
7121,
52317,
2959,
741,
57279,
1669,
4938,
7121,
2051,
63230,
50133,
1337,
3107,
16764,
1171,
61615,
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... | 3 |
func TestPopulateSubjectFromCSR(t *testing.T) {
// a subject with all its fields full.
fullSubject := &signer.Subject{
CN: "CN",
Names: []csr.Name{
{
C: "C",
ST: "ST",
L: "L",
O: "O",
OU: "OU",
},
},
SerialNumber: "deadbeef",
}
fullName := pkix.Name{
CommonName: "Comm... | explode_data.jsonl/71282 | {
"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,
11598,
6334,
13019,
3830,
70022,
1155,
353,
8840,
836,
8,
341,
197,
322,
264,
3832,
448,
678,
1181,
5043,
2480,
624,
94042,
13019,
1669,
609,
7752,
261,
57388,
515,
197,
6258,
45,
25,
330,
28668,
756,
197,
197,
7980,
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... | 7 |
func TestGameScriptWinO(t *testing.T) {
script := []tttPb.MoveTrxPayload{
{Position: 0, Mark: tttPb.Mark_X},
{Position: 1, Mark: tttPb.Mark_O},
{Position: 4, Mark: tttPb.Mark_X},
{Position: 8, Mark: tttPb.Mark_O},
{Position: 3, Mark: tttPb.Mark_X},
{Position: 5, Mark: tttPb.Mark_O},
{Position: 7, Mark: t... | explode_data.jsonl/67452 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 248
} | [
2830,
3393,
4868,
5910,
16970,
46,
1155,
353,
8840,
836,
8,
341,
86956,
1669,
3056,
5566,
83,
47,
65,
31195,
1282,
87,
29683,
515,
197,
197,
90,
3812,
25,
220,
15,
11,
4389,
25,
259,
5566,
47,
65,
75888,
6859,
1583,
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... | 2 |
func TestContainingPackage(t *testing.T) {
// unvirtualized:
goroot := runtime.GOROOT()
gopath := gopathContainingTools(t)
type Test struct {
gopath, filename, wantPkg string
}
tests := []Test{
{gopath, goroot + "/src/fmt/print.go", "fmt"},
{gopath, goroot + "/src/encoding/json/foo.go", "encoding/json"},
... | explode_data.jsonl/27876 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 739
} | [
2830,
3393,
86641,
13100,
1155,
353,
8840,
836,
8,
341,
197,
322,
650,
25668,
1506,
510,
3174,
269,
1905,
1669,
15592,
1224,
868,
53837,
741,
3174,
35111,
1669,
342,
35111,
86641,
16583,
1155,
692,
13158,
3393,
2036,
341,
197,
3174,
351... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateNonce(t *testing.T) {
expect := []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
tmp := []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
assert.Equal(t, expect, generateNonce(tmp, 0))
expect = []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x... | explode_data.jsonl/16992 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 506
} | [
2830,
3393,
31115,
90528,
1155,
353,
8840,
836,
8,
341,
24952,
1669,
3056,
3782,
90,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
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 TestUpdateInterval(t *testing.T) {
tests := []struct {
name string
request *http.Request
dbMock interfaces.DBClient
scClient interfaces.SchedulerQueueClient
expectedStatus int
}{
{
name: "OK",
request: createRequestIntervalUpdate(intervalForAdd),
... | explode_data.jsonl/51571 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1208
} | [
2830,
3393,
4289,
10256,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
23555,
286,
353,
1254,
9659,
198,
197,
20939,
11571,
260,
24099,
22537,
2959,
198,
197,
29928,
2959,
981,
24099,
808,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExporterTraceDataCallbackSingleSpan(t *testing.T) {
mockTransportChannel := getMockTransportChannel()
exporter := getExporter(defaultConfig, mockTransportChannel)
// re-use some test generation method(s) from trace_to_envelope_test
resource := getResource()
instrumentationLibrary := getInstrumentationLib... | explode_data.jsonl/74429 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 318
} | [
2830,
3393,
88025,
6550,
1043,
7494,
10888,
12485,
1155,
353,
8840,
836,
8,
341,
77333,
27560,
9629,
1669,
633,
11571,
27560,
9629,
741,
59440,
261,
1669,
633,
88025,
18978,
2648,
11,
7860,
27560,
9629,
692,
197,
322,
312,
24673,
1045,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCEKFactory(t *testing.T) {
key, _ := hex.DecodeString("31bdadd96698c204aa9ce1448ea94ae1fb4a9a0b3c9d773b51bb1822666b8f22")
keyB64 := base64.URLEncoding.EncodeToString(key)
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, fmt.Sprintf("%s%s%s", `{"KeyId... | explode_data.jsonl/63024 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 819
} | [
2830,
3393,
2104,
42,
4153,
1155,
353,
8840,
836,
8,
341,
23634,
11,
716,
1669,
12371,
56372,
703,
445,
18,
16,
8940,
718,
24,
21,
21,
24,
23,
66,
17,
15,
19,
5305,
24,
346,
16,
19,
19,
23,
12508,
24,
19,
5918,
16,
10798,
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 TestSet_Iterator(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
s := gset.NewSet()
s.Add(1, 2, 3)
t.Assert(s.Size(), 3)
a1 := garray.New(true)
a2 := garray.New(true)
s.Iterator(func(v interface{}) bool {
a1.Append(1)
return false
})
s.Iterator(func(v interface{}) bool {
a2.Append(1)
re... | explode_data.jsonl/34380 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
1649,
7959,
465,
850,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
1903,
1669,
342,
746,
7121,
1649,
741,
197,
1903,
1904,
7,
16,
11,
220,
17,
11,
220,
18,
340,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHcwalletChainSvrWsNtfns(t *testing.T) {
t.Parallel()
tests := []struct {
name string
newNtfn func() (interface{}, error)
staticNtfn func() interface{}
marshalled string
unmarshalled interface{}
}{
{
name: "ticketpurchase",
newNtfn: func() (interface{}, error) {
return... | explode_data.jsonl/14911 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2338
} | [
2830,
3393,
39,
66,
35735,
18837,
50,
18920,
74733,
45,
8935,
4412,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
8638,
45,
83,
8822,
414,
2915,
368,
320,
4970,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBoltDBCache(t *testing.T) {
tempDir, err := ioutil.TempDir("", "httpcache")
if err != nil {
t.Fatalf("TempDir: %v", err)
}
defer os.RemoveAll(tempDir)
cache, err := bbolt.New(filepath.Join(tempDir, "db"))
if err != nil {
t.Fatalf("bbolt.New(): %v", err)
}
key := "testKey"
_, ok := cache.Get(key)... | explode_data.jsonl/68570 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 305
} | [
2830,
3393,
33,
6181,
3506,
8233,
1155,
353,
8840,
836,
8,
341,
16280,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
1254,
9360,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
12151,
6184,
25,
1018,
85,
497,
1848,
340... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestParseFieldWithFromIdentifier(t *testing.T) {
t.Parallel()
result, errs := ParseProgram(`
struct S {
let from: String
}
`)
require.Empty(t, errs)
utils.AssertEqualWithDiff(t,
[]ast.Declaration{
&ast.CompositeDeclaration{
Access: ast.AccessNotSpecified,
Composite... | explode_data.jsonl/35984 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 731
} | [
2830,
3393,
14463,
1877,
2354,
3830,
8714,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
9559,
11,
70817,
1669,
14775,
10690,
61528,
414,
2036,
328,
341,
688,
1077,
504,
25,
923,
198,
414,
456,
197,
24183,
17957,
11180,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.