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 TestPathKV(t *testing.T) {
tests := []struct {
desc string
in string
wantK string
wantV string
wantErr error
}{
{
desc: "valid",
in: "[1:2]",
wantK: "1",
wantV: "2",
wantErr: nil,
},
{
desc: "invalid",
in: "[1:",
wantErr: errors.New(""),
}... | explode_data.jsonl/70573 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 386
} | [
2830,
3393,
1820,
82707,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
41653,
262,
914,
198,
197,
17430,
414,
914,
198,
197,
50780,
42,
256,
914,
198,
197,
50780,
53,
256,
914,
198,
197,
50780,
7747,
1465,
198,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestReconcileServiceInstanceFailureOnFinalRetry(t *testing.T) {
fakeKubeClient, fakeCatalogClient, fakeClusterServiceBrokerClient, testController, sharedInformers := newTestController(t, fakeosb.FakeClientConfiguration{
ProvisionReaction: &fakeosb.ProvisionReaction{
Error: errors.New("fake creation failure")... | explode_data.jsonl/58171 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 901
} | [
2830,
3393,
693,
40446,
457,
1860,
2523,
17507,
1925,
19357,
51560,
1155,
353,
8840,
836,
8,
341,
1166,
726,
42,
3760,
2959,
11,
12418,
41606,
2959,
11,
12418,
28678,
1860,
65545,
2959,
11,
1273,
2051,
11,
6094,
37891,
388,
1669,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestEquals(t *testing.T) {
r1 := NewResourceBuilder().
AddResource(constants.Memory, 1).
AddResource(constants.CPU, 1).
Build()
r2 := NewResourceBuilder().
AddResource(constants.Memory, 1).
AddResource(constants.CPU, 1).
Build()
assert.Equal(t, Equals(r1, r2), true)
r1 = NewResourceBuilder().
Ad... | explode_data.jsonl/63793 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 465
} | [
2830,
3393,
4315,
1155,
353,
8840,
836,
8,
341,
7000,
16,
1669,
1532,
4783,
3297,
25829,
197,
37972,
4783,
80368,
71162,
11,
220,
16,
4292,
197,
37972,
4783,
80368,
727,
6325,
11,
220,
16,
4292,
197,
197,
11066,
741,
7000,
17,
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 TestPendingConnsAfterErr(t *testing.T) {
const (
maxOpen = 2
tryOpen = maxOpen*2 + 2
)
// No queries will be run.
db, err := Open("test", fakeDBName)
if err != nil {
t.Fatalf("Open: %v", err)
}
defer closeDB(t, db)
defer func() {
for k, v := range db.lastPut {
t.Logf("%p: %v", k, v)
}
}()
... | explode_data.jsonl/16005 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 675
} | [
2830,
3393,
32027,
1109,
4412,
6025,
7747,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
22543,
5002,
284,
220,
17,
198,
197,
6799,
5002,
284,
1932,
5002,
9,
17,
488,
220,
17,
198,
197,
692,
197,
322,
2308,
19556,
686,
387,
1598,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconcileWithWhenExpressionsWithResultRefs(t *testing.T) {
names.TestingSeed()
ps := []*v1beta1.Pipeline{parse.MustParsePipeline(t, `
metadata:
name: test-pipeline
namespace: foo
spec:
tasks:
# a-task is executed and produces a result aResult with value aResultValue
- name: a-task
taskRef:
... | explode_data.jsonl/27315 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1486
} | [
2830,
3393,
693,
40446,
457,
2354,
4498,
40315,
2354,
2077,
82807,
1155,
353,
8840,
836,
8,
341,
93940,
8787,
287,
41471,
741,
35009,
1669,
29838,
85,
16,
19127,
16,
1069,
8790,
90,
6400,
50463,
14463,
34656,
1155,
11,
22074,
17637,
510... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue29434(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 t1;")
tk.MustExec("create table t1(c1 datetime);")
tk.MustExec("insert into t1 values('2021-12-12 10:10:10.000');")
tk.MustE... | explode_data.jsonl/65614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 369
} | [
2830,
3393,
42006,
17,
24,
19,
18,
19,
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 TestContextDefault(t *testing.T) {
c := NewParallelE2eCLI(t, binDir)
t.Run("show", func(t *testing.T) {
res := c.RunDockerCmd("context", "show")
res.Assert(t, icmd.Expected{Out: "default"})
})
t.Run("ls", func(t *testing.T) {
res := c.RunDockerCmd("context", "ls")
golden.Assert(t, res.Stdout(), Golde... | explode_data.jsonl/5425 | {
"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,
1972,
3675,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
16547,
36,
17,
68,
63959,
1155,
11,
9544,
6184,
692,
3244,
16708,
445,
3445,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
10202,
1669,
272,
16708,
35,
13659,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddMoreTxThanPoolSize(t *testing.T) {
q, mem := initEnv(4)
defer q.Close()
defer mem.Close()
err := add4Tx(mem.client)
require.Nil(t, err)
msg5 := mem.client.NewMessage("mempool", types.EventTx, tx5)
mem.client.Send(msg5, true)
mem.client.Wait(msg5)
if mem.Size() != 4 || mem.cache.Exist(string(tx5.... | explode_data.jsonl/16821 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
2212,
7661,
31584,
26067,
10551,
1695,
1155,
353,
8840,
836,
8,
341,
18534,
11,
1833,
1669,
2930,
14359,
7,
19,
340,
16867,
2804,
10421,
741,
16867,
1833,
10421,
2822,
9859,
1669,
912,
19,
31584,
39908,
6581,
340,
17957,
596... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOneMigration(t *testing.T) {
defer func(v []migration, s string) {
schemaMigrations = v
DbSchemaCurrent = s
}(schemaMigrations, DbSchemaCurrent)
DbSchemaCurrent = DbSchemaCode
dbSchemaNext := "dbSchemaNext"
ran := false
shouldNotRun := false
schemaMigrations = []migration{
{name: DbSchemaCode, f... | explode_data.jsonl/79611 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 614
} | [
2830,
3393,
3966,
20168,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
3747,
3056,
80227,
11,
274,
914,
8,
341,
197,
1903,
3416,
44,
17824,
284,
348,
198,
197,
197,
7994,
8632,
5405,
284,
274,
198,
197,
25547,
17349,
44,
17824,
11,
119... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPodMetadataDeDot(t *testing.T) {
tests := []struct {
pod *Pod
meta common.MapStr
}{
{
pod: &Pod{
Metadata: ObjectMeta{
Labels: map[string]string{"a.key": "a.value"},
},
},
meta: common.MapStr{"labels": common.MapStr{"a_key": "a.value"}},
},
}
for _, test := range tests {
a... | explode_data.jsonl/59543 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
23527,
14610,
1912,
34207,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
3223,
347,
220,
353,
23527,
198,
197,
84004,
4185,
10104,
2580,
198,
197,
59403,
197,
197,
515,
298,
3223,
347,
25,
609,
23527,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSignCommitmentFailNotLockedIn(t *testing.T) {
t.Parallel()
// Create a test channel which will be used for the duration of this
// unittest. The channel will be funded evenly with Alice having 5 BTC,
// and Bob having 5 BTC.
aliceChannel, _, cleanUp, err := CreateTestChannels()
if err != nil {
t.Fatal... | explode_data.jsonl/46443 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 249
} | [
2830,
3393,
7264,
33441,
478,
19524,
2623,
49010,
641,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
4230,
264,
1273,
5496,
892,
686,
387,
1483,
369,
279,
8090,
315,
419,
198,
197,
322,
19905,
13,
576,
5496,
686,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerBoundHandshake_UpgradeToOldRealIP(t *testing.T) {
tt := []struct {
addr string
clientAddr net.TCPAddr
timestamp time.Time
}{
{
addr: "example.com",
clientAddr: net.TCPAddr{
IP: net.IPv4(127, 0, 0, 1),
Port: 12345,
},
timestamp: time.Now(),
},
{
addr: "sub.exa... | explode_data.jsonl/45006 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 704
} | [
2830,
3393,
5475,
19568,
2314,
29661,
62,
43861,
1249,
18284,
12768,
3298,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
3056,
1235,
341,
197,
53183,
981,
914,
198,
197,
25291,
13986,
4179,
836,
7123,
13986,
198,
197,
3244,
4702,
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... | 6 |
func TestCLI_StartStopCPUProfile(t *testing.T) {
f, err := startCPUProfile()
require.Nil(t, err)
stopCPUProfile()
err = f.Close()
require.Nil(t, err)
err = os.Remove(f.Name())
require.Nil(t, err)
} | explode_data.jsonl/34035 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
63959,
38056,
10674,
31615,
8526,
1155,
353,
8840,
836,
8,
341,
1166,
11,
1848,
1669,
1191,
31615,
8526,
741,
17957,
59678,
1155,
11,
1848,
692,
62644,
31615,
8526,
741,
9859,
284,
282,
10421,
741,
17957,
59678,
1155,
11,
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 |
func TestOrderBy(t *testing.T) {
qs := dORM.QueryTable("user")
num, err := qs.OrderBy("-status").Filter("user_name", "nobody").Count()
throwFail(t, err)
throwFail(t, AssertIs(num, 1))
num, err = qs.OrderBy("status").Filter("user_name", "slene").Count()
throwFail(t, err)
throwFail(t, AssertIs(num, 1))
num, err... | explode_data.jsonl/18133 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 394
} | [
2830,
3393,
34605,
1155,
353,
8840,
836,
8,
341,
18534,
82,
1669,
294,
4365,
15685,
2556,
445,
872,
1138,
22431,
11,
1848,
1669,
32421,
43040,
13645,
2829,
1827,
5632,
445,
872,
1269,
497,
330,
77,
42340,
1827,
2507,
741,
9581,
19524,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChannelArbitratorAnchors(t *testing.T) {
log := &mockArbitratorLog{
state: StateDefault,
newStates: make(chan ArbitratorState, 5),
}
chanArbCtx, err := createTestChannelArbitrator(t, log)
if err != nil {
t.Fatalf("unable to create ChannelArbitrator: %v", err)
}
// Replace our mocked put repor... | explode_data.jsonl/74589 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2539
} | [
2830,
3393,
9629,
6953,
4489,
81,
850,
2082,
331,
1087,
1155,
353,
8840,
836,
8,
341,
6725,
1669,
609,
16712,
6953,
4489,
81,
850,
2201,
515,
197,
24291,
25,
257,
3234,
3675,
345,
197,
8638,
23256,
25,
1281,
35190,
58795,
81,
850,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_calculateEWMA(t *testing.T) {
type args struct {
allKLines []types.KLine
priceF KLinePriceMapper
window int
}
var input []fixedpoint.Value
if err := json.Unmarshal(ethusdt5m, &input); err != nil {
panic(err)
}
tests := []struct {
name string
args args
want float64
}{
{
name: "E... | explode_data.jsonl/18359 | {
"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,
24005,
11207,
37779,
4835,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
50960,
42,
16794,
3056,
9242,
11352,
2460,
198,
197,
87119,
37,
262,
730,
2460,
6972,
10989,
198,
197,
23545,
262,
526,
198,
197,
532,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestServiceErrors(t *testing.T) {
requestBytes, err := json.Marshal(
&Request{
Type: ResponseMsgType,
ID: randomString(),
Label: "test",
},
)
require.NoError(t, err)
msg, err := service.ParseDIDCommMsgMap(requestBytes)
require.NoError(t, err)
svc, err := New(&protocol.MockProvider{
Servi... | explode_data.jsonl/30528 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 802
} | [
2830,
3393,
1860,
13877,
1155,
353,
8840,
836,
8,
341,
23555,
7078,
11,
1848,
1669,
2951,
37271,
1006,
197,
197,
5,
1900,
515,
298,
27725,
25,
220,
5949,
6611,
929,
345,
298,
29580,
25,
262,
4194,
703,
3148,
298,
82126,
25,
330,
194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegisterNewCluster_NoError(t *testing.T) {
testClusterName, color := "name", uint32(4)
manager := GetManagerInstance()
clearManager()
manager.SetDBConnection(&database.MockDBConnection{})
cluster, err := manager.RegisterNewCluster(testClusterName, color)
if err != nil {
t.Fatalf("Unexpected error: %s... | explode_data.jsonl/24674 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
8690,
3564,
28678,
36989,
1454,
1155,
353,
8840,
836,
8,
341,
18185,
28678,
675,
11,
1894,
1669,
330,
606,
497,
2622,
18,
17,
7,
19,
340,
92272,
1669,
2126,
2043,
2523,
741,
40408,
2043,
2822,
92272,
4202,
3506,
4526,
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... | 6 |
func TestValidTimezone(t *testing.T) {
var tests = []validationTest{
{
value: "Europe/Berli",
shouldErr: true,
},
{
value: "APAC",
shouldErr: true,
},
{
value: "Europe/Berlin",
shouldErr: false,
},
{
value: "UTC",
shouldErr: false,
},
}
runValidations(t, tests... | explode_data.jsonl/77936 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 178
} | [
2830,
3393,
4088,
1462,
8684,
1155,
353,
8840,
836,
8,
1476,
2405,
7032,
284,
3056,
12284,
2271,
515,
197,
197,
515,
298,
16309,
25,
257,
330,
30780,
16276,
261,
742,
756,
298,
197,
5445,
7747,
25,
830,
345,
197,
197,
1583,
197,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_namespaceInformerWatchFunc(t *testing.T) {
c, err := newFakeAPIClientset(k8sconfig.APIConfig{})
assert.NoError(t, err)
watchFunc := namespaceInformerWatchFunc(c)
opts := metav1.ListOptions{}
obj, err := watchFunc(opts)
assert.NoError(t, err)
assert.NotNil(t, obj)
} | explode_data.jsonl/41508 | {
"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,
41571,
641,
34527,
14247,
9626,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
501,
52317,
2537,
98900,
746,
5969,
23,
82,
1676,
24922,
2648,
37790,
6948,
35699,
1155,
11,
1848,
340,
6692,
754,
9626,
1669,
4473,
641,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConvertPosts(t *testing.T) {
parentPostCreator, err := sdk.AccAddressFromBech32("desmos1mmeu5t0j5284p7jkergq9hyejlhdwkzp25y84l")
require.NoError(t, err)
postCreator, err := sdk.AccAddressFromBech32("desmos1mmeu5t0j5284p7jkergq9hyejlhdwkzp25y84l")
require.NoError(t, err)
parentCreationTime := time.Now().... | explode_data.jsonl/81209 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1225
} | [
2830,
3393,
12012,
19631,
1155,
353,
8840,
836,
8,
341,
24804,
4133,
31865,
11,
1848,
1669,
45402,
77538,
4286,
3830,
3430,
331,
18,
17,
445,
5799,
8631,
16,
76,
2660,
84,
20,
83,
15,
73,
20,
17,
23,
19,
79,
22,
41808,
2375,
80,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTriDenseZero(t *testing.T) {
t.Parallel()
// Elements that equal 1 should be set to zero, elements that equal -1
// should remain unchanged.
for _, test := range []*TriDense{
{
mat: blas64.Triangular{
Uplo: blas.Upper,
N: 4,
Stride: 5,
Data: []float64{
1, 1, 1, 1, -1,
... | explode_data.jsonl/25857 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 525
} | [
2830,
3393,
21884,
35,
1117,
17999,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
322,
34157,
429,
6144,
220,
16,
1265,
387,
738,
311,
7168,
11,
5424,
429,
6144,
481,
16,
198,
197,
322,
1265,
7146,
34857,
624,
2023,
835... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_BallotList(t *testing.T) {
goldenBallotList := getResponse(ballotList).(*BallotList)
type want struct {
wantErr bool
containsErr string
ballotList BallotList
}
cases := []struct {
name string
inputHanler http.Handler
want
}{
{
"handles RPC error",
gtGoldenHTTPMock(ballot... | explode_data.jsonl/48371 | {
"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,
1668,
541,
354,
852,
1155,
353,
8840,
836,
8,
341,
3174,
813,
268,
35907,
354,
852,
1669,
633,
2582,
79319,
354,
852,
568,
4071,
35907,
354,
852,
692,
13158,
1366,
2036,
341,
197,
50780,
7747,
257,
1807,
198,
197,
197,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSalesforceAPI_Describe(t *testing.T) {
type fields struct {
metadata *metadata
describe *describe
dml *dml
query *query
}
type args struct {
sobject string
}
tests := []struct {
name string
fields fields
args args
want DescribeValue
wantErr bool
}{
{
name: "N... | explode_data.jsonl/45139 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 556
} | [
2830,
3393,
35418,
8833,
7082,
98054,
3114,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
2109,
7603,
353,
17637,
198,
197,
82860,
353,
12332,
198,
197,
2698,
1014,
414,
353,
67,
1014,
198,
197,
27274,
262,
353,
1631,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestThemeFiles(t *testing.T) {
themePath, err := ioutil.TempDir("", "alice-lg-tmp-theme")
if err != nil {
t.Error(err)
}
defer os.RemoveAll(themePath)
// Create some "stylesheets" and a "script"
touchFile(themePath, "style.css")
touchFile(themePath, "extra.css")
touchFile(themePath, "script.js")
// Lo... | explode_data.jsonl/54316 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 326
} | [
2830,
3393,
12594,
10809,
1155,
353,
8840,
836,
8,
341,
197,
9047,
1820,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
63195,
7510,
2385,
1307,
33185,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
532,
16867,
2643,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWrapRateLimit(t *testing.T) {
start := time.Now()
first := true
h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if first {
t.Log(start.Unix())
w.Header().Set("X-RateLimit-Limit", "1")
w.Header().Set("X-RateLimit-Remaining", "0")
w.Header().Set("X-RateLimit-Reset", fmt.Spr... | explode_data.jsonl/66305 | {
"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,
26787,
11564,
16527,
1155,
353,
8840,
836,
8,
341,
21375,
1669,
882,
13244,
741,
42190,
1669,
830,
271,
9598,
1669,
1758,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
743,
1156,
341,
298,
3244,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestResponseError_Error_WithNoMessages(t *testing.T) {
err := &ResponseError{
Status: 400,
}
expectedMsg := "KairosDB response error: status=400, messages=[]"
assert.Equal(t, expectedMsg, err.Error())
} | explode_data.jsonl/56654 | {
"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,
2582,
1454,
28651,
62,
2354,
2753,
15820,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
609,
2582,
1454,
515,
197,
58321,
25,
220,
19,
15,
15,
345,
197,
630,
42400,
6611,
1669,
330,
42,
2143,
3630,
3506,
2033,
1465,
25,
2639... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTimeBeginPeriod(t *testing.T) {
const TIMERR_NOERROR = 0
if *runtime.TimeBeginPeriodRetValue != TIMERR_NOERROR {
t.Fatalf("timeBeginPeriod failed: it returned %d", *runtime.TimeBeginPeriodRetValue)
}
} | explode_data.jsonl/82617 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
1462,
11135,
23750,
1155,
353,
8840,
836,
8,
341,
4777,
17742,
2650,
9100,
3682,
284,
220,
15,
198,
743,
353,
22255,
16299,
11135,
23750,
12020,
1130,
961,
17742,
2650,
9100,
3682,
341,
197,
3244,
30762,
445,
1678,
11135,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestCommandHandler_WithValidationNoError(t *testing.T) {
inner := &mocks.CommandHandler{}
m := NewMiddleware()
h := eh.UseCommandHandlerMiddleware(inner, m)
cmd := &mocks.Command{
ID: uuid.New(),
Content: "content",
}
c := CommandWithValidation(cmd, func() error { return nil })
if err := h.HandleCo... | explode_data.jsonl/24292 | {
"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,
4062,
3050,
62,
2354,
13799,
2753,
1454,
1155,
353,
8840,
836,
8,
341,
197,
4382,
1669,
609,
16712,
82,
12714,
3050,
16094,
2109,
1669,
1532,
24684,
741,
9598,
1669,
35246,
9046,
4062,
3050,
24684,
68603,
11,
296,
340,
25920... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWrap(t *testing.T) {
err := errors.New("value")
Handlef("foo: %w", &err)
g := err.Error()
w := "foo: value"
if g != w {
t.Errorf("g == %q, want %q", g, w)
}
} | explode_data.jsonl/15636 | {
"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,
26787,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
5975,
7121,
445,
957,
1138,
197,
6999,
69,
445,
7975,
25,
1018,
86,
497,
609,
615,
340,
3174,
1669,
1848,
6141,
741,
6692,
1669,
330,
7975,
25,
897,
698,
743,
342,
961,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAndMatcherMatch(t *testing.T) {
tests := []struct {
name string
pm pathMatcher
hm matcher.HeaderMatcher
info iresolver.RPCInfo
want bool
}{
{
name: "both match",
pm: newPathExactMatcher("/a/b", false),
hm: matcher.NewHeaderExactMatcher("th", "tv"),
info: iresolver.RPCInfo{
... | explode_data.jsonl/10981 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1067
} | [
2830,
3393,
3036,
37554,
8331,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
86511,
256,
1815,
37554,
198,
197,
9598,
76,
256,
36052,
15753,
37554,
198,
197,
27043,
600,
48943,
2013,
4872,
1731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSearchArchivedTeamsByName(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
id := model.NewId()
name := "name" + id
displayName := "Name " + id
th.CheckCommand(t, "team", "create", "--name", name, "--display_name", displayName)
th.CheckCommand(t, "team", "archive", name)
output := th.C... | explode_data.jsonl/59046 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 155
} | [
2830,
3393,
5890,
18727,
2221,
60669,
16898,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
15710,
1669,
1614,
7121,
764,
741,
11609,
1669,
330,
606,
1,
488,
877,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTicker_pingPong(t *testing.T) {
r := require.New(t)
tm := getTime()
lc := LayerConv{5 * time.Second, tm}
ttl := lc.TimeToLayer(tm.Add(9 * time.Second))
r.Equal(types.LayerID(2), lc.TimeToLayer(lc.LayerToTime(ttl)))
} | explode_data.jsonl/40199 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
87278,
71661,
47,
644,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1373,
7121,
1155,
340,
3244,
76,
1669,
60213,
741,
8810,
66,
1669,
22735,
34892,
90,
20,
353,
882,
32435,
11,
17333,
532,
3244,
11544,
1669,
36213,
16299,
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 TestURL(t *testing.T) {
r := URL("https://example.com/foo/bah")
if err := r.setupAction("GET"); err != nil {
t.Error(err)
}
assertURI(t, "https://example.com/foo/bah", r.Request.URL.String())
} | explode_data.jsonl/24754 | {
"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,
3144,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
5548,
445,
2428,
1110,
8687,
905,
60555,
3470,
1466,
5130,
743,
1848,
1669,
435,
25338,
2512,
445,
3806,
5038,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
630,
694... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCompression(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockMessageProducer := NewMockSQSProducer(ctrl)
compressionProducer := CompressionSQSProducer{
Wrapped: mockMessageProducer,
}
originalMessage := "hello world!"
encodedCompressedMessage := "H4sIAAAAAAAA/8pIzcnJVyjPL8pJUQ... | explode_data.jsonl/76880 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 191
} | [
2830,
3393,
81411,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
77333,
2052,
45008,
1669,
1532,
11571,
64308,
50,
45008,
62100,
692,
32810,
4011,
45008,
1669,
66161,
643... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPolymorphicEvent(t *testing.T) {
t.Parallel()
raw := &RawKVEntry{
StartTs: 99,
CRTs: 100,
OpType: OpTypePut,
RegionID: 2,
}
resolved := &RawKVEntry{
OpType: OpTypeResolved,
CRTs: 101,
}
polyEvent := NewPolymorphicEvent(raw)
require.Equal(t, raw, polyEvent.RawKV)
require.Equal(t, r... | explode_data.jsonl/20799 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 308
} | [
2830,
3393,
14658,
1600,
40869,
1556,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
76559,
1669,
609,
20015,
82707,
5874,
515,
197,
65999,
52793,
25,
220,
220,
24,
24,
345,
197,
6258,
5350,
82,
25,
257,
220,
16,
15,
15,
345,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMovingAverage(t *testing.T) {
fakeAPI := mocks.NewFakeMetricMetadataAPI()
fakeAPI.AddPairWithoutGraphite(api.TaggedMetric{MetricKey: "series", TagSet: api.NewTagSet()})
fakeBackend := movingAverageBackend{}
timerange, err := api.NewTimerange(1200, 1500, 100)
if err != nil {
t.Fatalf(err.Error())
}
e... | explode_data.jsonl/57470 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 638
} | [
2830,
3393,
39732,
26292,
1155,
353,
8840,
836,
8,
341,
1166,
726,
7082,
1669,
68909,
7121,
52317,
54310,
14610,
7082,
741,
1166,
726,
7082,
1904,
12443,
26040,
11212,
632,
24827,
23676,
3556,
54310,
90,
54310,
1592,
25,
330,
19880,
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... | 7 |
func TestLoadConfig(t *testing.T) {
factories, err := componenttest.ExampleComponents()
assert.Nil(t, err)
factory := NewFactory()
factories.Exporters[configmodels.Type(typeStr)] = factory
cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories)
require.NoError(t, err)
req... | explode_data.jsonl/60395 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 587
} | [
2830,
3393,
5879,
2648,
1155,
353,
8840,
836,
8,
341,
1166,
52893,
11,
1848,
1669,
3692,
1944,
5121,
1516,
10443,
741,
6948,
59678,
1155,
11,
1848,
692,
1166,
2919,
1669,
1532,
4153,
741,
1166,
52893,
81077,
388,
58,
1676,
6507,
10184,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTypeToPtrPtrPtrPtrType(t *testing.T) {
type Type2 struct {
A ****float64
}
t2 := Type2{}
t2.A = new(***float64)
*t2.A = new(**float64)
**t2.A = new(*float64)
***t2.A = new(float64)
****t2.A = 27.4
t2pppp := new(***Type2)
if err := encAndDec(t2, t2pppp); err != nil {
t.Fatal(err)
}
if ****(****t... | explode_data.jsonl/43385 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
929,
1249,
5348,
5348,
5348,
5348,
929,
1155,
353,
8840,
836,
8,
341,
13158,
3990,
17,
2036,
341,
197,
22985,
30704,
3649,
21,
19,
198,
197,
532,
3244,
17,
1669,
3990,
17,
16094,
3244,
17,
875,
284,
501,
7,
12210,
3649,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewPRSignedByKeyData(t *testing.T) {
testData := []byte("abc")
_pr, err := NewPRSignedByKeyData(SBKeyTypeGPGKeys, testData, NewPRMMatchRepoDigestOrExact())
require.NoError(t, err)
pr, ok := _pr.(*prSignedBy)
require.True(t, ok)
assert.Equal(t, testData, pr.KeyData)
// Failure cases tested in TestNewPRSi... | explode_data.jsonl/36504 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
3564,
6480,
49312,
67749,
1043,
1155,
353,
8840,
836,
8,
341,
18185,
1043,
1669,
3056,
3782,
445,
13683,
1138,
197,
5294,
11,
1848,
1669,
1532,
6480,
49312,
67749,
1043,
3759,
33,
97964,
38,
11383,
8850,
11,
67348,
11,
1532,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCache_Get(t *testing.T) {
type fields struct {
m *collect.SafeMap
}
type args struct {
id string
}
tests := []struct {
name string
fields fields
args args
want *IO
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
c := &Cache{
m: tt... | explode_data.jsonl/59941 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
8233,
13614,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
2109,
353,
17384,
89828,
2227,
198,
197,
532,
13158,
2827,
2036,
341,
197,
15710,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultiLookup(t *testing.T) {
etc := newEtcdPlugin()
etc.Zones = []string{"skydns.test.", "miek.nl."}
etc.Next = test.ErrorHandler()
for _, serv := range servicesMulti {
set(t, etc, serv.Key, 0, serv)
defer delete(t, etc, serv.Key)
}
for _, tc := range dnsTestCasesMulti {
m := tc.Msg()
rec := dns... | explode_data.jsonl/57927 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 252
} | [
2830,
3393,
20358,
34247,
1155,
353,
8840,
836,
8,
341,
197,
12107,
1669,
501,
31860,
4385,
11546,
741,
197,
12107,
13476,
3154,
284,
3056,
917,
4913,
26684,
45226,
5958,
10465,
330,
76,
35007,
30507,
1189,
532,
197,
12107,
18501,
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... | 5 |
func TestUnitRenewRestfulSession(t *testing.T) {
accessor := getSimpleTokenAccessor()
oldToken, oldMasterToken, oldSessionID := "oldtoken", "oldmaster", int64(100)
newToken, newMasterToken, newSessionID := "newtoken", "newmaster", int64(200)
postTestSuccessWithNewTokens := func(_ context.Context, _ *snowflakeRestfu... | explode_data.jsonl/44746 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 853
} | [
2830,
3393,
4562,
34625,
365,
12416,
1262,
5283,
1155,
353,
8840,
836,
8,
341,
197,
5211,
269,
1669,
633,
16374,
3323,
29889,
741,
61828,
3323,
11,
2310,
18041,
3323,
11,
2310,
5283,
915,
1669,
330,
813,
5839,
497,
330,
813,
13629,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPerChannelLimitsSetToUnlimitedPrintedCorrectly(t *testing.T) {
opts := GetDefaultOptions()
opts.MaxSubscriptions = 10
opts.MaxMsgs = 10
opts.MaxBytes = 64 * 1024
opts.MaxAge = time.Hour
clfoo := stores.ChannelLimits{}
clfoo.MaxSubscriptions = -1
clfoo.MaxMsgs = -1
clfoo.MaxBytes = -1
clfoo.MaxAge = ... | explode_data.jsonl/23098 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 317
} | [
2830,
3393,
3889,
9629,
94588,
1649,
1249,
1806,
18235,
8994,
291,
33092,
398,
1155,
353,
8840,
836,
8,
341,
64734,
1669,
2126,
3675,
3798,
741,
64734,
14535,
3136,
29966,
284,
220,
16,
15,
198,
64734,
14535,
6611,
82,
284,
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,
1... | 4 |
func TestBasicModelWithRoot(t *testing.T) {
e, _ := NewEnforcer("examples/basic_with_root_model.conf", "examples/basic_policy.csv")
testEnforce(t, e, "alice", "data1", "read", true)
testEnforce(t, e, "alice", "data1", "write", false)
testEnforce(t, e, "alice", "data2", "read", false)
testEnforce(t, e, "alice", "d... | explode_data.jsonl/57117 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
15944,
1712,
2354,
8439,
1155,
353,
8840,
836,
8,
341,
7727,
11,
716,
1669,
1532,
1702,
82010,
445,
51668,
77909,
6615,
12993,
5047,
13937,
497,
330,
51668,
77909,
22773,
11219,
5130,
18185,
1702,
8833,
1155,
11,
384,
11,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRequest_ClientID(t *testing.T) {
tests := []struct {
name string
request *alice.Request
want string
}{
{
name: "",
request: getReq(0),
want: "ru.yandex.searchplugin/7.16 (none none; android 4.4.2)",
}, {
name: "",
request: getReq(1),
want: "ru.yandex.searchplugin... | explode_data.jsonl/18220 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 281
} | [
2830,
3393,
1900,
46102,
915,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
23555,
353,
63195,
9659,
198,
197,
50780,
262,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
262,
8324,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestThumb_Filename(t *testing.T) {
conf := config.TestConfig()
thumbsPath := conf.CachePath() + "/_tmp"
defer os.RemoveAll(thumbsPath)
if err := conf.CreateDirectories(); err != nil {
t.Error(err)
}
t.Run("", func(t *testing.T) {
filename, err := thumb.Filename("99988", thumbsPath, 150, 150, thumb.Re... | explode_data.jsonl/1811 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 624
} | [
2830,
3393,
62699,
1400,
4033,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
2193,
8787,
2648,
2822,
70479,
15775,
1820,
1669,
2335,
46130,
1820,
368,
488,
3521,
62,
5173,
1837,
16867,
2643,
84427,
24365,
15775,
1820,
692,
743,
1848,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_SelectManyIdx_int_int(t *testing.T) {
type args struct {
source Enumerator[int]
selector func(int, int) Enumerator[int]
}
tests := []struct {
name string
args args
want Enumerator[int]
}{
{name: "1",
args: args{
source: NewOnSlice(1, 2, 3, 4),
selector: func(i, idx int) Enumerator... | explode_data.jsonl/63899 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 382
} | [
2830,
3393,
58073,
8441,
11420,
4042,
4042,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
47418,
256,
76511,
18640,
921,
197,
197,
8925,
2915,
1548,
11,
526,
8,
76511,
18640,
921,
197,
532,
78216,
1669,
3056,
1235,
341,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestUnit(t *testing.T) {
expectHash := func(tree *IAVLTree, hashCount int) {
// ensure number of new hash calculations is as expected.
hash, count := tree.HashWithCount()
if count != hashCount {
t.Fatalf("Expected %v new hashes, got %v", hashCount, count)
}
// nuke hashes and reconstruct hash, ensur... | explode_data.jsonl/5012 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1031
} | [
2830,
3393,
4562,
1155,
353,
8840,
836,
8,
1476,
24952,
6370,
1669,
2915,
21298,
353,
5863,
30698,
6533,
11,
5175,
2507,
526,
8,
341,
197,
197,
322,
5978,
1372,
315,
501,
5175,
28117,
374,
438,
3601,
624,
197,
50333,
11,
1760,
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 TestMinSyncInterval(t *testing.T) {
const minSyncInterval = 100 * time.Millisecond
f := &syncFile{}
w := NewLogWriter(f, 0)
w.SetMinSyncInterval(func() time.Duration {
return minSyncInterval
})
var timer fakeTimer
w.afterFunc = func(d time.Duration, f func()) syncTimer {
if d != minSyncInterval {
t... | explode_data.jsonl/58757 | {
"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,
6217,
12154,
10256,
1155,
353,
8840,
836,
8,
341,
4777,
1308,
12154,
10256,
284,
220,
16,
15,
15,
353,
882,
71482,
271,
1166,
1669,
609,
12996,
1703,
16094,
6692,
1669,
1532,
2201,
6492,
955,
11,
220,
15,
340,
6692,
4202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreInitAndBootstrap(t *testing.T) {
defer leaktest.AfterTest(t)()
// We need a fixed clock to avoid LastUpdateNanos drifting on us.
cfg := TestStoreConfig(hlc.NewClock(func() int64 { return 123 }, time.Nanosecond))
stopper := stop.NewStopper()
ctx := context.Background()
defer stopper.Stop(ctx)
eng :... | explode_data.jsonl/79 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 999
} | [
2830,
3393,
6093,
3803,
3036,
45511,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
197,
322,
1205,
1184,
264,
8356,
8866,
311,
5648,
7996,
4289,
45,
43605,
84253,
389,
601,
624,
50286,
1669,
3393,
6093,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVoteReviser(t *testing.T) {
r := require.New(t)
ctrl := gomock.NewController(t)
sm := testdb.NewMockStateManager(ctrl)
_, err := sm.PutState(
&totalBucketCount{count: 0},
protocol.NamespaceOption(StakingNameSpace),
protocol.KeyOption(TotalBucketKey),
)
r.NoError(err)
tests := []struct {
cand ... | explode_data.jsonl/2014 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1647
} | [
2830,
3393,
41412,
693,
2682,
261,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1373,
7121,
1155,
692,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
72023,
1669,
1273,
1999,
7121,
11571,
83132,
62100,
340,
197,
6878,
1848,
1669,
1525... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatchingConstraints(t *testing.T) {
cases := []struct {
constraints types.Constraints
tags []string
expected bool
}{
// simple test: must match
{
constraints: types.Constraints{
{
Key: "tag",
MustMatch: true,
Regex: "us-east-1",
},
},
tags: []stri... | explode_data.jsonl/64892 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 913
} | [
2830,
3393,
64430,
12925,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
37203,
7458,
4494,
4801,
7458,
198,
197,
3244,
2032,
286,
3056,
917,
198,
197,
42400,
262,
1807,
198,
197,
59403,
197,
197,
322,
4285,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShadowedFlag(t *testing.T) {
if ver, _ := goversion.Parse(runtime.Version()); ver.Major >= 0 && !ver.AfterOrEqual(goversion.GoVersion{Major: 1, Minor: 9, Rev: -1}) {
return
}
withTestProcess("testshadow", t, func(p *proc.Target, fixture protest.Fixture) {
assertNoError(p.Continue(), t, "Continue")
sco... | explode_data.jsonl/56292 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 529
} | [
2830,
3393,
23667,
291,
12135,
1155,
353,
8840,
836,
8,
341,
743,
2739,
11,
716,
1669,
728,
4366,
8937,
89467,
35842,
13426,
2739,
1321,
3035,
2604,
220,
15,
1009,
753,
423,
36892,
2195,
2993,
3268,
859,
1325,
67131,
5637,
90,
34475,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test(t *testing.T) {
segs := strings.Split(*testPort, ",")
for _, seg := range segs {
Suite(&clientTestSuite{port: seg})
}
TestingT(t)
} | explode_data.jsonl/74665 | {
"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,
1155,
353,
8840,
836,
8,
341,
84686,
5857,
1669,
9069,
19823,
4071,
1944,
7084,
11,
3670,
1138,
2023,
8358,
4810,
1669,
2088,
4810,
82,
341,
197,
7568,
9302,
2099,
2972,
2271,
28000,
90,
403,
25,
4810,
3518,
197,
532,
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
] | 2 |
func Test_Hoverfly_GetFilteredSimulation_ReturnBlankSimulation_IfThereIsNoMatch(t *testing.T) {
RegisterTestingT(t)
unit := NewHoverflyWithConfiguration(&Configuration{})
unit.Simulation.AddPair(&models.RequestMatcherResponsePair{
RequestMatcher: models.RequestMatcher{
Destination: []models.RequestFieldMatche... | explode_data.jsonl/45373 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 346
} | [
2830,
3393,
2039,
1975,
21642,
13614,
67310,
64554,
53316,
22770,
64554,
62,
2679,
3862,
3872,
2753,
8331,
1155,
353,
8840,
836,
8,
341,
79096,
16451,
51,
1155,
692,
81189,
1669,
1532,
34379,
21642,
2354,
7688,
2099,
7688,
6257,
692,
8118... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNumberConversionsFailForNonNumbers(t *testing.T) {
t.Parallel()
ctx := NewIsolate().NewContext()
res, err := ctx.Eval(`undefined`, "test.js")
if err != nil {
t.Fatal(err)
}
if res.IsKind(KindNumber) {
t.Errorf("Expected %q to NOT be a number kind, but it is: %q", res, res.kindMask)
}
if f64 := r... | explode_data.jsonl/81541 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 223
} | [
2830,
3393,
2833,
1109,
28290,
19524,
2461,
8121,
27237,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
1532,
3872,
33066,
1005,
3564,
1972,
2822,
10202,
11,
1848,
1669,
5635,
5142,
831,
5809,
9614,
7808,
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... | 5 |
func Test_HTTPClientFactory_Suite(t *testing.T) {
timeoutS := uint(2)
setupForTest := func(listenerCert, listenerKey string, trustSystemCerts bool) (*HorizonConfig, string, string) {
dir, listener := setupTesting(listenerCert, listenerKey, trustSystemCerts, t)
t.Logf("listening on %s", listener.Addr().String())... | explode_data.jsonl/70614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1020
} | [
2830,
3393,
34954,
2959,
4153,
1098,
9302,
1155,
353,
8840,
836,
8,
341,
78395,
50,
1669,
2622,
7,
17,
692,
84571,
2461,
2271,
1669,
2915,
40610,
36934,
11,
11446,
1592,
914,
11,
6950,
2320,
34,
15546,
1807,
8,
4609,
39601,
16973,
264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sequencer_getNACKSeqNo(t *testing.T) {
type args struct {
seqNo []uint16
}
type fields struct {
input []uint16
offset uint16
}
tests := []struct {
name string
fields fields
args args
want []uint16
}{
{
name: "Should get correct seq numbers",
fields: fields{
input: []ui... | explode_data.jsonl/15571 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 445
} | [
2830,
3393,
3453,
446,
19529,
3062,
45,
4032,
20183,
2753,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
78561,
2753,
3056,
2496,
16,
21,
198,
197,
532,
13158,
5043,
2036,
341,
197,
22427,
220,
3056,
2496,
16,
21,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestConfiguration(t *testing.T) {
for _, envCmd := range []cli.Command{
*getConfigurationCommand(),
*getVersionCommand(),
} {
assert.Equal(t, envCmd.Category, "Configuration")
assert.NotEmpty(t, envCmd.Name)
assert.NotEmpty(t, envCmd.Usage)
}
} | explode_data.jsonl/61891 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
3393,
7688,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
6105,
15613,
1669,
2088,
3056,
19521,
12714,
515,
197,
197,
9,
455,
7688,
4062,
3148,
197,
197,
9,
455,
5637,
4062,
3148,
197,
92,
341,
197,
6948,
12808,
1155,
11,
6105,
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 TestStudentTProbs(t *testing.T) {
src := rand.New(rand.NewSource(1))
for _, test := range []struct {
nu float64
mu []float64
sigma *mat.SymDense
x [][]float64
probs []float64
}{
{
nu: 3,
mu: []float64{0, 0},
sigma: mat.NewSymDense(2, []float64{1, 0, 0, 1}),
x: [][]float... | explode_data.jsonl/3126 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 858
} | [
2830,
3393,
14096,
51,
1336,
1279,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
10382,
7121,
37595,
7121,
3608,
7,
16,
1171,
2023,
8358,
1273,
1669,
2088,
3056,
1235,
341,
197,
197,
8933,
262,
2224,
21,
19,
198,
197,
2109,
84,
262,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrescalingWaitsForBackends(t *testing.T) {
// Create 3 stacks with traffic 0.0, 50.0 & 50.0
// Switch traffic to be 0.0, 30, 70.0
// Verify that actual traffic changes correctly
t.Parallel()
stacksetName := "stackset-prescale-backends-wait"
specFactory := NewTestStacksetSpecFactory(stacksetName).Ingress... | explode_data.jsonl/4349 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1002
} | [
2830,
3393,
14367,
81552,
54,
56479,
2461,
3707,
1412,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
220,
18,
39950,
448,
9442,
220,
15,
13,
15,
11,
220,
20,
15,
13,
15,
609,
220,
20,
15,
13,
15,
198,
197,
322,
15586,
9442,
311,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDescribeLoadBalancerOnDelete(t *testing.T) {
awsServices := NewFakeAWSServices()
c, _ := newAWSCloud(strings.NewReader("[global]"), awsServices)
awsServices.elb.expectDescribeLoadBalancers("aid")
c.EnsureLoadBalancerDeleted(TestClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "myservice", UID:... | explode_data.jsonl/12857 | {
"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,
74785,
5879,
93825,
1925,
6435,
1155,
353,
8840,
836,
8,
341,
197,
8635,
11025,
1669,
1532,
52317,
14419,
1220,
2161,
741,
1444,
11,
716,
1669,
501,
14419,
3540,
52178,
51442,
68587,
10937,
9752,
60,
3975,
31521,
11025,
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 TestPaymentFailsIfNoAssetSpecified(t *testing.T) {
kp0 := newKeypair0()
sourceAccount := NewSimpleAccount(kp0.Address(), int64(9605939170639898))
payment := Payment{
Destination: "GB7BDSZU2Y27LYNLALKKALB52WS2IZWYBDGY6EQBLEED3TJOCVMZRH7H",
Amount: "10",
}
_, err := NewTransaction(
TransactionParam... | explode_data.jsonl/20659 | {
"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,
20188,
37,
6209,
2679,
2753,
16604,
8327,
1870,
1155,
353,
8840,
836,
8,
341,
16463,
79,
15,
1669,
501,
6608,
1082,
1310,
15,
741,
47418,
7365,
1669,
1532,
16374,
7365,
5969,
79,
15,
26979,
1507,
526,
21,
19,
7,
24,
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... | 1 |
func TestGoogleCAClient(t *testing.T) {
os.Setenv("GKE_CLUSTER_URL", "https://container.googleapis.com/v1/projects/testproj/locations/us-central1-c/clusters/cluster1")
defer func() {
os.Unsetenv("GKE_CLUSTER_URL")
}()
testCases := map[string]struct {
service mock.CAService
expectedCert []string
expect... | explode_data.jsonl/32003 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 724
} | [
2830,
3393,
14444,
92832,
1451,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
38,
3390,
77871,
8000,
497,
330,
2428,
1110,
3586,
19758,
905,
5457,
16,
39606,
12697,
30386,
14,
31309,
62431,
84081,
16,
1786,
55931,
14605,
14,
188... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJoinsWithSelect(t *testing.T) {
type result struct {
ID uint
PetID uint
Name string
}
user := *GetUser("joins_with_select", Config{Pets: 2})
DB.Save(&user)
var results []result
DB.Table("users").Select("users.id, pets.id as pet_id, pets.name").Joins("left join pets on pets.user_id = users.id... | explode_data.jsonl/20076 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 291
} | [
2830,
3393,
22493,
1330,
2354,
3379,
1155,
353,
8840,
836,
8,
341,
13158,
1102,
2036,
341,
197,
29580,
262,
2622,
198,
197,
10025,
295,
915,
2622,
198,
197,
21297,
220,
914,
198,
197,
630,
19060,
1669,
353,
1949,
1474,
445,
7305,
1330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_runUpdateCmd(t *testing.T) {
fakeKeyName1 := "runUpdateCmd_Key1"
fakeKeyName2 := "runUpdateCmd_Key2"
cmd := updateKeyCommand()
// fails because it requests a password
assert.EqualError(t, runUpdateCmd(cmd, []string{fakeKeyName1}), "EOF")
// try again
mockIn, _, _ := tests.ApplyMockIO(cmd)
mockIn.Re... | explode_data.jsonl/17108 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 429
} | [
2830,
3393,
14007,
4289,
15613,
1155,
353,
8840,
836,
8,
341,
1166,
726,
58660,
16,
1669,
330,
6108,
4289,
15613,
35253,
16,
698,
1166,
726,
58660,
17,
1669,
330,
6108,
4289,
15613,
35253,
17,
1837,
25920,
1669,
2647,
1592,
4062,
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 TestProviderOnMiddlewares(t *testing.T) {
entryPoints := []string{"web"}
staticCfg := static.Configuration{
EntryPoints: map[string]*static.EntryPoint{
"web": {
Address: ":80",
},
},
}
rtConf := runtime.NewConfig(dynamic.Configuration{
HTTP: &dynamic.HTTPConfiguration{
Services: map[string... | explode_data.jsonl/25183 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 986
} | [
2830,
3393,
5179,
1925,
43935,
37903,
1155,
353,
8840,
836,
8,
341,
48344,
11411,
1669,
3056,
917,
4913,
2911,
63159,
6977,
42467,
1669,
1099,
17334,
515,
197,
197,
5874,
11411,
25,
2415,
14032,
8465,
1978,
22330,
2609,
515,
298,
197,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_unescapePathParams(t *testing.T) {
type Params struct {
ProjectName string
RepositoryName string
}
str := "params"
type args struct {
params interface{}
fieldNames []string
}
tests := []struct {
name string
args args
wantErr bool
}{
{"non ptr", args{str, []string{"Reposit... | explode_data.jsonl/7936 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 406
} | [
2830,
3393,
4907,
12998,
1820,
4870,
1155,
353,
8840,
836,
8,
341,
13158,
34352,
2036,
341,
197,
197,
7849,
675,
262,
914,
198,
197,
197,
4624,
675,
914,
198,
197,
630,
11355,
1669,
330,
3519,
1837,
13158,
2827,
2036,
341,
197,
25856,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUint8(t *testing.T) {
val := uint8(1)
m := map[string]interface{}{"value": val, "nothing": nil}
assert.Equal(t, val, New(m).Get("value").Uint8())
assert.Equal(t, val, New(m).Get("value").MustUint8())
assert.Equal(t, uint8(0), New(m).Get("nothing").Uint8())
assert.Equal(t, val, New(m).Get("nothing").Uint... | explode_data.jsonl/23464 | {
"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,
21570,
23,
1155,
353,
8840,
836,
8,
1476,
19302,
1669,
2622,
23,
7,
16,
340,
2109,
1669,
2415,
14032,
31344,
6257,
4913,
957,
788,
1044,
11,
330,
41212,
788,
2092,
532,
6948,
12808,
1155,
11,
1044,
11,
1532,
1255,
568,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInputService6ProtocolTestURIParameterQuerystringParamsAndJSONBodyCase1(t *testing.T) {
sess := session.New()
svc := NewInputService6ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
input := &InputService6TestShapeInputService6TestCaseOperation1Input{
Ascending: aws.String("true"),
... | explode_data.jsonl/8008 | {
"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,
2505,
1860,
21,
20689,
2271,
10301,
4971,
2859,
917,
4870,
3036,
5370,
5444,
4207,
16,
1155,
353,
8840,
836,
8,
341,
1903,
433,
1669,
3797,
7121,
741,
1903,
7362,
1669,
1532,
2505,
1860,
21,
20689,
2271,
57223,
11,
609,
86... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSplit(t *testing.T) {
type splitDesc struct {
script string
word string
sep string
result string
}
tests := map[string]splitDesc{
"space": {
script: "./testdata/split.sh",
word: "a b c",
sep: " ",
result: "a\nb\nc\n",
},
"pipes": {
script: "./testdata/split.sh",
wo... | explode_data.jsonl/78937 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 525
} | [
2830,
3393,
20193,
1155,
353,
8840,
836,
8,
341,
13158,
6718,
11065,
2036,
341,
197,
86956,
914,
198,
197,
66298,
256,
914,
198,
197,
197,
28036,
262,
914,
198,
197,
9559,
914,
198,
197,
630,
78216,
1669,
2415,
14032,
60,
6960,
11065,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNodeStack_Push(t *testing.T) {
stack := new(gost.NodeStack)
elem := newVector(0)
stack.Push(elem)
stack.Push(elem)
if stack.Size() != 2 {
t.Error("Enqueue() on stack failed, change undetected")
}
} | explode_data.jsonl/40063 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 87
} | [
2830,
3393,
1955,
4336,
1088,
1116,
1155,
353,
8840,
836,
8,
341,
48227,
1669,
501,
3268,
535,
21714,
4336,
340,
68779,
1669,
501,
3781,
7,
15,
340,
48227,
34981,
28880,
340,
48227,
34981,
28880,
340,
743,
5611,
2465,
368,
961,
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
] | 2 |
func TestUpdateUser(t *testing.T) {
th := Setup(t)
defer th.TearDown()
user := th.CreateUser()
th.Client.Login(user.Email, user.Password)
user.Nickname = "Joram Wilander"
user.Roles = model.SystemUserRoleId
user.LastPasswordUpdate = 123
ruser, _, err := th.Client.UpdateUser(user)
require.NoError(t, err)
Ch... | explode_data.jsonl/47505 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 819
} | [
2830,
3393,
4289,
1474,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
340,
16867,
270,
836,
682,
4454,
2822,
19060,
1669,
270,
7251,
1474,
741,
70479,
11716,
32499,
4277,
24066,
11,
1196,
25690,
692,
19060,
2067,
41052,
284,
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 TestCompleteTodo(t *testing.T) {
r := new(MemoryRepository)
s := NewService(r)
var userID int = 1
addedTodo, err := r.addTodo("todo1", nil, userID, defaultPriority())
if err != nil {
t.Fatalf("failed to add todo")
}
err = s.CompleteTodo(userID, addedTodo.id)
if err != nil {
t.Fatalf(err.Error())
}
... | explode_data.jsonl/21373 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
12548,
24176,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
501,
3189,
4731,
4624,
340,
1903,
1669,
1532,
1860,
2601,
692,
2405,
35204,
526,
284,
220,
16,
198,
12718,
291,
24176,
11,
1848,
1669,
435,
1364,
24176,
445,
17370,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseOid(t *testing.T) {
tests := []ParseOidTest{
ParseOidTest{"1.3.6.1.4.1.2636.3.2.3.1.20", ".1.3.6.1.4.1.2636.3.2.3.1.20", false},
ParseOidTest{".1.3.127.128", ".1.3.127.128", false},
ParseOidTest{"1.3", ".1.3", false},
ParseOidTest{".1.3.127.128.129", ".1.3.127.128.129", false},
ParseOidTest{"",... | explode_data.jsonl/71787 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 403
} | [
2830,
3393,
14463,
46,
307,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
14463,
46,
307,
2271,
515,
197,
10025,
2583,
46,
307,
2271,
4913,
16,
13,
18,
13,
21,
13,
16,
13,
19,
13,
16,
13,
17,
21,
18,
21,
13,
18,
13,
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... | 5 |
func TestVariance(t *testing.T) {
for i, test := range []struct {
x []float64
weights []float64
ans float64
}{
{
x: []float64{8, -3, 7, 8, -4},
weights: nil,
ans: 37.7,
},
{
x: []float64{8, -3, 7, 8, -4},
weights: []float64{1, 1, 1, 1, 1},
ans: 37.7,
},
... | explode_data.jsonl/1787 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 526
} | [
2830,
3393,
53,
36905,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1273,
1669,
2088,
3056,
1235,
341,
197,
10225,
981,
3056,
3649,
21,
19,
198,
197,
197,
13327,
3056,
3649,
21,
19,
198,
197,
43579,
257,
2224,
21,
19,
198,
197,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInterpretPath(t *testing.T) {
t.Parallel()
for _, domain := range common.AllPathDomainsByIdentifier {
t.Run(fmt.Sprintf("valid: %s", domain.Name()), func(t *testing.T) {
inter := parseCheckAndInterpret(t,
fmt.Sprintf(
`
let x = /%s/random
`,
do... | explode_data.jsonl/51790 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
3306,
8043,
1820,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
2023,
8358,
7947,
1669,
2088,
4185,
16764,
1820,
74713,
2720,
7189,
1476,
197,
3244,
16708,
28197,
17305,
445,
1891,
25,
1018,
82,
497,
7947,
2967,
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 TestMutex(t *testing.T) {
m := new(Mutex);
c := make(chan bool);
for i := 0; i < 10; i++ {
go HammerMutex(m, c);
}
for i := 0; i < 10; i++ {
<-c;
}
} | explode_data.jsonl/82482 | {
"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,
38099,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
501,
3189,
9371,
317,
1444,
1669,
1281,
35190,
1807,
317,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
26,
600,
1027,
341,
197,
30680,
36894,
38099,
1255,
11,
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... | 3 |
func Test_ConvertResourceToDeployableResource(t *testing.T) {
g := NewGomegaWithT(t)
ctx := context.Background()
test, err := makeTestResolver()
g.Expect(err).ToNot(HaveOccurred())
rg := createResourceGroup()
g.Expect(test.client.Create(ctx, rg)).To(Succeed())
account := createDummyResource()
g.Expect(test.cl... | explode_data.jsonl/45825 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
15100,
1621,
4783,
1249,
69464,
480,
4783,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
340,
20985,
1669,
2266,
19047,
2822,
18185,
11,
1848,
1669,
1281,
2271,
18190,
741,
3174,
81893,
3964,
568... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImportTestdata(t *testing.T) {
// This package only handles gc export data.
if runtime.Compiler != "gc" {
t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler)
}
tmpdir := mktmpdir(t)
defer os.RemoveAll(tmpdir)
compile(t, "testdata", "exports.go", filepath.Join(tmpdir, "testdat... | explode_data.jsonl/30560 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 369
} | [
2830,
3393,
11511,
2271,
691,
1155,
353,
8840,
836,
8,
341,
197,
322,
1096,
6328,
1172,
13469,
22122,
7485,
821,
624,
743,
15592,
35952,
961,
330,
20669,
1,
341,
197,
3244,
57776,
69,
445,
20669,
51614,
14185,
537,
2500,
320,
33620,
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... | 5 |
func TestTxSimulatorUnsupportedTx(t *testing.T) {
testEnv := testEnvsMap[levelDBtestEnvName]
testEnv.init(t, "testtxsimulatorunsupportedtx", nil)
defer testEnv.cleanup()
txMgr := testEnv.getTxMgr()
populateCollConfigForTest(t, txMgr.(*LockBasedTxMgr),
[]collConfigkey{
{"ns1", "coll1"},
{"ns1", "coll2"},
... | explode_data.jsonl/63614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 642
} | [
2830,
3393,
31584,
14027,
10511,
41884,
31584,
1155,
353,
8840,
836,
8,
341,
18185,
14359,
1669,
1273,
1702,
11562,
2227,
64586,
3506,
1944,
14359,
675,
921,
18185,
14359,
8271,
1155,
11,
330,
1944,
3998,
14781,
10511,
81145,
3998,
497,
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 TestAbsSourceURL(t *testing.T) {
jsonStr := sourceMapJSON
jsonStr = strings.Replace(jsonStr, "/the/root", "", 1)
jsonStr = strings.Replace(jsonStr, "one.js", "http://the/root/one.js", 1)
jsonStr = strings.Replace(jsonStr, "two.js", "/another/root/two.js", 1)
testAbsSourceURL(t, "", jsonStr)
testAbsSourceURL... | explode_data.jsonl/43000 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
27778,
3608,
3144,
1155,
353,
8840,
836,
8,
341,
30847,
2580,
1669,
2530,
2227,
5370,
198,
30847,
2580,
284,
9069,
20858,
9304,
2580,
11,
3521,
1782,
72074,
497,
7342,
220,
16,
340,
30847,
2580,
284,
9069,
20858,
9304,
2580,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParse_Timings_Delete(t *testing.T) {
s := NewTestStatsd()
s.DeleteTimings = true
fakeacc := &testutil.Accumulator{}
var err error
line := "timing:100|ms"
err = s.parseStatsdLine(line)
if err != nil {
t.Errorf("Parsing line %s should not have resulted in an error\n", line)
}
if len(s.timings) != 1 ... | explode_data.jsonl/14383 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 210
} | [
2830,
3393,
14463,
1139,
318,
819,
57418,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1532,
2271,
16635,
67,
741,
1903,
18872,
20217,
819,
284,
830,
198,
1166,
726,
4475,
1669,
609,
1944,
1314,
77538,
372,
10511,
16094,
2405,
1848,
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... | 4 |
func TestPreAuthorizeJsonFailure(t *testing.T) {
runPreAuthorizeHandler(
t, nil, "/authorize",
regexp.MustCompile(`/authorize\z`),
"not-json",
200, 500)
} | explode_data.jsonl/2402 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 71
} | [
2830,
3393,
4703,
37483,
5014,
17507,
1155,
353,
8840,
836,
8,
341,
56742,
4703,
37483,
3050,
1006,
197,
3244,
11,
2092,
11,
3521,
52022,
756,
197,
37013,
4580,
98626,
31813,
52022,
59,
89,
89746,
197,
197,
1,
1921,
56080,
756,
197,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestPageInfo_getLimit(t *testing.T) {
type fields struct {
Size uint
Num uint
}
tests := []struct {
name string
fields fields
wantLimit int
wantOffset int
}{
{
name: "case1",
fields: fields{
Size: 0,
Num: 0,
},
wantLimit: 10,
wantOffset: 0,
},
{
name: "... | explode_data.jsonl/66392 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 422
} | [
2830,
3393,
2665,
1731,
3062,
16527,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
91224,
2622,
198,
197,
197,
4651,
220,
2622,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
55276,
257,
5043... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateJob_ThroughPipelineID(t *testing.T) {
store, _, pipeline := initWithPipeline(t)
defer store.Close()
manager := NewResourceManager(store)
job := &api.Job{
Name: "j1",
Enabled: true,
PipelineSpec: &api.PipelineSpec{
PipelineId: pipeline.UUID,
Parameters: []*api.Parameter{
{Name: "par... | explode_data.jsonl/28376 | {
"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,
4021,
12245,
62,
23857,
34656,
915,
1155,
353,
8840,
836,
8,
341,
57279,
11,
8358,
15301,
1669,
13864,
34656,
1155,
340,
16867,
3553,
10421,
741,
92272,
1669,
1532,
32498,
31200,
340,
68577,
1669,
609,
2068,
45293,
515,
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 TestLogOptions(t *testing.T) {
fd, err := ioutil.TempFile("", "test")
require.NoError(t, err)
require.NoError(t, fd.Close())
defer os.Remove(fd.Name())
logOptions := []log.Option{
log.WithLevel("DEBUG"),
log.WithFormat(log.JSONFormat),
log.WithOutputFile(fd.Name()),
}
agentConfig, err := NewServerCo... | explode_data.jsonl/51906 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 266
} | [
2830,
3393,
2201,
3798,
1155,
353,
8840,
836,
8,
341,
61721,
11,
1848,
1669,
43144,
65009,
1703,
19814,
330,
1944,
1138,
17957,
35699,
1155,
11,
1848,
340,
17957,
35699,
1155,
11,
12414,
10421,
2398,
16867,
2643,
13270,
17609,
2967,
12367... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatch_Or_And(t *testing.T) {
var testData = []struct {
rawYql string
data map[string]interface{}
out bool
}{
{
rawYql: `a=9 or c=1 and b!='1'`,
data: map[string]interface{}{
"a": int64(10),
"b": int64(1),
"c": int64(1),
},
out: false,
},
{
rawYql: `a=10 and b>'2' o... | explode_data.jsonl/65943 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 649
} | [
2830,
3393,
8331,
62,
2195,
93846,
1155,
353,
8840,
836,
8,
341,
2405,
67348,
284,
3056,
1235,
341,
197,
76559,
56,
1470,
914,
198,
197,
8924,
256,
2415,
14032,
31344,
16094,
197,
13967,
262,
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... | 2 |
func TestGetAll(t *testing.T) {
msr := NewInMemoryTransactionStore(DummyMatcher{}, 10)
m1 := Transaction{Request: &mock.Request{Host: "TEST1"}}
msr.Save(m1)
m2 := Transaction{Request: &mock.Request{Host: "TEST2"}}
msr.Save(m2)
reqs := msr.GetAll()
msr.Reset()
if len(reqs) != 2 {
t.Fatalf("Invalid store len... | explode_data.jsonl/44241 | {
"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,
1949,
2403,
1155,
353,
8840,
836,
8,
1476,
47691,
81,
1669,
1532,
641,
10642,
8070,
6093,
5432,
8574,
37554,
22655,
220,
16,
15,
340,
2109,
16,
1669,
17869,
90,
1900,
25,
609,
16712,
9659,
90,
9296,
25,
330,
10033,
16,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSSc(t *testing.T) {
url := "http://fr.ninemanga.com/chapter/The%20Prince%27s%20Private%20Child/16548-10-1.html"
index := strings.LastIndex(url, "-")
url = url[:index+1] + "2" + url[index+2:]
log.Println(url)
} | explode_data.jsonl/35708 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
3393,
1220,
66,
1155,
353,
8840,
836,
8,
341,
19320,
1669,
330,
1254,
1110,
1626,
1253,
68413,
19372,
905,
21284,
2873,
47748,
4,
17,
15,
67932,
4,
17,
22,
82,
4,
17,
15,
16787,
4,
17,
15,
3652,
14,
16,
21,
20,
19,
23,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPSKConfiguration(t *testing.T) {
// Check for leaking routines
report := test.CheckRoutines(t)
defer report()
for _, test := range []struct {
Name string
ClientHasCertificate bool
ServerHasCertificate bool
ClientPSK PSKCallback
ServerPSK PSKCallback
Client... | explode_data.jsonl/40940 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1503
} | [
2830,
3393,
5012,
42,
7688,
1155,
353,
8840,
836,
8,
341,
197,
322,
4248,
369,
51829,
29497,
198,
69931,
1669,
1273,
10600,
49,
28628,
1155,
340,
16867,
1895,
2822,
2023,
8358,
1273,
1669,
2088,
3056,
1235,
341,
197,
21297,
338,
914,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClientOptions_deferToConnString(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip()
}
cs := testutil.ConnString(t)
uri := testutil.AddOptionsToURI(cs.String(), "appname=bar")
client, err := NewClientWithOptions(uri, clientopt.AppName("foo"))
require.NoError(t, err)
require.Equal(t, "bar", ... | explode_data.jsonl/13 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
2959,
3798,
7844,
261,
1249,
9701,
703,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
630,
71899,
1669,
1273,
1314,
50422,
703,
1155,
340,
197,
6070,
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... | 2 |
func TestPoolInitWithError(t *testing.T) {
defer leaktest.Check(t)()
p, e := NewPoolWithInit(func() (interface{}, error) {
return nil, errors.New("err")
}, 10)
assert.NotNil(t, e, "error should be returned")
assert.Nil(t, p, "result should be nil")
assert.Equal(t, e.Error(), "err", "return error")
} | explode_data.jsonl/59161 | {
"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,
10551,
3803,
66102,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
10600,
1155,
8,
741,
3223,
11,
384,
1669,
1532,
10551,
2354,
3803,
18552,
368,
320,
4970,
22655,
1465,
8,
341,
197,
853,
2092,
11,
5975,
7121,
445,
615,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewMem(t *testing.T) {
c := qt.New(t)
v := config.NewWithTestDefaults()
f := NewMem(v)
c.Assert(f.Source, qt.Not(qt.IsNil))
c.Assert(f.Source, hqt.IsSameType, new(afero.MemMapFs))
c.Assert(f.PublishDir, qt.Not(qt.IsNil))
c.Assert(f.PublishDir, hqt.IsSameType, new(afero.BasePathFs))
c.Assert(f.Os, hqt.... | explode_data.jsonl/4618 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
3564,
18816,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
38949,
7121,
1155,
340,
5195,
1669,
2193,
7121,
2354,
2271,
16273,
741,
1166,
1669,
1532,
18816,
3747,
692,
1444,
11711,
955,
30350,
11,
38949,
15000,
10583,
83,
4506,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTagged_parseName_Overflow(t *testing.T) {
var tag1 []string
wb := RowBinary.GetWriteBuffer()
tagsBuf := RowBinary.GetWriteBuffer()
defer wb.Release()
defer tagsBuf.Release()
logger := zapwriter.Logger("upload")
base := &Base{
queue: make(chan string, 1024),
inQueue: make(map[string]bool),
logge... | explode_data.jsonl/3479 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 326
} | [
2830,
3393,
5668,
3556,
21039,
675,
62,
42124,
1155,
353,
8840,
836,
8,
341,
2405,
4772,
16,
3056,
917,
198,
6692,
65,
1669,
10801,
21338,
2234,
7985,
4095,
741,
3244,
2032,
15064,
1669,
10801,
21338,
2234,
7985,
4095,
741,
16867,
37858... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssues(t *testing.T) {
tests := []string{
"test_issue4-001",
"test_issue4-002",
"test_issue4-003",
"test_issue4-004",
}
for _, test := range tests {
tmpl, err := ParseFile(filepath.Join("testdir", test+".slim"))
if err != nil {
t.Fatal(err)
}
f, err := os.Open(filepath.Join("testdir", tes... | explode_data.jsonl/80441 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 336
} | [
2830,
3393,
85828,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
917,
515,
197,
197,
1,
1944,
53340,
19,
12,
15,
15,
16,
756,
197,
197,
1,
1944,
53340,
19,
12,
15,
15,
17,
756,
197,
197,
1,
1944,
53340,
19,
12,
15,
15,
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... | 7 |
func TestAgent_Join_ACLDeny(t *testing.T) {
t.Parallel()
a1 := NewTestAgent(t.Name(), TestACLConfig())
defer a1.Shutdown()
a2 := NewTestAgent(t.Name(), "")
defer a2.Shutdown()
addr := fmt.Sprintf("127.0.0.1:%d", a2.Config.SerfPortLAN)
t.Run("no token", func(t *testing.T) {
req, _ := http.NewRequest("PUT", fm... | explode_data.jsonl/33604 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 468
} | [
2830,
3393,
16810,
10598,
1961,
97627,
23619,
88,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
16,
1669,
1532,
2271,
16810,
1155,
2967,
1507,
3393,
55393,
2648,
2398,
16867,
264,
16,
10849,
18452,
741,
11323,
17,
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... | 2 |
func TestRetryBase(t *testing.T) {
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}))
defer ts.Close()
c := getClient(ts.URL)
c.initialDelay = time.Microsecond
// One good endpoint:
c.bases = []string{c.bases[0]}
resp, err := c.requestRetry(http.MethodGet, "/", "", nil... | explode_data.jsonl/6246 | {
"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,
51560,
3978,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
13470,
1220,
2836,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
4687,
1171,
16867,
10591,
10421,
741,
1444,
1669,
86287,
35864... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetTransactions(t *testing.T) {
sandboxResp, _ := testClient.CreateSandboxPublicToken(sandboxInstitution, testProducts)
tokenResp, _ := testClient.ExchangePublicToken(sandboxResp.PublicToken)
startDate := time.Now().Add(-365 * 24 * time.Hour).Format(iso8601TimeFormat)
endDate := time.Now().Format(iso8601Ti... | explode_data.jsonl/49550 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 281
} | [
2830,
3393,
1949,
48761,
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,
12676,
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... | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.