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 TestIssue6(t *testing.T) {
data := `{
"code": 0,
"msg": "",
"data": {
"sz002024": {
"qfqday": [
[
"2014-01-02",
"8.93",
"9.03",
"9.17",
"8.88",
"621143.00"
],
... | explode_data.jsonl/43436 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 513
} | [
2830,
3393,
42006,
21,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
1565,
515,
414,
330,
1851,
788,
220,
15,
345,
414,
330,
3236,
788,
8324,
414,
330,
691,
788,
341,
286,
330,
14357,
15,
15,
17,
15,
17,
19,
788,
341,
688,
330,
80,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateMountWithId(t *testing.T) {
mount, err := CreateMountWithId("bobolink")
assert.NoError(t, err)
assert.NotNil(t, mount)
defer func() { assert.NoError(t, mount.Release()) }()
err = mount.ReadDefaultConfigFile()
assert.NoError(t, err)
err = mount.Mount()
assert.NoError(t, err)
defer func() { asse... | explode_data.jsonl/29513 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 275
} | [
2830,
3393,
4021,
16284,
2354,
764,
1155,
353,
8840,
836,
8,
341,
2109,
629,
11,
1848,
1669,
4230,
16284,
2354,
764,
445,
47086,
337,
766,
1138,
6948,
35699,
1155,
11,
1848,
340,
6948,
93882,
1155,
11,
6470,
340,
16867,
2915,
368,
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 TestYouonWSpecial(t *testing.T) {
const want = "wa"
for _, v := range [2]string{"わぁ", "ワァ"} {
got, err := KanaToRomaji(v)
assert.Equal(t, want, got)
assert.Nil(t, err)
}
} | explode_data.jsonl/11339 | {
"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,
2610,
263,
7433,
2964,
1155,
353,
8840,
836,
8,
341,
4777,
1366,
284,
330,
9991,
1837,
2023,
8358,
348,
1669,
2088,
508,
17,
30953,
4913,
77083,
126025,
497,
330,
124556,
128046,
9207,
341,
197,
3174,
354,
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... | 2 |
func TestEnumDeclConforms(t *testing.T) {
decl, ok := testSchema(t).lookupDeclByName("ExampleEnum", false)
if !ok {
t.Fatalf("lookupDeclByName failed")
}
enumDecl := decl.(*EnumDecl)
checkConforms(t,
context{},
enumDecl,
[]conformTest{
// Underlying type for ExampleEnum is uint8.
conformOk{uint64(0)}... | explode_data.jsonl/21399 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 353
} | [
2830,
3393,
10766,
21629,
1109,
9807,
1155,
353,
8840,
836,
8,
341,
197,
10005,
11,
5394,
1669,
1273,
8632,
1155,
568,
21020,
21629,
16898,
445,
13314,
10766,
497,
895,
340,
743,
753,
562,
341,
197,
3244,
30762,
445,
21020,
21629,
16898... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCatalog_Register_DeprecatedConnectProxy(t *testing.T) {
t.Parallel()
assert := assert.New(t)
dir1, s1 := testServer(t)
defer os.RemoveAll(dir1)
defer s1.Shutdown()
codec := rpcClient(t, s1)
defer codec.Close()
args := structs.TestRegisterRequestProxy(t)
args.Service.ProxyDestination = "legacy"
args... | explode_data.jsonl/49213 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 338
} | [
2830,
3393,
41606,
73124,
90680,
38777,
14611,
16219,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
6948,
1669,
2060,
7121,
1155,
340,
48532,
16,
11,
274,
16,
1669,
1273,
5475,
1155,
340,
16867,
2643,
84427,
14161,
16,
340,
168... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckTokenString(t *testing.T) {
// the middleware to test
authMiddleware, _ := New(&GinJWTMiddleware{
Realm: "test zone",
Key: key,
Timeout: 1 * time.Second,
Authenticator: defaultAuthenticator,
Unauthorized: func(c *gin.Context, code int, message string) {
c.String(code... | explode_data.jsonl/64456 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 573
} | [
2830,
3393,
3973,
3323,
703,
1155,
353,
8840,
836,
8,
341,
197,
322,
279,
29679,
311,
1273,
198,
78011,
24684,
11,
716,
1669,
1532,
2099,
38,
258,
55172,
24684,
515,
197,
197,
64290,
25,
260,
330,
1944,
10143,
756,
197,
55242,
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... | 1 |
func TestUnsupportedCommand(t *testing.T) {
c := NewParallelE2eCLI(t, binDir)
c.RunDockerCmd("context", "create", "example", "test-example")
res := c.RunDockerOrExitError("--context", "test-example", "images")
res.Assert(t, icmd.Expected{
ExitCode: 1,
Err: `Command "images" not available in current contex... | explode_data.jsonl/5435 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
41884,
4062,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
16547,
36,
17,
68,
63959,
1155,
11,
9544,
6184,
692,
1444,
16708,
35,
13659,
15613,
445,
2147,
497,
330,
3182,
497,
330,
8687,
497,
330,
1944,
43430,
1138,
10202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateAccessTokenVersion(t *testing.T) {
invalidToken, _ := randomHex(80)
newTokenResp, err := testClient.InvalidateAccessToken(invalidToken)
assert.NotNil(t, err)
assert.True(t, newTokenResp.NewAccessToken == "")
} | explode_data.jsonl/12575 | {
"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,
4289,
37649,
5637,
1155,
353,
8840,
836,
8,
341,
197,
11808,
3323,
11,
716,
1669,
4194,
20335,
7,
23,
15,
340,
8638,
3323,
36555,
11,
1848,
1669,
1273,
2959,
5337,
7067,
37649,
5900,
1891,
3323,
340,
6948,
93882,
1155,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestToECDSAErrors(t *testing.T) {
if _, err := HexToECDSA("0000000000000000000000000000000000000000000000000000000000000000"); err == nil {
t.Fatal("HexToECDSA should've returned error")
}
if _, err := HexToECDSA("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); err == nil {
t.Fatal("HexT... | explode_data.jsonl/3756 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
1249,
7498,
72638,
13877,
1155,
353,
8840,
836,
8,
341,
743,
8358,
1848,
1669,
27228,
1249,
7498,
72638,
445,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIndexGet(t *testing.T) {
gopClTest(t, `
a := [1, 3.4, 5]
b := a[1]
`, `package main
func main() {
a := []float64{1, 3.4, 5}
b := a[1]
}
`)
} | explode_data.jsonl/73656 | {
"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,
1552,
1949,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
22074,
64,
1669,
508,
16,
11,
220,
18,
13,
19,
11,
220,
20,
921,
65,
1669,
264,
58,
16,
921,
7808,
1565,
1722,
1887,
271,
2830,
1887,
368,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSecretsController(t *testing.T) {
secrets := []runtime.Object{
genericCert,
genericMtlsCert,
genericMtlsCertSplit,
genericMtlsCertSplitCa,
tlsCert,
tlsMtlsCert,
tlsMtlsCertSplit,
tlsMtlsCertSplitCa,
}
client := kube.NewFakeClient(secrets...)
sc := NewSecretsController(client.KubeInformer().... | explode_data.jsonl/66283 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 731
} | [
2830,
3393,
19773,
82,
2051,
1155,
353,
8840,
836,
8,
341,
84686,
52710,
1669,
3056,
22255,
8348,
515,
197,
3174,
3469,
36934,
345,
197,
3174,
3469,
44,
34488,
36934,
345,
197,
3174,
3469,
44,
34488,
36934,
20193,
345,
197,
3174,
3469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreSafeReference(t *testing.T) {
st, closer := makeStore()
defer closer()
root, _ := st.CurrentRoot()
firstKey := []byte(`firstKey`)
firstValue := []byte(`firstValue`)
firstIndex, _ := st.Set(schema.KeyValue{Key: firstKey, Value: firstValue})
for n := uint64(0); n <= 64; n++ {
opts := schema.Saf... | explode_data.jsonl/77970 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 536
} | [
2830,
3393,
6093,
25663,
8856,
1155,
353,
8840,
836,
8,
341,
18388,
11,
12128,
1669,
1281,
6093,
741,
16867,
12128,
2822,
33698,
11,
716,
1669,
357,
11517,
8439,
2822,
42190,
1592,
1669,
3056,
3782,
5809,
3896,
1592,
24183,
42190,
1130,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadCheckpointMultipleSegments(t *testing.T) {
pageSize := 32 * 1024
const segments = 1
const seriesCount = 20
const samplesCount = 300
for _, compress := range []bool{false, true} {
t.Run(fmt.Sprintf("compress=%t", compress), func(t *testing.T) {
dir, err := ioutil.TempDir("", "readCheckpoint")
... | explode_data.jsonl/76539 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 929
} | [
2830,
3393,
4418,
92688,
32089,
64813,
1155,
353,
8840,
836,
8,
341,
35272,
1695,
1669,
220,
18,
17,
353,
220,
16,
15,
17,
19,
271,
4777,
20632,
284,
220,
16,
198,
4777,
4013,
2507,
284,
220,
17,
15,
198,
4777,
10469,
2507,
284,
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 TestTimeSorter(t *testing.T) {
tests := []struct {
in []time.Time
want []time.Time
}{
{
in: []time.Time{
time.Unix(1351228575, 0), // Fri Oct 26 05:16:15 UTC 2012 (Block #205000)
time.Unix(1351228575, 1), // Fri Oct 26 05:16:15 UTC 2012 (+1 nanosecond)
time.Unix(1348310759, 0), // Sat Sep ... | explode_data.jsonl/13784 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 604
} | [
2830,
3393,
1462,
10231,
261,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
17430,
256,
3056,
1678,
16299,
198,
197,
50780,
3056,
1678,
16299,
198,
197,
59403,
197,
197,
515,
298,
17430,
25,
3056,
1678,
16299,
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... | 3 |
func TestNewException(t *testing.T) {
for _, test := range newExceptionTests {
actual := NewException(test.err, nil)
if actual.Value != test.Value {
t.Errorf("incorrect Value: got %s, want %s", actual.Value, test.Value)
}
if actual.Type != test.Type {
t.Errorf("incorrect Type: got %s, want %s", actual.Ty... | explode_data.jsonl/30382 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
3564,
1354,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
501,
1354,
18200,
341,
197,
88814,
1669,
1532,
1354,
8623,
18441,
11,
2092,
340,
197,
743,
5042,
6167,
961,
1273,
6167,
341,
298,
3244,
13080,
445,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReplicaRangefeedExpiringLeaseError(t *testing.T) {
defer leaktest.AfterTest(t)()
sc := kvserver.TestStoreConfig(nil)
kvserver.RangefeedEnabled.Override(&sc.Settings.SV, true)
mtc := &multiTestContext{
storeConfig: &sc,
// This test was written before the multiTestContext started creating many
// sys... | explode_data.jsonl/70685 | {
"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,
18327,
15317,
49,
524,
823,
12051,
840,
78763,
2304,
519,
1454,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
29928,
1669,
16178,
4030,
8787,
6093,
2648,
27907,
340,
16463,
85,
4030,
2013,
524... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetComponentParams(t *testing.T) {
tests := []struct {
componentName string
jsonnet string
expected Params
}{
// Test getting the parameters where there is a single component
{
"foo",
`
{
global: {},
components: {
foo: {
name: "foo",
replicas: 1,
},
},
}`,... | explode_data.jsonl/36748 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1019
} | [
2830,
3393,
25640,
4870,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
52228,
675,
914,
198,
197,
30847,
4711,
981,
914,
198,
197,
42400,
414,
34352,
198,
197,
59403,
197,
197,
322,
3393,
3709,
279,
5029,
1380,
1052... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequestViaIntermediaryBadSignature(t *testing.T) {
r, cfg := setup(t)
s := NewService(cfg)
fr := &IntermediaryFactRequest{
SelfID: "1234567890",
Intermediary: "intermediary",
Expiry: time.Millisecond,
Facts: []Fact{
{
Fact: FactDateOfBirth,
Sources: []string{S... | explode_data.jsonl/25982 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1357
} | [
2830,
3393,
1900,
54428,
3306,
4404,
658,
17082,
25088,
1155,
353,
8840,
836,
8,
341,
7000,
11,
13286,
1669,
6505,
1155,
692,
1903,
1669,
1532,
1860,
28272,
692,
97714,
1669,
609,
3306,
4404,
658,
17417,
1900,
515,
197,
7568,
490,
915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSservice_EraseData_immudb(t *testing.T) {
op := Option{}
mpss := make([]immudb.ManpageService, 2)
mpss[0] = immudbcmdtest.ManpageServiceMock{}
mpss[1] = immudbcmdtest.ManpageServiceMock{}
ss := sservice{osMock, &servicetest.ConfigServiceMock{}, mpss, op}
err := ss.EraseData("immudb")
assert.Nil(t, err)... | explode_data.jsonl/57707 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
50,
7936,
2089,
10632,
1043,
71370,
661,
65,
1155,
353,
8840,
836,
8,
341,
39703,
1669,
6959,
16094,
53230,
778,
1669,
1281,
10556,
12543,
661,
65,
29902,
2893,
1860,
11,
220,
17,
340,
53230,
778,
58,
15,
60,
284,
4893,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapOperatorAssignmentNan(t *testing.T) {
m := make(map[float64]int, 0)
nan := math.NaN()
// Test assignment operations.
m[nan] += 1
m[nan] += 2
m[nan] += 4
testMapNan(t, m)
} | explode_data.jsonl/19903 | {
"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,
2227,
18461,
41613,
45,
276,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1281,
9147,
95381,
21,
19,
63025,
11,
220,
15,
340,
9038,
276,
1669,
6888,
78706,
2822,
197,
322,
3393,
16319,
7525,
624,
2109,
7669,
276,
60,
1421,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenericBlock(t *testing.T) {
testInputs(t, `
?match$domain=foo.biz
/ads
/ads1$domain=foo.com
/ads2$domain=bar.com
||foo.org^
||bar.org^
@@||foo.com^$genericblock
@@||foo.org^$genericblock
@@||foo.biz^$genericblock
@@/reject
`,
[]TestInput{
// Generic match
{URL: "http://foo.com/ads", Matched: false, O... | explode_data.jsonl/81620 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 352
} | [
2830,
3393,
19964,
4713,
1155,
353,
8840,
836,
8,
341,
18185,
31946,
1155,
11,
22074,
30,
6347,
3,
12204,
28,
7975,
52608,
198,
14,
7664,
198,
14,
7664,
16,
3,
12204,
28,
7975,
905,
198,
14,
7664,
17,
3,
12204,
28,
2257,
905,
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 TestSuiteWithSetupsAndTeardowns(t *testing.T) {
fixture := &Suite01{T: suite.New(t)}
suite.Run(fixture, suite.Options.IntegrationTests())
fixture.So(fixture.events, should.Equal, []string{
"SetupSuite",
"Setup",
"Test",
"Teardown",
"TeardownSuite",
})
} | explode_data.jsonl/7372 | {
"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,
28000,
2354,
1649,
8602,
3036,
6639,
37496,
82,
1155,
353,
8840,
836,
8,
341,
1166,
12735,
1669,
609,
28000,
15,
16,
76025,
25,
16182,
7121,
1155,
73822,
96572,
16708,
94886,
11,
16182,
22179,
7371,
17376,
18200,
12367,
1166,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_PowerSetThreadSafe(t *testing.T) {
set := NewSet().PowerSet()
_, setIsThreadSafe := set.(*threadSafeSet)
if !setIsThreadSafe {
t.Error("result of PowerSet should be thread safe")
}
subset := set.Pop()
_, subsetIsThreadSafe := subset.(*threadSafeSet)
if !subsetIsThreadSafe {
t.Error("subsets in Pow... | explode_data.jsonl/211 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 127
} | [
2830,
3393,
1088,
1202,
1649,
6855,
25663,
1155,
353,
8840,
836,
8,
341,
8196,
1669,
1532,
1649,
1005,
14986,
1649,
741,
197,
6878,
38398,
6855,
25663,
1669,
738,
41399,
4528,
25663,
1649,
340,
743,
753,
746,
3872,
6855,
25663,
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... | 3 |
func TestExecutorReadAllTransactions(t *testing.T) {
txe, tsv, db := newTestTxExecutor(t)
defer db.Close()
defer tsv.StopService()
db.AddQuery(txe.te.twoPC.readAllTransactions, &sqltypes.Result{
Fields: []*querypb.Field{
{Type: sqltypes.VarChar},
{Type: sqltypes.Int64},
{Type: sqltypes.Int64},
{Type:... | explode_data.jsonl/25176 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 449
} | [
2830,
3393,
25255,
4418,
2403,
48761,
1155,
353,
8840,
836,
8,
341,
3244,
8371,
11,
259,
3492,
11,
2927,
1669,
501,
2271,
31584,
25255,
1155,
340,
16867,
2927,
10421,
741,
16867,
259,
3492,
30213,
1860,
2822,
20939,
1904,
2859,
1155,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSorted(t *testing.T) {
testCases := []struct {
name string
expected []string
sleepDuration time.Duration
}{
{
name: "run in alphabetical order",
expected: []string{"dev1", "dev2", "dev3", "dev4"},
sleepDuration: 1 * time.Millisecond,
},
}
testHosts := map[str... | explode_data.jsonl/74948 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 561
} | [
2830,
3393,
51051,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
42400,
414,
3056,
917,
198,
197,
52533,
12945,
882,
33795,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
688,
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... | 5 |
func TestRespondentCloseRx(t *testing.T) {
s := GetSocket(t, NewSocket)
var wg sync.WaitGroup
wg.Add(1)
pass := false
go func() {
defer wg.Done()
v, e := s.Recv()
MustBeError(t, e, mangos.ErrClosed)
MustBeNil(t, v)
pass = true
}()
time.Sleep(time.Millisecond * 10) // to allow go routine to run
MustSuc... | explode_data.jsonl/57396 | {
"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,
65354,
306,
7925,
50639,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
2126,
10286,
1155,
11,
1532,
10286,
340,
2405,
63581,
12811,
28384,
2808,
198,
72079,
1904,
7,
16,
340,
41431,
1669,
895,
198,
30680,
2915,
368,
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... | 1 |
func TestLoadConfiguration(t *testing.T) {
tests := map[string]struct {
Mode string
Network string
Port string
cfg *Configuration
err error
}{
"no envs set": {
err: errors.New("MODE must be populated"),
},
"only mode set": {
Mode: string(Online),
err: errors.New("NETWORK must be popul... | explode_data.jsonl/74032 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1534
} | [
2830,
3393,
5879,
7688,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
3636,
262,
914,
198,
197,
197,
12320,
914,
198,
197,
98459,
262,
914,
271,
197,
50286,
353,
7688,
198,
197,
9859,
1465,
198,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDownloadSingle(t *testing.T) {
var (
proxyURL = tutils.RandomProxyURL(t)
baseParams = tutils.BaseAPIParams(proxyURL)
objName = "object"
objNameSecond = "object-second"
// Links below don't contain protocols to test that no error occurs
// in case they are missing.
linkLarge = "sto... | explode_data.jsonl/70376 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 757
} | [
2830,
3393,
11377,
10888,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
197,
22803,
3144,
414,
284,
259,
6031,
26709,
16219,
3144,
1155,
340,
197,
24195,
4870,
262,
284,
259,
6031,
13018,
7082,
4870,
65787,
3144,
340,
197,
22671,
675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransportServerClosingUnexpectedly(t *testing.T) {
defer afterTest(t)
ts := httptest.NewServer(hostPortHandler)
defer ts.Close()
tr := &Transport{}
c := &Client{Transport: tr}
fetch := func(n, retries int) string {
condFatalf := func(format string, arg ...interface{}) {
if retries <= 0 {
t.Fat... | explode_data.jsonl/4880 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 535
} | [
2830,
3393,
27560,
5475,
36294,
29430,
398,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
340,
57441,
1669,
54320,
70334,
7121,
5475,
19973,
7084,
3050,
340,
16867,
10591,
10421,
2822,
25583,
1669,
609,
27560,
16094,
1444,
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... | 2 |
func TestSecondCurrency(t *testing.T) {
t.Parallel()
pair := NewCurrencyPair("BTC", "USD")
actual := pair.SecondCurrency
expected := CurrencyItem("USD")
if actual != expected {
t.Errorf(
"Test failed. GetSecondCurrency(): %s was not equal to expected value: %s",
actual, expected,
)
}
} | explode_data.jsonl/55828 | {
"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,
15666,
26321,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3223,
1310,
1669,
1532,
26321,
12443,
445,
59118,
497,
330,
26749,
1138,
88814,
1669,
6716,
32435,
26321,
198,
42400,
1669,
28453,
1234,
445,
26749,
1138,
743... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestBackupRestoreEmptyDB(t *testing.T) {
defer leaktest.AfterTest(t)()
const numAccounts = 1
_, _, sqlDB, _, cleanupFn := BackupRestoreTestSetup(t, singleNode, numAccounts, InitNone)
defer cleanupFn()
sqlDB.Exec(t, `CREATE DATABASE empty`)
sqlDB.Exec(t, `BACKUP DATABASE empty TO $1`, LocalFoo)
sqlDB.Exec(... | explode_data.jsonl/57619 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 196
} | [
2830,
3393,
56245,
56284,
3522,
3506,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
4777,
1629,
41369,
284,
220,
16,
198,
197,
6878,
8358,
5704,
3506,
11,
8358,
21290,
24911,
1669,
43438,
56284,
2271,
218... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEachStr(t *testing.T) {
v := &Value{data: []string{string("hello"), string("hello"), string("hello"), string("hello"), string("hello")}}
count := 0
replacedVals := make([]string, 0)
assert.Equal(t, v, v.EachStr(func(i int, val string) bool {
count++
replacedVals = append(replacedVals, val)
// abor... | explode_data.jsonl/23411 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 236
} | [
2830,
3393,
4854,
2580,
1155,
353,
8840,
836,
8,
1476,
5195,
1669,
609,
1130,
90,
691,
25,
3056,
917,
90,
917,
445,
14990,
3975,
914,
445,
14990,
3975,
914,
445,
14990,
3975,
914,
445,
14990,
3975,
914,
445,
14990,
899,
11248,
18032,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewHaGroupDeleteParamsWithTimeout(t *testing.T) {
p := NewHaGroupDeleteParamsWithTimeout(time.Minute * 5)
require.NotNil(t, p.timeout)
assert.Equal(t, time.Minute*5, p.timeout)
} | explode_data.jsonl/7748 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 74
} | [
2830,
3393,
3564,
32942,
2808,
6435,
4870,
2354,
7636,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1532,
32942,
2808,
6435,
4870,
2354,
7636,
9730,
75770,
353,
220,
20,
340,
17957,
93882,
1155,
11,
281,
36110,
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 |
func TestEvaluateSubElem(t *testing.T) {
tstx := TstX{A: "foo", B: "bar"}
var inner struct {
S fmt.Stringer
}
inner.S = tstx
interfaceValue := reflect.ValueOf(&inner).Elem().Field(0)
for i, this := range []struct {
value reflect.Value
key string
expect interface{}
}{
{reflect.ValueOf(tstx), "A", "... | explode_data.jsonl/9226 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 770
} | [
2830,
3393,
82345,
3136,
25586,
1155,
353,
8840,
836,
8,
341,
3244,
267,
87,
1669,
350,
267,
55,
90,
32,
25,
330,
7975,
497,
425,
25,
330,
2257,
16707,
2405,
9179,
2036,
341,
197,
7568,
8879,
6431,
261,
198,
197,
532,
197,
4382,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestSharder(t *testing.T) {
t.Run("constructing with bad count panics", func(t *testing.T) {
defer func() {
if x := recover(); x == nil {
t.Fatal("wanted New to panic when given bad count")
}
}()
New(0)
})
t.Run("only one shard", func(t *testing.T) {
s := New(1)
for i := 0; i < 100; i++ {
... | explode_data.jsonl/64547 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 308
} | [
2830,
3393,
2016,
567,
261,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
7596,
287,
448,
3873,
1760,
7215,
1211,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
16867,
2915,
368,
341,
298,
743,
856,
1669,
11731,
2129,
856,
621,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplyKeyStoreConfig(t *testing.T) {
slotNumber := 1
tempDir := t.TempDir()
worldReadablePinFilePath := filepath.Join(tempDir, "world-readable-pin-file")
err := os.WriteFile(worldReadablePinFilePath, []byte("world-readable-pin-file"), 0o644)
require.NoError(t, err)
securePinFilePath := filepath.Join(tem... | explode_data.jsonl/47184 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1452
} | [
2830,
3393,
28497,
1592,
6093,
2648,
1155,
353,
8840,
836,
8,
341,
61675,
2833,
1669,
220,
16,
271,
16280,
6184,
1669,
259,
65009,
6184,
2822,
76508,
57938,
19861,
19090,
1669,
26054,
22363,
9758,
6184,
11,
330,
14615,
83218,
74443,
14203... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetIdentifiers(t *testing.T) {
ctx := context.Background()
backend := &etcdTest{}
resp := new(client.Response)
configPath := new(client.Node)
node1 := createTestNode("check_names")
node2 := createTestNode("init_configs")
node3 := createTestNode("instances")
nodes := []*client.Node{node1, node2, node3}
... | explode_data.jsonl/53943 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 574
} | [
2830,
3393,
1949,
28301,
11836,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
197,
20942,
1669,
609,
295,
4385,
2271,
16094,
34653,
1669,
501,
12805,
12574,
340,
25873,
1820,
1669,
501,
12805,
21714,
340,
20831,
16,
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 TestClient_PullIsMergeable(t *testing.T) {
cases := map[string]struct {
DiffStat string
ExpMergeable bool
}{
"mergeable": {
DiffStat: `{
"pagelen": 500,
"values": [
{
"status": "added",
"old": null,
"lines_removed": 0,
"lines_added": 2,
"new": {
"path": "pa... | explode_data.jsonl/53235 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1668
} | [
2830,
3393,
2959,
1088,
617,
3872,
52096,
480,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
2415,
14032,
60,
1235,
341,
197,
10957,
3092,
15878,
257,
914,
198,
197,
197,
8033,
52096,
480,
1807,
198,
197,
59403,
197,
197,
1,
19052,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCache_ObjectReader(t *testing.T) {
cfg, repo, _ := testcfg.BuildWithRepo(t)
repoExecutor := newRepoExecutor(t, cfg, repo)
cache := newCache(time.Hour, 10, helper.NewManualTicker())
defer cache.Stop()
cache.cachedProcessDone = sync.NewCond(&sync.Mutex{})
t.Run("uncancellable", func(t *testing.T) {
ctx... | explode_data.jsonl/81954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1482
} | [
2830,
3393,
8233,
27839,
5062,
1155,
353,
8840,
836,
8,
341,
50286,
11,
15867,
11,
716,
1669,
1273,
14072,
25212,
2354,
25243,
1155,
340,
17200,
5368,
25255,
1669,
501,
25243,
25255,
1155,
11,
13286,
11,
15867,
692,
52680,
1669,
501,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCookieSyncNoCookies(t *testing.T) {
rr := doPost(`{"bidders":["appnexus", "audienceNetwork", "random"]}`, nil, true, syncersForTest())
assert.Equal(t, rr.Header().Get("Content-Type"), "application/json; charset=utf-8")
assert.Equal(t, http.StatusOK, rr.Code)
assert.ElementsMatch(t, []string{"appnexus", "au... | explode_data.jsonl/21682 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
20616,
12154,
2753,
50672,
1155,
353,
8840,
836,
8,
341,
197,
634,
1669,
65156,
5809,
4913,
65,
99129,
36799,
676,
77,
23666,
497,
330,
7880,
1835,
12320,
497,
330,
11463,
1341,
28350,
2092,
11,
830,
11,
12811,
388,
2461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMaxLength(t *testing.T) {
store := New(newDB(), []byte("secret"))
store.MaxLength(10)
r1 := req(func(w http.ResponseWriter, r *http.Request) {
session, err := store.Get(r, "session")
if err != nil {
panic(err)
}
session.Values["a"] = "aaaaaaaaaaaaaaaaaaaaaaaa"
if err := store.Save(r, w, sessi... | explode_data.jsonl/71334 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 185
} | [
2830,
3393,
35601,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
1532,
1755,
3506,
1507,
3056,
3782,
445,
20474,
5455,
57279,
70092,
7,
16,
15,
692,
7000,
16,
1669,
4232,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
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... | 3 |
func TestSortedArray_NewSortedArrayFrom(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []interface{}{"a", "f", "c"}
a2 := []interface{}{"h", "j", "i", "k"}
func1 := func(v1, v2 interface{}) int {
return strings.Compare(gconv.String(v1), gconv.String(v2))
}
func2 := func(v1, v2 interface{}) int {
r... | explode_data.jsonl/67004 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
51051,
1857,
39582,
51051,
1857,
3830,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11323,
16,
1669,
3056,
4970,
6257,
4913,
64,
497,
330,
69,
497,
330,
66,
16707,
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 TestSliceMap(t *testing.T) {
tests := []struct {
name string
input []int
mapper func(int) int
want []int
}{
{
name: "case",
input: []int{1, 2, 1},
mapper: func(i int) int { return i * 2 },
want: []int{2, 4, 2},
},
{
name: "case",
input: []int{1, 2, 1},
mapper: func... | explode_data.jsonl/55753 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 946
} | [
2830,
3393,
33236,
2227,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
22427,
220,
3056,
396,
198,
197,
2109,
3106,
2915,
1548,
8,
526,
198,
197,
50780,
256,
3056,
396,
198,
197,
59403,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIgnoringEINTR(t *testing.T) {
eintrs := 100
err := ignoringEINTR(func() error {
if eintrs == 0 {
return nil
}
eintrs--
return syscall.EINTR
})
if err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/55534 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
3393,
87743,
36,
79079,
1155,
353,
8840,
836,
8,
341,
7727,
58788,
82,
1669,
220,
16,
15,
15,
198,
9859,
1669,
30903,
36,
79079,
18552,
368,
1465,
341,
197,
743,
4368,
85385,
621,
220,
15,
341,
298,
853,
2092,
198,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestStructLevel(t *testing.T) {
type Test struct {
String string
}
set := New()
set.RegisterStructLevel(func(ctx context.Context, t *Transformer, value reflect.Value) error {
s := value.Interface().(Test)
if s.String == "error" {
return errors.New("BAD VALUE")
}
s.String = "test"
value.Set(refl... | explode_data.jsonl/43620 | {
"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,
9422,
4449,
1155,
353,
8840,
836,
8,
341,
13158,
3393,
2036,
341,
197,
4980,
914,
198,
197,
630,
8196,
1669,
1532,
741,
8196,
19983,
9422,
4449,
18552,
7502,
2266,
9328,
11,
259,
353,
46358,
11,
897,
8708,
6167,
8,
1465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRouteCacheContents(t *testing.T) {
tests := map[string]struct {
contents map[string]*v2.RouteConfiguration
want []proto.Message
}{
"empty": {
contents: nil,
want: nil,
},
"simple": {
contents: map[string]*v2.RouteConfiguration{
"ingress_http": {
Name: "ingress_http",
}... | explode_data.jsonl/56949 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 353
} | [
2830,
3393,
4899,
8233,
14803,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
17610,
2415,
14032,
8465,
85,
17,
58004,
7688,
198,
197,
50780,
257,
3056,
15110,
8472,
198,
197,
59403,
197,
197,
1,
3194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestService_NewService(t *testing.T) {
data := struct {
address string
name string
args []string
}{
address: "10.0.1.66",
name: "cat",
args: []string{"testdata/sample_output.txt"},
}
cases := []struct {
svc *checkService
}{
{
&checkService{
address: data.address,
cmd: ... | explode_data.jsonl/1799 | {
"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,
1860,
39582,
1860,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
2036,
341,
197,
63202,
914,
198,
197,
11609,
262,
914,
198,
197,
31215,
262,
3056,
917,
198,
197,
59403,
197,
63202,
25,
330,
16,
15,
13,
15,
13,
16,
13,
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... | 3 |
func TestBytes_ToBytes(t *testing.T) {
tests := []struct {
name string
e Bytes
want Bytes
}{
{name: "", e: Bytes{[]byte("abc")}, want: Bytes{[]byte("abc")}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.e.ToBytes(); !got.Equal(tt.want) {
t.Errorf("Bytes.ToBytes()... | explode_data.jsonl/34772 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
7078,
38346,
7078,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
7727,
262,
30024,
198,
197,
50780,
30024,
198,
197,
59403,
197,
197,
47006,
25,
7342,
384,
25,
30024,
90,
1294,
3782... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReaderDict(t *testing.T) {
const (
dict = "hello world"
text = "hello again world"
)
var b bytes.Buffer
w, err := NewWriter(&b, 5)
if err != nil {
t.Fatalf("NewWriter: %v", err)
}
w.Write([]byte(dict))
w.Flush()
b.Reset()
w.Write([]byte(text))
w.Close()
r := NewReaderDict(&b, []byte(dict))
... | explode_data.jsonl/81409 | {
"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,
5062,
13448,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
2698,
849,
284,
330,
14990,
1879,
698,
197,
15425,
284,
330,
14990,
1549,
1879,
698,
197,
340,
2405,
293,
5820,
22622,
198,
6692,
11,
1848,
1669,
1532,
6492,
2099... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_Cache3(t *testing.T) {
var err error
var fn string
fn = ""
_, err = Read(fn)
if err == nil {
t.Fatalf("CachedFile Test 7 failed")
}
err = Write(fn, fn, false)
if err == nil {
t.Fatalf("CachedFile Test 8 failed")
}
} | explode_data.jsonl/63483 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
920,
1777,
18,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
2405,
5168,
914,
198,
40095,
284,
35829,
197,
6878,
1848,
284,
4457,
24008,
340,
743,
1848,
621,
2092,
341,
197,
3244,
30762,
445,
70293,
1703,
3393,
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... | 3 |
func TestFormatterForegroundForeground(test *testing.T) {
formatted, err := formatter.Format("{black | foreground | foreground}black{normal}")
assert.NoError(test, err)
assert.Equal(test, "\x1b[30mblack\x1b[0m", formatted)
} | explode_data.jsonl/39763 | {
"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,
14183,
25982,
25982,
8623,
353,
8840,
836,
8,
341,
37410,
12127,
11,
1848,
1669,
24814,
9978,
13976,
11453,
760,
39305,
760,
39305,
92,
11453,
90,
8252,
55266,
6948,
35699,
8623,
11,
1848,
340,
6948,
12808,
8623,
11,
2917,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestQuotedPrintable(t *testing.T) {
tests := []struct {
in, want string
err interface{}
}{
{in: "foo bar", want: "foo bar"},
{in: "foo bar=3D", want: "foo bar="},
{in: "foo bar=0", want: "foo bar", err: io.ErrUnexpectedEOF},
{in: "foo bar=ab", want: "foo bar", err: "multipart: invalid quoted-pri... | explode_data.jsonl/51801 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 588
} | [
2830,
3393,
2183,
9253,
8994,
480,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
17430,
11,
1366,
914,
198,
197,
9859,
414,
3749,
16094,
197,
59403,
197,
197,
90,
258,
25,
330,
7975,
3619,
497,
1366,
25,
330,
7975... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestApplicationList_fail(t *testing.T) {
ts := GateServerFail()
defer ts.Close()
meta := command.ApiMeta{}
args := []string{"--gate-endpoint", ts.URL}
cmd := ApplicationListCommand{
ApiMeta: meta,
}
ret := cmd.Run(args)
if ret == 0 { // Success is actually failure here, internal server error.
t.Fatalf... | explode_data.jsonl/18311 | {
"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,
4988,
852,
22121,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
29243,
5475,
19524,
741,
16867,
10591,
10421,
2822,
84004,
1669,
3210,
21044,
12175,
16094,
31215,
1669,
3056,
917,
4913,
313,
24601,
13068,
2768,
497,
10591,
20893,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconcileOnCancelledRunFinallyPipelineRun(t *testing.T) {
testCases := []struct {
name string
embeddedVal string
}{
{
name: "default embedded status",
embeddedVal: config.DefaultEmbeddedStatus,
},
{
name: "full embedded status",
embeddedVal: config.FullEmbeddedStatu... | explode_data.jsonl/27285 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 294
} | [
2830,
3393,
693,
40446,
457,
1925,
39473,
6727,
23949,
34656,
6727,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
197,
69864,
2208,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntDataPoint_CopyTo(t *testing.T) {
ms := NewIntDataPoint()
generateTestIntDataPoint().CopyTo(ms)
assert.EqualValues(t, generateTestIntDataPoint(), ms)
} | explode_data.jsonl/32711 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 59
} | [
2830,
3393,
1072,
1043,
2609,
77637,
1249,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
1072,
1043,
2609,
741,
3174,
13220,
2271,
1072,
1043,
2609,
1005,
12106,
1249,
35680,
340,
6948,
12808,
6227,
1155,
11,
6923,
2271,
1072,
1043,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildHeaders(t *testing.T) {
d := entity.Definition{}
assert.Equal(t, map[string]string{}, d.BuildHeaders())
d = entity.Definition{
Headers: []string{
"x-app:123",
"x-version:3",
},
}
assert.Equal(t, map[string]string{
"x-app": "123",
"x-version": "3",
}, d.BuildHeaders())
} | explode_data.jsonl/68889 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
11066,
10574,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
5387,
49947,
4054,
31483,
6948,
12808,
1155,
11,
2415,
14032,
30953,
22655,
294,
25212,
10574,
12367,
2698,
284,
5387,
49947,
4054,
515,
197,
197,
10574,
25,
3056,
917,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseWithFuncsNoPtr(t *testing.T) {
type foo struct{}
err := env.ParseWithFuncs(foo{}, nil)
assert.Error(t, err)
assert.Equal(t, err, env.ErrNotAStructPtr)
} | explode_data.jsonl/7496 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 73
} | [
2830,
3393,
14463,
2354,
9626,
82,
2753,
5348,
1155,
353,
8840,
836,
8,
341,
13158,
15229,
2036,
16094,
9859,
1669,
6105,
8937,
2354,
9626,
82,
71880,
22655,
2092,
340,
6948,
6141,
1155,
11,
1848,
340,
6948,
12808,
1155,
11,
1848,
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 |
func TestAutoRetryBasicRerun(t *testing.T) {
t.Parallel()
out := new(bytes.Buffer)
rootPath := copyEnvironment(t, TEST_FIXTURE_AUTO_RETRY_RERUN)
modulePath := util.JoinPath(rootPath, TEST_FIXTURE_AUTO_RETRY_RERUN)
err := runTerragruntCommand(t, fmt.Sprintf("terragrunt apply -auto-approve --terragrunt-non-interact... | explode_data.jsonl/10091 | {
"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,
13253,
51560,
15944,
49,
261,
359,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
13967,
1669,
501,
23158,
22622,
340,
33698,
1820,
1669,
2975,
12723,
1155,
11,
13602,
42635,
41486,
29013,
77924,
2568,
640,
1861,
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 TestTouchFromTime(t *testing.T) {
fileName := dirRoot + "/touch.txt"
now := time.Now().Local()
err := TouchFromTime(fileName, now, now)
if err != nil {
panic(err)
}
t.Cleanup(func() {
_ = RemoveWithRecur(dirRoot)
})
if !Exists(fileName) {
t.Error("TouchFromTime test failed!")
}
err = RemoveWit... | explode_data.jsonl/34172 | {
"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,
11309,
3830,
1462,
1155,
353,
8840,
836,
8,
341,
17661,
675,
1669,
5419,
8439,
488,
3521,
22020,
3909,
1837,
80922,
1669,
882,
13244,
1005,
7319,
2822,
9859,
1669,
19338,
3830,
1462,
23014,
11,
1431,
11,
1431,
340,
743,
1848... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewPartyCoordinator(t *testing.T) {
ApplyDeadline = false
hosts := setupHosts(t, 4)
var pcs []*PartyCoordinator
var peers []string
timeout := time.Second * 4
for _, el := range hosts {
pcs = append(pcs, NewPartyCoordinator(el, timeout))
peers = append(peers, el.ID().String())
}
defer func() {
f... | explode_data.jsonl/10308 | {
"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,
3564,
37361,
64304,
1155,
353,
8840,
836,
8,
341,
197,
28497,
83593,
284,
895,
198,
197,
44692,
1669,
6505,
9296,
82,
1155,
11,
220,
19,
340,
2405,
70299,
29838,
37361,
64304,
198,
2405,
25029,
3056,
917,
271,
78395,
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... | 2 |
func TestMkdir(t *testing.T) {
beforeTest(t)
conn := _getConnection(t)
defer conn.Close()
client := agaveproto.NewSftpRelayClient(conn)
// create a random directory name in our test dir
testDirectoryPath := fmt.Sprintf("%s/%s", CurrentBaseTestDirPath, uuid.New().String())
err := _updateLocalSharedTestDirOw... | explode_data.jsonl/32541 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 788
} | [
2830,
3393,
44,
12438,
1155,
353,
8840,
836,
8,
1476,
63234,
2271,
1155,
692,
32917,
1669,
716,
52414,
1155,
340,
16867,
4534,
10421,
2822,
197,
25291,
1669,
933,
523,
15110,
7121,
50,
25068,
6740,
352,
2959,
20571,
692,
197,
322,
1855,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIncompatibilityExistence(t *testing.T) {
var existenceTest = []struct {
path string
}{
{"../examples/petstore/petstore.yaml"},
{"oas-examples/petstore.json"},
{"../examples/bookstore/bookstore.yaml"},
{"oas-examples/openapi.yaml"},
{"oas-examples/adsense.yaml"},
}
for _, trial := range existe... | explode_data.jsonl/26490 | {
"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,
641,
18331,
3147,
25613,
763,
1155,
353,
8840,
836,
8,
1476,
2405,
13885,
2271,
284,
3056,
1235,
341,
197,
26781,
914,
198,
197,
59403,
197,
197,
4913,
1244,
51668,
4322,
295,
4314,
4322,
295,
4314,
33406,
7115,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWaitForCompletionSucceeded(t *testing.T) {
size := 2
done := make(chan bool, size)
done <- true
totalWaitTime = time.Second
assert.True(t, waitForCompletion(done))
totalWaitTime = 60 * time.Second
} | explode_data.jsonl/62012 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 76
} | [
2830,
3393,
14190,
2461,
33190,
50,
43805,
1155,
353,
8840,
836,
8,
341,
13832,
1669,
220,
17,
198,
40495,
1669,
1281,
35190,
1807,
11,
1379,
340,
40495,
9119,
830,
198,
34493,
14190,
1462,
284,
882,
32435,
198,
6948,
32443,
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 |
func TestTableRead(t *testing.T) {
t.Run("error reading file", func(t *testing.T) {
expected := "Error reading GPT from file"
f := &testhelper.FileImpl{
Reader: func(b []byte, offset int64) (int, error) {
return 0, fmt.Errorf(expected)
},
}
table, err := Read(f, 512, 512)
if table != nil {
t.Err... | explode_data.jsonl/61026 | {
"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,
2556,
4418,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
841,
5290,
1034,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
42400,
1669,
330,
1454,
5290,
479,
2828,
504,
1034,
698,
197,
1166,
1669,
609,
1944,
18764,
8576,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDockerVersionComparison(t *testing.T) {
v, err := newDockerVersion("1.10.3")
assert.NoError(t, err)
for i, test := range []struct {
version string
compare int
err bool
}{
{version: "1.9.2", compare: 1},
{version: "1.9.2-rc2", compare: 1},
{version: "1.10.3", compare: 0},
{version: "1.10.3... | explode_data.jsonl/31196 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 349
} | [
2830,
3393,
35,
13659,
5637,
33487,
1155,
353,
8840,
836,
8,
341,
5195,
11,
1848,
1669,
501,
35,
13659,
5637,
445,
16,
13,
16,
15,
13,
18,
1138,
6948,
35699,
1155,
11,
1848,
340,
2023,
600,
11,
1273,
1669,
2088,
3056,
1235,
341,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestFindMatch(t *testing.T) {
// testFind is the structure used to contain params pertinent to find related tests
type testFind struct {
pattern, filePath, flagName string
match bool
}
var basicTests = []testFind{
// Name match tests - success cases.
{"*.jpg", "carter.jpg", "name... | explode_data.jsonl/76927 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1571
} | [
2830,
3393,
9885,
8331,
1155,
353,
8840,
836,
8,
341,
197,
322,
1273,
9885,
374,
279,
5944,
1483,
311,
6644,
3628,
61523,
311,
1477,
5435,
7032,
198,
13158,
1273,
9885,
2036,
341,
197,
3223,
3227,
11,
22598,
11,
5181,
675,
914,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestServer_Request_Post_Body_ContentLength_TooLarge(t *testing.T) {
testBodyContentsFail(t, 3, "request declared a Content-Length of 3 but only wrote 2 bytes",
func(st *serverTester) {
st.writeHeaders(HeadersFrameParam{
StreamID: 1, // clients send odd numbers
BlockFragment: st.encodeHeader(
":m... | explode_data.jsonl/71612 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 196
} | [
2830,
3393,
5475,
44024,
66726,
1668,
1076,
78383,
4373,
1139,
2624,
34253,
1155,
353,
8840,
836,
8,
341,
18185,
5444,
14803,
19524,
1155,
11,
220,
18,
11,
330,
2035,
14275,
264,
8883,
52493,
315,
220,
18,
714,
1172,
6139,
220,
17,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProject(t *testing.T) {
t.Parallel()
t.Run("Init Project", func(t *testing.T) {
t.Parallel()
st, s, _ := setup()
pkey := tests.PrivKeys()[0]
init, err := s.Project.Init(st.ReaderWriter(), false, false, crypto.ECDSA_P256, crypto.SHA3_256, pkey)
assert.NoError(t, err)
sacc, err := init.EmulatorS... | explode_data.jsonl/22580 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 917
} | [
2830,
3393,
7849,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3244,
16708,
445,
3803,
5787,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3244,
41288,
7957,
2822,
197,
18388,
11,
274,
11,
716,
1669,
6505,
741,
197,
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 |
func Test_Basic1(t *testing.T) {
config := `
v1 = 1
v2 = "true"
v3 = "off"
v4 = "1.23"
array = [1,2,3]
[redis]
disk = "127.0.0.1:6379,0"
cache = "127.0.0.1:6379,1"
`
gtest.Case(t, func() {
path := gcfg.DEFAULT_CONFIG_FILE
err := gfile.PutContents(path, config)
gtest.Assert(err, nil)
defer... | explode_data.jsonl/24446 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1043
} | [
2830,
3393,
1668,
5971,
16,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
22074,
85,
16,
262,
284,
220,
16,
198,
85,
17,
262,
284,
330,
1866,
698,
85,
18,
262,
284,
330,
1847,
698,
85,
19,
262,
284,
330,
16,
13,
17,
18,
698,
1653... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNamedWriter(t *testing.T) {
tests := []struct {
In string
In2 string
ExpectOutput string
}{
{In: "foobar", ExpectOutput: "[test] foobar"},
{In: "foobar\nbaz", ExpectOutput: "[test] foobar\n[test] baz"},
{In: "foobar\nbaz\n", ExpectOutput: "[test] foobar\n[test] baz\n"},
{In: ... | explode_data.jsonl/8548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 486
} | [
2830,
3393,
15810,
6492,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
70167,
1843,
914,
198,
197,
70167,
17,
688,
914,
198,
197,
35911,
5097,
914,
198,
197,
59403,
197,
197,
90,
641,
25,
330,
50267,
497,
32085,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNonLocalTimezone(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(2)
loc, err := time.LoadLocation("Atlantic/Cape_Verde")
if err != nil {
fmt.Printf("Failed to load time zone Atlantic/Cape_Verde: %+v", err)
t.Fail()
}
now := time.Now().In(loc)
// FIX: Issue #205
// This calculation doesn't work in ... | explode_data.jsonl/8306 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 340
} | [
2830,
3393,
8121,
7319,
1462,
8684,
1155,
353,
8840,
836,
8,
341,
72079,
1669,
609,
12996,
28384,
2808,
16094,
72079,
1904,
7,
17,
692,
71128,
11,
1848,
1669,
882,
13969,
4707,
445,
77525,
11295,
2027,
2334,
86805,
1138,
743,
1848,
961,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetTupleRecordMap(t *testing.T) {
messageChan := make(chan *entities.Message)
input := AggregationInput{
MessageChan: messageChan,
WorkerNum: 2,
CorrelateFields: fields,
}
aggregationProcess, _ := InitAggregationProcess(input)
assert.Equal(t, aggregationProcess.flowKeyRecordMap, aggregatio... | explode_data.jsonl/8697 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 121
} | [
2830,
3393,
1949,
28681,
6471,
2227,
1155,
353,
8840,
836,
8,
341,
24753,
46019,
1669,
1281,
35190,
353,
10499,
8472,
340,
22427,
1669,
4598,
34442,
2505,
515,
197,
46733,
46019,
25,
257,
1943,
46019,
345,
197,
197,
21936,
4651,
25,
981... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDaoTagByNames(t *testing.T) {
var (
c = context.TODO()
tnames = []string{"123", "456"}
)
convey.Convey("TagByNames", t, func(ctx convey.C) {
tags, tagMap, tagNameMap, err := d.TagByNames(c, tnames)
ctx.Convey("Then err should be nil.tags,tagMap,tagNameMap should not be nil.", func(ctx convey.C)... | explode_data.jsonl/36687 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 217
} | [
2830,
3393,
12197,
5668,
1359,
7980,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
1444,
414,
284,
2266,
90988,
741,
197,
197,
1517,
971,
284,
3056,
917,
4913,
16,
17,
18,
497,
330,
19,
20,
21,
16707,
197,
340,
37203,
5617,
4801,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenreService_Count(t *testing.T) {
var tests = []struct {
name string
resp string
opts []Option
wantCount int
wantErr error
}{
{"Happy path", `{"count": 100}`, []Option{SetFilter("popularity", OpGreaterThan, "75")}, 100, nil},
{"Empty response", "", nil, 0, errInvalidJSON},
{... | explode_data.jsonl/41087 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 368
} | [
2830,
3393,
37525,
1860,
50775,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
34653,
414,
914,
198,
197,
64734,
414,
3056,
5341,
198,
197,
50780,
2507,
526,
198,
197,
50780,
7747,
256,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCommand_AllAssociatedValueDescriptors(t *testing.T) {
var testMap = make(map[string]string)
type args struct {
vdNames *map[string]string
}
tests := []struct {
name string
c *Command
args args
}{
{"get assoc val descs", &TestCommand, args{vdNames: &testMap}},
}
for _, tt := range tests {
... | explode_data.jsonl/34915 | {
"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,
4062,
53629,
52969,
1130,
58553,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
2227,
284,
1281,
9147,
14032,
30953,
340,
13158,
2827,
2036,
341,
197,
5195,
67,
7980,
353,
2186,
14032,
30953,
198,
197,
532,
78216,
1669,
3056,
123... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFlusherCond(t *testing.T) {
var mu sync.Mutex
var q syncQueue
var c flusherCond
var closed bool
c.init(&mu, &q)
var flusherWG sync.WaitGroup
flusherWG.Add(1)
go func() {
defer flusherWG.Done()
mu.Lock()
defer mu.Unlock()
for {
for {
if closed {
return
}
if !q.empty() {
... | explode_data.jsonl/58754 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 534
} | [
2830,
3393,
46874,
261,
49696,
1155,
353,
8840,
836,
8,
341,
2405,
11834,
12811,
99014,
198,
2405,
2804,
12811,
7554,
198,
2405,
272,
18198,
261,
49696,
198,
2405,
7877,
1807,
271,
1444,
8271,
2099,
15128,
11,
609,
80,
692,
2405,
18198,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVerifyCertificateWithDSASignature(t *testing.T) {
pemBlock, _ := pem.Decode([]byte(dsaCertPem))
cert, err := ParseCertificate(pemBlock.Bytes)
if err != nil {
t.Fatalf("Failed to parse certificate: %s", err)
}
// test cert is self-signed
if err = cert.CheckSignatureFrom(cert); err != nil {
t.Fatalf("D... | explode_data.jsonl/56551 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
32627,
33202,
2354,
5936,
1911,
622,
1568,
1155,
353,
8840,
836,
8,
341,
3223,
336,
4713,
11,
716,
1669,
54184,
56372,
10556,
3782,
1500,
9081,
36934,
47,
336,
1171,
1444,
529,
11,
1848,
1669,
14775,
33202,
1295,
336,
4713,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMergeProwConfig(t *testing.T) {
t.Parallel()
o := TestOptions{}
o.Setup()
prowConfig := &config.Config{}
prowConfig.LogLevel = "debug"
c, err := yaml.Marshal(prowConfig)
assert.NoError(t, err)
data := make(map[string]string)
data["config.yaml"] = string(c)
cm := &v1.ConfigMap{
ObjectMeta: metav... | explode_data.jsonl/70865 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 337
} | [
2830,
3393,
52096,
47,
651,
2648,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
22229,
1669,
3393,
3798,
16094,
22229,
39820,
2822,
3223,
651,
2648,
1669,
609,
1676,
10753,
16094,
3223,
651,
2648,
5247,
4449,
284,
330,
8349,
183... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBackupRestoreIncrementalAddTable(t *testing.T) {
defer leaktest.AfterTest(t)()
const numAccounts = 1
_, _, sqlDB, _, cleanupFn := BackupRestoreTestSetup(t, singleNode, numAccounts, InitNone)
defer cleanupFn()
sqlDB.Exec(t, `CREATE DATABASE data2`)
sqlDB.Exec(t, `CREATE TABLE data.t (s string PRIMARY KEY... | explode_data.jsonl/57610 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 276
} | [
2830,
3393,
56245,
56284,
38311,
278,
2212,
2556,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
4777,
1629,
41369,
284,
220,
16,
198,
197,
6878,
8358,
5704,
3506,
11,
8358,
21290,
24911,
1669,
43438,
5628... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_VirtualNetworks_Spec_Properties_SubnetsARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
parameters := gopter.DefaultTestParameters()
parameters.MaxSize = 10
properties := gopter.NewProperties(parameters)
properties.Property(
"Round trip of VirtualNetworks_Spec_Properties_SubnetsARM via JSON ... | explode_data.jsonl/2900 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
2334,
2901,
12320,
82,
1098,
992,
1088,
9249,
36359,
52861,
17911,
62,
4498,
77521,
78967,
98054,
2848,
4756,
2121,
2993,
1155,
353,
8840,
836,
8,
341,
67543,
1669,
728,
73137,
13275,
2271,
9706,
741,
67543,
14535,
1695,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBasicIndexAndSearch(t *testing.T) {
q := search.NewTermQuery(index.NewTerm("foo", "bar"))
q.SetBoost(-42)
os.RemoveAll(".gltest")
directory, err := store.OpenFSDirectory(".gltest")
It(t).Should("has no error: %v", err).Assert(err == nil)
It(t).Should("has valid directory").Assert(directory != nil)
fmt... | explode_data.jsonl/50443 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 632
} | [
2830,
3393,
15944,
1552,
3036,
5890,
1155,
353,
8840,
836,
8,
341,
18534,
1669,
2711,
7121,
17249,
2859,
7195,
7121,
17249,
445,
7975,
497,
330,
2257,
5455,
18534,
4202,
52363,
4080,
19,
17,
692,
25078,
84427,
5680,
6072,
1944,
5130,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFillObjectMetaSystemFields(t *testing.T) {
ctx := api.NewDefaultContext()
resource := api.ObjectMeta{}
api.FillObjectMetaSystemFields(ctx, &resource)
if resource.CreationTimestamp.Time.IsZero() {
t.Errorf("resource.CreationTimestamp is zero")
} else if len(resource.UID) == 0 {
t.Errorf("resource.UID m... | explode_data.jsonl/75051 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
14449,
1190,
12175,
2320,
8941,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6330,
7121,
3675,
1972,
741,
50346,
1669,
6330,
80222,
16094,
54299,
19495,
1190,
12175,
2320,
8941,
7502,
11,
609,
9233,
340,
743,
5101,
727,
26453,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetPool(t *testing.T) {
p1 := signal.GetPoolAllocator(10, 0, 512)
p2 := signal.GetPoolAllocator(10, 512, 512)
if p1 == p2 {
t.Fatal("p1 must be not equal to p2")
}
} | explode_data.jsonl/36810 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
1949,
10551,
1155,
353,
8840,
836,
8,
341,
3223,
16,
1669,
8286,
2234,
10551,
42730,
7,
16,
15,
11,
220,
15,
11,
220,
20,
16,
17,
340,
3223,
17,
1669,
8286,
2234,
10551,
42730,
7,
16,
15,
11,
220,
20,
16,
17,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAuthMethodRSAandDSA(t *testing.T) {
config := &ClientConfig{
User: "testuser",
Auth: []AuthMethod{
PublicKeys(testSigners["dsa"], testSigners["rsa"]),
},
HostKeyCallback: InsecureIgnoreHostKey(),
}
if err := tryAuth(t, config); err != nil {
t.Fatalf("client could not authenticate with rsa key: ... | explode_data.jsonl/6938 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
5087,
3523,
73564,
437,
72638,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
609,
2959,
2648,
515,
197,
31672,
25,
330,
1944,
872,
756,
197,
197,
5087,
25,
3056,
5087,
3523,
515,
298,
73146,
8850,
8623,
7264,
388,
1183,
96780... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGlobsToBase(t *testing.T) {
Convey("Should return the correct base", t, func() {
So(globsToBase("."), ShouldEqual, ".")
So(globsToBase("foo/bar.baz"), ShouldEqual, "foo")
So(globsToBase("foo/*.baz"), ShouldEqual, "foo")
So(globsToBase("foo/bar/**/*.baz"), ShouldEqual, "foo/bar")
So(globsToBase(
"... | explode_data.jsonl/18040 | {
"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,
38,
68164,
1249,
3978,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
14996,
470,
279,
4396,
2331,
497,
259,
11,
2915,
368,
341,
197,
76912,
3268,
68164,
1249,
3978,
73133,
701,
12260,
2993,
11,
5933,
1138,
197,
76912,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNegativeChannelCreateConfigUpdate(t *testing.T) {
config := genesisconfig.Load(genesisconfig.SampleDevModeSoloProfile)
channelConfig := genesisconfig.Load(genesisconfig.SampleSingleMSPChannelProfile)
group, err := NewChannelGroup(config)
assert.NoError(t, err)
assert.NotNil(t, group)
t.Run("NoGroups", f... | explode_data.jsonl/78127 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 449
} | [
2830,
3393,
38489,
9629,
4021,
2648,
4289,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
59366,
1676,
13969,
36884,
13774,
1676,
76266,
14592,
3636,
89299,
8526,
340,
71550,
2648,
1669,
59366,
1676,
13969,
36884,
13774,
1676,
76266,
10888,
44,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEncodeYAML(t *testing.T) {
f := newFixture(t)
defer f.TearDown()
f.File("Tiltfile", `
expected = '''key1: foo
key2:
key3: bar
key4: true
key5: 3
key6:
- foo
- 7
'''
observed = encode_yaml({
'key1': 'foo',
'key2': {
'key3': 'bar',
'key4': True
},
'key5': 3,
'key6': [
'foo',
7,
... | explode_data.jsonl/10617 | {
"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,
32535,
56,
31102,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
340,
16867,
282,
836,
682,
4454,
2822,
1166,
8576,
445,
51,
2963,
1192,
497,
22074,
7325,
284,
11456,
792,
16,
25,
15229,
198,
792,
17,
510,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestClientDuration(t *testing.T) {
const delay = 500 * time.Millisecond
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
w.Write([]byte("hello"))
w.(http.Flusher).Flush()
time.Sleep(delay)
w.Write([]byte("world"))
}))
defer server.Close()
_, spans, _ := a... | explode_data.jsonl/49619 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 242
} | [
2830,
3393,
2959,
12945,
1155,
353,
8840,
836,
8,
341,
4777,
7626,
284,
220,
20,
15,
15,
353,
882,
71482,
198,
41057,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
4232,
353,
1254,
9659,
8,
341,
197,
6692... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetATotalLagOf20For2PartitionsOn100UnprocessedEvents(t *testing.T) {
lag := getTotalLagRelatedToPartitionAmount(100, 2, 10)
if lag != 20 {
t.Errorf("Expected a lag of 20 for 2 partitions, got %d", lag)
}
} | explode_data.jsonl/13472 | {
"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,
1949,
828,
2370,
43,
351,
2124,
17,
15,
2461,
17,
5800,
5930,
1925,
16,
15,
15,
1806,
34022,
7900,
1155,
353,
8840,
836,
8,
341,
8810,
351,
1669,
74456,
43,
351,
11686,
1249,
49978,
10093,
7,
16,
15,
15,
11,
220,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLogsExporter_WithSpan(t *testing.T) {
set := componenttest.NewNopExporterCreateSettings()
sr := new(tracetest.SpanRecorder)
set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr))
otel.SetTracerProvider(set.TracerProvider)
defer otel.SetTracerProvider(trace.NewNoopTracerProvider())... | explode_data.jsonl/59610 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 202
} | [
2830,
3393,
51053,
88025,
62,
2354,
12485,
1155,
353,
8840,
836,
8,
341,
8196,
1669,
3692,
1944,
7121,
45,
453,
88025,
4021,
6086,
741,
1903,
81,
1669,
501,
7624,
580,
57824,
85309,
47023,
340,
8196,
8240,
9584,
5179,
284,
45402,
15067,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPusher(t *testing.T) {
var html = template.Must(template.New("https").Parse(`
<html>
<head>
<title>Https Test</title>
<script src="/assets/app.js"></script>
</head>
<body>
<h1 style="color:red;">Welcome, Ginner!</h1>
</body>
</html>
`))
router := New()
router.Static("./assets", "./assets")
router.Se... | explode_data.jsonl/1175 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 397
} | [
2830,
3393,
16644,
261,
1155,
353,
8840,
836,
8,
341,
2405,
5272,
284,
3811,
50463,
29963,
7121,
445,
2428,
1827,
14463,
61528,
13745,
397,
16343,
397,
220,
366,
2102,
29,
92869,
3393,
522,
2102,
397,
220,
366,
2282,
2286,
5914,
5160,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOrderedCallsCorrect(t *testing.T) {
reporter, ctrl, subjectOne, subjectTwo := commonTestOrderedCalls(t)
ctrl.Call(subjectOne, "FooMethod", "1")
ctrl.Call(subjectTwo, "FooMethod", "2")
ctrl.Call(subjectTwo, "BarMethod", "3")
ctrl.Finish()
reporter.assertPass("After finish")
} | explode_data.jsonl/17288 | {
"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,
54384,
55292,
33092,
1155,
353,
8840,
836,
8,
341,
69931,
261,
11,
23743,
11,
3832,
3966,
11,
3832,
11613,
1669,
4185,
2271,
54384,
55292,
1155,
692,
84381,
27017,
29128,
3966,
11,
330,
40923,
3523,
497,
330,
16,
1138,
84381... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCleanTempDirectory_ShouldThrowError(t *testing.T) {
cb := &v1alpha1.CodebaseBranch{
ObjectMeta: metav1.ObjectMeta{
Name: "stub-name",
Namespace: "stub-namespace",
},
Spec: v1alpha1.CodebaseBranchSpec{
CodebaseName: "stub-name",
BranchName: ".",
},
}
directory := CleanTempDirectory... | explode_data.jsonl/14732 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
27529,
12151,
9310,
36578,
616,
23079,
1454,
1155,
353,
8840,
836,
8,
341,
63810,
1669,
609,
85,
16,
7141,
16,
20274,
3152,
18197,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
414,
330,
59398,
11494,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtendedPath_Error(t *testing.T) {
t.Parallel()
baseUrl := "http://example.com"
cases := []struct {
name string
startingUrl string
path string
expectedPath adapters.ExtendedPath
expectedURL string
}{
{
"bad array input",
baseUrl,
`["one","two"`,
adapters.Extended... | explode_data.jsonl/36142 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 477
} | [
2830,
3393,
53190,
1820,
28651,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
24195,
2864,
1669,
330,
1254,
1110,
8687,
905,
1837,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
21375,
287,
2864,
220,
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 TestReadImage(t *testing.T) {
img, err := trickOrTreat.readImage(nil)
if err != nil {
t.Errorf("Could not read candies from %#v: %v", trickOrTreat, err)
return
}
var found bool
for _, cand := range candiesImgs {
if want := fmt.Sprintf("", cand); want == img {
found = true
}
}
if... | explode_data.jsonl/3991 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
4418,
1906,
1155,
353,
8840,
836,
8,
341,
39162,
11,
1848,
1669,
14068,
2195,
51,
1222,
4125,
1906,
27907,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
12895,
537,
1349,
97397,
504,
52406,
85,
25,
1018,
85,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestPeerRoutes(t *testing.T) {
pp := netaddr.MustParseIPPrefix
tests := []struct {
name string
peers []wgcfg.Peer
want []netaddr.IPPrefix
}{
{
name: "small_v4",
peers: []wgcfg.Peer{
{
AllowedIPs: []netaddr.IPPrefix{
pp("100.101.102.103/32"),
},
},
},
want: []netaddr... | explode_data.jsonl/1959 | {
"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,
30888,
26653,
1155,
353,
8840,
836,
8,
341,
65729,
1669,
4179,
6214,
50463,
14463,
3298,
14335,
198,
78216,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
197,
375,
388,
3056,
45540,
14072,
1069,
34756,
198,
197,
507... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSaveVerCode(t *testing.T) {
t.Parallel()
db := NewTestDatabase(t)
maxAge := time.Hour
code := VerificationCode{
Code: "12345678",
TestType: "confirmed",
ExpiresAt: time.Now().Add(time.Hour),
}
if err := db.SaveVerificationCode(&code, maxAge); err != nil {
t.Fatalf("error creating verifica... | explode_data.jsonl/22971 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 369
} | [
2830,
3393,
8784,
10141,
2078,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20939,
1669,
1532,
2271,
5988,
1155,
692,
22543,
16749,
1669,
882,
73550,
198,
43343,
1669,
55473,
2078,
515,
197,
90774,
25,
414,
330,
16,
17,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestJson2Struct_slice_string(t *testing.T) {
ret, err := Json2Struct("auto_name", `["12","2","3","42"]`, GoStructType)
fmt.Printf("ret:\n %s, %v\n", ret, err)
} | explode_data.jsonl/72750 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 73
} | [
2830,
3393,
5014,
17,
9422,
26488,
3904,
1155,
353,
8840,
836,
8,
341,
11262,
11,
1848,
1669,
8308,
17,
9422,
445,
3902,
1269,
497,
1565,
1183,
16,
17,
2198,
17,
2198,
18,
2198,
19,
17,
1341,
7808,
5994,
9422,
929,
340,
11009,
19367... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRoleUndelete(t *testing.T) {
h := newHelper(t)
helpers.AllowMe(h, types.RoleRbacResource(0), "delete")
res := h.repoMakeRole()
h.apiInit().
Post(fmt.Sprintf("/roles/%d/undelete", res.ID)).
Expect(t).
Status(http.StatusOK).
Assert(helpers.AssertNoErrors).
End()
res = h.lookupRoleByID(res.ID)
... | explode_data.jsonl/8345 | {
"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,
9030,
19957,
68,
1617,
1155,
353,
8840,
836,
8,
341,
9598,
1669,
501,
5511,
1155,
340,
197,
21723,
29081,
7823,
3203,
11,
4494,
35955,
49,
55877,
4783,
7,
15,
701,
330,
4542,
5130,
10202,
1669,
305,
46169,
8078,
9030,
2822... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPersistApprovalOpFail(t *testing.T) {
em, cancel := newTestEventManager(t)
defer cancel()
mdi := em.database.(*databasemocks.Plugin)
approval := newApproval()
pool := &fftypes.TokenPool{
Namespace: "ns1",
}
mdi.On("GetTokenPoolByProtocolID", em.ctx, "erc1155", "F1").Return(pool, nil)
mdi.On("GetOp... | explode_data.jsonl/15917 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 215
} | [
2830,
3393,
61267,
90107,
7125,
19524,
1155,
353,
8840,
836,
8,
341,
66204,
11,
9121,
1669,
501,
2271,
83694,
1155,
340,
16867,
9121,
2822,
2109,
8579,
1669,
976,
15062,
41399,
67,
2096,
300,
336,
25183,
64378,
692,
197,
54439,
1669,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.