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 TestCreateLogger(t *testing.T) {
var settings *Settings
settings, err := initLogger()
if err != nil {
t.Fatal(err)
}
_, err = createLogger(settings)
if err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/62510 | {
"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,
4021,
7395,
1155,
353,
8840,
836,
8,
341,
2405,
5003,
353,
6086,
271,
62930,
11,
1848,
1669,
2930,
7395,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
197,
6878,
1848,
284,
1855,
7395,
23369,
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
] | 3 |
func TestCreateKey(t *testing.T) {
conn := clientConn(t)
defer conn.Close()
biID := uuid.New()
payload := CreateRequestPayload{
ObjectType: kmip14.ObjectTypeSymmetricKey,
}
payload.TemplateAttribute.Append(kmip14.TagCryptographicAlgorithm, kmip14.CryptographicAlgorithmAES)
payload.TemplateAttribute.Append(k... | explode_data.jsonl/27933 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 722
} | [
2830,
3393,
4021,
1592,
1155,
353,
8840,
836,
8,
341,
32917,
1669,
2943,
9701,
1155,
340,
16867,
4534,
10421,
2822,
2233,
72,
915,
1669,
16040,
7121,
2822,
76272,
1669,
4230,
1900,
29683,
515,
197,
23816,
929,
25,
13136,
573,
16,
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 TestRunInitsystemForTargetCluster(t *testing.T) {
cluster6X := &greenplum.Cluster{
BinDir: "/target/bin",
Version: dbconn.NewVersion("6.0.0"),
}
cluster7X := &greenplum.Cluster{
BinDir: "/target/bin",
Version: dbconn.NewVersion("7.0.0"),
}
gpinitsystemConfigPath := "/dir/.gpupgrade/gpinitsystem_co... | explode_data.jsonl/11387 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1383
} | [
2830,
3393,
6727,
641,
1199,
612,
2461,
6397,
28678,
1155,
353,
8840,
836,
8,
341,
197,
18855,
21,
55,
1669,
609,
13250,
500,
372,
72883,
515,
197,
12791,
258,
6184,
25,
220,
3521,
5657,
8749,
756,
197,
77847,
25,
2927,
5148,
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 Test_ObjectWrite(t *testing.T) {
objects, err:= NewObjectAPI(TEST_DIR, 0, STORAGE_BACKEND)
file_path, csum, bwrt, err := objects.CreateObject("objects", strings.NewReader("Hello"), false)
fmt.Println("file_path, checksum, bytes: ", file_path, csum, bwrt)
if err != nil {
fmt.Println("error put obj... | explode_data.jsonl/6787 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 274
} | [
2830,
3393,
27839,
7985,
1155,
353,
8840,
836,
8,
1476,
220,
6171,
11,
1848,
14209,
1532,
1190,
7082,
50320,
8291,
11,
220,
15,
11,
90484,
77795,
692,
220,
1034,
2638,
11,
272,
1242,
11,
34375,
3342,
11,
1848,
1669,
6171,
7251,
1190,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsExternalServerError(t *testing.T) {
cases := []struct {
Err error
Platform int
Expected bool
}{
{push.ErrIdleTimeout, PlatFormIos, true},
{push.ErrShutdown, PlatFormIos, true},
{push.ErrInternalServerError, PlatFormIos, true},
{push.ErrServiceUnavailable, PlatFormIos, true},
{errors.Ne... | explode_data.jsonl/27985 | {
"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,
3872,
25913,
38509,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
197,
7747,
414,
1465,
198,
197,
197,
17296,
526,
198,
197,
197,
18896,
1807,
198,
197,
59403,
197,
197,
90,
9077,
27862,
41370,
7636... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTasks_MarkAsCompleteTask(t *testing.T) {
taskId := 2
task, err := tm.MarkAsCompleteTask(taskId)
t.Log(task)
if err != nil {
t.Error("Unable to mark task as complete")
}
if task.Id != taskId {
t.Error("Task id does not match in mark as complete")
}
} | explode_data.jsonl/66642 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
25449,
1245,
838,
2121,
12548,
6262,
1155,
353,
8840,
836,
8,
341,
49115,
764,
1669,
220,
17,
198,
49115,
11,
1848,
1669,
17333,
75888,
2121,
12548,
6262,
17483,
764,
340,
3244,
5247,
17483,
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... | 3 |
func TestGrpc_CreateNoBalanceTxs(t *testing.T) {
_, err := g.CreateNoBalanceTxs(getOkCtx(), &pb.NoBalanceTxs{TxHexs: []string{"0a05746f6b656e12413804223d0a0443434e5910a09c011a0d74657374207472616e73666572222231333559774e715367694551787577586650626d526d48325935334564673864343820a08d0630969a9fe6c4b9c7ba5d3a2231333559774e... | explode_data.jsonl/323 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 322
} | [
2830,
3393,
6464,
3992,
34325,
2753,
21190,
51,
18561,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
342,
7251,
2753,
21190,
51,
18561,
5433,
11578,
23684,
1507,
609,
16650,
16766,
21190,
51,
18561,
90,
31584,
20335,
82,
25,
3056... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTruncateAlloc(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("create table truncate_id (a int primary key auto_increment)")
tk.MustExec("insert truncate_id values (), (), (), (), (), (), (), (),... | explode_data.jsonl/5731 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 184
} | [
2830,
3393,
1282,
26900,
25154,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_getReadOnlyRootFS_default(t *testing.T) {
os.Setenv("readonly_root_filesystem", "1")
val := getReadOnlyRootFS()
want := true
if val != want {
t.Errorf("want %t, but got %t", want, val)
t.Fail()
}
} | explode_data.jsonl/11976 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
3062,
20914,
8439,
8485,
9993,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
22569,
12993,
2458,
8948,
497,
330,
16,
5130,
19302,
1669,
633,
20914,
8439,
8485,
741,
50780,
1669,
830,
198,
743,
1044,
961,
1366,
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... | 2 |
func TestDeleteMigrations(t *testing.T) {
defer resetTest()
createMigrationAndVerify(t, "deletemigration", "default", "clusterpair1", []string{"namespace1"}, "", "")
cmdArgs := []string{"delete", "migrations", "deletemigration"}
expected := "Migration deletemigration deleted successfully\n"
testCommon(t, cmdArgs,... | explode_data.jsonl/18261 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 482
} | [
2830,
3393,
6435,
44,
17824,
1155,
353,
8840,
836,
8,
341,
16867,
7585,
2271,
741,
39263,
20168,
3036,
32627,
1155,
11,
330,
450,
273,
870,
5033,
497,
330,
2258,
497,
330,
18855,
12670,
16,
497,
3056,
917,
4913,
2231,
16,
14345,
7342,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogSoftLinkChange(t *testing.T) {
testutil.SkipIfShort(t)
for _, tc := range []bool{false, true} {
tc := tc
name := "disabled"
if tc {
name = "enabled"
}
t.Run(fmt.Sprintf("race simulation %s", name), func(t *testing.T) {
workdir := testutil.TestTempDir(t)
logFilepath := filepath.Join(wo... | explode_data.jsonl/39273 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 926
} | [
2830,
3393,
2201,
30531,
3939,
4072,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
57776,
2679,
12472,
1155,
692,
2023,
8358,
17130,
1669,
2088,
3056,
2641,
90,
3849,
11,
830,
92,
341,
197,
78255,
1669,
17130,
198,
197,
11609,
1669,
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 Test__r3_aaa(t *testing.T) {
s := "abc"
vType(1, s)
fmt.Println("------", "", "-----------")
vType(2, []byte(s))
//
vType(2, []string{"a", "b"})
} | explode_data.jsonl/64766 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
563,
81,
18,
4306,
5305,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
330,
13683,
698,
5195,
929,
7,
16,
11,
274,
340,
11009,
12419,
445,
16565,
497,
7342,
330,
18088,
1138,
5195,
929,
7,
17,
11,
3056,
3782,
1141,
1171,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFloatArgs(t *testing.T) {
if _, err := exec.LookPath("gcc"); err != nil {
t.Skip("skipping test: gcc is missing")
}
if runtime.GOARCH != "amd64" {
t.Skipf("skipping test: GOARCH=%s", runtime.GOARCH)
}
const src = `
#include <stdint.h>
#include <windows.h>
uintptr_t cfunc(uintptr_t a, double b, float... | explode_data.jsonl/82615 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 510
} | [
2830,
3393,
5442,
4117,
1155,
353,
8840,
836,
8,
341,
743,
8358,
1848,
1669,
3883,
36851,
1820,
445,
70983,
5038,
1848,
961,
2092,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
25,
50917,
374,
7402,
1138,
197,
532,
743,
15592,
97574,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConnect(t *testing.T) {
Convey("Given nsqd address", t, func() {
Convey("It should not produce any error", func() {
err := Connect(destNsqdTCPAddr)
So(err, ShouldEqual, nil)
})
})
Convey("Given wrong nsqd address", t, func() {
Convey("It should produce an error", func() {
err := Connect("127... | explode_data.jsonl/5604 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
14611,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
22043,
12268,
76727,
2621,
497,
259,
11,
2915,
368,
341,
197,
93070,
5617,
445,
2132,
1265,
537,
8193,
894,
1465,
497,
2915,
368,
341,
298,
9859,
1669,
13015,
27010,
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 TestAddPodAfterExpiration(t *testing.T) {
// Enable volumesOnNodeForBalancing to do balanced resource allocation
utilfeature.DefaultFeatureGate.Set(fmt.Sprintf("%s=true", features.BalanceAttachedNodeVolumes))
nodeName := "node"
ttl := 10 * time.Second
basePod := makeBasePod(t, nodeName, "test", "100m", "500",... | explode_data.jsonl/19647 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 671
} | [
2830,
3393,
2212,
23527,
6025,
66301,
1155,
353,
8840,
836,
8,
341,
197,
322,
18567,
26282,
1925,
1955,
2461,
37889,
8974,
311,
653,
23831,
5101,
23757,
198,
79138,
12753,
13275,
13859,
42318,
4202,
28197,
17305,
4430,
82,
11265,
497,
441... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildHttpRoutesForCellDependency(t *testing.T) {
dependencyInst := "mydep"
instName := "myinst"
expected := []*v1alpha3.HTTPRoute{
{
Match: []*v1alpha3.HTTPMatchRequest{
{
Authority: &v1alpha3.StringMatch{
Regex: fmt.Sprintf("^(%s)(--gateway-service)(\\S*)$", dependencyInst),
},
... | explode_data.jsonl/54867 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 385
} | [
2830,
3393,
11066,
2905,
26653,
2461,
3599,
36387,
1155,
353,
8840,
836,
8,
341,
197,
53690,
8724,
1669,
330,
2408,
14891,
698,
88656,
675,
1669,
330,
2408,
6308,
698,
42400,
1669,
29838,
85,
16,
7141,
18,
27358,
4899,
515,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLegacyJSONFormat(t *testing.T) {
diff := digest.Differences{
Additions: []digest.Addition{[]string{"additions"}},
Modifications: []digest.Modification{{Current: []string{"modification"}}},
Deletions: []digest.Deletion{[]string{"deletions"}},
}
expected := `{
"Additions": [
"additions"
... | explode_data.jsonl/40608 | {
"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,
77415,
5370,
4061,
1155,
353,
8840,
836,
8,
341,
80564,
1669,
20882,
909,
58326,
515,
197,
37972,
5930,
25,
257,
3056,
36339,
1904,
680,
90,
1294,
917,
4913,
718,
5930,
48085,
197,
197,
4459,
7029,
25,
3056,
36339,
23127,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRewrite(t *testing.T) {
expr := MustParseExpr(`time > 1 OR foo = 2`)
// Flip LHS & RHS in all binary expressions.
act := influxql.RewriteFunc(expr, func(n influxql.Node) influxql.Node {
switch n := n.(type) {
case *influxql.BinaryExpr:
return &influxql.BinaryExpr{Op: n.Op, LHS: n.RHS, RHS: n.LHS}
... | explode_data.jsonl/24817 | {
"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,
58465,
1247,
1155,
353,
8840,
836,
8,
341,
8122,
649,
1669,
15465,
14463,
16041,
5809,
1678,
861,
220,
16,
2726,
15229,
284,
220,
17,
63,
692,
197,
322,
40284,
444,
11961,
609,
73832,
304,
678,
7868,
23393,
624,
92699,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGenerateConfigFile(t *testing.T) {
// set up a temporary config directory that will be cleaned up after test
configDir, err := ioutil.TempDir("", "TestGenerateConfigFile")
if err != nil {
t.Fatalf("failed to create temp config dir: %+v", err)
}
defer os.RemoveAll(configDir)
// create mocked cluster co... | explode_data.jsonl/47393 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 451
} | [
2830,
3393,
31115,
2648,
1703,
1155,
353,
8840,
836,
8,
341,
197,
322,
738,
705,
264,
13340,
2193,
6220,
429,
686,
387,
27722,
705,
1283,
1273,
198,
25873,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
2271,
31115,
2648,
1703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResize(t *testing.T) {
finite_tests.Resize(t, func(size int) interface {
finite.Resizer
goqueue.Owner
goqueue.Enqueuer
goqueue.Info
} {
return finite.New(size)
})
} | explode_data.jsonl/54508 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 81
} | [
2830,
3393,
30561,
1155,
353,
8840,
836,
8,
341,
1166,
15856,
32509,
77707,
1155,
11,
2915,
6856,
526,
8,
3749,
341,
197,
1166,
15856,
8377,
3135,
198,
197,
30680,
4584,
49920,
198,
197,
30680,
4584,
22834,
591,
8801,
198,
197,
30680,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWSUnsubscriptionHandling(t *testing.T) {
pressXToJSON := []byte(`{
"method": "UNSUBSCRIBE",
"params": [
"btcusdt@depth"
],
"id": 312
}`)
err := b.wsHandleData(pressXToJSON)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/76682 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 107
} | [
2830,
3393,
7433,
1806,
34404,
38606,
1155,
353,
8840,
836,
8,
341,
197,
1873,
55,
1249,
5370,
1669,
3056,
3782,
5809,
515,
220,
330,
4393,
788,
330,
1861,
29038,
64640,
756,
220,
330,
3519,
788,
2278,
262,
330,
92634,
355,
8047,
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... | 2 |
func TestSubOnce(t *testing.T) {
ps := New(1)
defer ps.Shutdown()
ch := ps.SubOnce("t1")
ps.Pub("hi", "t1")
checkContents(t, ch, []string{"hi"})
} | explode_data.jsonl/44249 | {
"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,
3136,
12522,
1155,
353,
8840,
836,
8,
341,
35009,
1669,
1532,
7,
16,
340,
16867,
4726,
10849,
18452,
2822,
23049,
1669,
4726,
12391,
12522,
445,
83,
16,
5130,
35009,
1069,
392,
445,
6023,
497,
330,
83,
16,
1138,
25157,
148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMetricsEndpoint(t *testing.T) {
c := newKubeClient(t)
crc := newCRClient(t)
failingCSV := v1alpha1.ClusterServiceVersion{
TypeMeta: metav1.TypeMeta{
Kind: v1alpha1.ClusterServiceVersionKind,
APIVersion: v1alpha1.ClusterServiceVersionAPIVersion,
},
ObjectMeta: metav1.ObjectMeta{
Name: g... | explode_data.jsonl/74732 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 538
} | [
2830,
3393,
27328,
27380,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
501,
42,
3760,
2959,
1155,
340,
1444,
1287,
1669,
501,
8973,
2959,
1155,
692,
1166,
14277,
44209,
1669,
348,
16,
7141,
16,
72883,
1860,
5637,
515,
197,
27725,
12175,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHCLSubset(t *testing.T) {
_, err := fixture(t, "invalid/hcl-subset.workflow")
pe := extractParserError(t, err)
require.Equal(t, 4, len(pe.Actions))
assert.Equal(t, "a", pe.Actions[0].Identifier)
assert.Equal(t, "", pe.Actions[1].Identifier)
assert.Equal(t, "b", pe.Actions[2].Identifier)
assert.Equal(t,... | explode_data.jsonl/55694 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
39,
3140,
70584,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
12507,
1155,
11,
330,
11808,
7530,
564,
17967,
746,
72774,
1138,
197,
375,
1669,
8649,
6570,
1454,
1155,
11,
1848,
340,
17957,
12808,
1155,
11,
220,
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 TestRPC_Dispatch(t *testing.T) {
codec.UpgradeHeight = 7000
kb := getInMemoryKeybase()
genBZ, _, validators, app := fiveValidatorsOneAppGenesis()
_, _, cleanup := NewInMemoryTendermintNode(t, genBZ)
appPrivateKey, err := kb.ExportPrivateKeyObject(app.Address, "test")
assert.Nil(t, err)
// Setup HandleDispat... | explode_data.jsonl/44730 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 516
} | [
2830,
3393,
29528,
45525,
3400,
1155,
353,
8840,
836,
8,
341,
43343,
66,
13,
43861,
3640,
284,
220,
22,
15,
15,
15,
198,
16463,
65,
1669,
633,
641,
10642,
1592,
3152,
741,
82281,
33,
57,
11,
8358,
38588,
11,
906,
1669,
4236,
31748,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunParserJSONMsg(t *testing.T) {
var testmsg = []byte("{\"a\": 5, \"b\": {\"c\": 6}}\n")
listener, in := newTestTcpListener()
acc := testutil.Accumulator{}
listener.acc = &acc
defer close(listener.done)
listener.parser, _ = parsers.NewJSONParser("udp_json_test", []string{}, nil)
listener.wg.Add(1)
go... | explode_data.jsonl/33008 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 231
} | [
2830,
3393,
6727,
6570,
5370,
6611,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
3236,
284,
3056,
3782,
99141,
64,
11693,
220,
20,
11,
7245,
65,
11693,
314,
2105,
66,
11693,
220,
21,
3417,
59,
77,
5130,
14440,
798,
11,
304,
1669,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDockerHostConfigVolumesFrom(t *testing.T) {
testTask := &Task{
Containers: []*apicontainer.Container{
{
Name: "c1",
},
{
Name: "c2",
VolumesFrom: []apicontainer.VolumeFrom{{SourceContainer: "c1"}},
},
},
}
config, err := testTask.DockerHostConfig(testTask.Containers[1], d... | explode_data.jsonl/37184 | {
"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,
35,
13659,
9296,
2648,
96325,
3830,
1155,
353,
8840,
836,
8,
341,
18185,
6262,
1669,
609,
6262,
515,
197,
197,
74632,
25,
29838,
391,
51160,
1743,
33672,
515,
298,
197,
515,
571,
21297,
25,
330,
66,
16,
756,
298,
197,
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 TestUpdateListenBacklog(t *testing.T) {
c := context.New(t, defaultMTU)
defer c.Cleanup()
// Create listener.
var wq waiter.Queue
ep, err := c.Stack().NewEndpoint(tcp.ProtocolNumber, ipv4.ProtocolNumber, &wq)
if err != nil {
t.Fatalf("NewEndpoint failed: %s", err)
}
if err := ep.Bind(tcpip.FullAddress{... | explode_data.jsonl/75987 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
4289,
38714,
3707,
839,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2266,
7121,
1155,
11,
1638,
8505,
52,
340,
16867,
272,
727,
60639,
2822,
197,
322,
4230,
11446,
624,
2405,
289,
80,
67169,
50251,
198,
96626,
11,
1848,
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... | 5 |
func TestURecentTrades(t *testing.T) {
t.Parallel()
_, err := b.URecentTrades(context.Background(), currency.NewPair(currency.BTC, currency.USDT), "", 5)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/76554 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
52,
25140,
1282,
3452,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
293,
5255,
25140,
1282,
3452,
5378,
19047,
1507,
11413,
7121,
12443,
90475,
1785,
7749,
11,
11413,
67672,
10599,
701,
7342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPipelineClientNilResp(t *testing.T) {
t.Parallel()
ln := fasthttputil.NewInmemoryListener()
s := &Server{
Handler: func(ctx *RequestCtx) {
},
}
go s.Serve(ln) //nolint:errcheck
c := &PipelineClient{
Dial: func(addr string) (net.Conn, error) {
return ln.Dial()
},
}
req := AcquireRequest()
r... | explode_data.jsonl/79336 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
34656,
2959,
19064,
36555,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
2261,
1669,
4937,
96336,
628,
321,
7121,
641,
17269,
2743,
741,
1903,
1669,
609,
5475,
515,
197,
197,
3050,
25,
2915,
7502,
353,
1900,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrepareProposalErrorOnPrepareProposalError(t *testing.T) {
const height = 2
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
logger := log.NewNopLogger()
eventBus := eventbus.NewDefault(logger)
require.NoError(t, eventBus.Start(ctx))
state, stateDB, privVals := makeState(t, 1, he... | explode_data.jsonl/49125 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 553
} | [
2830,
3393,
50590,
98637,
1454,
1925,
50590,
98637,
1454,
1155,
353,
8840,
836,
8,
341,
4777,
2608,
284,
220,
17,
198,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
2822,
17060,
1669,
1487,
7121,
45,
453,
739... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateAttestation(t *testing.T) {
signer, err := NewPgpSigner([]byte(gpgPrivateKey))
if err != nil {
t.Fatalf("Unexpected error creating signer: %v", err)
}
att, err := signer.CreateAttestation([]byte(testPayload))
if err != nil {
t.Fatalf("Error creating the Attestation: %v", err)
}
// Check atte... | explode_data.jsonl/48095 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
4021,
1655,
1944,
367,
1155,
353,
8840,
836,
8,
341,
69054,
261,
11,
1848,
1669,
1532,
47,
21888,
7264,
261,
10556,
3782,
3268,
3517,
75981,
1171,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
29430,
1465,
6825,
70039,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigErrorInAuthorizationConfig(t *testing.T) {
cfg := &Config{
Authorization: Authorization{
OAuthAuthorizer: OAuthAuthorizer{
Enable: true,
},
NoopAuthorizer: NoopAuthorizer{
Enable: true,
},
},
}
err := cfg.ValidateAndFillDefaults()
require.Error(t, err)
} | explode_data.jsonl/46572 | {
"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,
2648,
1454,
641,
18124,
2648,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
609,
2648,
515,
197,
197,
18124,
25,
30562,
515,
298,
48049,
5087,
7133,
3135,
25,
38316,
7133,
3135,
515,
571,
197,
11084,
25,
830,
345,
298,
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 TestPaymentsService_HttpRequestErrors(t *testing.T) {
setup()
defer teardown()
tMux.HandleFunc("/v2/payments/", errorHandler)
p := Payment{
Amount: &Amount{
Currency: "EUR",
Value: "10.00",
},
Description: "Order #12345",
}
_, cerr := tClient.Payments.Create(p)
_, rerr := tClient.Payments.L... | explode_data.jsonl/16987 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 260
} | [
2830,
3393,
87646,
1860,
2039,
1209,
1900,
13877,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
741,
3244,
44,
2200,
63623,
4283,
85,
17,
72423,
1368,
28105,
71073,
692,
3223,
1669,
20453,
515,
197,
197,
10093,
25,
609,
10093,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDebugBodySizeLimit(t *testing.T) {
ts := createGetServer(t)
defer ts.Close()
var lgr bytes.Buffer
c := dc()
c.SetDebug(true)
c.SetDebugBodyLimit(30)
c.outputLogTo(&lgr)
testcases := []struct{ url, want string }{
// Text, does not exceed limit.
{ts.URL, "TestGet: text response"},
// Empty respon... | explode_data.jsonl/39356 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 402
} | [
2830,
3393,
7939,
5444,
1695,
16527,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
1855,
1949,
5475,
1155,
340,
16867,
10591,
10421,
2822,
2405,
326,
901,
5820,
22622,
198,
1444,
1669,
19402,
741,
1444,
4202,
7939,
3715,
340,
1444,
4202,
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... | 3 |
func TestRemittanceOriginatorContactNameAlphaNumeric(t *testing.T) {
ro := mockRemittanceOriginator()
ro.ContactName = "®"
err := ro.Validate()
require.EqualError(t, err, fieldError("ContactName", ErrNonAlphanumeric, ro.ContactName).Error())
} | explode_data.jsonl/32940 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 81
} | [
2830,
3393,
6590,
87191,
13298,
850,
8732,
675,
19384,
36296,
1155,
353,
8840,
836,
8,
341,
197,
299,
1669,
7860,
6590,
87191,
13298,
850,
741,
197,
299,
53975,
675,
284,
330,
11909,
1837,
9859,
1669,
926,
47667,
2822,
17957,
12808,
145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldNotHashArgon2idPasswordDueToKeyLengthLessThanSixteen(t *testing.T) {
hash, err := HashPassword("password", "BpLnfgDsc2WD8F2q", HashingAlgorithmArgon2id,
schema.DefaultCIPasswordConfiguration.Iterations, schema.DefaultCIPasswordConfiguration.Memory*1024,
schema.DefaultCIPasswordConfiguration.Parallel... | explode_data.jsonl/40172 | {
"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,
14996,
2623,
6370,
2735,
263,
17,
307,
4876,
33060,
1249,
1592,
4373,
27451,
26067,
41460,
14901,
1155,
353,
8840,
836,
8,
341,
50333,
11,
1848,
1669,
6531,
4876,
445,
3833,
497,
330,
33,
79,
40101,
4817,
35,
2388,
17,
175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCacheQueryer_ServicesForIngress_service_not_found(t *testing.T) {
ingress := testutil.CreateIngress("ingress")
ingress.Spec.Backend = &extv1beta1.IngressBackend{
ServiceName: "not-found",
}
controller := gomock.NewController(t)
defer controller.Finish()
o := storeFake.NewMockStore(controller)
o.EXPE... | explode_data.jsonl/45671 | {
"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,
8233,
2859,
261,
1098,
2161,
2461,
641,
2483,
12267,
7913,
21480,
1155,
353,
8840,
836,
8,
341,
197,
287,
673,
1669,
1273,
1314,
7251,
641,
2483,
445,
287,
673,
1138,
197,
287,
673,
36473,
8864,
408,
284,
609,
427,
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 TestDoltMerge(t *testing.T) {
skipNewFormat(t)
for _, script := range MergeScripts {
// dolt versioning conflicts with reset harness -- use new harness every time
enginetest.TestScript(t, newDoltHarness(t), script)
}
} | explode_data.jsonl/38716 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
35,
6181,
52096,
1155,
353,
8840,
836,
8,
341,
1903,
13389,
3564,
4061,
1155,
340,
2023,
8358,
5316,
1669,
2088,
40085,
44942,
341,
197,
197,
322,
294,
6181,
2319,
287,
25800,
448,
7585,
32408,
1177,
990,
501,
32408,
1449,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHappyPath(t *testing.T) {
route53Mock := &testRoute53{
listHostedZonesByNameResponse: &route53.ListHostedZonesByNameOutput{
HostedZones: []*route53.HostedZone{
&route53.HostedZone{
Id: aws.String("hostedZoneId"),
Name: aws.String("example.com."),
},
},
},
listResourceRecordSets... | explode_data.jsonl/81305 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 283
} | [
2830,
3393,
32847,
1820,
1155,
353,
8840,
836,
8,
341,
7000,
2133,
20,
18,
11571,
1669,
609,
1944,
4899,
20,
18,
515,
197,
14440,
9296,
291,
57,
3154,
16898,
2582,
25,
609,
8966,
20,
18,
5814,
9296,
291,
57,
3154,
16898,
5097,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCreateSet(t *testing.T) {
testSet := IPSet{
Name: "FOOBAR",
SetType: HashIPPort,
HashFamily: ProtocolFamilyIPV4,
}
fcmd := fakeexec.FakeCmd{
CombinedOutputScript: []fakeexec.FakeAction{
// Success
func() ([]byte, []byte, error) { return []byte{}, nil, nil },
// Success
func() (... | explode_data.jsonl/74009 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 821
} | [
2830,
3393,
4021,
1649,
1155,
353,
8840,
836,
8,
341,
18185,
1649,
1669,
6790,
1649,
515,
197,
21297,
25,
981,
330,
3788,
20608,
934,
756,
197,
22212,
929,
25,
262,
6531,
3298,
7084,
345,
197,
197,
6370,
15192,
25,
24572,
15192,
3298,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDomainName(t *testing.T) {
testCases := map[string]struct {
resolvConf string
want string
}{
"all good": {
resolvConf: `
nameserver 1.1.1.1
search default.svc.abc.com svc.abc.com abc.com
options ndots:5
`,
want: "abc.com",
},
"missing search line": {
resolvConf: `
nameserver 1.1.1... | explode_data.jsonl/53355 | {
"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,
1949,
13636,
675,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
10202,
35315,
15578,
914,
198,
197,
50780,
981,
914,
198,
197,
59403,
197,
197,
1,
541,
1661,
788,
341,
298,
10202,
35315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRGB_Print(t *testing.T) {
RGBs := []RGB{{0, 0, 0}, {127, 127, 127}, {255, 255, 255}}
for _, rgb := range RGBs {
t.Run("", func(t *testing.T) {
internal.TestPrintContains(t, func(w io.Writer, a interface{}) {
p := rgb.Print(a)
assert.NotNil(t, p)
})
})
}
} | explode_data.jsonl/62947 | {
"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,
18184,
45788,
1155,
353,
8840,
836,
8,
341,
11143,
5381,
82,
1669,
3056,
18184,
2979,
15,
11,
220,
15,
11,
220,
15,
2137,
314,
16,
17,
22,
11,
220,
16,
17,
22,
11,
220,
16,
17,
22,
2137,
314,
17,
20,
20,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSyncReplicationControllerDormancy(t *testing.T) {
// Setup a test server so we can lie about the current state of pods
fakeHandler := utiltesting.FakeHandler{
StatusCode: 200,
ResponseBody: "{}",
}
testServer := httptest.NewServer(&fakeHandler)
// TODO: Uncomment when fix #19254
// defer testServer... | explode_data.jsonl/37486 | {
"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,
12154,
18327,
1693,
2051,
35,
493,
6572,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
264,
1273,
3538,
773,
582,
646,
10246,
911,
279,
1482,
1584,
315,
54587,
198,
1166,
726,
3050,
1669,
4094,
8840,
991,
726,
3050,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPasswordCredentialsTokenRequest(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
expected := "/token"
if r.URL.String() != expected {
t.Errorf("URL = %q; want %q", r.URL, expected)
}
headerAuth := r.Header.Get("Authoriza... | explode_data.jsonl/25891 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 693
} | [
2830,
3393,
4876,
27025,
3323,
1900,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
16867,
435,
20934,
10421,
741,
197,
42400,
1669,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestPromptStaleTransform_Exception(t *testing.T) {
f := setup(rc(
`pipe = (pipe)`,
`edit:prompt = { nop (slurp < $pipe); put '> ' }`,
`edit:prompt-stale-threshold = `+scaledMsAsSec(50),
`edit:prompt-stale-transform = [_]{ fail ERROR }`))
defer f.Cleanup()
f.TestTTYNotes(t,
"[prompt stale transform er... | explode_data.jsonl/46586 | {
"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,
54615,
623,
1574,
8963,
48247,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
6505,
35429,
1006,
197,
197,
63,
13768,
284,
320,
13768,
8,
12892,
197,
197,
63,
3587,
25,
40581,
284,
314,
65026,
320,
3226,
324,
79,
366,
400,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMetricsNoPrometheus(t *testing.T) {
kubeClientWithRevision = mockExecClientAuthNoPilot
cases := []testCase{
{ // case 0
args: strings.Split("experimental metrics", " "),
expectedRegexp: regexp.MustCompile("Error: metrics requires workload name\n"),
wantException: true,
},
{ // case... | explode_data.jsonl/71916 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 253
} | [
2830,
3393,
27328,
2753,
35186,
39705,
1155,
353,
8840,
836,
8,
341,
16463,
3760,
2959,
2354,
33602,
284,
7860,
10216,
2959,
5087,
2753,
47,
23958,
271,
1444,
2264,
1669,
3056,
66194,
515,
197,
197,
90,
442,
1142,
220,
15,
198,
298,
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 TestReceiverConsumerError(t *testing.T) {
body, err := ioutil.ReadFile("../../translator/trace/zipkin/testdata/zipkin_v2_single.json")
require.NoError(t, err)
r := httptest.NewRequest("POST", "/api/v2/spans",
bytes.NewBuffer([]byte(body)))
r.Header.Add("content-type", "application/json")
next := &zipkinMo... | explode_data.jsonl/53605 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
25436,
29968,
1454,
1155,
353,
8840,
836,
8,
341,
35402,
11,
1848,
1669,
43144,
78976,
36800,
44357,
14,
15067,
14,
9964,
7989,
12697,
691,
14,
9964,
7989,
2273,
17,
19487,
4323,
1138,
17957,
35699,
1155,
11,
1848,
692,
7000... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOwnerIds(t *testing.T) {
for _, tt := range []struct {
email string
ids map[int]bool
}{
{
email: "rstambler@golang.org",
ids: map[int]bool{
16140: true,
},
},
} {
ids, err := golang.OwnerIDs(gerrit, map[string]bool{
tt.email: true,
})
if err != nil {
t.Error(err)
}
ids... | explode_data.jsonl/73204 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 303
} | [
2830,
3393,
13801,
12701,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
57549,
914,
198,
197,
197,
3365,
256,
2415,
18640,
96436,
198,
197,
59403,
197,
197,
515,
298,
57549,
25,
330,
58025,
2969,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSyncReplicaSetDeletes(t *testing.T) {
client := clientset.NewForConfigOrDie(&restclient.Config{Host: "", ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}})
fakePodControl := controller.FakePodControl{}
manager := NewReplicaSetController(client, controller.NoResyncPeriodF... | explode_data.jsonl/10040 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 254
} | [
2830,
3393,
12154,
18327,
15317,
1649,
61317,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
2943,
746,
7121,
2461,
2648,
2195,
18175,
2099,
3927,
2972,
10753,
90,
9296,
25,
7342,
8883,
2648,
25,
2732,
2972,
12614,
2648,
90,
2808,
5637,
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... | 1 |
func TestCompareConfigGroup(t *testing.T) {
// Normal equality
assert.True(t, comparable{
ConfigGroup: &cb.ConfigGroup{
Version: 0,
ModPolicy: "foo",
Groups: map[string]*cb.ConfigGroup{"Foo1": nil, "Bar1": nil},
Values: map[string]*cb.ConfigValue{"Foo2": nil, "Bar2": nil},
Policies: map[stri... | explode_data.jsonl/40499 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1378
} | [
2830,
3393,
27374,
2648,
2808,
1155,
353,
8840,
836,
8,
341,
197,
322,
18437,
21777,
198,
6948,
32443,
1155,
11,
29039,
515,
197,
66156,
2808,
25,
609,
7221,
10753,
2808,
515,
298,
77847,
25,
256,
220,
15,
345,
298,
197,
4459,
13825,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConcurrency(t *testing.T) {
list := []struct {
name string
ct concurrentTest
}{
{"Query", new(concurrentDBQueryTest)},
{"Exec", new(concurrentDBExecTest)},
{"StmtQuery", new(concurrentStmtQueryTest)},
{"StmtExec", new(concurrentStmtExecTest)},
{"TxQuery", new(concurrentTxQueryTest)},
{"TxEx... | explode_data.jsonl/16027 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 244
} | [
2830,
3393,
79611,
1155,
353,
8840,
836,
8,
341,
14440,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
89216,
256,
34035,
2271,
198,
197,
59403,
197,
197,
4913,
2859,
497,
501,
17868,
3231,
3506,
2859,
2271,
39781,
197,
197,
4913,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClientServerUpdate(t *testing.T) {
owner := "owner"
newResourceWithUD := func(name, rtype, state, owner string, t time.Time, ud common.UserDataMap) common.Resource {
res := common.NewResource(name, rtype, state, owner, t)
res.UserData = common.UserDataFromMap(ud)
return res
}
newCRDResourceWithUD :=... | explode_data.jsonl/6217 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1375
} | [
2830,
3393,
2959,
5475,
4289,
1155,
353,
8840,
836,
8,
341,
197,
8118,
1669,
330,
8118,
1837,
8638,
4783,
2354,
4656,
1669,
2915,
3153,
11,
435,
1313,
11,
1584,
11,
6372,
914,
11,
259,
882,
16299,
11,
26994,
4185,
7344,
1043,
2227,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconcileServiceInstanceWithHTTPStatusCodeErrorOrphanMitigation(t *testing.T) {
cases := []struct {
name string
statusCode int
triggersOrphanMitigation bool
terminalFailure bool
}{
{
name: "Status OK",
statusCode: 20... | explode_data.jsonl/58180 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1293
} | [
2830,
3393,
693,
40446,
457,
1860,
2523,
2354,
9230,
15872,
1454,
2195,
9943,
54370,
17930,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
3824,
914,
198,
197,
23847,
2078,
2290,
526,
198,
197,
25583,
21385... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogStore_LastIndex(t *testing.T) {
ls, err := newLogStore()
if err != nil {
t.Error(err)
t.Fail()
return
}
if index, err := ls.LastIndex(); err != nil {
t.Error(err)
t.Fail()
return
} else {
if index != 0 {
t.Error("last index should be 0")
t.Fail()
return
}
}
} | explode_data.jsonl/59211 | {
"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,
2201,
6093,
84672,
1552,
1155,
353,
8840,
836,
8,
341,
197,
4730,
11,
1848,
1669,
501,
2201,
6093,
741,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
3244,
57243,
741,
197,
853,
198,
197,
630,
743,
1922,
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... | 4 |
func TestBuildCNIConfigRegularENIWithAppMesh(t *testing.T) {
for _, blockIMDS := range []bool{true, false} {
t.Run(fmt.Sprintf("When BlockInstanceMetadata is %t", blockIMDS), func(t *testing.T) {
testTask := &Task{}
testTask.AddTaskENI(getTestENI())
testTask.SetAppMesh(&appmesh.AppMesh{
IgnoredUID: ... | explode_data.jsonl/37266 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 855
} | [
2830,
3393,
11066,
34,
14912,
2648,
30404,
953,
40,
2354,
2164,
14194,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
2504,
1791,
5936,
1669,
2088,
3056,
2641,
90,
1866,
11,
895,
92,
341,
197,
3244,
16708,
28197,
17305,
445,
4498,
8362,
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... | 1 |
func TestNewRunCommandExtraArgsError(t *testing.T) {
fakeParsedCommands := []builder.Command{&builder.FakeCommand{}, &builder.FakeCommand{}}
f := newFakeKoolRun(fakeParsedCommands, nil)
cmd := NewRunCommand(f)
cmd.SetArgs([]string{"script", "extraArg"})
if err := cmd.Execute(); err != nil {
t.Errorf("unexpecte... | explode_data.jsonl/60855 | {
"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,
3564,
6727,
4062,
11612,
4117,
1454,
1155,
353,
8840,
836,
8,
341,
1166,
726,
82959,
30479,
1669,
3056,
17850,
12714,
90,
5,
17850,
991,
726,
4062,
22655,
609,
17850,
991,
726,
4062,
6257,
532,
1166,
1669,
501,
52317,
42,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestUnexportedExecuteQueryWithLogger(t *testing.T) {
defer func() {
client = nil
logger = nil
}()
logger = logging.NewBasicLogger()
Convey("Given a host and query", t, func() {
host := "testhost"
query := "testquery"
Convey("When executeQuery is called with no client", func() {
_, err := executeQu... | explode_data.jsonl/9668 | {
"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,
1806,
1533,
291,
17174,
2859,
2354,
7395,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
368,
341,
197,
25291,
284,
2092,
198,
197,
17060,
284,
2092,
198,
197,
69826,
17060,
284,
8392,
7121,
15944,
7395,
741,
93070,
5617,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPingRegistryEndpoint(t *testing.T) {
testPing := func(index *IndexInfo, expectedStandalone bool, assertMessage string) {
ep, err := NewEndpoint(index, nil, APIVersionUnknown)
if err != nil {
t.Fatal(err)
}
regInfo, err := ep.Ping()
if err != nil {
t.Fatal(err)
}
assertEqual(t, regInfo.Sta... | explode_data.jsonl/13095 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 221
} | [
2830,
3393,
69883,
15603,
27380,
1155,
353,
8840,
836,
8,
341,
18185,
69883,
1669,
2915,
7195,
353,
1552,
1731,
11,
3601,
623,
84112,
1807,
11,
2060,
2052,
914,
8,
341,
197,
96626,
11,
1848,
1669,
1532,
27380,
7195,
11,
2092,
11,
5333... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDataValidation_MoreThanOneName(t *testing.T) {
fa := flagsAndArgs{}
if fa.Validate([]string{"name", "othername"}) == nil {
t.Fatal("Validation should fail if more than one name is specified")
}
} | explode_data.jsonl/53902 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 74
} | [
2830,
93200,
13799,
1245,
460,
26067,
3966,
675,
1155,
353,
8840,
836,
8,
341,
1166,
64,
1669,
8042,
3036,
4117,
31483,
743,
2218,
47667,
10556,
917,
4913,
606,
497,
330,
1575,
606,
80154,
621,
2092,
341,
197,
3244,
26133,
445,
13799,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListAllowedOutboundServicesForIdentity(t *testing.T) {
assert := tassert.New(t)
testCases := []struct {
name string
serviceAccount service.K8sServiceAccount
expectedList []service.MeshService
permissiveMode bool
}{
{
name: "traffic targets configured for service account",... | explode_data.jsonl/69755 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 507
} | [
2830,
3393,
852,
35382,
2662,
10891,
11025,
2461,
18558,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
259,
2207,
7121,
1155,
692,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
52934,
7365,
2473,
11352,
23,
82,
1860,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResume_LargeGeneric(t *testing.T) {
toSkip, allFiles, err := GenerateLargeResumeScenario()
if err != nil {
t.Log(err)
t.FailNow()
}
RunScenarios(t, eOperation.CopyAndSync()|eOperation.Resume(), eTestFromTo.AllSync(), eValidate.Auto(), params{
recursive: true,
debugSkipFiles: toSkip,
}, nil, ... | explode_data.jsonl/43014 | {
"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,
28563,
2351,
2744,
19964,
1155,
353,
8840,
836,
8,
341,
31709,
35134,
11,
678,
10809,
11,
1848,
1669,
19813,
34253,
28563,
54031,
741,
743,
1848,
961,
2092,
341,
197,
3244,
5247,
3964,
340,
197,
3244,
57243,
7039,
741,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestEntityQuotes(t *testing.T) {
for _, service := range services {
t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) {
client, delete := initClientTest(t, service, true)
defer delete()
pk, err := createRandomName(t, "partition")
require.NoError(t, err)
edmEntity := EDMEntity{
... | explode_data.jsonl/59180 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 892
} | [
2830,
3393,
3030,
43780,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
2473,
1669,
2088,
3516,
341,
197,
3244,
16708,
28197,
17305,
4430,
85,
18695,
85,
497,
259,
2967,
1507,
2473,
701,
2915,
1155,
353,
8840,
836,
8,
341,
298,
25291,
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 TestConnectList(t *testing.T) {
Convey("Given list of nsqd address", t, func() {
Convey("It should not produce any error", func() {
err := ConnectList(destNsqdTCPAddrs)
So(err, ShouldEqual, nil)
})
})
Convey("Given list of wrong nsqd address", t, func() {
Convey("It should produce an error", func(... | explode_data.jsonl/5605 | {
"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,
14611,
852,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
22043,
1140,
315,
12268,
76727,
2621,
497,
259,
11,
2915,
368,
341,
197,
93070,
5617,
445,
2132,
1265,
537,
8193,
894,
1465,
497,
2915,
368,
341,
298,
9859,
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 Test_decode_byte_array_from_base64(t *testing.T) {
should := require.New(t)
data := []byte{}
err := json.Unmarshal([]byte(`"AQID"`), &data)
should.Nil(err)
should.Equal([]byte{1, 2, 3}, data)
err = jsoner.DefaultAPI().Unmarshal([]byte(`"AQID"`), &data)
should.Nil(err)
should.Equal([]byte{1, 2, 3}, data)
} | explode_data.jsonl/57885 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
15227,
19737,
3858,
5673,
7651,
21,
19,
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,
92073,
915,
39917,
701,
609,
691,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTranscoding3GP(t *testing.T) {
var inputPath = "/tmp/ffmpeg/3gp"
var outputPath = "/tmp/ffmpeg/out/3gp.mp4"
trans := new(transcoder.Transcoder)
err := trans.Initialize(inputPath, outputPath)
assert.Nil(t, err)
done := trans.Run(false)
err = <-done
assert.Nil(t, err)
} | explode_data.jsonl/57657 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
3167,
48367,
18,
24430,
1155,
353,
8840,
836,
8,
1476,
2405,
1946,
1820,
284,
3521,
5173,
14,
72422,
14,
18,
21888,
698,
2405,
95017,
284,
3521,
5173,
14,
72422,
48316,
14,
18,
21888,
16870,
19,
1837,
72453,
1669,
501,
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 TestEscapePath(t *testing.T) {
data := `{
"test":{
"*":"valZ",
"*v":"val0",
"keyv*":"val1",
"key*v":"val2",
"keyv?":"val3",
"key?v":"val4",
"keyv.":"val5",
"key.v":"val6",
"keyk*":{"key?":"val7"}... | explode_data.jsonl/62345 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 455
} | [
2830,
3393,
48124,
1820,
1155,
353,
8840,
836,
8,
341,
262,
821,
1669,
1565,
515,
286,
330,
1944,
12602,
310,
15630,
3252,
831,
57,
756,
310,
15630,
85,
3252,
831,
15,
756,
310,
330,
792,
85,
9,
3252,
831,
16,
756,
310,
330,
792,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTinkPushHardwareSuccess(t *testing.T) {
tink, ctx, e := newTink(t)
hardwareBytes := []byte(hardwareJson)
expectedParam := []string{"hardware", "push"}
expectCommand(e, ctx, expectedParam...).withStdIn(hardwareBytes).withEnvVars(envMap).to().Return(bytes.Buffer{}, nil)
if err := tink.PushHardware(ctx, hard... | explode_data.jsonl/45414 | {
"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,
51,
766,
16644,
66862,
7188,
1155,
353,
8840,
836,
8,
341,
3244,
766,
11,
5635,
11,
384,
1669,
501,
51,
766,
1155,
340,
9598,
37750,
7078,
1669,
3056,
3782,
3203,
37750,
5014,
340,
42400,
2001,
1669,
3056,
917,
4913,
68215... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateLink(t *testing.T) {
valid := []string{
"name",
"dcdfbe62ecd0:alias",
"7a67485460b7642516a4ad82ecefe7f57d0c4916f530561b71a50a3f9c4e33da",
"angry_torvalds:linus",
}
invalid := map[string]string{
"": "empty string specified for links",
"too:much:of:it": "bad format for links:... | explode_data.jsonl/26387 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 357
} | [
2830,
3393,
17926,
3939,
1155,
353,
8840,
836,
8,
341,
56322,
1669,
3056,
917,
515,
197,
197,
31486,
756,
197,
197,
1,
7628,
2940,
1371,
21,
17,
37206,
15,
25,
14956,
756,
197,
197,
1,
22,
64,
21,
22,
19,
23,
20,
19,
21,
15,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestReuseFontData(t *testing.T) {
ttf, err := os.Open("test/res/LiberationSerif-Regular.ttf")
if err != nil {
t.Error(err)
return
}
defer ttf.Close()
fontData, err := ioutil.ReadAll(ttf)
if err != nil {
t.Error(err)
return
}
pdf1 := &GoPdf{}
rst1, err := generatePDFBytesByAddTTFFontData(pdf1, fo... | explode_data.jsonl/60944 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 399
} | [
2830,
3393,
38081,
5447,
1043,
1155,
353,
8840,
836,
8,
341,
3244,
8935,
11,
1848,
1669,
2643,
12953,
445,
1944,
32426,
7434,
8629,
367,
31745,
333,
87591,
45192,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
853,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAllocatingByteSliceTarget(t *testing.T) {
var dst []byte
sink := AllocatingByteSliceSink(&dst)
inBytes := []byte("some bytes")
sink.SetBytes(inBytes, time.Time{})
if want := "some bytes"; string(dst) != want {
t.Errorf("SetBytes resulted in %q; want %q", dst, want)
}
v, err := sink.view()
if err != ... | explode_data.jsonl/62849 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 253
} | [
2830,
3393,
25154,
1095,
7153,
33236,
6397,
1155,
353,
8840,
836,
8,
341,
2405,
10648,
3056,
3782,
198,
1903,
766,
1669,
46685,
1095,
7153,
33236,
45094,
2099,
15658,
692,
17430,
7078,
1669,
3056,
3782,
445,
14689,
5820,
1138,
1903,
766,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBSTree_Depth(t *testing.T) {
assert := internal.NewAssert(t, "TestBSTree_Depth")
bstree := NewBSTree(6, &intComparator{})
bstree.InsertNode(7)
bstree.InsertNode(5)
bstree.InsertNode(2)
bstree.InsertNode(4)
bstree.Print()
assert.Equal(bstree.Depth(), 4)
} | explode_data.jsonl/41665 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 123
} | [
2830,
3393,
61006,
765,
90680,
339,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
5306,
7121,
8534,
1155,
11,
330,
2271,
61006,
765,
90680,
339,
5130,
2233,
267,
765,
1669,
1532,
61006,
765,
7,
21,
11,
609,
396,
38658,
6257,
692,
2233,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLruCache_RandomSet(t *testing.T) {
var values []string
for idx := 0; idx < 1024; idx++ {
values = append(values, strconv.Itoa(idx))
}
lru := NewLRUCache(1024)
for idx := 0; idx < 2500000; idx++ {
v := values[rand.Intn(len(values))]
lru.Set(v)
if lru.Count() != lru.usage.Count() {
t.Fatal(lru... | explode_data.jsonl/46297 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
43,
2672,
8233,
2568,
2206,
1649,
1155,
353,
8840,
836,
8,
341,
2405,
2750,
3056,
917,
198,
2023,
7187,
1669,
220,
15,
26,
7187,
366,
220,
16,
15,
17,
19,
26,
7187,
1027,
341,
197,
45939,
284,
8737,
20103,
11,
33317,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestPreparedCommand_OutputE(t *testing.T) {
os.Setenv(mg.VerboseEnv, "true")
defer os.Unsetenv(mg.VerboseEnv)
stdout := shx.RecordStdout()
defer stdout.Release()
gotOutput, err := shx.OutputE("go", "run", "echo.go", "hello world")
gotStdout := stdout.Output()
if err != nil {
t.Fatal(err)
}
wantOutput... | explode_data.jsonl/57105 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 172
} | [
2830,
3393,
4703,
7212,
4062,
65062,
36,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
1255,
70,
42505,
8297,
14359,
11,
330,
1866,
1138,
16867,
2643,
10616,
746,
3160,
1255,
70,
42505,
8297,
14359,
692,
6736,
411,
1669,
557,
87,
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... | 2 |
func TestReconciler_DrainNode_Canary(t *testing.T) {
job := mock.Job()
job.TaskGroups[0].Update = canaryUpdate
// Create a deployment that is paused and has placed some canaries
d := structs.NewDeployment(job)
s := &structs.DeploymentState{
Promoted: false,
DesiredTotal: 10,
DesiredCanaries: 2,
... | explode_data.jsonl/67258 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 890
} | [
2830,
3393,
693,
40446,
5769,
1557,
29093,
1955,
920,
276,
658,
1155,
353,
8840,
836,
8,
341,
68577,
1669,
7860,
45293,
741,
68577,
28258,
22173,
58,
15,
936,
4289,
284,
646,
658,
4289,
271,
197,
322,
4230,
264,
23172,
429,
374,
34495... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ToJSON(t *testing.T) {
t.Parallel()
a := assert.New(t)
s := &digitalocean.Session{}
data := s.Marshal()
a.Equal(data, `{"AuthURL":"","AccessToken":"","RefreshToken":"","ExpiresAt":"0001-01-01T00:00:00Z"}`)
} | explode_data.jsonl/52643 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
38346,
5370,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
1669,
2060,
7121,
1155,
340,
1903,
1669,
609,
57269,
78,
11206,
20674,
31483,
8924,
1669,
274,
37271,
741,
11323,
12808,
2592,
11,
1565,
4913,
5087,
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 TestGetValue(t *testing.T) {
ctx := setupTest(t)
defer ctx.teardownTest()
// regular case
ctx.mockKV.mem["key"] = "data"
result, found, _, err := ctx.dataBroker.GetValue("key")
Expect(err).ShouldNot(HaveOccurred())
Expect(result).NotTo(BeNil())
Expect(found).To(BeTrue())
Expect(result).To(Equal([]byte("d... | explode_data.jsonl/29430 | {
"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,
23213,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6505,
2271,
1155,
340,
16867,
5635,
31853,
37496,
2271,
2822,
197,
322,
5792,
1142,
198,
20985,
15068,
82707,
41493,
1183,
792,
1341,
284,
330,
691,
698,
9559,
11,
1730,
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 TestSingleStatementRollback(t *testing.T) {
if *withRealTiKV {
t.Skip("skip with tikv because cluster manipulate is not available")
}
var cluster testutils.Cluster
store, clean := createMockStoreAndSetup(t, mockstore.WithClusterInspector(func(c testutils.Cluster) {
mockstore.BootstrapWithSingleStore(c)
... | explode_data.jsonl/12453 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 813
} | [
2830,
3393,
10888,
8636,
32355,
1419,
1155,
353,
8840,
836,
8,
341,
743,
353,
4197,
12768,
45351,
82707,
341,
197,
3244,
57776,
445,
20599,
448,
86172,
85,
1576,
10652,
36635,
374,
537,
2500,
1138,
197,
630,
2405,
10652,
1273,
6031,
728... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestARN_IsNil( t *testing.T ) {
for i := 0; i < 2; i++ {
var a *ARN
// i==0 then null, i==1 then instance with ""
// for both IsNil() should return true
if i == 1 {
a = &ARN{}
a.Parse( "" )
}
if a.IsAnonymous() {
t.Errorf( "%d:Expected !IsAnonymous got %v for %s", ... | explode_data.jsonl/61997 | {
"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,
9051,
31879,
19064,
7,
259,
353,
8840,
836,
873,
341,
220,
369,
600,
1669,
220,
15,
26,
600,
366,
220,
17,
26,
600,
1027,
341,
262,
762,
264,
353,
9051,
271,
262,
442,
600,
418,
15,
1221,
845,
11,
600,
418,
16,
1221,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWithCtx(t *testing.T) {
t.Run("Is", func(t *testing.T) {
err := serrors.New("simple err")
errWithCtx := serrors.WithCtx(err, "someCtx", "someValue")
assert.True(t, xerrors.Is(errWithCtx, err))
assert.True(t, xerrors.Is(errWithCtx, errWithCtx))
})
t.Run("As", func(t *testing.T) {
err := &testErrTyp... | explode_data.jsonl/4291 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 328
} | [
2830,
3393,
2354,
23684,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
3872,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
9859,
1669,
274,
7650,
7121,
445,
22944,
1848,
1138,
197,
9859,
2354,
23684,
1669,
274,
7650,
26124,
23684,
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 TestHandleGet(t *testing.T) {
target := "http://test.com/get?something=else"
headers := map[string][]string{"Accept": []string{"*/*"}}
req := newTestRequest(httpServer.handleGet(), target, "GET", testReqHeaders(headers))
if err := req.make(); err != nil {
t.Errorf("Failed to make request. Err: %v", err)
}
... | explode_data.jsonl/72353 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 309
} | [
2830,
3393,
6999,
1949,
1155,
353,
8840,
836,
8,
341,
28861,
1669,
330,
1254,
1110,
1944,
905,
23302,
30,
33331,
28,
1503,
698,
67378,
1669,
2415,
14032,
45725,
917,
4913,
16646,
788,
3056,
917,
4913,
9,
1057,
95642,
24395,
1669,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestDeadline(t *testing.T) {
if !time.Now().Before(NewDeadline(time.Hour * 2).Time) {
t.Error("now is before deadline localtime")
}
if !time.Now().Add(time.Hour * 2).Add(-time.Second).Before(NewDeadline(time.Hour * 2).Time) {
t.Error("now plus 2 hours is before deadline localtime")
}
if !time.Now().Add(... | explode_data.jsonl/69207 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 173
} | [
2830,
3393,
83593,
1155,
353,
8840,
836,
8,
341,
743,
753,
1678,
13244,
1005,
10227,
35063,
83593,
9730,
73550,
353,
220,
17,
568,
1462,
8,
341,
197,
3244,
6141,
445,
3328,
374,
1573,
21428,
87494,
1138,
197,
630,
743,
753,
1678,
1324... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateLogsReceiver(t *testing.T) {
cfg := createDefaultConfig().(*Config)
cfg.Brokers = []string{"invalid:9092"}
cfg.ProtocolVersion = "2.0.0"
f := kafkaReceiverFactory{logsUnmarshalers: defaultLogsUnmarshalers()}
r, err := f.createLogsReceiver(context.Background(), componenttest.NewNopReceiverCreateSetti... | explode_data.jsonl/70859 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
4021,
51053,
25436,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
1855,
3675,
2648,
1005,
4071,
2648,
340,
50286,
1785,
299,
26177,
284,
3056,
917,
4913,
11808,
25,
24,
15,
24,
17,
16707,
50286,
54096,
5637,
284,
330,
17,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFloatIntConversion(t *testing.T) {
unstr := map[string]interface{}{"fd": float64(3)}
var obj F
if err := runtime.NewTestUnstructuredConverter(simpleEquality).FromUnstructured(unstr, &obj); err != nil {
t.Errorf("Unexpected error in FromUnstructured: %v", err)
}
data, err := json.Marshal(unstr)... | explode_data.jsonl/77964 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 274
} | [
2830,
3393,
5442,
1072,
48237,
1155,
353,
8840,
836,
8,
972,
20479,
495,
1669,
2415,
14032,
31344,
6257,
4913,
6902,
788,
2224,
21,
19,
7,
18,
8,
2570,
2405,
2839,
434,
319,
743,
1848,
1669,
15592,
7121,
2271,
1806,
51143,
14920,
1141... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewModuleFromConfig(t *testing.T) {
logp.TestingSetup()
cases := map[string]struct {
config common.MapStr
err bool
expectedOption string
expectedQuery QueryParams
expectedPeriod time.Duration
}{
"normal module": {
config: common.MapStr{"module": "foo", "metricsets... | explode_data.jsonl/9714 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1346
} | [
2830,
3393,
3564,
3332,
3830,
2648,
1155,
353,
8840,
836,
8,
341,
6725,
79,
8787,
287,
21821,
2822,
1444,
2264,
1669,
2415,
14032,
60,
1235,
341,
197,
25873,
260,
4185,
10104,
2580,
198,
197,
9859,
310,
1807,
198,
197,
42400,
5341,
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 TestRoutePrefix(t *testing.T) {
t.Parallel()
dbDir, err := ioutil.TempDir("", "tsdb-ready")
require.NoError(t, err)
defer func() { require.NoError(t, os.RemoveAll(dbDir)) }()
db, err := tsdb.Open(dbDir, nil, nil, nil)
require.NoError(t, err)
opts := &Options{
ListenAddress: ":9091",
ReadTimeout: 3... | explode_data.jsonl/46072 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1201
} | [
2830,
3393,
4899,
14335,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20939,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
2576,
1999,
63915,
1138,
17957,
35699,
1155,
11,
1848,
340,
16867,
2915,
368,
314,
1373,
35699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_translateAffinity(t *testing.T) {
tests := []struct {
name string
svc *model.Service
affinity *apiv1.Affinity
}{
{
name: "none",
svc: &model.Service{
Environment: model.Environment{},
},
affinity: nil,
},
{
name: "only volume mounts",
svc: &model.Service{
Volum... | explode_data.jsonl/23655 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1500
} | [
2830,
3393,
66381,
25841,
13489,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
1903,
7362,
414,
353,
2528,
13860,
198,
197,
197,
2649,
13489,
353,
391,
344,
16,
875,
542,
13489,
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 TestTaskSortByMultipleFlags(t *testing.T) {
testTasklist.LoadFromPath(testInputSort)
taskID := 43
testTasklist = testTasklist[taskID : taskID+7]
if err := testTasklist.Sort(SortTodoTextAsc, SortPriorityDesc); err != nil {
t.Fatal(err)
}
testExpectedList = []string{
"(A) 2020-10-09 Task 1 +Apple +Banana... | explode_data.jsonl/24869 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 782
} | [
2830,
3393,
6262,
10231,
1359,
32089,
9195,
1155,
353,
8840,
836,
8,
341,
18185,
6262,
1607,
13969,
3830,
1820,
8623,
2505,
10231,
340,
49115,
915,
1669,
220,
19,
18,
271,
18185,
6262,
1607,
284,
1273,
6262,
1607,
58,
8202,
915,
549,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBindingSMSC(t *testing.T) {
connection, err := gosmpp.NewTCPIPConnectionWithAddrPort(testSMSCAddr, testSMSCPort)
if err != nil {
t.Error(err)
t.Fail()
return
}
request := PDU.NewBindTransceiver()
request.SetSystemId("smppclient1")
request.SetPassword("password")
request.SetSystemType("CMT")
ses... | explode_data.jsonl/70036 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 260
} | [
2830,
3393,
15059,
9501,
3540,
1155,
353,
8840,
836,
8,
341,
54590,
11,
1848,
1669,
342,
436,
93368,
7121,
7749,
88322,
4526,
2354,
13986,
7084,
8623,
9501,
3540,
13986,
11,
1273,
9501,
3540,
7084,
340,
743,
1848,
961,
2092,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestGetNonce(t *testing.T) {
t.Parallel()
// Bittrex address
addr, _ := ParseAddress("0xfbb1b73c4f0bda4f67dca266ce6ef42f520fbb98")
const min = 4124441 // Nonce at time the test was added.
for _, client := range []*Client{
NewHTTPClient("https://api.myetherapi.com/eth"),
NewClientTransport(InfuraTranspo... | explode_data.jsonl/80660 | {
"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,
1949,
90528,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
425,
1442,
37539,
2621,
198,
53183,
11,
716,
1669,
14775,
4286,
445,
15,
5848,
6066,
16,
65,
22,
18,
66,
19,
69,
15,
65,
3235,
19,
69,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestBaseTable_Schema(t *testing.T) {
tests := []struct {
name string
b *BaseTable
want string
}{
{
name: "1",
b: NewBaseTable("db", "schema", "table"),
want: "schema",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.b.Schema(); got != tt.want {
... | explode_data.jsonl/20040 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
3978,
2556,
1098,
3416,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
2233,
262,
353,
3978,
2556,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
16,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWriteHumanReadableRef(t *testing.T) {
vs := newTestValueStore()
x := Number(42)
rv := vs.WriteValue(x)
assertWriteHRSEqual(t, "#0123456789abcdefghijklmnopqrstuv", rv)
} | explode_data.jsonl/60897 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
7985,
33975,
57938,
3945,
1155,
353,
8840,
836,
8,
341,
5195,
82,
1669,
501,
2271,
1130,
6093,
2822,
10225,
1669,
5624,
7,
19,
17,
340,
78484,
1669,
6165,
4073,
1130,
2075,
340,
6948,
7985,
17088,
925,
1751,
1155,
11,
5869... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrimaryKeyAutoIncrement(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t")
tk.MustExec("create table t (id BIGINT PRIMARY KEY AUTO_INCREMENT NOT NULL, name varchar(255) UNI... | explode_data.jsonl/5721 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 372
} | [
2830,
3393,
25981,
13253,
38311,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransportRequestPathPseudo(t *testing.T) {
type result struct {
path string
err string
}
tests := []struct {
req *http.Request
want result
}{
0: {
req: &http.Request{
Method: "GET",
URL: &url.URL{
Host: "foo.com",
Path: "/foo",
},
},
want: result{path: "/foo"},
... | explode_data.jsonl/16132 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1287
} | [
2830,
3393,
27560,
1900,
1820,
47,
21952,
1155,
353,
8840,
836,
8,
341,
13158,
1102,
2036,
341,
197,
26781,
914,
198,
197,
9859,
220,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
24395,
220,
353,
1254,
9659,
198,
197,
50780,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetCellStyleBorder(t *testing.T) {
f, err := prepareTestBook1()
if !assert.NoError(t, err) {
t.FailNow()
}
var style int
// Test set border on overlapping area with vertical variants shading styles gradient fill.
style, err = f.NewStyle(`{"border":[{"type":"left","color":"0000FF","style":2},{"type":"... | explode_data.jsonl/36969 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 826
} | [
2830,
3393,
1649,
15171,
10691,
1155,
353,
8840,
836,
8,
341,
1166,
11,
1848,
1669,
10549,
2271,
7134,
16,
741,
743,
753,
2207,
35699,
1155,
11,
1848,
8,
341,
197,
3244,
57243,
7039,
741,
197,
630,
2405,
1707,
526,
271,
197,
322,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestAccMonitorPrivateLinkScope_basic(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_monitor_private_link_scope", "test")
r := MonitorPrivateLinkScopeResource{}
data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(da... | explode_data.jsonl/488 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
14603,
30098,
16787,
3939,
10803,
34729,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
25505,
25212,
83920,
1155,
11,
330,
1370,
324,
4195,
40112,
26249,
7233,
23199,
497,
330,
1944,
1138,
7000,
1669,
23519,
16787,
3939,
10803,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMiddlewareAccessNoblockingCustomRoutes(t *testing.T) {
os.Setenv("PREST_DEBUG", "true")
config.Load()
postgres.Load()
app = nil
r := router.Get()
r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("custom route")) })
crudRoutes := mux.NewRouter().PathPrefix("/").Subrouter().... | explode_data.jsonl/51059 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 738
} | [
2830,
3393,
24684,
6054,
45,
674,
89482,
10268,
26653,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
17357,
784,
11139,
497,
330,
1866,
1138,
25873,
13969,
741,
197,
43070,
13969,
741,
28236,
284,
2092,
198,
7000,
1669,
9273,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInvalidTemplate(t *testing.T) {
for template, eerr := range map[string]string{
"{{ .Nope }": `template: tmpl:1: unexpected "}" in operand`,
"{{.Env.NOPE}}": `template: tmpl:1:6: executing "tmpl" at <.Env.NOPE>: map has no entry for key "NOPE"`,
} {
t.Run(template, func(t *testing.T) {
ctx := cont... | explode_data.jsonl/54154 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 219
} | [
2830,
3393,
7928,
7275,
1155,
353,
8840,
836,
8,
341,
2023,
3811,
11,
384,
615,
1669,
2088,
2415,
14032,
30953,
515,
197,
197,
1,
2979,
659,
2753,
375,
335,
788,
262,
1565,
4214,
25,
79839,
25,
16,
25,
16500,
330,
9863,
304,
27213,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChangesetPriorityQueue(t *testing.T) {
assertOrder := func(t *testing.T, q *changesetPriorityQueue, expected []int64) {
t.Helper()
ids := make([]int64, len(q.items))
for i := range ids {
ids[i] = q.items[i].changesetID
}
if diff := cmp.Diff(expected, ids); diff != "" {
t.Fatal(diff)
}
}
n... | explode_data.jsonl/4812 | {
"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,
11317,
295,
20555,
7554,
1155,
353,
8840,
836,
8,
341,
6948,
4431,
1669,
2915,
1155,
353,
8840,
836,
11,
2804,
353,
19365,
295,
20555,
7554,
11,
3601,
3056,
396,
21,
19,
8,
341,
197,
3244,
69282,
741,
197,
197,
3365,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestLoadImagesInK3dNodes(t *testing.T) {
tests := []ImageLoadingTest{
{
description: "load image",
cluster: "k3d",
deployed: []graph.Artifact{{Tag: "tag1"}},
commands: testutil.
CmdRunOut("kubectl --context kubecontext --namespace namespace get nodes -ojsonpath='{@.items[*].status.images[... | explode_data.jsonl/78042 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 986
} | [
2830,
3393,
5879,
14228,
641,
42,
18,
67,
12288,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1906,
8578,
2271,
515,
197,
197,
515,
298,
42407,
25,
330,
1078,
2168,
756,
298,
197,
18855,
25,
257,
330,
74,
18,
67,
756,
298,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.