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 TestKexes(t *testing.T) {
type kexResultErr struct {
result *kexResult
err error
}
for name, kex := range kexAlgoMap {
a, b := memPipe()
s := make(chan kexResultErr, 1)
c := make(chan kexResultErr, 1)
var magics handshakeMagics
go func() {
r, e := kex.Client(a, rand.Reader, &m... | explode_data.jsonl/44229 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 424
} | [
2830,
3393,
42,
327,
288,
1155,
353,
8840,
836,
8,
972,
13158,
595,
327,
2077,
7747,
2036,
972,
197,
9559,
353,
74,
327,
2077,
319,
197,
9859,
262,
1465,
319,
197,
2570,
2023,
829,
11,
595,
327,
1669,
2088,
595,
327,
2101,
3346,
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 TestSwitchCompositeLitIssue801(t *testing.T) {
gopClTest(t, `
type T struct {
X int
}
switch (T{}) {
case T{1}:
panic("bad")
}
`, `package main
type T struct {
X int
}
func main() {
switch (T{}) {
case T{1}:
panic("bad")
}
}
`)
} | explode_data.jsonl/73583 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 116
} | [
2830,
3393,
16837,
41685,
68954,
42006,
23,
15,
16,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
22074,
1313,
350,
2036,
341,
22123,
526,
198,
630,
17338,
320,
51,
28875,
341,
5638,
350,
90,
16,
92,
510,
30764,
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 TestWikiGetAllPagesSorting(t *testing.T) {
ctx, cancel := testhelper.Context()
defer cancel()
stop, serverSocketPath := runWikiServiceServer(t)
defer stop()
client, conn := newWikiClient(t, serverSocketPath)
defer conn.Close()
wikiRepo, _, cleanupFunc := setupWikiRepo(t)
defer cleanupFunc()
expectedPa... | explode_data.jsonl/48805 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1343
} | [
2830,
3393,
53896,
1949,
2403,
17713,
71681,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
1273,
18764,
9328,
741,
16867,
9121,
2822,
62644,
11,
3538,
10286,
1820,
1669,
1598,
53896,
1860,
5475,
1155,
340,
16867,
2936,
2822,
25291,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCatalogConversion(t *testing.T) {
catalog := &osb.CatalogResponse{}
err := json.Unmarshal([]byte(testCatalog), &catalog)
if err != nil {
t.Fatalf("Failed to unmarshal test catalog: %v", err)
}
serviceClasses, servicePlans, err := convertAndFilterCatalog(catalog, nil)
if err != nil {
t.Fatalf("Failed ... | explode_data.jsonl/40486 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 339
} | [
2830,
3393,
41606,
48237,
1155,
353,
8840,
836,
8,
341,
1444,
7750,
1669,
609,
436,
65,
727,
7750,
2582,
16094,
9859,
1669,
2951,
38097,
10556,
3782,
8623,
41606,
701,
609,
26539,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
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... | 5 |
func TestCLI_NewBroker(t *testing.T) {
t.Run("Valid", func(t *testing.T) {
logStub := mocks.NewLoggerStub()
conf := config.Config{
MQTTTCPAddress: ":1883",
MetricsEnabled: true,
MetricsAddress: ":8888",
MetricsPath: "/metrics",
MetricsProfiling: true,
}
b, err := newBroker(conf, logS... | explode_data.jsonl/34032 | {
"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,
63959,
39582,
65545,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
4088,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6725,
33838,
1669,
68909,
7121,
7395,
33838,
741,
197,
67850,
1669,
2193,
10753,
515,
298,
9209,
48,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMultiUpdateOnSameTable(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t")
tk.MustExec("create table t(x int, y int)")
tk.MustExec("insert into t values()")
tk.MustExec("update t t1, t ... | explode_data.jsonl/76264 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1247
} | [
2830,
3393,
20358,
4289,
1925,
19198,
2556,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
741,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEncryptionData(t *testing.T) {
auth := "secret"
//Generates
k1 := GenerateRandomKey()
//Encrypts the key json blob
ek, err := EncryptKey(k1, auth, "")
f := util.TempFilePath()
assert.NoError(t, ek.Save(f))
assert.NoError(t, err)
//Decrypts Json Object
k2, err := ek.Decrypt(auth)
assert.NoError(t, e... | explode_data.jsonl/79082 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 530
} | [
2830,
3393,
79239,
1043,
1155,
353,
8840,
836,
8,
341,
78011,
1669,
330,
20474,
698,
197,
322,
5531,
973,
198,
16463,
16,
1669,
19813,
13999,
1592,
741,
197,
322,
61520,
82,
279,
1376,
2951,
23404,
198,
197,
1225,
11,
1848,
1669,
5545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnescapePattern(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
testCases := []struct {
pattern string
expected string
escapeToken string
}{
{``, ``, `\`},
{``, ``, `\\`},
{`ABC\\`, `ABC\`, `\`},
{`ABC\\\\`, `ABC\\`, `\\`},
{`A\\\\BC`, `A\\BC`, `\`},
{`A\\... | explode_data.jsonl/24151 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 528
} | [
2830,
3393,
1806,
12998,
15760,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
16867,
1487,
77940,
1155,
568,
7925,
1155,
340,
18185,
37302,
1669,
3056,
1235,
341,
197,
3223,
3227,
257,
914,
198,
197,
42400... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWebhookLoopback(t *testing.T) {
stopCh := make(chan struct{})
defer close(stopCh)
webhookPath := "/webhook-test"
called := int32(0)
client, _ := startTestServer(t, stopCh, TestServerSetup{
ModifyServerRunOptions: func(opts *options.ServerRunOptions) {
},
ModifyServerConfig: func(config *master.Co... | explode_data.jsonl/11938 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 905
} | [
2830,
3393,
5981,
20873,
14620,
1419,
1155,
353,
8840,
836,
8,
341,
62644,
1143,
1669,
1281,
35190,
2036,
37790,
16867,
3265,
60170,
1143,
692,
97250,
20873,
1820,
1669,
3521,
2911,
20873,
16839,
1837,
1444,
4736,
1669,
526,
18,
17,
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 |
func TestDPAReconciler_getGCPRegistryEnvVars(t *testing.T) {
tests := []struct {
name string
bsl *velerov1.BackupStorageLocation
wantRegistryContainerEnvVar []corev1.EnvVar
secret *corev1.Secret
wantErr bool
}{
{
na... | explode_data.jsonl/45545 | {
"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,
35,
8041,
693,
40446,
5769,
3062,
38,
7123,
15603,
14359,
28305,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
664,
914,
198,
197,
93801,
75,
5108,
353,
889,
261,
859,
16,
8864,
454,
5793,
4707,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSubscribeTBT(t *testing.T) {
r := prework()
var res bool
var err error
// 添加你的方法
r.AddDepthHook(func(ts time.Time, data DepthData) error {
//fmt.Println("这是自定义AddBookMsgHook")
fmt.Println("当前数据是:", data)
return nil
})
param := map[string]string{}
param["channel"] = "books-l2-tbt"
//param["chan... | explode_data.jsonl/61329 | {
"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,
28573,
51,
17602,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
855,
1778,
741,
2405,
592,
1807,
198,
2405,
1848,
1465,
271,
197,
322,
82339,
103929,
39907,
198,
7000,
1904,
19776,
31679,
18552,
35864,
882,
16299,
11,
821,
43920... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceList(t *testing.T) {
t.Run("success", func(t *testing.T) {
// GIVEN
mockRepository := &automock.Repository{}
defer mockRepository.AssertExpectations(t)
ctx := context.TODO()
givenDefs := []model.LabelDefinition{
{
Tenant: "tenant",
Key: "key1",
},
{
Tenant: "tenant",
... | explode_data.jsonl/76924 | {
"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,
1860,
852,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5630,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
322,
89836,
198,
197,
77333,
4624,
1669,
609,
27073,
1176,
25170,
16094,
197,
16867,
7860,
4624,
11711,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCopyFromImageLock(t *testing.T) {
env := helpers.BuildEnv(t)
imgpkg := helpers.Imgpkg{T: t, L: helpers.Logger{}, ImgpkgPath: env.ImgpkgPath}
logger := helpers.Logger{}
defer env.Cleanup()
randomImageDigest := ""
randomImageDigestRef := ""
logger.Section("create random image for tests", func() {
rando... | explode_data.jsonl/45463 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1115
} | [
2830,
3393,
12106,
3830,
1906,
11989,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
30187,
25212,
14359,
1155,
340,
39162,
30069,
1669,
30187,
13,
13033,
30069,
76025,
25,
259,
11,
444,
25,
30187,
12750,
22655,
2362,
21888,
7351,
1820,
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 TestRejectModelSpecMissing(t *testing.T) {
g := gomega.NewGomegaWithT(t)
kfsvc := TFExampleKFService.DeepCopy()
kfsvc.Spec.Default.Tensorflow = nil
g.Expect(kfsvc.ValidateCreate()).Should(gomega.MatchError("Exactly one of [Custom, Tensorflow, ScikitLearn, XGBoost] may be specified in ModelSpec"))
} | explode_data.jsonl/50832 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 116
} | [
2830,
3393,
78413,
1712,
8327,
25080,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
340,
16463,
69,
58094,
1669,
29145,
13314,
65008,
1860,
55602,
12106,
741,
16463,
69,
58094,
36473,
13275,
44203,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBigIntToUintBytes_128(t *testing.T) {
b := big.NewInt(0)
b.SetBytes([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x34})
res, err := BigIntToUintBytes(b, 16)
assert.NoError(t, err)
assert.Equal(t, MustHexDecodeString("0x00000000000000000000000000001234"), res)
} | explode_data.jsonl/18433 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
87474,
1249,
21570,
7078,
62,
16,
17,
23,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
2409,
7121,
1072,
7,
15,
340,
2233,
4202,
7078,
10556,
3782,
90,
15,
87,
15,
11,
220,
15,
87,
15,
11,
220,
15,
87,
15,
11,
220,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWaitWithCancelledContext(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithCancel(context.Background())
go func() {
time.Sleep(100 * time.Millisecond)
cancel()
}()
err := wait(ctx, 1*time.Hour)
assert.True(t, errors.Is(err, context.Canceled))
} | explode_data.jsonl/82067 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
14190,
2354,
39473,
1972,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
30680,
2915,
368,
341,
197,
21957,
31586,
7,
16,
15,
15,
353,
882,
71482,
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 TestGeneratePKIXPublicKeyIdFromPrivateKey(t *testing.T) {
tcs := []struct {
name string
privateKey []byte
expectedError bool
}{
{
name: "generate rsa private key id successful",
privateKey: []byte(rsa2048PrivateKey),
expectedError: false,
}, {
name: "generat... | explode_data.jsonl/59157 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 409
} | [
2830,
3393,
31115,
22242,
5396,
61822,
764,
3830,
75981,
1155,
353,
8840,
836,
8,
341,
3244,
4837,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
2455,
1592,
262,
3056,
3782,
198,
197,
42400,
1454,
1807,
198,
197,
59403,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestSokuon(t *testing.T) {
const want = "nn"
for _, v := range []string{"っん", "ッン"} {
got, err := KanaToRomaji(v)
assert.Equal(t, want, got)
assert.Nil(t, err)
}
} | explode_data.jsonl/11342 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 86
} | [
2830,
3393,
50,
16493,
263,
1155,
353,
8840,
836,
8,
341,
4777,
1366,
284,
330,
7370,
1837,
2023,
8358,
348,
1669,
2088,
3056,
917,
4913,
41791,
24791,
497,
330,
25204,
15698,
9207,
341,
197,
3174,
354,
11,
1848,
1669,
730,
3362,
1249... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileStoreGet(t *testing.T) {
path, tearDown := setupConfigFile(t, testConfig)
defer tearDown()
fs, err := config.NewFileStore(path, false)
require.NoError(t, err)
configStore, err := config.NewStoreFromBacking(fs, nil, false)
require.NoError(t, err)
defer configStore.Close()
cfg := configStore.Get()
... | explode_data.jsonl/32379 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 262
} | [
2830,
3393,
1703,
6093,
1949,
1155,
353,
8840,
836,
8,
341,
26781,
11,
32825,
1669,
6505,
2648,
1703,
1155,
11,
1273,
2648,
340,
16867,
32825,
2822,
53584,
11,
1848,
1669,
2193,
7121,
1703,
6093,
5581,
11,
895,
340,
17957,
35699,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEncodeAsKeyEdgeCases(t *testing.T) {
_, err := EncodeAsKey(nil, IntegerType, 0)
require.ErrorIs(t, err, ErrInvalidValue)
_, err = EncodeAsKey("a", VarcharType, maxKeyLen+1)
require.ErrorIs(t, err, ErrMaxKeyLengthExceeded)
_, err = EncodeAsKey("a", "NOTATYPE", maxKeyLen)
require.ErrorIs(t, err, ErrInval... | explode_data.jsonl/64097 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 525
} | [
2830,
3393,
32535,
2121,
1592,
11656,
37302,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
56562,
2121,
1592,
27907,
11,
4440,
929,
11,
220,
15,
340,
17957,
6141,
3872,
1155,
11,
1848,
11,
15495,
7928,
1130,
692,
197,
6878,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOverwrite(t *testing.T) {
tests := []struct {
name string
key func(int) interface{}
}{
{name: "uintptr", key: uKey},
{name: "int", key: iKey},
{name: "string", key: sKey},
{name: "[]byte", key: bKey},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
m := &HashMap{}
ele... | explode_data.jsonl/24422 | {
"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,
1918,
4934,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
23634,
220,
2915,
1548,
8,
3749,
16094,
197,
59403,
197,
197,
47006,
25,
330,
51380,
497,
1376,
25,
575,
1592,
1583,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLargeDefs(t *testing.T) {
testenv.MustHaveGoBuild(t)
dir := tmpDir(t)
defer os.RemoveAll(dir)
large := filepath.Join(dir, "large.go")
f, err := os.Create(large)
if err != nil {
t.Fatal(err)
}
b := bufio.NewWriter(f)
printf := func(format string, args ...interface{}) {
_, err := fmt.Fprintf(b, fo... | explode_data.jsonl/67507 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 654
} | [
2830,
3393,
34253,
56031,
1155,
353,
8840,
836,
8,
341,
18185,
3160,
50463,
12116,
10850,
11066,
1155,
692,
48532,
1669,
4174,
6184,
1155,
340,
16867,
2643,
84427,
14161,
340,
8810,
2744,
1669,
26054,
22363,
14161,
11,
330,
16767,
18002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestKubeadmConfigReconciler_Reconcile_DoesNotFailIfCASecretsAlreadyExist(t *testing.T) {
g := NewWithT(t)
cluster := newCluster("my-cluster")
cluster.Status.InfrastructureReady = true
cluster.Status.ControlPlaneInitialized = false
m := newControlPlaneMachine(cluster, "control-plane-machine")
configName := "... | explode_data.jsonl/44330 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 419
} | [
2830,
3393,
42,
392,
3149,
76,
2648,
693,
40446,
5769,
50693,
40446,
457,
1557,
7072,
2623,
19524,
2679,
87516,
50856,
82,
38370,
25613,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
2354,
51,
1155,
692,
197,
18855,
1669,
501,
28678,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_New(t *testing.T) {
r := require.New(t)
g, err := New(&Options{
Name: "widget",
})
r.NoError(err)
run := gentest.NewRunner()
run.With(g)
r.NoError(run.Run())
res := run.Results()
r.Len(res.Commands, 0)
r.Len(res.Files, 2)
r.NoError(gentest.CompareFiles([]string{"models/widget.go", "models/w... | explode_data.jsonl/6874 | {
"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,
39582,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1373,
7121,
1155,
692,
3174,
11,
1848,
1669,
1532,
2099,
3798,
515,
197,
21297,
25,
330,
9797,
756,
197,
3518,
7000,
35699,
3964,
692,
56742,
1669,
15886,
477,
7121,
19486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSyncToUnsignedCommit(t *testing.T) {
SkipOnEnv(t, "GPG")
Given(t).
Project("gpg").
Path(guestbookPath).
When().
IgnoreErrors().
CreateApp().
Sync().
Then().
Expect(OperationPhaseIs(OperationError)).
Expect(SyncStatusIs(SyncStatusCodeOutOfSync)).
Expect(HealthIs(health.HealthStatusMissing)... | explode_data.jsonl/35615 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 129
} | [
2830,
3393,
12154,
1249,
56421,
33441,
1155,
353,
8840,
836,
8,
341,
7568,
13389,
1925,
14359,
1155,
11,
330,
38,
11383,
1138,
9600,
2071,
1155,
4292,
197,
197,
7849,
445,
70,
3517,
38609,
197,
69640,
3268,
3045,
2190,
1820,
4292,
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 TestOrphanPartitionCleanup(t *testing.T) {
// Explicitly create orphan index folder.
// Restart the indexer
// Check if orphan index folder gets deleted.
if clusterconfig.IndexUsing == "forestdb" {
fmt.Println("Not running TestOrphanPartitionCleanup for forestdb")
return
}
absIndexStorageDir := getInde... | explode_data.jsonl/59153 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 672
} | [
2830,
3393,
2195,
9943,
49978,
67335,
1155,
353,
8840,
836,
8,
341,
197,
322,
31330,
398,
1855,
12746,
1922,
8527,
624,
197,
322,
56801,
279,
87216,
198,
197,
322,
4248,
421,
12746,
1922,
8527,
5221,
11062,
382,
743,
10652,
1676,
18338,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInlineBreakpoint(t *testing.T) {
// We should be able to set a breakpoint on the call site of an inlined function.
if ver, _ := goversion.Parse(runtime.Version()); ver.Major >= 0 && !ver.AfterOrEqual(goversion.GoVersion{Major: 1, Minor: 10, Rev: -1}) {
// Versions of go before 1.10 do not have DWARF inform... | explode_data.jsonl/56314 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 396
} | [
2830,
3393,
25324,
22524,
2768,
1155,
353,
8840,
836,
8,
341,
197,
322,
1205,
1265,
387,
2952,
311,
738,
264,
52745,
389,
279,
1618,
2747,
315,
458,
304,
15121,
729,
624,
743,
2739,
11,
716,
1669,
728,
4366,
8937,
89467,
35842,
13426,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPullRequestReview_String(t *testing.T) {
v := PullRequestReview{
ID: Int64(0),
NodeID: String(""),
User: &User{},
Body: String(""),
CommitID: String(""),
HTMLURL: String(""),
PullRequestURL: String(""),
State: String(""),
}
want :... | explode_data.jsonl/33271 | {
"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,
36068,
1900,
19432,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
31828,
1900,
19432,
515,
197,
29580,
25,
1797,
1333,
21,
19,
7,
15,
1326,
197,
30217,
915,
25,
260,
923,
445,
4461,
197,
31672,
25,
1843,
609,
1474,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBcrypt(t *testing.T) {
p := config.MustNew(t, logrusx.New("", ""), configx.SkipValidation())
require.NoError(t, p.Set(config.ViperKeyHasherBcryptCost, 4))
require.NoError(t, p.Set("dev", false))
assert.EqualValues(t, uint32(12), p.HasherBcrypt().Cost)
require.NoError(t, p.Set("dev", true))
assert.Equal... | explode_data.jsonl/52908 | {
"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,
33,
48125,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
2193,
50463,
3564,
1155,
11,
1487,
20341,
87,
7121,
19814,
77130,
2193,
87,
57776,
13799,
12367,
17957,
35699,
1155,
11,
281,
4202,
8754,
5058,
12858,
1592,
6370,
261,
33,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRegenerateOAuthAppSecret(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
Client := th.Client
AdminClient := th.SystemAdminClient
defaultRolePermissions := th.SaveDefaultRolePermissions()
enableOAuthServiceProvider := th.App.Config().ServiceSettings.EnableOAuthServiceProvider
defer func() ... | explode_data.jsonl/30130 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 863
} | [
2830,
3393,
3477,
13220,
57850,
2164,
19773,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
198,
197,
7210,
2959,
1669,
270,
16620,
7210,
2959,
271,
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 Test_Sku_Status_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
t.Parallel()
parameters := gopter.DefaultTestParameters()
parameters.MaxSize = 10
properties := gopter.NewProperties(parameters)
properties.Property(
"Round trip of Sku_Status via JSON returns original",
prop.ForAll(RunJSONSerializat... | explode_data.jsonl/44563 | {
"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,
1098,
12133,
36449,
62,
4498,
77521,
78967,
98054,
2848,
4756,
2121,
2993,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
67543,
1669,
728,
73137,
13275,
2271,
9706,
741,
67543,
14535,
1695,
284,
220,
16,
15,
198,
869... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDepositAddress(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() {
t.Skip("API keys required but not set, skipping test")
}
_, err := f.GetDepositAddress(context.Background(), currency.NewCode("FTT"), "")
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/15230 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
1949,
78982,
4286,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
341,
197,
3244,
57776,
445,
7082,
6894,
2567,
714,
537,
738,
11,
42659,
1273,
1138,
197,
532,
197,
6878,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFormatWithdrawPermissions(t *testing.T) {
// Arrange
c.SetDefaults()
expectedResult := exchange.WithdrawCryptoViaWebsiteOnlyText + " & " + exchange.WithdrawFiatViaWebsiteOnlyText
// Act
withdrawPermissions := c.FormatWithdrawPermissions()
// Assert
if withdrawPermissions != expectedResult {
t.Errorf("... | explode_data.jsonl/21361 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
4061,
92261,
23851,
1155,
353,
8840,
836,
8,
341,
197,
322,
40580,
198,
1444,
4202,
16273,
741,
42400,
2077,
1669,
9289,
26124,
7633,
58288,
54428,
30051,
7308,
1178,
488,
330,
609,
330,
488,
9289,
26124,
7633,
37,
10358,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNodes(t *testing.T) {
// single node
single := &node{
id: testNodeId,
address: testNodeAddress,
peers: make(map[string]*node),
network: newNetwork(Name(testNodeNetName)),
}
// get all the nodes including yourself
nodes := single.Nodes()
nodeCount := 1
if len(nodes) != nodeCount {
t.Err... | explode_data.jsonl/23544 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 512
} | [
2830,
3393,
12288,
1155,
353,
8840,
836,
8,
341,
197,
322,
3175,
2436,
198,
1903,
2173,
1669,
609,
3509,
515,
197,
15710,
25,
414,
1273,
79206,
345,
197,
63202,
25,
1273,
1955,
4286,
345,
197,
197,
375,
388,
25,
256,
1281,
9147,
140... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWhichTimezoneIsMidnightAt(t *testing.T) {
s := is.New(t)
// let it be midnight in Greenwich first
utcHour := 0
s.Equal(WhichTimezoneIsMidnightAt(utcHour, 0), 0)
// Rio (-3)
utcHour = 3
s.Equal(WhichTimezoneIsMidnightAt(utcHour, 0), -3*60*60)
// San Francisco (-7)
utcHour = 7
s.Equal(WhichTimezoneI... | explode_data.jsonl/25486 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 417
} | [
2830,
3393,
23085,
1462,
8684,
3872,
33648,
9287,
1655,
1155,
353,
8840,
836,
8,
1476,
1903,
1669,
374,
7121,
1155,
340,
197,
322,
1077,
432,
387,
32333,
304,
85838,
1156,
198,
197,
28355,
30254,
1669,
220,
15,
198,
1903,
12808,
7,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetDependencies(t *testing.T) {
tests := []struct {
description string
workspace string
target string
files map[string]string
expectedQuery string
output string
expected []string
shouldErr bool
}{
{
description: "with WORKSPACE",
workspace: ".",
... | explode_data.jsonl/61216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 951
} | [
2830,
3393,
1949,
48303,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
42407,
256,
914,
198,
197,
197,
42909,
257,
914,
198,
197,
28861,
286,
914,
198,
197,
74075,
260,
2415,
14032,
30953,
198,
197,
42400,
2859,
914... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIDAllocatorNegativeValue(t *testing.T) {
defer leaktest.AfterTest(t)
store, _, stopper := createTestStore(t)
defer stopper.Stop()
// Increment our key to a negative value.
newValue, err := engine.MVCCIncrement(store.Engine(), nil, keys.RaftIDGenerator, store.ctx.Clock.Now(), nil, -1024)
if err != nil {
... | explode_data.jsonl/45458 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
915,
42730,
38489,
1130,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
340,
57279,
11,
8358,
2936,
712,
1669,
1855,
2271,
6093,
1155,
340,
16867,
2936,
712,
30213,
2822,
197,
322,
52835,
1039,
1376,
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... | 6 |
func TestGenerateMetricTasksInterval(t *testing.T) {
run := &v1alpha1.AnalysisRun{
Spec: v1alpha1.AnalysisRunSpec{
Metrics: []v1alpha1.Metric{{
Name: "success-rate",
Interval: "60s",
}},
},
Status: v1alpha1.AnalysisRunStatus{
Phase: v1alpha1.AnalysisPhaseRunning,
MetricResults: []v1alpha1... | explode_data.jsonl/75807 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 540
} | [
2830,
3393,
31115,
54310,
25449,
10256,
1155,
353,
8840,
836,
8,
341,
56742,
1669,
609,
85,
16,
7141,
16,
8624,
9092,
6727,
515,
197,
7568,
992,
25,
348,
16,
7141,
16,
8624,
9092,
6727,
8327,
515,
298,
9209,
13468,
25,
3056,
85,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPercentiles(t *testing.T) {
N := 100
backend := memory.New(N*2, N*2)
driver := MemoryCache(N, N, backend)
test.StorageDriverTestPercentiles(driver, t)
} | explode_data.jsonl/16178 | {
"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,
32010,
3658,
1155,
353,
8840,
836,
8,
341,
18317,
1669,
220,
16,
15,
15,
198,
197,
20942,
1669,
4938,
7121,
8204,
9,
17,
11,
451,
9,
17,
340,
33652,
1669,
13850,
8233,
8204,
11,
451,
11,
19163,
340,
18185,
43771,
11349,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCaveGenerate(t *testing.T) {
c := &cave{}
c.Generate(80, 40)
w, h := c.Size()
if w != 81 || h != 41 {
t.Error("Could not create grid")
}
// c.dump() // view level.
} | explode_data.jsonl/23297 | {
"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,
34,
523,
31115,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
609,
66,
523,
16094,
1444,
57582,
7,
23,
15,
11,
220,
19,
15,
340,
6692,
11,
305,
1669,
272,
2465,
741,
743,
289,
961,
220,
23,
16,
1369,
305,
961,
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... | 3 |
func TestAbsCollection_Push(t *testing.T) {
intColl := NewIntCollection([]int{1, 2, 3, 4, 5, 6})
intColl.Push(7)
if intColl.Count() != 7 {
t.Fatal("Push 后本体错误")
}
} | explode_data.jsonl/66446 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 85
} | [
2830,
3393,
27778,
6482,
1088,
1116,
1155,
353,
8840,
836,
8,
341,
2084,
15265,
1669,
1532,
1072,
6482,
10556,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
3518,
2084,
15265,
34981,
7,
22,
340,
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... | 2 |
func TestPatternMonths(t *testing.T) {
f := newTestLister(t)
entries, err := months(context.Background(), f, "potato/", []string{"", "2020"})
require.NoError(t, err)
assert.Equal(t, 12, len(entries))
for i, entry := range entries {
assert.Equal(t, fmt.Sprintf("potato/2020-%02d", i+1), entry.Remote())
}
} | explode_data.jsonl/24369 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
15760,
59184,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
2271,
852,
261,
1155,
340,
197,
12940,
11,
1848,
1669,
3951,
5378,
19047,
1507,
282,
11,
330,
19099,
4330,
28105,
3056,
917,
4913,
497,
330,
17,
15,
17,
15,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDescribeServiceAccount(t *testing.T) {
fake := fake.NewSimpleClientset(&api.ServiceAccount{
ObjectMeta: metav1.ObjectMeta{
Name: "bar",
Namespace: "foo",
},
Secrets: []api.ObjectReference{
{
Name: "test-objectref",
},
},
ImagePullSecrets: []api.LocalObjectReference{
{
Nam... | explode_data.jsonl/34950 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 433
} | [
2830,
3393,
74785,
1860,
7365,
1155,
353,
8840,
836,
8,
341,
1166,
726,
1669,
12418,
7121,
16374,
2959,
746,
2099,
2068,
13860,
7365,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
414,
330,
2257,
756,
298,
90823,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvalidateAllEmailInvites(t *testing.T) {
th := Setup(t)
defer th.TearDown()
t.Run("Forbidden when request performed by system user", func(t *testing.T) {
ok, res := th.Client.InvalidateEmailInvites()
require.Equal(t, false, ok)
CheckForbiddenStatus(t, res)
})
t.Run("OK when request performed by s... | explode_data.jsonl/70746 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 342
} | [
2830,
3393,
641,
7067,
2403,
4781,
15174,
3611,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
340,
16867,
270,
836,
682,
4454,
2822,
3244,
16708,
445,
69115,
979,
1681,
10660,
553,
1849,
1196,
497,
2915,
1155,
353,
8840,
836,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_BeginAuth(t *testing.T) {
t.Parallel()
a := assert.New(t)
p := provider()
session, err := p.BeginAuth("test_state")
s := session.(*salesforce.Session)
a.NoError(err)
a.Contains(s.AuthURL, "login.salesforce.com/services/oauth2/authorize")
} | explode_data.jsonl/30759 | {
"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,
93447,
5087,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
1669,
2060,
7121,
1155,
340,
3223,
1669,
9109,
741,
25054,
11,
1848,
1669,
281,
28467,
5087,
445,
1944,
4387,
1138,
1903,
1669,
3797,
41399,
29041,
88... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChildDeletedEvent(t *testing.T) {
cluster := newCluster(testPod, testRS, testDeploy)
err := cluster.ensureSynced()
assert.Nil(t, err)
err = cluster.processEvent(watch.Deleted, testPod)
assert.Nil(t, err)
rsChildren := cluster.getChildren(testRS)
assert.Equal(t, []appv1.ResourceNode{}, rsChildren)
} | explode_data.jsonl/75182 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
3652,
26039,
1556,
1155,
353,
8840,
836,
8,
341,
197,
18855,
1669,
501,
28678,
8623,
23527,
11,
1273,
11451,
11,
1273,
69464,
340,
9859,
1669,
10652,
63065,
12154,
291,
741,
6948,
59678,
1155,
11,
1848,
692,
9859,
284,
10652... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPublicKeyHex(t *testing.T) {
t.Parallel()
want := "3132333435363738393031323334353637383930313233343536373839303132"
if id1.PublicKeyHex() != want {
t.Errorf("PublicKeyHex() = %s, want %s", id1.PublicKeyHex(), want)
}
} | explode_data.jsonl/7129 | {
"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,
61822,
20335,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
50780,
1669,
330,
18,
16,
18,
17,
18,
18,
18,
19,
18,
20,
18,
21,
18,
22,
18,
23,
18,
24,
18,
15,
18,
16,
18,
17,
18,
18,
18,
19,
18,
20,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNonEmptyLogFile(t *testing.T) {
is := is.New(t)
m, err := NewMemtable(10000, "/tmp/memtable.log")
is.NoErr(err)
val, found := m.Get("key1")
is.True(found)
is.Equal(val, "value1")
_, found = m.Get("key2")
is.True(!found)
val, found = m.Get("key3")
is.True(found)
is.Equal(val, "new_value")
m.Clea... | explode_data.jsonl/56389 | {
"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,
8121,
3522,
98857,
1155,
353,
8840,
836,
8,
341,
19907,
1669,
374,
7121,
1155,
340,
2109,
11,
1848,
1669,
1532,
18816,
2005,
7,
16,
15,
15,
15,
15,
11,
3521,
5173,
3183,
336,
2005,
1665,
1138,
19907,
16766,
7747,
3964,
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... | 1 |
func TestEntry_TappedSecondary(t *testing.T) {
entry, window := setupImageTest(false)
defer teardownImageTest(window)
c := window.Canvas()
test.AssertImageMatches(t, "entry/tapped_secondary_initial.png", c.Capture())
tapPos := fyne.NewPos(20, 10)
test.TapSecondaryAt(entry, tapPos)
test.AssertImageMatches(t, "e... | explode_data.jsonl/57332 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 424
} | [
2830,
3393,
5874,
1139,
5677,
48963,
1155,
353,
8840,
836,
8,
341,
48344,
11,
3241,
1669,
6505,
1906,
2271,
3576,
340,
16867,
49304,
1906,
2271,
15906,
340,
1444,
1669,
3241,
54121,
2822,
18185,
11711,
1906,
42470,
1155,
11,
330,
4085,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCycles(t *testing.T) {
sc, c, cleanup := createContexts(t)
defer cleanup()
root, _, _, stopper := createNamespace(t, sc)
defer stopper()
ns := v23.GetNamespace(c)
ns.SetRoots(root.name)
c1 := runMT(t, c, "c1")
c2 := runMT(t, c, "c2")
c3 := runMT(t, c, "c3")
defer c1.stop()
defer c2.stop()
defer c... | explode_data.jsonl/8230 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 718
} | [
2830,
3393,
34,
15805,
1155,
353,
8840,
836,
8,
341,
29928,
11,
272,
11,
21290,
1669,
83674,
82,
1155,
340,
16867,
21290,
2822,
33698,
11,
8358,
8358,
2936,
712,
1669,
1855,
22699,
1155,
11,
1136,
340,
16867,
2936,
712,
741,
84041,
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... | 7 |
func TestReadRootValidation(t *testing.T) {
cases := []struct {
note string
files [][2]string
err string
}{
{
note: "default full extent",
files: [][2]string{
{"/.manifest", `{"revision": "abcd"}`},
{"/data.json", `{"a": 1}`},
{"/x.rego", `package foo`},
},
err: "",
},
{
note... | explode_data.jsonl/55375 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1171
} | [
2830,
3393,
4418,
8439,
13799,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
9038,
1272,
220,
914,
198,
197,
74075,
508,
1457,
17,
30953,
198,
197,
9859,
256,
914,
198,
197,
59403,
197,
197,
515,
298,
9038,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSubmitStartupFail(t *testing.T) {
// Tests the case where we submit a job that fails to start up we want to immediately roll back, even though
// the Flink API unhelpfully returns a 500 in that case
httpmock.Activate()
defer httpmock.DeactivateAndReset()
ctx := context.Background()
responder := httpmock... | explode_data.jsonl/32367 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 258
} | [
2830,
3393,
8890,
39076,
19524,
1155,
353,
8840,
836,
8,
341,
197,
322,
20150,
279,
1142,
1380,
582,
9318,
264,
2618,
429,
14525,
311,
1191,
705,
582,
1366,
311,
7069,
6502,
1182,
11,
1496,
3498,
198,
197,
322,
279,
434,
2080,
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... | 1 |
func TestBadConfigs(t *testing.T) {
for _, ee := range expectedErrors {
_, err := LoadFile("testdata/" + ee.filename)
testutil.NotOk(t, err, "%s", ee.filename)
testutil.Assert(t, strings.Contains(err.Error(), ee.errMsg),
"Expected error for %s to contain %q but got: %s", ee.filename, ee.errMsg, err)
}
} | explode_data.jsonl/74674 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
17082,
84905,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
36343,
1669,
2088,
3601,
13877,
341,
197,
197,
6878,
1848,
1669,
8893,
1703,
445,
92425,
11225,
488,
36343,
30882,
340,
197,
18185,
1314,
15000,
11578,
1155,
11,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSpanProcessor_SeparatorMultipleKeys(t *testing.T) {
factory := NewFactory()
cfg := factory.CreateDefaultConfig()
oCfg := cfg.(*Config)
oCfg.Rename.FromAttributes = []string{"key1", "key2", "key3", "key4"}
oCfg.Rename.Separator = "::"
tp, err := factory.CreateTracesProcessor(context.Background(), compon... | explode_data.jsonl/51041 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 375
} | [
2830,
3393,
12485,
22946,
1098,
91640,
32089,
8850,
1155,
353,
8840,
836,
8,
1476,
1166,
2919,
1669,
1532,
4153,
741,
50286,
1669,
8633,
7251,
3675,
2648,
741,
22229,
42467,
1669,
13286,
41399,
2648,
340,
22229,
42467,
2013,
1840,
11439,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWasAnyOperationErroneous(t *testing.T) {
emptySyncher := setupTest(0, nil)
if emptySyncher.WasAnyOperationErroneous() {
t.Errorf("An empty Syncher object shall not think that any CNI operations were erroneous!")
}
failSyncher := setupTest(len(failingTestConsts), failingTestConsts)
if !failSync... | explode_data.jsonl/69740 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
26034,
8610,
8432,
7747,
603,
782,
1155,
353,
8840,
836,
8,
341,
220,
4287,
37134,
9034,
1669,
6505,
2271,
7,
15,
11,
2092,
340,
220,
421,
4287,
37134,
9034,
1175,
300,
8610,
8432,
7747,
603,
782,
368,
341,
257,
259,
130... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteStreamPropagate(t *testing.T) {
defer cleanupStorage(t)
// Use a central NATS server.
ns := natsdTest.RunDefaultServer()
defer ns.Shutdown()
// Configure first server.
s1Config := getTestConfig("a", true, 0)
s1 := runServerWithConfig(t, s1Config)
defer s1.Stop()
// Configure second server.
s... | explode_data.jsonl/34466 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 288
} | [
2830,
3393,
6435,
3027,
2008,
46836,
1155,
353,
8840,
836,
8,
341,
16867,
21290,
5793,
1155,
692,
197,
322,
5443,
264,
8622,
18248,
50,
3538,
624,
84041,
1669,
308,
1862,
67,
2271,
16708,
3675,
5475,
741,
16867,
12268,
10849,
18452,
282... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_signVerify(t *testing.T) {
priv := "ED77803C1C04AD646C3F0245B6D506EE6DF7A022187921F4D2ABCAF22012F72B"
privBytes, _ := hex.DecodeString(priv)
msg := "hello,world"
signature, _ := crypto.Sign(privBytes, []byte(msg))
pub, _ := GetPublicKeyFromPrivKey(priv)
err := crypto.Verify(*pub, []byte(msg), signature)... | explode_data.jsonl/48161 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 155
} | [
2830,
3393,
11172,
32627,
1155,
353,
8840,
836,
8,
341,
71170,
1669,
330,
1479,
22,
22,
23,
15,
18,
34,
16,
34,
15,
19,
1808,
21,
19,
21,
34,
18,
37,
15,
17,
19,
20,
33,
21,
35,
20,
15,
21,
7099,
21,
5262,
22,
32,
15,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestWatchCompactRevision(t *testing.T) {
integration2.BeforeTest(t)
clus := integration2.NewClusterV3(t, &integration2.ClusterConfig{Size: 1})
defer clus.Terminate(t)
// set some keys
kv := clus.RandClient()
for i := 0; i < 5; i++ {
if _, err := kv.Put(context.TODO(), "foo", "bar"); err != nil {
t.Fat... | explode_data.jsonl/28930 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 409
} | [
2830,
3393,
14247,
98335,
33602,
1155,
353,
8840,
836,
8,
341,
2084,
17376,
17,
31153,
2271,
1155,
692,
197,
4163,
1669,
17590,
17,
7121,
28678,
53,
18,
1155,
11,
609,
60168,
17,
72883,
2648,
90,
1695,
25,
220,
16,
3518,
16867,
1185,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplicationContext_NestedAutowireBean(t *testing.T) {
c, ch := container()
c.Provide(func() int { return 3 })
c.Object(new(NestedAutowireBean))
c.Object(&PtrNestedAutowireBean{
SubNestedAutowireBean: new(SubNestedAutowireBean),
})
err := c.Refresh()
assert.Nil(t, err)
p := <-ch
var b *NestedAutow... | explode_data.jsonl/17422 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 241
} | [
2830,
3393,
19736,
1604,
9980,
32,
9616,
554,
10437,
1155,
353,
8840,
836,
8,
1476,
1444,
11,
521,
1669,
5476,
741,
1444,
7763,
19448,
18552,
368,
526,
314,
470,
220,
18,
2751,
1444,
8348,
1755,
8204,
9980,
32,
9616,
554,
10437,
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,
1,
1,
1... | 1 |
func TestEvaluators(t *testing.T) {
t.Run("greater then", func(t *testing.T) {
require.True(t, evaluatorScenario(t, `{"type": "gt", "params": [1] }`, 3))
require.False(t, evaluatorScenario(t, `{"type": "gt", "params": [3] }`, 1))
})
t.Run("less then", func(t *testing.T) {
require.False(t, evaluatorScenario(t,... | explode_data.jsonl/3490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 764
} | [
2830,
3393,
36,
25510,
2973,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
65235,
1221,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
17957,
32443,
1155,
11,
69810,
54031,
1155,
11,
1565,
4913,
1313,
788,
330,
5178,
497,
330,
3519,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEqEmptyToSql(t *testing.T) {
sql, args, err := Eq{}.ToSql()
assert.NoError(t, err)
expectedSql := "(1=1)"
assert.Equal(t, expectedSql, sql)
assert.Empty(t, args)
} | explode_data.jsonl/44159 | {
"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,
27312,
3522,
1249,
8269,
1155,
353,
8840,
836,
8,
341,
30633,
11,
2827,
11,
1848,
1669,
33122,
46391,
1249,
8269,
741,
6948,
35699,
1155,
11,
1848,
692,
42400,
8269,
1669,
11993,
16,
28,
16,
12954,
6948,
12808,
1155,
11,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestStorageRemoveLeastRecent(t *testing.T) {
storage := Init(driver.NewMemory())
storage.Log = t.Logf
// Make sure that specifying this at the outset doesn't cause any bugs.
storage.MaxHistory = 10
const name = "angry-bird"
// setup storage with test releases
setup := func() {
// release records
rls0... | explode_data.jsonl/35129 | {
"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,
5793,
13021,
81816,
25140,
1155,
353,
8840,
836,
8,
341,
197,
16172,
1669,
15690,
24032,
7121,
10642,
2398,
197,
16172,
5247,
284,
259,
98954,
271,
197,
322,
7405,
2704,
429,
37838,
419,
518,
279,
67764,
3171,
944,
5240,
894... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnescape(t *testing.T) {
unescape(string([]byte{'\\', '\\', 0}))
unescape(string([]byte{'\\', '/', '\\', 'b', '\\', 'f'}))
} | explode_data.jsonl/43434 | {
"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,
1806,
12998,
1155,
353,
8840,
836,
8,
341,
197,
8531,
5330,
3609,
10556,
3782,
13608,
3422,
516,
28078,
516,
220,
15,
44194,
197,
8531,
5330,
3609,
10556,
3782,
13608,
3422,
516,
56427,
28078,
516,
364,
65,
516,
28078,
516,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBytesOffset(t *testing.T) {
tests := []struct {
text string
pos protocol.Position
want int
}{
{text: `a𐐀b`, pos: protocol.Position{Line: 0, Character: 0}, want: 0},
{text: `a𐐀b`, pos: protocol.Position{Line: 0, Character: 1}, want: 1},
{text: `a𐐀b`, pos: protocol.Position{Line: 0, Character: ... | explode_data.jsonl/72543 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 818
} | [
2830,
3393,
7078,
6446,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
15425,
914,
198,
197,
28164,
220,
11507,
21954,
198,
197,
50780,
526,
198,
197,
59403,
197,
197,
83021,
25,
1565,
64,
123934,
238,
222,
65,
7808,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestHeartbeatAnnounce(t *testing.T) {
t.Parallel()
tests := []struct {
mode HeartbeatMode
kind string
}{
{mode: HeartbeatModeProxy, kind: services.KindProxy},
{mode: HeartbeatModeAuth, kind: services.KindAuthServer},
{mode: HeartbeatModeKube, kind: services.KindKubeService},
}
for _, tt := range tes... | explode_data.jsonl/30089 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1461
} | [
2830,
3393,
45384,
22227,
27093,
9734,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
78216,
1669,
3056,
1235,
341,
197,
60247,
17965,
22227,
3636,
198,
197,
197,
15314,
914,
198,
197,
59403,
197,
197,
90,
8516,
25,
17965,
22227,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBQInvariantToEntryOrder(t *testing.T) {
lower, upper := -5.0, 5.0
bq1 := getNoiselessBQ(t, lower, upper)
bq2 := getNoiselessBQ(t, lower, upper)
entries := createEntries()
// The list of entries contains 1001 elements. However, we only add the first 997. The reason
// is that 997 is a prime number, which ... | explode_data.jsonl/80638 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 411
} | [
2830,
3393,
33,
48,
76621,
1249,
5874,
4431,
1155,
353,
8840,
836,
8,
341,
8810,
1202,
11,
8416,
1669,
481,
20,
13,
15,
11,
220,
20,
13,
15,
198,
2233,
80,
16,
1669,
633,
61819,
1717,
33,
48,
1155,
11,
4722,
11,
8416,
340,
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... | 6 |
func TestGossipDiscoverySkipConnectingToLocalhostBootstrap(t *testing.T) {
inst := createDiscoveryInstance(11611, "d1", []string{"localhost:11611", "127.0.0.1:11611"})
inst.comm.lock.Lock()
inst.comm.mock = &mock.Mock{}
inst.comm.mock.On("SendToPeer", mock.Anything, mock.Anything).Run(func(mock.Arguments) {
t.Fat... | explode_data.jsonl/62267 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 227
} | [
2830,
3393,
38,
41473,
67400,
35134,
62924,
96856,
3790,
45511,
1155,
353,
8840,
836,
8,
341,
88656,
1669,
1855,
67400,
2523,
7,
16,
16,
21,
16,
16,
11,
330,
67,
16,
497,
3056,
917,
4913,
8301,
25,
16,
16,
21,
16,
16,
497,
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 TestSecretProofTransactionSerialization(t *testing.T) {
s := "b778a39a3663719dfc5e48c9d78431b1e45c2af9df538782bf199c189dabeac7680ada57dcec8eee91c4e3bf3bfa9af6ffde90cd1d249d1c6121d7b759a001b1"
ss := "9a493664"
tx, err := NewSecretProofTransaction(fakeDeadline, SHA3_512, s, ss, MijinTest)
assert.Nilf(t, err, "... | explode_data.jsonl/69204 | {
"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,
19773,
31076,
8070,
35865,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
330,
65,
22,
22,
23,
64,
18,
24,
64,
18,
21,
21,
18,
22,
16,
24,
2940,
66,
20,
68,
19,
23,
66,
24,
67,
22,
23,
19,
18,
16,
65,
16,
68,
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 TestRetractRationale(t *testing.T) {
for _, tt := range retractRationaleTests {
t.Run(tt.desc, func(t *testing.T) {
f, err := Parse("in", []byte(tt.in), nil)
if err != nil {
t.Fatal(err)
}
if len(f.Retract) != 1 {
t.Fatalf("got %d retract directives; want 1", len(f.Retract))
}
if got :... | explode_data.jsonl/74340 | {
"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,
12020,
81,
531,
49,
37035,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
72200,
49,
37035,
18200,
341,
197,
3244,
16708,
47152,
30514,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
1166,
11,
1848,
1669,
14775... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBroadcastTx(t *testing.T) {
require := require.New(t)
res, err := rpctest.GetGRPCClient().BroadcastTx(context.Background(), &core_grpc.RequestBroadcastTx{[]byte("this is a tx")})
require.Nil(err, "%+v", err)
require.EqualValues(0, res.CheckTx.Code)
require.EqualValues(0, res.DeliverTx.Code)
} | explode_data.jsonl/73405 | {
"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,
43362,
31584,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
340,
10202,
11,
1848,
1669,
33109,
67880,
2234,
8626,
4872,
2959,
1005,
43362,
31584,
5378,
19047,
1507,
609,
2153,
15682,
3992,
9659,
43362,
31584,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_Domain_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) {
t.Parallel()
parameters := gopter.DefaultTestParameters()
parameters.MaxSize = 10
properties := gopter.NewProperties(parameters)
properties.Property(
"Round trip from Domain to hub returns original",
prop.ForAll(RunResourceConversionTest... | explode_data.jsonl/39605 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
1557,
3121,
62,
4498,
61941,
1249,
19316,
2568,
795,
21884,
1690,
26040,
39838,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
67543,
1669,
728,
73137,
13275,
2271,
9706,
741,
67543,
14535,
1695,
284,
220,
16,
15,
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 TestServiceResolver_ServiceQuery(t *testing.T) {
name := "name"
namespace := "namespace"
assert := assert.New(t)
t.Run("Success", func(t *testing.T) {
expected := &gqlschema.Service{
Name: "Test",
}
resource := &v1.Service{}
resourceGetter := automock.NewServiceSvc()
resourceGetter.On("Find", na... | explode_data.jsonl/51131 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 601
} | [
2830,
3393,
1860,
18190,
52548,
2859,
1155,
353,
8840,
836,
8,
341,
11609,
1669,
330,
606,
698,
56623,
1669,
330,
2231,
1837,
6948,
1669,
2060,
7121,
1155,
692,
3244,
16708,
445,
7188,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
424... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Params_Parse_DefaultValueTag(t *testing.T) {
type T struct {
Name string `d:"john"`
Score float32 `d:"60"`
}
p, _ := ports.PopRand()
s := g.Server(p)
s.BindHandler("/parse", func(r *ghttp.Request) {
var t *T
if err := r.Parse(&t); err != nil {
r.Response.WriteExit(err)
}
r.Response.Write... | explode_data.jsonl/25344 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 376
} | [
2830,
3393,
44656,
77337,
60336,
1130,
5668,
1155,
353,
8840,
836,
8,
341,
13158,
350,
2036,
341,
197,
21297,
220,
914,
220,
1565,
67,
2974,
47817,
8805,
197,
7568,
2153,
2224,
18,
17,
1565,
67,
2974,
21,
15,
8805,
197,
532,
3223,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDaoAddReportLog(t *testing.T) {
var (
c = context.TODO()
l = &model.ReportLog{}
)
convey.Convey("AddReportLog", t, func(ctx convey.C) {
id, err := d.AddReportLog(c, l)
ctx.Convey("Then err should be nil.id should not be nil.", func(ctx convey.C) {
ctx.So(err, convey.ShouldBeNil)
ctx.So(id, con... | explode_data.jsonl/51298 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
12197,
2212,
10361,
2201,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
1444,
284,
2266,
90988,
741,
197,
8810,
284,
609,
2528,
25702,
2201,
16094,
197,
340,
37203,
5617,
4801,
5617,
445,
2212,
10361,
2201,
497,
259,
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 TestGetVersion(t *testing.T) {
env := NewTestVDBEnv(t)
env.Cleanup("testgetversion_")
env.Cleanup("testgetversion_ns")
env.Cleanup("testgetversion_ns2")
defer env.Cleanup("testgetversion_")
defer env.Cleanup("testgetversion_ns")
defer env.Cleanup("testgetversion_ns2")
commontests.TestGetVersion(t, env.DBPr... | explode_data.jsonl/596 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 128
} | [
2830,
3393,
1949,
5637,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
1532,
2271,
53,
3506,
14359,
1155,
340,
57538,
727,
60639,
445,
1944,
455,
4366,
62,
1138,
57538,
727,
60639,
445,
1944,
455,
4366,
34728,
1138,
57538,
727,
60639,
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 TestSlackReporterValidation(t *testing.T) {
testCases := []struct {
name string
config func() Config
successExpected bool
}{
{
name: "Valid config w/ wildcard slack_reporter_configs - no error",
config: func() Config {
slackCfg := map[string]SlackReporter{
"*": {
... | explode_data.jsonl/41031 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1629
} | [
2830,
3393,
7442,
473,
52766,
13799,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
25873,
688,
2915,
368,
5532,
198,
197,
30553,
18896,
1807,
198,
197,
59403,
197,
197,
515,
298,
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 TestNewProvider(t *testing.T) {
c, err := lighthttp.New("chain-test", "192.168.0.1:26657")
require.NoError(t, err)
require.Equal(t, fmt.Sprintf("%s", c), "http{http://192.168.0.1:26657}")
c, err = lighthttp.New("chain-test", "http://153.200.0.1:26657")
require.NoError(t, err)
require.Equal(t, fmt.Sprintf("%... | explode_data.jsonl/47996 | {
"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,
3564,
5179,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
326,
21877,
1209,
7121,
445,
8819,
16839,
497,
330,
16,
24,
17,
13,
16,
21,
23,
13,
15,
13,
16,
25,
17,
21,
21,
20,
22,
1138,
17957,
35699,
1155,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRewriteWithPDFLink(t *testing.T) {
description := "test"
output := Rewriter("https://example.org/document.pdf", description, ``)
expected := `<a href="https://example.org/document.pdf">PDF</a><br>test`
if expected != output {
t.Errorf(`Not expected output: got "%s" instead of "%s"`, output, expected)
}... | explode_data.jsonl/21478 | {
"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,
58465,
1247,
2354,
23424,
3939,
1155,
353,
8840,
836,
8,
341,
42407,
1669,
330,
1944,
698,
21170,
1669,
31691,
2542,
445,
2428,
1110,
8687,
2659,
46388,
15995,
497,
4008,
11,
9902,
340,
42400,
1669,
30586,
64,
1801,
428,
242... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_compactionPlanHandler_completeCompaction(t *testing.T) {
type fields struct {
plans map[int64]*compactionTask
sessions *SessionManager
meta *meta
flushCh chan UniqueID
}
type args struct {
result *datapb.CompactionResult
}
tests := []struct {
name string
fields fields
args ... | explode_data.jsonl/9511 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2058
} | [
2830,
3393,
18177,
1311,
20485,
3050,
27675,
13552,
1311,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
72213,
596,
262,
2415,
18640,
21,
19,
8465,
5689,
1311,
6262,
198,
197,
1903,
8551,
353,
5283,
2043,
198,
197,
84004,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSend(t *testing.T) {
t.Parallel()
utils.InitLoggerForTests(testing.Verbose())
modtime := testNow
atime := testNow.Add(1 * time.Second)
dirModtime := testNow.Add(2 * time.Second)
dirAtime := testNow.Add(3 * time.Second)
logger := logrus.WithField(trace.Component, "t:send")
var testCases = []struct {
d... | explode_data.jsonl/74623 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 830
} | [
2830,
3393,
11505,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
80206,
26849,
7395,
2461,
18200,
8623,
287,
42505,
8297,
2398,
42228,
1678,
1669,
1273,
7039,
198,
35447,
545,
1669,
1273,
7039,
1904,
7,
16,
353,
882,
32435,
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 TestTooSmall(t *testing.T) {
// load test jpeg
f, err := os.Open("testdata/video-001.jpeg")
if err != nil {
t.Fatal(err)
}
defer f.Close()
img, err := jpeg.Decode(f)
if err != nil {
t.Fatal(err)
}
// attempt hide data in img
var buf bytes.Buffer
data := make([]byte, 10e6)
err = Hide(&buf, img, dat... | explode_data.jsonl/74661 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
31246,
25307,
1155,
353,
8840,
836,
8,
341,
197,
322,
2795,
1273,
54566,
198,
1166,
11,
1848,
1669,
2643,
12953,
445,
92425,
41303,
12,
15,
15,
16,
30675,
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... | 4 |
func TestConsumeRefill(t *testing.T) {
// Given
rates := NewRateSet()
require.NoError(t, rates.Add(10*time.Second, 10, 20))
require.NoError(t, rates.Add(100*time.Second, 20, 50))
clock := testutils.GetClock()
tbs := NewTokenBucketSet(rates, clock)
_, err := tbs.Consume(15)
require.NoError(t, err)
assert.Equ... | explode_data.jsonl/25390 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 257
} | [
2830,
3393,
1109,
31323,
3945,
483,
1155,
353,
8840,
836,
8,
341,
197,
322,
16246,
198,
7000,
973,
1669,
1532,
11564,
1649,
741,
17957,
35699,
1155,
11,
7813,
1904,
7,
16,
15,
77053,
32435,
11,
220,
16,
15,
11,
220,
17,
15,
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,
1,
1,
1... | 1 |
func Test_issueClose(t *testing.T) {
t.Parallel()
oldUpdateIssue := api.UpdateIssue
timer, _ := time.Parse(time.RFC3339, "2014-11-12T11:45:26.371Z")
api.UpdateIssue = func(client *gitlab.Client, projectID interface{}, issueID int, opts *gitlab.UpdateIssueOptions) (*gitlab.Issue, error) {
if projectID == "" || pr... | explode_data.jsonl/32271 | {
"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,
53340,
7925,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
61828,
4289,
42006,
1669,
6330,
16689,
42006,
198,
51534,
11,
716,
1669,
882,
8937,
9730,
2013,
6754,
18,
18,
18,
24,
11,
330,
17,
15,
16,
19,
12,
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... | 5 |
func TestDeleteRole(t *testing.T) {
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodDelete {
t.Errorf("unexpected method: want %s, got %s", http.MethodDelete, r.Method)
}
if r.URL.Path != "/api/v0/services/awesome-service/roles/application"... | explode_data.jsonl/38078 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 444
} | [
2830,
3393,
6435,
9030,
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 TestForNameShouldReturnService(t *testing.T) {
svc, err := ForName("github")
assert.Nil(t, err)
assert.Equal(t, "*service.Github", reflect.TypeOf(svc).String())
} | explode_data.jsonl/18570 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 66
} | [
2830,
3393,
2461,
675,
14996,
5598,
1860,
1155,
353,
8840,
836,
8,
341,
1903,
7362,
11,
1848,
1669,
1752,
675,
445,
5204,
1138,
6948,
59678,
1155,
11,
1848,
340,
6948,
12808,
1155,
11,
15630,
7936,
1224,
3827,
497,
8708,
73921,
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 |
func TestDataSourceOnePasswordVaultRead(t *testing.T) {
expectedVault := onepassword.Vault{
ID: "vault-uuid",
Name: "Name of the vault",
Description: "This vault will be retrieve",
}
var connectErr = errors.New("some request error")
cases := map[string]struct {
input map[strin... | explode_data.jsonl/78289 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1209
} | [
2830,
3393,
17173,
3966,
4876,
79177,
4418,
1155,
353,
8840,
836,
8,
341,
42400,
79177,
1669,
389,
747,
1938,
5058,
945,
515,
197,
29580,
25,
688,
330,
82983,
12,
17128,
756,
197,
21297,
25,
286,
330,
675,
315,
279,
34584,
756,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMetric_CopyTo(t *testing.T) {
ms := NewMetric()
NewMetric().CopyTo(ms)
assert.True(t, ms.IsNil())
generateTestMetric().CopyTo(ms)
assert.EqualValues(t, generateTestMetric(), ms)
} | explode_data.jsonl/19510 | {
"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,
54310,
77637,
1249,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
54310,
741,
197,
3564,
54310,
1005,
12106,
1249,
35680,
340,
6948,
32443,
1155,
11,
9829,
4506,
19064,
2398,
3174,
13220,
2271,
54310,
1005,
12106,
1249,
356... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOcSameProcessAsParentSpanToInternal(t *testing.T) {
span := pdata.NewSpan()
ocSameProcessAsParentSpanToInternal(nil, span)
assert.Equal(t, 0, span.Attributes().Len())
ocSameProcessAsParentSpanToInternal(wrapperspb.Bool(false), span)
assert.Equal(t, 1, span.Attributes().Len())
v, ok := span.Attributes().... | explode_data.jsonl/53774 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 286
} | [
2830,
3393,
46,
66,
19198,
7423,
2121,
8387,
12485,
1249,
11569,
1155,
353,
8840,
836,
8,
341,
197,
1480,
1669,
70311,
7121,
12485,
741,
197,
509,
19198,
7423,
2121,
8387,
12485,
1249,
11569,
27907,
11,
9390,
340,
6948,
12808,
1155,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSourceDiffURL(t *testing.T) {
var ctl control
for _, tt := range []struct {
p config.Project
from, to revision.Revision
want string
}{
{
p: config.Project{
Name: "test project",
Repo: config.Repo{
RepoOwner: "foo",
RepoName: "test",
},
},
from: "abc123",
... | explode_data.jsonl/27452 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 407
} | [
2830,
3393,
3608,
21751,
3144,
1155,
353,
8840,
836,
8,
341,
2405,
64935,
2524,
198,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
3223,
286,
2193,
30944,
198,
197,
42727,
11,
311,
23578,
2817,
13013,
198,
197,
50780,
257,
914,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetFillUpJSON(t *testing.T) {
var u []User
resp := rb.Get("/user")
if resp.StatusCode != http.StatusOK {
t.Fatal("Status != OK (200)")
}
err := resp.FillUp(&u)
if err != nil {
t.Fatal("Json fill up failed. Error: " + err.Error())
}
for _, v := range users {
if v.Name == "Hernan" {
return
... | explode_data.jsonl/49702 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
1949,
14449,
2324,
5370,
1155,
353,
8840,
836,
8,
1476,
2405,
575,
3056,
1474,
271,
34653,
1669,
18717,
2234,
4283,
872,
5130,
743,
9039,
37828,
961,
1758,
52989,
341,
197,
3244,
26133,
445,
2522,
961,
10402,
320,
17,
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... | 5 |
func TestFlaggingDecommissionedHosts(t *testing.T) {
Convey("When flagging decommissioned hosts", t, func() {
Convey("only hosts in the database who are marked decommissioned"+
" should be returned", func() {
// reset the db
require.NoError(t, db.ClearCollections(host.Collection), "error clearing hosts co... | explode_data.jsonl/31496 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 719
} | [
2830,
3393,
12135,
3173,
4900,
316,
2728,
291,
9296,
82,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
4498,
5181,
3173,
28502,
2728,
291,
18432,
497,
259,
11,
2915,
368,
1476,
197,
93070,
5617,
445,
3243,
18432,
304,
279,
4625,
879... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEngineDeleteRange(t *testing.T) {
defer leaktest.AfterTest(t)()
testEngineDeleteRange(t, func(engine Engine, start, end MVCCKey) error {
return engine.ClearRange(start, end)
})
} | explode_data.jsonl/38113 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 67
} | [
2830,
3393,
4571,
6435,
6046,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
18185,
4571,
6435,
6046,
1155,
11,
2915,
48974,
8200,
11,
1191,
11,
835,
42271,
3706,
1592,
8,
1465,
341,
197,
853,
4712,
13524... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImageTransform(t *testing.T) {
for _, tt := range updateImageSpecTests {
t.Run(tt.name, func(t *testing.T) {
runImageTransformTest(t, &tt)
})
}
} | explode_data.jsonl/17100 | {
"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,
1906,
8963,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
2647,
1906,
8327,
18200,
341,
197,
3244,
16708,
47152,
2644,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
56742,
1906,
8963,
2271,
1155,
11,
609,
556... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCall_Call(t *testing.T) {
mockJSONRPC := &mocks.JSONRPC{}
mockGraphQL := &mocks.GraphQL{}
c := &Client{
c: mockJSONRPC,
g: mockGraphQL,
traceSemaphore: semaphore.NewWeighted(100),
}
ctx := context.Background()
mockJSONRPC.On(
"CallContext",
ctx,
mock.Anything,
"... | explode_data.jsonl/55498 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 763
} | [
2830,
3393,
7220,
76028,
1155,
353,
8840,
836,
8,
341,
77333,
5370,
29528,
1669,
609,
16712,
82,
18009,
29528,
16094,
77333,
88637,
1669,
609,
16712,
82,
40237,
3588,
31483,
1444,
1669,
609,
2959,
515,
197,
1444,
25,
1060,
7860,
5370,
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 TestDataURIValidation(t *testing.T) {
tests := []struct {
param string
expected bool
}{
{"data:image/png;base64,TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4=", true},
{"data:text/plain;base64,Vml2YW11cyBmZXJtZW50dW0gc2VtcGVyIHBvcnRhLg==", true},
{"image/gif;base64,U3Vz... | explode_data.jsonl/77263 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 851
} | [
2830,
93200,
10301,
13799,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
36037,
262,
914,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
4913,
691,
37670,
35960,
81860,
21,
19,
19997,
38,
24,
88,
81756,
15,
6743,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStatementQueryRowConcurrent(t *testing.T) {
db := newTestDB(t, "people")
defer closeDB(t, db)
stmt, err := db.Prepare("SELECT|people|age|name=?")
if err != nil {
t.Fatalf("Prepare: %v", err)
}
defer stmt.Close()
const n = 10
ch := make(chan error, n)
for i := 0; i < n; i++ {
go func() {
var ag... | explode_data.jsonl/15967 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 258
} | [
2830,
3393,
8636,
2859,
3102,
1109,
3231,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
501,
2271,
3506,
1155,
11,
330,
16069,
1138,
16867,
3265,
3506,
1155,
11,
2927,
340,
55822,
11,
1848,
1669,
2927,
28770,
3380,
445,
4858,
91,
16069,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJobSpecsController_Index_noSort(t *testing.T) {
t.Parallel()
rpcClient, gethClient, _, assertMocksCalled := cltest.NewEthMocksWithStartupAssertions(t)
defer assertMocksCalled()
app, cleanup := cltest.NewApplication(t,
eth.NewClientWith(rpcClient, gethClient),
)
defer cleanup()
require.NoError(t, app.... | explode_data.jsonl/31803 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 640
} | [
2830,
3393,
12245,
8327,
82,
2051,
50361,
6536,
10231,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
7000,
3992,
2959,
11,
633,
71,
2959,
11,
8358,
2060,
72577,
20960,
1669,
1185,
1944,
7121,
65390,
11571,
16056,
39076,
90206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRetryPermanent(t *testing.T) {
connected := make(chan *ConnReq)
disconnected := make(chan *ConnReq)
cmgr, err := New(&Config{
RetryDuration: time.Millisecond,
TargetOutbound: 1,
Dial: mockDialer,
OnConnection: func(c *ConnReq, conn net.Conn) {
connected <- c
},
OnDisconnection: fun... | explode_data.jsonl/53950 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 864
} | [
2830,
3393,
51560,
78793,
1155,
353,
8840,
836,
8,
341,
197,
15288,
1669,
1281,
35190,
353,
9701,
27234,
340,
34597,
15288,
1669,
1281,
35190,
353,
9701,
27234,
340,
1444,
48292,
11,
1848,
1669,
1532,
2099,
2648,
515,
197,
11143,
15149,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestActivate(t *testing.T) {
user := &model.User{Id: model.NewId(), Roles: "system_user"}
user.MfaSecret = model.NewRandomBase32String(MFA_SECRET_SIZE)
token := dgoogauth.ComputeCode(user.MfaSecret, time.Now().UTC().Unix()/30)
config := model.Config{}
config.SetDefaults()
config.ServiceSettings.EnableMulti... | explode_data.jsonl/64310 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 900
} | [
2830,
3393,
31242,
1155,
353,
8840,
836,
8,
341,
19060,
1669,
609,
2528,
7344,
90,
764,
25,
1614,
7121,
764,
1507,
50907,
25,
330,
8948,
3317,
16707,
19060,
1321,
3632,
19773,
284,
1614,
7121,
13999,
3978,
18,
17,
703,
3189,
3627,
314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPubmaticInvalidJson(t *testing.T) {
server := httptest.NewServer(
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "Blah")
}),
)
defer server.Close()
conf := *adapters.DefaultHTTPAdapterConfig
an := NewPubmaticLegacyAdapter(&conf, server.URL)
ctx := context.Backgroun... | explode_data.jsonl/77913 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 382
} | [
2830,
3393,
29162,
37244,
7928,
5014,
1155,
353,
8840,
836,
8,
1476,
41057,
1669,
54320,
70334,
7121,
5475,
1006,
197,
28080,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
298,
11009,
991,
1350,
3622,
11,
330,
4923,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.