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 TestInvalidateAccessToken(t *testing.T) {
sandboxResp, _ := testClient.CreateSandboxPublicToken(sandboxInstitution, testProducts)
tokenResp, _ := testClient.ExchangePublicToken(sandboxResp.PublicToken)
newTokenResp, err := testClient.InvalidateAccessToken(tokenResp.AccessToken)
assert.Nil(t, err)
assert.NotN... | explode_data.jsonl/12574 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 114
} | [
2830,
3393,
641,
7067,
37649,
1155,
353,
8840,
836,
8,
341,
1903,
31536,
36555,
11,
716,
1669,
1273,
2959,
7251,
50,
31536,
12676,
3323,
1141,
31536,
641,
10446,
11,
1273,
17746,
340,
43947,
36555,
11,
716,
1669,
1273,
2959,
86997,
1267... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestProposalPassedEndblocker(t *testing.T) {
app := simapp.Setup(false)
ctx := app.BaseApp.NewContext(false, abci.Header{})
addrs := simapp.AddTestAddrs(app, ctx, 10, valTokens)
SortAddresses(addrs)
handler := gov.NewHandler(app.GovKeeper)
stakingHandler := staking.NewHandler(app.StakingKeeper)
header :=... | explode_data.jsonl/51031 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 736
} | [
2830,
3393,
98637,
64723,
3727,
4574,
261,
1155,
353,
8840,
836,
8,
341,
28236,
1669,
1643,
676,
39820,
3576,
340,
20985,
1669,
906,
13018,
2164,
7121,
1972,
3576,
11,
668,
5855,
15753,
37790,
12718,
5428,
1669,
1643,
676,
1904,
2271,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSearcher_ACHFindRoutingNumberOnly(t *testing.T) {
s := searcher{}
if err := s.helperLoadFEDACHFile(t); err != nil {
t.Fatal(err)
}
achP, err := s.ACHFindRoutingNumberOnly(hardResultsLimit, "044112187")
if err != nil {
t.Fatal(err)
}
if len(achP) == 0 {
t.Fatalf("%s", "No matches found for routin... | explode_data.jsonl/71091 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 204
} | [
2830,
3393,
5890,
261,
1566,
2149,
9885,
24701,
2833,
7308,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
94674,
16094,
743,
1848,
1669,
274,
38922,
5879,
37,
1479,
11873,
1703,
1155,
1215,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestErrFn(t *testing.T) {
for i, errFn := range errFns {
err := errFn("")
codeType := codeTypes[i]
assert.Equal(t, err.Code(), codeType)
assert.Equal(t, err.Result().Code, ToABCICode(CodespaceRoot, codeType))
}
} | explode_data.jsonl/57145 | {
"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,
7747,
24911,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1848,
24911,
1669,
2088,
1848,
37,
4412,
341,
197,
9859,
1669,
1848,
24911,
31764,
197,
43343,
929,
1669,
2038,
4173,
989,
921,
197,
6948,
12808,
1155,
11,
1848,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldReturnProvidedValueForTagFilterOfApplicationConfigWhenStateFuncIsCalledAndValueCannotBeNormalized(t *testing.T) {
resourceHandle := NewApplicationConfigResourceHandle()
schema := resourceHandle.MetaData().Schema
value := invalidTagFilter
require.Equal(t, value, schema[ApplicationConfigFieldTagFilter... | explode_data.jsonl/64930 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
14996,
5598,
35819,
291,
1130,
2461,
5668,
5632,
2124,
4988,
2648,
4498,
1397,
9626,
3872,
20960,
3036,
1130,
17444,
3430,
79082,
1155,
353,
8840,
836,
8,
341,
50346,
6999,
1669,
1532,
4988,
2648,
4783,
6999,
741,
1903,
3416,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOCIRequestSigner_Sign(t *testing.T) {
s := ociRequestSigner{
KeyProvider: testKeyProvider{},
GenericHeaders: defaultGenericHeaders,
ShouldHashBody: defaultBodyHashPredicate,
BodyHeaders: defaultBodyHeaders}
url, _ := url.Parse(testURL)
r := http.Request{
Proto: "HTTP/1.1",
ProtoMajor:... | explode_data.jsonl/64279 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 582
} | [
2830,
3393,
63983,
1900,
7264,
261,
1098,
622,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
93975,
1900,
7264,
261,
515,
197,
55242,
5179,
25,
262,
1273,
1592,
5179,
38837,
197,
9600,
3469,
10574,
25,
1638,
19964,
10574,
345,
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... | 1 |
func TestToCPoints(t *testing.T) {
points := []image.Point{
image.Pt(0, 0),
image.Pt(1, 1),
}
cPoints := toCPoints(points)
if int(cPoints.length) != len(points) {
t.Error("Invalid C Points length")
}
} | explode_data.jsonl/81726 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
1249,
34,
11411,
1155,
353,
8840,
836,
8,
341,
67499,
1669,
3056,
1805,
3775,
515,
197,
31426,
1069,
83,
7,
15,
11,
220,
15,
1326,
197,
31426,
1069,
83,
7,
16,
11,
220,
16,
1326,
197,
630,
1444,
11411,
1669,
311,
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... | 2 |
func TestLookupHashMapNull(t *testing.T) {
lookuphash := createLookup(t, "lookup_hash", false)
vc := &vcursor{numRows: 1}
got, err := lookuphash.Map(vc, []sqltypes.Value{sqltypes.NULL})
if err != nil {
t.Error(err)
}
want := []key.Destination{
key.DestinationKeyspaceIDs([][]byte{
[]byte("\x16k@\xb4J\xbaK\... | explode_data.jsonl/3418 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 356
} | [
2830,
3393,
34247,
18497,
3280,
1155,
353,
8840,
836,
8,
341,
197,
21020,
8296,
1669,
1855,
34247,
1155,
11,
330,
21020,
8950,
497,
895,
340,
5195,
66,
1669,
609,
7362,
3823,
90,
2413,
9024,
25,
220,
16,
630,
3174,
354,
11,
1848,
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 TestMessageTransaction_Validate(t *testing.T) {
xmss := helper.GetAliceXMSS(6)
message := "Hello World!!!"
fee := uint64(1)
xmssPK := misc.UCharVectorToBytes(xmss.PK())
messageTx := NewTestMessageTransaction(message, fee, xmssPK, nil)
assert.NotNil(t, messageTx.tx)
assert.True(t, messageTx.tx.Validate(fals... | explode_data.jsonl/10384 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 238
} | [
2830,
3393,
2052,
8070,
62,
17926,
1155,
353,
8840,
836,
8,
341,
10225,
76,
778,
1669,
13137,
2234,
61686,
52337,
1220,
7,
21,
340,
24753,
1669,
330,
9707,
4337,
12069,
698,
1166,
2127,
1669,
2622,
21,
19,
7,
16,
340,
10225,
76,
778... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEchoIpV4Resolver(t *testing.T) {
somePort := 666
thingsThatAreIpV4s := []string{"127.0.0.1", "0.0.0.0", "200.0.12.12"}
thingsThatAreNotIpV4s := []string{"some.service.name", "example.org", "conduit.io", "1", "-",
"fe80::a0ca:e86c:898e:52d5%utun0", "::1"}
t.Run("Says it can resolve only if host is parsea... | explode_data.jsonl/61134 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 915
} | [
2830,
3393,
74994,
23378,
53,
19,
18190,
1155,
353,
8840,
836,
8,
341,
1903,
635,
7084,
1669,
220,
21,
21,
21,
198,
197,
57074,
4792,
11526,
23378,
53,
19,
82,
1669,
3056,
917,
4913,
16,
17,
22,
13,
15,
13,
15,
13,
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... | 7 |
func TestIntGauge_CopyTo(t *testing.T) {
ms := NewIntGauge()
generateTestIntGauge().CopyTo(ms)
assert.EqualValues(t, generateTestIntGauge(), ms)
} | explode_data.jsonl/32689 | {
"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,
1072,
38,
19392,
77637,
1249,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
1072,
38,
19392,
741,
3174,
13220,
2271,
1072,
38,
19392,
1005,
12106,
1249,
35680,
340,
6948,
12808,
6227,
1155,
11,
6923,
2271,
1072,
38,
19392... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestRentAndReturnAPI(t *testing.T) {
var fakestorage *FakeStorage
storage.GetStorage = func() storage.Storage {
fakestorage = initFakeStorage().(*FakeStorage)
return fakestorage
}
routes := GetRoutes(storage.GetStorage())
defer fakestorage.Done()
for _, routeTest := range []struct {
route string
n... | explode_data.jsonl/57643 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1033
} | [
2830,
3393,
67740,
3036,
5598,
7082,
1155,
353,
8840,
836,
8,
341,
2405,
12418,
16172,
353,
52317,
5793,
198,
197,
16172,
2234,
5793,
284,
2915,
368,
5819,
43771,
341,
197,
1166,
726,
16172,
284,
2930,
52317,
5793,
1005,
4071,
52317,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRemoveCTPoison(t *testing.T) {
var tests = []struct {
name string // for human consumption
tbs string // hex encoded
want string // hex encoded
errstr string
}{
{name: "invalid-der", tbs: "01020304", errstr: "failed to parse"},
{name: "trailing-data", tbs: tbsPoisonMiddle + "01020304", err... | explode_data.jsonl/67998 | {
"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,
13021,
1162,
32904,
3335,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
11609,
256,
914,
442,
369,
3738,
15293,
198,
197,
3244,
1279,
262,
914,
442,
12371,
20498,
198,
197,
50780,
256,
914,
442,
1237... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEngineRetryFetch(t *testing.T) {
vdr, _, sender, vm, te, gBlk := setup(t)
sender.Default(true)
missingBlk := &Blk{
parent: gBlk,
id: GenerateID(),
height: 1,
status: choices.Unknown,
bytes: []byte{1},
}
vm.CantGetBlock = false
sender.CantGet = false
te.PullQuery(vdr.ID(), 0, missingBl... | explode_data.jsonl/3572 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 307
} | [
2830,
3393,
4571,
51560,
20714,
1155,
353,
8840,
836,
8,
341,
5195,
3612,
11,
8358,
4646,
11,
10995,
11,
1013,
11,
342,
4923,
74,
1669,
6505,
1155,
692,
1903,
1659,
13275,
3715,
692,
197,
30616,
4923,
74,
1669,
609,
4923,
74,
515,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPreconditionParse(t *testing.T) {
tests := []struct {
content string
v interface{}
expected interface{}
}{
{
"test -f foo.txt",
&taskfile.Precondition{},
&taskfile.Precondition{Sh: `test -f foo.txt`, Msg: "`test -f foo.txt` failed"},
},
{
"sh: '[ 1 = 0 ]'",
&taskfile.Precon... | explode_data.jsonl/59251 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 391
} | [
2830,
3393,
4703,
9056,
14463,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
27751,
220,
914,
198,
197,
5195,
286,
3749,
16094,
197,
42400,
3749,
16094,
197,
59403,
197,
197,
515,
298,
197,
1,
1944,
481,
69,
15229,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGatherServer(t *testing.T) {
var pool couchbase.Pool
if err := json.Unmarshal([]byte(poolsDefaultResponse), &pool); err != nil {
t.Fatal("parse poolsDefaultResponse", err)
}
if err := json.Unmarshal([]byte(bucketResponse), &pool.BucketMap); err != nil {
t.Fatal("parse bucketResponse", err)
}
var cb ... | explode_data.jsonl/66212 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 572
} | [
2830,
3393,
38,
1856,
5475,
1155,
353,
8840,
836,
8,
341,
2405,
7314,
26148,
3152,
89701,
198,
743,
1848,
1669,
2951,
38097,
10556,
3782,
1295,
6178,
3675,
2582,
701,
609,
10285,
1215,
1848,
961,
2092,
341,
197,
3244,
26133,
445,
6400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClient_CreateExternalInitiator(t *testing.T) {
t.Parallel()
tests := []struct {
name string
args []string
}{
{"create external initiator", []string{"exi", "http://testing.com/external_initiators"}},
{"create external initiator w/ query params", []string{"exiqueryparams", "http://testing.com/externa... | explode_data.jsonl/5265 | {
"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,
2959,
34325,
25913,
3803,
36122,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
3056,
917,
198,
197,
59403,
197,
197,
4913,
3182,
9250,
98040,
497,
3056... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestTreeToConditionMysqlFull(t *testing.T) {
beforeEach("mysql")
sqlReturned, _ := testingTreeRoot.toConditionMysql()
if sqlReturned != testingMysqlConditionsInput {
t.Errorf("%v.toConditionMysql() - got %v, want %v", testingTreeRoot.print(), sqlReturned, testingMysqlConditionsInput)
}
} | explode_data.jsonl/62577 | {
"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,
6533,
1249,
10547,
44,
14869,
9432,
1155,
353,
8840,
836,
8,
341,
262,
17723,
445,
12272,
5130,
262,
5704,
84804,
11,
716,
1669,
7497,
6533,
8439,
2389,
10547,
44,
14869,
2822,
262,
421,
5704,
84804,
961,
7497,
44,
14869,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClearSingleCookie(t *testing.T) {
opts := baseTestOptions()
opts.Cookie.Name = "oauth2"
opts.Cookie.Domains = []string{"abc"}
store, err := sessionscookie.NewCookieSessionStore(&opts.Session, &opts.Cookie)
if err != nil {
t.Fatal(err)
}
p := OAuthProxy{CookieOptions: &opts.Cookie, sessionStore: store... | explode_data.jsonl/36419 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 296
} | [
2830,
3393,
14008,
10888,
20616,
1155,
353,
8840,
836,
8,
341,
64734,
1669,
2331,
2271,
3798,
741,
64734,
82918,
2967,
284,
330,
34363,
17,
698,
64734,
82918,
81672,
1735,
284,
3056,
917,
4913,
13683,
16707,
57279,
11,
1848,
1669,
15704,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTranscodingFLV(t *testing.T) {
var inputPath = "/tmp/ffmpeg/flv"
var outputPath = "/tmp/ffmpeg/out/flv.mp4"
trans := new(transcoder.Transcoder)
err := trans.Initialize(inputPath, outputPath)
assert.Nil(t, err)
done := trans.Run(false)
err = <-done
assert.Nil(t, err)
} | explode_data.jsonl/57659 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
3167,
48367,
6126,
53,
1155,
353,
8840,
836,
8,
1476,
2405,
1946,
1820,
284,
3521,
5173,
14,
72422,
58303,
85,
698,
2405,
95017,
284,
3521,
5173,
14,
72422,
48316,
58303,
85,
16870,
19,
1837,
72453,
1669,
501,
33089,
40170,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDefaultInspect_IsRoot(t *testing.T) {
containerID := "container-id"
tests := map[string]struct {
setupDockerClientMock func(t *testing.T, clientMock *docker.MockClient, expectedCtx context.Context)
expectedIsRoot bool
expectedError error
}{
"ImageInspectWithRaw error": {
setupDock... | explode_data.jsonl/76036 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1054
} | [
2830,
3393,
3675,
58533,
31879,
8439,
1155,
353,
8840,
836,
8,
341,
53290,
915,
1669,
330,
3586,
12897,
1837,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
84571,
35,
13659,
2959,
11571,
2915,
1155,
353,
8840,
836,
11,
2943,
11571,
353,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDeleteBuild(t *testing.T) {
testutil.DeleteAllEtcdKeys()
openshift := NewTestBuildOpenshift(t)
defer openshift.Close()
build := mockBuild()
actual, err := openshift.Client.Builds(testutil.Namespace()).Create(build)
if err != nil {
t.Fatalf("Unexpected error: %v", err)
}
if err := openshift.Client.Bu... | explode_data.jsonl/38964 | {
"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,
6435,
11066,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
18872,
2403,
31860,
4385,
8850,
741,
197,
24175,
47833,
1669,
1532,
2271,
11066,
36771,
47833,
1155,
340,
16867,
15885,
47833,
10421,
741,
69371,
1669,
7860,
11066,
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... | 3 |
func TestWfGetTTLStrategy(t *testing.T) {
wf := Workflow{}
wf.Status.StoredWorkflowSpec = &WorkflowSpec{TTLStrategy: &TTLStrategy{SecondsAfterCompletion: pointer.Int32Ptr(20)}}
result := wf.GetTTLStrategy()
assert.Equal(t, int32(20), *result.SecondsAfterCompletion)
wf.Spec.TTLStrategy = &TTLStrategy{SecondsAfter... | explode_data.jsonl/26050 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
54,
69,
1949,
51,
13470,
19816,
1155,
353,
8840,
836,
8,
341,
6692,
69,
1669,
60173,
31483,
6692,
69,
10538,
7758,
3018,
62768,
8327,
284,
609,
62768,
8327,
76025,
13470,
19816,
25,
609,
51,
13470,
19816,
90,
15343,
6025,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUndefinedLocalsReferenceToInputsBreaks(t *testing.T) {
t.Parallel()
cleanupTerraformFolder(t, TEST_FIXTURE_LOCALS_ERROR_UNDEFINED_LOCAL_BUT_INPUT)
err := runTerragruntCommand(t, fmt.Sprintf("terragrunt apply -auto-approve --terragrunt-non-interactive --terragrunt-working-dir %s", TEST_FIXTURE_LOCALS_ERROR_... | explode_data.jsonl/10115 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 161
} | [
2830,
3393,
30571,
9152,
1127,
8856,
1249,
31946,
22524,
82,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
60639,
51,
13886,
627,
13682,
1155,
11,
13602,
42635,
41486,
28399,
50,
5414,
76863,
28399,
1668,
1381,
21022,
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 TestSliceScanIntoFloat32(t *testing.T) {
tests := []struct{
Slice []float32
}{}
for _, slice := range float32TestSlices {
sliceCopy := append([]float32(nil), slice...)
test := struct{
Slice []float32
}{
Slice: sliceCopy,
}
tests = append(tests, test)
}
for testNumber, test := range tes... | explode_data.jsonl/56812 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 427
} | [
2830,
3393,
33236,
26570,
26591,
5442,
18,
17,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
515,
197,
7568,
4754,
3056,
3649,
18,
17,
198,
197,
15170,
630,
2023,
8358,
15983,
1669,
2088,
2224,
18,
17,
2271,
50,
37414,
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... | 7 |
func TestIsImage(t *testing.T) {
tests := []struct {
name string
path string
expected bool
}{
{name: "TestIsImage_1", path: "invalid.txt", expected: false},
{name: "TestIsImage_2", path: "image.png", expected: true},
{name: "TestIsImage_3", path: "image.jpg", expected: true},
{name: "TestIsImage... | explode_data.jsonl/20381 | {
"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,
3872,
1906,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
26781,
257,
914,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
47006,
25,
330,
2271,
3872,
1906,
62,
16,
497,
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 TestAddSuccess(t *testing.T) {
testRepo := newTestRepo(t)
defer testRepo.cleanup(t)
f, err := os.CreateTemp(testRepo.sut.Dir(), "test")
require.Nil(t, err)
require.Nil(t, f.Close())
filename := filepath.Base(f.Name())
err = testRepo.sut.Add(filename)
require.Nil(t, err)
res, err := command.NewWithWorkD... | explode_data.jsonl/14015 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
2212,
7188,
1155,
353,
8840,
836,
8,
341,
18185,
25243,
1669,
501,
2271,
25243,
1155,
340,
16867,
1273,
25243,
87689,
1155,
692,
1166,
11,
1848,
1669,
2643,
7251,
12151,
8623,
25243,
514,
332,
83757,
1507,
330,
1944,
1138,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHeaderByHash_12965000(t *testing.T) {
t.Parallel()
srv := rpctest.NewFileServer(t, "testdata/get_block_by_hash__12965000.golden")
defer srv.Close()
client := w3.MustDial(srv.URL())
defer client.Close()
var (
header = new(types.Header)
wantHeader = &types.Header{
ParentHash: w3.H("0x3de6bb3... | explode_data.jsonl/62503 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1233
} | [
2830,
3393,
4047,
1359,
6370,
62,
16,
17,
24,
21,
20,
15,
15,
15,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1903,
10553,
1669,
33109,
67880,
7121,
1703,
5475,
1155,
11,
330,
92425,
23302,
7113,
3710,
8950,
563,
16,
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... | 3 |
func TestWSReloadTLSConfig(t *testing.T) {
template := `
listen: "127.0.0.1:-1"
websocket {
listen: "127.0.0.1:-1"
tls {
cert_file: '%s'
key_file: '%s'
ca_file: '../test/configs/certs/ca.pem'
}
}
`
conf := createConfFile(t, []byte(fmt.Sprintf(template,
"../test/configs/certs/server-noip.... | explode_data.jsonl/42737 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 691
} | [
2830,
3393,
7433,
50035,
45439,
2648,
1155,
353,
8840,
836,
8,
341,
22832,
1669,
22074,
197,
14440,
268,
25,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
10944,
16,
698,
197,
197,
83208,
341,
298,
14440,
268,
25,
330,
16,
17,
22,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestIssue9710(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
getSAndMS := func(str string) (int, int) {
results := strings.Split(str, ":")
SAndMS := strings.Split(results[len(results)-1], ".")
var s, ms int
s, _ = strconv.Atoi(SAndMS[0])
i... | explode_data.jsonl/65479 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 377
} | [
2830,
3393,
42006,
24,
22,
16,
15,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
10366,
50,
3036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSendError(t *testing.T) {
var resp string
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusInternalServerError)
w.Header().Set("Content-Type", "application/json")
w.Write([]byte(resp))
}))
defer ts.Close()
ctx := context.Background()
... | explode_data.jsonl/75178 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 290
} | [
2830,
3393,
11505,
1454,
1155,
353,
8840,
836,
8,
341,
2405,
9039,
914,
198,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6692,
69794,
19886,
66760,
340,
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 Test_Successful_Execution_Works_With_Minimal_Release(t *testing.T) {
// Should end in Alert Bad Thing Happened State
release := models.MockMinimalRelease(t)
assertSuccessfulExecution(t, release)
} | explode_data.jsonl/3575 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 65
} | [
2830,
3393,
87161,
1262,
62,
20294,
2763,
73302,
62,
2354,
62122,
2861,
85573,
1155,
353,
8840,
836,
8,
341,
197,
322,
12260,
835,
304,
13975,
11461,
37200,
34700,
6758,
3234,
198,
17200,
1623,
1669,
4119,
24664,
88328,
16077,
1155,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestInputRender(t *testing.T) {
suggestFn := func(string) (s []string) { return s }
tests := []struct {
title string
prompt Input
data InputTemplateData
expected string
}{
{
"Test Input question output without default",
Input{Message: "What is your favorite month:"},
InputTemplateD... | explode_data.jsonl/32518 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1487
} | [
2830,
3393,
2505,
6750,
1155,
353,
8840,
836,
8,
1476,
1903,
3799,
24911,
1669,
2915,
3609,
8,
320,
82,
3056,
917,
8,
314,
470,
274,
555,
78216,
1669,
3056,
1235,
341,
197,
24751,
262,
914,
198,
197,
3223,
14749,
256,
5571,
198,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUpdateTaskRunResourceResult(t *testing.T) {
for _, c := range []struct {
desc string
podStatus corev1.PodStatus
taskRunStatus *v1alpha1.TaskRunStatus
want []v1alpha1.PipelineResourceResult
}{{
desc: "image resource updated",
podStatus: corev1.PodStatus{
ContainerStatuses:... | explode_data.jsonl/887 | {
"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,
4289,
6262,
6727,
4783,
2077,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
272,
1669,
2088,
3056,
1235,
341,
197,
41653,
688,
914,
198,
197,
3223,
347,
2522,
257,
6200,
85,
16,
88823,
2522,
198,
197,
49115,
6727,
2522,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetFeeByTypeOfflineTradeFee(t *testing.T) {
var feeBuilder = setFeeBuilder()
o.GetFeeByType(feeBuilder)
if !areTestAPIKeysSet() {
if feeBuilder.FeeType != exchange.OfflineTradeFee {
t.Errorf("Expected %v, received %v", exchange.OfflineTradeFee, feeBuilder.FeeType)
}
} else {
if feeBuilder.FeeType ... | explode_data.jsonl/30197 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
1949,
41941,
1359,
929,
52563,
39173,
41941,
1155,
353,
8840,
836,
8,
341,
2405,
11060,
3297,
284,
738,
41941,
3297,
741,
22229,
2234,
41941,
1359,
929,
955,
2127,
3297,
340,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
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... | 4 |
func TestCompressionTruncationFailureA(t *testing.T) {
deftlvl := logrus.GetLevel();
logrus.SetLevel(0);
rand.Seed(0)
testData := []byte(RandStringRunes(4000))
testSuffix := "[truncate]"
outputPlugin := OutputPlugin{
PluginID: 10,
stream: "MyStream",
}
var _, err = compressThenTruncate(gzipCompress, testDa... | explode_data.jsonl/74106 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
81411,
1282,
1347,
367,
17507,
32,
1155,
353,
8840,
836,
8,
341,
58351,
723,
58160,
1669,
1487,
20341,
2234,
4449,
543,
90822,
4202,
4449,
7,
15,
626,
7000,
437,
5732,
291,
7,
15,
340,
18185,
1043,
1669,
3056,
3782,
2785,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewMetricsExporter_ProcessMetricsErrSkipProcessingData(t *testing.T) {
me, err := NewMetricsProcessor(testCfg, exportertest.NewNopMetricsExporter(), newTestMProcessor(ErrSkipProcessingData))
require.NoError(t, err)
assert.Equal(t, nil, me.ConsumeMetrics(context.Background(), testdata.GenerateMetricsEmpty())... | explode_data.jsonl/4017 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 111
} | [
2830,
3393,
3564,
27328,
88025,
70241,
27328,
7747,
35134,
28892,
1043,
1155,
353,
8840,
836,
8,
341,
49294,
11,
1848,
1669,
1532,
27328,
22946,
8623,
42467,
11,
7485,
83386,
7121,
45,
453,
27328,
88025,
1507,
501,
2271,
44,
22946,
7,
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 TestManyEntryPoints(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/shared.js": `export default 123`,
"/e00.js": `import x from './shared'; console.log(x)`,
"/e01.js": `import x from './shared'; console.log(x)`,
"/e02.js": `import x from './shared'; console.log(x... | explode_data.jsonl/38534 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1423
} | [
2830,
3393,
8441,
5874,
11411,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
6100,
2857,
788,
1565,
1533,
1638,
220,
16,
17,
18,
63,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPrivateActivityNoHeatmapVisibleForPublic(t *testing.T) {
defer prepareTestEnv(t)()
testPrivateActivityDoSomethingForActionEntries(t)
visible := testPrivateActivityHelperHasVisibleHeatmapFromPublic(t)
assert.True(t, visible, "user should have visible heatmap")
} | explode_data.jsonl/51653 | {
"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,
16787,
4052,
2753,
61306,
2186,
5715,
2461,
12676,
1155,
353,
8840,
836,
8,
341,
16867,
10549,
2271,
14359,
1155,
8,
741,
18185,
16787,
4052,
5404,
23087,
2461,
2512,
24533,
1155,
692,
197,
12601,
1669,
1273,
16787,
4052,
5511... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestList(t *testing.T) {
a := New(t)
eui1, _ := types.ParseAppEUI("8000000000000001")
eui2, _ := types.ParseAppEUI("8000000000000002")
storage := createStorage()
defer storage.Close()
defer storage.Reset()
err := storage.Add(eui1)
a.So(err, ShouldBeNil)
err = storage.Add(eui2)
a.So(err, ShouldBeNil)
... | explode_data.jsonl/397 | {
"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,
852,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
1532,
1155,
692,
7727,
1963,
16,
11,
716,
1669,
4494,
8937,
2164,
36,
2275,
445,
23,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
16,
1138,
7727,
1963,
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 TestAddLocalAddress(t *testing.T) {
var tests = []struct {
address wire.NetAddress
priority AddressPriority
valid bool
}{
{
wire.NetAddress{IP: net.ParseIP("192.168.0.100")},
InterfacePrio,
false,
},
{
wire.NetAddress{IP: net.ParseIP("204.124.1.1")},
InterfacePrio,
true,
},
... | explode_data.jsonl/26477 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 506
} | [
2830,
3393,
2212,
7319,
4286,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
63202,
220,
9067,
16993,
4286,
198,
197,
3223,
8773,
9177,
20555,
198,
197,
56322,
262,
1807,
198,
197,
59403,
197,
197,
515,
298,
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... | 6 |
func TestGetAuth(t *testing.T) {
testCases := []struct {
desc string
labels map[string]string
expected *types.Auth
}{
{
desc: "should return nil when no tags",
labels: map[string]string{},
expected: nil,
},
{
desc: "should return a basic auth",
labels: map[string]string{
Tra... | explode_data.jsonl/51867 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1145
} | [
2830,
3393,
1949,
5087,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
257,
914,
198,
197,
95143,
256,
2415,
14032,
30953,
198,
197,
42400,
353,
9242,
25233,
198,
197,
59403,
197,
197,
515,
298,
41653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPpoll(t *testing.T) {
f, cleanup := mktmpfifo(t)
defer cleanup()
const timeout = 100 * time.Millisecond
ok := make(chan bool, 1)
go func() {
select {
case <-time.After(10 * timeout):
t.Errorf("Ppoll: failed to timeout after %d", 10*timeout)
case <-ok:
}
}()
fds := []unix.PollFd{{Fd: int32(... | explode_data.jsonl/35457 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
47,
30141,
1155,
353,
8840,
836,
8,
341,
1166,
11,
21290,
1669,
23789,
5173,
74031,
1155,
340,
16867,
21290,
2822,
4777,
9632,
284,
220,
16,
15,
15,
353,
882,
71482,
271,
59268,
1669,
1281,
35190,
1807,
11,
220,
16,
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... | 3 |
func TestExternal(t *testing.T) {
defer leaktest.AfterTest(t)()
runDataDrivenTest(
t,
*externalTestData,
memo.ExprFmtHideStats|memo.ExprFmtHideCost|memo.ExprFmtHideRuleProps|
memo.ExprFmtHideQualifications|memo.ExprFmtHideScalars,
)
} | explode_data.jsonl/55162 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
25913,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
56742,
1043,
98484,
2271,
1006,
197,
3244,
345,
197,
197,
9,
20921,
83920,
345,
197,
2109,
6726,
93267,
93322,
21692,
16635,
91,
55409,
9326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAccKeycloakOpenidClient_pkceCodeChallengeMethod(t *testing.T) {
realmName := "terraform-" + acctest.RandString(10)
clientId := "terraform-" + acctest.RandString(10)
resource.Test(t, resource.TestCase{
ProviderFactories: testAccProviderFactories,
PreCheck: func() { testAccPreCheck(t) },
Check... | explode_data.jsonl/52138 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 809
} | [
2830,
3393,
14603,
1592,
88751,
5002,
307,
2959,
33321,
346,
2078,
62078,
3523,
1155,
353,
8840,
836,
8,
341,
17200,
7673,
675,
1669,
330,
61385,
27651,
488,
1613,
67880,
2013,
437,
703,
7,
16,
15,
340,
25291,
764,
1669,
330,
61385,
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 TestPartitionAssignmentHelpers(t *testing.T) {
testTopic := TopicInfo{
Config: map[string]string{
"key": "value",
"retention.ms": "36000000",
},
Partitions: []PartitionInfo{
{
Topic: "topic1",
ID: 0,
Leader: 1,
Replicas: []int{1, 2, 5},
},
{
Topic: "... | explode_data.jsonl/70032 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 857
} | [
2830,
3393,
49978,
41613,
28430,
1155,
353,
8840,
836,
8,
341,
18185,
26406,
1669,
32911,
1731,
515,
197,
66156,
25,
2415,
14032,
30953,
515,
298,
197,
1,
792,
788,
688,
330,
957,
756,
298,
197,
1,
2122,
2939,
39115,
788,
330,
18,
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 TestTopologyBuilder_BuildWithTrafficTargetEmptyDestinationPort(t *testing.T) {
selectorAppA := map[string]string{"app": "app-a"}
selectorAppB := map[string]string{"app": "app-b"}
annotations := map[string]string{
"maesh.containo.us/traffic-type": "http",
"maesh.containo.us/ratelimit-average": "100",
... | explode_data.jsonl/48679 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 605
} | [
2830,
3393,
60954,
3297,
96686,
2354,
87229,
6397,
3522,
33605,
7084,
1155,
353,
8840,
836,
8,
341,
197,
8925,
2164,
32,
1669,
2415,
14032,
30953,
4913,
676,
788,
330,
676,
7409,
16707,
197,
8925,
2164,
33,
1669,
2415,
14032,
30953,
491... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInitializeRemoteStorageDownloadIdentifier(t *testing.T) {
require.NoError(t, os.MkdirAll("data", 0777))
defer os.RemoveAll("data")
s := DefaultServer()
m := memory.Open()
storeData(t, m, "immudb.identifier", []byte{1, 2, 3, 4, 5})
err := s.initializeRemoteStorage(m)
require.NoError(t, err)
require.F... | explode_data.jsonl/38337 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 197
} | [
2830,
3393,
9928,
24703,
5793,
11377,
8714,
1155,
353,
8840,
836,
8,
341,
17957,
35699,
1155,
11,
2643,
1321,
12438,
2403,
445,
691,
497,
220,
15,
22,
22,
22,
1171,
16867,
2643,
84427,
445,
691,
5130,
1903,
1669,
7899,
5475,
741,
2109... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPushPlainHTTPFails(t *testing.T) {
base := testutil.NewBase(t)
reg := testregistry.NewPlainHTTP(base)
defer reg.Cleanup()
base.Cmd("pull", testutil.CommonImage).AssertOK()
testImageRef := fmt.Sprintf("%s:%d/%s:%s",
reg.IP.String(), reg.ListenPort, testutil.Identifier(t), strings.Split(testutil.CommonIm... | explode_data.jsonl/51083 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
16644,
26982,
9230,
37,
6209,
1155,
353,
8840,
836,
8,
341,
24195,
1669,
1273,
1314,
7121,
3978,
1155,
340,
37013,
1669,
1273,
29172,
7121,
26982,
9230,
12663,
340,
16867,
1217,
727,
60639,
2822,
24195,
64512,
445,
23441,
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... | 1 |
func TestPackageVariables(t *testing.T) {
var skippedVariable = map[string]bool{
"runtime.uint16Eface": true,
"runtime.uint32Eface": true,
"runtime.uint64Eface": true,
"runtime.stringEface": true,
"runtime.sliceEface": true,
}
protest.AllowRecording(t)
withTestProcess("testvariables", t, func(p *proc.Ta... | explode_data.jsonl/56248 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 367
} | [
2830,
3393,
13100,
22678,
1155,
353,
8840,
836,
8,
341,
2405,
35157,
7827,
284,
2415,
14032,
96436,
515,
197,
197,
1,
22255,
34693,
16,
21,
36,
1564,
788,
830,
345,
197,
197,
1,
22255,
34693,
18,
17,
36,
1564,
788,
830,
345,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestServers(t *testing.T) {
WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, Statuses, Divisions, Regions, PhysLocations, CacheGroups, DeliveryServices, Servers}, func() {
UpdateTestServers(t)
GetTestServers(t)
GetTestServersDetails(t)
})
} | explode_data.jsonl/69277 | {
"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,
78139,
1155,
353,
8840,
836,
8,
341,
197,
2354,
4121,
2519,
1155,
11,
3056,
7749,
5261,
90,
6484,
47360,
11,
20768,
11,
17695,
1783,
11,
14627,
11,
13522,
11,
71727,
11,
8104,
288,
11,
8765,
6805,
11,
77347,
11,
12809,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBasicEscapeError(t *testing.T) {
recorder := httptest.NewRecorder()
req, err := http.NewRequest(http.MethodGet, "http://localhost:8181", nil)
if err != nil {
panic(err)
}
req.URL.Path = `/invalid/path/foo%LALALA`
compiler := func() *ast.Compiler {
return ast.NewCompiler()
}
store := inmem.New()... | explode_data.jsonl/40606 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 304
} | [
2830,
3393,
15944,
48124,
1454,
1155,
353,
8840,
836,
8,
1476,
67904,
1358,
1669,
54320,
70334,
7121,
47023,
741,
24395,
11,
1848,
1669,
1758,
75274,
19886,
20798,
1949,
11,
330,
1254,
1110,
8301,
25,
23,
16,
23,
16,
497,
2092,
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... | 1 |
func Test_ecb(t *testing.T) {
/*
*src 要加密的字符串
*key 用来加密的密钥 密钥长度可以是128bit、192bit、256bit中的任意一个
*16位key对应128bit
*/
src := "200"
key := "d201e68d1fe59792c308ca0b79b03d29"
crypted, err := AesEcbPkcs5Encrypt([]byte(src), []byte(key))
if err != nil {
fmt.Println(err)
}
fmt.Println("base64UrlSafe result:", base6... | explode_data.jsonl/682 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 279
} | [
2830,
3393,
36844,
65,
1155,
353,
8840,
836,
8,
341,
197,
3284,
197,
9,
3548,
8908,
99,
223,
113456,
9370,
66558,
198,
197,
9,
792,
220,
102688,
113456,
9370,
27641,
103080,
48754,
228,
103080,
98402,
73670,
20412,
16,
17,
23,
4489,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCanSupport(t *testing.T) {
plugMgr := volume.VolumePluginMgr{}
plugMgr.InitPlugins(ProbeVolumePlugins(volume.VolumeConfig{}), nil /* prober */, volumetest.NewFakeVolumeHost("fake", nil, nil))
plug, err := plugMgr.FindPluginByName("kubernetes.io/host-path")
if err != nil {
t.Errorf("Can't find the plugin... | explode_data.jsonl/66772 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 359
} | [
2830,
3393,
6713,
7916,
1155,
353,
8840,
836,
8,
341,
197,
47474,
25567,
1669,
8123,
79106,
11546,
25567,
16094,
197,
47474,
25567,
26849,
45378,
7,
81426,
18902,
45378,
74706,
79106,
2648,
6257,
701,
2092,
1391,
462,
652,
36572,
62820,
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... | 6 |
func TestChangeVehiclesName(t *testing.T) {
a := assert.New(t)
var (
DefaultVersion1 = DefaultVersion + "-1"
DefaultVersion2 = DefaultVersion + "-2"
)
gen := &generatorMock{
id: DefaultID,
versions: []Version{DefaultVersion1, DefaultVersion2},
}
vehicle := NewInstance(gen)
err := vehicle.NameVeh... | explode_data.jsonl/22740 | {
"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,
4072,
53,
41865,
675,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
692,
2405,
2399,
197,
91084,
5637,
16,
284,
7899,
5637,
488,
6523,
16,
698,
197,
91084,
5637,
17,
284,
7899,
5637,
488,
6523,
17,
698,
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 TestData(t *testing.T) {
payloadHead := DataHead{
Flag: 0,
Timestamp: uint64(time.Now().Unix() * 1000),
}
param1 := []interface{}{uint32(3), float32(1.2), int64(10)}
params1, err := tlv.MakeTLVs(param1)
if err != nil {
t.Fatal(err)
}
sub1 := SubData{
Head: SubDataHead{
SubDeviceid: uint16(1)... | explode_data.jsonl/8938 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 537
} | [
2830,
93200,
1155,
353,
8840,
836,
8,
341,
76272,
12346,
1669,
2885,
12346,
515,
197,
197,
12135,
25,
414,
220,
15,
345,
197,
10261,
4702,
25,
2622,
21,
19,
9730,
13244,
1005,
55832,
368,
353,
220,
16,
15,
15,
15,
1326,
197,
532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddHostingPodProperties(t *testing.T) {
namespace := "xyz"
name := "poda"
index := 2
ps := AddHostingPodProperties(namespace, name, index)
ns, nm, idx := GetHostingPodInfoFromProperty(ps)
if ns != namespace {
t.Error("Application perperty test failed: namespace is wrong")
}
if nm != name {
t.Err... | explode_data.jsonl/75722 | {
"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,
2212,
84921,
23527,
7903,
1155,
353,
8840,
836,
8,
341,
56623,
1669,
330,
28854,
698,
11609,
1669,
330,
79,
13993,
698,
26327,
1669,
220,
17,
271,
35009,
1669,
2691,
84921,
23527,
7903,
52397,
11,
829,
11,
1922,
340,
84041,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScanner_Detect(t *testing.T) {
type args struct {
osVer string
pkgs []ftypes.Package
}
tests := []struct {
name string
args args
fixtures []string
want []types.DetectedVulnerability
wantErr string
}{
{
name: "happy path",
fixtures: []string{"testdata/fixtures/photon.... | explode_data.jsonl/15370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1099
} | [
2830,
3393,
31002,
1557,
13176,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
25078,
10141,
914,
198,
197,
3223,
74,
5857,
220,
3056,
723,
1804,
49834,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
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 TestVarStringWireErrors(t *testing.T) {
pver := ProtocolVersion
// str256 is a string that takes a 2-byte varint to encode.
str256 := strings.Repeat("test", 64)
tests := []struct {
in string // Value to encode
buf []byte // Wire encoding
pver uint32 // Protocol version for wire encoding
... | explode_data.jsonl/15301 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 558
} | [
2830,
3393,
3962,
703,
37845,
13877,
1155,
353,
8840,
836,
8,
341,
3223,
423,
1669,
24572,
5637,
271,
197,
322,
607,
17,
20,
21,
374,
264,
914,
429,
4990,
264,
220,
17,
53952,
762,
396,
311,
16164,
624,
11355,
17,
20,
21,
1669,
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... | 4 |
func TestEnumerationNotCoveringVerbStar(t *testing.T) {
escalationTest{
ownerRules: []authorizationapi.PolicyRule{
{Verbs: sets.NewString("get", "list", "watch", "create", "update", "delete", "exec"), Resources: sets.NewString("roles")},
},
servantRules: []authorizationapi.PolicyRule{
{Verbs: sets.NewStrin... | explode_data.jsonl/9054 | {
"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,
67117,
2623,
30896,
287,
66946,
12699,
1155,
353,
8840,
836,
8,
341,
80629,
278,
367,
2271,
515,
197,
197,
8118,
26008,
25,
3056,
39554,
2068,
1069,
8018,
11337,
515,
298,
197,
90,
10141,
1279,
25,
7289,
7121,
703,
445,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestManager_LoadFlowFromFile(t *testing.T) {
log.SetLevel(log.DebugLevel)
config := tpflow.Configs{FlowStorageDir: "./testdata/var/flow_storage", ConnectorStorageDir: "./testdata/var/connectors"}
man, err := NewManager(config)
if err != nil {
t.Error(err)
}
man.LoadFlowFromFile("testflow.json")
mqtt := f... | explode_data.jsonl/28846 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 459
} | [
2830,
3393,
2043,
19553,
18878,
43633,
1155,
353,
8840,
836,
8,
341,
6725,
4202,
4449,
12531,
20345,
4449,
340,
25873,
1669,
18101,
4965,
10753,
82,
90,
18878,
5793,
6184,
25,
5924,
92425,
92146,
14,
4965,
23310,
497,
54814,
5793,
6184,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadConfig(t *testing.T) {
factories, err := componenttest.NopFactories()
assert.NoError(t, err)
factory := NewFactory()
factories.Extensions[typeStr] = factory
cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories)
require.Nil(t, err)
require.NotNil(t, cfg)
e... | explode_data.jsonl/36921 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 305
} | [
2830,
3393,
5879,
2648,
1155,
353,
8840,
836,
8,
341,
1166,
52893,
11,
1848,
1669,
3692,
1944,
2067,
453,
17417,
2433,
741,
6948,
35699,
1155,
11,
1848,
692,
1166,
2919,
1669,
1532,
4153,
741,
1166,
52893,
20526,
21557,
2580,
60,
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 TestRuleCreateDualTable(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := []string{
"create table `dual`(id int, primary key (id));",
}
for _, sql := range sqls {
q, err := NewQuery4Audit(sql)
if err == nil {
rule := q.RuleCreateDualTable()
if rule.Item != ... | explode_data.jsonl/76823 | {
"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,
11337,
4021,
85074,
2556,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
3056,
917,
515,
197,
197,
1,
3182,
1965,
1565,
67,
928,
81556,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFacadeWrapErr(t *testing.T) {
t.Run("nil error", func(t *testing.T) {
assert.Nil(t, facade.WrapErr(nil))
})
t.Run("standard error without prefix", func(t *testing.T) {
err := facade.WrapErr(ohnoError(""))
assert.EqualError(t, err, "type(name): ohno")
assert.True(t, errors.Is(err, ohnoError("")))
}... | explode_data.jsonl/30819 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 872
} | [
2830,
3393,
55331,
26787,
7747,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
8385,
1465,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6948,
59678,
1155,
11,
61616,
38968,
7747,
27907,
1171,
197,
8824,
3244,
16708,
445,
20270,
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... | 1 |
func TestShardTimeRangesString(t *testing.T) {
start := time.Unix(1472824800, 0)
ts := [][]time.Time{
[]time.Time{start, start.Add(testBlockSize)},
[]time.Time{start.Add(2 * testBlockSize), start.Add(4 * testBlockSize)},
[]time.Time{start, start.Add(2 * testBlockSize)},
}
str := shardTimeRanges{
0: xtime.... | explode_data.jsonl/4679 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 354
} | [
2830,
3393,
2016,
567,
1462,
74902,
703,
1155,
353,
8840,
836,
8,
341,
21375,
1669,
882,
10616,
941,
7,
16,
19,
22,
17,
23,
17,
19,
23,
15,
15,
11,
220,
15,
692,
57441,
1669,
52931,
1678,
16299,
515,
197,
197,
1294,
1678,
16299,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWithdraw(t *testing.T) {
app := simapp.Setup(false)
ctx := app.BaseApp.NewContext(false, tmproto.Header{Time: time.Now().UTC()})
addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(80000*1e6))
ok := app.OracleKeeper
params := ok.GetLockedPoolParams(ctx)
amount := sdk.Coins{sdk.NewInt64Coin("uctk", 100... | explode_data.jsonl/9749 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 498
} | [
2830,
3393,
92261,
1155,
353,
8840,
836,
8,
341,
28236,
1669,
1643,
676,
39820,
3576,
340,
20985,
1669,
906,
13018,
2164,
7121,
1972,
3576,
11,
17333,
15110,
15753,
90,
1462,
25,
882,
13244,
1005,
21183,
96503,
12718,
5428,
1669,
1643,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLoad(t *testing.T) {
ctx := context.Background()
// Create a custom list of BuiltIn plugins, it contains the minimal necessary plugins, and UpstreamCA with UpstreamAuthority
builtIns = []catalog.Plugin{
// Fake Datastore
catalog.MakePlugin("fake_ds",
datastore.PluginServer(fakedatastore.New())),
/... | explode_data.jsonl/61922 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1599
} | [
2830,
3393,
5879,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
197,
322,
4230,
264,
2526,
1140,
315,
33054,
641,
17215,
11,
432,
5610,
279,
17377,
5871,
17215,
11,
323,
3138,
4027,
5049,
448,
3138,
4027,
45532,
198,
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 TestStrArray_Fill(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []string{"0"}
a2 := []string{"0"}
array1 := garray.NewStrArrayFrom(a1)
array2 := garray.NewStrArrayFrom(a2)
t.Assert(array1.Fill(1, 2, "100"), nil)
t.Assert(array1.Slice(), []string{"0", "100", "100"})
t.Assert(array2.Fill(0, 2, "... | explode_data.jsonl/53092 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 225
} | [
2830,
3393,
2580,
1857,
1400,
483,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11323,
16,
1669,
3056,
917,
4913,
15,
16707,
197,
11323,
17,
1669,
3056,
917,
4913,
15,
16707,
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 TestIntegrationRangeGet(t *testing.T) {
c := basictestutils.MakeTestConfig(t)
stopfn := testutils.CreateTestApp(c, t)
defer stopfn()
k := testutils.RandKey(16)
v := testutils.RandStringRunes(16)
client := testutils.MakeTestEtcdClient(c, t)
ctx := context.TODO()
_, err := client.Put(ctx, k, v)
if err !=... | explode_data.jsonl/19173 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 284
} | [
2830,
3393,
52464,
6046,
1949,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
3046,
849,
477,
6031,
50133,
2271,
2648,
1155,
340,
62644,
8822,
1669,
1273,
6031,
7251,
2271,
2164,
1337,
11,
259,
340,
16867,
2936,
8822,
2822,
16463,
1669,
1273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestToBytesPos128(t *testing.T) {
expectedBytes := []byte{0, 128}
actualBytes := ToByteArray(big.NewInt(128))
if !reflect.DeepEqual(expectedBytes, actualBytes) {
t.Errorf("Assert failure: incorrect byte-array: ", actualBytes)
}
} | explode_data.jsonl/44835 | {
"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,
1249,
7078,
4859,
16,
17,
23,
1155,
353,
8840,
836,
8,
1476,
42400,
7078,
1669,
3056,
3782,
90,
15,
11,
220,
16,
17,
23,
532,
88814,
7078,
1669,
2014,
18394,
75616,
7121,
1072,
7,
16,
17,
23,
4390,
743,
753,
34913,
947... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEth_GetFilterChanges_NoLogs(t *testing.T) {
param := make([]map[string][]string, 1)
param[0] = make(map[string][]string)
param[0]["topics"] = []string{}
rpcRes := call(t, "eth_newFilter", param)
var ID string
err := json.Unmarshal(rpcRes.Result, &ID)
require.NoError(t, err)
changesRes := call(t, "eth... | explode_data.jsonl/853 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 184
} | [
2830,
3393,
65390,
13614,
5632,
11317,
36989,
51053,
1155,
353,
8840,
836,
8,
341,
36037,
1669,
1281,
10556,
2186,
14032,
45725,
917,
11,
220,
16,
340,
36037,
58,
15,
60,
284,
1281,
9147,
14032,
45725,
917,
340,
36037,
58,
15,
9868,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_NegativeCallSingleCommandWithoutSubcommandWithFlag(t *testing.T) {
out, err := test.ExecuteCommand(buildTestCmd(), "completion", "--fail")
if err != nil {
assert.Error(t, err)
}
assert.Contains(t, out, "Error: unknown flag: --fail")
assert.Contains(t, out, `Usage:`)
assert.NotContains(t, out, `Avail... | explode_data.jsonl/59262 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
1604,
15060,
7220,
10888,
4062,
26040,
3136,
5631,
2354,
12135,
1155,
353,
8840,
836,
8,
341,
13967,
11,
1848,
1669,
1273,
13827,
4062,
43333,
2271,
15613,
1507,
330,
43312,
497,
14482,
18403,
1138,
743,
1848,
961,
2092,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestClient_CreateExternalInitiator_Errors(t *testing.T) {
t.Parallel()
tests := []struct {
name string
args []string
}{
{"no arguments", []string{}},
{"too many arguments", []string{"bitcoin", "https://valid.url", "extra arg"}},
{"invalid url", []string{"bitcoin", "not a url"}},
}
for _, tt := ran... | explode_data.jsonl/5266 | {
"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,
2959,
34325,
25913,
3803,
36122,
93623,
1087,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
3056,
917,
198,
197,
59403,
197,
197,
4913,
2152,
5977,
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... | 1 |
func TestDaysNarrow(t *testing.T) {
trans := New()
days := trans.WeekdaysNarrow()
for i, day := range days {
s := trans.WeekdayNarrow(time.Weekday(i))
if s != day {
t.Errorf("Expected '%s' Got '%s'", string(day), s)
}
}
tests := []struct {
idx int
expected string
}{
// {
// idx: 0,
... | explode_data.jsonl/1283 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 470
} | [
2830,
3393,
20557,
45,
6044,
1155,
353,
8840,
836,
8,
1476,
72453,
1669,
1532,
741,
2698,
942,
1669,
1356,
22404,
1225,
13778,
45,
6044,
2822,
2023,
600,
11,
1899,
1669,
2088,
2849,
341,
197,
1903,
1669,
1356,
22404,
1225,
1292,
45,
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... | 5 |
func TestAccAwsDmsEndpoint_Elasticsearch_ErrorRetryDuration(t *testing.T) {
resourceName := "aws_dms_endpoint.test"
rName := acctest.RandomWithPrefix("tf-acc-test")
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: dmsEndpoin... | explode_data.jsonl/37169 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 568
} | [
2830,
3393,
14603,
47359,
35,
1011,
27380,
2089,
51179,
1836,
28651,
51560,
12945,
1155,
353,
8840,
836,
8,
341,
50346,
675,
1669,
330,
8635,
814,
1011,
36699,
5958,
698,
7000,
675,
1669,
1613,
67880,
26709,
2354,
14335,
445,
8935,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReadEnvironment(t *testing.T) {
conf := DefaultConfig()
os.Setenv("DATABASE_HOST", "postgres")
os.Setenv("DATABASE_PORT", "5432")
ReadEnvironment(conf)
assert.Equal(t, "postgres", conf.Database.Host)
assert.Equal(t, int16(5432), conf.Database.Port)
} | explode_data.jsonl/16777 | {
"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,
4418,
12723,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
7899,
2648,
741,
25078,
4202,
3160,
445,
46499,
17213,
497,
330,
43070,
1138,
25078,
4202,
3160,
445,
46499,
12377,
497,
330,
20,
19,
18,
17,
5130,
96043,
12723,
29879,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEtcdSDDeleteServer(t *testing.T) {
t.Parallel()
for _, table := range etcdSDTables {
t.Run(table.server.ID, func(t *testing.T) {
config := config.NewDefaultEtcdServiceDiscoveryConfig()
c, cli := helpers.GetTestEtcd(t)
defer c.Terminate(t)
e := getEtcdSD(t, *config, table.server, cli)
e.Init(... | explode_data.jsonl/61559 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 314
} | [
2830,
3393,
31860,
4385,
5491,
6435,
5475,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2023,
8358,
1965,
1669,
2088,
1842,
4385,
5491,
21670,
341,
197,
3244,
16708,
15761,
12638,
9910,
11,
2915,
1155,
353,
8840,
836,
8,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestErrorsDontFailUpdate(t *testing.T) {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, genericfeatures.ServerSideApply, true)()
_, client, closeFn := setup(t)
defer closeFn()
_, err := client.CoreV1().RESTClient().Post().
Namespace("default").
Resource("configmaps")... | explode_data.jsonl/53481 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 641
} | [
2830,
3393,
13877,
35,
544,
19524,
4289,
1155,
353,
8840,
836,
8,
341,
16867,
4565,
70,
266,
57824,
287,
4202,
13859,
42318,
16014,
2271,
1155,
11,
4094,
12753,
13275,
13859,
42318,
11,
13954,
20304,
22997,
16384,
28497,
11,
830,
8,
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... | 3 |
func TestServePrometheusMetrics(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
defer cancel()
err := ServePrometheusMetrics(ctx, ":12345")
if err != nil && err != http.ErrServerClosed {
t.Fatal(err)
}
} | explode_data.jsonl/17959 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
60421,
35186,
39705,
27328,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
882,
32435,
9,
20,
340,
16867,
9121,
741,
9859,
1669,
52932,
35186,
39705,
27328,
7502,
11,
13022,
16,
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... | 3 |
func TestGenerateVersionSetWithVersionInfo(t *testing.T) {
groupA := "A"
groupB := ""
dpl1 := generateFakeDpl(groupA, "dpl1", "1.0.0")
dpl2 := generateFakeDpl(groupA, "dpl2", "2.0.0")
dpl3 := generateFakeDpl(groupA, "dpl3", "1.8.0")
dpl1b := generateFakeDpl(groupB, "dpl1b", "1.0.0")
dpl2b := generateFakeDpl(gr... | explode_data.jsonl/34644 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 808
} | [
2830,
3393,
31115,
5637,
1649,
2354,
5637,
1731,
1155,
353,
8840,
836,
8,
341,
44260,
32,
1669,
330,
32,
698,
44260,
33,
1669,
35829,
2698,
500,
16,
1669,
6923,
52317,
35,
500,
17690,
32,
11,
330,
67,
500,
16,
497,
330,
16,
13,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestFailingSample1(t *testing.T) {
_, funcErr, assert, _, _ := testOpenAPITypeWriter(t, `
package foo
// Map sample tests openAPIGen.generateMapProperty method.
type Blah struct {
// A sample String to String map
StringToArray map[string]map[string]map[int]string
}
`)
if assert.Error(funcErr, "An error was e... | explode_data.jsonl/3351 | {
"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,
37,
14277,
17571,
16,
1155,
353,
8840,
836,
8,
341,
197,
6878,
2915,
7747,
11,
2060,
11,
8358,
716,
1669,
1273,
5002,
7082,
929,
6492,
1155,
11,
22074,
1722,
15229,
271,
322,
5027,
6077,
7032,
1787,
7082,
9967,
22019,
2227... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestWindowPostDisputeFails(t *testing.T) {
kit.Expensive(t)
kit.QuietMiningLogs()
blocktime := 2 * time.Millisecond
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
opts := kit.ConstructorOpts(kit.LatestActorsAt(-1))
client, miner, ens := kit.EnsembleMinimal(t, kit.MockProofs(), op... | explode_data.jsonl/8106 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 991
} | [
2830,
3393,
4267,
4133,
4839,
8492,
37,
6209,
1155,
353,
8840,
836,
8,
341,
197,
8226,
49844,
4025,
1155,
692,
197,
8226,
10003,
1963,
295,
96412,
51053,
2822,
47996,
1678,
1669,
220,
17,
353,
882,
71482,
271,
20985,
11,
9121,
1669,
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... | 6 |
func TestCheckTemplate(t *testing.T) {
client := GetTestingElasticsearch()
err := client.Connect(5 * time.Second)
assert.Nil(t, err)
// Check for non existant template
assert.False(t, client.CheckTemplate("libbeat-notexists"))
} | explode_data.jsonl/40098 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
3973,
7275,
1155,
353,
8840,
836,
8,
1476,
25291,
1669,
2126,
16451,
36,
51179,
1836,
741,
9859,
1669,
2943,
43851,
7,
20,
353,
882,
32435,
340,
6948,
59678,
1155,
11,
1848,
692,
197,
322,
4248,
369,
2477,
3000,
517,
3811,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestRowsResultTag(t *testing.T) {
type ResultTag interface {
Result() driver.Result
Tag() string
}
tests := []struct {
query string
tag string
ra int64
}{
{
query: "CREATE TEMP TABLE temp (a int)",
tag: "CREATE TABLE",
},
{
query: "INSERT INTO temp VALUES (1), (2)",
tag: "... | explode_data.jsonl/73507 | {
"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,
9024,
2077,
5668,
1155,
353,
8840,
836,
8,
341,
13158,
5714,
5668,
3749,
341,
197,
56503,
368,
5579,
18456,
198,
197,
197,
5668,
368,
914,
198,
197,
630,
78216,
1669,
3056,
1235,
341,
197,
27274,
914,
198,
197,
60439,
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... | 6 |
func TestRequiredWithEnvarMissingErrors(t *testing.T) {
app := New("test", "")
app.Flag("t", "").OverrideDefaultFromEnvar("TEST_ENVAR").Required().Int()
_, err := app.Parse([]string{})
assert.Error(t, err)
} | explode_data.jsonl/74866 | {
"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,
8164,
2354,
1702,
947,
25080,
13877,
1155,
353,
8840,
836,
8,
341,
28236,
1669,
1532,
445,
1944,
497,
14676,
28236,
80911,
445,
83,
497,
35229,
2177,
3675,
3830,
1702,
947,
445,
10033,
22027,
934,
1827,
8164,
1005,
1072,
741... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestAE(t *testing.T) {
t.Run("AbortDoesn'tBlockUninitialized", func(t *testing.T) {
c := newCluster()
ch := make(chan struct{})
go func() {
c.abortAntiEntropy()
close(ch)
}()
select {
case <-ch:
return
case <-time.After(time.Second):
t.Fatalf("aborting anti entropy on a new cluster block... | explode_data.jsonl/59884 | {
"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,
13669,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
85891,
21468,
77,
944,
4713,
1806,
36161,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
1444,
1669,
501,
28678,
741,
197,
23049,
1669,
1281,
35190,
2036,
37790,
197,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPauseResumeV2(t *testing.T) {
test.EnsurePrivilege(t)
require.CgroupsV2Unified(t)
manager := &ManagerLC{}
if err := manager.Pause(); err == nil {
t.Errorf("unexpected success with PID 0")
}
if err := manager.Resume(); err == nil {
t.Errorf("unexpected success with PID 0")
}
cmd := exec.Command("/... | explode_data.jsonl/72688 | {
"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,
28391,
28563,
53,
17,
1155,
353,
8840,
836,
8,
341,
18185,
22834,
19098,
32124,
42769,
1155,
340,
17957,
727,
16753,
53,
17,
85379,
1155,
692,
92272,
1669,
609,
2043,
8556,
16094,
743,
1848,
1669,
6645,
1069,
3454,
2129,
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 TestResubscribe(t *testing.T) {
s := pubsub.NewServer()
s.SetLogger(log.TestingLogger())
s.Start()
defer s.Stop()
ctx := context.Background()
_, err := s.Subscribe(ctx, clientID, query.Empty{})
require.NoError(t, err)
err = s.Unsubscribe(ctx, clientID, query.Empty{})
require.NoError(t, err)
subscription... | explode_data.jsonl/22061 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 197
} | [
2830,
3393,
1061,
392,
6273,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
6675,
1966,
7121,
5475,
741,
1903,
4202,
7395,
12531,
8787,
287,
7395,
2398,
1903,
12101,
741,
16867,
274,
30213,
2822,
20985,
1669,
2266,
19047,
741,
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 TestMaxBurst(t *testing.T) {
t.Parallel()
if testing.Short() {
t.SkipNow()
}
sp, sc, cleanup := setup(t, SessionPoolConfig{MaxBurst: 1})
defer cleanup()
// Will cause session creation RPC to be retried forever.
sc.InjectError("CreateSession", status.Errorf(codes.Unavailable, "try later"))
// This sessi... | explode_data.jsonl/78699 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 472
} | [
2830,
3393,
5974,
33,
32612,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
7039,
741,
197,
630,
41378,
11,
1136,
11,
21290,
1669,
6505,
1155,
11,
9164,
10551,
2648,
90,
5974,
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... | 8 |
func TestDeployWithErrorChangingKubeConfig(t *testing.T) {
p := &fakeProxy{}
e := &fakeExecutor{}
c := &deployCommand{
proxy: p,
executor: e,
kubeconfig: &fakeKubeConfig{
errOnModify: assert.AnError,
},
}
ctx := context.Background()
cwd := "/tmp"
opts := &Options{
Name: "movies",
Manife... | explode_data.jsonl/6525 | {
"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,
69464,
66102,
59046,
42,
3760,
2648,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
609,
30570,
16219,
16094,
7727,
1669,
609,
30570,
25255,
16094,
1444,
1669,
609,
35794,
4062,
515,
197,
197,
22803,
25,
262,
281,
345,
197,
67328... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestValidateAnnotations(t *testing.T) {
successCases := []map[string]string{
{"simple": "bar"},
{"now-with-dashes": "bar"},
{"1-starts-with-num": "bar"},
{"1234": "bar"},
{"simple/simple": "bar"},
{"now-with-dashes/simple": "bar"},
{"now-with-dashes/now-with-dashes": "bar"},
{"now.with.dots/simple... | explode_data.jsonl/62783 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 728
} | [
2830,
3393,
17926,
21418,
1155,
353,
8840,
836,
8,
341,
30553,
37302,
1669,
3056,
2186,
14032,
30953,
515,
197,
197,
4913,
22944,
788,
330,
2257,
7115,
197,
197,
4913,
3328,
26189,
1737,
14051,
788,
330,
2257,
7115,
197,
197,
4913,
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... | 8 |
func TestInv(t *testing.T) {
vs := []struct {
a, b, c float64
}{
{10, 0, 30},
{30, 10, 0},
{10, 30, 0},
}
for i, v := range vs {
a := RX(Degrees(v.a)).XM(RY(Degrees(v.b))).XM(RZ(Degrees(v.c)))
b := RZ(Degrees(-v.c)).XM(RY(Degrees(-v.b))).XM(RX(Degrees(-v.a)))
if !a.XM(b).Equals(I) {
t.Fatalf("[%d] ... | explode_data.jsonl/47410 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 305
} | [
2830,
3393,
15174,
1155,
353,
8840,
836,
8,
341,
5195,
82,
1669,
3056,
1235,
341,
197,
11323,
11,
293,
11,
272,
2224,
21,
19,
198,
197,
59403,
197,
197,
90,
16,
15,
11,
220,
15,
11,
220,
18,
15,
1583,
197,
197,
90,
18,
15,
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... | 5 |
func TestRenameTeam(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
team := th.CreateTeam()
newTeamName := "newteamnamex3"
newDisplayName := "New Display NameX"
th.CheckCommand(t, "team", "rename", team.Name, newTeamName, "--display_name", newDisplayName)
// Get the team from the DB
updatedTe... | explode_data.jsonl/59049 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 589
} | [
2830,
3393,
88757,
14597,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
197,
9196,
1669,
270,
7251,
14597,
2822,
8638,
14597,
675,
1669,
330,
931,
9196,
12400,
327,
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 |
func TestHeadContexts(t *testing.T) {
type commitContext struct {
// one context per commit for testing
context string
sha string
}
win := "win"
lose := "lose"
headSHA := "head"
testCases := []struct {
name string
commitContexts []commitContext
expectAPICall bool
expec... | explode_data.jsonl/42787 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1093
} | [
2830,
3393,
12346,
1972,
82,
1155,
353,
8840,
836,
8,
341,
13158,
5266,
1972,
2036,
341,
197,
197,
322,
825,
2266,
817,
5266,
369,
7497,
198,
197,
28413,
914,
198,
197,
197,
15247,
257,
914,
198,
197,
630,
68452,
1669,
330,
7526,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestConvertBinary(t *testing.T) {
lines, err := convertTypes(
"Foo", "Bar",
`struct Foo {
1: optional binary one
2: required binary two
}
struct Bar {
1: optional binary one
2: required binary two
}`,
nil,
nil,
)
assert.NoError(t, err)
assertPrettyEqual(t, trim(`
out.One = []byte(... | explode_data.jsonl/62033 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 163
} | [
2830,
3393,
12012,
21338,
1155,
353,
8840,
836,
8,
341,
78390,
11,
1848,
1669,
5508,
4173,
1006,
197,
197,
1,
40923,
497,
330,
3428,
756,
197,
197,
63,
1235,
33428,
341,
298,
197,
16,
25,
10101,
7868,
825,
198,
298,
197,
17,
25,
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 TestCanCreateTag(t *testing.T) {
// Setup
db, err := sql.Open("knowledge", "identifier")
defer db.Close()
checkError(err)
rec := httptest.NewRecorder()
e := echo.New()
h := NewHandler(db, "secret")
// First register the user.
assert.NoError(t, registerUser(db, e, rec, h, user1JSON))
// Login the user
... | explode_data.jsonl/59030 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 290
} | [
2830,
3393,
6713,
4021,
5668,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
198,
20939,
11,
1848,
1669,
5704,
12953,
445,
89053,
497,
330,
15909,
1138,
16867,
2927,
10421,
741,
25157,
1454,
3964,
692,
67904,
1669,
54320,
70334,
7121,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_Context(t *testing.T) {
Convey("Context", t, func() {
Convey("Setting context, checking it and deleting it", func() {
c := &Context{}
c.Set("foo", "bar")
So(c.Get("foo"), ShouldEqual, "bar")
So(c.Delete("foo"), ShouldBeTrue)
})
Convey("Invalid Keys", func() {
c := &Context{}
So(c.Ge... | explode_data.jsonl/17258 | {
"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,
71994,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
1972,
497,
259,
11,
2915,
368,
1476,
197,
93070,
5617,
445,
15400,
2266,
11,
13295,
432,
323,
33011,
432,
497,
2915,
368,
341,
298,
1444,
1669,
609,
1972,
16094,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMemoize_Error(t *testing.T) {
controller := gomock.NewController(t)
defer controller.Finish()
args := &core.ConvertArgs{
Build: &core.Build{After: "3950521325d4744760a96c18e3d0c67d86495af3"},
Repo: &core.Repository{ID: 42},
}
want := errors.New("not found")
base := mock.NewMockConvertService(contr... | explode_data.jsonl/47 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 271
} | [
2830,
3393,
46402,
551,
28651,
1155,
353,
8840,
836,
8,
341,
61615,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
6461,
991,
18176,
2822,
31215,
1669,
609,
2153,
36179,
4117,
515,
197,
197,
11066,
25,
609,
2153,
25212,
90,
6025,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoveItemFromList(t *testing.T) {
host := NewHost(defaultConnectionString)
defer host.Close()
list, err := NewList(host, listname)
if err != nil {
t.Error(err)
}
list.Clear()
if err := list.Add(testdata1); err != nil {
t.Errorf("Error, could not add item to list! %s", err)
}
if err := list.Ad... | explode_data.jsonl/35187 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 360
} | [
2830,
3393,
13021,
1234,
3830,
852,
1155,
353,
8840,
836,
8,
1476,
63104,
1669,
1532,
9296,
18978,
40431,
340,
16867,
3468,
10421,
2822,
14440,
11,
1848,
1669,
1532,
852,
19973,
11,
1140,
606,
340,
743,
1848,
961,
2092,
341,
197,
3244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestErrorParsing(t *testing.T) {
dktesting.ParallelTest(t, specs, func(t *testing.T, c dktest.ContainerInfo) {
ip, port, err := c.FirstPort()
if err != nil {
t.Fatal(err)
}
addr := fbConnectionString(ip, port)
p := &Firebird{}
d, err := p.Open(addr)
if err != nil {
t.Fatal(err)
}
defer fu... | explode_data.jsonl/62211 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 351
} | [
2830,
3393,
1454,
68839,
1155,
353,
8840,
836,
8,
341,
2698,
74,
8840,
41288,
7957,
2271,
1155,
11,
32247,
11,
2915,
1155,
353,
8840,
836,
11,
272,
40204,
1944,
33672,
1731,
8,
341,
197,
46531,
11,
2635,
11,
1848,
1669,
272,
15926,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.