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 TestPluginFieldResolve(t *testing.T) {
grpcClientMock, teardown := setupPluginDriverTests(t)
defer teardown(t)
plug := plugin.NewPlugin(plugin.Config{
Cmd: "fake-plugin-command",
})
defer plug.Close()
data := []struct {
in driver.FieldResolveInput
out driver.FieldResolveOutput
outErr error
}{... | explode_data.jsonl/37052 | {
"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,
11546,
1877,
56808,
1155,
353,
8840,
836,
8,
341,
197,
56585,
2959,
11571,
11,
49304,
1669,
6505,
11546,
11349,
18200,
1155,
340,
16867,
49304,
1155,
340,
197,
47474,
1669,
9006,
7121,
11546,
46801,
10753,
515,
197,
6258,
2277... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDBUpdateInvalidHeader(t *testing.T) {
n := model.Name{Name: "Invalid"}
body, _ := json.Marshal(n)
request, _ := http.NewRequest("PUT", endpointPrefix+"/name/update/1", bytes.NewReader(body))
request.Header.Set("Content-Type", "invalid")
client := &http.Client{}
resp, _ := client.Do(request)
if resp.Stat... | explode_data.jsonl/64863 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
3506,
4289,
7928,
4047,
1155,
353,
8840,
836,
8,
341,
9038,
1669,
1614,
2967,
63121,
25,
330,
7928,
16707,
35402,
11,
716,
1669,
2951,
37271,
1445,
340,
23555,
11,
716,
1669,
1758,
75274,
445,
6221,
497,
14887,
14335,
27569,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFetch(t *testing.T) {
compose.EnsureUp(t, "redis")
ms := mbtest.NewReportingMetricSetV2(t, getConfig())
events, err := mbtest.ReportingFetchV2(ms)
if err != nil {
t.Fatal("fetch", err)
}
event := events[0].MetricSetFields
t.Logf("%s/%s event: %+v", ms.Module().Name(), ms.Name(), event)
// Check fi... | explode_data.jsonl/5186 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 187
} | [
2830,
3393,
20714,
1155,
353,
8840,
836,
8,
341,
32810,
2900,
22834,
19098,
2324,
1155,
11,
330,
21748,
5130,
47691,
1669,
10016,
1944,
7121,
70131,
54310,
1649,
53,
17,
1155,
11,
66763,
2398,
90873,
11,
1848,
1669,
10016,
1944,
43648,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeprovision(t *testing.T) {
tc, mctx, user := ephemeralKeyTestSetup(t)
defer tc.Cleanup()
// Confirm that the user has a userEK.
uid := tc.G.Env.GetUID()
uids := []keybase1.UID{uid}
statements, err := fetchUserEKStatements(mctx, uids)
require.NoError(t, err)
firstStatement, ok := statements[uid]
requ... | explode_data.jsonl/65199 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1044
} | [
2830,
3393,
7839,
299,
13013,
1155,
353,
8840,
836,
8,
341,
78255,
11,
296,
3773,
11,
1196,
1669,
82134,
3253,
1592,
2271,
21821,
1155,
340,
16867,
17130,
727,
60639,
2822,
197,
322,
33563,
429,
279,
1196,
702,
264,
1196,
71133,
624,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestApiTest_GraphQLQuery(t *testing.T) {
apitest.New().
HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
bodyBytes, err := ioutil.ReadAll(r.Body)
if err != nil {
t.Fatal(err)
}
var req apitest.GraphQLRequestBody
if err := json.Unmarshal(bodyBytes, &req); err != nil {
t.Fatal(er... | explode_data.jsonl/54795 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 262
} | [
2830,
3393,
6563,
2271,
2646,
1935,
3588,
2859,
1155,
353,
8840,
836,
8,
341,
69898,
97105,
7121,
25829,
197,
197,
3050,
9626,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
298,
35402,
7078,
11,
1848,
1669,
43144,
41851,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplyOne(t *testing.T) {
delta := &Delta{
Type: GAUGE,
Method: "add",
Name: "rappers",
Help: "gangsta musicians",
Value: 27.292,
}
// set an initial value
initialValue := 101.4
gauge := prometheus.NewGauge(prometheus.GaugeOpts{
Name: delta.Name,
Help: delta.Help,
})
err := prometheu... | explode_data.jsonl/39903 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 293
} | [
2830,
3393,
28497,
3966,
1155,
353,
8840,
836,
8,
341,
85435,
1669,
609,
20277,
515,
197,
27725,
25,
256,
26341,
47644,
345,
197,
84589,
25,
330,
718,
756,
197,
21297,
25,
256,
330,
81,
27821,
756,
197,
197,
12689,
25,
256,
330,
460... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnderlyingPtr(t *testing.T) {
const sample = "Hello, 世界"
eqType := func(t *testing.T, typ, expect reflect.Type) {
t.Helper()
if typ != expect {
t.Error("expected type string, got", typ)
}
}
// eq verifies the backing array.
eq := func(t *testing.T, ptr unsafe.Pointer) {
t.Helper()
var (
... | explode_data.jsonl/9681 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 914
} | [
2830,
3393,
16250,
6711,
5348,
1155,
353,
8840,
836,
8,
341,
4777,
6077,
284,
330,
9707,
11,
220,
99489,
1837,
7727,
80,
929,
1669,
2915,
1155,
353,
8840,
836,
11,
3582,
11,
1720,
8708,
10184,
8,
341,
197,
3244,
69282,
2822,
197,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNoLockWorks(t *testing.T) {
dktesting.ParallelTest(t, specs, func(t *testing.T, c dktest.ContainerInfo) {
ip, port, err := c.Port(defaultPort)
if err != nil {
t.Fatal(err)
}
addr := fmt.Sprintf("mysql://root:root@tcp(%v:%v)/public", ip, port)
p := &Mysql{}
d, err := p.Open(addr)
if err != ni... | explode_data.jsonl/47865 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 387
} | [
2830,
3393,
2753,
11989,
37683,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBlock(t *testing.T) {
pver := ProtocolVersion
// Block 1 header.
prevHash := &blockOne.Header.PrevBlock
merkleHash := &blockOne.Header.MerkleRoot
bits := blockOne.Header.Bits
nonce := blockOne.Header.Nonce
bh := NewBlockHeader(1, prevHash, merkleHash, bits, nonce)
// Ensure the command is expected va... | explode_data.jsonl/16740 | {
"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,
4713,
1155,
353,
8840,
836,
8,
341,
3223,
423,
1669,
24572,
5637,
271,
197,
322,
8362,
220,
16,
4247,
624,
50728,
6370,
1669,
609,
4574,
3966,
15753,
1069,
7282,
4713,
198,
197,
1174,
23089,
6370,
1669,
609,
4574,
3966,
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... | 6 |
func TestPublishInvalidSourceIdInHeader(t *testing.T) {
payload := buildDefaultTestPayloadWithoutSourceId()
body, statusCode := performPublishRequestWithHeaders(t, publishServer.URL, payload, map[string]string{api.HeaderSourceId: testSourceIdInvalid})
assertExpectedError(t, body, statusCode, http.StatusBadRequest, a... | explode_data.jsonl/74421 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
50145,
7928,
3608,
764,
641,
4047,
1155,
353,
8840,
836,
8,
341,
76272,
1669,
1936,
3675,
2271,
29683,
26040,
3608,
764,
741,
35402,
11,
35532,
1669,
2736,
50145,
1900,
2354,
10574,
1155,
11,
3415,
5475,
20893,
11,
7729,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMetaScanBounds(t *testing.T) {
testCases := []struct {
key, expStart, expEnd []byte
expError string
}{
{
key: roachpb.RKey{},
expStart: Meta1Prefix,
expEnd: Meta1Prefix.PrefixEnd(),
expError: "",
},
{
key: makeKey(Meta2Prefix, roachpb.Key("foo")),
expStar... | explode_data.jsonl/56594 | {
"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,
12175,
26570,
11394,
1155,
353,
8840,
836,
8,
1476,
18185,
37302,
1669,
3056,
1235,
341,
197,
23634,
11,
1343,
3479,
11,
1343,
3727,
3056,
3782,
198,
197,
48558,
1454,
1060,
914,
198,
197,
59403,
197,
197,
515,
298,
23634,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBitcoinBech32AddressValidation(t *testing.T) {
validate := New()
tests := []struct {
param string
expected bool
}{
{"", false},
{"bc1rw5uspcuh", false},
{"bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t5", false},
{"BC13W508D6QEJXTDG4Y5R3ZARVARY0C5XW7KN40WF2", false},
{"qw508d6qejxtdg4y5r3zarva... | explode_data.jsonl/77294 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1025
} | [
2830,
3393,
48287,
3430,
331,
18,
17,
4286,
13799,
1155,
353,
8840,
836,
8,
1476,
197,
7067,
1669,
1532,
2822,
78216,
1669,
3056,
1235,
341,
197,
36037,
262,
914,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
4913,
497,
895,
1583,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSlashAtFutureHeight(t *testing.T) {
app, ctx, _, _ := bootstrapSlashTest(t, 10)
consAddr := sdk.ConsAddress(PKs[0].Address())
fraction := sdk.NewDecWithPrec(5, 1)
require.Panics(t, func() { app.StakingKeeper.Slash(ctx, consAddr, 1, 10, fraction) })
} | explode_data.jsonl/25500 | {
"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,
88004,
1655,
24206,
3640,
1155,
353,
8840,
836,
8,
341,
28236,
11,
5635,
11,
8358,
716,
1669,
26925,
88004,
2271,
1155,
11,
220,
16,
15,
692,
197,
6254,
13986,
1669,
45402,
94594,
4286,
5304,
42,
82,
58,
15,
936,
4286,
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 TestTransferInputVerify(t *testing.T) {
in := TransferInput{
Amt: 1,
Input: Input{
SigIndices: []uint32{0, 1},
},
}
err := in.Verify()
if err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/31620 | {
"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,
21970,
2505,
32627,
1155,
353,
8840,
836,
8,
341,
17430,
1669,
23200,
2505,
515,
197,
22985,
2501,
25,
220,
16,
345,
197,
66588,
25,
5571,
515,
298,
7568,
343,
31941,
25,
3056,
2496,
18,
17,
90,
15,
11,
220,
16,
1583,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreYaml_APIGateway(t *testing.T) {
type (
tc struct {
name string
// Before the data gets processed
pre func(ctx context.Context, s store.Storer) (error, *su.DecodeFilter)
// After the data gets processed
postStoreDecode func(req *require.Assertions, err error)
postYamlEncode func(req *... | explode_data.jsonl/10805 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1430
} | [
2830,
3393,
6093,
56,
9467,
11415,
40709,
1155,
353,
8840,
836,
8,
341,
13158,
2399,
197,
78255,
2036,
341,
298,
11609,
914,
198,
298,
197,
322,
13235,
279,
821,
5221,
15233,
198,
298,
40346,
2915,
7502,
2266,
9328,
11,
274,
3553,
775... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEntryAddUntimedClosedListError(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
e, lists, _ := testEntry(ctrl, testEntryOptions{})
e.closed = false
lists.closed = true
require.Error(t, e.AddUntimed(testCounter, metadata.DefaultStagedMetadatas))
} | explode_data.jsonl/24215 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 103
} | [
2830,
3393,
5874,
2212,
20250,
75485,
26884,
852,
1454,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
7727,
11,
11469,
11,
716,
1669,
1273,
5874,
62100,
11,
1273,
5874,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIncreaseCounter(t *testing.T) {
counter := 0
for i := 0; i < 1000; i++ {
wg.Add(1)
go func() {
counter++
wg.Done()
}()
}
wg.Wait()
t.Log(("Counter = " + strconv.Itoa(counter)))
} | explode_data.jsonl/12917 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 99
} | [
2830,
3393,
69556,
14099,
1155,
353,
8840,
836,
8,
341,
220,
5546,
1669,
220,
15,
198,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
15,
15,
26,
600,
1027,
341,
197,
72079,
1904,
7,
16,
340,
197,
30680,
2915,
368,
341,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOverlapping(t *testing.T) {
a := &testFsInfo{name: "name", root: "root"}
slash := string(os.PathSeparator) // native path separator
for _, test := range []struct {
name string
root string
expected bool
}{
{"name", "root", true},
{"namey", "root", false},
{"name", "rooty", false},
{"na... | explode_data.jsonl/51948 | {
"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,
1918,
90619,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
609,
1944,
48300,
1731,
47006,
25,
330,
606,
497,
3704,
25,
330,
2888,
16707,
1903,
24686,
1669,
914,
9638,
17474,
16409,
8,
442,
9867,
1815,
24792,
198,
2023,
8358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIDJSONUnmarshalingError(t *testing.T) {
v := jsonType{}
err := json.Unmarshal([]byte(`{"ID":"9M4E2MR0UI3E8A215N4G"}`), &v)
assert.EqualError(t, err, strInvalidID)
err = json.Unmarshal([]byte(`{"ID":"TYjhW2D0huQoQS"}`), &v)
assert.EqualError(t, err, strInvalidID)
err = json.Unmarshal([]byte(`{"ID":"TYjhW2... | explode_data.jsonl/58925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
915,
5370,
1806,
36239,
6132,
1454,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
2951,
929,
16094,
9859,
1669,
2951,
38097,
10556,
3782,
5809,
4913,
915,
3252,
24,
44,
19,
36,
17,
18446,
15,
2275,
18,
36,
23,
32,
17,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStoreMigration(t *testing.T) {
slashingKey := sdk.NewKVStoreKey("slashing")
ctx := testutil.DefaultContext(slashingKey, sdk.NewTransientStoreKey("transient_test"))
store := ctx.KVStore(slashingKey)
_, _, addr1 := testdata.KeyTestPubAddr()
consAddr := sdk.ConsAddress(addr1)
// Use dummy value for all key... | explode_data.jsonl/77574 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 555
} | [
2830,
3393,
6093,
20168,
1155,
353,
8840,
836,
8,
341,
78626,
19049,
1592,
1669,
45402,
7121,
82707,
6093,
1592,
445,
3226,
19049,
1138,
20985,
1669,
1273,
1314,
13275,
1972,
55691,
19049,
1592,
11,
45402,
7121,
48183,
6093,
1592,
445,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue14349(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test;")
tk.MustExec("drop table if exists papers;")
tk.MustExec("create table papers(title text, content longtext)")
tk.MustExec("insert into papers values('title', 'c... | explode_data.jsonl/65551 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 256
} | [
2830,
3393,
42006,
16,
19,
18,
19,
24,
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,
3244,
74,
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 |
func TestClusterPinsWithExpiration(t *testing.T) {
ctx := context.Background()
clusters, mock := createClusters(t)
defer shutdownClusters(t, clusters, mock)
ttlDelay()
cl := clusters[rand.Intn(nClusters)] // choose a random cluster peer to query
c := test.Cid1
expireIn := 1 * time.Second
opts := api.PinOpti... | explode_data.jsonl/66626 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 414
} | [
2830,
3393,
28678,
47,
1330,
2354,
66301,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
39407,
14605,
11,
7860,
1669,
1855,
94992,
1155,
340,
16867,
23766,
94992,
1155,
11,
26968,
11,
7860,
692,
3244,
11544,
20039,
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... | 8 |
func TestStructError(t *testing.T) {
type str struct {
IntVal int `json:"int"`
StrVal string `json:"str"`
FloatVal float64 `json:"float"`
BoolVal bool `json:"bool"`
}
var s str
mv := Map{"int": 4, "str": "now's the time", "float": 3.14159, "bool": true}
mverr := mv.Struct(s)
if mverr == nil ... | explode_data.jsonl/59169 | {
"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,
9422,
1454,
1155,
353,
8840,
836,
8,
341,
13158,
607,
2036,
341,
197,
57152,
2208,
256,
526,
257,
1565,
2236,
2974,
396,
8805,
197,
197,
2580,
2208,
256,
914,
220,
1565,
2236,
2974,
495,
8805,
197,
197,
5442,
2208,
2224,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseFieldDeclarationWithMoveTypeAnnotation(t *testing.T) {
t.Parallel()
result, errs := ParseProgram(`
struct X { x: @R }
`)
require.Empty(t, errs)
utils.AssertEqualWithDiff(t,
[]ast.Declaration{
&ast.CompositeDeclaration{
CompositeKind: common.CompositeKindStructure,
Identifier: ... | explode_data.jsonl/35995 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 714
} | [
2830,
3393,
14463,
1877,
24489,
2354,
9860,
929,
19711,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
9559,
11,
70817,
1669,
14775,
10690,
61528,
286,
2036,
1599,
314,
856,
25,
569,
49,
456,
197,
24183,
17957,
11180,
1155,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPoliciesPutV1(t *testing.T) {
f := newFixture(t)
req := newReqV1(http.MethodPut, "/policies/1", testMod)
f.server.Handler.ServeHTTP(f.recorder, req)
if f.recorder.Code != 200 {
t.Fatalf("Expected success but got %v", f.recorder)
}
var response map[string]interface{}
if err := json.NewDecoder(f.reco... | explode_data.jsonl/79007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 198
} | [
2830,
3393,
47,
42038,
19103,
53,
16,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
340,
24395,
1669,
501,
27234,
53,
16,
19886,
20798,
19103,
11,
3521,
79,
42038,
14,
16,
497,
1273,
4459,
692,
1166,
12638,
31010,
83535,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInfoStream_success(t *testing.T) {
test := func(mode string) func(t *testing.T) {
return func(t *testing.T) {
assert := assert.New(t)
server, log, cleanup := setup(t)
defer cleanup()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
infoCh := make(chan *blog.Info)
s... | explode_data.jsonl/62 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 540
} | [
2830,
3393,
1731,
3027,
18632,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
2915,
31356,
914,
8,
2915,
1155,
353,
8840,
836,
8,
341,
197,
853,
2915,
1155,
353,
8840,
836,
8,
341,
298,
6948,
1669,
2060,
7121,
1155,
340,
298,
41057,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestKnativeServiceWithResr(t *testing.T) {
catalog, err := camel.DefaultCatalog()
assert.Nil(t, err)
traitCatalog := NewCatalog(context.TODO(), nil)
environment := Environment{
CamelCatalog: catalog,
Catalog: traitCatalog,
Integration: &v1.Integration{
ObjectMeta: metav1.ObjectMeta{
Name: ... | explode_data.jsonl/55847 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 801
} | [
2830,
3393,
42,
29738,
1860,
2354,
1061,
81,
1155,
353,
8840,
836,
8,
341,
1444,
7750,
11,
1848,
1669,
49152,
13275,
41606,
741,
6948,
59678,
1155,
11,
1848,
692,
25583,
1315,
41606,
1669,
1532,
41606,
5378,
90988,
1507,
2092,
692,
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 TestValidatePipelineRunSpec(t *testing.T) {
cases := []struct {
name string
jobType prowapi.ProwJobType
spec func(s *pipelinev1alpha1.PipelineRunSpec)
extraRefs []prowapi.Refs
noSpec bool
pass bool
}{
{
name: "allow nil spec",
noSpec: true,
pass: true,
},
{
n... | explode_data.jsonl/8073 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1887
} | [
2830,
3393,
17926,
34656,
6727,
8327,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
68577,
929,
256,
47558,
2068,
1069,
651,
12245,
929,
198,
197,
98100,
414,
2915,
1141,
353,
51258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSaturation(t *testing.T) {
// Verify that under high load the maximum number of handlers are running.
ctx := context.Background()
const maxHandlers = 10
var (
mu sync.Mutex
outstanding, max int // number of handlers
maxBatch int // size of largest batch
... | explode_data.jsonl/16711 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 701
} | [
2830,
3393,
34882,
2017,
1155,
353,
8840,
836,
8,
341,
197,
322,
25429,
429,
1212,
1550,
2795,
279,
7192,
1372,
315,
24083,
525,
4303,
624,
20985,
1669,
2266,
19047,
741,
4777,
1932,
39949,
284,
220,
16,
15,
198,
2405,
2399,
197,
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 TestOwners_Exist(t *testing.T) {
m := NewClient(os.Getenv("MNUBO_CLIENT_ID"), os.Getenv("MNUBO_CLIENT_SECRET"), os.Getenv("MNUBO_HOST"))
id := uuid.New().String()
var results EntitiesExist
err := m.Owners.Exist([]string{id}, &results)
if err != nil {
t.Errorf("client call failed: %+v", err)
}
} | explode_data.jsonl/81388 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
57762,
62,
25613,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
2959,
9638,
64883,
445,
44,
3926,
4677,
22521,
3450,
3975,
2643,
64883,
445,
44,
3926,
4677,
22521,
31408,
3975,
2643,
64883,
445,
44,
3926,
4677,
17213,
5455... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIfdBuilder_FindN__First_2_2Returned(t *testing.T) {
im := NewIfdMapping()
err := LoadStandardIfds(im)
log.PanicIf(err)
ti := NewTagIndex()
ib := NewIfdBuilder(im, ti, exifcommon.IfdStandardIfdIdentity, exifcommon.TestDefaultByteOrder)
bt := &BuilderTag{
ifdPath: exifcommon.IfdStandardIfdIdentity.Uni... | explode_data.jsonl/36629 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 937
} | [
2830,
3393,
2679,
67,
3297,
95245,
45,
563,
5338,
62,
17,
62,
17,
84804,
1155,
353,
8840,
836,
8,
341,
54892,
1669,
1532,
2679,
67,
6807,
2822,
9859,
1669,
8893,
19781,
2679,
5356,
25107,
340,
6725,
1069,
31270,
2679,
3964,
692,
72859... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshalCassVersion(t *testing.T) {
tests := [...]struct {
data string
version cassVersion
}{
{"3.2", cassVersion{3, 2, 0}},
{"2.10.1-SNAPSHOT", cassVersion{2, 10, 1}},
{"1.2.3", cassVersion{1, 2, 3}},
}
for i, test := range tests {
v := &cassVersion{}
if err := v.UnmarshalCQL(nil, []byt... | explode_data.jsonl/37531 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
1806,
27121,
34,
395,
5637,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
48179,
1235,
341,
197,
8924,
262,
914,
198,
197,
74954,
44224,
5637,
198,
197,
59403,
197,
197,
4913,
18,
13,
17,
497,
44224,
5637,
90,
18,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestProjectsToConfig(t *testing.T) {
var testCases = map[string]struct {
input string
expect string
}{
"singleProject": {
input: "testdata/singleProject.json",
expect: "testdata/singleProject.golden.yaml",
},
"rocketChat": {
input: "testdata/rocketChat.json",
expect: "testdata/rocketChat... | explode_data.jsonl/10288 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 889
} | [
2830,
3393,
29958,
1249,
2648,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
37302,
284,
2415,
14032,
60,
1235,
341,
197,
22427,
220,
914,
198,
197,
24952,
914,
198,
197,
59403,
197,
197,
1,
15338,
7849,
788,
341,
298,
22427,
25,
220,
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... | 8 |
func TestResolver_FetchRequest(t *testing.T) {
// given
testErr := errors.New("Test error")
id := "bar"
url := "foo.bar"
timestamp := time.Now()
frModel := fixModelFetchRequest("foo", url, timestamp)
frGQL := fixGQLFetchRequest(url, timestamp)
testCases := []struct {
Name string
PersistenceFn ... | explode_data.jsonl/2244 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1628
} | [
2830,
3393,
18190,
1400,
2995,
1900,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
18185,
7747,
1669,
5975,
7121,
445,
2271,
1465,
5130,
15710,
1669,
330,
2257,
698,
19320,
1669,
330,
7975,
22001,
1837,
3244,
4702,
1669,
882,
13244... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFilter(t *testing.T) {
t.Run("should filter out all elements", func(t *testing.T) {
tests := map[string]interface{}{
"struct": struct{ A, B string }{},
"map": map[string]string{"A": "", "B": ""},
}
for name, object := range tests {
t.Run(name, func(t *testing.T) {
mapper := mapify.Mappe... | explode_data.jsonl/71713 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2532
} | [
2830,
3393,
5632,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5445,
4051,
700,
678,
5424,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
78216,
1669,
2415,
14032,
31344,
67066,
298,
197,
80575,
788,
2036,
90,
362,
11,
425,
914,
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 TestUpdateL7PolicyWithInvalidOpts(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
res := l7policies.Update(fake.ServiceClient(), "8a1412f0-4c32-4257-8b07-af4770b604fd", l7policies.UpdateOpts{
Action: l7policies.Action("invalid"),
})
if res.Err == nil {
t.Fatalf("Expected error, got none")
}
} | explode_data.jsonl/79639 | {
"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,
4289,
43,
22,
13825,
2354,
7928,
43451,
1155,
353,
8840,
836,
8,
341,
70479,
39820,
9230,
741,
16867,
270,
94849,
37496,
9230,
2822,
10202,
1669,
326,
22,
79,
42038,
16689,
74138,
13860,
2959,
1507,
330,
23,
64,
16,
19,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestShouldNotFindSliceDifferences(t *testing.T) {
a := []string{"abc", "onetwothree"}
b := []string{"abc", "onetwothree"}
assert.False(t, IsStringSlicesDifferent(a, b))
} | explode_data.jsonl/45966 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 68
} | [
2830,
3393,
14996,
2623,
9885,
33236,
35,
58326,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
3056,
917,
4913,
13683,
497,
330,
68686,
1126,
27856,
16707,
2233,
1669,
3056,
917,
4913,
13683,
497,
330,
68686,
1126,
27856,
63159,
6948,
50757,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestParticipant2BadInput(t *testing.T) {
//
// Setup
//
p1, _ := NewParticipant(1, 2, testGenerator, curves.NewK256Scalar(), 2)
p2, _ := NewParticipant(2, 2, testGenerator, curves.NewK256Scalar(), 1)
bcast1, _, _ := p1.Round1(nil)
bcast2, p2psend2, _ := p2.Round1(nil)
bcast := make(map[uint32]Round1Bcast)
... | explode_data.jsonl/77871 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
67504,
17,
17082,
2505,
1155,
353,
8840,
836,
8,
341,
197,
2289,
197,
322,
18626,
198,
197,
2289,
3223,
16,
11,
716,
1669,
1532,
67504,
7,
16,
11,
220,
17,
11,
1273,
12561,
11,
35933,
7121,
42,
17,
20,
21,
20639,
1507,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseDetails(t *testing.T) {
testCases := []struct {
name string
data string
expected *Details
err bool
}{
{
name: "parses request including app repo resource",
data: `{
"appRepositoryResourceName": "my-chart-repo",
"chartName": "test",
"releaseName": "foo... | explode_data.jsonl/12748 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 769
} | [
2830,
3393,
14463,
7799,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
8924,
257,
914,
198,
197,
42400,
353,
7799,
198,
197,
9859,
414,
1807,
198,
197,
59403,
197,
197,
515,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestMirrors(t *testing.T) {
sys := &types.SystemContext{
SystemRegistriesConfPath: "testdata/mirrors.conf",
SystemRegistriesConfDirPath: "testdata/this-does-not-exist",
}
registries, err := GetRegistries(sys)
assert.Nil(t, err)
assert.Equal(t, 2, len(registries))
reg, err := FindRegistry(sys, "regis... | explode_data.jsonl/62224 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
58461,
31686,
1155,
353,
8840,
836,
8,
341,
41709,
1669,
609,
9242,
16620,
1972,
515,
197,
5816,
3477,
380,
4019,
15578,
1820,
25,
262,
330,
92425,
3183,
404,
31686,
13937,
756,
197,
5816,
3477,
380,
4019,
15578,
6184,
1820,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUntarInvalidFilenames(t *testing.T) {
// TODO Windows: Figure out how to fix this test.
if runtime.GOOS == "windows" {
t.Skip("Passes but hits breakoutError: platform and architecture is not supported")
}
for i, headers := range [][]*tar.Header{
{
{
Name: "../victim/dotdot",
Typeflag: ta... | explode_data.jsonl/81999 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 288
} | [
2830,
3393,
20250,
277,
7928,
37,
52768,
1155,
353,
8840,
836,
8,
341,
197,
322,
5343,
5515,
25,
19037,
700,
1246,
311,
5046,
419,
1273,
624,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
341,
197,
3244,
57776,
445,
12187,
288,
714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseObjectsSuccess(t *testing.T) {
m1 := `apiVersion: v1
kind: Namespace
metadata:
annotations: {}
labels:
name: kubeless
name: kubeless`
rs, err := ParseObjects(m1)
if err != nil {
t.Error(err)
}
if len(rs) != 1 {
t.Errorf("Expected 1 yaml element, got %v", len(rs))
}
// validate some f... | explode_data.jsonl/73943 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
14463,
11543,
7188,
1155,
353,
8840,
836,
8,
341,
2109,
16,
1669,
1565,
2068,
5637,
25,
348,
16,
198,
15314,
25,
41962,
198,
17637,
510,
220,
32207,
25,
5613,
220,
9201,
510,
262,
829,
25,
80958,
1717,
198,
220,
829,
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... | 5 |
func TestSuccessTaskExecution(t *testing.T) {
serv, client := setUp(t)
defer tearDown(t, serv)
var receivedRequest *http.Request
srv := startTestServer(
func(req *http.Request) { receivedRequest = req },
func(req *http.Request) {},
)
createdQueue := createTestQueue(t, client)
createTaskRequest := taskspb.... | explode_data.jsonl/72421 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 601
} | [
2830,
3393,
7188,
6262,
20294,
1155,
353,
8840,
836,
8,
341,
1903,
648,
11,
2943,
1669,
18620,
1155,
340,
16867,
32825,
1155,
11,
4853,
692,
2405,
3949,
1900,
353,
1254,
9659,
198,
1903,
10553,
1669,
1191,
2271,
5475,
1006,
197,
29244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestConfigDefaultSignatureAlgorithm(t *testing.T) {
c1 := Config{}
c1.SetDefaults()
if *c1.SamlSettings.SignatureAlgorithm != SAML_SETTINGS_DEFAULT_SIGNATURE_ALGORITHM {
t.Fatal("SamlSettings.SignatureAlgorithm default not set")
}
if *c1.SamlSettings.CanonicalAlgorithm != SAML_SETTINGS_DEFAULT_CANONICAL_A... | explode_data.jsonl/50671 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 154
} | [
2830,
3393,
2648,
3675,
25088,
27847,
1155,
353,
8840,
836,
8,
341,
1444,
16,
1669,
5532,
16094,
1444,
16,
4202,
16273,
2822,
743,
353,
66,
16,
808,
9467,
6086,
41152,
1568,
27847,
961,
328,
31102,
34189,
13811,
73752,
8912,
74585,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestInstrumentationLibraryMetrics_InstrumentationLibrary(t *testing.T) {
ms := NewInstrumentationLibraryMetrics()
fillTestInstrumentationLibrary(ms.InstrumentationLibrary())
assert.EqualValues(t, generateTestInstrumentationLibrary(), ms.InstrumentationLibrary())
} | explode_data.jsonl/32678 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
56324,
367,
16915,
27328,
25972,
19474,
367,
16915,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
56324,
367,
16915,
27328,
741,
65848,
2271,
56324,
367,
16915,
35680,
5337,
19474,
367,
16915,
2398,
6948,
12808,
6227,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestLoadIacDir(t *testing.T) {
testErrorString1 := fmt.Sprintf(`failed to load terraform config dir '%s'. error from terraform:
%s:1,21-2,1: Invalid block definition; A block definition must have block content delimited by "{" and "}", starting on the same line as the block header.
%s:1,1-5: Unsupported block typ... | explode_data.jsonl/64648 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1828
} | [
2830,
3393,
5879,
40,
580,
6184,
1155,
353,
8840,
836,
8,
341,
18185,
1454,
703,
16,
1669,
8879,
17305,
5809,
16091,
311,
2795,
59561,
627,
2193,
5419,
7677,
82,
4427,
1465,
504,
59561,
627,
510,
12952,
25,
16,
11,
17,
16,
12,
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 TestIsCousins(t *testing.T) {
tests := [...]caseType{
{
input: []int{1, 2, 3, 4},
x: 4,
y: 3,
expected: false,
},
{
input: []int{1, 2, 3, NULL, 4, NULL, 5},
x: 5,
y: 4,
expected: true,
},
{
input: []int{1, 2, 3, NULL, 4},
x: 2,
... | explode_data.jsonl/55718 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 463
} | [
2830,
3393,
3872,
34,
782,
1330,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
48179,
5638,
929,
515,
197,
197,
515,
298,
22427,
25,
262,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
1583,
298,
10225,
25,
286,
220,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestPatternValue(t *testing.T) {
re, err := patternToRegexp("^$[]{}+?/etc/?+*.conf")
if err != nil {
t.Fatal(err)
}
if re.String() != "^\\^\\$\\[\\]\\{\\}\\+\\?/etc/\\?\\+.*\\.conf$" {
t.Fatalf("expected regexp not found: %s", re.String())
}
if _, err = patternToRegexp("*/passwd"); err == nil {
t.Fat... | explode_data.jsonl/6314 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
15760,
1130,
1155,
353,
8840,
836,
8,
341,
17200,
11,
1848,
1669,
5383,
1249,
3477,
4580,
48654,
3,
1294,
6257,
10,
30,
14,
12107,
17763,
10,
19922,
6135,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestNodeParse(t *testing.T) {
assert := assert.New(t)
userJson := `{"label" : "test",
"name" : "node create test",
"type" : "acedfs:process",
"color" : "orange",
"amount" : 11.11}`
reader := strings.NewReader(userJson)
req, err := http.NewRequest("GET", "/health-check", ... | explode_data.jsonl/32029 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 220
} | [
2830,
3393,
1955,
14463,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
19060,
5014,
1669,
1565,
4913,
1502,
1,
549,
330,
1944,
756,
51093,
330,
606,
1,
549,
330,
3509,
1855,
1273,
756,
51093,
330,
1313,
1,
549,
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... | 2 |
func TestInterpretEnumInContract(t *testing.T) {
t.Parallel()
inter, err := parseCheckAndInterpretWithOptions(t,
`
contract C {
enum E: UInt8 {
pub case a
pub case b
}
var e: E
init() {
self.e... | explode_data.jsonl/63668 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 504
} | [
2830,
3393,
3306,
8043,
10766,
641,
14067,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
58915,
11,
1848,
1669,
4715,
3973,
3036,
3306,
8043,
74238,
1155,
345,
197,
197,
3989,
688,
5116,
356,
341,
1060,
7618,
468,
25,
22275,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestVerifyPayload(t *testing.T) {
notificationJson := `{"Type":"Notification","MessageId":"da41e39f-ea4d-435a-b922-c6aae3915ebe","TopicArn":"arn:aws:sns:us-west-2:123456789012:MyTopic","Subject":"test","Message":"test message","Timestamp":"2012-04-25T21:49:25.719Z","SignatureVersion":"1","Signature":"EXAMPLElDMXv... | explode_data.jsonl/34957 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 495
} | [
2830,
3393,
32627,
29683,
1155,
353,
8840,
836,
8,
341,
197,
18553,
5014,
1669,
1565,
4913,
929,
3252,
11196,
2198,
2052,
764,
3252,
3235,
19,
16,
68,
18,
24,
69,
5655,
64,
19,
67,
12,
19,
18,
20,
64,
1455,
24,
17,
17,
1786,
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 TestManyWalksSameParam(t *testing.T) {
// Create a treeWalkPool.
tw := newTreeWalkPool(5 * time.Second)
// Create sample params.
params := listParams{
bucket: "test-bucket",
}
select {
// This timeout is an upper-bound. This is started
// before the first treeWalk go-routine's timeout period starts.
c... | explode_data.jsonl/40512 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 428
} | [
2830,
3393,
8441,
48849,
82,
19198,
2001,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
264,
4916,
48849,
10551,
624,
3244,
86,
1669,
501,
6533,
48849,
10551,
7,
20,
353,
882,
32435,
692,
197,
322,
4230,
6077,
3628,
624,
25856,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestRefineArgNullValues(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("create table t(id int primary key, a int)")
tk.MustExec("create table s(a int)")
tk.MustExec("insert into s values(1),(2)")
tk.MustQuery... | explode_data.jsonl/65586 | {
"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,
3945,
482,
2735,
3280,
6227,
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,
3244,
74,
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 |
func TestCompileAll(t *testing.T) {
for os, arches := range targets.List {
os, arches := os, arches
t.Run(os, func(t *testing.T) {
t.Parallel()
eh := func(pos ast.Pos, msg string) {
t.Logf("%v: %v", pos, msg)
}
path := filepath.Join("..", "..", "sys", os)
desc := ast.ParseGlob(filepath.Join(path... | explode_data.jsonl/53120 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 489
} | [
2830,
3393,
46126,
2403,
1155,
353,
8840,
836,
8,
341,
2023,
2643,
11,
5325,
288,
1669,
2088,
11550,
5814,
341,
197,
25078,
11,
5325,
288,
1669,
2643,
11,
5325,
288,
198,
197,
3244,
16708,
9638,
11,
2915,
1155,
353,
8840,
836,
8,
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 Test_SalesReports_Filter_IsInValidReportSubType(t *testing.T) {
filter := &SalesReportsFilter{}
date, _ := time.Parse("2006-01-02", "2020-05-05")
filter.Daily().TypeSales().Version10().SetReportDate(date)
err := filter.IsValid()
assert.Error(t, err)
assert.Equal(t, "SalesReportsFilter@IsValid: ReportSubType ... | explode_data.jsonl/60791 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
1098,
3831,
23748,
68935,
31879,
641,
4088,
10361,
3136,
929,
1155,
353,
8840,
836,
8,
341,
50108,
1669,
609,
35418,
23748,
5632,
16094,
44086,
11,
716,
1669,
882,
8937,
445,
17,
15,
15,
21,
12,
15,
16,
12,
15,
17,
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 TestS3URLType_UnmarshalJSON(t *testing.T) {
Convey("Given a valid S3URLType JSON", t, func() {
s3URL, _ := url.Parse("s3://" + bucketName + filePath)
expected := NewS3URL(s3URL)
Convey("When Unmarshalled", func() {
var actual S3URLType
err := actual.UnmarshalJSON([]byte("s3://" + bucketName + filePat... | explode_data.jsonl/23629 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 216
} | [
2830,
3393,
50,
18,
3144,
929,
40687,
27121,
5370,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
22043,
264,
2697,
328,
18,
3144,
929,
4718,
497,
259,
11,
2915,
368,
341,
197,
1903,
18,
3144,
11,
716,
1669,
2515,
8937,
445,
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 TestGetBbcStockWithDeploySet(t *testing.T) {
queryArgs := &GetBbcStockArgs{
Flavor: "BBC-S3-02",
DeploySetIds: []string{"dset-0RHZYUfF"},
}
if res, err := BBC_CLIENT.GetBbcStockWithDeploySet(queryArgs); err != nil {
fmt.Println("get bbc stock failed: ", err)
} else {
data, e := json.Marshal(res)
... | explode_data.jsonl/4100 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
1949,
33,
8904,
19369,
2354,
69464,
1649,
1155,
353,
8840,
836,
8,
341,
27274,
4117,
1669,
609,
1949,
33,
8904,
19369,
4117,
515,
197,
197,
3882,
3292,
25,
257,
330,
66755,
6222,
18,
12,
15,
17,
756,
197,
197,
69464,
164... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateDaisyInflater_Image_NotWindows(t *testing.T) {
inflater := createDaisyInflaterForImageSafe(t, ImageImportRequest{
Source: imageSource{uri: "image/uri"},
OS: "ubuntu-1804",
})
daisyutils.CheckWorkflow(inflater.worker, func(wf *daisy.Workflow, err error) {
assert.NotContains(t, getDisk(wf, 0).... | explode_data.jsonl/75627 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
4021,
35,
49056,
12342,
45949,
60816,
13164,
1155,
353,
8840,
836,
8,
341,
17430,
11729,
1669,
1855,
35,
49056,
12342,
2461,
1906,
25663,
1155,
11,
4654,
11511,
1900,
515,
197,
197,
3608,
25,
2168,
3608,
90,
6070,
25,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMsgBeginRedelegate(t *testing.T) {
tests := []struct {
name string
delegatorAddr sdk.AccAddress
validatorSrcAddr sdk.ValAddress
validatorDstAddr sdk.ValAddress
amount sdk.Coin
expectPass bool
}{
{"regular", sdk.AccAddress(valAddr1), valAddr2, valAddr3, sdk.NewInt6... | explode_data.jsonl/22798 | {
"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,
6611,
11135,
6033,
68,
4989,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
1797,
914,
198,
197,
58351,
1937,
850,
13986,
262,
45402,
77538,
4286,
198,
197,
197,
16112,
20360,
13986,
45402,
77819,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRecordFindCopyGetsEmptyByDefault(t *testing.T) {
i, recs := NewRecordList().Find("foo")
assert.Equal(t, -1, i)
assert.Nil(t, recs)
} | explode_data.jsonl/25274 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 61
} | [
2830,
3393,
6471,
9885,
12106,
49358,
3522,
1359,
3675,
1155,
353,
8840,
836,
8,
341,
8230,
11,
1395,
82,
1669,
1532,
6471,
852,
1005,
9885,
445,
7975,
1138,
6948,
12808,
1155,
11,
481,
16,
11,
600,
340,
6948,
59678,
1155,
11,
1395,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestOnInboundFilterChain(t *testing.T) {
now := time.Now()
tlsContext := &tls.DownstreamTlsContext{
CommonTlsContext: &tls.CommonTlsContext{
TlsCertificates: []*tls.TlsCertificate{
{
CertificateChain: &core.DataSource{
Specifier: &core.DataSource_Filename{
Filename: "/etc/certs/cert-ch... | explode_data.jsonl/13355 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3178
} | [
2830,
3393,
1925,
641,
10891,
5632,
18837,
1155,
353,
8840,
836,
8,
341,
80922,
1669,
882,
13244,
741,
3244,
4730,
1972,
1669,
609,
34488,
73543,
4027,
51,
4730,
1972,
515,
197,
90580,
51,
4730,
1972,
25,
609,
34488,
16010,
51,
4730,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPreparedCommand_Run_Verbose(t *testing.T) {
os.Setenv(mg.VerboseEnv, "true")
defer os.Unsetenv(mg.VerboseEnv)
stdout := shx.RecordStdout()
defer stdout.Release()
stderr := shx.RecordStderr()
defer stderr.Release()
err := shx.Run("go", "run", "echo.go", "hello world")
gotStdout := stdout.Output()
got... | explode_data.jsonl/57094 | {
"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,
4703,
7212,
4062,
84158,
2334,
261,
8297,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
1255,
70,
42505,
8297,
14359,
11,
330,
1866,
1138,
16867,
2643,
10616,
746,
3160,
1255,
70,
42505,
8297,
14359,
692,
6736,
411,
1669,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEncodeTx(t *testing.T) {
kb, err := keys.NewKeyBaseFromDir(InitClientHome(t, ""))
require.NoError(t, err)
addr, seed := CreateAddr(t, name1, pw, kb)
cleanup, _, _, port := InitializeTestLCD(t, 1, []sdk.AccAddress{addr}, true)
defer cleanup()
res, body, _ := doTransferWithGas(t, port, seed, name1, memo, ... | explode_data.jsonl/25405 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 447
} | [
2830,
3393,
32535,
31584,
1155,
353,
8840,
836,
8,
341,
16463,
65,
11,
1848,
1669,
6894,
7121,
1592,
3978,
3830,
6184,
7,
3803,
2959,
7623,
1155,
11,
77561,
17957,
35699,
1155,
11,
1848,
340,
53183,
11,
10320,
1669,
4230,
13986,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReaderErrorReturnsCorrectBody(t *testing.T) {
m := metrics.MetricOptions{}
c := &testServiceApiClient{
serviceListServices: nil,
serviceListError: errors.New("error"),
}
handler := handlers.MakeFunctionReader(m, c)
w := httptest.NewRecorder()
r := &http.Request{}
handler.ServeHTTP(w, r)
expect... | explode_data.jsonl/63782 | {
"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,
5062,
1454,
16446,
33092,
5444,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
16734,
1321,
16340,
3798,
16094,
1444,
1669,
609,
1944,
1860,
56584,
515,
197,
52934,
852,
11025,
25,
2092,
345,
197,
52934,
852,
1454,
25,
262,
5975,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBetweenSingleSet(t *testing.T) {
query := Select()
field := "`date``"
min := "2020-09-01"
max := "2020-09-30"
between := betweenSelection{}
between.field = field
between.min = min
between.max = max
want := []betweenSelection{}
want = append(want, between)
query.Between(field, min, max)
got := q... | explode_data.jsonl/42761 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
25477,
10888,
1649,
1155,
353,
8840,
836,
8,
1476,
27274,
1669,
8427,
741,
39250,
1669,
35973,
1028,
13874,
698,
25320,
1669,
330,
17,
15,
17,
15,
12,
15,
24,
12,
15,
16,
698,
22543,
1669,
330,
17,
15,
17,
15,
12,
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 TestLexerQuit(t *testing.T) {
fr := &fakeReader{}
fr.Add(1)
quit := make(chan struct{})
l := newLexer(quit, fr)
go l.run()
wg := sync.WaitGroup{}
wg.Add(1)
go func() {
l.nextToken()
fr.Wait()
wg.Done()
}()
go func() {
close(quit)
}()
wg.Wait()
} | explode_data.jsonl/52123 | {
"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,
92847,
42856,
1155,
353,
8840,
836,
8,
341,
97714,
1669,
609,
30570,
5062,
16094,
97714,
1904,
7,
16,
692,
197,
31537,
1669,
1281,
35190,
2036,
37790,
8810,
1669,
501,
92847,
7,
31537,
11,
1422,
340,
30680,
326,
7634,
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 TestJump(t *testing.T) {
a := assert.New(t)
a.Equal(2, jump([]int{2, 3, 1, 1, 4}))
a.Equal(2, jump([]int{2, 3, 0, 1, 4}))
a.Equal(1, jump([]int{2, 1}))
a.Equal(1, jump([]int{1, 2}))
a.Equal(0, jump([]int{0}))
} | explode_data.jsonl/53720 | {
"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,
33979,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
340,
11323,
12808,
7,
17,
11,
7784,
10556,
396,
90,
17,
11,
220,
18,
11,
220,
16,
11,
220,
16,
11,
220,
19,
44194,
11323,
12808,
7,
17,
11,
7784,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGocloak_RetrospectToken(t *testing.T) {
t.Parallel()
cfg := GetConfig(t)
client := NewClientWithDebug(t)
token := GetClientToken(t, client)
rptResult, err := client.RetrospectToken(
token.AccessToken,
cfg.GoCloak.ClientID,
cfg.GoCloak.ClientSecret,
cfg.GoCloak.Realm)
t.Log(rptResult)
FailIfErr(... | explode_data.jsonl/79511 | {
"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,
38,
509,
385,
585,
2568,
34466,
987,
3323,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50286,
1669,
2126,
2648,
1155,
340,
25291,
1669,
1532,
2959,
2354,
7939,
1155,
340,
43947,
1669,
2126,
2959,
3323,
1155,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseInfixExpressions(t *testing.T) {
checkParseExpression(t, "1 + 2 * 3", "(infix + 1 (infix * 2 3))")
checkParseExpression(t, "1 * 2 + 3", "(infix + (infix * 1 2) 3)")
checkParseExpression(t, "1 * (2 + 3)", "(infix * 1 (infix + 2 3))")
checkParseExpression(t, "1 + 1 in x", "(infix in (infix + 1 1) x)")
... | explode_data.jsonl/33525 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 272
} | [
2830,
3393,
14463,
641,
5743,
40315,
1155,
353,
8840,
836,
8,
341,
25157,
14463,
9595,
1155,
11,
330,
16,
488,
220,
17,
353,
220,
18,
497,
11993,
258,
5743,
488,
220,
16,
320,
258,
5743,
353,
220,
17,
220,
18,
593,
1138,
25157,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPodSpecPatchPodName(t *testing.T) {
tests := []struct {
podNameVersion string
wantPodName string
workflowYaml string
}{
{"v1", "hello-world", helloWorldWfWithPatch},
{"v2", "hello-world", helloWorldWfWithPatch},
{"v1", "hello-world-3731220306", helloWorldStepWfWithPatch},
{"v2", "hello-wor... | explode_data.jsonl/75396 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 408
} | [
2830,
3393,
23527,
8327,
43622,
23527,
675,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
3223,
347,
675,
5637,
914,
198,
197,
50780,
23527,
675,
262,
914,
198,
197,
197,
56249,
56,
9467,
256,
914,
198,
197,
59403,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGenRSTTree(t *testing.T) {
c := &coral.Command{Use: "do [OPTIONS] arg1 arg2"}
tmpdir, err := ioutil.TempDir("", "test-gen-rst-tree")
if err != nil {
t.Fatalf("Failed to create tmpdir: %s", err.Error())
}
defer os.RemoveAll(tmpdir)
if err := GenReSTTree(c, tmpdir); err != nil {
t.Fatalf("GenReSTTree... | explode_data.jsonl/17807 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
9967,
49,
784,
6533,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
609,
6005,
278,
12714,
90,
10253,
25,
330,
2982,
508,
56929,
60,
1392,
16,
1392,
17,
63159,
20082,
3741,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
1944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCarver_RemoveSeam(t *testing.T) {
img := image.NewNRGBA(image.Rect(0, 0, ImgWidth, ImgHeight))
bounds := img.Bounds()
// We choose to fill up the background with an uniform white color
// and afterwards we replace the colors in a single row with lower intensity ones.
draw.Draw(img, bounds, &image.Uniform... | explode_data.jsonl/8689 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 512
} | [
2830,
3393,
8852,
423,
66843,
1514,
309,
1155,
353,
8840,
836,
8,
341,
39162,
1669,
2168,
7121,
45,
58927,
10075,
32153,
7,
15,
11,
220,
15,
11,
49930,
3327,
11,
49930,
3640,
1171,
2233,
3095,
1669,
4964,
72133,
2822,
197,
322,
1205,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTranscodingWAV(t *testing.T) {
var inputPath = "/tmp/ffmpeg/wav"
var outputPath = "/tmp/ffmpeg/out/wav.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/57664 | {
"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,
3167,
48367,
54,
8093,
1155,
353,
8840,
836,
8,
1476,
2405,
1946,
1820,
284,
3521,
5173,
14,
72422,
6324,
402,
698,
2405,
95017,
284,
3521,
5173,
14,
72422,
48316,
6324,
402,
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 TestGetAppName(t *testing.T) {
// given
a := &sysl.AppName{
Part: []string{"test", "name"},
}
// when
actual := getAppName(a)
// then
assert.Equal(t, "test :: name", actual, "unexpected result")
} | explode_data.jsonl/75553 | {
"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,
1949,
87994,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
11323,
1669,
609,
7791,
75,
5105,
675,
515,
197,
197,
5800,
25,
3056,
917,
4913,
1944,
497,
330,
606,
7115,
197,
630,
197,
322,
979,
198,
88814,
1669,
76382... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRowTableTableBelongsToUserFalse(t *testing.T) {
map_dao := &DaoImpl{}
service := service.MakeTableRowService(map_dao)
belongs := service.TableBelongsToUser("143", 3)
if belongs {
t.Errorf("TableBelongsToUser: unauthorized user given access")
}
} | explode_data.jsonl/15453 | {
"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,
3102,
2556,
2556,
21666,
34225,
1474,
4049,
1155,
353,
8840,
836,
8,
341,
19567,
814,
3441,
1669,
609,
12197,
9673,
16094,
52934,
1669,
2473,
50133,
38558,
1860,
9147,
814,
3441,
340,
2233,
301,
13181,
1669,
2473,
18257,
21666... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefaultSpringContext_ConditionOnBean(t *testing.T) {
c, ch := container()
c1 := cond.OnProperty("null", cond.MatchIfMissing()).Or().OnProfile("test")
c.Object(&BeanZero{5}).On(cond.On(c1).And().OnMissingBean("null"))
c.Object(new(BeanOne)).On(cond.On(c1).And().OnMissingBean("null"))
c.Object(new(BeanTw... | explode_data.jsonl/17433 | {
"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,
3675,
25150,
1972,
920,
2111,
680,
1925,
10437,
1155,
353,
8840,
836,
8,
341,
1444,
11,
521,
1669,
5476,
2822,
1444,
16,
1669,
9756,
8071,
3052,
445,
2921,
497,
9756,
36062,
2679,
25080,
6011,
2195,
1005,
1925,
8526,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAdvisoryLockWithPgx(t *testing.T) {
db, cleanup := testCreateDB(t, 3)
defer cleanup()
var wg sync.WaitGroup
numExec := 10
wg.Add(numExec)
for i := 0; i <= numExec-1; i++ {
go func() {
driver := db.Driver().(*stdlib.Driver)
conn, err := driver.Pool.Acquire()
if err != nil {
t.Fatal(err)
... | explode_data.jsonl/74287 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 364
} | [
2830,
3393,
2589,
2682,
679,
11989,
2354,
47,
59957,
1155,
353,
8840,
836,
8,
341,
20939,
11,
21290,
1669,
1273,
4021,
3506,
1155,
11,
220,
18,
340,
16867,
21290,
2822,
2405,
63581,
12811,
28384,
2808,
198,
22431,
10216,
1669,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestParseL1Address(t *testing.T) {
tests := []struct {
name string
addr string
expErr error
expAddr common.Address
}{
{
name: "empty address",
addr: "",
expErr: errors.New("invalid address: "),
},
{
name: "only 0x",
addr: "0x",
expErr: errors.New("invalid address: 0... | explode_data.jsonl/52521 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 437
} | [
2830,
3393,
14463,
43,
16,
4286,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
53183,
262,
914,
198,
197,
48558,
7747,
220,
1465,
198,
197,
48558,
13986,
4185,
26979,
198,
197,
59403,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestExtractProvidesValidBuildForAPushEvent(t *testing.T) {
//setup
context := setup(t, "pushevent.json", "push", "")
//execute
revision, _, _, proceed, err := context.plugin.Extract(context.buildCfg, "secret101", context.path, context.req)
//validation
if err != nil {
t.Errorf("Error while extracting bui... | explode_data.jsonl/26517 | {
"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,
28959,
49022,
4088,
11066,
2461,
2537,
1116,
1556,
1155,
353,
8840,
836,
8,
341,
197,
322,
15188,
198,
28413,
1669,
6505,
1155,
11,
330,
17820,
383,
684,
4323,
497,
330,
9077,
497,
85617,
197,
322,
10257,
198,
197,
28342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPersistApprovalGetApprovalFail(t *testing.T) {
em, cancel := newTestEventManager(t)
defer cancel()
mdi := em.database.(*databasemocks.Plugin)
mth := em.txHelper.(*txcommonmocks.Helper)
approval := newApproval()
pool := &fftypes.TokenPool{
Namespace: "ns1",
}
localID := fftypes.NewUUID()
ops := []*... | explode_data.jsonl/15920 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 366
} | [
2830,
3393,
61267,
90107,
1949,
90107,
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,
340,
2109,
339,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAnswer(t *testing.T) {
tests := []struct {
input string
expect bool
}{
{"()", true},
{"*)", true},
{"((", false},
{"(*))", true},
{"", true},
{"((**", true},
{"(*)", true},
{"(()", false},
{"(((((*(()((((*((**(((()()*)()()()*((((**)())*)*)))))))(())(()))())((*()()(((()((()*(())*(()**)(... | explode_data.jsonl/57169 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 239
} | [
2830,
3393,
16141,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
22427,
220,
914,
198,
197,
24952,
1807,
198,
197,
59403,
197,
197,
4913,
50514,
830,
1583,
197,
197,
4913,
3764,
497,
830,
1583,
197,
197,
4913,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestPslqPiFailRandom(t *testing.T) {
iterations := 100
if testing.Short() {
iterations = 10
}
for i := 0; i < iterations; i++ {
precision := rand.Intn(512) + 64
iterations := rand.Intn(1000) + 64
logMaxCoeff := rand.Intn(28) + 2
piFailTest(t, uint(precision), iterations, int64(logMaxCoeff), nil)
}
} | explode_data.jsonl/66870 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
47,
3226,
80,
34767,
19524,
13999,
1155,
353,
8840,
836,
8,
341,
197,
67584,
1669,
220,
16,
15,
15,
198,
743,
7497,
55958,
368,
341,
197,
197,
67584,
284,
220,
16,
15,
198,
197,
532,
2023,
600,
1669,
220,
15,
26,
600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExifEditor_SetIfdRootTag(t *testing.T) {
//TODO: make sure to cover all various types as well non-happy paths
expectedLensInfo := LensInfo{
MinFocalLength: URat{2800, 100},
MaxFocalLength: URat{2800, 100},
MinFNumberMinFocalLength: URat{392, 256},
MinFNumberMaxFocalLength: URat{50... | explode_data.jsonl/79884 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 327
} | [
2830,
3393,
840,
333,
9410,
14812,
2679,
67,
8439,
5668,
1155,
353,
8840,
836,
8,
341,
197,
322,
14732,
25,
1281,
2704,
311,
3421,
678,
5257,
4494,
438,
1632,
2477,
2832,
11144,
12716,
198,
42400,
98105,
1731,
1669,
42671,
1731,
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... | 4 |
func TestAccessControl_ErrorHandler_BasicAuth_Default(t *testing.T) {
client := newClient()
shutdown, _ := newCouper("testdata/integration/error_handler/01_couper.hcl", test.New(t))
defer shutdown()
helper := test.New(t)
req, err := http.NewRequest(http.MethodGet, "http://localhost:8080/default/", nil)
helper.... | explode_data.jsonl/60531 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
6054,
3273,
28651,
3050,
1668,
5971,
5087,
60336,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
2959,
2822,
36196,
18452,
11,
716,
1669,
501,
68210,
712,
445,
92425,
31114,
17376,
41737,
10183,
14,
15,
16,
98763,
712,
860,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_parseConncetionString(t *testing.T) {
tests := []struct {
name string
connection string
want *pg.Options
wantErr bool
}{
{
name: "test 1",
connection: "host=127.0.0.1 port=5432 user=user dbname=indexer password=password sslmode=disable",
want: &pg.Options{
Addr: ... | explode_data.jsonl/25586 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 464
} | [
2830,
3393,
21039,
1109,
1016,
295,
290,
703,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
54590,
914,
198,
197,
50780,
981,
353,
3517,
22179,
198,
197,
50780,
7747,
262,
1807,
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... | 3 |
func TestAssociationsByTypeAndContainer(t *testing.T) {
associationType := "elastic-inference"
container1 := &apicontainer.Container{
Name: "containerName1",
}
container2 := &apicontainer.Container{
Name: "containerName2",
}
association1 := Association{
Containers: []string{container1.Name},
Type: a... | explode_data.jsonl/37258 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 333
} | [
2830,
3393,
29815,
804,
1359,
929,
3036,
4502,
1155,
353,
8840,
836,
8,
341,
197,
54465,
929,
1669,
330,
61964,
3419,
2202,
698,
53290,
16,
1669,
609,
391,
51160,
1743,
33672,
515,
197,
21297,
25,
330,
3586,
675,
16,
756,
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... | 1 |
func TestClient_GetCaCerts(t *testing.T) {
server, portString := mockServer(t)
defer func() {
derr := server.Close()
if derr != nil {
log.WithError(derr).Error("Error closing server")
}
}()
aasUrl, _ := url.Parse("http://localhost" + portString + "/aas")
baseURL, _ := url.Parse("http://localhost" + portSt... | explode_data.jsonl/15619 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 446
} | [
2830,
3393,
2959,
13614,
22571,
34,
15546,
1155,
353,
8840,
836,
8,
341,
41057,
11,
2635,
703,
1669,
7860,
5475,
1155,
340,
16867,
2915,
368,
341,
197,
2698,
615,
1669,
3538,
10421,
741,
197,
743,
294,
615,
961,
2092,
341,
298,
6725,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTimedMetricListFlushOffsetDisabled(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
resolution := 10 * time.Second
opts := testOptions(ctrl).
SetTimedMetricsFlushOffsetEnabled(false)
listID := timedMetricListID{resolution: resolution}
l, err := newTimedMetricList(testShard, listID,... | explode_data.jsonl/43591 | {
"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,
20217,
291,
54310,
852,
46874,
6446,
25907,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
10202,
3214,
1669,
220,
16,
15,
353,
882,
32435,
198,
64734,
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 TestGroup_Handle_emptyPath(t *testing.T) {
t.Parallel()
router := NewRouter()
g := router.Group("/has/prefix")
g.Handle("GET", "", func(_ *Context) Responder {
return &DefaultResponder{
Message: []byte("empty group path 1"),
Status: 200,
}
})
g.Handle("GET", "/", func(_ *Context) Responder {
re... | explode_data.jsonl/73801 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 348
} | [
2830,
3393,
2808,
42714,
15124,
1820,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
67009,
1669,
1532,
9523,
741,
3174,
1669,
9273,
5407,
4283,
4648,
4322,
5060,
1138,
3174,
31421,
445,
3806,
497,
7342,
2915,
2490,
353,
1972,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStructLevelValidations(t *testing.T) {
v1 := New()
v1.RegisterStructValidation(StructValidationTestStruct, TestStruct{})
tst := &TestStruct{
String: "good value",
}
errs := v1.Struct(tst)
NotEqual(t, errs, nil)
AssertError(t, errs, "TestStruct.StringVal", "TestStruct.String", "StringVal", "String",... | explode_data.jsonl/77221 | {
"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,
9422,
4449,
4088,
804,
1155,
353,
8840,
836,
8,
1476,
5195,
16,
1669,
1532,
741,
5195,
16,
19983,
9422,
13799,
7,
9422,
13799,
2271,
9422,
11,
3393,
9422,
6257,
692,
3244,
267,
1669,
609,
2271,
9422,
515,
197,
4980,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestImportFromURLMalformedJSON(t *testing.T) {
RegisterTestingT(t)
// testing behaviour when there is no json on the other end
unit := NewHoverflyWithConfiguration(&Configuration{})
// importing payloads
err := unit.Import("http://thiswillbeintercepted.json")
// we should get error
Expect(err).ToNot(BeNil... | explode_data.jsonl/75452 | {
"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,
11511,
3830,
3144,
29600,
10155,
5370,
1155,
353,
8840,
836,
8,
341,
79096,
16451,
51,
1155,
692,
197,
322,
7497,
16999,
979,
1052,
374,
902,
2951,
389,
279,
1008,
835,
198,
81189,
1669,
1532,
34379,
21642,
2354,
7688,
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... | 1 |
func TestRangeStmt(t *testing.T) {
gopClTest(t, `
a := [1, 3.4, 5]
for _, x := range a {
println(x)
}
for i, x := range a {
println(i, x)
}
var i int
var x float64
for _, x = range a {
println(i, x)
}
for i, x = range a {
println(i, x)
}
for range a {
println("Hi")
}
`, `package main
import fmt "fmt"
func main... | explode_data.jsonl/73639 | {
"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,
6046,
31063,
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,
1958,
8358,
856,
1669,
2088,
264,
341,
81168,
2075,
340,
532,
1958,
600,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestResourceMetadataTxContentInJSON(t *testing.T) {
t.Parallel()
inputLabel := "1990"
api := blockfrost.NewAPIClient(
blockfrost.APIClientOptions{},
)
q := blockfrost.APIQueryParams{
Count: 1,
}
got, err := api.MetadataTxContentInJSON(context.TODO(), inputLabel, q)
if err != nil {
t.Fatalf(err.Erro... | explode_data.jsonl/74951 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 181
} | [
2830,
3393,
4783,
14610,
31584,
2762,
641,
5370,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
22427,
2476,
1669,
330,
16,
24,
24,
15,
698,
54299,
1669,
2504,
69,
41502,
7121,
2537,
98900,
1006,
197,
47996,
69,
41502,
29837,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkdirCommand(t *testing.T) {
cfg := &v1.Config{
WorkingDir: "/",
Env: []string{
"path=usr/",
"home=/root",
},
}
for _, test := range workdirTests {
cmd := WorkdirCommand{
cmd: &instructions.WorkdirCommand{
Path: test.path,
},
snapshotFiles: []string{},
}
buildArgs := docke... | explode_data.jsonl/26411 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 201
} | [
2830,
3393,
6776,
3741,
4062,
1155,
353,
8840,
836,
8,
1476,
50286,
1669,
609,
85,
16,
10753,
515,
197,
197,
33978,
6184,
25,
3521,
756,
197,
197,
14359,
25,
3056,
917,
515,
298,
197,
70688,
28,
7063,
35075,
298,
197,
1,
5117,
23286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrintNodeContainerRuntimeVersion(t *testing.T) {
table := []struct {
node api.Node
expected []metav1.TableRow
}{
{
node: api.Node{
ObjectMeta: metav1.ObjectMeta{Name: "foo1"},
Status: api.NodeStatus{
NodeInfo: api.NodeSystemInfo{ContainerRuntimeVersion: "foo://1.2.3"},
Addres... | explode_data.jsonl/21591 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 698
} | [
2830,
3393,
8994,
1955,
4502,
15123,
5637,
1155,
353,
8840,
836,
8,
1476,
26481,
1669,
3056,
1235,
341,
197,
20831,
257,
6330,
21714,
198,
197,
42400,
3056,
4059,
402,
16,
18257,
3102,
198,
197,
59403,
197,
197,
515,
298,
20831,
25,
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 TestRemoveFixNodeTargetSize(t *testing.T) {
sizeChanges := make(chan string, 10)
now := time.Now()
ng1_1 := BuildTestNode("ng1-1", 1000, 1000)
ng1_1.Spec.ProviderID = "ng1-1"
provider := testprovider.NewTestCloudProvider(func(nodegroup string, delta int) error {
sizeChanges <- fmt.Sprintf("%s/%d", nodegrou... | explode_data.jsonl/44992 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 483
} | [
2830,
3393,
13021,
25958,
1955,
6397,
1695,
1155,
353,
8840,
836,
8,
341,
13832,
11317,
1669,
1281,
35190,
914,
11,
220,
16,
15,
340,
80922,
1669,
882,
13244,
2822,
197,
968,
16,
62,
16,
1669,
7854,
2271,
1955,
445,
968,
16,
12,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSimpleClient(t *testing.T) {
seedBroker := NewMockBroker(t, 1)
seedBroker.Returns(new(MetadataResponse))
client, err := NewClient([]string{seedBroker.Addr()}, NewTestConfig())
if err != nil {
t.Fatal(err)
}
seedBroker.Close()
safeClose(t, client)
} | explode_data.jsonl/54396 | {
"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,
16374,
2959,
1155,
353,
8840,
836,
8,
341,
197,
22602,
65545,
1669,
1532,
11571,
65545,
1155,
11,
220,
16,
692,
197,
22602,
65545,
46350,
82,
1755,
3189,
7603,
2582,
4390,
25291,
11,
1848,
1669,
1532,
2959,
10556,
917,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRecognizeIdentifierRecognizeBase(t *testing.T) {
a := assert.New(t)
opts := makeOptions(strings.NewReader("Nino"))
s, _ := scanner.Scan(opts)
l := &lexer{
s: s,
opts: opts,
}
l.indent.PushBack(1)
r := &recognizeIdentifier{
l: l,
s: recogString(l).(*recognizeString),
}
ch := l.s.Next()
r.R... | explode_data.jsonl/7678 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 302
} | [
2830,
3393,
17915,
551,
8714,
17915,
551,
3978,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
340,
64734,
1669,
1281,
3798,
51442,
68587,
445,
45,
3313,
5455,
1903,
11,
716,
1669,
20775,
54874,
30885,
340,
8810,
1669,
609... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMisplannedRangesMetadata(t *testing.T) {
defer leaktest.AfterTest(t)()
ctx := context.Background()
tc := serverutils.StartTestCluster(t, 3, /* numNodes */
base.TestClusterArgs{
ReplicationMode: base.ReplicationManual,
ServerArgs: base.TestServerArgs{
UseDatabase: "test",
},
})
defer tc.St... | explode_data.jsonl/16540 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1319
} | [
2830,
3393,
83159,
500,
7295,
74902,
14610,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
20985,
1669,
2266,
19047,
2822,
78255,
1669,
3538,
6031,
12101,
2271,
28678,
1155,
11,
220,
18,
11,
1391,
1629,
122... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHandleSkynetError(t *testing.T) {
tw := newTestHTTPWriter()
tests := []struct {
err error
statusCode int
}{
{
err: renter.ErrSkylinkBlocked,
statusCode: http.StatusUnavailableForLegalReasons,
},
{
err: renter.ErrRootNotFound,
statusCode: http.StatusNotFound,
},
... | explode_data.jsonl/67175 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 669
} | [
2830,
3393,
6999,
19290,
97988,
1454,
1155,
353,
8840,
836,
8,
341,
3244,
86,
1669,
501,
2271,
9230,
6492,
2822,
78216,
1669,
3056,
1235,
341,
197,
9859,
286,
1465,
198,
197,
23847,
2078,
526,
198,
197,
59403,
197,
197,
515,
298,
9859... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.